Tech_Rob
New Member
- Joined
- Oct 10, 2007
- Messages
- 100
- Reaction score
- 1
Problem has been solved by Cykotitan. Thanks.
Greetings Otlanders! I have helped several in the past with some lua codes, but now I ask for yours. Here is the issue I am having.
I am trying to get an action id set to a scroll, it seems if I use onKill command, the creature dies and stands still with 0 hp, and no body.
Now if I use the onDeath command, I end up getting the creature to die and no body is left at all. I did see a script somewhere with keys dropping from monsters, so I tried that as well with no luck.
I have the event registered in the login.lua, and I have the event added to the monster that is suppose to drop it. Any ideas?
I am using TFS Crying Damson .3.6pl1
Greetings Otlanders! I have helped several in the past with some lua codes, but now I ask for yours. Here is the issue I am having.
I am trying to get an action id set to a scroll, it seems if I use onKill command, the creature dies and stands still with 0 hp, and no body.
Now if I use the onDeath command, I end up getting the creature to die and no body is left at all. I did see a script somewhere with keys dropping from monsters, so I tried that as well with no luck.
I have the event registered in the login.lua, and I have the event added to the monster that is suppose to drop it. Any ideas?
I am using TFS Crying Damson .3.6pl1
Code:
local scroll = 1949
function onKill(cid, target, lastHit)
if isMonster(cid) then
if(1 == math.random(1, 4)) then
doPlayerAddItem(uid, scroll)
doSetItemActionId(uid, 12000)
return true
elseif(2 == math.random(1, 4)) then
doPlayerAddItem(uid, scroll)
doSetItemActionId(uid, 12002)
return true
elseif(3 == math.random(1, 4)) then
doPlayerAddItem(uid, scroll)
doSetItemActionId(uid, 12003)
return true
elseif(4 == math.random(1, 4)) then
doPlayerAddItem(uid, scroll)
doSetItemActionId(uid, 12004)
return true
end
end
return false
end
Last edited: