• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Npc is sell 2x items instead of 1x....

nystrom

New Member
Joined
Nov 17, 2009
Messages
269
Reaction score
0
hello when my players wants to sell 1x item the npc takes them bouth and gives back the right ammount.. hmm lets say it like this: you have 2 mastermind shields on you, you are using one in your hand and one is in you bag, you want to sell one becuse you need the money, but you still want to keep the other one that you use for defending your self. but when you says hi, trade and the select mastermind shield and drags the meter down to 1 mastermind shield and presses the sell button, the npc takes bouth of you shields.. i have alsy tried with this i had 2 mastermind shield in my backpack and then i tryed to sell 1 but the npc still took both of you shields, But if i have 3 or more masterminds shields in my backpack and tryes to sell them he only takes 2....

here is my script:
PHP:
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:addSellableItem({'beholder shield'},2518, 1200,'beholder shield')
shopModule:addSellableItem({'guardian shield'},2515, 2000,'guardian shield')
shopModule:addSellableItem({'dragon shield'},2516, 4000,'dragon shield')
shopModule:addSellableItem({'castle shield'},2535, 5000,'castle shield')
shopModule:addSellableItem({'tower shield'},2528, 8000,'tower shield')
shopModule:addSellableItem({'crown shield'},2519, 8000,'crown shield')
shopModule:addSellableItem({'medusa shield'},2536, 9000,'medusa shield')
shopModule:addSellableItem({'phoenix shield'},2539, 16000,'phoenix shield')
shopModule:addSellableItem({'vampire shield'},2534, 15000,'vampire shield')
shopModule:addSellableItem({'demon shield'},2520, 30000,'demon shield')
shopModule:addSellableItem({'mastermind shield'},2514, 45000,'mastermind shield')


shopModule:addSellableItem({'noble armor'},2486, 900,'noble armor')
shopModule:addSellableItem({'hibiscus dress'},8873, 3000,'hibiscus dress')
shopModule:addSellableItem({'knight armor'},2476, 5000,'knight armor')
shopModule:addSellableItem({'focus cape'},8871, 6000,'focus cape')
shopModule:addSellableItem({'mammoth fur cape'},7463, 6000,'mammoth fur cape')
shopModule:addSellableItem({'blue robe'},2656, 10000,'blue robe')
shopModule:addSellableItem({'glacier robe'},7897, 11000,'glacier robe')
shopModule:addSellableItem({'lightning robe'},7898, 11000,'lightning robe')
shopModule:addSellableItem({'magma coat'},7899, 11000,'magma coat')
shopModule:addSellableItem({'terra mantle'},7884, 11000,'terra mantle')
shopModule:addSellableItem({'Spellweavers Robe'},11349, 12000,'Spellweavers Robe')
shopModule:addSellableItem({'crown armor'},2487, 12000,'crown armor')
shopModule:addSellableItem({'zaoan robe'},11350, 12000,'zaoan robe')
shopModule:addSellableItem({'zaoan armor'},11295, 14000,'zaoan armor')
shopModule:addSellableItem({'paladin armor'},8891, 15000,'paladin armor')
shopModule:addSellableItem({'swamplair armor'},8880, 16000,'swamplair armor')
shopModule:addSellableItem({'skullcracker armor'},8889, 18000,'skullcracker armor')
shopModule:addSellableItem({'golden armor'},2466, 20000,'golden armor')
shopModule:addSellableItem({'dragon scale mail'},2492, 40000,'dragon scale mail')
shopModule:addSellableItem({'magic plate armor'},2472, 90000,'magic plate armor')


shopModule:addSellableItem({'knight legs'},2477, 5000,'knight legs')
shopModule:addSellableItem({'crown legs'},2488, 12000,'crown legs')
shopModule:addSellableItem({'glacier kilt'},7896, 11000,'glacier kilt')
shopModule:addSellableItem({'terra legs'},7885, 11000,'terra legs')
shopModule:addSellableItem({'magma legs'},7894, 11000,'magma legs')
shopModule:addSellableItem({'lightning legs'},7895, 11000,'lightning legs')
shopModule:addSellableItem({'zaoan legs'},11298, 14000,'zaoan legs')
shopModule:addSellableItem({'golden legs'},2470, 30000,'golden legs')


shopModule:addSellableItem({'glacier mask'},7902, 2500,'glacier mask')
shopModule:addSellableItem({'magma monocle'},7900, 2500,'magma monocle')
shopModule:addSellableItem({'lightning headband'},7901, 2500,'lightning headband')
shopModule:addSellableItem({'terra hood'},7903, 2500,'terra hood')
shopModule:addSellableItem({'crown helmet'},2491, 2500,'crown helmet')
shopModule:addSellableItem({'devil helmet'},2462, 1000,'devil helmet')
shopModule:addSellableItem({'crusader helmet'},2497, 6000,'crusader helmet')
shopModule:addSellableItem({'warrior helmet'},2475, 5000,'warrior helmet')
shopModule:addSellableItem({'royal helmet'},2498, 30000,'royal helmet')
shopModule:addSellableItem({'skull helmet'},5741, 40000,'skull helmet')
shopModule:addSellableItem({'zaoan helmet'},11296, 45000,'zaoan helmet')


shopModule:addSellableItem({'boots of haste'},2195, 30000,'boots of haste')
shopModule:addSellableItem({'steel boots'},2645, 30000,'steel boots')
shopModule:addSellableItem({'terra boots'},7886, 2500,'terra boots')
shopModule:addSellableItem({'magma boots'},7891, 2500,'magma boots')
shopModule:addSellableItem({'glacier shoes'},7892, 2500,'glacier shoes')
shopModule:addSellableItem({'lightning boots'},7893, 2500,'lightning boots')
shopModule:addSellableItem({'fur boots'},7457, 2500,'fur boots')
shopModule:addSellableItem({'zaoan shoes'},11297, 5000,'zaoan shoes')


shopModule:addSellableItem({'broad sword'},2413, 500,'broad sword')
shopModule:addSellableItem({'serpent sword'},2409, 900,'serpent sword')
shopModule:addSellableItem({'spike sword'},2383, 1000,'spike sword')
shopModule:addSellableItem({'ice rapier'},2396, 1000,'ice rapier')
shopModule:addSellableItem({'fire sword'},2392, 4000,'fire sword')
shopModule:addSellableItem({'epee'},2438, 8000,'epee')
shopModule:addSellableItem({'blacksteel sword'},7857, 6000,'blacksteel sword')
shopModule:addSellableItem({'haunted blade'},7407, 8000,'haunted blade')
shopModule:addSellableItem({'dragon slayer'},7402, 15000,'dragon slayer')
shopModule:addSellableItem({'mercenary sword'},7386, 12000,'mercenary sword')
shopModule:addSellableItem({'thaian sword'},7391, 16000,'thaian sword')
shopModule:addSellableItem({'Sais'},11300, 16500,'Sais')
shopModule:addSellableItem({'giant sword'},2393, 17000,'giant sword')
shopModule:addSellableItem({'relic sword'},7383, 25000,'relic sword')
shopModule:addSellableItem({'assassin dagger'},7404, 30000,'assassin dagger')
shopModule:addSellableItem({'nightmare blade'},7418, 30000,'nightmare blade')
shopModule:addSellableItem({'zaoan sword'},11301, 30000,'zaoan sword')
shopModule:addSellableItem({'twiceslicer'},12574, 28000,'twiceslicer')
shopModule:addSellableItem({'demonrage sword'},7382, 36000,'demonrage sword')


shopModule:addSellableItem({'obsidian lance'},2425, 500,'obsidian lance')
shopModule:addSellableItem({'knight axe'},2430, 2000,'knight axe')
shopModule:addSellableItem({'glorious axe'},7454, 3000,'glorious axe')
shopModule:addSellableItem({'titan axe'},7413, 4000,'titan axe')
shopModule:addSellableItem({'angelic axe'},7436, 5000,'angelic axe')
shopModule:addSellableItem({'fire axe'},2432, 8000,'fire axe')
shopModule:addSellableItem({'dragon lance'},2414, 9000,'dragon lance')
shopModule:addSellableItem({'drakinata'},11299, 10000,'drakinata')
shopModule:addSellableItem({'noble axe'},7456, 11000,'noble axe')
shopModule:addSellableItem({'war axe'},7878, 12000,'war axe')
shopModule:addSellableItem({'dreaded cleaver'},7419, 15000,'dreaded cleaver')
shopModule:addSellableItem({'butcher\'s axe'},7412, 18000,'butcher\'s axe')
shopModule:addSellableItem({'ornamented axe'},7411, 20000,'ornamented axe')
shopModule:addSellableItem({'vile axe'},7388, 30000,'vile axe')


shopModule:addSellableItem({'war hammer'},2391, 1200,'war hammer')
shopModule:addSellableItem({'brutetamers Staff'},7379, 1500,'brutetamer\'s Staff')
shopModule:addSellableItem({'dragon hammer'},2434, 2000,'dragon hammer')
shopModule:addSellableItem({'dragonbone staff'},7430, 3000,'dragonbone staff')
shopModule:addSellableItem({'diamond sceptre'},7387, 3000,'diamond sceptre')
shopModule:addSellableItem({'Spiked Squelcher'},7452, 5000,'Spiked Squelcher')
shopModule:addSellableItem({'lunar staff'},7424, 5000,'lunar staff')
shopModule:addSellableItem({'skull staff'},2436, 6000,'skull staff')
shopModule:addSellableItem({'sapphire hammer'},7437, 7000,'sapphire hammer')
shopModule:addSellableItem({'amber staff'},7426, 8000,'amber staff')
shopModule:addSellableItem({'chaos mace'},7427, 9000,'chaos mace')
shopModule:addSellableItem({'shadow sceptre'},7451, 10000,'shadow sceptre')
shopModule:addSellableItem({'drachaku'},11302, 10000,'drachaku')
shopModule:addSellableItem({'bonebreaker'},7428, 10000,'bonebreaker')
shopModule:addSellableItem({'crystal mace'},2445, 12000,'crystal mace')
shopModule:addSellableItem({'queen\'s sceptre'},7410, 20000,'queen\'s sceptre')
shopModule:addSellableItem({'onyx flail'},7421, 22000,'onyx flail')
shopModule:addSellableItem({'jade hammer'},7422, 25000,'jade hammer')
shopModule:addSellableItem({'hammer of wrath'},2444, 30000,'hammer of wrath')
shopModule:addSellableItem({'abyss hammer'},7414, 50000,'abyss hammer')


shopModule:addSellableItem({'wand of cosmic energy'},2189, 2000,'wand of cosmic energy')
shopModule:addSellableItem({'wand of decay'},2188, 1000,'wand of decay')
shopModule:addSellableItem({'wand of draconia'},8921, 1500,'wand of draconia')
shopModule:addSellableItem({'wand of dragonbreath'},2191, 200,'wand of dragonbreath')
shopModule:addSellableItem({'wand of inferno'},2187, 3000,'wand of inferno')
shopModule:addSellableItem({'wand of starstorm'},8920, 3600,'wand of starstorm')
shopModule:addSellableItem({'wand of voodoo'},8922, 4400,'wand of voodoo')
shopModule:addSellableItem({'wand of vortex'},2190, 100,'wand of vortex')
shopModule:addSellableItem({'hailstorm rod'},2183, 3000,'hailstorm rod')
shopModule:addSellableItem({'moonlight rod'},2186, 200,'moonlight rod')
shopModule:addSellableItem({'necrotic rod'},2185, 1000,'necrotic rod')
shopModule:addSellableItem({'northwind rod'},8911, 1500,'northwind rod')
shopModule:addSellableItem({'snakebite rod'},2182, 100,'snakebite rod')
shopModule:addSellableItem({'springsprout rod'},8912, 3600,'springsprout rod')
shopModule:addSellableItem({'terra rod'},2181, 2000,'terra rod')
shopModule:addSellableItem({'underworld rod'},8910, 4400,'underworld rod')

-------BUYABLE



function creatureSayCallback(cid, type, msg)
    -- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
    if (not npcHandler:isFocused(cid)) then
        return false
    end

        if msgcontains(msg, 'magic sulphur') then
                npcHandler:say('Do you want to change 3 fire swords for magic sulphur?', cid)
                talk_state = 1
        elseif msgcontains(msg, 'yes') and talk_state == 1 then
            if getPlayerItemCount(cid, 2392) >= 3 then
                if doPlayerRemoveMoney(cid, price) == true then
                    npcHandler:say('Here you are.', cid)
                    doPlayerRemoveItem(cid, 2392, 3)
                    doPlayerAddItem(cid, 5904, 1)
                    talk_state = 0
                end
            else
                npcHandler:say('You need to have 3 fire swords with you.', cid)
                talk_state = 0
            end
        elseif msgcontains(msg, 'warrior\'s sweat') then
                npcHandler:say('Do you want to change 4 warrior helmets for warrior\'s sweat?', cid)
                talk_state = 2
        elseif msgcontains(msg, 'yes') and talk_state == 2 then
            if getPlayerItemCount(cid, 2475) >= 4 then
                if doPlayerRemoveMoney(cid, price) == true then
                    npcHandler:say('Here you are.', cid)
                    doPlayerRemoveItem(cid, 2475, 4)
                    doPlayerAddItem(cid, 5885, 1)
                    talk_state = 0
                end
            else
                npcHandler:say('You need to have 4 warrior helmets with you.', cid)
                talk_state = 0
            end
        elseif msgcontains(msg, 'fighting spirit') then
                npcHandler:say('Do you want to change 2 royal helmets for fighting spirit?', cid)
                talk_state = 3
        elseif msgcontains(msg, 'yes') and talk_state == 3 then
            if getPlayerItemCount(cid, 2498) >= 2 then
                if doPlayerRemoveMoney(cid, price) == true then
                    npcHandler:say('Here you are.', cid)
                    doPlayerRemoveItem(cid, 2498, 2)
                    doPlayerAddItem(cid, 5884, 1)
                    talk_state = 0
                end
            else
                npcHandler:say('You need to have 2 royal helmets with you.', cid)
                talk_state = 0
            end
		elseif msgcontains(msg, 'enchanted chicken wing') then
                npcHandler:say('Do you want to change boots of haste for enchanted chicken wing?', cid)
                talk_state = 4
        elseif msgcontains(msg, 'yes') and talk_state == 4 then
            if getPlayerItemCount(cid, 2195) >= 1 then
                if doPlayerRemoveMoney(cid, price) == true then
                    npcHandler:say('Here you are.', cid)
                    doPlayerRemoveItem(cid, 2195, 1)
                    doPlayerAddItem(cid, 5891, 1)
                    talk_state = 0
                end
            else
                npcHandler:say('You need to have boots of haste with you.', cid)
                talk_state = 0
            end
------------------------------------------------ confirm no ------------------------------------------------
        elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 4) then
            npcHandler:say('Ok thanks.', cid)
            talk_state = 0
        end
    -- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
    return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

please why is he taking 2 instead of one? =(
 
This isn't the problem. It's your NPC system located in libs of npc folder.

you mean this one? :P

PHP:
-- Advanced NPC System (Created by Jiddo),
-- Modified by Talaturen.

if(NpcSystem == nil) then
	-- Loads the underlying classes of the npcsystem.
	dofile(getDataDir() .. 'npc/lib/npcsystem/keywordhandler.lua')
	dofile(getDataDir() .. 'npc/lib/npcsystem/queue.lua')
	dofile(getDataDir() .. 'npc/lib/npcsystem/npchandler.lua')
	dofile(getDataDir() .. 'npc/lib/npcsystem/modules.lua')

	-- Global npc constants:

	-- Keyword nestling behavior. For more information look at the top of keywordhandler.lua
	KEYWORD_BEHAVIOR = BEHAVIOR_NORMAL_EXTENDED

	-- Greeting and unGreeting keywords. For more information look at the top of modules.lua
	FOCUS_GREETWORDS = {'hi', 'hello', 'hey'}
	FOCUS_FAREWELLWORDS = {'bye', 'farewell', 'cya'}

	-- The word for requesting trade window. For more information look at the top of modules.lua
	SHOP_TRADEREQUEST = {'offer', 'trade'}

	-- The word for accepting/declining an offer. CAN ONLY CONTAIN ONE FIELD! For more information look at the top of modules.lua
	SHOP_YESWORD = {'yes'}
	SHOP_NOWORD = {'no'}

	-- Pattern used to get the amount of an item a player wants to buy/sell.
	PATTERN_COUNT = '%d+'

	-- Talkdelay behavior. For more information, look at the top of npchandler.lua.
	NPCHANDLER_TALKDELAY = TALKDELAY_ONTHINK

	-- Conversation behavior. For more information, look at the top of npchandler.lua.
	NPCHANDLER_CONVBEHAVIOR = CONVERSATION_PRIVATE

	-- Constant strings defining the keywords to replace in the default messages.
	--	For more information, look at the top of npchandler.lua...
	TAG_PLAYERNAME = '|PLAYERNAME|'
	TAG_ITEMCOUNT = '|ITEMCOUNT|'
	TAG_TOTALCOST = '|TOTALCOST|'
	TAG_ITEMNAME = '|ITEMNAME|'
	TAG_QUEUESIZE = '|QUEUESIZE|'

	NpcSystem = {}

	-- Gets an npcparameter with the specified key. Returns nil if no such parameter is found.
	function NpcSystem.getParameter(key)
		local ret = getNpcParameter(tostring(key))
		if((type(ret) == 'number' and ret == 0) or ret == nil) then
			return nil
		else
			return ret
		end
	end

	-- Parses all known parameters for the npc. Also parses parseable modules.
	function NpcSystem.parseParameters(npcHandler)
		local ret = NpcSystem.getParameter('idletime')
		if(ret ~= nil) then
			npcHandler.idleTime = tonumber(ret)
		end
		local ret = NpcSystem.getParameter('talkradius')
		if(ret ~= nil) then
			npcHandler.talkRadius = tonumber(ret)
		end
		local ret = NpcSystem.getParameter('message_greet')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_GREET, ret)
		end
		local ret = NpcSystem.getParameter('message_farewell')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_FAREWELL, ret)
		end
		local ret = NpcSystem.getParameter('message_decline')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_DECLINE, ret)
		end
		local ret = NpcSystem.getParameter('message_needmorespace')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_NEEDMORESPACE, ret)
		end
		local ret = NpcSystem.getParameter('message_needspace')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_NEEDSPACE, ret)
		end
		local ret = NpcSystem.getParameter('message_sendtrade')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_SENDTRADE, ret)
		end
		local ret = NpcSystem.getParameter('message_noshop')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_NOSHOP, ret)
		end
		local ret = NpcSystem.getParameter('message_oncloseshop')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_ONCLOSESHOP, ret)
		end
		local ret = NpcSystem.getParameter('message_onbuy')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_ONBUY, ret)
		end
		local ret = NpcSystem.getParameter('message_onsell')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_ONSELL, ret)
		end
		local ret = NpcSystem.getParameter('message_missingmoney')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_MISSINGMONEY, ret)
		end
		local ret = NpcSystem.getParameter('message_needmoney')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_NEEDMONEY, ret)
		end
		local ret = NpcSystem.getParameter('message_missingitem')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_MISSINGITEM, ret)
		end
		local ret = NpcSystem.getParameter('message_needitem')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_NEEDITEM, ret)
		end
		local ret = NpcSystem.getParameter('message_idletimeout')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_IDLETIMEOUT, ret)
		end
		local ret = NpcSystem.getParameter('message_walkaway')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_WALKAWAY, ret)
		end
		local ret = NpcSystem.getParameter('message_alreadyfocused')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_ALREADYFOCUSED, ret)
		end
		local ret = NpcSystem.getParameter('message_placedinqueue')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_PLACEDINQUEUE, ret)
		end
		local ret = NpcSystem.getParameter('message_buy')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_BUY, ret)
		end
		local ret = NpcSystem.getParameter('message_sell')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_SELL, ret)
		end
		local ret = NpcSystem.getParameter('message_bought')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_BOUGHT, ret)
		end
		local ret = NpcSystem.getParameter('message_sold')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_SOLD, ret)
		end

		-- Parse modules.
		for parameter, module in pairs(Modules.parseableModules) do
			local ret = NpcSystem.getParameter(parameter)
			if(ret ~= nil) then
				local number = tonumber(ret)
				if(number ~= nil and number ~= 0) then
					npcHandler:addModule(module:new())
				end
			end
		end
	end
end
 
-- Loads the underlying classes of the npcsystem.
dofile(getDataDir() .. 'npc/lib/npcsystem/keywordhandler.lua')
dofile(getDataDir() .. 'npc/lib/npcsystem/queue.lua')
dofile(getDataDir() .. 'npc/lib/npcsystem/npchandler.lua')
dofile(getDataDir() .. 'npc/lib/npcsystem/modules.lua')
Or in those directories. That's all I can tell you.
If i were you, i'd try downloading new libs folders.
 
ah now when i look i see that the item npc is using, defult.lua and a nother system for doing his tradings, maybe i shoud download these libs, where can i find them? :P
 
Bumpibump

Ive tierd to change the libs but the problem presist. Anyone else have this bug or know anything that can help me? :)
 
every NPC has 2 files, .xml file and .lua file
Insert yet content .xml file here

oh yeh sure :)
PHP:
<?xml version="1.0"?>
<npc name="Trades Man" script="data/npc/scripts/sell/djins.lua" walkinterval="2000">

  <health now="200" max="200" />
  <look type="132" head="116" body="0" legs="0" feet="94" addons="3"/>
  <parameters>
        
<parameter key="module_shop" value="1"/>
        <parameter key="shop_buyable" value="" />
        <parameter key="shop_sellable" value="" />
    
</parameters>

</npc>

and the second one:
PHP:
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:addSellableItem({'beholder shield'},2518, 1200,'beholder shield')
shopModule:addSellableItem({'guardian shield'},2515, 2000,'guardian shield')
shopModule:addSellableItem({'dragon shield'},2516, 4000,'dragon shield')
shopModule:addSellableItem({'castle shield'},2535, 5000,'castle shield')
shopModule:addSellableItem({'tower shield'},2528, 8000,'tower shield')
shopModule:addSellableItem({'crown shield'},2519, 8000,'crown shield')
shopModule:addSellableItem({'medusa shield'},2536, 9000,'medusa shield')
shopModule:addSellableItem({'phoenix shield'},2539, 16000,'phoenix shield')
shopModule:addSellableItem({'vampire shield'},2534, 15000,'vampire shield')
shopModule:addSellableItem({'demon shield'},2520, 30000,'demon shield')
shopModule:addSellableItem({'mastermind shield'},2514, 45000,'mastermind shield')


shopModule:addSellableItem({'noble armor'},2486, 900,'noble armor')
shopModule:addSellableItem({'hibiscus dress'},8873, 3000,'hibiscus dress')
shopModule:addSellableItem({'knight armor'},2476, 5000,'knight armor')
shopModule:addSellableItem({'focus cape'},8871, 6000,'focus cape')
shopModule:addSellableItem({'mammoth fur cape'},7463, 6000,'mammoth fur cape')
shopModule:addSellableItem({'blue robe'},2656, 10000,'blue robe')
shopModule:addSellableItem({'glacier robe'},7897, 11000,'glacier robe')
shopModule:addSellableItem({'lightning robe'},7898, 11000,'lightning robe')
shopModule:addSellableItem({'magma coat'},7899, 11000,'magma coat')
shopModule:addSellableItem({'terra mantle'},7884, 11000,'terra mantle')
shopModule:addSellableItem({'Spellweavers Robe'},11349, 12000,'Spellweavers Robe')
shopModule:addSellableItem({'crown armor'},2487, 12000,'crown armor')
shopModule:addSellableItem({'zaoan robe'},11350, 12000,'zaoan robe')
shopModule:addSellableItem({'zaoan armor'},11295, 14000,'zaoan armor')
shopModule:addSellableItem({'paladin armor'},8891, 15000,'paladin armor')
shopModule:addSellableItem({'swamplair armor'},8880, 16000,'swamplair armor')
shopModule:addSellableItem({'skullcracker armor'},8889, 18000,'skullcracker armor')
shopModule:addSellableItem({'golden armor'},2466, 20000,'golden armor')
shopModule:addSellableItem({'dragon scale mail'},2492, 40000,'dragon scale mail')
shopModule:addSellableItem({'magic plate armor'},2472, 90000,'magic plate armor')


shopModule:addSellableItem({'knight legs'},2477, 5000,'knight legs')
shopModule:addSellableItem({'crown legs'},2488, 12000,'crown legs')
shopModule:addSellableItem({'glacier kilt'},7896, 11000,'glacier kilt')
shopModule:addSellableItem({'terra legs'},7885, 11000,'terra legs')
shopModule:addSellableItem({'magma legs'},7894, 11000,'magma legs')
shopModule:addSellableItem({'lightning legs'},7895, 11000,'lightning legs')
shopModule:addSellableItem({'zaoan legs'},11298, 14000,'zaoan legs')
shopModule:addSellableItem({'golden legs'},2470, 30000,'golden legs')


shopModule:addSellableItem({'glacier mask'},7902, 2500,'glacier mask')
shopModule:addSellableItem({'magma monocle'},7900, 2500,'magma monocle')
shopModule:addSellableItem({'lightning headband'},7901, 2500,'lightning headband')
shopModule:addSellableItem({'terra hood'},7903, 2500,'terra hood')
shopModule:addSellableItem({'crown helmet'},2491, 2500,'crown helmet')
shopModule:addSellableItem({'devil helmet'},2462, 1000,'devil helmet')
shopModule:addSellableItem({'crusader helmet'},2497, 6000,'crusader helmet')
shopModule:addSellableItem({'warrior helmet'},2475, 5000,'warrior helmet')
shopModule:addSellableItem({'royal helmet'},2498, 30000,'royal helmet')
shopModule:addSellableItem({'skull helmet'},5741, 40000,'skull helmet')
shopModule:addSellableItem({'zaoan helmet'},11296, 45000,'zaoan helmet')


shopModule:addSellableItem({'boots of haste'},2195, 30000,'boots of haste')
shopModule:addSellableItem({'steel boots'},2645, 30000,'steel boots')
shopModule:addSellableItem({'terra boots'},7886, 2500,'terra boots')
shopModule:addSellableItem({'magma boots'},7891, 2500,'magma boots')
shopModule:addSellableItem({'glacier shoes'},7892, 2500,'glacier shoes')
shopModule:addSellableItem({'lightning boots'},7893, 2500,'lightning boots')
shopModule:addSellableItem({'fur boots'},7457, 2500,'fur boots')
shopModule:addSellableItem({'zaoan shoes'},11297, 5000,'zaoan shoes')


shopModule:addSellableItem({'broad sword'},2413, 500,'broad sword')
shopModule:addSellableItem({'serpent sword'},2409, 900,'serpent sword')
shopModule:addSellableItem({'spike sword'},2383, 1000,'spike sword')
shopModule:addSellableItem({'ice rapier'},2396, 1000,'ice rapier')
shopModule:addSellableItem({'fire sword'},2392, 4000,'fire sword')
shopModule:addSellableItem({'epee'},2438, 8000,'epee')
shopModule:addSellableItem({'blacksteel sword'},7857, 6000,'blacksteel sword')
shopModule:addSellableItem({'haunted blade'},7407, 8000,'haunted blade')
shopModule:addSellableItem({'dragon slayer'},7402, 15000,'dragon slayer')
shopModule:addSellableItem({'mercenary sword'},7386, 12000,'mercenary sword')
shopModule:addSellableItem({'thaian sword'},7391, 16000,'thaian sword')
shopModule:addSellableItem({'Sais'},11300, 16500,'Sais')
shopModule:addSellableItem({'giant sword'},2393, 17000,'giant sword')
shopModule:addSellableItem({'relic sword'},7383, 25000,'relic sword')
shopModule:addSellableItem({'assassin dagger'},7404, 30000,'assassin dagger')
shopModule:addSellableItem({'nightmare blade'},7418, 30000,'nightmare blade')
shopModule:addSellableItem({'zaoan sword'},11301, 30000,'zaoan sword')
shopModule:addSellableItem({'twiceslicer'},12574, 28000,'twiceslicer')
shopModule:addSellableItem({'demonrage sword'},7382, 36000,'demonrage sword')


shopModule:addSellableItem({'obsidian lance'},2425, 500,'obsidian lance')
shopModule:addSellableItem({'knight axe'},2430, 2000,'knight axe')
shopModule:addSellableItem({'glorious axe'},7454, 3000,'glorious axe')
shopModule:addSellableItem({'titan axe'},7413, 4000,'titan axe')
shopModule:addSellableItem({'angelic axe'},7436, 5000,'angelic axe')
shopModule:addSellableItem({'fire axe'},2432, 8000,'fire axe')
shopModule:addSellableItem({'dragon lance'},2414, 9000,'dragon lance')
shopModule:addSellableItem({'drakinata'},11299, 10000,'drakinata')
shopModule:addSellableItem({'noble axe'},7456, 11000,'noble axe')
shopModule:addSellableItem({'war axe'},7878, 12000,'war axe')
shopModule:addSellableItem({'dreaded cleaver'},7419, 15000,'dreaded cleaver')
shopModule:addSellableItem({'butcher\'s axe'},7412, 18000,'butcher\'s axe')
shopModule:addSellableItem({'ornamented axe'},7411, 20000,'ornamented axe')
shopModule:addSellableItem({'vile axe'},7388, 30000,'vile axe')


shopModule:addSellableItem({'war hammer'},2391, 1200,'war hammer')
shopModule:addSellableItem({'brutetamers Staff'},7379, 1500,'brutetamer\'s Staff')
shopModule:addSellableItem({'dragon hammer'},2434, 2000,'dragon hammer')
shopModule:addSellableItem({'dragonbone staff'},7430, 3000,'dragonbone staff')
shopModule:addSellableItem({'diamond sceptre'},7387, 3000,'diamond sceptre')
shopModule:addSellableItem({'Spiked Squelcher'},7452, 5000,'Spiked Squelcher')
shopModule:addSellableItem({'lunar staff'},7424, 5000,'lunar staff')
shopModule:addSellableItem({'skull staff'},2436, 6000,'skull staff')
shopModule:addSellableItem({'sapphire hammer'},7437, 7000,'sapphire hammer')
shopModule:addSellableItem({'amber staff'},7426, 8000,'amber staff')
shopModule:addSellableItem({'chaos mace'},7427, 9000,'chaos mace')
shopModule:addSellableItem({'shadow sceptre'},7451, 10000,'shadow sceptre')
shopModule:addSellableItem({'drachaku'},11302, 10000,'drachaku')
shopModule:addSellableItem({'bonebreaker'},7428, 10000,'bonebreaker')
shopModule:addSellableItem({'crystal mace'},2445, 12000,'crystal mace')
shopModule:addSellableItem({'queen\'s sceptre'},7410, 20000,'queen\'s sceptre')
shopModule:addSellableItem({'onyx flail'},7421, 22000,'onyx flail')
shopModule:addSellableItem({'jade hammer'},7422, 25000,'jade hammer')
shopModule:addSellableItem({'hammer of wrath'},2444, 30000,'hammer of wrath')
shopModule:addSellableItem({'abyss hammer'},7414, 50000,'abyss hammer')


shopModule:addSellableItem({'wand of cosmic energy'},2189, 2000,'wand of cosmic energy')
shopModule:addSellableItem({'wand of decay'},2188, 1000,'wand of decay')
shopModule:addSellableItem({'wand of draconia'},8921, 1500,'wand of draconia')
shopModule:addSellableItem({'wand of dragonbreath'},2191, 200,'wand of dragonbreath')
shopModule:addSellableItem({'wand of inferno'},2187, 3000,'wand of inferno')
shopModule:addSellableItem({'wand of starstorm'},8920, 3600,'wand of starstorm')
shopModule:addSellableItem({'wand of voodoo'},8922, 4400,'wand of voodoo')
shopModule:addSellableItem({'wand of vortex'},2190, 100,'wand of vortex')
shopModule:addSellableItem({'hailstorm rod'},2183, 3000,'hailstorm rod')
shopModule:addSellableItem({'moonlight rod'},2186, 200,'moonlight rod')
shopModule:addSellableItem({'necrotic rod'},2185, 1000,'necrotic rod')
shopModule:addSellableItem({'northwind rod'},8911, 1500,'northwind rod')
shopModule:addSellableItem({'snakebite rod'},2182, 100,'snakebite rod')
shopModule:addSellableItem({'springsprout rod'},8912, 3600,'springsprout rod')
shopModule:addSellableItem({'terra rod'},2181, 2000,'terra rod')
shopModule:addSellableItem({'underworld rod'},8910, 4400,'underworld rod')

npcHandler:addModule(FocusModule:new())

this one took me super long time to write, thats why i relly want it to work :P
 
Back
Top