Postado Abril 30, 2016 9 anos Você testou? Está funcionando? Se não tiver, tente esse: Spoiler function doMarkPos(cid, posx, posy, posz) setPlayerStorageValue(cid, 19000, posx) setPlayerStorageValue(cid, 19001, posy) setPlayerStorageValue(cid, 19002, posz) end function getMarkPos(cid) return {x=getPlayerStorageValue(cid, 19000), y=getPlayerStorageValue(cid, 19001), z=getPlayerStorageValue(cid, 19002)} end local config = { newPos = {x = 1019, y = 1555, z = 7}, -- posição para onde os jogadores irão. tpPos = {x = 1050, y = 1560, z = 7}, -- posição onde será criado o teleporte. exhaust = 0.8, target = getCreatureTarget(cid), storage = 115820, } function onCastSpell(cid, var) local pos = getCreaturePosition(cid) if getMarkPos(cid).x =< 1 then print (1) doMarkPos(cid, pos.x, pos.y, pos.z) end print (2) if getPlayerStorageValue(cid, config.exhaust) < os.time() then if getMarkPos(cid).x > 0 then print (3) doCreateTeleport(1387, getMarkPos(cid), config.tpPos) doTeleportThing(cid, config.newPos) setPlayerStorageValue(cid, config.storage, config.exhaust + os.time()) end else doPlayerSendCancel(cid, "You are exhausted") end return true end Não dou suporte via PM, crie um tópico caso tenha dúvidas. Isso previne que outras pessoas com a mesma dúvida criem tópicos desnecessários.
Postado Abril 30, 2016 9 anos Autor 6 minutos atrás, Talesigorvr disse: Você testou? Está funcionando? Se não tiver, tente esse: Ocultar conteúdo function doMarkPos(cid, posx, posy, posz) setPlayerStorageValue(cid, 19000, posx) setPlayerStorageValue(cid, 19001, posy) setPlayerStorageValue(cid, 19002, posz) end function getMarkPos(cid) return {x=getPlayerStorageValue(cid, 19000), y=getPlayerStorageValue(cid, 19001), z=getPlayerStorageValue(cid, 19002)} end local config = { newPos = {x = 1019, y = 1555, z = 7}, -- posição para onde os jogadores irão. tpPos = {x = 1050, y = 1560, z = 7}, -- posição onde será criado o teleporte. exhaust = 0.8, target = getCreatureTarget(cid), storage = 115820, } function onCastSpell(cid, var) local pos = getCreaturePosition(cid) if getMarkPos(cid).x =< 1 then print (1) doMarkPos(cid, pos.x, pos.y, pos.z) end print (2) if getPlayerStorageValue(cid, config.exhaust) < os.time() then if getMarkPos(cid).x > 0 then print (3) doCreateTeleport(1387, getMarkPos(cid), config.tpPos) doTeleportThing(cid, config.newPos) setPlayerStorageValue(cid, config.storage, config.exhaust + os.time()) end else doPlayerSendCancel(cid, "You are exhausted") end return true end http://prntscr.com/ayvafo
Postado Abril 30, 2016 9 anos Ops Spoiler function doMarkPos(cid, posx, posy, posz) setPlayerStorageValue(cid, 19000, posx) setPlayerStorageValue(cid, 19001, posy) setPlayerStorageValue(cid, 19002, posz) end function getMarkPos(cid) return {x=getPlayerStorageValue(cid, 19000), y=getPlayerStorageValue(cid, 19001), z=getPlayerStorageValue(cid, 19002)} end local config = { newPos = {x = 1019, y = 1555, z = 7}, -- posição para onde os jogadores irão. tpPos = {x = 1050, y = 1560, z = 7}, -- posição onde será criado o teleporte. exhaust = 0.8, target = getCreatureTarget(cid), storage = 115820, } function onCastSpell(cid, var) local pos = getCreaturePosition(cid) if getMarkPos(cid).x <= 1 then print (1) doMarkPos(cid, pos.x, pos.y, pos.z) end print (2) if getPlayerStorageValue(cid, config.exhaust) < os.time() then if getMarkPos(cid).x > 0 then print (3) doCreateTeleport(1387, getMarkPos(cid), config.tpPos) doTeleportThing(cid, config.newPos) setPlayerStorageValue(cid, config.storage, config.exhaust + os.time()) end else doPlayerSendCancel(cid, "You are exhausted") end return true end Não dou suporte via PM, crie um tópico caso tenha dúvidas. Isso previne que outras pessoas com a mesma dúvida criem tópicos desnecessários.
Postado Abril 30, 2016 9 anos Autor 2 minutos atrás, Talesigorvr disse: Ops Ocultar conteúdo function doMarkPos(cid, posx, posy, posz) setPlayerStorageValue(cid, 19000, posx) setPlayerStorageValue(cid, 19001, posy) setPlayerStorageValue(cid, 19002, posz) end function getMarkPos(cid) return {x=getPlayerStorageValue(cid, 19000), y=getPlayerStorageValue(cid, 19001), z=getPlayerStorageValue(cid, 19002)} end local config = { newPos = {x = 1019, y = 1555, z = 7}, -- posição para onde os jogadores irão. tpPos = {x = 1050, y = 1560, z = 7}, -- posição onde será criado o teleporte. exhaust = 0.8, target = getCreatureTarget(cid), storage = 115820, } function onCastSpell(cid, var) local pos = getCreaturePosition(cid) if getMarkPos(cid).x <= 1 then print (1) doMarkPos(cid, pos.x, pos.y, pos.z) end print (2) if getPlayerStorageValue(cid, config.exhaust) < os.time() then if getMarkPos(cid).x > 0 then print (3) doCreateTeleport(1387, getMarkPos(cid), config.tpPos) doTeleportThing(cid, config.newPos) setPlayerStorageValue(cid, config.storage, config.exhaust + os.time()) end else doPlayerSendCancel(cid, "You are exhausted") end return true end erro http://prntscr.com/ayvc8k
Postado Abril 30, 2016 9 anos E não tá funcionando? O que acontece quando entra no tp? Não dou suporte via PM, crie um tópico caso tenha dúvidas. Isso previne que outras pessoas com a mesma dúvida criem tópicos desnecessários.
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.