Postado Abril 30, 2016 10 anos Autor 3 minutos atrás, Talesigorvr disse: Só para confirmar, você está SEM o script de movements, SEM o XML e com esse script: 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) setPlayerStorageValue(cid, config.storage, config.exhaust + os.time()) end else doPlayerSendCancel(cid, "You are exhausted") end return true end Certo? SPELL/SCRIPTS/KAMUI http://prntscr.com/ayuyg6 -- onde ta a spell Kamui Movents http://prntscr.com/ayuywz -- o que vc colocou agora e pra colocar em cuall Spell ou movents?
Postado Abril 30, 2016 10 anos Remova o movements. O script que eu passei, bote no mesmo lugar dos testes que eu pedi para você fazer.
Postado Abril 30, 2016 10 anos Autor 6 minutos atrás, Talesigorvr disse: Remova o movements. O script que eu passei, bote no mesmo lugar dos testes que eu pedi para você fazer. http://prntscr.com/ayv2pd eu tirei do movents oque vc mandou esse e o erro da 2 script
Postado Abril 30, 2016 10 anos O getCreatureTarget é porque você não deu target, já faço algo pra prevenir esse erro Testa assim e me diz quais números aparecem no console e se dá algum erro ao tentar entrar no teleport 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 doMarkPos(cid, pos.x, pos.y, pos.z) 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
Postado Abril 30, 2016 10 anos Autor 3 minutos atrás, Talesigorvr disse: O getCreatureTarget é porque você não deu target, já faço algo pra prevenir esse erro Testa assim e me diz quais números aparecem no console e se dá algum erro ao tentar entrar no teleport Mostrar conteúdo oculto 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 doMarkPos(cid, pos.x, pos.y, pos.z) 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/ayv781
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.