Lua Function [TFS 1.3] Item abilities via Lua

sharinn

Premium User
Premium User
Joined
Aug 27, 2011
Messages
24
Reaction score
2
hello, it's me again, I discovered the error/bug, the Holy, Death and Ice absorption attributes are not correctly added to the item that were loaded only by xml, I compiled your code(from github repo), the only thing I changed was the item(otb and xml) in data folder
funny fact -
absorbpercentelements give
Code:
08:14 You see a rainbow shield (Def:30) (protection energy +8%, earth +8%, fire +8%).
absorbpercentmagic give
Code:
08:15 You see a golden helmet (Arm:12, protection energy +5%, earth +5%, fire +5%).
the most interesting is that the absorbpercentall works correctly
Code:
08:16 You see a magic armor arm (Arm: 17, physical protection + 6%, energy + 6%, earth + 6%, fire + 6%, drown + 6%, ice + 6%, holy + 6%, death + 6%).
data from xml file
Code:
    <item id="8905" article="a" name="rainbow shield">
    <attribute key="description" value="Strange elemental magic flows over this shield." />
    <attribute key="weight" value="6900" />
    <attribute key="defense" value="30" />
    <attribute key="weaponType" value="shield" />
    <attribute key="absorbpercentelements" value="8" />
    </item>
Code:
<item id="2471" article="a" name="golden helmet">
    <attribute key="description" value="It's the famous Helmet of the Stars." />
    <attribute key="weight" value="3200" />
    <attribute key="armor" value="12" />
    <attribute key="slotType" value="head" />
    <attribute key="absorbpercentmagic" value="5" />
    </item>
Code:
    <item id="2472" article="a" name="magic plate armor">
    <attribute key="weight" value="8500" />
    <attribute key="armor" value="17" />
    <attribute key="slotType" value="body" />
    <attribute key="absorbpercentall" value="6" />
    </item>
 
Last edited:

guiismiti

Intermediate OT User
Joined
May 19, 2014
Messages
269
Reaction score
31
Item abilities is probably the best idea I've ever seen in this website, thanks for it!

Just an update - in order to compile with the current TFS, you will need to replace:
Code:
SPECIALSKILL_HITPOINTSLEECHCHANCE
SPECIALSKILL_HITPOINTSLEECHAMOUNT
SPECIALSKILL_MANAPOINTSLEECHCHANCE
SPECIALSKILL_MANAPOINTSLEECHAMOUNT
for
Code:
SPECIALSKILL_LIFELEECHCHANCE
SPECIALSKILL_LIFELEECHAMOUNT
SPECIALSKILL_MANALEECHCHANCE
SPECIALSKILL_MANALEECHAMOUNT
in combat.cpp, item.cpp and tools.cpp
 

erikbs

New Member
Joined
Jul 15, 2010
Messages
4
Reaction score
0
Item abilities is probably the best idea I've ever seen in this website, thanks for it!

Just an update - in order to compile with the current TFS, you will need to replace:
Code:
SPECIALSKILL_HITPOINTSLEECHCHANCE
SPECIALSKILL_HITPOINTSLEECHAMOUNT
SPECIALSKILL_MANAPOINTSLEECHCHANCE
SPECIALSKILL_MANAPOINTSLEECHAMOUNT
for
Code:
SPECIALSKILL_LIFELEECHCHANCE
SPECIALSKILL_LIFELEECHAMOUNT
SPECIALSKILL_MANALEECHCHANCE
SPECIALSKILL_MANALEECHAMOUNT
in combat.cpp, item.cpp and tools.cpp

Iam sorry for being the biggest noobie on here, but where can I find combat.cpp, item.cpp and tools.cpp?
Using TFS 1.3 and Tibia client 10.98.

Appreciate any reply.. well not any, please be gentle XD
 

StreamSide

Joseluis Gonzalez
Support Team
Joined
Aug 31, 2007
Messages
3,267
Reaction score
774
Location
Arica - Chile
Iam sorry for being the biggest noobie on here, but where can I find combat.cpp, item.cpp and tools.cpp?
Using TFS 1.3 and Tibia client 10.98.

Appreciate any reply.. well not any, please be gentle XD
thats source related, if you go to tfs github you will see some folders and one of then is called src in reference to sources, there you can find what you looking for.
 
Top