Zysen
=)
Name: simDamage (level, attackSkill, attackValue, attackFactor)
Author: Lpz
Type: LUA Function
Works on TFS 0.4_DEV.
To install this feature on your server, open the 050-functions.lua located in data/lib and at the end of the file, paste this:
The use of the function is very simple, if I want to, for example, simulate the damage of a player with level 100, sword skill 60, Magic Sword and Full Attack, then I'll do this:
IDs : 0 for Full Defence, 1 for Balanced and 2 for Full Attack.
Author: Lpz
Type: LUA Function
Works on TFS 0.4_DEV.
To install this feature on your server, open the 050-functions.lua located in data/lib and at the end of the file, paste this:
Lua:
function simDamage(level, attackSkill, attackValue, attackFactor)
factor = {
[0] = 0.5,
[1] = 0.75,
[2] = 1
}
attackFactor = factor[attackFactor] or 0.75
return math.ceil((2 * (attackValue * (attackSkill + 5.8) / 25 + (level - 1) / 10)) * attackFactor)
end
The use of the function is very simple, if I want to, for example, simulate the damage of a player with level 100, sword skill 60, Magic Sword and Full Attack, then I'll do this:
Lua:
simDamage(100, 60, 48, 2)
IDs : 0 for Full Defence, 1 for Balanced and 2 for Full Attack.
Yours,
Zysen.
Zysen.
Last edited: