Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

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

cms1-pr%C3%AAmio.png

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo