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({'bow'}, 2456, 400, 'bow')
shopModule:addBuyableItem({'arrow'}, 2544, 2, 'arrow')
shopModule:addBuyableItem({'crossbow'}, 2455, 500, 'crossbow')
shopModule:addBuyableItem({'bolt'}, 2543, 3, 'bolt')
shopModule:addBuyableItem({'spear'}, 2389, 10, 'spear')
shopModule:addSellableItem({'spear'}, 2389, 3, 'spear')
npcHandler:setMessage(MESSAGE_GREET, "Hello |PLAYERNAME|, welcome to shop! I sell ammunitions and distances.")
npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye |PLAYERNAME|, please come back soon.")
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())