Poblema when using spell otx 2.8 mattyx14

Discussion in 'Support' started by goncalveses, Feb 16, 2018.

  1. goncalveses

    goncalveses New Member

    Joined:
    Sep 18, 2016
    Messages:
    18
    Likes Received:
    2
    Best Answers:
    0
    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

    Code (C++):
    1. {
    2. if(!player->hasFlag(PlayerFlag_IgnoreProtectionZone) && player->getZone() == ZONE_PROTECTION)
    3. {
    4. player->sendCancelMessage(RET_ACTIONNOTPERMITTEDINPROTECTIONZONE);
    5. return false;
    6. }
    7.  
    8. if(player->hasCondition(CONDITION_EXHAUST, EXHAUST_COMBAT))
    9. exhausted = true;
    10. }
    11. if(player->hasCondition(CONDITION_EXHAUST, EXHAUST_HEALING))
    12. exhausted = true;
    13.  
    14. if(exhausted && !player->hasFlag(PlayerFlag_HasNoExhaustion))
    15. {
    16. player->sendCancelMessage(RET_YOUAREEXHAUSTED);
    17. if(isInstant())
    18. g_game.addMagicEffect(player->getPosition(), MAGIC_EFFECT_POFF);
    19.  
    20. return false;
    21. }
    --------------------------------------------

    Code (C++):
    1. void Spell::postSpell(Player* player) const
    2. {
    3. if(!player->hasFlag(PlayerFlag_HasNoExhaustion) && exhaustion > 0)
    4. player->addExhaust(exhaustion, isAggressive ? EXHAUST_COMBAT : EXHAUST_HEALING);
    5.  
    6. if(isAggressive && !player->hasFlag(PlayerFlag_NotGainInFight))
    7. player->addInFightTicks(false);
    8.  
    9. postSpell(player, (uint32_t)getManaCost(player), (uint32_t)getSoulCost());
    10. }
    Some good soul could help me edit to release all as spells together ?
     

    Attached Files:

  2. goncalveses

    goncalveses New Member

    Joined:
    Sep 18, 2016
    Messages:
    18
    Likes Received:
    2
    Best Answers:
    0
  3. oualid6496

    oualid6496 Premium User Premium User

    Joined:
    Aug 24, 2014
    Messages:
    340
    Likes Received:
    53
    Best Answers:
    0
    Well, im not really sure what you mean but if you're talking about group cooldown that can be edited in spells.xml

    Code (Text):
    1.  
    2.     <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">
    3.         <vocation name="Druid" />
    4.         <vocation name="Elder Druid" />
    5.     </instant>
    this part
    Code (Text):
    1. groupcooldown="1000"
     
  4. goncalveses

    goncalveses New Member

    Joined:
    Sep 18, 2016
    Messages:
    18
    Likes Received:
    2
    Best Answers:
    0
    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
     
  5. goncalveses

    goncalveses New Member

    Joined:
    Sep 18, 2016
    Messages:
    18
    Likes Received:
    2
    Best Answers:
    0
  6. adric21

    adric21 Member

    Joined:
    Apr 26, 2016
    Messages:
    175
    Likes Received:
    11
    Best Answers:
    1
    So easy you will need edit Your Source
    Spells.cpp
    Code (Text):
    1. void Spell::postSpell(Player* player) const
    2. {
    3.     if(!player->hasFlag(PlayerFlag_HasNoExhaustion) && exhaustion > 0)
    4.         player->addExhaust(exhaustion, isAggressive ? EXHAUST_COMBAT : EXHAUST_HEALING);
    5.  
    6.     if(isAggressive && !player->hasFlag(PlayerFlag_NotGainInFight))
    7.         player->addInFightTicks(false);
    8.  
    9.     postSpell(player, (uint32_t)getManaCost(player), (uint32_t)getSoulCost());
    10. }
    Remove Groups and exaustion for 0 and all work nice
     
  7. CipsoftStinks

    CipsoftStinks www.relicaria.com

    Joined:
    Oct 1, 2016
    Messages:
    802
    Likes Received:
    98
    Best Answers:
    2
    Last edited: Jul 11, 2018
  8. goncalveses

    goncalveses New Member

    Joined:
    Sep 18, 2016
    Messages:
    18
    Likes Received:
    2
    Best Answers:
    0
    Code (C++):
    1. void Spell::postSpell(Player* player) const
    2. {
    3.  
    4. void Spell::postSpell(Player* player) const
    5. {
    6.     if(!player->hasFlag(PlayerFlag_HasNoExhaustion) && 0 > 0)
    7.         player->addExhaust(0, isAggressive);
    8.  
    9.     if(isAggressive && !player->hasFlag(PlayerFlag_NotGainInFight))
    10.         player->addInFightTicks(false);
    11.  
    12.     postSpell(player, (uint32_t)getManaCost(player), (uint32_t)getSoulCost());
    13. }
    14. }
    in that way
     
    Last edited: Jul 11, 2018
  9. goncalveses

    goncalveses New Member

    Joined:
    Sep 18, 2016
    Messages:
    18
    Likes Received:
    2
    Best Answers:
    0
  10. goncalveses

    goncalveses New Member

    Joined:
    Sep 18, 2016
    Messages:
    18
    Likes Received:
    2
    Best Answers:
    0
    Remove Groups and exaustion for 0 and all work nice, i not understand
     
  11. goncalveses

    goncalveses New Member

    Joined:
    Sep 18, 2016
    Messages:
    18
    Likes Received:
    2
    Best Answers:
    0

Share This Page

Loading...