Ir para conteúdo

[Encerrado] Promotion - Não Está Pegando


Posts Recomendados

Bem gente... esse é o meu primeiro tópico aqui, sou bem novo no xtibia então se caso eu fazer algo de errado ou postar na area errada me alertem por favor :(

 

Bom vou ser bem rápido e claro

 

Eu mudei o nome das minhas vocations, tá até ai tudo bem, mas quando vou comprar promotion continua no nome da primeira vocation, e não da segunda

 

<npc name="Karlos" script="data/npc/scripts/itens.lua" access="5" lookdir="1">

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

<look type="160" head="0" body="86" legs="0" feet="38" addons="1"/>

<parameters>

<parameter key="message_greet" value="Ola |PLAYERNAME|. Eu Vendo os novos itens da versao 8.6, Deseja ver algum ? Diga [TRADE]."/>

<parameter key="message_decline" value="E |TOTALCOST| gold coins muito para você , me de linceça que eu tenho que vender mais!"/>

</parameters>

</npc>

------------------------------

<?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="1" 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="Wizard" description="a Wizard" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="50" gainmanaticks="3" gainmanaamount="70" manamultiplier="1.1" attackspeed="500" 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="Priest" description="a priest" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="50" gainmanaticks="3" gainmanaamount="70" manamultiplier="1.1" attackspeed="500" 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="Archer" description="a archer" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="65" gainmanaticks="4" gainmanaamount="60" manamultiplier="1.4" attackspeed="500" 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="Guardian" description="a guardian" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="80" gainmanaticks="6" gainmanaamount="40" manamultiplier="3.0" attackspeed="500" 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="Powerful Wizard" description="a powerful Wizard" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="100" gainmanaticks="2" gainmanaamount="150" manamultiplier="1.1" attackspeed="500" 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="Divine" description="an divine" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="100" gainmanaticks="2" gainmanaamount="150" manamultiplier="1.1" attackspeed="500" 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="Sniper" description="a sniper" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="150" gainmanaticks="3" gainmanaamount="130" manamultiplier="1.4" attackspeed="500" 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="Horseman" description="an horseman" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="170" gainmanaticks="4" gainmanaamount="80" manamultiplier="3.0" attackspeed="500" 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="Dark Mage" description="an dark mage" 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="Cleric" description="an cleric" 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="Striker" description="an Striker" 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="Heavy Tanker" description="an heavy tanker" 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>

------------------------

 

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

 

local shopModule = ShopModule:new()

npcHandler:addModule(shopModule)

 

shopModule:addBuyableItem({'Leaf Legs'}, 9928, 20000, 'Leaf Legs')

shopModule:addBuyableItem({'Draken Boots'}), 12607, 20000, 'Draken Boots')

shopModule:addBuyableItem({'Coconut Shoes'}), 9931, 20000, 'Coconut Shoes')

shopModule:addBuyableItem({'Twiceslicer'}), 12574, 20000, 'Twiceslicer')

shopModule:addBuyableItem({'Drakinata'}), 11299, 20000, 'Drakinata')

shopModule:addBuyableItem({'Blade of Corruption'}), 12610, 20000, 'Blade of Corruption')

shopModule:addBuyableItem({'Sais'}), 11300, 20000, 'Sais')

shopModule:addBuyableItem({'Drachaku'}), 11302, 20000, 'Drachaku')

shopModule:addBuyableItem({'Elite Draken Helmet'}), 12606, 20000, 'Elite Draken Helmet')

shopModule:addBuyableItem({'Mighty Helm of Green Sparks'}), 10316, 20000, 'Mighty Helm of Green Sparks')

shopModule:addBuyableItem({'Elite Draken Mail'}), 12568, 20000, 'Elite Draken Mail')

shopModule:addBuyableItem({'Royal Draken Mail'}), 12603, 20000, 'Royal Draken Mail')

 

local items = {[1] = 12603, [2] = 12606, [5] = 12610, [6] = 12603}

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, 'first rod') or msgcontains(msg, 'first wand')) then

if(isSorcerer(cid) or isDruid(cid)) then

if(getPlayerStorageValue(cid, 30002) <= 0) then

selfSay('So you ask me for a {' .. getItemNameById(items[getPlayerVocation(cid)]) .. '} to begin your advanture?', cid)

talkState[talkUser] = 1

else

selfSay('What? I have already gave you one {' .. getItemNameById(items[getPlayerVocation(cid)]) .. '}!', cid)

end

else

selfSay('Sorry, you aren\'t a druid either a sorcerer.', cid)

end

elseif(msgcontains(msg, 'yes')) then

if(talkState[talkUser] == 1) then

doPlayerAddItem(cid, items[getPlayerVocation(cid)], 1)

selfSay('Here you are young adept, take care yourself.', cid)

setPlayerStorageValue(cid, 30002, 1)

end

talkState[talkUser] = 0

elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser])) then

selfSay('Ok then.', cid)

talkState[talkUser] = 0

end

 

return true

end

 

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

npcHandler:addModule(FocusModule:new())

 

 

 

A versão é 8.6

 

xaau

Link para o comentário
Compartilhar em outros sites

  • 6 years later...
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.
Link para o comentário
Compartilhar em outros sites

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