Postado Março 31, 2019 6 anos Bom, primeiramente boa tarde, estou com um problema de vocations, queria aumentar as vocs que tenho, só que ela nao salva no player quando ele recebe a promotion... existe algo a mais pra fazer alem de mexer no vocations.xml e adicionar a vocation no item de promo? Editado Março 31, 2019 6 anos por Platinun (veja o histórico de edições)
Postado Março 31, 2019 6 anos @Platinun da algum erro no console se não poste o script do item que da a nova vocation
Postado Abril 1, 2019 6 anos @Platinun Se o script usa 'doPlayerSetVocation(cid, voc)', o 'fromvoc' em vocations.xml tem que ter a mesma id da vocation. Se o script usa 'doPlayerSetPromotionLevel(cid, prom)', o 'fromvoc' em vocations.xml tem que ter a id de sua vocação prévia.
Postado Abril 1, 2019 6 anos Autor @gabriel28 meu script e esse, e a voc ta com a fromvoc anterior. exemplo:{ knight=4, elite knight=4, epic elite knight= 8} a epic elite knight e pra ser depois da elite knight Spoiler function onUse(cid, item) if (isPremium(cid)) then if (getPlayerVocation(cid) >= 5 and getPlayerVocation(cid) <=8) then doPlayerSendTextMessage(cid,25,"Voce ja foi promovido!") else doRemoveItem(item.uid, 1) -- remove o promotion scroll doPlayerSendTextMessage(cid,25,"Voce foi promovido com sucesso!") doPlayerSetVocation(cid, getPlayerVocation(cid)+4) end end end @Brunds nao da erro nenhum no console.... Spoiler <vocation id="4" name="Knight" description="a knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="2" manamultiplier="3.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="4"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="8" name="Elite Knight" description="an elite knight" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="4" gainhpamount="1" gainmanaticks="6" gainmanaamount="2" manamultiplier="3.0" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="12" name="Epic Elite Knight" description="an epic elite knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="1" gainmanaticks="6" gainmanaamount="2" manamultiplier="3.0" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="8" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="2.0" magDefense="1.8" armor="1.9"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> a do knight e essa aqui no voc.xml Editado Abril 1, 2019 6 anos por Platinun (veja o histórico de edições)
Postado Abril 1, 2019 6 anos Solução @Platinun function onUse(cid, item) if (isPremium(cid)) then if (getPlayerVocation(cid) >= 5 and getPlayerVocation(cid) <=8) then doPlayerSendTextMessage(cid,25,"Voce ja foi promovido!") else doRemoveItem(item.uid, 1) -- remove o promotion scroll doPlayerSendTextMessage(cid,25,"Voce foi promovido com sucesso!") doPlayerSetPromotionLevel(cid, 2) 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.