Hi,
I'm having a slight problem with a NPC I just scripted (with help of the default TFS NPC's). I have added alot of items that can be bought/sold to it's script, but the NPC only responds when I say hi/bye for some reason. I believe it's because of my .lua script, since there's not much in there tho. I'm not that familiar with .lua scripts, so if anyone could help me out a bit...
This is my .lua script (I took the same .lua script as one of the default TFS NPC's tho):
I'm having a slight problem with a NPC I just scripted (with help of the default TFS NPC's). I have added alot of items that can be bought/sold to it's script, but the NPC only responds when I say hi/bye for some reason. I believe it's because of my .lua script, since there's not much in there tho. I'm not that familiar with .lua scripts, so if anyone could help me out a bit...
This is my .lua script (I took the same .lua script as one of the default TFS NPC's tho):
Code:
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
npcHandler:addModule(FocusModule:new())