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

Stat system

Nekiro

Legendary OT User
TFS Developer
Joined
Sep 7, 2015
Messages
2,677
Solutions
126
Reaction score
2,112
This system was originally written for @Lucifer by me long time ago, he paid for it and has full credits to it. He messaged me, that he won't use it anymore and wants to release it.
He told me that I should do it, so I'm doing it.

This code was tested and does work with TFS 1.3, it should also work on any 1.x as long as all the interfaces needed are avaliable.

How does it work?
You enter which level you want to get points so you can choose between mana, hp & hit.
So every time you reach that level you get a point that you can put on hp / mana or attack 1 point = 1%

To add it to your server, just register all files to correct tfs interfaces, healthchange, advance and modal are creaturescripts, talkaction is talkaction. Point_stat_system is lib file, you add a dofile in main lib file in libs folder.

and that's it basically.

Enjoy!
 

Attachments

  • point_stat_system.lua
    6.3 KB · Views: 279 · VirusTotal
  • stat_system_advance.lua
    200 bytes · Views: 189 · VirusTotal
  • stat_system_healthchange.lua
    424 bytes · Views: 176 · VirusTotal
  • stat_system_modal.lua
    150 bytes · Views: 189 · VirusTotal
  • stat_system_talkaction.lua
    91 bytes · Views: 162 · VirusTotal
that's different, and creative.

Its a little bit instable I guess, because people can make different combinations and cannot undo the choices, it can turn your game style disappointing in a point of view of you discovering a better combination of improvement, then your old choices are already done aaaand you need to create a new character or something like that.

And that combined with a needed of balance the spells (what point this system affect the heal, attacks and vocations balance? For an exemple).
 
how to link the modalwindow in creaturescripts properly?

<event type="modalWindow" name="test" script="test/test.lua"/>
?

ending up with this error
 

Attachments

Last edited:
how to link the modalwindow in creaturescripts properly?

<event type="modalWindow" name="test" script="test/test.lua"/>
?

ending up with this error
Creaturescripts
Code:
        <event type="healthchange" name="stat_system_healthchange" script="stat_system_healthchange.lua"/> 
        <event type="advance" name="stat_system_advance" script="stat_system_advance.lua"/> 
        <event type="modalwindow" name="stat_system_modal" script="stat_system_modal.lua"/>

Also have a one issue, the stats are working, command is working but when I assign point into damage for example, it just does not work, nothing happens after clicking the confirm button or enter. There is no any error in console what I am doing wrong @Nekiro ?
 
It only have mana/hp/dmg? Those three? No def no spell dmg?
 
Updated the talkaction, player parameter was missing in modal call.
 
Invalid type for creature event: stat_system_modal
Failed to configure event.

So as far as i understand i have wrong <event type="modalwindow"
name but it suppose to be just fine, so it means ninja tfs 1.2 doesnt have modalwindow? If yes is there any ways to add it?
 
no, modal windows are supported since tibia 9.7
 
Lua Script Error: [TalkAction Interface]
data/talkactions/scripts/player/stat_system_talkaction.lua:eek:nSay
data/talkactions/scripts/player/stat_system_talkaction.lua:2: attempt to index global 'StatSystem' (a nil value)
stack traceback:
[C]: in function '__index'
data/talkactions/scripts/player/stat_system_talkaction.lua:2: in function <data/talkactions/scripts/player/stat_system_talkaction.lua:1>
 
Lua Script Error: [TalkAction Interface]
data/talkactions/scripts/player/stat_system_talkaction.lua:eek:nSay
data/talkactions/scripts/player/stat_system_talkaction.lua:2: attempt to index global 'StatSystem' (a nil value)
stack traceback:
[C]: in function '__index'
data/talkactions/scripts/player/stat_system_talkaction.lua:2: in function <data/talkactions/scripts/player/stat_system_talkaction.lua:1>
You didn't install the lib file.
 
How did you solve this m8? Am having the same issue, nothing is happening, no error in console , both enter/confirm not doing anything.
My best guess is that you haven't registered the creatureEvents in login.lua
 
Back
Top