Então galera, eu já revirei tudo, e não consegui encontrar a minha solução, que seria concertar um erro de vocação... Eu estou tentando colocar a famosa vocação suprema, iguais as do antigo pbOT, sendo elas ( MS-Hell Wizard, ED-High Saintess, RP-Force Archer e EK-Titan Blader ).
Só que o problema, é que quando eu compro essa promoção no npc, tudo vai bem, até ocorrer qualquer motivo que faça o character deslogar, fazendo com que volte para vocação anterior, no caso de um Hell Wizard -> Master Sorcerer, High Saintess -> Elder Druid, Force Archer -> Royal Paladin e Titan Blader -> Elite Knight, por favor alguém que já teve esse erro ou algo do tipo pode estar me ajudando?
Postarei como estão meus arquivos aqui -
Em data/XML/vocations.xml
<?xml version="1.0" encoding="UTF-8"?>
<vocations>
<vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="2" manamultiplier="4.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">
<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.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="1" name="Sorcerer" description="a sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="3" gainhpamount="50" gainmanaticks="2" gainmanaamount="100" manamultiplier="1.1" attackspeed="800" soulmax="100" gainsoulticks="120" fromvoc="1">
<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.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="2" name="Druid" description="a druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="3" gainhpamount="50" gainmanaticks="2" gainmanaamount="100" manamultiplier="1.1" attackspeed="800" soulmax="100" gainsoulticks="120" fromvoc="2">
<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.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="3" name="Paladin" description="a paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="75" gainmanaticks="3" gainmanaamount="75" manamultiplier="1.4" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="3">
<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.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="4" name="Knight" description="a knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="10" gainhpamount="5" gainmanaticks="6" gainmanaamount="3" manamultiplier="3.0" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="4">
<formula meleeDamage="2.5" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.5" defense="1.5" 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="5" name="Master Sorcerer" description="a master sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="2" gainhpamount="50" gainmanaticks="2" gainmanaamount="100" manamultiplier="1.1" attackspeed="800" soulmax="200" gainsoulticks="1" fromvoc="1" 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.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="6" name="Elder Druid" description="an elder druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="2" gainhpamount="50" gainmanaticks="2" gainmanaamount="100" manamultiplier="1.1" attackspeed="800" soulmax="200" gainsoulticks="1" fromvoc="2" 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.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="7" name="Royal Paladin" description="a royal paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="2" gainhpamount="75" gainmanaticks="3" gainmanaamount="75" manamultiplier="1.4" attackspeed="1000" soulmax="200" gainsoulticks="1" fromvoc="3" 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.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="8" name="Elite Knight" description="an elite knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="100" gainmanaticks="2" gainmanaamount="50" manamultiplier="3.0" attackspeed="1000" soulmax="200" gainsoulticks="1" fromvoc="4" lessloss="30">
<formula meleeDamage="1.5" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.5" defense="1.5" 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="9" name="Hell Wizard" description="an hell wizard" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="5" lessloss="50">
<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.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="10" name="High Saintess" description="an high saintess" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="6" lessloss="50">
<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.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="11" name="Force Archer" description="an force archer" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="7" lessloss="50">
<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.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="12" name="Titan Blader" description="an titan blader" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="8" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" 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="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>
</vocations>
Em data/npc/scripts/vocationsuprema.lua Só pra lembrar que, está com sistema de troca do item id= 142, após obter na quest Asgard e/ou TP to Hell... ao invés de remover dinheiro do player, o npc remove somente esse item.
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid
if(msgcontains(msg, 'suprema vocaçao') or msgcontains(msg, 'suprema vocaçao')) then
selfSay('Está prestes a evoluir, para {*Vocaçao Suprema*} certo ?', cid)
talkState[talkUser] = 1
elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then
if(getPlayerItemCount(cid, 142) >= 1) then
doPlayerRemoveItem(cid, 142, 1)
doPlayerSetVocation(cid, getPlayerVocation(cid) > 4 and getPlayerVocation(cid) + 4 or getPlayerVocation(cid) + 8)
selfSay('Raramente alguém chega até aqui, seu nível é realmente impressionante. Agora vá e desfrute da sua evolução! {*Asgard Completed*}.', cid)
else
selfSay('Deixa de me enrolar, você não tem capacidade de conquistar o item {*suprem vocation*}.', cid)
end
talkState[talkUser] = 0
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
E em data/npc/Lord of Vocation.xml
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Lord of Vocation" script="data/npc/scripts/vocationsuprema.lua"
walkinterval="2000" floorchange="0">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="133" head="114" body="119" legs="132" feet="114"/>
<parameters>
<parameter key="message_greet" value="Ai está você |PLAYERNAME|. Você realmente quer ir além do seu limite? Se {sim} diga, *{Suprema Vocaçao}*. Se {não} vai embora, e não me perturbe. " />
</parameters>
</npc>
Ou simplesmente o erro, não está dentre esses arquivos, já que tudo ocorre bem, até deslogar...
Obrigado a todos, espero uma solução urgente!
[EDIT]~~