This script is suppose to send you the message "no storage store is "..store.." klar is "..klar.." aa." if you don't have storage value 100041. if you do and you kill a wolf then it will show you how many you killed until you killed 5 wolfs. after that it will tell you your done and give you storagevalue 10005 which indicates that you are done with the quest
creaturescripts.xml
onkill.lua
in the wolf file i have
wolf.xml
Anyone know what might be wrong?
//Massen
creaturescripts.xml
Code:
<event name="wolf_kill" type="kill" script="onkill.lua"/>
onkill.lua
Code:
function onKill(cid, corpse, killer)
local store = getPlayerStorageValue(killer, 100041)
local klar = getPlayerStorageValue(killer, 10005)
if store >= 1 then
if store < 5 then
if klar == -1 then
if(isPlayer(killer) == TRUE) then
setPlayerStorageValue(killer,100041,store+1)
doPlayerSendTextMessage(killer, 22, "You killed "..store.."/5 wolfs!")
elseif store == 5 then
doPlayerSendTextMessage(killer, 22, "You killed "..store.."/5 wolfs! Go back to get your reward!")
setPlayerStorageValue(killer, 10005, 1)
else
doPlayerSendTextMessage(killer, 22, "no storage store is "..store.." klar is "..klar.." aa.")
end
end
end
return TRUE
end
end
in the wolf file i have
wolf.xml
Code:
<script>
<event name="wolf_kill"/>
</script>
Anyone know what might be wrong?
//Massen
Last edited: