Postado Agosto 9, 2019 5 anos 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"
Postado Agosto 9, 2019 5 anos 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 Agosto 9, 2019 5 anos por esnio12 faltou um return (veja o histórico de edições)
Postado Agosto 9, 2019 5 anos 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.