• 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!

Solved second promotion item

magista

RL name " Amir reda "
Joined
Jul 22, 2011
Messages
157
Solutions
1
Reaction score
21
Location
Egypt
it works and every thing is oki but when the character relog back to elite knight again can anyone help ?

Code:
function onSay(cid, words, param)
if(getPlayerItemCount(cid, 2158) > 0) then
if(getPlayerVocation(cid) == 8) == FALSE then
doPlayerSendCancel(cid, 'You\'re not a Elite Knight, therefore you can\'t become an Destroyer.')
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
else
                      doPlayerRemoveItem(cid,2158,1)
                      doPlayerSetVocation(cid,16)
                      doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'Congratz, you\'re now a Destroyer !')
                  doSendMagicEffect(getPlayerPosition(cid), 12)

end
             else
            doPlayerSendCancel(cid, 'You don\'t have promotion gem.')
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
        end
return true
end
 
Ye the problem is, the gem works to promote every vocation to the specified choice, there are 8 choices past the original promotions.
Destroyer, Templar (Knight)
Sharpshooter, Arcane Archer (Paladin)
Arch Mage, Demonic Warlock (Sorcerer)
Holy Priest, Mystic Saage (Druid).

But when the char relogs, he goes back to the original promotion. IE (EK, MS, RP, ED).
 
it works and every thing is oki but when the character relog back to elite knight again can anyone help ?

Code:
function onSay(cid, words, param)
if(getPlayerItemCount(cid, 2158) > 0) then
if(getPlayerVocation(cid) == 8) == FALSE then
doPlayerSendCancel(cid, 'You\'re not a Elite Knight, therefore you can\'t become an Destroyer.')
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
else
                      doPlayerRemoveItem(cid,2158,1)
                      doPlayerSetVocation(cid,16)
                      doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'Congratz, you\'re now a Destroyer !')
                  doSendMagicEffect(getPlayerPosition(cid), 12)

end
             else
            doPlayerSendCancel(cid, 'You don\'t have promotion gem.')
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
        end
return true
end
Can you please post your vocations.xml?
 
Ye the problem is, the gem works to promote every vocation to the specified choice, there are 8 choices past the original promotions.
Destroyer, Templar (Knight)
Sharpshooter, Arcane Archer (Paladin)
Arch Mage, Demonic Warlock (Sorcerer)
Holy Priest, Mystic Saage (Druid).

But when the char relogs, he goes back to the original promotion. IE (EK, MS, RP, ED).
post creaturescript/login.lua :D
 
like elite knight is 1 if you have a second promotion, then it's 2. And so on.
but there are 2 kinds of promotion for 1 vocation the player has to choose 1 of 2 like this :-
Code:
Ye the problem is, the gem works to promote every vocation to the specified choice, there are 8 choices past the original promotions.
Destroyer, Templar (Knight)
Sharpshooter, Arcane Archer (Paladin)
Arch Mage, Demonic Warlock (Sorcerer)
Holy Priest, Mystic Saage (Druid).

But when the char relogs, he goes back to the original promotion. IE (EK, MS, RP, ED).
 
but there are 2 kinds of promotion for 1 vocation the player has to choose 1 of 2 like this :-
Code:
Ye the problem is, the gem works to promote every vocation to the specified choice, there are 8 choices past the original promotions.
Destroyer, Templar (Knight)
Sharpshooter, Arcane Archer (Paladin)
Arch Mage, Demonic Warlock (Sorcerer)
Holy Priest, Mystic Saage (Druid).

But when the char relogs, he goes back to the original promotion. IE (EK, MS, RP, ED).
I'm not going to tell you how to problem solve a situation. I believe you need to think about this on your own. I've just given you a fix to your situation, and there's an easy solution to what you're trying to do...
 
solved script
Code:
function onSay(cid, words, param)
if(getPlayerItemCount(cid, 2158) > 0) then
if(getPlayerVocation(cid) == 8) == FALSE then
doPlayerSendCancel(cid, 'You\'re not a Elite Knight, therefore you can\'t become an Templar.')
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
else
                      doPlayerRemoveItem(cid,2158,1)
                      doPlayerSetPromotionLevel(cid,2)
                      doPlayerSetVocation(cid,12)
                      doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'Congratz, you\'re now an Templer !')
                  doSendMagicEffect(getPlayerPosition(cid), 12)

end
             else
            doPlayerSendCancel(cid, 'You don\'t have promotion gem.')
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
        end
return true
end
 

Similar threads

Back
Top Bottom