12-25-2011, 09:28 PM
maybe can someone create an plugin to spawn mobs? it would be great if someone could do that.
spawnmob
|
||||||
12-25-2011, 09:28 PM
maybe can someone create an plugin to spawn mobs? it would be great if someone could do that.
02-16-2012, 03:16 AM
07-12-2013, 12:15 AM
I'll try to do that, but as you knoe I'm a noob so maybe I can't. Some time ago I made a
half-done plugin that let you to spawn spiders, creepers and other monsters so maybe I can do it. I'll try to make it like bukkit essentials spawnmob.
What I did wrong?
![]()
[20:01:28] LUA: Plugins/SpawnMob/main.lua:12: attempt to call method 'SendMessage' (a nil value) [20:01:28] LUA error in cPlugin_NewLua::HandleCommand. Stack size: 3 and [20:01:28] LUA: Plugins/SpawnMob/main.lua:12: attempt to call method 'GetWorld' (a nil value) [20:01:28] LUA error in cPlugin_NewLua::HandleCommand. Stack size: 3
07-12-2013, 04:10 AM
I think becouse OtherPlayer and creeper both are a nil value.
07-12-2013, 04:12 AM
07-12-2013, 04:21 AM
Are you sure you have the arguments alright? The command handler callbacks take only two arguments, the first one is the split command, the second one is the cPlayer. Your function has more args and mixed up.
Secondly, to compare strings, you need to put them in quotes properly:
Thanks given by: NiLSPACE
07-12-2013, 04:22 AM
I don't see anywhere what OtherPlayer is. Its just a nil value I think. I usely use something like this: I quickly created it so there could be some mistakes in it.
Thanks given by: tonibm19
07-12-2013, 04:27 AM
I prefer to call the number "type", rather than "id". ID means unique, two spiders have different IDs
![]() Instead of doing a ForEachPlayer(), you can also do DoWithPlayer() that calls the callback only once. But then, if you have multiple players of the same name (perfectly legal in MCS), only the first one would match.
07-12-2013, 05:01 AM
Patch:
![]() I didn't commit it becouse I'm not sure if I had to use int or something else. | ||||||
« Next Oldest | Next Newest »
|