Postado Abril 30, 2016 9 anos Autor Em 30/04/2016 em 19:54, Talesigorvr disse: Tinha esquecido do (cid), corrigi. http://prntscr.com/ayt37e o erro sumiu + dps teve esse
Postado Abril 30, 2016 9 anos Pronto. Testa de novo. 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 Em 30/04/2016 em 02:57, Talesigorvr disse: 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. exahaust = 0.8, target = getCreatureTarget(cid), storage = 115820, } function onCastSpell(cid, var) local pos = getCreaturePosition(cid) if getMarkPos(cid).x < 1 then doMarkPos(cid, pos.x, pos.y, pos.z) end if getPlayerStorageValue(cid, config.exhaust) < os.time() then if getMarkPos(cid).x > 0 then doCreateTeleport(1387, getMarkPos(cid), config.tpPos) doTeleportThing(cid, config.newPos) doTeleportThing(config.target, config.newPos) setPlayerStorageValue(cid, config.storage, config.exaust + os.time()) end else doPlayerSendCancel(cid, "You are exhausted") end return true end Peguei a função de salvar a posição em um post daqui do fórum mesmo. Créditos: Skydangerous http://prntscr.com/ayt8pf
Postado Abril 30, 2016 9 anos Lol, eu botei "exaust", não "exhaust". E no config coloquei "exahaust". Arrumei o código. 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 Em 30/04/2016 em 02:57, Talesigorvr disse: 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 doMarkPos(cid, pos.x, pos.y, pos.z) end if getPlayerStorageValue(cid, config.exhaust) < os.time() then if getMarkPos(cid).x > 0 then doCreateTeleport(1387, getMarkPos(cid), config.tpPos) doTeleportThing(cid, config.newPos) doTeleportThing(config.target, config.newPos) setPlayerStorageValue(cid, config.storage, config.exhaust + os.time()) end else doPlayerSendCancel(cid, "You are exhausted") end return true end Peguei a função de salvar a posição em um post daqui do fórum mesmo. Créditos: Skydangerous http://prntscr.com/aytfn6
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.