TFS 0.X Block/Reduce damage on LUA

OP
runsicky

runsicky

Member
Joined
Apr 19, 2018
Messages
80
Best answers
0
Reaction score
12
Thanks for the code guys I was looking for something like his
Post automatically merged:


Could you share your imbuiment system for 0.4 pls
everything else can be done on lua by following this topic: Lua - Imbuements System to 8.60 [0.4] (https://otland.net/threads/imbuements-system-to-8-60-0-4.265853/)
i didnt make the rest, i'll do after understand this part on this topic, but everything else is there


i tested it and work fine with me u can use something like this
Code:
        if(target && target->getPlayer())
        {
            std::string value;
            target->getPlayer()->getStorage(1001, value);
            int32_t reductPercent = (int32_t)(atoi(value.c_str()));
            if(reductPercent > 0 && combatType == COMBAT_FIREDAMAGE)
                damage = (int64_t)std::floor (damage - damage * reductPercent /100);
        }
it works, i tested here too, even with that else if

i was just trying to understand why did u put that else if

just ignore then?
remove that?
 

heba

Advanced OT User
Joined
Aug 5, 2011
Messages
1,392
Best answers
14
Reaction score
194
i was add elseif to block other damage but we don't need this anymore
you can do it for vocation
example
knight can block more paladin and mage if have same value of storage
 
OP
runsicky

runsicky

Member
Joined
Apr 19, 2018
Messages
80
Best answers
0
Reaction score
12
i was add elseif to block other damage but we don't need this anymore
you can do it for vocation
example
knight can block more paladin and mage if have same value of storage
thank you so much!
 
Top