Postado Junho 9, 2016 9 anos PEDIDO [GLOBALEVENTS] - Mandar players pro templo por AREA EXEMPLO: os players que estiverem entre as positions: FromPosition = {x = 235, y = 20, z = 7} ToPosition = {x = 287, y = 53, z = 7} sao mandados pro templo as 19:00 da noite alguem pode me ajudar?
Postado Junho 9, 2016 9 anos Esta é uma mensagem automática! Este tópico foi movido para a área correta.Pedimos que você leia as regras do fórum. Spoiler This is an automated message! This topic has been moved to the correct area.Please read the forum rules. local fromPos = {x = 235, y = 20, z = 7} local toPos = {x = 287, y = 53, z = 7} function onTime() for k, v in pairs(getPlayersOnline()) do if isInRange(getThingPos(v), fromPos, toPos) then doTeleportThing(getTownTemplePosition(getPlayerTown(v))) end end end <globalevent name="Teleport" time="19:00:00" event="script" value="NOMEDOSCRIPTAQUI.lua"/> _ .-'` `} _./) / } .'o \ | } '.___.'`.\ {` /`\_/ , `. } ME DA UMA NOZ! \=' .-' _`\ { `'`;/ `, } _\ @ ; } /__`;-...'--' Cluck!
Postado Junho 10, 2016 9 anos Autor [Error - Globalevent Interface] data/globalevents/script/teleport.lua:OnTime Description: <LuaDoTeleportThing> Thing not found [Error - Globalevents::timer] Couldn't execute event: Teleport :c Edit: Consegui, achei um script que o vodkart fez, mesmo assim obrigado por tentar, REP+ SCRIPT: function onTime() local area = {{x=32592,y=32663,z=7},{x=32594,y=32666,z=7}} local topos = {x=32623, y=32660, z=7} local remove, clean = true, true for x = area[1].x - 1, area[2].x + 1 do for y = area[1].y - 1, area[2].y + 1 do local pos = {x=x, y=y, z=area[1].z} local m = getTopCreature(pos).uid if remove ~= false and m ~= 0 and isMonster(m) then doRemoveCreature(m) end if clean ~= false then doCleanTile(pos, false) end if m ~= 0 and isPlayer(m) then doTeleportThing(m, topos) end end end return true end Editado Junho 10, 2016 9 anos por poko360 (veja o histórico de edições)
Postado Junho 10, 2016 9 anos Solução /\ esse script é usado pra outra coisa, usa assim: local from, to = {x = 235, y = 20, z = 7}, {x = 287, y = 53, z = 7} function onTime() for _, pid in ipairs(getPlayersOnline()) do if isInRange(getPlayerPosition(pid), from, to) then doTeleportThing(pid,getTownTemplePosition(getPlayerTown(pid))) end end return true end [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Junho 12, 2016 8 anos Erro besta, novamente, ultimamente eu estou errando só por besteira, foi mal aí, faltou um parâmetro na função, vodkart já arrumou. _ .-'` `} _./) / } .'o \ | } '.___.'`.\ {` /`\_/ , `. } ME DA UMA NOZ! \=' .-' _`\ { `'`;/ `, } _\ @ ; } /__`;-...'--' Cluck!
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.