Since I saw a couple requests of NPCs to sell addon items to, I've decided to make this NPC script. Basically you can just sell almost all addon items to this NPC. The prices were made by me, I did not have the time to look it up online and look for the real prices, I just determined it by rarity.
addonitemseller.lua:
The NPC (Animal Item Collector.xml):
FAQ:
addSellableItem (EX: shopModule:addSellableItem({'ape fur'}, 5883, 120, 'ape fur'))
to
addBuyableItem (EX: shopModule:addBuyableItem({'ape fur'}, 5883, 120, 'ape fur'))
Please, just spend less than a second by giving me reputation for an hour of my work making this script.
Have fun!
Lostboy
addonitemseller.lua:
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:addSellableItem({'ape fur'}, 5883, 120, 'ape fur')
shopModule:addSellableItem({'bat wing'}, 5894, 100, 'bat wing')
shopModule:addSellableItem({'bear paw'}, 5896, 100, 'bear paw')
shopModule:addSellableItem({'behemoth claw'}, 5930, 2000, 'behemoth claw')
shopModule:addSellableItem({'beholder eye'}, 5898, 150, 'beholder eye')
shopModule:addSellableItem({'chicen feather'}, 5890, 100, 'chicen feather')
shopModule:addSellableItem({'cockroach leg'}, 8710, 500, 'cockroach leg')
shopModule:addSellableItem({'demon dust'}, 5906, 400, 'demon dust')
shopModule:addSellableItem({'demon horn'}, 5954, 2500, 'demon horn')
shopModule:addSellableItem({'dracola\'s eye'}, 6546, 80000, 'dracola\'s eye')
shopModule:addSellableItem({'dragon claw'}, 5919, 50000, 'dragon claw')
shopModule:addSellableItem({'dwarven beard'}, 5900, 25000, 'dwarven beard')
shopModule:addSellableItem({'fish fin'}, 5895, 3500, 'fish fin')
shopModule:addSellableItem({'gland'}, 8971, 2000, 'gland')
shopModule:addSellableItem({'glob of acid slime'}, 9967, 200, 'glob of acid slime')
shopModule:addSellableItem({'glob of mercury'}, 9966, 200, 'glob of mercury')
shopModule:addSellableItem({'glob of tar'}, 9968, 200, 'glob of tar')
shopModule:addSellableItem({'green dragon leather'}, 5877, 200, 'green dragon leather')
shopModule:addSellableItem({'green dragon scale'}, 5920, 500, 'green dragon scale')
shopModule:addSellableItem({'hardened bone'}, 5925, 300, 'hardened bone')
shopModule:addSellableItem({'honeycomb'}, 5902, 40, 'honeycomb')
shopModule:addSellableItem({'hydra egg'}, 4850, 200, 'hydra egg')
shopModule:addSellableItem({'lizard leather'}, 5876, 200, 'lizard leather')
shopModule:addSellableItem({'lizard scale'}, 5881, 500, 'lizard scale')
shopModule:addSellableItem({'minotaur leather'}, 5878, 150, 'minotaur leather')
shopModule:addSellableItem({'morgaroth\'s heart'}, 5943, 700000, 'morgaroth\'s heart')
shopModule:addSellableItem({'orshabaal\'s brain'}, 5808, 500000, 'orshabaal\'s brain')
shopModule:addSellableItem({'perfect behemoth fang'}, 5893, 5000, 'perfect behemoth fang')
shopModule:addSellableItem({'red dragon leather'}, 5948, 500, 'red dragon leather')
shopModule:addSellableItem({'red dragon scale'}, 5882, 1000, 'red dragon scale')
shopModule:addSellableItem({'shard'}, 7290, 300, 'shard')
shopModule:addSellableItem({'giant spider silk'}, 5879, 7000, 'giant spider silk')
shopModule:addSellableItem({'plasmother remains'}, 6535, 30000, 'plasmother remains')
shopModule:addSellableItem({'turtle shell'}, 5899, 200, 'turtle shell')
shopModule:addSellableItem({'tusk'}, 8614, 150, 'tusk')
shopModule:addSellableItem({'vampire dust'}, 5905, 2000, 'vampire dust')
shopModule:addSellableItem({'wolf paw'}, 5897, 100, 'wolf paw')
shopModule:addSellableItem({'blue piece of cloth'}, 5912, 300, 'blue piece of cloth')
shopModule:addSellableItem({'red piece of cloth'}, 5911, 300, 'red piece of cloth')
shopModule:addSellableItem({'yellow piece of cloth'}, 5914, 300, 'yellow piece of cloth')
shopModule:addSellableItem({'green piece of cloth'}, 5910, 300, 'green piece of cloth')
shopModule:addSellableItem({'brown piece of cloth'}, 5913, 150, 'brown piece of cloth')
shopModule:addSellableItem({'white piece of cloth'}, 5909, 300, 'white piece of cloth')
shopModule:addSellableItem({'huge chunk of crude iron'}, 5892, 3000, 'huge chunk of crude iron')
shopModule:addSellableItem({'iron ore'}, 5880, 500, 'iron ore')
shopModule:addSellableItem({'heaven blossom'}, 5921, 100, 'heaven blossom')
shopModule:addSellableItem({'holy orchid'}, 5922, 2000, 'holy orchid')
shopModule:addSellableItem({'mandrake'}, 5015, 800000, 'mandrake')
shopModule:addSellableItem({'nose ring'}, 5804, 500000, 'nose ring')
shopModule:addSellableItem({'peg leg'}, 6126, 300, 'peg leg')
shopModule:addSellableItem({'spool of yarn'}, 5886, 20000, 'spool of yarn')
shopModule:addSellableItem({'brutus bloodbeard\'s hat'}, 6099, 50000, 'brutus bloodbeard\'s hat')
shopModule:addSellableItem({'deadeye devious\' eye patch'}, 6102, 50000, 'deadeye devious\' eye patch')
shopModule:addSellableItem({'enchanted chicken wing'}, 5891, 2000, 'enchanted chicken wing')
shopModule:addSellableItem({'eye patch'}, 6098, 300, 'eye patch')
shopModule:addSellableItem({'ferumbras\' hat'}, 5903, 1500000, 'ferumbras\' hat')
shopModule:addSellableItem({'hook'}, 6097, 300, 'hook')
shopModule:addSellableItem({'fighting spirit'}, 5884, 40000, 'fighting spirit')
shopModule:addSellableItem({'lethal lissy\'s shirt'}, 6100, 50000, 'lethal lissy\'s shirt')
shopModule:addSellableItem({'magic sulphur'}, 5904, 8000, 'magic sulphur')
shopModule:addSellableItem({'piece of draconian steel'}, 5889, 5000, 'piece of draconian steel')
shopModule:addSellableItem({'piece of hell steel'}, 5888, 5000, 'piece of hell steel')
shopModule:addSellableItem({'piece of royal steel'}, 5887, 5000, 'piece of royal steel')
shopModule:addSellableItem({'ron the ripper\'s sabre'}, 6101, 50000, 'ron the ripper\'s sabre')
shopModule:addSellableItem({'sniper gloves'}, 5875, 10000, 'sniper gloves')
shopModule:addSellableItem({'soul stone'}, 5809, 80000, 'soul stone')
shopModule:addSellableItem({'warrior\' sweat'}, 5885, 20000, 'warrior\' sweat')
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
The NPC (Animal Item Collector.xml):
Code:
<npc name="Animal Item Collector" 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 buy all addon items. Say {trade} to see my whole offer" />
</parameters>
</npc>
FAQ:
- Can I make the NPC sell the addon items to players?
addSellableItem (EX: shopModule:addSellableItem({'ape fur'}, 5883, 120, 'ape fur'))
to
addBuyableItem (EX: shopModule:addBuyableItem({'ape fur'}, 5883, 120, 'ape fur'))
- Are the prices correct?
Please, just spend less than a second by giving me reputation for an hour of my work making this script.
Have fun!
Lostboy