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

Increase damage per storage

felipemko

New Member
Joined
Mar 2, 2010
Messages
173
Reaction score
3
Hi everyone,
You could help me? I need something like when a player do Quest or Task won a storage that increase % melee damage/distance damage and spell
 
 
Yes i saw but I need with this:
How to do for increase per amount of that storage?
Like 2.5% increase damage per value storage?
 
Yes i saw but I need with this:
How to do for increase per amount of that storage?
Like 2.5% increase damage per value storage?

this mean if player have storage+100 his damage will be 250% more than normal
player damage is 500 without storage
if get storage+100
player damage will be 500+500*250/100
Lua:
   if(caster && caster->getPlayer())
        {
            std::string value;
             caster->getStorage(170298, value);
            int32_t plus  = (int32_t)(atoi(value.c_str()));
           int32_t power =plus *2.5 ;
            if(plus  > 0 && params.combatType != COMBAT_HEALING )
              change  = (int32_t)std::ceil (change  + change  * power /100);
        }
 
Last edited:
this mean if player have storage+100 will get damage 250%
player damage is 500 without storage
if get storage+100
player damage will be 500+500*250/100
Lua:
   if(caster && caster->getPlayer())
        {
            std::string value;
             caster->getStorage(170298, value);
            int32_t plus  = (int32_t)(atoi(value.c_str()));
           int32_t power =plus *2.5 ;
            if(plus  > 0 && params.combatType != COMBAT_HEALING )
              change  = (int32_t)std::ceil (change  + change  * power /100);
        }
this work with spells and wand damage only

I'll test
Theres increase against players and monsters? @heba
 
Lua:
   if(caster && caster->getPlayer())
        {
            std::string value;
             caster->getStorage("170298", value);
            int32_t plus  = (int32_t)(atoi(value.c_str()));
           int32_t power =plus *2.5 ;
            if(plus  > 0 && params.combatType != COMBAT_HEALING )
              change  = (int32_t)std::ceil (change  + change  * power /100);
        }
 
Lua:
   if(caster && caster->getPlayer())
        {
            std::string value;
             caster->getStorage("170298", value);
            int32_t plus  = (int32_t)(atoi(value.c_str()));
           int32_t power =plus *2.5 ;
            if(plus  > 0 && params.combatType != COMBAT_HEALING )
              change  = (int32_t)std::ceil (change  + change  * power /100);
        }
Without errors but didnt change any damage with 1000 or 0 storage
 
add this cod
Code:
   if(caster && caster->getPlayer())
        {
            std::string value;
             caster->getStorage("170298", value);
            int32_t plus  = (int32_t)(atoi(value.c_str()));
           int32_t power =plus *2.5 ;
            if(plus  > 0 && params.combatType != COMBAT_HEALING )
              change  = (int32_t)std::ceil (change  + change  * power /100);
        }
after this
Lua:
    int32_t change = 0;
    if(Combat2Var* var = (Combat2Var*)data)
    {
        change = var->change;
        if(!change)
            change = random_range(var->minChange, var->maxChange, DISTRO_NORMAL);
    }
melee damage and dis damage work with this code

set ur storage to 0 and then add storage +100
 
Back
Top