can someone create a look-a-like of worldedit? because Cuboidplus doesn't work anymore
Worldedit [Creating one myself :)]
|
10-04-2012, 04:09 AM
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"
10-04-2012, 04:15 AM
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)
10-04-2012, 04:19 AM
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, anyway
made a video. thats better than words.
10-05-2012, 12:25 AM
Was the video usefull?
10-05-2012, 02:38 AM
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 useful
Why won't you try to write a plugin on your own? (By this I mean "I'm not interested")
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 P.S. Probably we'll have your enthusiasm to fill wiki up to date
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 endit says that there is an error close to the last "end"
10-06-2012, 10:33 PM
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). |
« Next Oldest | Next Newest »
|
Users browsing this thread: 4 Guest(s)