bpm91
Advanced OT User
- Joined
- May 23, 2019
- Messages
- 1,046
- Solutions
- 7
- Reaction score
- 180
- Location
- Brazil
- YouTube
- caruniawikibr
<globalevent name="animate" interval="2000" script="animate.lua" />
local TEXTCOLOR = {
BLACK = 0,
BLUE = 5,
GREEN = 18,
LIGHTGREEN = 66,
DARKBROWN = 78,
LIGHTBLUE = 89,
MAYABLUE = 95,
DARKRED = 108,
DARKPURPLE = 112,
BROWN = 120,
GREY = 129,
TEAL = 143,
DARKPINK = 152,
PURPLE = 154,
DARKORANGE = 156,
RED = 180,
PINK = 190,
ORANGE = 192,
DARKYELLOW = 205,
YELLOW = 210,
WHITE = 215,
NONE = 255,
}
local effects = {
{position = Position(153, 48, 7), text = 'Hunts', effects = {29,11}, textColor = TEXTCOLOR.YELLOW},
{position = Position(151, 48, 7), text = 'Quests', effects = {29,11}, textColor = TEXTCOLOR.YELLOW},
{position = Position(152, 48, 7), text = 'Trainers', effects = {29,11}, textColor = TEXTCOLOR.YELLOW},
{position = Position(160, 41, 7), text = 'Vip', effects = {29}, textColor = TEXTCOLOR.YELLOW},
}
function onThink(creature, interval)
for i = 1, #effects do
local settings = effects
local spectators = Game.getSpectators(settings.position, false, true, 7, 7, 5, 5)
if #spectators > 0 then
if settings.text then
Game.sendAnimatedText(settings.text, settings.position, settings.textColor)
end
for _, effect in ipairs(settings.effects) do
settings.position:sendMagicEffect(effect)
end
end
end
return true
end
function onThink(interval)
local effects = {
{position = Position(998, 1213, 7), text = "Exsluiva", effect = 40, say = true, color = math.random(1,255)},
{position = Position(998, 1213, 7), text = "Hunts", effect = 40, say = true, color = math.random(1,255)},
{position = Position(998, 1213, 7), text = "++Hunts", effect = 40, say = true, color = math.random(1,255)},
}
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
if settings.say then
spectators[i]:say(settings.text, TALKTYPE_MONSTER_SAY, false, spectators[i], settings.position)
else
Game.sendAnimatedText(settings.text, settings.position, settings.color)
end
end
end
if settings.effect then
settings.position:sendMagicEffect(settings.effect)
end
end
end
return true
end
<globalevent name="TextEffect" interval="3550" script="custom/textEffect.lua" />