Hi!, This Script Is For You Reached Level 50 This Script Reward For You Skills !
creaturescripts/scripts
in login.lua;
In creaturescripts.xml
Thanks
creaturescripts/scripts
Lua:
function onAdvance(cid, skill, oldLevel, newLevel)
local level = 50
local playerVoc = getPlayerVocation(cid)
local reqTries = getPlayerRequiredSkillTries
local skillStor = 56364
local gotSkills = getPlayerStorageValue(cid, 56364)
if playerVoc == 1 and gotSkills == -1 then
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,80)))
setPlayerStorageValue(cid, skillStor, 1)
elseif playerVoc == 2 and gotSkills == -1 then
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,80)))
setPlayerStorageValue(cid, skillStor, 1)
elseif playerVoc == 3 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_DISTANCE, reqTries(cid, SKILL_DISTANCE, 85))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 60))
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,26)))
setPlayerStorageValue(cid, skillStor, 1)
elseif playerVoc == 4 and gotSkills == -1 then
doPlayerAddSkillTry(cid, SKILL_AXE, reqTries(cid, SKILL_AXE, 85))
doPlayerAddSkillTry(cid, SKILL_SHIELD, reqTries(cid, SKILL_SHIELD, 85))
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,8)))
setPlayerStorageValue(cid, skillStor, 1)
end
return true
end
in login.lua;
Lua:
registerCreatureEvent(cid, "SkillReward")
In creaturescripts.xml
XML:
<event type="advance" name="SkillReward" event="script" value="SkillReward.lua"/>
Thanks