Postado Junho 16, 2014 11 anos Bom tenho um script para uma vocação se transformar em outra, porem nesse script vai ter muitas transformações de vocações e gostaria de saber se tem como no meio do script eu colocar que tal vocação tem q ser premium para se transformar. script: function onCastSpell(cid, var) if getPlayerVocation(cid) == 1 then if getPlayerLevel(cid) >= 30 then if exhaustion.get(cid,61260) == false then doPlayerSetVocation(cid,2) doCreatureChangeOutfit(cid, {lookType=11}) doSendMagicEffect(getCreaturePosition(cid), 12) exhaustion.set(cid,61260,0) else end return true end elseif getPlayerVocation(cid) == 2 then if getPlayerLevel(cid) >= 40 then if exhaustion.get(cid,61260) == false then doPlayerSetVocation(cid,3) doCreatureChangeOutfit(cid, {lookType=12}) doSendMagicEffect(getCreaturePosition(cid), 12) exhaustion.set(cid,61260,0) else end return true end elseif getPlayerVocation(cid) == 3 then if getPlayerLevel(cid) >= 50 then if exhaustion.get(cid,61260) == false then doPlayerSetVocation(cid,4) doCreatureChangeOutfit(cid, {lookType=13}) doSendMagicEffect(getCreaturePosition(cid), 12) exhaustion.set(cid,61260,0) else end return true end end end porém eu posso adicionar uma nova transformação, que no caso seria so adicionar essa coluna: elseif getPlayerVocation(cid) == 10 then if getPlayerLevel(cid) >= 50 then if exhaustion.get(cid,61260) == false then doPlayerSetVocation(cid,11) doCreatureChangeOutfit(cid, {lookType=13}) doSendMagicEffect(getCreaturePosition(cid), 12) exhaustion.set(cid,61260,0) else end return true end mas gostaria que essa nova transformação que eu adicionei somento players premium conseguisse usar, alguem pode me ajudar?
Postado Junho 16, 2014 11 anos Bom amigo, poe a condiçao if isPremium(cid) then ~~ Função return true else ~~ Função return true end Tony Araújo
Postado Junho 16, 2014 11 anos Autor então ficaria: if isPremium(cid) then elseif getPlayerVocation(cid) == 10 then if getPlayerLevel(cid) >= 50 then if exhaustion.get(cid,61260) == false then doPlayerSetVocation(cid,11) doCreatureChangeOutfit(cid, {lookType=13}) doSendMagicEffect(getCreaturePosition(cid), 12) exhaustion.set(cid,61260,0) else end return true end
Postado Junho 17, 2014 11 anos function onCastSpell(cid, var) if getPlayerVocation(cid) == 1 then if getPlayerLevel(cid) >= 30 then if exhaustion.get(cid,61260) == false then if isPremium(cid) then doPlayerSetVocation(cid,2) doCreatureChangeOutfit(cid, {lookType=11}) doSendMagicEffect(getCreaturePosition(cid), 12) exhaustion.set(cid,61260,0) else doSendMagicEffect(getCreaturePosition(cid), 2) doPlayerSendCancel(cid, "Somente Premium podem usar esta magia.") end return true end end elseif getPlayerVocation(cid) == 2 then if getPlayerLevel(cid) >= 40 then if exhaustion.get(cid,61260) == false then if isPremium(cid) then doPlayerSetVocation(cid,3) doCreatureChangeOutfit(cid, {lookType=12}) doSendMagicEffect(getCreaturePosition(cid), 12) exhaustion.set(cid,61260,0) else doSendMagicEffect(getCreaturePosition(cid), 2) doPlayerSendCancel(cid, "Somente Premium podem usar esta magia.") end return true end end elseif getPlayerVocation(cid) == 3 then if getPlayerLevel(cid) >= 50 then if exhaustion.get(cid,61260) == false then if isPremium(cid) then doPlayerSetVocation(cid,4) doCreatureChangeOutfit(cid, {lookType=13}) doSendMagicEffect(getCreaturePosition(cid), 12) exhaustion.set(cid,61260,0) else doSendMagicEffect(getCreaturePosition(cid), 2) doPlayerSendCancel(cid, "Somente Premium podem usar esta magia.") end return true end end end end
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.