Ninja Bodil
New Member
- Joined
- Mar 7, 2009
- Messages
- 116
- Reaction score
- 0
So this script should give a storage value when you kill a monster, but nothing happens.
I've put the name of the event in login.lua but nothing. And I get no errors.
I've put the name of the event in login.lua but nothing. And I get no errors.
PHP:
function onKill(cid, target, lastHit)
if getCreatureName(target) == "Test Monster" then
if isPlayer(target) then return true end
if getCreatureStorage(cid, 6501) > 0 then
if getCreatureStorage(cid, 6501) < 50 then
if getCreatureStorage(cid, 6501) < 0 then
doCreatureSetStorage(cid, 6501, 0)
end
doCreatureSetStorage(cid, 6501, getCreatureStorage(cid, 6501) + 1)
doSendAnimatedText(cid, getCreatureStorage(cid, 6501), 255)
end
end
end
return true
end