• 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 Sell's 2 x Item

Teddy

SweStream.se
Joined
Oct 2, 2008
Messages
3,797
Reaction score
10
Location
Sweden 172
If i buy 1 item from this npc i get 2 and it take 2 x the money ..
Code:
<?xml version="1.0"?>
<npc name="Lost Boy" script="data/npc/scripts/addonitemseller.lua"  walkinterval="2000" floorchange="0" access="5" level="1" maglevel="1">
	<health now="150" max="150"/>
	<look type="104" head="20" body="30" legs="40" feet="50" corpse="6033"/>
	<parameters>
		<parameter key="module_shop" value="1" />
		<parameter key="message_greet" value="Hello |PLAYERNAME|.I will sell all addon items. Say {trade} to see my whole offer" />
	</parameters>
</npc>
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}

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({'ape fur'}, 5883, 120, 'ape fur')
shopModule:addBuyableItem({'bat wing'}, 5894, 100, 'bat wing')
shopModule:addBuyableItem({'bear paw'}, 5896, 100, 'bear paw')
shopModule:addBuyableItem({'behemoth claw'}, 5930, 2000, 'behemoth claw')
shopModule:addBuyableItem({'beholder eye'}, 5898, 150, 'beholder eye')
shopModule:addBuyableItem({'chicen feather'}, 5890, 100, 'chicen feather')
shopModule:addBuyableItem({'cockroach leg'}, 8710, 500, 'cockroach leg')
shopModule:addBuyableItem({'demon dust'}, 5906, 400, 'demon dust')
shopModule:addBuyableItem({'demon horn'}, 5954, 2500, 'demon horn')
shopModule:addBuyableItem({'dracola\'s eye'}, 6546, 80000, 'dracola\'s eye')
shopModule:addBuyableItem({'dragon claw'}, 5919, 50000, 'dragon claw')
shopModule:addBuyableItem({'dwarven beard'}, 5900, 25000, 'dwarven beard')
shopModule:addBuyableItem({'fish fin'}, 5895, 3500, 'fish fin')
shopModule:addBuyableItem({'gland'}, 8971, 2000, 'gland')
shopModule:addBuyableItem({'glob of acid slime'}, 9967, 200, 'glob of acid slime')
shopModule:addBuyableItem({'glob of mercury'}, 9966, 200, 'glob of mercury')
shopModule:addBuyableItem({'glob of tar'}, 9968, 200, 'glob of tar')
shopModule:addBuyableItem({'green dragon leather'}, 5877, 200, 'green dragon leather')
shopModule:addBuyableItem({'green dragon scale'}, 5920, 500, 'green dragon scale')
shopModule:addBuyableItem({'hardened bone'}, 5925, 300, 'hardened bone')
shopModule:addBuyableItem({'honeycomb'}, 5902, 40, 'honeycomb')
shopModule:addBuyableItem({'hydra egg'}, 4850, 200, 'hydra egg')
shopModule:addBuyableItem({'lizard leather'}, 5876, 200, 'lizard leather')
shopModule:addBuyableItem({'lizard scale'}, 5881, 500, 'lizard scale')
shopModule:addBuyableItem({'minotaur leather'}, 5878, 150, 'minotaur leather')
shopModule:addBuyableItem({'morgaroth\'s heart'}, 5943, 700000, 'morgaroth\'s heart')
shopModule:addBuyableItem({'orshabaal\'s brain'}, 5808, 500000, 'orshabaal\'s brain')
shopModule:addBuyableItem({'perfect behemoth fang'}, 5893, 5000, 'perfect behemoth fang')
shopModule:addBuyableItem({'red dragon leather'}, 5948, 500, 'red dragon leather')
shopModule:addBuyableItem({'red dragon scale'}, 5882, 1000, 'red dragon scale')
shopModule:addBuyableItem({'shard'}, 7290, 300, 'shard')
shopModule:addBuyableItem({'giant spider silk'}, 5879, 7000, 'giant spider silk')
shopModule:addBuyableItem({'plasmother remains'}, 6535, 30000, 'plasmother remains')
shopModule:addBuyableItem({'turtle shell'}, 5899, 200, 'turtle shell')
shopModule:addBuyableItem({'tusk'}, 8614, 150, 'tusk')
shopModule:addBuyableItem({'vampire dust'}, 5905, 2000, 'vampire dust')
shopModule:addBuyableItem({'wolf paw'}, 5897, 100, 'wolf paw')
shopModule:addBuyableItem({'blue piece of cloth'}, 5912, 300, 'blue piece of cloth')
shopModule:addBuyableItem({'red piece of cloth'}, 5911, 300, 'red piece of cloth')
shopModule:addBuyableItem({'yellow piece of cloth'}, 5914, 300, 'yellow piece of cloth')
shopModule:addBuyableItem({'green piece of cloth'}, 5910, 300, 'green piece of cloth')
shopModule:addBuyableItem({'brown piece of cloth'}, 5913, 150, 'brown piece of cloth')
shopModule:addBuyableItem({'white piece of cloth'}, 5909, 300, 'white piece of cloth')
shopModule:addBuyableItem({'huge chunk of crude iron'}, 5892, 3000, 'huge chunk of crude iron')
shopModule:addBuyableItem({'iron ore'}, 5880, 500, 'iron ore')
shopModule:addBuyableItem({'heaven blossom'}, 5921, 100, 'heaven blossom')
shopModule:addBuyableItem({'holy orchid'}, 5922, 2000, 'holy orchid')
shopModule:addBuyableItem({'mandrake'}, 5015, 800000, 'mandrake')
shopModule:addBuyableItem({'nose ring'}, 5804, 500000, 'nose ring')
shopModule:addBuyableItem({'peg leg'}, 6126, 300, 'peg leg')
shopModule:addBuyableItem({'spool of yarn'}, 5886, 20000, 'spool of yarn')
shopModule:addBuyableItem({'brutus bloodbeard\'s hat'}, 6099, 50000, 'brutus bloodbeard\'s hat')
shopModule:addBuyableItem({'deadeye devious\' eye patch'}, 6102, 50000, 'deadeye devious\' eye patch')
shopModule:addBuyableItem({'enchanted chicken wing'}, 5891, 2000, 'enchanted chicken wing')
shopModule:addBuyableItem({'eye patch'}, 6098, 300, 'eye patch')
shopModule:addBuyableItem({'ferumbras\' hat'}, 5903, 1500000, 'ferumbras\' hat')
shopModule:addBuyableItem({'hook'}, 6097, 300, 'hook')
shopModule:addBuyableItem({'fighting spirit'}, 5884, 40000, 'fighting spirit')
shopModule:addBuyableItem({'lethal lissy\'s shirt'}, 6100, 50000, 'lethal lissy\'s shirt')
shopModule:addBuyableItem({'magic sulphur'}, 5904, 8000, 'magic sulphur')
shopModule:addBuyableItem({'piece of draconian steel'}, 5889, 5000, 'piece of draconian steel')
shopModule:addBuyableItem({'piece of hell steel'}, 5888, 5000, 'piece of hell steel')
shopModule:addBuyableItem({'piece of royal steel'}, 5887, 5000, 'piece of royal steel')
shopModule:addBuyableItem({'ron the ripper\'s sabre'}, 6101, 50000, 'ron the ripper\'s sabre')
shopModule:addBuyableItem({'sniper gloves'}, 5875, 10000, 'sniper gloves')
shopModule:addBuyableItem({'soul stone'}, 5809, 80000, 'soul stone')
shopModule:addBuyableItem({'warrior\' sweat'}, 5885, 20000, 'warrior\' sweat')

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
 
remove
Code:
<?xml version="1.0"?>
<npc name="Lost Boy" script="data/npc/scripts/addonitemseller.lua"  walkinterval="2000" floorchange="0" access="5" level="1" maglevel="1">
	<health now="150" max="150"/>
	<look type="104" head="20" body="30" legs="40" feet="50" corpse="6033"/>
	<parameters>
		[B][COLOR="Red"]<parameter key="module_shop" value="1" />[/COLOR][/B]
		<parameter key="message_greet" value="Hello |PLAYERNAME|.I will sell all addon items. Say {trade} to see my whole offer" />
	</parameters>
</npc>
 
Back
Top