Fala TK, de boas?
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 config = {
--[vocation id] = { level, nova voc, looktype, efeito}
[1] = { 14, 2, 70, 4},
[2] = { 30, 3, 71, 4},
}
function onSay(cid, words, param, channel)
doPlayerSay(cid, "transformar")
local voc = config[getPlayerVocation(cid)]
if voc then
if getPlayerLevel(cid) >= voc[1] then
doPlayerSetVocation(cid, voc[2])
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você Transformou!")
local outfit = {lookType = voc[3]}
doCreatureChangeOutfit(cid, outfit)
doSendMagicEffect(getCreaturePosition(cid), voc[4])
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você precisa estar no level " .. voc[1] .. " para transformar.")
end
else
doPlayerSendCancel(cid, "Você não pode se Transformar!")
end
return true
end
Grato desde já
~~ RESOLVIDO!
Só percebi agora que deixei todos os fromvoc com valores 4, por isso sempre retornava pra vocação 4!