boby psaico
Member
- Joined
- Oct 17, 2009
- Messages
- 84
- Reaction score
- 5
@About the title:
I created on a wrong session by mistake, sorry.
Hello everyone,
I'm trying to do a script where an item is added to a monster corpse after kill it, and the item depends on player vocation.
But I don't know the exactly command to do it.
I'm using function onKill:
I tried the code below but it creates the item on the floor:
If I put "corpse" instead "getPosition" it shows an error:
I have no idea how to do it anymore :S
I created on a wrong session by mistake, sorry.
Hello everyone,
I'm trying to do a script where an item is added to a monster corpse after kill it, and the item depends on player vocation.
But I don't know the exactly command to do it.
I'm using function onKill:
Lua:
function onKill(player, target)
I tried the code below but it creates the item on the floor:
Lua:
Game.createItem(2160, 100, target:getPosition())
If I put "corpse" instead "getPosition" it shows an error:
Lua:
attempt to call method 'corpse' (a nil value)
I have no idea how to do it anymore :S
Last edited: