Ir para conteúdo

[Encerrado] [Encerrado] Não consigo mudar de vocation!


VaizardX

Posts Recomendados

Fala XTibia, tudo bem ?

Baixei um servidor 8.54 0.3.6pl1 aqui, para criar meu própio servidor, mas me deparei com um problema no caminho... Eu não consigo mudar as Vocations dos characters por meio nenhum! Nem por script LUA, nem pelo SQLite. Não importa o quanto/qual eu mude, sempre vai para vocation 4!

Será que tem como alguém me ajudar aqui ?

 

Vou deixar aqui o script lua que eu uso, e a minha vocations.xml:

 

Vocations:

<vocation id="1" name="Guerreiro" description="a Guerreiro" needpremium="0" gaincap="25" gainhp="15" gainmana="15" gainhpticks="3" gainhpamount="5" gainmanaticks="6" gainmanaamount="5" 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="2" name="Guerreiro" description="a Guerreiro" needpremium="0" gaincap="25" gainhp="15" gainmana="15" gainhpticks="3" gainhpamount="5" gainmanaticks="6" gainmanaamount="5" 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="3" name="Guerreiro" description="a Guerreiro" needpremium="0" gaincap="25" gainhp="15" gainmana="15" gainhpticks="3" gainhpamount="5" gainmanaticks="6" gainmanaamount="5" 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.5" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>	</vocation>	<vocation id="4" name="Guerreiro" description="a Guerreiro" needpremium="0" gaincap="25" gainhp="20" gainmana="25" gainhpticks="3" gainhpamount="5" gainmanaticks="6" gainmanaamount="5" 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.5" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>	</vocation>	<vocation id="5" name="Guerreiro" description="a Guerreiro" needpremium="0" gaincap="25" gainhp="30" gainmana="35" gainhpticks="3" gainhpamount="5" gainmanaticks="6" gainmanaamount="5" 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.9" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>	</vocation>	<vocation id="6" name="Guerreiro" description="a Guerreiro" needpremium="0" gaincap="25" gainhp="35" gainmana="45" gainhpticks="3" gainhpamount="5" gainmanaticks="6" gainmanaamount="5" 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.9" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>	</vocation>	<vocation id="7" name="Guerreiro" description="a Guerreiro" needpremium="0" gaincap="25" gainhp="40" gainmana="50" gainhpticks="3" gainhpamount="5" gainmanaticks="6" gainmanaamount="5" 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.9" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>	</vocation>	<vocation id="8" name="Guerreiro" description="a Guerreiro" needpremium="0" gaincap="25" gainhp="50" gainmana="60" gainhpticks="3" gainhpamount="5" gainmanaticks="6" gainmanaamount="5" 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.9" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>	</vocation>	<vocation id="9" name="Guerreiro" description="a Guerreiro" needpremium="0" gaincap="25" gainhp="70" gainmana="100" gainhpticks="3" gainhpamount="5" gainmanaticks="6" gainmanaamount="5" 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.9" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>	</vocation>

 

Talkaction para mudar de vocation:

local transformar = {[4] = {10112, 15, 5, 70, 4},[5] = {10112, 20, 6, 71, 4},}function onSay(cid, words, param, channel)local from,to = {x=1001, y=705, z=7},{x=1031, y=737, z=7} -- começo e final do mapalocal from2,to2 = {x=1011, y=705, z=6},{x=1031, y=738, z=6} -- começo e final do mapalocal from3,to3 = {x=1012, y=706, z=5},{x=1032, y=739, z=5} -- começo e final do mapalocal from4,to4 = {x=985, y=598, z=7},{x=1044, y=652, z=7} -- começo e final do mapalocal from5,to5 = {x=986, y=615, z=6},{x=1039, y=647, z=7} -- começo e final do mapalocal from6,to6 = {x=990, y=616, z=5},{x=1040, y=647, z=5} -- começo e final do mapalocal from7,to7 = {x=1475, y=856, z=7},{x=1484, y=867, z=7} -- começo e final do mapalocal from8,to8 = {x=984, y=578, z=7},{x=1044, y=652, z=7} -- shinobi war	if isInRange(getCreaturePosition(cid), from, to) or isInRange(getCreaturePosition(cid), from2, to2) or isInRange(getCreaturePosition(cid), from3, to3) or isInRange(getCreaturePosition(cid), from4, to4) or isInRange(getCreaturePosition(cid), from5, to5) or isInRange(getCreaturePosition(cid), from6, to6) or isInRange(getCreaturePosition(cid), from7, to7) or isInRange(getCreaturePosition(cid), from8, to8) then	doPlayerSendCancel(cid, "Você não pode se transformar nesta área!")	return true	end------------------------------------------------------------local voc = transformar[getPlayerVocation(cid)]	if voc then		if getPlayerStorageValue(cid, voc[1]) >= 1 then			if getPlayerLevel(cid) >= voc[2] then			doCreatureSay(cid, "Transformar!", TALKTYPE_MONSTER)			doPlayerSetVocation(cid, voc[3])			doCreatureChangeOutfit(cid, {lookType = voc[4]})			doSendMagicEffect(getCreaturePosition(cid), voc[5])			else 			doPlayerSendCancel(cid, "Você ainda não está preparado para se transformar!")			end		else		doPlayerSendCancel(cid, "Você ainda não está pronto para esta transformação!")		end 	else 	doPlayerSendCancel(cid, "Você já está na transformação máxima!")	end	return trueend

 

Grato desde já :)

~~ RESOLVIDO!

 

Só percebi agora que deixei todos os fromvoc com valores 4, por isso sempre retornava pra vocação 4!

Link para o comentário
Compartilhar em outros sites

  • 6 months later...
Visitante
Este tópico está impedido de receber novos posts.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...