Hello! (Using Avesta SQL 7.6 engine)
When buying SSA from this NPC, he only give you 1x SSA... Why?
shopModule:addBuyableItem({'buy stone skin amulet'}, 2197, 5000, 5, 'stone skin amulet')
Anyone?
When buying SSA from this NPC, he only give you 1x SSA... Why?
shopModule:addBuyableItem({'buy stone skin amulet'}, 2197, 5000, 5, 'stone skin amulet')
Anyone?
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)
-- ITEMS HE BUYS! --
-- Rings: --
shopModule:addSellableItem({'sell sword ring'}, 2207, 100, 'sword ring')
shopModule:addSellableItem({'sell club ring'}, 2209, 100, 'club ring')
shopModule:addSellableItem({'sell axe ring'}, 2208, 100, 'axe ring')
shopModule:addSellableItem({'sell power ring'}, 2166, 50, 'power ring')
shopModule:addSellableItem({'sell stealth ring'}, 2165, 200, 'stealth ring')
-- Amulets: --
shopModule:addSellableItem({'sell stone skin amulet'}, 2197, 500, 'stone skin amulet')
shopModule:addSellableItem({'sell elven amulet'}, 2198, 100, 'elven amulet')
shopModule:addSellableItem({'sell bronze amulet'}, 2172, 50, 'bronze amulet')
shopModule:addSellableItem({'sell garlic necklace'}, 2199, 50, 'garlic necklace')
-- Wands: --
shopModule:addSellableItem({'magic light wand', 'magic lightwand'}, 2162, 35, 'magic lightwand')
shopModule:addSellableItem({'wand of vortex'}, 2190, 100, 'wand of vortex')
shopModule:addSellableItem({'wand of dragonbreath'}, 2191, 200, 'wand of dragonbreath')
shopModule:addSellableItem({'wand of plague'}, 2188, 1000, 'wand of plague')
shopModule:addSellableItem({'wand of cosmic energy'}, 2189, 2000, 'wand of cosmic energy')
shopModule:addSellableItem({'wand of inferno'}, 2187, 3000, 'wand of inferno')
-- Special Items: --
shopModule:addSellableItem({'orb'}, 2176, 750, 'Orb')
shopModule:addSellableItem({'mind stone'}, 2178, 100, 'mind stone')
shopModule:addSellableItem({'life crystal'}, 2177, 50, 'life crystal')
-- ITEMS HE SELLS! --
shopModule:addBuyableItem({'buy sword ring'}, 2207, 500, 'sword ring')
shopModule:addBuyableItem({'buy club ring'}, 2209, 500, 'club ring')
shopModule:addBuyableItem({'buy axe ring'}, 2208, 500, 'axe ring')
shopModule:addBuyableItem({'buy power ring'}, 2166, 100, 'power ring')
shopModule:addBuyableItem({'buy stealth ring'}, 2165, 5000, 'stealth ring')
-- Amulets: --
shopModule:addBuyableItem({'buy elven amulet'}, 2198, 500, 50, 'elven amulet')
shopModule:addBuyableItem({'buy bronze amulet'}, 2172, 100, 200, 'bronze amulet')
shopModule:addBuyableItem({'buy garlic necklace'}, 2199, 100, 150, 'garlic necklace')
shopModule:addBuyableItem({'buy stone skin amulet'}, 2197, 5000, 5, 'stone skin amulet')
npcHandler:addModule(FocusModule:new())