- Joined
- Dec 30, 2007
- Messages
- 529
- Solutions
- 5
- Reaction score
- 191
Hello,
Since I upgraded my server from TFS 0.4 to TFS 1.0 I experienced that a lot of functions from 0.4 are not provided by 1.0. onStatsChange is one of the essential function for creating events like Zombie, Last man standing, teambattle and so on. There are some functions like onChangeHealth and onChangeMana but they're not working as onStatsChange do. I've decided to share this feature with community.
I won't write the whole tutorial for editing the files, I've just created diff patch from the latest commit(4th April). Here are the steps to make it working on Linux.
Inside your TFS source folder:
After patching the files you should compile the TFS again. You will be able to create creature event like this:
Since I upgraded my server from TFS 0.4 to TFS 1.0 I experienced that a lot of functions from 0.4 are not provided by 1.0. onStatsChange is one of the essential function for creating events like Zombie, Last man standing, teambattle and so on. There are some functions like onChangeHealth and onChangeMana but they're not working as onStatsChange do. I've decided to share this feature with community.
I won't write the whole tutorial for editing the files, I've just created diff patch from the latest commit(4th April). Here are the steps to make it working on Linux.
Inside your TFS source folder:
Code:
cd src
wget http://gunz.sk/opentibia/statschange.patch
patch -p0 < statschange.patch
After patching the files you should compile the TFS again. You will be able to create creature event like this:
Code:
function onStatsChange(cid, attacker, changetype, combat, value)
doPlayerSendTextMessage(attacker, MESSAGE_INFO_DESCR, "Something changed: " .. changetype .. " value: " .. value)
return true
end