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

[TFS 0.4] Increase Damage

secondlife

Member
Joined
Aug 1, 2009
Messages
298
Reaction score
23
Hi guys!

Inspired by the topic created by @runsicky (Here) and which received support from @heba , I would like to know if it is possible to use the same logic but that instead of the player absorbing X% of the damage received, having its damage increased by X% if player has a certain storage (defined).

Many thanks!
 
Solution
to increase damage for player add this in combat.cpp
in CombatHealthFunc and CombatManaFunc
Lua:
   if(caster && caster->getPlayer())
        {
            std::string value;
             caster->getStorage(170298, value);
            int32_t plus  = (int32_t)(atoi(value.c_str()));
            if(plus  > 0 && params.combatType != COMBAT_HEALING )
              change  = (int32_t)std::ceil (change  + change  * plus  /100);
        }
this will increase all damage for player spells and weapon damage if u want it work for increase healing remove this && params.combatType != COMBAT_HEALING
to increase damage for player add this in combat.cpp
in CombatHealthFunc and CombatManaFunc
Lua:
   if(caster && caster->getPlayer())
        {
            std::string value;
             caster->getStorage(170298, value);
            int32_t plus  = (int32_t)(atoi(value.c_str()));
            if(plus  > 0 && params.combatType != COMBAT_HEALING )
              change  = (int32_t)std::ceil (change  + change  * plus  /100);
        }
this will increase all damage for player spells and weapon damage if u want it work for increase healing remove this && params.combatType != COMBAT_HEALING
 
Solution
to increase damage for player add this in combat.cpp
in CombatHealthFunc and CombatManaFunc
Lua:
   if(caster && caster->getPlayer())
        {
            std::string value;
             caster->getStorage(170298, value);
            int32_t plus  = (int32_t)(atoi(value.c_str()));
            if(plus  > 0 && params.combatType != COMBAT_HEALING )
              change  = (int32_t)std::ceil (change  + change  * plus  /100);
        }
this will increase all damage for player spells and weapon damage if u want it work for increase healing remove this && params.combatType != COMBAT_HEALING

How to do for increase per amount of that storage?
Like 2.5% increase damage per value storage?
 
Back
Top