Olá pessoal , estou aqui para pedir que concertem para mim esse script que vou postar ....
o stopEvent dele nao esta funcionando , ou seja , o addEvent continua rodando ate dar o tempo final e no meu sistema isso nao pode ocorrer ,se vocês conseguirem colocar para o stopEvent funcionar , eu agradeço . Obrigado !
Hello guys, I'm here to ask you to consult each other for me this script that will post ....
the StopEvent it is not working, ie the addEvent continues running until the end and take the time on my system this can not occur, if you succeed to put StopEvent work, I appreciate it. Thank you!
o stopEvent dele nao esta funcionando , ou seja , o addEvent continua rodando ate dar o tempo final e no meu sistema isso nao pode ocorrer ,se vocês conseguirem colocar para o stopEvent funcionar , eu agradeço . Obrigado !
Hello guys, I'm here to ask you to consult each other for me this script that will post ....
the StopEvent it is not working, ie the addEvent continues running until the end and take the time on my system this can not occur, if you succeed to put StopEvent work, I appreciate it. Thank you!
function onStepIn(cid, item, pos, fromPosition)
local segundos = 10
local cost = 250000
if item.actionid == 9550 then
storage = 130000
msg = "Tem Alguem Ai."
if getGlobalStorageValue(cid, storage) > 0 then
setGlobalStorageValue(130000, 0) -- Faz com que ele tenha entrado na arena, ninguem pode entrar ate ele morrer/vencer!
setPlayerStorageValue(cid, 170000, -1)
stopEvent(teleporte)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
return TRUE
end
end
if item.actionid == 9546 then
if not isPlayer(cid) then
return TRUE
end
if getGlobalStorageValue(130000) == 1 then
doTeleportThing(cid, fromPosition, true)
doPlayerSendCancel(cid, "Ja tem alguem na arena")
doCreatureSay(cid, "Tem Gente!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return TRUE
end
if not(doPlayerRemoveMoney(cid, cost) == TRUE) then
doTeleportThing(cid, fromPosition, true)
doCreatureSay(cid, "Sem Grana!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return TRUE
end
local configs = {
playpos = {x=428, y=153, z=7} -- LUGAR ONDE O PLAYER VAI PARAR
}
doTeleportThing(cid, configs.playpos)
setGlobalStorageValue(130000, 1) -- Faz com que ele tenha entrado na arena, ninguem pode entrar ate ele morrer/vencer!
setPlayerStorageValue(cid, 151000, 1) -- Comecou a arena EASY.
setPlayerStorageValue(cid, 150000, 0) -- nivel 1
setPlayerStorageValue(cid, 160000, -1)
setPlayerStorageValue(cid, 170000, 1)
addEvent(teleporte, segundos * 1000, cid)
addEvent(setPlayerStorageValue,segundos * 1000, cid, 170000, -1)
addEvent(setGlobalStorageValue,segundos * 1000, 130000, -1)
addEvent(setPlayerStorageValue,segundos * 1000, cid, 151000, -1)
end
end
function teleporte(cid)
doTeleportThing(cid, {x=377,y=138,z=6})
end