Im searching for an onKill script for TFS.
I try to use this, but didnt work:
[12/05/2008 12:05:00] Error: [CreatureEvent::configureEvent] No valid type for creature event.kill
[12/05/2008 12:05:00] Warning: [BaseEvents::loadFromXml] Can not configure event
and in login.lua
and in xml
Can anyone help?
I try to use this, but didnt work:
[12/05/2008 12:05:00] Error: [CreatureEvent::configureEvent] No valid type for creature event.kill
[12/05/2008 12:05:00] Warning: [BaseEvents::loadFromXml] Can not configure event
Code:
function onKill(cid, target)
if(getPlayerStorageValue(cid, 10004) == 1) then
if(getCreatureName(target) == "wolf") then
local store = getPlayerStorageValue(cid, 100041)
setPlayerStorageValue(cid, 100041, ((store==-1 and 1) or store+1))
if(getPlayerStorageValue(cid, 100041) == 2) then
doPlayerSendTextMessage(cid, MSG_INFO_DESCR, "You killed all wolves! GRATZ!")
setPlayerStorageValue(cid, 10004, 2)
end
end
end
return TRUE
end
and in login.lua
Code:
if(getPlayerPlayerStorageValue(cid, 10004) == 1) then
registerCreatureEvent(cid, "WOLF_KILL")
end
and in xml
Code:
<event name="WOLF_KILL" type="kill" script="wolf_kill.lua"/>
Can anyone help?
Last edited: