Postado Abril 25, 2023 2 anos .Qual servidor ou website você utiliza como base? RkDiazGlobal - TFS 1.6 Qual o motivo deste tópico? Pedido ajudar action Está surgindo algum erro? Se sim coloque-o aqui. Citar essa action que eu tenho funciona perfeitamente. só preciso que ela remova o teleport depois de 5 mim. allguem poderia ajudar o amigo! Você tem o código disponível? Se tiver publique-o aqui: local config = { teleportId = 27723, days = { ["Tuesday"] = {Position(998, 996, 7), Position(1487, 308, 13)}, -- Morshabaal - monday-Segunda, tuesday-Terça, wednesday-Quarta, thursday-Quinta, friday-Sexta, saturday-Sabado and sunday-Domingo }, bossPosition = Position(1507, 309, 14), bossName = "Gaz'haragoth", spawnTime = '18:43:00' } local Gazharagoth = GlobalEvent("Gazharagoth") function Gazharagoth.onTime(interval) local day = config.days[os.date("%A")] if day then Game.broadcastMessage(config.bossName .. ' In revenge for my brother death, I will devastate this continent!', MESSAGE_GAME_HIGHLIGHT) Game.broadcastMessage(config.bossName .. ' In revenge for my brother death, I will devastate this continent!', MESSAGE_EVENT_ADVANCE) local item = Game.createItem(config.teleportId, 1, day[1]) if item then if not item:isTeleport() then item:remove() return false end item:setDestination(day[2]) end addEvent(function() Game.createMonster(config.bossName, config.bossPosition, false, true) end, 5000) end return true end Gazharagoth:time(config.spawnTime) Gazharagoth:register() Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
Postado Maio 1, 2023 2 anos Diretor Em 25/04/2023 em 18:46, naval288 disse: .Qual servidor ou website você utiliza como base? RkDiazGlobal - TFS 1.6 Qual o motivo deste tópico? Pedido ajudar action Está surgindo algum erro? Se sim coloque-o aqui. Você tem o código disponível? Se tiver publique-o aqui: local config = { teleportId = 27723, days = { ["Tuesday"] = {Position(998, 996, 7), Position(1487, 308, 13)}, -- Morshabaal - monday-Segunda, tuesday-Terça, wednesday-Quarta, thursday-Quinta, friday-Sexta, saturday-Sabado and sunday-Domingo }, bossPosition = Position(1507, 309, 14), bossName = "Gaz'haragoth", spawnTime = '18:43:00' } local Gazharagoth = GlobalEvent("Gazharagoth") function Gazharagoth.onTime(interval) local day = config.days[os.date("%A")] if day then Game.broadcastMessage(config.bossName .. ' In revenge for my brother death, I will devastate this continent!', MESSAGE_GAME_HIGHLIGHT) Game.broadcastMessage(config.bossName .. ' In revenge for my brother death, I will devastate this continent!', MESSAGE_EVENT_ADVANCE) local item = Game.createItem(config.teleportId, 1, day[1]) if item then if not item:isTeleport() then item:remove() return false end item:setDestination(day[2]) end addEvent(function() Game.createMonster(config.bossName, config.bossPosition, false, true) end, 5000) end return true end Gazharagoth:time(config.spawnTime) Gazharagoth:register() Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. Ai está local config = { teleportId = 27723, days = { ["Tuesday"] = {Position(998, 996, 7), Position(1487, 308, 13)}, -- Morshabaal - monday-Segunda, tuesday-Terça, wednesday-Quarta, thursday-Quinta, friday-Sexta, saturday-Sabado and sunday-Domingo }, bossPosition = Position(1507, 309, 14), bossName = "Gaz'haragoth", spawnTime = '18:43:00' } local Gazharagoth = GlobalEvent("Gazharagoth") local function removeTeleport(item) if item and item:getId() == config.teleportId and item:isTeleport() then item:remove() end end function Gazharagoth.onTime(interval) local day = config.days[os.date("%A")] if day then Game.broadcastMessage(config.bossName .. ' In revenge for my brother death, I will devastate this continent!', MESSAGE_GAME_HIGHLIGHT) Game.broadcastMessage(config.bossName .. ' In revenge for my brother death, I will devastate this continent!', MESSAGE_EVENT_ADVANCE) local item = Game.createItem(config.teleportId, 1, day[1]) if item then if not item:isTeleport() then item:remove() return false end item:setDestination(day[2]) addEvent(removeTeleport, 300000, item) -- remove o teleport depois de 5 minutos (300000 ms) end addEvent(function() Game.createMonster(config.bossName, config.bossPosition, false, true) end, 5000) end return true end Gazharagoth:time(config.spawnTime) Gazharagoth:register() Eu sou um entusiasta da programação apaixonado por ajudar a comunidade open source a crescer. Sempre em busca de novos desafios e oportunidades para contribuir com meu código. #OpenSource #Programação #Contribuição
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.