Worldedit [Creating one myself :)]
#1
can someone create a look-a-like of worldedit? because Cuboidplus doesn't work anymore Sad
Reply
Thanks given by:
#2
I'm not familiar with either, could you perhaps describe the functionality that you want? Not "like XYZ", but "Do X, then Y, and the plugin creates Z"
Reply
Thanks given by:
#3
just like with world edit. you can use something like a wooden axe or something with that you can select points, and then you can use //walls and //set and //replace etc (can also be other commands)
Reply
Thanks given by:
#4
I have never seen worldedit, so you'll need to be a tad more specific. That is, if I were to make a plugin. Which I probably won't, anywayTongue
Reply
Thanks given by:
#5
made a video. thats better than words. Smile

Reply
Thanks given by:
#6
Was the video usefull? Smile
Reply
Thanks given by:
#7
I don't like videos, because even when you need to find only one tiny little detail, you still need to watch them full time. Also, not being searchable, copyable or archivable... But hey, as I said, I'm very unlikely to make any plugin, so perhaps someone else will find it usefulTongue
Reply
Thanks given by:
#8
Why won't you try to write a plugin on your own? (By this I mean "I'm not interested"Big Grin)
API is quite easy, Lua is stupiditly easy, and whole programming thing is basically just "all right, to do X I need to do Y, then Z". Where Y and Z are what computer is capable for.

Try some basic stuff, like creating a block where player stand by a command. Look at other plugins code (I do a lot!) - like Core, sTick, Rainy. Feel free to ask Smile

P.S.
Probably we'll have your enthusiasm to fill wiki up to dateBig Grin
Reply
Thanks given by:
#9
ok i tried like you said with creating a block where you stand and i have this:
function Initialize( Plugin )
	PLUGIN = Plugin
	
	Plugin:SetName( "PlaceHere" )
	Plugin:SetVersion( 1 )
	
	PluginManager = cRoot:Get():GetPluginManager()
	PluginManager:AddHook( Plugin, cPluginManager.E_PLUGIN_CHAT )
	
	Plugin:AddCommand("/PlaceHere",         " - Places a block where you stand",                 "PlaceHere.PlaceHere")
	
	Plugin:BindCommand( "/PlaceHere",            "PlaceHere.PlaceHere",            HandlePlaceHereCommand )
	Plugin:BindCommand( "/ph",                   "placehere.placehere",            HandlePlaceHereCommand )
	
	
	function HandlePlaceHereCommand( Split, Player)
	
	local World = cRoot:Get():GetDefaultWorld()
	local Name  = Player:GetName()
	
	IncrementUndoGroup( Name )
		
		X = mFloor(Player:GetPosX())
		Y = mFloor(Player:GetPosY())
		Z = mFloor(Player:GetPosZ())
			
		if Y ~= -1 then
			CuboidBlockPlace(X, Y, Z, fillBlock, 1, Name)
			Server:SendMessage( cChatColor.Green .. "Block placed at: ".. cChatColor.White .." X:" ..X.. " Y:" ..Y.. " Z:" ..Z.. "", Player )
		end
	end
	return true
end

LOG( "Initialized " .. Plugin:GetName() .. " v." .. Plugin:GetVersion() )
    return true
end
it says that there is an error close to the last "end"
Reply
Thanks given by:
#10
You didn't end your Initialize function with an "end" statement.

Use indentation to help you - after every "function", "if", "for", indent by one tab more; after each end, indent one tab less. Also, you do not want to declare your functions inside other functions (that's an advanced topic and you don't need it yet).
Reply
Thanks given by:




Users browsing this thread: 3 Guest(s)