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

Lua Absorption Elements

socera boladaum

New Member
Joined
Aug 11, 2012
Messages
4
Reaction score
0
Is there any function to buff a particular item with an attribute absorption? For example, when using a rune in a sword, it gets 10% absorption of fire.

Or a function that gives the player a condition to absorb elements.
 
  • items.xml
    XML:
    <item id="XXXX" ...>
      <attribute key="absorbpercentfire" value="10"/>
    </item>
  • movements.xml
    XML:
    <movevent type="Equip" itemid="XXXX" slot="XXX" event="function" value="onEquipItem"/>
    <movevent type="DeEquip" itemid="XXXX" slot="XXX" event="function" value="onDeEquipItem"/>
 
I know that function, but with this, the item will have a fixed bonus. I want to give the bonus whenever i want.
I need a function like setItemAbsorv, or something like that
 
Can i use the function like this?

doItemSetAttribute(getPlayerSlotItem(cid, 4).itemid, absorbpercentall, 100)

But it is not working

I´m trying to add the absorbpercent to my armor
 
But it is not working

I´m trying to add the absorbpercent to my armor
Oh, sorry. It doesn't work with absorbs. You have to edit source files (view player.cpp, Player::blockHit).
 

Similar threads

Back
Top