ziggy46802
Active Member
- Joined
- Aug 19, 2012
- Messages
- 418
- Reaction score
- 27
in login.lua I have this
in creaturescripts.xml I have this
and bestiary.lua looks like this
I have the storages set to the questlog so that all works, but when I kill a chicken, the chicken just freezes and has no health above it and you cant walk over it, what did I do wrong?
I found a post by Cyko and used his script, which was:
and it works!
LUA:
registerCreatureEvent(cid, "Bestiary")
in creaturescripts.xml I have this
LUA:
<event type="kill" name="Bestiary" event="script" value="bestiary.lua"/>
and bestiary.lua looks like this
LUA:
function onKill(cid, target, lastHit)
if getCreatureName(target) == "Chicken" and getPlayerStorageValue(cid, 15001) ~= 2 then
setPlayerStorageValue(cid, 15001, 2)
doPlayerSendTextMessage(cid, 24, "You have added the creature 'Chicken' to your Bestiary")
end
end
I have the storages set to the questlog so that all works, but when I kill a chicken, the chicken just freezes and has no health above it and you cant walk over it, what did I do wrong?
I found a post by Cyko and used his script, which was:
LUA:
function onKill(cid, target)
if (not isMonster(target)) then
return false
end
if getCreatureName(target) == "Chicken" and getPlayerStorageValue(cid, 15001) < 2 then
setPlayerStorageValue(cid, 15001, 2)
doCreatureSay(cid, "You have added the creature 'Chicken' to your bestiary.", TALKTYPE_ORANGE_1)
end
return true
end
Last edited: