From 46db79477b4e96b05870ff837818d9ddf28b592e Mon Sep 17 00:00:00 2001 From: gabrielcruzes <77302743+gabrielcruzes@users.noreply.github.com> Date: Thu, 16 Nov 2023 21:03:48 -0300 Subject: [PATCH] # Teleport Templo Thais --- .../scripts/custom/tpfalante.lua | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 data-otservbr-global/scripts/custom/tpfalante.lua diff --git a/data-otservbr-global/scripts/custom/tpfalante.lua b/data-otservbr-global/scripts/custom/tpfalante.lua new file mode 100644 index 00000000000..a579ae88bb2 --- /dev/null +++ b/data-otservbr-global/scripts/custom/tpfalante.lua @@ -0,0 +1,28 @@ +local effects = { + {position = Position(32364, 32231, 7), text = 'TRAINERS', effect = CONST_ME_GROUNDSHAKER}, + {position = Position(32364, 32235, 7), text = 'SALA DE BOSSES', effect = CONST_ME_GROUNDSHAKER}, + {position = Position(32364, 32233, 7), text = 'HUNTS', effect = CONST_ME_GROUNDSHAKER}, + {position = Position(32374, 32235, 7), text = 'ROLETA DA SORTE', effect = CONST_ME_GROUNDSHAKER}, +} + +local animatedText = GlobalEvent("AnimatedText") +function animatedText.onThink(interval) + for i = 1, #effects do + local settings = effects[i] + local spectators = Game.getSpectators(settings.position, false, true, 7, 7, 5, 5) + if #spectators > 0 then + if settings.text then + for i = 1, #spectators do + spectators[i]:say(settings.text, TALKTYPE_MONSTER_SAY, false, spectators[i], settings.position) + end + end + if settings.effect then + settings.position:sendMagicEffect(settings.effect) + end + end + end + return true +end + +animatedText:interval(4550) +animatedText:register() \ No newline at end of file