kokokoko
Veteran OT User
- Joined
- Feb 4, 2008
- Messages
- 921
- Reaction score
- 257
This doesn't work, have no idea why(gheheh forgot to write this lol)
creaturescripts.xml
kill1.lua
login.lua
By the way, i made the function animation(), so that's not wrong. (Its the same as doSendMagicEffect() )
Thanks in advance,
//Kokokoko
creaturescripts.xml
Code:
<event type="login" name="login" script="login.lua" />
<event type="kill" name="kill1" script="kill1.lua"/>
kill1.lua
Code:
function onKill(cid, target)
pos = getPlayerPosition(cid)
if getPlayerStorageValue(cid, 10000) < 1 then
if(getCreatureName(target) == "Vampire") then
setPlayerStorageValue(cid, 10000, 1)
doPlayerSendTextMessage(cid, 22, "You will proceed in 30seconds. Prepare to die!!")
addEvent(t, 1000*5, {cid = cid})
end
end
return TRUE
end
function t(parameters)
newPos = {x=893, y=1133, z=8}
oldPos = getPlayerPosition(parameters.cid)
doTeleportThing(parameters.cid, newPos)
animation(newPos, 10)
animation(oldPos, 10)
end
login.lua
Code:
function onLogin(cid)
if getPlayerStorageValue(cid, 10000) < 1 then
registerCreatureEvent(cid, "kill1")
end
return 1
end
By the way, i made the function animation(), so that's not wrong. (Its the same as doSendMagicEffect() )
Thanks in advance,
//Kokokoko
Last edited: