lukervis 0 Postado Novembro 6, 2010 Share Postado Novembro 6, 2010 Olá galera Então, estou a procura de um script que mande o jogador para um determinado lugar, exemplo: O player digitará !arenapvp, ai ele será teletransportado para X:180 Y:352 Z:7, X:129 Y:388 Z: 7 ou para X:135 Y: 339 Z:7 Tipo na sorte, cada hora ele iria para um lugar, estilo um math.random, A, e outra, ele não poderia digitar esse comando se estivesse com pz-battle, yellow skull e white skull. Se é que vocês entenderam, postem se conseguirem . Link para o comentário https://xtibia.com/forum/topic/144327-pedido-comando-de-teleport/ Compartilhar em outros sites More sharing options...
0 Eskylo 175 Postado Novembro 6, 2010 Share Postado Novembro 6, 2010 function onSay(cid) if (getCreatureCondition(cid, CONDITION_INFIGHT) == true) then doPlayerSendCancel(cid, "Sorry, you are in battle") return TRUE end local config = { tp1 = {x=180, y=352, z=7}, tp2 = {x=129, y=388, z=7}, tp3 = {x=135, y=339 z=7}, sorte = math.random(1, 3) } if config.sorte == 1 then doTeleportThing(cid, tp1) else if config.sorte == 2 then doTeleportThing(cid, tp2) else doTeleportThing(cid, tp3) end return true end Link para o comentário https://xtibia.com/forum/topic/144327-pedido-comando-de-teleport/#findComment-953944 Compartilhar em outros sites More sharing options...
0 lukervis 0 Postado Novembro 6, 2010 Autor Share Postado Novembro 6, 2010 function onSay(cid) if (getCreatureCondition(cid, CONDITION_INFIGHT) == true) then doPlayerSendCancel(cid, "Sorry, you are in battle") return TRUE end local config = { tp1 = {x=180, y=352, z=7}, tp2 = {x=129, y=388, z=7}, tp3 = {x=135, y=339 z=7}, sorte = math.random(1, 3) } if config.sorte == 1 then doTeleportThing(cid, tp1) else if config.sorte == 2 then doTeleportThing(cid, tp2) else doTeleportThing(cid, tp3) end return true end Deu um erro, Motivo do erro? Link para o comentário https://xtibia.com/forum/topic/144327-pedido-comando-de-teleport/#findComment-953950 Compartilhar em outros sites More sharing options...
0 joaohd 200 Postado Novembro 6, 2010 Share Postado Novembro 6, 2010 Tente este: function onSay(cid, words) local c = { {x=180, y=352, z=7}, {x=129, y=388, z=7}, {x=135, y=339, z=7}, } if getCreatureCondition(cid, CONDITION_INFIGHT) then return doPlayerSendCancel(cid, "Sorry, you are in battle") end if getCreatureSkullType(cid) ~= 0 then return doPlayerSendCancel(cid, "Sorry, you cannot use while is with skull.") end return doTeleportThing(cid, c[math.random(#c)]) end flw Link para o comentário https://xtibia.com/forum/topic/144327-pedido-comando-de-teleport/#findComment-953954 Compartilhar em outros sites More sharing options...
0 lukervis 0 Postado Novembro 6, 2010 Autor Share Postado Novembro 6, 2010 Tente este: function onSay(cid, words) local c = { {x=180, y=352, z=7}, {x=129, y=388, z=7}, {x=135, y=339, z=7}, } if getCreatureCondition(cid, CONDITION_INFIGHT) then return doPlayerSendCancel(cid, "Sorry, you are in battle") end if getCreatureSkullType(cid) ~= 0 then return doPlayerSendCancel(cid, "Sorry, you cannot use while is with skull.") end return doTeleportThing(cid, c[math.random(#c)]) end flw Ai, pego, muito obrigado aos 2 + rep para os 2 por me ajudar Pode fechar. Link para o comentário https://xtibia.com/forum/topic/144327-pedido-comando-de-teleport/#findComment-953960 Compartilhar em outros sites More sharing options...
Pergunta
lukervis 0
Olá galera
Então, estou a procura de um script que mande o jogador para um determinado lugar, exemplo:
O player digitará !arenapvp, ai ele será teletransportado para X:180 Y:352 Z:7, X:129 Y:388 Z: 7 ou para X:135 Y: 339 Z:7
Tipo na sorte, cada hora ele iria para um lugar, estilo um math.random,
A, e outra, ele não poderia digitar esse comando se estivesse com pz-battle, yellow skull e white skull.
Se é que vocês entenderam, postem se conseguirem
.
Link para o comentário
https://xtibia.com/forum/topic/144327-pedido-comando-de-teleport/Compartilhar em outros sites
4 respostass a esta questão
Posts Recomendados