Ir para conteúdo

Posts Recomendados

Quando eu falo com o npc e viro second promote tudo da certo, mais quando eu deslogo e log novamente eu apareço assim: 11:44 You see yourself. You are .

O que eu faço?

 

Minhas vocations estão assim:

 

<?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="1300" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no" droploot="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="12" gainhpamount="25" gainmanaticks="2" gainmanaamount="50" manamultiplier="1.1" attackspeed="1300" 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="12" gainhpamount="25" gainmanaticks="2" gainmanaamount="50" manamultiplier="1.1" attackspeed="1300" 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="8" gainhpamount="25" gainmanaticks="3" gainmanaamount="50" manamultiplier="1.4" attackspeed="1300" 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="6" gainhpamount="25" gainmanaticks="3" gainmanaamount="50" manamultiplier="3.0" attackspeed="1300" 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="5" name="Master Sorcerer" description="a master sorcerer" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="12" gainhpamount="50" gainmanaticks="2" gainmanaamount="100" manamultiplier="1.1" attackspeed="800" soulmax="200" gainsoulticks="15" 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="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="12" gainhpamount="50" gainmanaticks="2" gainmanaamount="100" manamultiplier="1.1" attackspeed="800" soulmax="200" gainsoulticks="15" 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="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="6" gainhpamount="50" gainmanaticks="3" gainmanaamount="100" manamultiplier="1.4" attackspeed="800" soulmax="200" gainsoulticks="15" 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="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="4" gainhpamount="50" gainmanaticks="3" gainmanaamount="100" manamultiplier="3.0" attackspeed="800" 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="9" name="Well Wizard" description="an hell wizard" needpremium="2" gaincap="10" gainhp="5" gainmana="30" gainhpticks="12" gainhpamount="100" gainmanaticks="1" gainmanaamount="200" manamultiplier="1.1" attackspeed="800" soulmax="200" gainsoulticks="15" fromvoc="9" 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="2" gaincap="10" gainhp="5" gainmana="30" gainhpticks="12" gainhpamount="100" gainmanaticks="1" gainmanaamount="200" manamultiplier="1.1" attackspeed="800" soulmax="200" gainsoulticks="15" fromvoc="10" 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="2" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="150" gainmanaticks="2" gainmanaamount="200" manamultiplier="1.4" attackspeed="800" soulmax="200" gainsoulticks="15" fromvoc="11" 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="2" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="200" gainmanaticks="6" gainmanaamount="100" manamultiplier="3.0" attackspeed="800" soulmax="200" gainsoulticks="15" fromvoc="12" 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>

 

Meu Npc:

 

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

<npc name="Lanza" script="vip promote.lua" walkinterval="2000" floorchange="0">

<health now="100" max="100"/>

<look type="133" head="114" body="119" legs="132" feet="114"/>

</npc>

 

Meu Script do NPc:

 

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

 

 

local a = {

[5] = {new_voc = 9,need_level = true,level = 60,cobrar = true,price = 100000,need_premium = true},

[6] = {new_voc = 10,need_level = true,level = 60,cobrar = true,price = 100000,need_premium = true},

[7] = {new_voc = 11,need_level = true,level = 60,cobrar = true,price = 100000,need_premium = true},

[8] = {new_voc = 12,need_level = true,level = 60,cobrar = true,price = 100000,need_premium = true}

}

local b = a[getPlayerVocation(cid)]

if(msgcontains(msg, 'vip promotion') or msgcontains(msg, 'vip promote')) then

if(not b) then

selfSay('Você não tem a second promote, então não poderá ser promovido!.', cid)

talkState[talkUser] = 0

else

selfSay('Deseja virar ' .. getVocationInfo(b.new_voc).name .. ' por '..b.price..' gold coins? {yes}', cid)

talkState[talkUser] = 1

end

elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then

if b.need_premium == true and not isPremium(cid) then

selfSay('Você precisa ser Premium para ser promovido!.', cid)

talkState[talkUser] = 0

elseif b.need_level == true and getPlayerLevel(cid) < b.level then

selfSay('Você deve ter pelo menos level '.. b.level ..' para ser promovido!.', cid)

talkState[talkUser] = 0

elseif b.cobrar == true and doPlayerRemoveMoney(cid, b.price) == TRUE then

doPlayerSetVocation(cid,b.new_voc)

selfSay('Você foi promovido com sucesso.', cid)

talkState[talkUser] = 0

else

selfSay('Você não tem '..b.price..' gold coins Suficientes.', cid)

doSendMagicEffect(getPlayerPosition(cid), 2)

end

end

return TRUE

end

 

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

npcHandler:addModule(FocusModule:new())

 

Meu Lib:

 

function isSorcerer(cid)

return isInArray({1,5,9}, getPlayerVocation(cid))

end

function isDruid(cid)

return isInArray({2,6,10}, getPlayerVocation(cid))

end

function isPaladin(cid)

return isInArray({3,7,11}, getPlayerVocation(cid))

end

function isKnight(cid)

return isInArray({4,8,12}, getPlayerVocation(cid))

end

function isRookie(cid)

return isInArray({0}, getPlayerVocation(cid))

end

 

O que está errado??? Por favor alguem me ajuda, já segui todos os tutoriais do xtibia e não da certo nunca. Meu ot é 9.10. Obrigado desde já

Link para o comentário
https://xtibia.com/forum/topic/175169-bug-na-segunda-promo%C3%A7%C3%A3o/
Compartilhar em outros sites

×
×
  • Criar Novo...