• 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 Life Steal item

Lopaskurwa

Well-Known Member
Joined
Oct 6, 2017
Messages
912
Solutions
2
Reaction score
50
Does anyone have life steal item? if you wear for example item it lifesteals x % of health from hit so for example legs life steal like 0.5% health armor life steals 0.5% so now you have like 1% lifesteal from hit and so on. TFS 1.2
 
There are attributes for it, in items you can add
LUA:
<attribute key="lifeleechamount" value="100" />
<attribute key="lifeleechchance" value="80" />

Make sure you register the item in movements.xml, both onEquipItem and onDeEquipItem

Code:
<movevent event="Equip" itemid="7426" slot="shield" function="onEquipItem" />
<movevent event="DeEquip" itemid="7426" slot="shield" function="onDeEquipItem" />
 
There are attributes for it, in items you can add
LUA:
<attribute key="lifeleechamount" value="100" />
<attribute key="lifeleechchance" value="80" />

Make sure you register the item in movements.xml, both onEquipItem and onDeEquipItem

Code:
<movevent event="Equip" itemid="7426" slot="shield" function="onEquipItem" />
<movevent event="DeEquip" itemid="7426" slot="shield" function="onDeEquipItem" />
TFS 1.2 doesnt have it
 
TFS 1.2 doesnt have it

Check if you have some of this code in your sources (dont think so)

Not sure if this would enable it for you not really familiar with older versions (I think there are a few other files that needs to change but you can CTRL + F in MSVC the last registered attribute and follow the code) OR take a TFS 1.2 that already has leeches/critical added and copy that to your own sources again just CTRL + F and add all mentions of critical/leech to your own sources.

 
Check if you have some of this code in your sources (dont think so)

Not sure if this would enable it for you not really familiar with older versions (I think there are a few other files that needs to change but you can CTRL + F in MSVC the last registered attribute and follow the code) OR take a TFS 1.2 that already has leeches/critical added and copy that to your own sources again just CTRL + F and add all mentions of critical/leech to your own sources.

Yea the comit you sent doesnt seem to be full comit of those features. Cant use new src my current src is highly modified
 
what? :D I thought maybe doing directly trough lua but then what ifin the future i gonna want custom tooltip so idk
I was researching, adding the links, and explaining the commits and changes to your source. But my boss called me, so I went there. Later, I returned to my office PC at work and posted it. Then I noticed that Tenzhiro had already posted, so I decided to delete it. Hahaha.


Yes, it's possible through LUA. If the functions onHealthChange and onManaChange exist, it can be done, but it's a bit of work. My suggestion is to switch to version 1.4+ to avoid headaches and have a better solution.
 
I was researching, adding the links, and explaining the commits and changes to your source. But my boss called me, so I went there. Later, I returned to my office PC at work and posted it. Then I noticed that Tenzhiro had already posted, so I decided to delete it. Hahaha.


Yes, it's possible through LUA. If the functions onHealthChange and onManaChange exist, it can be done, but it's a bit of work. My suggestion is to switch to version 1.4+ to avoid headaches and have a better solution.
I guess gonna need to try to find the comits that introduced lifeleechamount somehow
 
Back
Top