Por Demonder, 07 de jun. de 2009 em Archived
info
Grupo: Campones
Registrado: 20/01/08
Posts: 38
Reputação: 0
Char no Tibia: Demon'der
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())
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~
Grupo: Barão
Registrado: 27/12/06
Posts: 202
Reputação: +1
se eu fosse você, faria todo o npc em lua. faz:
if getPlayerVocation(cid) ~= x thenmensagem de erro sei la
mensagem de erro sei la
info
Grupo: Campones
Registrado: 20/01/08
Posts: 38
Reputação: 0
Char no Tibia: Demon'der
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?
Se alguem souber ai ^^
Vlws
No More~
Xina~