Ir para conteúdo

Featured Replies

Postado
  • Autor
2 horas atrás, Celulose disse:

function onUse(cid, item, frompos, item2, topos)
if getPlayerLevel(cid) >= 1 then
doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHLEVEL)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return true
end
if getVocationInfo(getPlayerVocation(cid)).name == "Madara" then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja é um madara!")
else
doPlayerSetVocation(cid, 210)
doCreatureSay(cid, "Madara Owns!!", 19) 
doSendMagicEffect(getCreaturePosition(cid), 224)
doCreatureChangeOutfit(cid, {lookType = 368})
if getPlayerStorageValue(cid, 5) < 1 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+100)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)+100)
setPlayerStorageValue(cid, 5, 1)
end
setPlayerStorageValue(cid, 16200, 1)
setPlayerStorageValue(cid, 300, (getPlayerVocation(cid)))
doRemoveItem(item.uid)
end
return TRUE
end

 

 

Testei e nao funcionou, coloquei em char lv 1 e ainda diz que esta no level errado

msg : "you do not have enough level"

  • Respostas 7
  • Visualizações 561
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Olá,  boa noite, tente assim.   function onUse(cid, item, frompos, item2, topos) if getPlayerLevel(cid) == 1 then else doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHLEVEL) doSendMagicEf

Postado
  • Solução

Olá,  boa noite, tente assim.

 

function onUse(cid, item, frompos, item2, topos)
if getPlayerLevel(cid) == 1 then
else
doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHLEVEL)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return true
end
if getVocationInfo(getPlayerVocation(cid)).name == "Madara" then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja é um madara!")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return true
else
doPlayerSetVocation(cid, 210)
doCreatureSay(cid, "Madara Owns!!", 19) 
doSendMagicEffect(getCreaturePosition(cid), 224)
doCreatureChangeOutfit(cid, {lookType = 368})
if getPlayerStorageValue(cid, 5) < 1 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+100)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)+100)
setPlayerStorageValue(cid, 5, 1)
end
setPlayerStorageValue(cid, 16200, 1)
setPlayerStorageValue(cid, 300, (getPlayerVocation(cid)))
doRemoveItem(item.uid)
end
return true
end

 

Editado por esnio12
faltou um return (veja o histórico de edições)

Postado
  • Autor
29 minutos atrás, esnio12 disse:

Olá,  boa noite, tente assim.

 


function onUse(cid, item, frompos, item2, topos)
if getPlayerLevel(cid) == 1 then
else
doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHLEVEL)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return true
end
if getVocationInfo(getPlayerVocation(cid)).name == "Madara" then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja é um madara!")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return true
else
doPlayerSetVocation(cid, 210)
doCreatureSay(cid, "Madara Owns!!", 19) 
doSendMagicEffect(getCreaturePosition(cid), 224)
doCreatureChangeOutfit(cid, {lookType = 368})
if getPlayerStorageValue(cid, 5) < 1 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+100)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)+100)
setPlayerStorageValue(cid, 5, 1)
end
setPlayerStorageValue(cid, 16200, 1)
setPlayerStorageValue(cid, 300, (getPlayerVocation(cid)))
doRemoveItem(item.uid)
end
return true
end

 

 

Obrigado men !! funcionou certinho

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