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

Poblema when using spell otx 2.8 mattyx14

goncalveses

New Member
Joined
Sep 18, 2016
Messages
18
Reaction score
2
good night I have a problem that I do not know how to solve, my server limits it to use two spells or more to the same one wanted to put to heal and to use spells

C++:
{
if(!player->hasFlag(PlayerFlag_IgnoreProtectionZone) && player->getZone() == ZONE_PROTECTION)
{
player->sendCancelMessage(RET_ACTIONNOTPERMITTEDINPROTECTIONZONE);
return false;
}

if(player->hasCondition(CONDITION_EXHAUST, EXHAUST_COMBAT))
exhausted = true;
}
if(player->hasCondition(CONDITION_EXHAUST, EXHAUST_HEALING))
exhausted = true;

if(exhausted && !player->hasFlag(PlayerFlag_HasNoExhaustion))
{
player->sendCancelMessage(RET_YOUAREEXHAUSTED);
if(isInstant())
g_game.addMagicEffect(player->getPosition(), MAGIC_EFFECT_POFF);

return false;
}

--------------------------------------------

C++:
void Spell::postSpell(Player* player) const
{
if(!player->hasFlag(PlayerFlag_HasNoExhaustion) && exhaustion > 0)
player->addExhaust(exhaustion, isAggressive ? EXHAUST_COMBAT : EXHAUST_HEALING);

if(isAggressive && !player->hasFlag(PlayerFlag_NotGainInFight))
player->addInFightTicks(false);

postSpell(player, (uint32_t)getManaCost(player), (uint32_t)getSoulCost());
}

Some good soul could help me edit to release all as spells together ?
 

Attachments

Well, im not really sure what you mean but if you're talking about group cooldown that can be edited in spells.xml

Code:
    <instant group="attack" spellid="118" name="Eternal Winter" words="exevo gran mas frigo" lvl="60" mana="1050" prem="1" selftarget="1" exhaustion="4500" groupcooldown="1000" needlearn="0" script="attack/eternal winter.lua">
        <vocation name="Druid" />
        <vocation name="Elder Druid" />
    </instant>
this part
Code:
groupcooldown="1000"
 
this is not it, I want to take this condition of exhaustion to heal spells and attack spells, that is, I can not heal while using an attack spell. I wanted to take this edition to the source
 
So easy you will need edit Your Source
Spells.cpp
Code:
void Spell::postSpell(Player* player) const
{
    if(!player->hasFlag(PlayerFlag_HasNoExhaustion) && exhaustion > 0)
        player->addExhaust(exhaustion, isAggressive ? EXHAUST_COMBAT : EXHAUST_HEALING);

    if(isAggressive && !player->hasFlag(PlayerFlag_NotGainInFight))
        player->addInFightTicks(false);

    postSpell(player, (uint32_t)getManaCost(player), (uint32_t)getSoulCost());
}
Remove Groups and exaustion for 0 and all work nice
 
Last edited:
C++:
void Spell::postSpell(Player* player) const
{
  
void Spell::postSpell(Player* player) const
{
    if(!player->hasFlag(PlayerFlag_HasNoExhaustion) && 0 > 0)
        player->addExhaust(0, isAggressive);

    if(isAggressive && !player->hasFlag(PlayerFlag_NotGainInFight))
        player->addInFightTicks(false);

    postSpell(player, (uint32_t)getManaCost(player), (uint32_t)getSoulCost());
}
}
in that way
 
Last edited:
Back
Top