• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

[cpp] getItemAttribute - elementHoly/Death...

Derex

New Member
Joined
Oct 10, 2010
Messages
24
Reaction score
2
TFS 0.3.6.
Hey, I'm looking for the mod to extension the getItemAttribute(item.id, atrib) function to getting the elementHoly (Holy attack from weapons) and other elements. Does anyone have any idea how to do it?
Regards
 
TFS 0.3.6.
Hey, I'm looking for the mod to extension the getItemAttribute(item.id, atrib) function to getting the elementHoly (Holy attack from weapons) and other elements. Does anyone have any idea how to do it?
Regards
upgrade to 0.4 if you still want to use old client
not hard to do + you get more functions to use
 
Parse items.xml if you don't have the sources to compile.

Problem is that I need to change this value during the game on the script.
I have sources and I have found sth like that:

Code:
inline int32_t Item::getAbsorptionHoly() const
{
    const int32_t* v = getIntegerAttribute("absorbpercentholy");
    if(v)
        return (items[id].abilities.absorb[COMBAT_HOLYDAMAGE] + *v);

    return items[id].abilities.absorb[COMBAT_HOLYDAMAGE];
}

but it's returning the absorb not the attack and i don't really know how to convert it into the attack.
 
Back
Top