• Sign up for TFS Icon Competition! The prize includes Otland Premium time and a medal, as well as obviously taking part in TFS history.
  • 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!

addAnimatedText Formula Error

Helliot1

Owner of Empire Online
Joined
Jul 26, 2017
Messages
296
Solutions
1
Reaction score
46
Hello,

Trying to add an animated text when I use some potion, but it don't work.

I'm using OTX3 8.6, and found this function on this website: otxserver-luascript

Lua:
if potion.mana then
    manaToAdd = math.random(potion.mana[1], potion.mana[2])
    doPlayerAddMana(player, manaToAdd)
    g_game.addAnimatedText(manaToAdd, player:getPosition(), TEXTCOLOR_BLUE)
end


Somebody can help me please?
Thanks guys!!
 
Solution
Change
Lua:
g_game.addAnimatedText(manaToAdd, player:getPosition(), TEXTCOLOR_BLUE)
To
Lua:
Game.sendAnimatedText(manaToAdd, player:getPosition(), TEXTCOLOR_BLUE)

oen432

Legendary OT User
Joined
Oct 3, 2014
Messages
1,150
Solutions
39
Reaction score
1,169
Location
Poland
GitHub
Oen44
Change
Lua:
g_game.addAnimatedText(manaToAdd, player:getPosition(), TEXTCOLOR_BLUE)
To
Lua:
Game.sendAnimatedText(manaToAdd, player:getPosition(), TEXTCOLOR_BLUE)
 
Solution
Top