• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ Effects Tfs 1.2

Solution
The server in the picture is not my servant, I'm just stating what I want
Lua:
function onThink(interval)
    local effects = {
      -----TEMPLE TEXT DISPLAY-----
     {position = Position(1000, 1000, 7), text = "Text", effect = 11, say = false, color = math.random(100,215)},
}


    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...
The server in the picture is not my servant, I'm just stating what I want
Lua:
function onThink(interval)
    local effects = {
      -----TEMPLE TEXT DISPLAY-----
     {position = Position(1000, 1000, 7), text = "Text", effect = 11, say = false, color = math.random(100,215)},
}


    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


Code:
<globalevent name="Text_Effect" interval="2000" script="text_effect.lua" />
 
Solution
Lua:
function onThink(interval)
    local effects = {
      -----TEMPLE TEXT DISPLAY-----
     {position = Position(1000, 1000, 7), text = "Text", effect = 11, say = false, color = math.random(100,215)},
}


    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


Code:
<globalevent name="Text_Effect" interval="2000" script="text_effect.lua" />
lol
how did you know
my x y z lol xD
Post automatically merged:

Lua:
function onThink(interval)
    local effects = {
      -----TEMPLE TEXT DISPLAY-----
     {position = Position(1000, 1000, 7), text = "Text", effect = 11, say = false, color = math.random(100,215)},
}


    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


Code:
<globalevent name="Text_Effect" interval="2000" script="text_effect.lua" />
Why come on say twice at the same time? text Also, the same color twice
 
Back
Top