DE

[pedido De Ajuda] Npc Que Fala Com X Vocação.

Por Demonder, 07 de jun. de 2009 em Archived

2
564
DemonderD
07 de junho de 2009 às 15:27

Ae galera, to precizando de 1 ajuda aki.

 

To com uma duvida e queria que alguem me ajudade se possivel.

 

Nesse NPC, como eu faço pra que ele fale só com X vocação?

Tipo, pra ele fala só com a vocação Sorcerer por exemplo?

 

local keywordHandler = KeywordHandler:new()

local npcHandler = NpcHandler:new(keywordHandler)

NpcSystem.parseParameters(npcHandler)

 

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({'wand of starstorm'}, 8920, 67, 'wand of starstorm')

shopModule:addBuyableItem({'shadown amulet'}, 7890, 25, 'shadown amulet')

shopModule:addBuyableItem({'yalahari mask'}, 9778, 62, 'yalahari mask')

shopModule:addBuyableItem({'spellbook of dark mysteries'}, 8918, 50, 'spellbook of dark mysteries')

shopModule:addBuyableItem({'robe of the underworld'}, 8890, 67, 'robe of the underworld')

shopModule:addBuyableItem({'soft boots'}, 2640, 70, 'soft boots')

shopModule:addBuyableItem({'time ring'}, 2169, 8, 'time ring')

shopModule:addBuyableItem({'energy ring'}, 2167, 6, 'energy ring')

shopModule:addBuyableItem({'death ring'}, 6300, 32, 'death ring')

 

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

npcHandler:addModule(FocusModule:new())

 

Se alguem souber ai ^^

 

Vlws

 

No More~

Xina~

13 de junho de 2009 às 17:35

se eu fosse você, faria todo o npc em lua. faz:

if getPlayerVocation(cid) ~= x then

mensagem de erro sei la