• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

CreatureEvent Skills For Level ;)

Nightss

Normal People
Joined
May 18, 2013
Messages
55
Reaction score
12
Location
Mexicali
Hi!, This Script Is For You Reached Level 50 This Script Reward For You Skills :D!

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 ;)
 
Back
Top