• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

[TFS 0.2.15] Animated text with healing

Hashirama479

World of Ninja
Joined
Dec 19, 2016
Messages
536
Solutions
6
Reaction score
74
I have a problem... as the title says I cant see how much players heal with manarune as explain the purple healing isnt there... and Emote spells does not exists at config im using Mystic sprite 0.2.15! can someone help me please???
 
Solution
Not tested, if you want it to add more per level and ml you will have to add a formula, but there are a lot of other forums containing mana runes. Just search around and learn how it's all working.

LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
local mana = math.random(300, 500)
doPlayerAddMana(cid, mana)
doSendAnimatedText(getPlayerPosition(cid), mana, TEXTCOLOR_GREEN)
return doCombat(cid, combat, var)
end

Great that you wanna help people, but please help people to learn tabbing scripts;
LUA:
local combat =...
doSendAnimatedText seems like it should work on your distro, if it for sure doesn't work try using doCreatureSay. If you can't figure it out further, I would suggest posting the script as well to find the problem if is there.
 
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
doPlayerAddMana(cid, 750)
return doCombat(cid, combat, var)
end

Thats my script
 
Not tested, if you want it to add more per level and ml you will have to add a formula, but there are a lot of other forums containing mana runes. Just search around and learn how it's all working.

LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
     local mana = math.random(300, 500)
     doPlayerAddMana(cid, mana)
     doSendAnimatedText(getPlayerPosition(cid), mana, TEXTCOLOR_GREEN)
     return doCombat(cid, combat, var)
end

EDITED FOR TABS
 
Last edited:
Not tested, if you want it to add more per level and ml you will have to add a formula, but there are a lot of other forums containing mana runes. Just search around and learn how it's all working.

LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
local mana = math.random(300, 500)
doPlayerAddMana(cid, mana)
doSendAnimatedText(getPlayerPosition(cid), mana, TEXTCOLOR_GREEN)
return doCombat(cid, combat, var)
end

Great that you wanna help people, but please help people to learn tabbing scripts;
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
    local mana = math.random(300, 500)
    doPlayerAddMana(cid, mana)
    doSendAnimatedText(getPlayerPosition(cid), mana, TEXTCOLOR_GREEN)
    return doCombat(cid, combat, var)
end
 
Solution
Great that you wanna help people, but please help people to learn tabbing scripts;
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
    local mana = math.random(300, 500)
    doPlayerAddMana(cid, mana)
    doSendAnimatedText(getPlayerPosition(cid), mana, TEXTCOLOR_GREEN)
    return doCombat(cid, combat, var)
end

Idk what im doing wrong, it's tabbed in my notepad++ but not when I paste them. >.< I'll figure it out soon tho. :D
 
If i paste it into the code box it doesn't register the tabs for me (last thread same thing happened), I even edited it this time and still didn't keep the tabs. >.< I'll figure it out soon. :D

I always copy them to notepad++ to use the search and replace function, if it's short like this you can just add 5 spaces (since the forum replaces 1 tab with 5 spaces) :)
 
Tried out the scripts but it still does not show up the heal :(
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
    local mana = math.random(300, 500)
    doPlayerAddMana(cid, mana)
    doSendAnimatedText(getPlayerPosition(cid), mana, TEXTCOLOR_GREEN)
    print(getPlayerPosition(cid))
    return doCombat(cid, combat, var)
end

Try that and take an SS of your console.
 
a74495c3225c921b5cd37beaa2c4b798.png

Gyazo - a74495c3225c921b5cd37beaa2c4b798.png
 
It is 9.86 yea but does doCreatureSay supports to show the healing in green ? as explain? or just "orange"?

Just orange, around 9.xx they removed that function since the client dosn't accept printing text (like hello), it only accepts numbers.
So you would most likely have to do some source edits to re-add that function or add it via Lua if 0.2 has the Networkmessage functions (highly doubt it) then send it via Lua insted of creating that function and sending it via C++.
 
last question... The color functions isnt working as you said but the "ping" normal heal for manarune should work or not? if im not wrong? ( health = green / mana = ping ) or not? :O
 
Back
Top