-- [( Script edited by: DoidinMapper for XTibia.com )] --
function onAdvance(cid, skill, oldLevel, newLevel)
local config = {savePlayersOnAdvance = true}
if(config.savePlayersOnAdvance) then
doPlayerSave(cid, TRUE)
end
return TRUE
end
<event type= "advance" name= "PointSystem" event= "script" value= "pointSystem.lua"/>
local VocPoints = {
[1] = 3,
[2] = 3,
[3] = 3,
[4] = 5,
[5] = 5,
[6] = 5,
[7] = 5,
[8] = 8,
}
function onAdvance(cid, skill, oldlevel, newlevel)
if not (VocPoints[getPlayerVocation(cid)]) then
return true
end
if (skill == 8) then
if (getPlayerStorageValue(cid, 14573) < newlevel) then
if (getPlayerStorageValue(cid, 14574) < 0) then
setPlayerStorageValue(cid, 14574, 0)
setPlayerStorageValue(cid, 14573, 0)
end
setPlayerStorageValue(cid, 14573, newlevel)
setPlayerStorageValue(cid, 14574, getPlayerStorageValue(cid, 14574) + (newlevel - oldlevel) * (VocPoints
[getPlayerVocation(cid)]))
doSendAnimatedText(getThingPos(cid), "+" .. (newlevel - oldlevel) * (VocPoints[getPlayerVocation(cid)]), 18)
end
end
return true
end
-- [( Script edited by: DoidinMapper for XTibia.com )] --
function onAdvance(cid, skill, oldLevel, newLevel)
local config = {savePlayersOnAdvance = true}
if(config.savePlayersOnAdvance) then
doPlayerSave(cid, TRUE)
end
return TRUE
end
local config = {
savePlayer = true,
healPlayerOnLevel = true
}
function onAdvance(cid, skill, oldLevel, newLevel)
if(skill == SKILL__EXPERIENCE) then
return true
end
if(skill == SKILL__LEVEL and config.healPlayerOnLevel) then
doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid))
doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid))
end
if(config.savePlayer) then
doPlayerSave(cid, true)
end
return true
end