Ghost Creations
Active Member
I am trying to make an NPC that sells Sets of Equipment, does anyone know anything about that.
I kinda put a NPC script together, but it doesn't work, anyway here it is, maybe somone can fix it and have a post for others.
I kinda put a NPC script together, but it doesn't work, anyway here it is, maybe somone can fix it and have a post for others.
LUA:
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({'Leather'}, 2461,2467,2649,2643,3974, 45000, 'Leather')
shopModule:addBuyableItem({'Amazon'}, 2499,2500, 20000, 'Amazon')
shopModule:addBuyableItem({'Brass'}, 2460,2465,2478,2511, 50000, 'Brass')
shopModule:addBuyableItem({'Chain'}, 2458,2464,2648, 120000, 'Chain')
shopModule:addBuyableItem({'Crown'}, 2491,2487,2488,2519,10522, 200000, 'Crown')
shopModule:addBuyableItem({'Dark'}, 2490,2489,11304,11303, 200000, 'Dark')
shopModule:addBuyableItem({'Demon'}, 2493,2494,2495,9933,2520,10518, 200000, 'Demon')
shopModule:addBuyableItem({'Dragon Scale'}, 2506,2492,2469,11118,2522, 500000, 'Dragon Scale')
shopModule:addBuyableItem({'Dwarven'}, 2497,2503,2504,11240,2523, 800000, 'Dwarven')
shopModule:addBuyableItem({'Elven'}, 3971,12642,2507,3982,8857,10219, 120000, 'Elven')
shopModule:addBuyableItem({'Glacier'}, 7902,7897,7896,7892,7888,10220,8907, 450000, 'Glacier')
shopModule:addBuyableItem({'Golden'}, 2471,2466,2470,2646,2510,2004,1997, 1000000, 'Golden')
shopModule:addBuyableItem({'Lightning'}, 7901,7898,7895,7893,7889,10221,8908, 290000, 'Lightning')
shopModule:addBuyableItem({'Magma'}, 7900,7899,7894,7891,7890,10218,8906, 310000, 'Magma')
shopModule:addBuyableItem({'Pirate'}, 6096,6095,5918,5462,5926,5927, 190000, 'Plate')
shopModule:addBuyableItem({'Plate'}, 2457,2463,2647,2645,2509, 190000, 'Plate')
shopModule:addBuyableItem({'Terra'}, 7903,7884,7885,7886,7887,8909, 310000, 'Terra')
shopModule:addBuyableItem({'Yalahari'}, 9778,9776,9777,9774,9775, 190000, 'Yalahari')
npcHandler:addModule(FocusModule:new())