ziggy46802
Active Member
- Joined
- Aug 19, 2012
- Messages
- 418
- Reaction score
- 27
Im getting the error
attempt to index a boolean value
In these 3 files
helmets.lua
swords.lua
and food.lua
Will give rep++ to whoever helps me figure this out.
attempt to index a boolean value
In these 3 files
helmets.lua
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 shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
-------------------For sale-------------------
--1
shopModule:addBuyableItem({'bandana'}, 5917, 600,'bandana')
shopModule:addBuyableItem({'mystic turban'}, 2663, 600,'mystic turban')
shopModule:addBuyableItem({'leather helmet'}, 2461, 12,'leather helmet')
--2
shopModule:addBuyableItem({'helmet of the deep'}, 5461, 10000,'helmet of the deep')
shopModule:addBuyableItem({'feather headdress'}, 3970, 3400,'feather headdress')
shopModule:addBuyableItem({'charmers tiara'}, 3971, 3600,'charmers tiara')
shopModule:addBuyableItem({'chain helmet'}, 2458, 52,'chain helmet')
shopModule:addBuyableItem({'studded helmet'}, 2482, 63,'studded helmet')
shopModule:addBuyableItem({'sedge hat'}, 12656, 500,'sedge hat')
shopModule:addBuyableItem({'tribal mask'}, 3967, 1000,'tribal mask')
--3
shopModule:addBuyableItem({'hat of the mad'}, 2323, 10000,'hat of the mad')
shopModule:addBuyableItem({'brass helmet'}, 2460, 120,'brass helmet')
shopModule:addBuyableItem({'batwing hat'}, 10016, 32000,'batwing hat')
shopModule:addBuyableItem({'cobra crown'}, 12630, 500000,'cobra crown')
shopModule:addBuyableItem({'pirate hat'}, 6096, 4000,'pirate hat')
shopModule:addBuyableItem({'mage hat'}, 8820, 150,'mage hat')
shopModule:addBuyableItem({'witch hat'}, 10570, 20000,'witch hat')
shopModule:addBuyableItem({'pirate hat'}, 6096, 4000,'pirate hat')
shopModule:addBuyableItem({'cobra crown'}, 12630, 500000,'cobra crown')
--4
shopModule:addBuyableItem({'jade hat'}, 11368, 36000,'jade hat')
shopModule:addBuyableItem({'legion helmet'}, 2480, 88,'legion helmet')
shopModule:addBuyableItem({'viking helmet'}, 2473, 265,'viking helmet')
--5
shopModule:addBuyableItem({'iron helmet'}, 2459, 390,'iron helmet')
shopModule:addBuyableItem({'terra hood'}, 7903, 10000,'terra hood')
shopModule:addBuyableItem({'magma monocle'}, 7900, 10000,'magma monocle')
shopModule:addBuyableItem({'glacier mask'}, 7902, 10000,'glacier mask')
shopModule:addBuyableItem({'soldier helmet'}, 2481, 110,'soldier helmet')
shopModule:addBuyableItem({'yalahari mask'}, 9778, 240000,'yalahari mask')
--6
shopModule:addBuyableItem({'horseman helmet'}, 3969, 1200,'horseman helmet')
shopModule:addBuyableItem({'dwarven helmet'}, 2502, 200000,'dwarven helmet')
shopModule:addBuyableItem({'dark helmet'}, 2490, 1000,'dark helmet')
shopModule:addBuyableItem({'krimhorn helmet'}, 7461, 800,'krimhorn helmet')
shopModule:addBuyableItem({'strange helmet'}, 2479, 2000,'strange helmet')
shopModule:addBuyableItem({'steel helmet'}, 2457, 580,'steel helmet')
shopModule:addBuyableItem({'ragnir helmet'}, 7462, 1600,'ragnir helmet')
--7
shopModule:addBuyableItem({'beholder helmet'}, 3972, 30000,'beholder helmet')
shopModule:addBuyableItem({'devil helmet'}, 2462, 4000,'devil helmet')
shopModule:addBuyableItem({'crown helmet'}, 2491, 10000,'crown helmet')
--8
shopModule:addBuyableItem({'crusader helmet'}, 2497, 24000,'crusader helmet')
shopModule:addBuyableItem({'warrior helmet'}, 2475, 20000,'warrior helmet')
--9
shopModule:addBuyableItem({'elite draken helmet'}, 12645, 800000,'elite draken helmet')
shopModule:addBuyableItem({'dragon scale helmet'}, 2506, 350000,'dragon scale helmet')
shopModule:addBuyableItem({'ceremonial mask'}, 2501, 250000,'ceremonial mask')
shopModule:addBuyableItem({'skull helmet'}, 5741, 160000,'skull helmet')
shopModule:addBuyableItem({'royal helmet'}, 2498, 120000,'royal helmet')
shopModule:addBuyableItem({'zaoan helmet'}, 11302, 400000,'zaoan helmet')
--10
shopModule:addBuyableItem({'demon helmet'}, 2493, 200000,'demon helmet')
shopModule:addBuyableItem({'winged helmet'}, 2474, 2500000,'winged helmet')
--11
shopModule:addBuyableItem({'horned helmet'}, 2496, 3000000,'horned helmet')
--12
shopModule:addBuyableItem({'golden helmet'}, 2471, 10000000,'golden helmet')
-------------------Sell to him-------------------
--1
shopModule:addSellableItem({'bandana'}, 5917, 150,'bandana')
shopModule:addSellableItem({'mystic turban'}, 2663, 150,'mystic turban')
shopModule:addSellableItem({'leather helmet'}, 2461, 4,'leather helmet')
--2
shopModule:addSellableItem({'helmet of the deep'}, 5461, 1000,'helmet of the deep')
shopModule:addSellableItem({'feather headdress'}, 3970, 850,'feather headdress')
shopModule:addSellableItem({'charmers tiara'}, 3971, 900,'charmers tiara')
shopModule:addSellableItem({'chain helmet'}, 2458, 17,'chain helmet')
shopModule:addSellableItem({'studded helmet'}, 2482, 20,'studded helmet')
shopModule:addSellableItem({'sedge hat'}, 12656, 125,'sedge hat')
shopModule:addSellableItem({'tribal mask'}, 3967, 250,'tribal mask')
--3
shopModule:addSellableItem({'hat of the mad'}, 2323, 2500,'hat of the mad')
shopModule:addSellableItem({'brass helmet'}, 2460, 30,'brass helmet')
shopModule:addSellableItem({'batwing hat'}, 10016, 8000,'batwing hat')
shopModule:addSellableItem({'cobra crown'}, 12630, 50000,'cobra crown')
shopModule:addSellableItem({'pirate hat'}, 6096, 1000,'pirate hat')
shopModule:addSellableItem({'mage hat'}, 8820, 50,'mage hat')
shopModule:addSellableItem({'witch hat'}, 10570, 5000,'witch hat')
shopModule:addSellableItem({'pirate hat'}, 6096, 1000,'pirate hat')
shopModule:addSellableItem({'cobra crown'}, 12630, 50000,'cobra crown')
--4
shopModule:addSellableItem({'jade hat'}, 11368, 9000,'jade hat')
shopModule:addSellableItem({'legion helmet'}, 2480, 22,'legion helmet')
shopModule:addSellableItem({'viking helmet'}, 2473, 66,'viking helmet')
--5
shopModule:addSellableItem({'iron helmet'}, 2459, 150,'iron helmet')
shopModule:addSellableItem({'terra hood'}, 7903, 2500,'terra hood')
shopModule:addSellableItem({'magma monocle'}, 7900, 2500,'magma monocle')
shopModule:addSellableItem({'glacier mask'}, 7902, 2500,'glacier mask')
shopModule:addSellableItem({'soldier helmet'}, 2481, 16,'soldier helmet')
shopModule:addSellableItem({'yalahari mask'}, 9778, 60000,'yalahari mask')
--6
shopModule:addSellableItem({'horseman helmet'}, 3969, 280,'horseman helmet')
shopModule:addSellableItem({'dwarven helmet'}, 2502, 50000,'dwarven helmet')
shopModule:addSellableItem({'dark helmet'}, 2490, 250,'dark helmet')
shopModule:addSellableItem({'krimhorn helmet'}, 7461, 200,'krimhorn helmet')
shopModule:addSellableItem({'strange helmet'}, 2479, 500,'strange helmet')
shopModule:addSellableItem({'steel helmet'}, 2457, 293,'steel helmet')
shopModule:addSellableItem({'ragnir helmet'}, 7462, 400,'ragnir helmet')
--7
shopModule:addSellableItem({'beholder helmet'}, 3972, 7500,'beholder helmet')
shopModule:addSellableItem({'amazon helmet'}, 2499, 20000,'amazon helmet')
shopModule:addSellableItem({'devil helmet'}, 2462, 1000,'devil helmet')
shopModule:addSellableItem({'crown helmet'}, 2491, 2500,'crown helmet')
--8
shopModule:addSellableItem({'crusader helmet'}, 2497, 6000,'crusader helmet')
shopModule:addSellableItem({'warrior helmet'}, 2475, 5000,'warrior helmet')
--9
shopModule:addSellableItem({'elite draken helmet'}, 12645, 200000,'elite draken helmet')
shopModule:addSellableItem({'dragon scale helmet'}, 2506, 87500,'dragon scale helmet')
shopModule:addSellableItem({'ceremonial mask'}, 2501, 62500,'ceremonial mask')
shopModule:addSellableItem({'skull helmet'}, 5741, 40000,'skull helmet')
shopModule:addSellableItem({'royal helmet'}, 2498, 30000,'royal helmet')
shopModule:addSellableItem({'zaoan helmet'}, 11302, 100000,'zaoan helmet')
--10
shopModule:addSellableItem({'demon helmet'}, 2493, 40000,'demon helmet')
shopModule:addSellableItem({'winged helmet'}, 2474, 625000,'winged helmet')
--11
shopModule:addSellableItem({'horned helmet'}, 2496, 75000,'horned helmet')
--12
shopModule:addSellableItem({'golden helmet'}, 2471, 250000,'golden helmet')
npcHandler:addModule(FocusModule:new())
swords.lua
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
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
-------------------For sale-------------------
--no level req
shopModule:addBuyableItem({'bone sword'}, 2450, 75,'bone sword')
shopModule:addBuyableItem({'broad sword'}, 2413, 2000, 'broad sword')
shopModule:addBuyableItem({'carlin sword'}, 2395, 473,'carlin sword')
shopModule:addBuyableItem({'combat knife'}, 2404, 20,'combat knife')
shopModule:addBuyableItem({'dagger'}, 2379, 5,'dagger')
shopModule:addBuyableItem({'spike sword'}, 2383, 8000,'spike sword')
shopModule:addBuyableItem({'earth spike sword'}, 7854, 10000, 'earth spike sword')
shopModule:addBuyableItem({'energy spike sword'}, 7869, 10000, 'energy spike sword')
shopModule:addBuyableItem({'fiery spike sword'}, 7744, 10000, 'fiery spike sword')
shopModule:addBuyableItem({'icy spike sword'}, 7763, 10000, 'icy spike sword')
shopModule:addBuyableItem({'heavy machete'}, 2442, 400, 'heavy machete')
shopModule:addBuyableItem({'ice rapier'}, 2396, 5000,'ice rapier')
shopModule:addBuyableItem({'jagged sword'}, 8602, 150,'jagged sword')
shopModule:addBuyableItem({'katana'}, 2412, 100, 'katana')
shopModule:addBuyableItem({'knife'}, 2403, 10, 'knife')
shopModule:addBuyableItem({'longsword'}, 2397, 160,'longsword')
shopModule:addBuyableItem({'machete'}, 2420, 35,'machete')
shopModule:addBuyableItem({'poison dagger'}, 2411, 200, 'poison dagger')
shopModule:addBuyableItem({'rapier'}, 2384, 15,'rapier')
shopModule:addBuyableItem({'sabre'}, 2385, 25,'sabre')
shopModule:addBuyableItem({'scimitar'}, 2419, 600, 'scimitar')
shopModule:addBuyableItem({'serpent sword'}, 2409, 6000,'serpent sword')
shopModule:addBuyableItem({'short sword'}, 2406, 30,'short sword')
shopModule:addBuyableItem({'silver dagger'}, 2402, 4000, 'silver dagger')
shopModule:addBuyableItem({'sword'}, 2376, 85,'sword')
shopModule:addBuyableItem({'templar scytheblade'}, 3963, 800, 'templar scytheblade')
--lvl 20
shopModule:addBuyableItem({'crimson sword'}, 7385, 12000, 'crimson sword')
shopModule:addBuyableItem({'two handed sword'}, 2377, 950,'two handed sword')
shopModule:addBuyableItem({'twin hooks'}, 11309, 1100,'twin hooks')
--lvl 25
shopModule:addBuyableItem({'crystal sword'}, 7449, 2400, 'crystal sword')
shopModule:addBuyableItem({'wyvern fang'}, 7408, 6000, 'wyvern fang')
--lvl 30
shopModule:addBuyableItem({'haunted blade'}, 7407, 32000, 'haunted blade')
shopModule:addBuyableItem({'fire sword'}, 2392, 16000, 'fire sword')
shopModule:addBuyableItem({'epee'}, 2438, 32000, 'epee')
shopModule:addBuyableItem({'bright sword'}, 2407, 24000, 'bright sword')
--lvl 35
shopModule:addBuyableItem({'blacksteel sword'}, 7406, 24000, 'blacksteel sword')
shopModule:addBuyableItem({'fiery blacksteel sword'}, 7747, 30000, 'fiery blacksteel sword')
shopModule:addBuyableItem({'icy blacksteel sword'}, 7766, 30000, 'icy blacksteel sword')
shopModule:addBuyableItem({'energy blacksteel sword'}, 7872, 30000, 'energy blacksteel sword')
shopModule:addBuyableItem({'earth blacksteel sword'}, 7857, 30000, 'earth blacksteel sword')
shopModule:addBuyableItem({'djinn blade'}, 2451, 60000, 'djinn blade')
--lvl 40
shopModule:addBuyableItem({'assassin dagger'}, 7404, 80000, 'assassin dagger')
shopModule:addBuyableItem({'mercenary sword'}, 7386, 48000, 'mercenary sword')
--lvl 45
shopModule:addBuyableItem({'dragon slayer'}, 7402, 60000, 'dragon slayer')
shopModule:addBuyableItem({'pharaoh sword'}, 2446, 100000, 'pharaoh sword')
--lvl 50
shopModule:addBuyableItem({'relic sword'}, 7383, 100000, 'relic sword')
shopModule:addBuyableItem({'fiery relic sword'}, 7745, 120000, 'fiery relic sword')
shopModule:addBuyableItem({'icy relic sword'}, 7764, 120000, 'icy relic sword')
shopModule:addBuyableItem({'energy relic sword'}, 7870, 120000, 'energy relic sword')
shopModule:addBuyableItem({'earth relic sword'}, 7855, 120000, 'earth relic sword')
shopModule:addBuyableItem({'thaian sword'}, 7391, 64000, 'thaian sword')
shopModule:addBuyableItem({'sais'}, 11306, 66000, 'sais')
--lvl 55
shopModule:addBuyableItem({'giant sword'}, 2393, 68000, 'giant sword')
shopModule:addBuyableItem({'bloody edge'}, 7416, 120000, 'bloody edge')
shopModule:addBuyableItem({'zaoan sword'}, 11307, 120000, 'zaoan sword')
--lvl 58
shopModule:addBuyableItem({'twiceslicer'}, 12613, 112000, 'twiceslicer')
--lvl 60
shopModule:addBuyableItem({'mystic blade'}, 7384, 120000, 'mystic blade')
shopModule:addBuyableItem({'icy mystic blade'}, 7765, 125000, 'icy mystic blade')
shopModule:addBuyableItem({'fiery mystic blade'}, 7746, 125000, 'fiery mystic blade')
shopModule:addBuyableItem({'energy mystic blade'}, 7871, 125000, 'energy mystic blade')
shopModule:addBuyableItem({'earth mystic blade'}, 7856, 125000, 'earth mystic blade')
shopModule:addBuyableItem({'demonrage sword'}, 7382, 144000, 'demonrage sword')
--lvl 65
shopModule:addBuyableItem({'berserker'}, 7403, 160000, 'berserker')
shopModule:addBuyableItem({'runed sword'}, 7417, 180000, 'runed sword')
--lvl 70
shopModule:addBuyableItem({'nightmare blade'}, 7418, 140000, 'nightmare blade')
--lvl 75
shopModule:addBuyableItem({'the justice seeker'}, 7405, 160000, 'the justice seeker')
--lvl 80
shopModule:addBuyableItem({'magic sword'}, 2400, 1000000, 'magic sword')
--lvl 82
shopModule:addBuyableItem({'blade of corruption'}, 12649, 240000, 'blade of corruption')
--lvl 100
shopModule:addBuyableItem({'emerald sword'}, 8930, 2800000, 'emerald sword')
shopModule:addBuyableItem({'the calamity'}, 8932, 3000000, 'the calamity')
--lvl 120
shopModule:addBuyableItem({'warlord sword'}, 2408, 4000000, 'warlord sword')
--lvl 140
shopModule:addBuyableItem({'magic long sword'}, 2390, 5000000, 'magic long sword')
-------------------Sell to him-------------------
--no level req
shopModule:addSellableItem({'bone sword'}, 2450, 20,'bone sword')
shopModule:addSellableItem({'broad sword'}, 2413, 500, 'broad sword')
shopModule:addSellableItem({'carlin sword'}, 2395, 118,'carlin sword')
shopModule:addSellableItem({'combat knife'}, 2404, 5,'combat knife')
shopModule:addSellableItem({'dagger'}, 2379, 2,'dagger')
shopModule:addSellableItem({'spike sword'}, 2383, 1000,'spike sword')
shopModule:addSellableItem({'earth spike sword'}, 7854, 1000, 'earth spike sword')
shopModule:addSellableItem({'energy spike sword'}, 7869, 1000, 'energy spike sword')
shopModule:addSellableItem({'fiery spike sword'}, 7744, 1000, 'fiery spike sword')
shopModule:addSellableItem({'icy spike sword'}, 7763, 1000, 'icy spike sword')
shopModule:addSellableItem({'heavy machete'}, 2442, 90, 'heavy machete')
shopModule:addSellableItem({'ice rapier'}, 2396, 1000,'ice rapier')
shopModule:addSellableItem({'jagged sword'}, 8602, 50,'jagged sword')
shopModule:addSellableItem({'katana'}, 2412, 35, 'katana')
shopModule:addSellableItem({'knife'}, 2403, 1, 'knife')
shopModule:addSellableItem({'longsword'}, 2397, 51,'longsword')
shopModule:addSellableItem({'machete'}, 2420, 6,'machete')
shopModule:addSellableItem({'poison dagger'}, 2411, 50, 'poison dagger')
shopModule:addSellableItem({'rapier'}, 2384, 5,'rapier')
shopModule:addSellableItem({'sabre'}, 2385, 12,'sabre')
shopModule:addSellableItem({'scimitar'}, 2419, 150, 'scimitar')
shopModule:addSellableItem({'serpent sword'}, 2409, 900,'serpent sword')
shopModule:addSellableItem({'short sword'}, 2406, 10,'short sword')
shopModule:addSellableItem({'silver dagger'}, 2402, 500, 'silver dagger')
shopModule:addSellableItem({'sword'}, 2376, 25,'sword')
shopModule:addSellableItem({'templar scytheblade'}, 3963, 200, 'templar scytheblade')
--lvl 20
shopModule:addSellableItem({'crimson sword'}, 7385, 610, 'crimson sword')
shopModule:addSellableItem({'two handed sword'}, 2377, 450,'two handed sword')
shopModule:addSellableItem({'twin hooks'}, 11309, 500,'twin hooks')
--lvl 25
shopModule:addSellableItem({'crystal sword'}, 7449, 600, 'crystal sword')
shopModule:addSellableItem({'wyvern fang'}, 7408, 1500, 'wyvern fang')
--lvl 30
shopModule:addSellableItem({'haunted blade'}, 7407, 8000, 'haunted blade')
shopModule:addSellableItem({'fire sword'}, 2392, 4000, 'fire sword')
shopModule:addSellableItem({'epee'}, 2438, 8000, 'epee')
shopModule:addSellableItem({'bright sword'}, 2407, 6000, 'bright sword')
--lvl 35
shopModule:addSellableItem({'blacksteel sword'}, 7406, 6000, 'blacksteel sword')
shopModule:addSellableItem({'fiery blacksteel sword'}, 7747, 6000, 'fiery blacksteel sword')
shopModule:addSellableItem({'icy blacksteel sword'}, 7766, 6000, 'icy blacksteel sword')
shopModule:addSellableItem({'energy blacksteel sword'}, 7872, 6000, 'energy blacksteel sword')
shopModule:addSellableItem({'earth blacksteel sword'}, 7857, 6000, 'earth blacksteel sword')
shopModule:addSellableItem({'djinn blade'}, 2451, 15000, 'djinn blade')
--lvl 40
shopModule:addSellableItem({'assassin dagger'}, 7404, 20000, 'assassin dagger')
shopModule:addSellableItem({'mercenary sword'}, 7386, 12000, 'mercenary sword')
--lvl 45
shopModule:addSellableItem({'dragon slayer'}, 7402, 15000, 'dragon slayer')
shopModule:addSellableItem({'pharaoh sword'}, 2446, 23000, 'pharaoh sword')
--lvl 50
shopModule:addSellableItem({'relic sword'}, 7383, 30000, 'relic sword')
shopModule:addSellableItem({'fiery relic sword'}, 7745, 30000, 'fiery relic sword')
shopModule:addSellableItem({'icy relic sword'}, 7764, 30000, 'icy relic sword')
shopModule:addSellableItem({'energy relic sword'}, 7870, 30000, 'energy relic sword')
shopModule:addSellableItem({'earth relic sword'}, 7855, 30000, 'earth relic sword')
shopModule:addSellableItem({'thaian sword'}, 7391, 16000, 'thaian sword')
shopModule:addSellableItem({'sais'}, 11306, 16500, 'sais')
--lvl 55
shopModule:addSellableItem({'giant sword'}, 2393, 17000, 'giant sword')
shopModule:addSellableItem({'bloody edge'}, 7416, 30000, 'bloody edge')
shopModule:addSellableItem({'zaoan sword'}, 11307, 30000, 'zaoan sword')
--lvl 58
shopModule:addSellableItem({'twiceslicer'}, 12613, 28000, 'twiceslicer')
--lvl 60
shopModule:addSellableItem({'mystic blade'}, 7384, 120000, 'mystic blade')
shopModule:addSellableItem({'icy mystic blade'}, 7765, 30000, 'icy mystic blade')
shopModule:addSellableItem({'fiery mystic blade'}, 7746, 30000, 'fiery mystic blade')
shopModule:addSellableItem({'energy mystic blade'}, 7871, 30000, 'energy mystic blade')
shopModule:addSellableItem({'earth mystic blade'}, 7856, 30000, 'earth mystic blade')
shopModule:addSellableItem({'demonrage sword'}, 7382, 36000, 'demonrage sword')
--lvl 65
shopModule:addSellableItem({'berserker'}, 7403, 40000, 'berserker')
shopModule:addSellableItem({'runed sword'}, 7417, 45000, 'runed sword')
--lvl 70
shopModule:addSellableItem({'nightmare blade'}, 7418, 35000, 'nightmare blade')
--lvl 75
shopModule:addSellableItem({'the justice seeker'}, 7405, 40000, 'the justice seeker')
--lvl 80
shopModule:addSellableItem({'magic sword'}, 2400, 250000, 'magic sword')
--lvl 82
shopModule:addSellableItem({'blade of corruption'}, 12649, 60000, 'blade of corruption')
--lvl 100
shopModule:addSellableItem({'emerald sword'}, 8930, 700000, 'emerald sword')
shopModule:addSellableItem({'the calamity'}, 8932, 750000, 'the calamity')
--lvl 120
shopModule:addSellableItem({'warlord sword'}, 2408, 1000000, 'warlord sword')
--lvl 140
shopModule:addSellableItem({'magic long sword'}, 2390, 1250000, 'magic long sword')
npcHandler:addModule(FocusModule:new())
and food.lua
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
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
-------------------------he sells to you----------------------------
shopModule:addBuyableItem({'meat'}, 2666, 5,'meat')
shopModule:addBuyableItem({'fish'}, 2667, 5,'fish')
shopModule:addBuyableItem({'salmon'}, 2668, 6,'salmon')
shopModule:addBuyableItem({'ham'}, 2671, 8,'ham')
shopModule:addBuyableItem({'dragon ham'}, 2671, 25,'dragon ham')
shopModule:addBuyableItem({'pear'}, 2673, 5,'pear')
shopModule:addBuyableItem({'red apple'}, 2674, 3,'red apple')
shopModule:addBuyableItem({'orange'}, 2675, 10,'orange')
shopModule:addBuyableItem({'banana'}, 2676, 5,'banana')
shopModule:addBuyableItem({'blueberry'}, 2677, 1,'blueberry')
shopModule:addBuyableItem({'cherry'}, 2678, 1,'cherry')
shopModule:addBuyableItem({'strawberry'}, 2680, 2,'strawberry')
shopModule:addBuyableItem({'grapes'}, 2681, 3,'grapes')
shopModule:addBuyableItem({'melon'}, 2682, 8,'melon')
shopModule:addBuyableItem({'pumpkin'}, 2683, 10,'pumpkin')
shopModule:addBuyableItem({'carrot'}, 2684, 3,'carrot')
shopModule:addBuyableItem({'tomato'}, 2685, 5,'tomato')
shopModule:addBuyableItem({'corncob'}, 2686, 3,'corncob')
shopModule:addBuyableItem({'cookie'}, 2687, 100,'cookie')
shopModule:addBuyableItem({'bread'}, 2689, 4,'bread')
shopModule:addBuyableItem({'roll'}, 2690, 2,'roll')
shopModule:addBuyableItem({'brown bread'}, 2691, 3,'brown bread')
shopModule:addBuyableItem({'egg'}, 2695, 2,'egg')
shopModule:addBuyableItem({'cheese'}, 2696, 6,'cheese')
shopModule:addBuyableItem({'white mushroom'}, 2787, 6,'white mushroom')
shopModule:addBuyableItem({'red mushroom'}, 2788, 12,'red mushroom')
shopModule:addBuyableItem({'brown mushroom'}, 2789, 10,'brown mushroom')
shopModule:addBuyableItem({'mango'}, 5097, 10,'mango')
shopModule:addBuyableItem({'cake'}, 6278, 50,'cake')
shopModule:addBuyableItem({'party cake'}, 6280, 50,'party cake')
shopModule:addBuyableItem({'valentine/s cake'}, 6393, 100,'valentine/s cake')
shopModule:addBuyableItem({'potato'}, 8838, 4,'potato')
shopModule:addBuyableItem({'plum'}, 8839, 3,'plum')
shopModule:addBuyableItem({'raspberry'}, 8840, 1,'raspberry')
shopModule:addBuyableItem({'lemon'}, 8841, 3,'lemon')
shopModule:addBuyableItem({'cucumber'}, 8842, 3,'cucumber')
shopModule:addBuyableItem({'onion'}, 8843, 2,'onion')
shopModule:addBuyableItem({'jalapeno pepper'}, 8844, 2,'jalapeno pepper')
shopModule:addBuyableItem({'beetroot'}, 8845, 2,'beetroot')
shopModule:addBuyableItem({'cauliflower'}, 12418, 4,'cauliflower')
shopModule:addBuyableItem({'broccoli'}, 12417, 3,'broccoli')
shopModule:addBuyableItem({'pineapple'}, 12415, 12,'pineapple')
shopModule:addBuyableItem({'bulb of garlic'}, 9114, 3,'bulb of garlic')
shopModule:addBuyableItem({'beetroot'}, 8845, 2,'beetroot')
shopModule:addBuyableItem({'aubergine'}, 12416, 8,'aubergine')
shopModule:addBuyableItem({'lemon'}, 8841, 3,'lemon')
shopModule:addBuyableItem({'dragonfruit'}, 12638, 5,'dragonfruit')
-------------------------------he buys from you---------------------------
shopModule:addSellableItem({'meat'}, 2666, 2,'meat')
shopModule:addSellableItem({'salmon'}, 2668, 2,'salmon')
shopModule:addSellableItem({'ham'}, 2671, 4,'ham')
shopModule:addSellableItem({'blueberry'}, 2677,'blueberry')
shopModule:addSellableItem({'cherry'}, 2678, 1,'cherry')
shopModule:addSellableItem({'carrot'}, 2684, 1,'carrot')
shopModule:addSellableItem({'cookie'}, 2687, 1,'cookie')
shopModule:addSellableItem({'bread'}, 2689, 2,'bread')
shopModule:addSellableItem({'egg'}, 2695, 1,'egg')
shopModule:addSellableItem({'green perch'}, 7159, 100,'green perch')
shopModule:addSellableItem({'northern pike'}, 2669, 100,'northern pike')
shopModule:addSellableItem({'rainbow trout'}, 7158, 100,'rainbow trout')
shopModule:addSellableItem({'marlin'}, 7963, 800,'marlin')
shopModule:addSellableItem({'ectoplasmic sushi'}, 12637, 300,'ectoplasmic sushi')
shopModule:addSellableItem({'wood mushroom'}, 2791, 15,'wood mushroom')
shopModule:addSellableItem({'walnut'}, 7909, 80,'walnut')
shopModule:addSellableItem({'green mushroom'}, 2796, 100,'green mushroom')
shopModule:addSellableItem({'dark mushroom'}, 2792, 100,'dark mushroom')
shopModule:addSellableItem({'orange mushroom'}, 2790, 150,'orange mushroom')
shopModule:addSellableItem({'fire mushroom'}, 2795, 200,'fire mushroom')
npcHandler:addModule(FocusModule:new())
Will give rep++ to whoever helps me figure this out.