Lua Function [TFS 1.3] Item abilities via Lua

Gorillaz

New Member
Joined
Nov 6, 2016
Messages
8
Reaction score
1
Amazing! :).
I'm using your system in my server, and Im trying to implement other scripts using the same logic, look:

if I use 'player:getSpecialSkill(SPECIALSKILL_MANAPOINTSLEECHCHANCE)' returns an error: attempt to call method 'getSpecialSkill' (a nil value)
but in sources this method exists, right? For example in Game.cpp:
uint16_t chance = attackerPlayer->getSpecialSkill(SPECIALSKILL_HITPOINTSLEECHCHANCE);

Could you help me?
 
OP
Stigma

Stigma

Veteran OT User
Joined
Feb 14, 2015
Messages
4,401
Reaction score
1,977
that's not a part of my system, getSpecialSkill has never been a luascript function
why do you need it?
 

Aeronx

Active Member
Joined
Dec 17, 2015
Messages
680
Reaction score
82
Hello @Vulcan_
First of all, great job and thank you for releasing it.

I've been doing some testing:
When using hit points, description doesnt show up.
Critical chance visually works fine, but doesnt seem to change damage.
Critical dmg doesnt show on description nor seems to work. (it doesnt add anything to critical dmg on client)
Tested many different ways absorbs and absorbfield, and none of them seem to work. (No reduction at all)

And thats all for now! Thank you!
 

Aeronx

Active Member
Joined
Dec 17, 2015
Messages
680
Reaction score
82
Cannot edit my post.

Critical chance and critical AMOUNT works. (Your example was just wrong)
Did some more testing with absorbs and they dont work.
mana, health, mana% and health% doesnt show up on item description.

Everything else seems to work fine! Thanks!
 

MagicWall

Excellent OT User
Joined
Oct 12, 2008
Messages
93
Reaction score
203
Nice, this should be a part of official TFS source code!

I am impressed.
I think that OT world need classic TFS and second TFS based on "classic TFS" with many additional things like: item attributes, monster levels, reflections functions etc.

OTLand community may start idea like this, because now we have all to do this.
I read a lot opinions that OT community must choose new road, independent from new Tibia updates, so maybe this may be best way?

Ideas for new "prefix" for this project? [name] Forgotten Server ;)
 

Aeronx

Active Member
Joined
Dec 17, 2015
Messages
680
Reaction score
82
After some more testing. Absorbtion doesnt work after this code is implemented.
Tested the server after implementing the and all absorbtions works fine.
After implementing this code, absorbtions are not working at all, even if they are added directly on items.xml

Hope it helps to fix the issue.
 
OP
Stigma

Stigma

Veteran OT User
Joined
Feb 14, 2015
Messages
4,401
Reaction score
1,977
i doubt i'm going to bother fixing anything for a while just cause it's a hassle to set up the code again and recompile every time i change something
dont know why it doesnt work for you but i remember testing it 2-3 times before releasing it and tested different element types to absorb and they worked just fine
 
OP
Stigma

Stigma

Veteran OT User
Joined
Feb 14, 2015
Messages
4,401
Reaction score
1,977
After some more testing. Absorbtion doesnt work after this code is implemented.
Tested the server after implementing the and all absorbtions works fine.
After implementing this code, absorbtions are not working at all, even if they are added directly on items.xml

Hope it helps to fix the issue.
Update: Add HP/MP to description, fix broken HP/MP %
good news: i did find a bug with hp/mp % with this while testing and fixed it, should work properly now
bad news (for you): i tested absorption again, it works just fine. (both with and without using the system, tested an item from items.xml only and after tested with absorb ability)
are you sure you have the item registered in movements that you're testing?
cause now i've tested 4~ times for absorption and it works
 

Aeronx

Active Member
Joined
Dec 17, 2015
Messages
680
Reaction score
82
Update: Add HP/MP to description, fix broken HP/MP %
good news: i did find a bug with hp/mp % with this while testing and fixed it, should work properly now
bad news (for you): i tested absorption again, it works just fine. (both with and without using the system, tested an item from items.xml only and after tested with absorb ability)
are you sure you have the item registered in movements that you're testing?
cause now i've tested 4~ times for absorption and it works
Hello! Thanks for checking and doing some fixing! After revising the code, it may have something to do with TFS 1.2. I've revised everything, and tested many times, but still is not working, so its probably my TFS 1.2.

Anyway, thank you for your time and dedication, really appreciate it.
 
Top