julhinhuu
New Member
- Joined
- Jul 16, 2011
- Messages
- 35
- Reaction score
- 0
As the topic already said , I would like to help me in this script to add more calling this npc .
I wish all vocations buy is magic. Thanks in advance.
I've tried so and does not work:
vocation = 1,2,3,4,
and
vocation = {1,2,3,4},
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
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
-- OTServ event handling functions end
local node1 = keywordHandler:addKeyword({'light healing'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to learn light healing for 170 gp?'})
node1:addChildKeyword({'yes'}, StdModule.learnSpell, {npcHandler = npcHandler, premium = false, spellName = 'light healing', vocation = 2, price = 170, level = 9})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cant you handle the power of the spell?', reset = true})
-- Makes sure the npc reacts when you say hi, bye etc.
npcHandler:addModule(FocusModule:new())
I wish all vocations buy is magic. Thanks in advance.
I've tried so and does not work:
vocation = 1,2,3,4,
and
vocation = {1,2,3,4},