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
-- Start shop
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
---------SWORDS
shopModule:addSellableItem({'sabre'}, 2385, 12)
shopModule:addSellableItem({'katana'}, 2412, 35)
shopModule:addSellableItem({'poison dagger'}, 2411, 50)
shopModule:addSellableItem({'longsword'}, 2397, 51)
shopModule:addSellableItem({'heavy machete'}, 2486, 90)
shopModule:addSellableItem({'scimitar'}, 2419, 150)
shopModule:addSellableItem({'two handed sword'}, 2377, 450)
shopModule:addSellableItem({'broad sword'}, 2413, 500)
shopModule:addSellableItem({'silver dagger'}, 2402, 500)
shopModule:addSellableItem({'crystal sword'}, 7449, 600)
shopModule:addSellableItem({'serpent sword'}, 2409, 900)
shopModule:addSellableItem({'spike sword'}, 2383, 1000)
shopModule:addSellableItem({'ice rapier'}, 2396, 1000)
shopModule:addSellableItem({'wyvern fang'}, 7408, 1500)
shopModule:addSellableItem({'fire sword'}, 2392, 4000)
shopModule:addSellableItem({'epee'}, 2438, 8000)
shopModule:addSellableItem({'Assassin Dagger'}, 7404, 10000)
shopModule:addSellableItem({'dragon slayer'}, 7402, 15000)
shopModule:addSellableItem({'giant sword'}, 2393, 17000)
shopModule:addSellableItem({'Nightmare Blade'}, 7418, 35000)
shopModule:addSellableItem({'demonrage sword'}, 7382, 36000)
shopModule:addSellableItem({'Berserker'}, 7403, 40000)
----
shopModule:addSellableItem({'bright sword'}, 2407, 280)
shopModule:addSellableItem({'sword of valor'}, 2400, 350000)
shopModule:addSellableItem({'warlord sword'}, 2408, 360)
shopModule:addSellableItem({'magic longsword'}, 2390, 460)
----
shopModule:addSellableItem({'pharaoh sword '}, 2446, 870000)
shopModule:addSellableItem({'avenger'}, 6528, 100000)
----CLUBS
shopModule:addSellableItem({'staff'}, 2401, 1)
shopModule:addSellableItem({'mace'}, 2398, 30)
shopModule:addSellableItem({'battle hammer'}, 2417, 120)
shopModule:addSellableItem({'morning star'}, 2394, 100)
shopModule:addSellableItem({'daramanian mace'}, 2439, 110)
shopModule:addSellableItem({'clerical mace'}, 2423, 170)
shopModule:addSellableItem({'mammoth whopper'}, 7381, 300)
shopModule:addSellableItem({'taurus mace'}, 7425, 500)
shopModule:addSellableItem({'furry club'}, 7432, 1000)
shopModule:addSellableItem({'war hammer'}, 2391, 1200)
shopModule:addSellableItem({'brutetamers staff'}, 7379, 1500)
shopModule:addSellableItem({'dragon hammer'}, 2434, 2000)
shopModule:addSellableItem({'diamond sceptre'}, 7387, 3000)
shopModule:addSellableItem({'dragonbone staff'}, 7430, 3000)
shopModule:addSellableItem({'lunar staff'}, 7424, 5000)
shopModule:addSellableItem({'skull staff'}, 2436, 6000)
shopModule:addSellableItem({'sapphire hammer'}, 7437, 7000)
shopModule:addSellableItem({'amber staff'}, 7426, 8000)
shopModule:addSellableItem({'Chaos Mace'}, 7427, 9000)
shopModule:addSellableItem({'Abyss Hammer'}, 7414, 20000)
shopModule:addSellableItem({'hammer of wrath'}, 2444, 30000)
shopModule:addSellableItem({'heavy mace'}, 2452, 50000)
----
shopModule:addSellableItem({'thunder hammer'}, 2421, 450000)
----
shopModule:addSellableItem({'crystal mace'}, 2445, 350000)
shopModule:addSellableItem({'arcane staff'}, 2453, 450000)
------AXE
shopModule:addSellableItem({'axe'}, 2386, 7)
shopModule:addSellableItem({'hatchet'}, 2388, 25)
shopModule:addSellableItem({'battle axe'}, 2378, 80)
shopModule:addSellableItem({'double axe'}, 2387, 260)
shopModule:addSellableItem({'barbarian axe'}, 2429, 185)
shopModule:addSellableItem({'orcish axe'}, 2428, 350)
shopModule:addSellableItem({'halberd'}, 2381, 400)
shopModule:addSellableItem({'obsidian lance'}, 2425, 500)
shopModule:addSellableItem({'daramanian waraxe'}, 2440, 1000)
shopModule:addSellableItem({'beastslayer axe'}, 3962, 1500)
shopModule:addSellableItem({'knight axe'}, 2430, 2000)
shopModule:addSellableItem({'Titan axe'}, 7413, 4000)
shopModule:addSellableItem({'fire axe'}, 2432, 8000)
shopModule:addSellableItem({'dragon lance'}, 2414, 9000)
shopModule:addSellableItem({'Guardian Halberd'}, 2427, 11000)
shopModule:addSellableItem({'war axe'}, 2454, 12000)
shopModule:addSellableItem({'Ornamented axe'}, 7411, 20000)
----
shopModule:addSellableItem({'great axe'}, 2415, 300)
shopModule:addSellableItem({'stonecutter axe',}, 2431, 320000)
----
shopModule:addSellableItem({'twin axe'}, 2447, 20000)
-------HELMETS
shopModule:addSellableItem({'soldier helmet'}, 2481, 16)
shopModule:addSellableItem({'chain helmet'}, 2458, 17)
shopModule:addSellableItem({'legion helmet'}, 2480, 22)
shopModule:addSellableItem({'brass helmet'}, 2460, 30)
shopModule:addSellableItem({'viking helmet'}, 2473, 66)
shopModule:addSellableItem({'iron helmet'}, 2459, 150)
shopModule:addSellableItem({'mystic turban'}, 2663, 150)
shopModule:addSellableItem({'krimhorn helmet'}, 7461, 200)
shopModule:addSellableItem({'dark helmet'}, 2490, 250)
shopModule:addSellableItem({'steel helmet'}, 2457, 293)
shopModule:addSellableItem({'ragnir helmet'}, 7462, 400)
shopModule:addSellableItem({'strange helmet'}, 2479, 500)
shopModule:addSellableItem({'crown helmet'}, 2491, 2500)
shopModule:addSellableItem({'warrior helmet'}, 2475, 5000)
shopModule:addSellableItem({'crusader helmet'}, 2497, 6000)
shopModule:addSellableItem({'beholder helmet'}, 3972, 7500)
shopModule:addSellableItem({'royal helmet'}, 2498, 30000)
shopModule:addSellableItem({'skull helmet'}, 5741, 40000)
----
shopModule:addSellableItem({'demon helmet'}, 2493, 95000)
shopModule:addSellableItem({'horned helmet'}, 2496, 155)
shopModule:addSellableItem({'winged helmet'}, 2474, 320)
----
shopModule:addSellableItem({'amazon helmet'}, 2499, 20000)
shopModule:addSellableItem({'dragon scale helmet'}, 2506, 35000)
shopModule:addSellableItem({'ceremonial mask'}, 2501, 110000)
shopModule:addSellableItem({'helmet of the ancients'}, 2342, 100000)
shopModule:addSellableItem({'full elmet of the ancients'}, 2343, 350000)
-----ARMOR
shopModule:addSellableItem({'studded armor'}, 2484, 25)
shopModule:addSellableItem({'chain armor'}, 2464, 70)
shopModule:addSellableItem({'scale armor'}, 2483, 75)
shopModule:addSellableItem({'brass armor'}, 2465, 150)
shopModule:addSellableItem({'dark armor'}, 2489, 400)
shopModule:addSellableItem({'plate armor'}, 2463, 400)
shopModule:addSellableItem({'noble armor'}, 2486, 900)
shopModule:addSellableItem({'leopard armor'}, 3968, 1000)
shopModule:addSellableItem({'hibiscus dress'}, 8873, 3000)
shopModule:addSellableItem({'knight armor'}, 2476, 5000)
shopModule:addSellableItem({'mammoth fur cape'}, 7463, 6000)
shopModule:addSellableItem({'blue robe'}, 2656, 10000)
shopModule:addSellableItem({'crown armor'}, 2487, 12000)
shopModule:addSellableItem({'skullcracker armor'}, 8889, 18000)
shopModule:addSellableItem({'dragon scale mail'}, 2492, 40000)
-----
shopModule:addSellableItem({'demon armor'}, 2494, 195000)
shopModule:addSellableItem({'magic plate armor'}, 2472, 80000)
----
shopModule:addSellableItem({'amazon armor'}, 2500, 40000)
shopModule:addSellableItem({'elven mail'}, 2505, 100000)
-----LEGS
shopModule:addSellableItem({'studded legs'}, 2468, 15)
shopModule:addSellableItem({'chain legs'}, 2648, 25)
shopModule:addSellableItem({'brass legs'}, 2478, 49)
shopModule:addSellableItem({'plate legs'}, 2647, 115)
shopModule:addSellableItem({'knight legs'}, 2477, 5000)
shopModule:addSellableItem({'crown legs'}, 2488, 12000)
----
shopModule:addSellableItem({'demon legs'}, 2495, 84)
shopModule:addSellableItem({'dragon scale legs'}, 2496, 180)
---
shopModule:addSellableItem({'elven legs'}, 2507, 100000)
---BOOTS
shopModule:addSellableItem({'leather boots'}, 2643, 2)
shopModule:addSellableItem({'fur boots'}, 7457, 2000)
shopModule:addSellableItem({'boots of haste'}, 2195, 30000)
shopModule:addSellableItem({'steel boots'}, 2645, 30000)
shopModule:addSellableItem({'soft boots'}, 6132, 500000)
---SHIELDS
shopModule:addSellableItem({'brass shield'}, 2511, 25)
shopModule:addSellableItem({'plate shield'}, 2510, 45)
shopModule:addSellableItem({'copper shield'}, 2530, 50)
shopModule:addSellableItem({'steel shield'}, 2509, 80)
shopModule:addSellableItem({'bone shield'}, 2541, 80)
shopModule:addSellableItem({'battle shield'}, 2513, 95)
shopModule:addSellableItem({'dwarven shield'}, 2525, 100)
shopModule:addSellableItem({'tortoise shield'}, 6131, 150)
shopModule:addSellableItem({'dark shield'}, 2521, 400)
shopModule:addSellableItem({'black shield'}, 2529, 800)
shopModule:addSellableItem({'ancient shield'}, 2532, 900)
shopModule:addSellableItem({'beholder shield'}, 2518, 1200)
shopModule:addSellableItem({'scarab shield'}, 2540, 2000)
shopModule:addSellableItem({'guardian shield'}, 2515, 3000)
shopModule:addSellableItem({'dragon shield'}, 2516, 4000)
shopModule:addSellableItem({'castle shield'}, 2535, 5000)
shopModule:addSellableItem({'tower shield'}, 2528, 8000)
shopModule:addSellableItem({'crown shield'}, 2519, 8000)
shopModule:addSellableItem({'medusa shield'}, 2536, 9000)
shopModule:addSellableItem({'vampire shield'}, 2534, 15000)
shopModule:addSellableItem({'phoenix shield'}, 2539, 16000)
shopModule:addSellableItem({'demon shield'}, 2520, 30000)
----
shopModule:addSellableItem({'great shield'}, 2505, 480)
shopModule:addSellableItem({'mastermind shield'}, 2514, 65000)
shopModule:addSellableItem({'blessed shield'}, 2494, 650)
----
shopModule:addSellableItem({'amazon shield'}, 2500, 50000)
shopModule:addSellableItem({'ruby necklace'}, 2133, 30000, 'ruby necklace')
shopModule:addSellableItem({'ring of the sky'}, 2123, 50000, 'ring of the sky')
-- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions!... only average loot is listed here
keywordHandler:addKeyword({'clubs'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy dragon hammers(2k), skull staffs(6k), dragonbone staffs(3k) and daramanian maces(110gp). I also buy amber staffs(8k), sapphire hammers(2k), brutetamers staff(1.5k), furry clubs(1k), taurus maces(500gp), lunar staffs(5k), mammoth whoppers(300gp) and diamond sceptres(3k).'})
keywordHandler:addKeyword({'axes'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy knight axes(2k), dragon lances(9k), fire axes (8k), war axes(9k) and daramanian waraxes (1k). I also buy beastslayer axe(1.5k).'})
keywordHandler:addKeyword({'swords'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy giant swords (17k), fire sword (4k), ice rapiers(1k), dragon slayers(15k), wyvern fang(1.5k), silver dagger(500gp) and heavy machetes(90gp).'})
keywordHandler:addKeyword({'armors'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy blue robes(100k), knight armors(5k). I also buy mammoth fur capes(6k), leopard armors(1k).'})
keywordHandler:addKeyword({'legs'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy knight legs(5k).'})
keywordHandler:addKeyword({'shields'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy phoenix shields(16k), dragon shields(4k), ancient shields(900gp), black shields, tower shields(8k), vampire shields(15k), medusa shields(9k), castle shields(5k), scarab shields(2k), dark shields(400gp), tortoise shields(150gp) and bone shields(80gp).'})
keywordHandler:addKeyword({'helmets'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy royal(30k), crusader(6k), warrior(5k), skull(40k), beholder(7.5k), devil(1k), ragnir(400gp) and krimhorn(200gp). I also buy mystic turbans(100k).'})
-- Makes sure the npc reacts when you say hi, bye etc.
npcHandler:addModule(FocusModule:new())