CA
pedido

Erro Do Evento

Por Carnavotu, 26 de ago. de 2012 em Scripts

4
940
CarnavotuC
26 de agosto de 2012 às 19:05

Esta dando esse erro no evento, alguem me ajuda !

 

http://imageshack.us/f/688/errosg.png/

 

 

Abrass

KennyConradK
26 de agosto de 2012 às 19:37

poste o script dtk que está na pasta creaturescripts

CarnavotuC
26 de agosto de 2012 às 19:52

Aqui esta:

 

 

dofile("config-dtk.lua")

function onPrepareDeath(cid, deathList)

if getPlayerStorageValue(cid,death_times) == -1 then setPlayerStorageValue(cid,death_times,1) end

addEvent(doTeleportThing,1,cid,tp_pos_init[getPlayerGroup(cid)])

local delay = 0

local times = 5*getPlayerStorageValue(cid,death_times)

doCreatureSetNoMove(cid,TRUE)

setPlayerStorageValue(cid,controle_in_delay,1)

for i=times,0,-1 do

addEvent(doMessageWithCheck,delay,cid,21,"Respawn to back: "..i)

delay = 2000 + delay

if i == 0 then

addEvent(doMovePlayer,delay+1000,cid)

end

end

return TRUE

end

function doMessageWithCheck(cid,type,msg)

if isPlayerOnline(getCreatureName(cid)) and getGlobalStorageValue(controle_atived) ~= -1 then

doPlayerSendTextMessage(cid,type,msg)

else

stopEvent(doMessageWithCheck)

end

return TRUE

end

function doMovePlayer(cid)

if isPlayerOnline(getCreatureName(cid)) and getGlobalStorageValue(controle_atived) ~= -1 then

doCreatureSetNoMove(cid, FALSE)

doPlayerSendTextMessage(cid, 21, "Go Go GO!")

setPlayerStorageValue(cid,death_times,getPlayerStorageValue(cid,death_times)+1)

setPlayerStorageValue(cid,controle_in_delay,-1)

end

end

 

SkyLighS
27 de agosto de 2012 às 20:43

aki esta

 

function onPrepareDeath(cid, deathList)
if getPlayerStorageValue(cid,death_times) == -1 then setPlayerStorageValue(cid,death_times,1) end
addEvent(doTeleportThing,1,cid,tp_pos_init[getPlayerGroup(cid)])
local delay = 0
local times = 5*getPlayerStorageValue(cid,death_times)
doCreatureSetNoMove(cid,TRUE)
setPlayerStorageValue(cid,controle_in_delay,1)
for i=times,0,-1 do
addEvent(doMessageWithCheck,delay,cid,21,"Respawn to back: "..i)
delay = 2000 + delay
if i == 0 then
addEvent(doMovePlayer,delay+1000,cid)
end
end
return TRUE
end
function doMessageWithCheck(cid,type,msg)
if isPlayerOnline(getCreatureName(cid)) and getGlobalStorageValue(controle_atived) ~= -1 then
doPlayerSendTextMessage(cid,type,msg)
else
stopEvent(doMessageWithCheck)
end
return TRUE
end
function doMovePlayer(cid)
if isPlayerOnline(getCreatureName(cid)) and getGlobalStorageValue(controle_atived) ~= -1 then
doCreatureSetNoMove(cid, FALSE)
doPlayerSendTextMessage(cid, 21, "Go Go GO!")
setPlayerStorageValue(cid,death_times,getPlayerStorageValue(cid,death_times)+1)
setPlayerStorageValue(cid,controle_in_delay,-1)
end
end