• 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+ spell for monster that drop a text tfs 1.5

Mateus Robeerto

Excellent OT User
Joined
Jun 5, 2016
Messages
1,337
Solutions
71
Reaction score
697
Location
ლ(ಠ益ಠლ)
Does anyone know if there is a function 'Game.doSendAnimatedText' or 'doSendAnimatedText' to make the monster release the spell and an animated TEXT appears? I know it works with 'doCreatureSay(creature, "TEXT...!", TALKTYPE_MONSTER_SAY)', but I would like to use the function 'doSendAnimatedText(target, "TEXT", TEXTCOLOR_LIGHTBLUE)'. Does anyone have ideas on these functions? Can you help me to solve this problem?
 
Solution
E
yes, the correct name of the function is Game.SendAnimatedText

when in doubt, all function names are in this file:

the correct syntax is:
Lua:
-- Game.sendAnimatedText(message, position, color)
Game.sendAnimatedText("Silence!!", target:getPosition(), TEXTCOLOR_SKYBLUE)

and note that it has a limit of how many characters of text it can display, so if your text is bigger than the limit, it will be cut, and there is no way to circumvent it other than using OTC only
I tested these functions, but none worked for monster magic.
doSendAnimatedText("Silence!!", getPlayerPosition(targetCreature), TEXTCOLOR_WHITE)
doSendAnimatedText(target, "Silence!", TEXTCOLOR_LIGHTBLUE)
doSendAnimatedText("Silence!", getPlayerPosition(cid), 35)
Game.doSendAnimatedText("Silence!", getPlayerPosition(cid), 35)
However, I managed to find another solution that worked: I used "doSendAnimatedText("Silence!!", target:getPosition(), 143)".
 
yes, the correct name of the function is Game.SendAnimatedText

when in doubt, all function names are in this file:

the correct syntax is:
Lua:
-- Game.sendAnimatedText(message, position, color)
Game.sendAnimatedText("Silence!!", target:getPosition(), TEXTCOLOR_SKYBLUE)

and note that it has a limit of how many characters of text it can display, so if your text is bigger than the limit, it will be cut, and there is no way to circumvent it other than using OTC only
 
Solution
I also tested another function that works:
doSendAnimatedText("Silence!!", target:getPosition(), TEXTCOLOR_SKYBLUE)

Thanks, I'll note that function here as well. I'm too busy and overloaded, messing with the server, work and stuff, my head is bad for it. But thank you very much!
 
Back
Top