sickk 0 Postado Setembro 2, 2012 Share Postado Setembro 2, 2012 Olá, Gostaria de um script que teleporte todos os players online para a localização de onde o GOD que digitou o comando estiver. Link para o comentário https://xtibia.com/forum/topic/193243-teleportar-todos-para-posi%C3%A7%C3%A3o-do-god-que-der-o-comando/ Compartilhar em outros sites More sharing options...
0 Skymagnum 234 Postado Setembro 2, 2012 Share Postado Setembro 2, 2012 (editado) function onSay(cid, words, param) for _, pid in ipairs(getPlayersOnline()) do doTeleportThing(pid, getPlayerPosition(cid)) end return true end teleportar para posiçao desejada function onSay(cid, words, param) local t = string.explode(param, ",") local pos = {x = tonumber(t[1]), y = tonumber(t[2]), z = tonumber(t[3])} if not tonumber(t[1]) or not tonumber(t[2]) or not tonumber(t[3]) then doPlayerSendTextMessage(cid, 28, "usase assim, !comando posição x, posição y, posição z.") return true end for _, pid in ipairs(getPlayersOnline()) do doTeleportThing(pid, pos) end return true end usase assim !comando posição x, posição y, posição z @EDIT! colocar identação Editado Setembro 2, 2012 por Skymagnum Link para o comentário https://xtibia.com/forum/topic/193243-teleportar-todos-para-posi%C3%A7%C3%A3o-do-god-que-der-o-comando/#findComment-1330111 Compartilhar em outros sites More sharing options...
0 notle2012 233 Postado Setembro 2, 2012 Share Postado Setembro 2, 2012 (editado) teleportar para para templo data\talkactions\scripts\nomedoarquivo.lua function onSay(cid, words, param) local players = getPlayersOnline() local pos = {x=160, y=54, z=7} -- posição do templo for i=1, #players do doTeleportThing(players[i], pos) end return true end data\talkactions\talkactions.xml adiciona isso <talkaction log="yes" words="/cmd" access="5" event="script" value="nomedoarquivo.lua"/> Todos Para Posição Do God function onSay(cid, words, param) local players = getPlayersOnline() for i=1, #players do doTeleportThing(players[i], getPlayerPosition(cid)) end return true end Editado Setembro 2, 2012 por notle2012 Link para o comentário https://xtibia.com/forum/topic/193243-teleportar-todos-para-posi%C3%A7%C3%A3o-do-god-que-der-o-comando/#findComment-1330115 Compartilhar em outros sites More sharing options...
0 sickk 0 Postado Setembro 2, 2012 Autor Share Postado Setembro 2, 2012 Skymagnum e notle2012 muito obrigado a vocês dois !! Testei aqui e notei que está teleportando o account manager também... Não teria como teleportar todos menos o account manager? Grato. Link para o comentário https://xtibia.com/forum/topic/193243-teleportar-todos-para-posi%C3%A7%C3%A3o-do-god-que-der-o-comando/#findComment-1330136 Compartilhar em outros sites More sharing options...
0 Skymagnum 234 Postado Setembro 2, 2012 Share Postado Setembro 2, 2012 function onSay(cid, words, param) local t = string.explode(param, ",") local pos = {x = tonumber(t[1]), y = tonumber(t[2]), z = tonumber(t[3])} if not tonumber(t[1]) or not tonumber(t[2]) or not tonumber(t[3]) then doPlayerSendTextMessage(cid, 28, "usase assim, !comando posição x, posição y, posição z.") return true end if getCreatureName(pid) == "Account Manager" then return false end for _, pid in ipairs(getPlayersOnline()) do doTeleportThing(pid, pos) end return true end Link para o comentário https://xtibia.com/forum/topic/193243-teleportar-todos-para-posi%C3%A7%C3%A3o-do-god-que-der-o-comando/#findComment-1330138 Compartilhar em outros sites More sharing options...
0 sickk 0 Postado Setembro 2, 2012 Autor Share Postado Setembro 2, 2012 Skymagnum, testei aqui e ta teleportando o Account Manager ainda Link para o comentário https://xtibia.com/forum/topic/193243-teleportar-todos-para-posi%C3%A7%C3%A3o-do-god-que-der-o-comando/#findComment-1330144 Compartilhar em outros sites More sharing options...
0 Skymagnum 234 Postado Setembro 2, 2012 Share Postado Setembro 2, 2012 function onSay(cid, words, param) local t = string.explode(param, ",") local pos = {x = tonumber(t[1]), y = tonumber(t[2]), z = tonumber(t[3])} if not tonumber(t[1]) or not tonumber(t[2]) or not tonumber(t[3]) then doPlayerSendTextMessage(cid, 28, "usase assim, !comando posição x, posição y, posição z.") return true end for _, pid in ipairs(getPlayersOnline()) do if getCreatureName(pid) ~= "Account Manager" then doTeleportThing(pid, pos) end end return true end hm testa ai Link para o comentário https://xtibia.com/forum/topic/193243-teleportar-todos-para-posi%C3%A7%C3%A3o-do-god-que-der-o-comando/#findComment-1330145 Compartilhar em outros sites More sharing options...
0 sickk 0 Postado Setembro 2, 2012 Autor Share Postado Setembro 2, 2012 function onSay(cid, words, param) local t = string.explode(param, ",") local pos = {x = tonumber(t[1]), y = tonumber(t[2]), z = tonumber(t[3])} if not tonumber(t[1]) or not tonumber(t[2]) or not tonumber(t[3]) then doPlayerSendTextMessage(cid, 28, "usase assim, !comando posição x, posição y, posição z.") return true end for _, pid in ipairs(getPlayersOnline()) do if getCreatureName(pid) ~= "Account Manager" then doTeleportThing(pid, pos) end end return true end hm testa ai Aee, esse funcionou certinho Valeu cara! Reputado. Link para o comentário https://xtibia.com/forum/topic/193243-teleportar-todos-para-posi%C3%A7%C3%A3o-do-god-que-der-o-comando/#findComment-1330151 Compartilhar em outros sites More sharing options...
Pergunta
sickk 0
Olá,
Gostaria de um script que teleporte todos os players online para a localização de onde o GOD que digitou o comando estiver.
Link para o comentário
https://xtibia.com/forum/topic/193243-teleportar-todos-para-posi%C3%A7%C3%A3o-do-god-que-der-o-comando/Compartilhar em outros sites
7 respostass a esta questão
Posts Recomendados