Hello, i'm using TFS 0.3b2-gui
I have placed in my server the function "onAdvance", but this one does not work ... place the scripts as(according to) 4220niller, create the folder advances, place inside it the so called scripts: level, maglevel, fist, club, sword, fishing, distance, axe, shield.
In the folder of creaturescripts i created the file think.lua, place in lib/function.lua the lines specified for 4220niller, in end(purpose) I did everything what is needed in order that the function works...
Still this way scripts as this one they do not work:
creaturescripts/advances/level.lua
Why this function don't work for me?
What i need to write in creaturescripts.xml?
Can somebody make a guide "How to use onAdvance Function"?
Thanks
SORRY MY BAD ENGLISH, I'M USING A TRANSLATOR
I have placed in my server the function "onAdvance", but this one does not work ... place the scripts as(according to) 4220niller, create the folder advances, place inside it the so called scripts: level, maglevel, fist, club, sword, fishing, distance, axe, shield.
In the folder of creaturescripts i created the file think.lua, place in lib/function.lua the lines specified for 4220niller, in end(purpose) I did everything what is needed in order that the function works...
Still this way scripts as this one they do not work:
creaturescripts/advances/level.lua
Code:
function onAdvance(cid, skill, oldlevel, newlevel)
local basesStorages = {
local baseStrenght = 1000,
local baseAgility = 1001,
local baseVitality = 1002,
local baseEnergy = 1003
}
local pointsPerLevel = 1
local checkStrenght = getPlayerStorageValue(cid, basesStorages.baseStrenght)
local checkAgility = getPlayerStorageValue(cid, basesStorages.baseAgility)
local checkVitality = getPlayerStorageValue(cid, basesStorages.baseVitality)
local checkEnergy = getPlayerStorageValue(cid, basesStorages.baseEnergy)
setPlayerStorageValue(cid, basesStorages.baseStrenght, checkStrenght+pointsPerLevel)
setPlayerStorageValue(cid, basesStorages.baseAgility, checkAgility+pointsPerLevel)
setPlayerStorageValue(cid, basesStorages.baseVitality, checkVitality+pointsPerLevel)
setPlayerStorageValue(cid, basesStorages.baseEnergy, checkEnergy+pointsPerLevel)
end
Why this function don't work for me?
What i need to write in creaturescripts.xml?
Can somebody make a guide "How to use onAdvance Function"?
Thanks
SORRY MY BAD ENGLISH, I'M USING A TRANSLATOR