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

Same exhaust for all spells/runes/potions. "groups" dont work.

ohman

Member
Joined
Oct 24, 2008
Messages
294
Reaction score
8
Location
Sweden
Hi! I want my server to be like in real tibia. For example: When you do Exori Frigo (attack spell) there should be no exhaust to do a Exura (healing spell) after.

In my server (TFS 0.3.7-r5969, client 8.6, hosted on Debian 7) all spells share exhaust. For example, you need to w8 2 sec after you cast Exori frigo to do a Exura and then w8 1 sec toExori frigo again. And thats wrong!

Anyone have a sulotion for this?

Exori Frigo and Exura is just examples!

Here is some examples in my spells.xml:

Exori frigo:
<instant name="Ice Strike" words="exori frigo" lvl="15" mana="20" prem="1" range="3" casterTargetOrDirection="1" blockwalls="1" exhaustion="2000" groups="1,2000" icon="112" needlearn="0" event="script" value="attack/ice strike.lua">
<vocation id="1;5"/>
<vocation id="2;6"/>
</instant>
Exura:
<instant name="Light Healing" words="exura" lvl="9" mana="20" aggressive="0" selftarget="1" exhaustion="1000" groups="2,2000" icon="1" needlearn="0" event="script" value="healing/light healing.lua">
<vocation id="1;5"/>
<vocation id="2;6"/>
<vocation id="3;7"/>
</instant>
Thanks!


EDIT: the (aggressive "0") dont seem to work.

Because when I compiled with this:
if(readXMLString(p, "aggressive", strValue))
isAggressive = booleanString(strValue);

groupExhaustions[SPELLGROUP_ATTACK] = 2000;
groupExhaustions[SPELLGROUP_HEALING] = 1000;
instead of this:
if(readXMLString(p, "aggressive", strValue))
isAggressive = booleanString(strValue);

groupExhaustions[SPELLGROUP_ATTACK] = exhaustion;
groupExhaustions[SPELLGROUP_HEALING] = exhaustion;
and deleted (exhaustion "x") in spells.xml both attack spells and healing spells had 1 (1000) sec exhaust. So the attack exhaust dont want to work.
 
Last edited:
Make a custom exhaust with lua....

Global.lua
LUA:
local spell_exhausts = {
EXHAUST_ATTACK = {},
EXHAUST_HEALING = {},
EXHAUST_SUPPORT = {}
}

Then in your spells add this:
LUA:
local cid = getCreatureGUID(cid)
if spell_exhausts[EXHAUST_ATTACK][cid] ~= nil then
          doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
          return false
end


addEvent(removeExhaust, time, cid)


function removeExhaust(cid)
spell_exhausts[EXHAUST_ATTACK][cid] = nil
end
 
Back
Top