• 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.0 floaty text.

dominique120

Science & Reason
Senator
Premium User
Joined
Jun 16, 2013
Messages
3,881
Solutions
3
Reaction score
1,046
Location
Númenor
Does this feature exist in TFS 1.0? I have this script but I dont see any error or floaty text. Could it be because of the interval?

Code:
<globalevent name="EffectTile" interval="3000" event="script" value="effectile.lua"/>

Code:
local config = {
positions = {
["Depot"] = { x = 1005, y = 996, z = 6 }
},

    effects = {
        CONST_ME_MAGIC_GREEN,
    },

    colors = {
        TEXTCOLOR_YELLOW
    }
}

function onThink(cid, interval, lastExecution)
    for text, pos in pairs(config.positions) do
        doSendMagicEffect(pos, config.effects[math.random(1, #config.effects)])
        doSendAnimatedText(pos, text, config.colors[math.random(1, #config.colors)])
    end
    return TRUE
end
 
<globalevent name="EffectTile" interval="3000" script="effectile.lua"/>
Seems to work now but I get this in console every three seconds:

Code:
Lua Script Error: [GlobalEvent Interface]
data/globalevents/scripts/effectile.lua:onThink
LuaScriptInterface::luaDebugPrint(). Deprecated function.
stack traceback:
        [C]: in function 'debugPrint'
        data/compat.lua:274: in function 'doSendAnimatedText'
        data/globalevents/scripts/effectile.lua:34: in function <data/globalevents/scripts/effectile.lua:31>
 
Use doCreatureSay instead of doSendAnimatedText (deprecated function since 9.1)
 
Back
Top