• 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!

Solved Buff/Party Spells. [TFS v0.2.15]

Elvarion

Member
Joined
Apr 14, 2010
Messages
99
Reaction score
13
Having some trouble getting getting the knight/paladin spell Recovery + Intense Recovery to work as intended.

  • The spell heals, however if your in protection zone you wont get healed (not that important..)
  • The spell does not show the buff icon (below soul) when active. (Icons works for other spells.)
  • When getting healed it does not show the amount healed (Shows for exura etc.)
Ive tried various ways to enable the buff icon, But for some reason it wont show.
Even took the base script for Blood Rage and added the hp recovery to it. But still did not show the icon..

And it would be very nice to make so that it shows the healing it does (Makes it even more obvious that its enabled.

Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setConditionParam(condition, CONDITION_PARAM_TICKS, 1 * 60 * 1000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, 20)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 3000)
setCombatCondition(combat, condition)

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

From Spells.xml
XML:
        <instant group="healing" spellid="160" name="Intense Recovery" words="utura gran" lvl="100" mana="165" aggressive="0" selftarget="1" exhaustion="60000" groupcooldown="1000" needlearn="0" script="healing/intense recovery.lua">
                <vocation name="Paladin"/>
                <vocation name="Knight"/>
                <vocation name="Royal Paladin"/>
                <vocation name="Elite Knight"/>
        </instant>
 
Ofcourse when i try it this time it works.. (Feels like ive tried that a hundred times..)
Now if only it was possible for the healing tics to show :p
 
Moved the line around in the spell, and now its showing. For some reason it didnt show when it was placed at certain places..
Places it last and now it shows!

Thanks alot Limos :)
 
Ofcourse when i try it this time it works.. (Feels like ive tried that a hundred times..)
Now if only it was possible for the healing tics to show :p
You wont be able to let the heal ticks show the way you do it atm, you'd have to make it a different way.

Try this (havn't tested it yet)
Code:
healRegen = {}

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition, CONDITION_PARAM_BUFF_SPELL, 1)
setCombatCondition(combat, condition)


function regen(cid,var,n)
   n = n or 0
   if isPlayer(cid) then
     doCreatureAddHealth(cid, 20)
     if(n < 20) then
       healRegen[cid] = addEvent(regen,3*1000,cid,var,n+1)
     end
   end
   return true
end

function onCastSpell(cid, var)
   if healRegen[cid] then
     stopEvent(healRegen[cid])
   end
   doCombat(cid, combat, var)
   healRegen[cid] = addEvent(regen,250,cid,var,0)
   return true
end
 
Last edited:
TFS 0.2.15 shows the healing with that buff already :p
It also should be 1 instead of true, it's different than on TFS 0.3/0.4.
 
TFS 0.2.15 shows the healing with that buff already :p
It also should be 1 instead of true, it's different than on TFS 0.3/0.4.
nvm then ^^
had some older 0.2 files laying around here where it didn't work so I thought 0.2.15 doesn't support it either :p
This cross scripting aint my best thing, always mixing stuff up :D
 
Back
Top