wilkerhell
;D
- Joined
- Sep 29, 2009
- Messages
- 224
- Reaction score
- 0
When player up level 20 he win promotion automatication.
I search in forum more all scripts no work ;s
Thx
I search in forum more all scripts no work ;s
Thx
function onAdvance(cid, skill, oldLevel, newLevel)
if getPlayerLevel(cid) == 20 then
if getPlayerStorageValue(cid, 1234) ~= 1 then
if getPlayerVocation(cid) == 1 then
doPlayerSetVocation(cid, 5)
setPlayerStorageValue(cid, 1234, 1)
elseif getPlayerVocation(cid) == 2 then
doPlayerSetVocation(cid, 6)
setPlayerStorageValue(cid, 1234, 1)
elseif getPlayerVocation(cid) == 3 then
doPlayerSetVocation(cid, 7)
setPlayerStorageValue(cid, 1234, 1)
elseif getPlayerVocation(cid) == 4 then
doPlayerSetVocation(cid, 8)
setPlayerStorageValue(cid, 1234, 1)
end
end
end
return true
end
function onAdvance(cid, skill, oldLevel, newLevel)
if skill == SKILL__LEVEL and newlevel >= 20 then
if getPlayerPromotionLevel(cid) ~= 1 then
setPlayerPromotionLevel(cid, 1)
end
end
end
function onAdvance(cid, skill, oldLevel, newLevel)
if skill == SKILL__LEVEL and newlevel >= 20 and getPlayerPromotionLevel(cid) < 1 then
doPlayerSetPromotionLevel(cid, 1)
doCreatureSay(cid, "Promoted!", TALKTYPE_ORANGE_1)
end
return true
end