function onThink(cid, interval)
local queststatus = getPlayerStorageValue(cid,9500)
local playerVoc = getPlayerVocation(cid)
if playerVoc == 1 and queststatus == -1 then
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,30)))
setPlayerStorageValue(cid, 9500, 1)
end
if playerVoc == 2 and queststatus == -1 then
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,30)))
setPlayerStorageValue(cid, 9500, 1)
end
if playerVoc == 3 and queststatus == -1 then
doPlayerAddSkillTry(cid, SKILL_DISTANCE, 20)
doPlayerAddSkillTry(cid, SKILL_SHIELD, 20)
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,10)))
setPlayerStorageValue(cid, 9500, 1)
end
if playerVoc == 4 and queststatus == -1 then
doPlayerAddSkillTry(cid, SKILL_AXE, 20)
doPlayerAddSkillTry(cid, SKILL_SWORD, 20)
doPlayerAddSkillTry(cid, SKILL_CLUB, 20)
doPlayerAddSkillTry(cid, SKILL_SHIELD, 20)
doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,4)))
setPlayerStorageValue(cid, 9500, 1)
end
return TRUE
end
LUA:function onThink(cid, interval) local queststatus = getPlayerStorageValue(cid,9500) local playerVoc = getPlayerVocation(cid) if playerVoc == 1 and queststatus == -1 then doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,30))) setPlayerStorageValue(cid, 9500, 1) end if playerVoc == 2 and queststatus == -1 then doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,30))) setPlayerStorageValue(cid, 9500, 1) end if playerVoc == 3 and queststatus == -1 then doPlayerAddSkillTry(cid, SKILL_DISTANCE, 20) doPlayerAddSkillTry(cid, SKILL_SHIELD, 20) doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,10))) setPlayerStorageValue(cid, 9500, 1) end if playerVoc == 4 and queststatus == -1 then doPlayerAddSkillTry(cid, SKILL_AXE, 20) doPlayerAddSkillTry(cid, SKILL_SWORD, 20) doPlayerAddSkillTry(cid, SKILL_CLUB, 20) doPlayerAddSkillTry(cid, SKILL_SHIELD, 20) doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid,4))) setPlayerStorageValue(cid, 9500, 1) end return TRUE end
<event type="think" name="Skils" event="script" value="skilladd.lua"/>
registerCreatureEvent(cid, "Skils")