Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gabrielcruzes #1872

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions data-otservbr-global/scripts/custom/tpfalante.lua
Original file line number Diff line number Diff line change
@@ -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()