• 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 Addon Item Seller

Evan

A splendid one to behold
Senator
Premium User
Joined
May 6, 2009
Messages
7,019
Solutions
1
Reaction score
1,029
Location
United States
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:
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?
Of course you can! Just change all:
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?
Most of them are decided by me, depending by rarity, but you're free to change them.


Please, just spend less than a second by giving me reputation for an hour of my work making this script.

Have fun!
Lostboy
 
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())

XD, Good script xD
 
when i buy something there it buys the item twice lol
is it a bug or just me?
ps. jus thappens with that npc
 
when i buy something there it buys the item twice lol
is it a bug or just me?
ps. jus thappens with that npc

It happens with me too, any ideas? I know it is a similar script to any "selling items" npc script and the modules are similar but it still buys everything twice.

EDIT1: Using tfs 0.4

EDIT2: Fixed it, for future reference replace
<parameter key="module_shop" value="1" />

with

<parameter key="module_keywords" value="1" />

Thanks for the script!
 
Last edited:
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:
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?
Of course you can! Just change all:
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?
Most of them are decided by me, depending by rarity, but you're free to change them.


Please, just spend less than a second by giving me reputation for an hour of my work making this script.

Have fun!
Lostboy

[19/12/2014 19:19:01] [Error - Npc interface]
[19/12/2014 19:19:01] (Unknown script file)
[19/12/2014 19:19:01] Description:
[19/12/2014 19:19:01] data/npc/lib/npcsystem/modules.lua:1152: bad argument #2 to 'error' (number expected, got string)
[19/12/2014 19:19:01] stack traceback:
[19/12/2014 19:19:02] [C]: in function 'error'
[19/12/2014 19:19:02] data/npc/lib/npcsystem/modules.lua:1152: in function 'callbackOnBuy'
[19/12/2014 19:19:02] data/npc/lib/npcsystem/npchandler.lua:263: in function 'processModuleCallback'
[19/12/2014 19:19:02] data/npc/lib/npcsystem/npchandler.lua:440: in function 'onBuy'
[19/12/2014 19:19:02] data/npc/lib/npcsystem/modules.lua:1293: in function <data/npc/lib/npcsystem/modules.lua:1292>

thats what i found when i tried to buy an item from this npc ,also i already changed Addsellableitem with addbuyableitem and everytime get this error

@Evan
@Limos
@Ninja
@Printer
 
Last edited:
You can try this modules (it's for TFS 0.3/0.4).
http://www.speedy*****malware.localhost/CzWng/modules.lua
 
You can try this modules (it's for TFS 0.3/0.4).
http://www.speedy*****malware.localhost/CzWng/modules.lua
where can i put this? cuz i dont have any file named modules on my data only mods and all of them are .xml not .lua
 
data/npc/lib/npcsystem/modules.lua.
Make a backup of your current modules incase it doesn't work on your server.
 
Back
Top