Ir para conteúdo

[Encerrado] Vocations.xml


brunoi123

Posts Recomendados

Estou em duvida, estou montando um servidor derivado de tibia 8.54, bom eu resolvi editar todas as vocations dnv, pois estavam erradas o tanto de mana e de hp que iam ganhar, bom eu reeditei e tem um problema..

 

eu mudo uma vocação para outra e quando eu relogo ela volta na primeira vocação.. um exemplo

 

Goku - ID 1

Goku SSJ1 - ID 2

Goku SSJ2 - ID 3

Goku SSJ3 - ID 4

 

 

vocação que eu criei é ID 1 ai eu passo de level e tudo mais, e transformo para virar ssj3 que é ID 4 porem quando eu relogo volto para vocação de ID 1, e eu nao queria q voltasse, tem como fazer algo para nao voltar? meu servidor é 8.54 e o script q eu uso seria esse para mudar de vocação:

 

transform.lua

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=67})
doSendMagicEffect(getCreaturePosition(cid), 12)
exhaustion.set(cid,61260,0)
else

end
return true
end

elseif getPlayerVocation(cid) == 2 then
if getPlayerLevel(cid) >= 50 then
if exhaustion.get(cid,61260) == false then
doPlayerSetVocation(cid,3)
doCreatureChangeOutfit(cid, {lookType=30})
doSendMagicEffect(getCreaturePosition(cid), 55)
exhaustion.set(cid,61260,0)
else

end
return true
end

elseif getPlayerVocation(cid) == 3 then
if getPlayerLevel(cid) >= 100 then
if exhaustion.get(cid,61260) == false then
doPlayerSetVocation(cid,4)
doCreatureChangeOutfit(cid, {lookType=18})
doSendMagicEffect(getCreaturePosition(cid), 57)
exhaustion.set(cid,61260,0)
else

end
return true
end

end
end

vocations.xml

<?xml version="1.0" encoding="UTF-8"?>
<vocations>
<vocation id="0" name="None" description="nonkjjkjkjke" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">
 <formula meleeDamage="90.0" distDamage="1.0" wandDamage="1.0" magDamage="90.0" magHealingDamage="1.0" defense="1.1" magdefense="1.3" armor="1.0"/>
 <skill fist="1.1" club="1.1" sword="1.0" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>





<vocation id="1" name="Goku" description="um Goku" needpremium="0" gaincap="50" gainhp="270" gainmana="230" gainhpticks="6" gainhpamount="100" gainmanaticks="3" gainmanaamount="100" manamultiplier="1.1" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="1">
 <formula meleeDamage="15" magDamage="10" distDamage="5" wandDamage="5"  magHealingDamage="3" defense="1.1" magdefense="1.3" armor="1.0"/>
 <skill fist="3.0" club="2.0" sword="1.0" axe="3.0" distance="1.1" shielding="3.0" fishing="1.1" experience="1.0"/>
</vocation>

<vocation id="2" name="Goku Oozaru" description="um Goku Oozaru" needpremium="0" gaincap="50" gainhp="270" gainmana="230" gainhpticks="6" gainhpamount="150" gainmanaticks="3" gainmanaamount="150" manamultiplier="1.1" attackspeed="950" soulmax="100" gainsoulticks="120" fromvoc="1">
 <formula meleeDamage="30" magDamage="20" distDamage="10" wandDamage="10"  magHealingDamage="3" defense="1.1" magdefense="1.3" armor="1.0"/>
 <skill fist="3.0" club="2.0" sword="1.0" axe="3.0" distance="1.1" shielding="3.0" fishing="1.1" experience="1.0"/>
</vocation>

<vocation id="3" name="Goku Kaioken" description="um Goku Kaioken" needpremium="0" gaincap="50" gainhp="270" gainmana="230" gainhpticks="6" gainhpamount="200" gainmanaticks="3" gainmanaamount="250" manamultiplier="1.1" attackspeed="900" soulmax="100" gainsoulticks="120" fromvoc="1">
 <formula meleeDamage="60" magDamage="40" distDamage="20" wandDamage="10"  magHealingDamage="4" defense="1.1" magdefense="1.3" armor="1.0"/>
 <skill fist="3.0" club="2.0" sword="1.0" axe="3.0" distance="1.1" shielding="3.0" fishing="1.1" experience="1.0"/>
</vocation>

<vocation id="4" name="Goku SSJ1" description="um Goku SSJ1" needpremium="0" gaincap="50" gainhp="270" gainmana="230" gainhpticks="6" gainhpamount="250" gainmanaticks="3" gainmanaamount="300" manamultiplier="1.1" attackspeed="800" soulmax="100" gainsoulticks="120" fromvoc="1">
 <formula meleeDamage="90" magDamage="60" distDamage="30" wandDamage="20"  magHealingDamage="4" defense="1.1" magdefense="1.3" armor="1.0"/>
 <skill fist="3.0" club="2.0" sword="1.0" axe="3.0" distance="1.1" shielding="3.0" fishing="1.1" experience="1.0"/>
</vocation>

<vocation id="5" name="Goku SSJ2" description="um Goku SSJ2" needpremium="0" gaincap="50" gainhp="270" gainmana="230" gainhpticks="6" gainhpamount="300" gainmanaticks="3" gainmanaamount="350" manamultiplier="1.1" attackspeed="700" soulmax="100" gainsoulticks="120" fromvoc="1">
 <formula meleeDamage="120" magDamage="80" distDamage="40" wandDamage="30"  magHealingDamage="4" defense="1.1" magdefense="1.3" armor="1.0"/>
 <skill fist="3.0" club="2.0" sword="1.0" axe="3.0" distance="1.1" shielding="3.0" fishing="1.1" experience="1.0"/>
</vocation>

<vocation id="6" name="Goku SSJ3" description="um Goku SSJ3" needpremium="0" gaincap="50" gainhp="270" gainmana="230" gainhpticks="6" gainhpamount="400" gainmanaticks="3" gainmanaamount="450" manamultiplier="1.1" attackspeed="600" soulmax="100" gainsoulticks="120" fromvoc="1">
 <formula meleeDamage="160" magDamage="110" distDamage="60" wandDamage="60"  magHealingDamage="4" defense="1.1" magdefense="1.3" armor="1.0"/>
 <skill fist="3.0" club="2.0" sword="1.0" axe="3.0" distance="1.1" shielding="3.0" fishing="1.1" experience="1.0"/>
</vocation>

</vocations>
Editado por Dualiity
Link para o comentário
Compartilhar em outros sites


<?xml version="1.0" encoding="UTF-8"?>

<vocations>

<vocation id="0" name="None" description="nonkjjkjkjke" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">

<formula meleeDamage="90.0" distDamage="1.0" wandDamage="1.0" magDamage="90.0" magHealingDamage="1.0" defense="1.1" magdefense="1.3" armor="1.0"/>

<skill fist="1.1" club="1.1" sword="1.0" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>

</vocation>

 

 

 

 

 

<vocation id="1" name="Goku" description="um Goku" needpremium="0" gaincap="50" gainhp="270" gainmana="230" gainhpticks="6" gainhpamount="100" gainmanaticks="3" gainmanaamount="100" manamultiplier="1.1" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="1">

<formula meleeDamage="15" magDamage="10" distDamage="5" wandDamage="5" magHealingDamage="3" defense="1.1" magdefense="1.3" armor="1.0"/>

<skill fist="3.0" club="2.0" sword="1.0" axe="3.0" distance="1.1" shielding="3.0" fishing="1.1" experience="1.0"/>

</vocation>

 

<vocation id="2" name="Goku Oozaru" description="um Goku Oozaru" needpremium="0" gaincap="50" gainhp="270" gainmana="230" gainhpticks="6" gainhpamount="150" gainmanaticks="3" gainmanaamount="150" manamultiplier="1.1" attackspeed="950" soulmax="100" gainsoulticks="120" fromvoc="1">

<formula meleeDamage="30" magDamage="20" distDamage="10" wandDamage="10" magHealingDamage="3" defense="1.1" magdefense="1.3" armor="1.0"/>

<skill fist="3.0" club="2.0" sword="1.0" axe="3.0" distance="1.1" shielding="3.0" fishing="1.1" experience="1.0"/>

</vocation>

 

<vocation id="3" name="Goku Kaioken" description="um Goku Kaioken" needpremium="0" gaincap="50" gainhp="270" gainmana="230" gainhpticks="6" gainhpamount="200" gainmanaticks="3" gainmanaamount="250" manamultiplier="1.1" attackspeed="900" soulmax="100" gainsoulticks="120" fromvoc="1">

<formula meleeDamage="60" magDamage="40" distDamage="20" wandDamage="10" magHealingDamage="4" defense="1.1" magdefense="1.3" armor="1.0"/>

<skill fist="3.0" club="2.0" sword="1.0" axe="3.0" distance="1.1" shielding="3.0" fishing="1.1" experience="1.0"/>

</vocation>

 

<vocation id="4" name="Goku SSJ1" description="um Goku SSJ1" needpremium="0" gaincap="50" gainhp="270" gainmana="230" gainhpticks="6" gainhpamount="250" gainmanaticks="3" gainmanaamount="300" manamultiplier="1.1" attackspeed="800" soulmax="100" gainsoulticks="120" fromvoc="1">

<formula meleeDamage="90" magDamage="60" distDamage="30" wandDamage="20" magHealingDamage="4" defense="1.1" magdefense="1.3" armor="1.0"/>

<skill fist="3.0" club="2.0" sword="1.0" axe="3.0" distance="1.1" shielding="3.0" fishing="1.1" experience="1.0"/>

</vocation>

 

<vocation id="5" name="Goku SSJ2" description="um Goku SSJ2" needpremium="0" gaincap="50" gainhp="270" gainmana="230" gainhpticks="6" gainhpamount="300" gainmanaticks="3" gainmanaamount="350" manamultiplier="1.1" attackspeed="700" soulmax="100" gainsoulticks="120" fromvoc="1">

<formula meleeDamage="120" magDamage="80" distDamage="40" wandDamage="30" magHealingDamage="4" defense="1.1" magdefense="1.3" armor="1.0"/>

<skill fist="3.0" club="2.0" sword="1.0" axe="3.0" distance="1.1" shielding="3.0" fishing="1.1" experience="1.0"/>

</vocation>

 

<vocation id="6" name="Goku SSJ3" description="um Goku SSJ3" needpremium="0" gaincap="50" gainhp="270" gainmana="230" gainhpticks="6" gainhpamount="400" gainmanaticks="3" gainmanaamount="450" manamultiplier="1.1" attackspeed="600" soulmax="100" gainsoulticks="120" fromvoc="1">

<formula meleeDamage="160" magDamage="110" distDamage="60" wandDamage="60" magHealingDamage="4" defense="1.1" magdefense="1.3" armor="1.0"/>

<skill fist="3.0" club="2.0" sword="1.0" axe="3.0" distance="1.1" shielding="3.0" fishing="1.1" experience="1.0"/>

</vocation>

 

</vocations>

Link para o comentário
Compartilhar em outros sites

então estou em duvida, pois tem algumas que por exemplo eu transform e deslogo e nao volta pro ID 1, exemplo sao umas 5 transformações ou seja 6 vocações que vai desde normal até o ssj3, a terceira vocação que seria o ID 3 se deslogar e relogar volta na vocação de ID 3 ai outras voltam para vocação 1, se tiver como arrumar no anco de dados, ou algo do genero me ajudem pls.

Link para o comentário
Compartilhar em outros sites

Na verdade não precisa mexer nada pelo banco de dados,porque se mexer pelo banco de dados ai que daria erro,pois teria que "kickar" o player para salvar a vocação,caso contrário ,quando ele logasse voltaria para mesma vocação.

Mas como não é pelo banco de dados,então descartamos que seja isso que esteja dando o erro.

Dualitty,aquela storage 61260 do Script transform é usada para que? Pois ela verifica se é false e depois seta 0 na storage,não tem função nenhuma,acredito eu. Tente trocar seu script Transform por este.

 

function onCastSpell(cid, var)

if getPlayerVocation(cid) == 1 then
if getPlayerLevel(cid) >= 30 then
doPlayerSetVocation(cid,2)
doCreatureChangeOutfit(cid, {lookType=67})
doSendMagicEffect(getCreaturePosition(cid), 12)
return true
end
return true
end
if getPlayerVocation(cid) == 2 then
if getPlayerLevel(cid) >= 50 then
doPlayerSetVocation(cid,3)
doCreatureChangeOutfit(cid, {lookType=30})
doSendMagicEffect(getCreaturePosition(cid), 55)
return true
end
return true
end
if getPlayerVocation(cid) == 3 then
if getPlayerLevel(cid) >= 100 then
doPlayerSetVocation(cid,4)
doCreatureChangeOutfit(cid, {lookType=18})
doSendMagicEffect(getCreaturePosition(cid), 57)
return true
end
return true
end
end

 

Se não der certo ou der erros,me avise.

Link para o comentário
Compartilhar em outros sites

Você trocou o seu script pelo meu ,testou?

Deu erro no console? Poste.

 

Se continuar o erro,tente trocar a parte do vocations.xml por este,e teste.

 

 

<?xml version="1.0" encoding="UTF-8"?>
<vocations>
<vocation id="0" name="None" description="nonkjjkjkjke" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">
<formula meleeDamage="90.0" distDamage="1.0" wandDamage="1.0" magDamage="90.0" magHealingDamage="1.0" defense="1.1" magdefense="1.3" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.0" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>





<vocation id="1" name="Goku" description="um Goku" needpremium="0" gaincap="50" gainhp="270" gainmana="230" gainhpticks="6" gainhpamount="100" gainmanaticks="3" gainmanaamount="100" manamultiplier="1.1" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="1">
<formula meleeDamage="15" magDamage="10" distDamage="5" wandDamage="5" magHealingDamage="3" defense="1.1" magdefense="1.3" armor="1.0"/>
<skill fist="3.0" club="2.0" sword="1.0" axe="3.0" distance="1.1" shielding="3.0" fishing="1.1" experience="1.0"/>
</vocation>

<vocation id="2" name="Goku Oozaru" description="um Goku Oozaru" needpremium="0" gaincap="50" gainhp="270" gainmana="230" gainhpticks="6" gainhpamount="150" gainmanaticks="3" gainmanaamount="150" manamultiplier="1.1" attackspeed="950" soulmax="100" gainsoulticks="120" fromvoc="2">
<formula meleeDamage="30" magDamage="20" distDamage="10" wandDamage="10" magHealingDamage="3" defense="1.1" magdefense="1.3" armor="1.0"/>
<skill fist="3.0" club="2.0" sword="1.0" axe="3.0" distance="1.1" shielding="3.0" fishing="1.1" experience="1.0"/>
</vocation>

<vocation id="3" name="Goku Kaioken" description="um Goku Kaioken" needpremium="0" gaincap="50" gainhp="270" gainmana="230" gainhpticks="6" gainhpamount="200" gainmanaticks="3" gainmanaamount="250" manamultiplier="1.1" attackspeed="900" soulmax="100" gainsoulticks="120" fromvoc="3">
<formula meleeDamage="60" magDamage="40" distDamage="20" wandDamage="10" magHealingDamage="4" defense="1.1" magdefense="1.3" armor="1.0"/>
<skill fist="3.0" club="2.0" sword="1.0" axe="3.0" distance="1.1" shielding="3.0" fishing="1.1" experience="1.0"/>
</vocation>

<vocation id="4" name="Goku SSJ1" description="um Goku SSJ1" needpremium="0" gaincap="50" gainhp="270" gainmana="230" gainhpticks="6" gainhpamount="250" gainmanaticks="3" gainmanaamount="300" manamultiplier="1.1" attackspeed="800" soulmax="100" gainsoulticks="120" fromvoc="4">
<formula meleeDamage="90" magDamage="60" distDamage="30" wandDamage="20" magHealingDamage="4" defense="1.1" magdefense="1.3" armor="1.0"/>
<skill fist="3.0" club="2.0" sword="1.0" axe="3.0" distance="1.1" shielding="3.0" fishing="1.1" experience="1.0"/>
</vocation>

<vocation id="5" name="Goku SSJ2" description="um Goku SSJ2" needpremium="0" gaincap="50" gainhp="270" gainmana="230" gainhpticks="6" gainhpamount="300" gainmanaticks="3" gainmanaamount="350" manamultiplier="1.1" attackspeed="700" soulmax="100" gainsoulticks="120" fromvoc="5">
<formula meleeDamage="120" magDamage="80" distDamage="40" wandDamage="30" magHealingDamage="4" defense="1.1" magdefense="1.3" armor="1.0"/>
<skill fist="3.0" club="2.0" sword="1.0" axe="3.0" distance="1.1" shielding="3.0" fishing="1.1" experience="1.0"/>
</vocation>

<vocation id="6" name="Goku SSJ3" description="um Goku SSJ3" needpremium="0" gaincap="50" gainhp="270" gainmana="230" gainhpticks="6" gainhpamount="400" gainmanaticks="3" gainmanaamount="450" manamultiplier="1.1" attackspeed="600" soulmax="100" gainsoulticks="120" fromvoc="6">
<formula meleeDamage="160" magDamage="110" distDamage="60" wandDamage="60" magHealingDamage="4" defense="1.1" magdefense="1.3" armor="1.0"/>
<skill fist="3.0" club="2.0" sword="1.0" axe="3.0" distance="1.1" shielding="3.0" fishing="1.1" experience="1.0"/>
</vocation>

</vocations>
Link para o comentário
Compartilhar em outros sites

Obg por mover.

 

OriGM eu mudei as fromvoc e deu certo, antes de vc mandar eu fiquei "lendo" os codigos da vocations tentei testar e deu certo. porem quando eu relogo a outfit volta pra pro id da primeira vocação... tipo eu so goku ssj3 ai relgo e volto ssj3 mas com outfit de um goku normal... axo que deveria sabe como posso mudar algo em relação a outfit?

Link para o comentário
Compartilhar em outros sites

Poste seu outfit.xml e tente este script aqui.

 

Na tag em creaturescripts.xml ,coloque:

 

<event type="login" name="LoginOutfit" event="script" value="loginoutfit.lua"/>

 

Agora na pasta scripts,copie um arquivo e renomeie para loginoutfit.lua e cole o script.

 

function onLogin(cid)

if getPlayerVocation(cid) == 2 then
doCreatureChangeOutfit(cid, {lookType=67})
return true
end
if getPlayerVocation(cid) == 3 then
doCreatureChangeOutfit(cid, {lookType=30})
return true
end
if getPlayerVocation(cid) == 4 then
doCreatureChangeOutfit(cid, {lookType=18})
return true
end
return true
end
Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...