• 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!

Rashid script error on tfs 0.3.6 (8.60)

astamor

New Member
Joined
Jul 22, 2011
Messages
42
Reaction score
2
Hi :) I'm using this script for Rashid but when I say hi->trade and try to sell any items nothing happens. Item is still in my backpack and I don't get gold. It works only when I say for example: "sell dragon scale mail".
There is error in console:

Code:
[02/08/2013 02:36:51] [Error - Npc interface] 
[02/08/2013 02:36:51] (Unknown script file)
[02/08/2013 02:36:51] Description: 
[02/08/2013 02:36:51] data/npc/lib/npcsystem/modules.lua:1229: bad argument #2 to 'error' (number expected, got string)
[02/08/2013 02:36:51] stack traceback:
[02/08/2013 02:36:51] 	[C]: in function 'error'
[02/08/2013 02:36:51] 	data/npc/lib/npcsystem/modules.lua:1229: in function 'callbackOnSell'
[02/08/2013 02:36:51] 	data/npc/lib/npcsystem/npchandler.lua:265: in function 'processModuleCallback'
[02/08/2013 02:36:51] 	data/npc/lib/npcsystem/npchandler.lua:450: in function 'onSell'
[02/08/2013 02:36:51] 	data/npc/lib/npcsystem/modules.lua:1296: in function <data/npc/lib/npcsystem/modules.lua:1295>

Here is my Rashid script:

Code:
<npc name="Rashid" script="data/npc/scripts/all.lua" autowalk="5" floorchange="0">
<health now="100" max="100"/>
<look type="146" head="119" body="118" legs="119" feet="132" addons="3"/>
<parameters>
<parameter key="message_greet" value="Hello |PLAYERNAME|, I buy many items,you are abble to choise between Armors,Weapons,Helmets,Shields,Legs and Boots,Amulets,Tools, What do u offer me?" />
<parameter key="message_farewell" value="Good bye |PLAYERNAME|, Cya later!!" />
<parameter key="module_shop" value="1" />
<parameter key="shop_sellable" value="dragon scale mail, 2492, 40000; silver warrior armor, 2503, 50000; glacier robe, 7897, 11000; golden armor, 2466, 20000; Hibiscus Dress, 8873, 3000; Leopard Armor, 3968, 1000; lightning robe, 7898 , 11000; magma coat, 7899, 11000; mammoth fur cape, 7463, 6000; paladin armor, 8891, 15000; pirate shirt, 6095, 500; skullcracker armor, 8889, 18000; terra mantle, 7884, 11000; glacier kilt, 7896, 11000; lightning legs, 7895, 11000; magma legs, 7894, 11000; mammoth fur shorts, 7464, 850; pirate knee breeches, 5918, 200; terra legs, 7885, 11000; bone shield, 2541, 80; castle shield, 2535, 5000; dark shield, 2521, 400; demon shield, 2520, 30000; medusa shield, 2536, 9000; norse shield, 7460, 1500; scarab shield, 2540, 2000; tortoise shield, 6131, 150; beholder helmet, 3972, 7500; devil helmet, 2462, 1000; glacier mask, 7902, 2500; krimhorn helmet, 7461, 200; lightning headband, 7901, 2500; magma monocle, 7900, 2500; pirate hat, 6096, 1000; ragnir helmet, 7462, 400; skull helmet, 5741, 40000; terra hood, 7903, 2500; crocodile boots, 3982, 1000; fur boots, 7457, 2000; glacier shoes, 7892, 2500; lightning boots, 7893, 2500; magma boots, 7891, 2500; pirate boots, 5462, 2500; steel boots, 2645, 30000; terra boots, 7886, 2500; abyss hammer, 7414, 20000; amber staff, 7426, 8000; assassin dagger, 7404, 20000; beastslayer axe, 3962, 1500; berserker, 7403, 40000; brutetamers staff, 7379, 1500; chaos mace, 7427, 9000; cranial basher, 7415, 30000; crystal sword, 7449, 600; daramanian mace, 2439, 110; daramanian waraxe, 2440, 1000; demonrage sword, 7382, 36000; diamond sceptre, 7387, 3000; dragon slayer, 7402, 15000; dragonbone staff, 7430, 3000; dreaded cleaver, 7419, 10000; Epee, 2438, 8000; furry club, 7432, 1000; guardian halberd, 2427, 11000; hammer of wrath, 2444, 30000; heavy mace, 2452, 50000; heavy machete, 2442, 90; heroic axe, 7389, 30000; jade hammer, 7422, 25000; lunar staff, 7424, 5000; mammoth whopper, 7381, 300; mercenary sword, 7386, 12000; mystic blade, 7384, 30000; naginata, 2426, 2000; nightmare blade, 7418, 35000; noble axe, 7456, 10000; relic sword, 7383, 25000; ruthless axe, 6553, 45000; sapphire hammer, 7437, 7000; silver dagger, 2402, 500; spiked squelcher, 7452, 5000; taurus mace, 7425, 500; vile axe, 7388, 30000; war axe, 2454, 12000; wyvern fang, 7408, 1500; ancient amulet, 2142, 200; crystal necklace, 2125, 400; crystal ring, 2124, 250; death ring, 6300, 1000; demonbone amulet, 2136, 32000; emerald bangle, 2127, 800; glacier amulet, 7888, 1500; gold ring, 2179, 8000; lightning pendant, 7889, 1500; magma amulet, 7890, 1500; platinum amulet, 2171, 2500; ring of the sky, 2123, 30000; ruby necklace, 2133, 2000; scarab amulet, 2135, 200; silver brooch, 2134, 150; terra amulet, 7887, 1500; doll, 2110, 200; light shovel, 5710, 300; pirate voodoo doll, 5810, 500; voodoo doll, 3955, 400;" />
<parameter key="module_keywords" value="1" />
<parameter key="keywords" value="weapons;armors;helmets;shields;legs and boots;amulets;tools" />


<parameter key="keyword_reply1" value="I buy these weapons, abyss hammer, amber staff, assassin dagger, beastslayer axe, berserker, brutetamers staff, chaos mace, cranial basher, crystal sword, daramanian mace, daramanian waraxe, demonrage sword, diamond sceptre, dragon slayer, dragonbone staff, dreaded cleaver, epee, furry club, guardian halberd, hammer of wrath, heavy mace, heavy machete, heroic axe, jade hammer, lunar staff, mammoth whopper, mercenary sword, mystic blade, naginata, nightmare blade, noble axe, relic sword, ruthless axe, sapphire hammer, silver dagger, spiked squelcher, taurus mace, vile axe, war axe and wyvern fang." />
<parameter key="keyword_reply2" value="I buy these armors, dragon scale mail, silver warrior armor, glacier robe, golden armor, hibiscus dress, lepoard armor, lightning robe, magma coat, mammoth fur cape, paladin armor, pirate shirt, skullcracker armor and terra mantle." />
<parameter key="keyword_reply3" value="I buy these helmets, beholder helmet, devil helmet, glacier mask, krimhorn helmet, lightning headband, magma monocle, pirate hat, ragnir helmet, skull helmet and terra hood." />
<parameter key="keyword_reply4" value="i buy these shields, bone shield, castle shield, dark shield, demon shield, medusa shield, norse shield, scarab shield and tortoise shield." />
<parameter key="keyword_reply5" value="I buy these legs, glacier kilt, lightning legs, magma legs, mammoth fur shorts, pirate knee breeches and terra legs." />
<parameter key="keyword_reply6" value="I buy these jewelrys, ancient amulet, crystal necklace, crystal ring, death ring, demonbone amulet, emerald bangle, glacier amulet, gold ring, lightning pendant, magma amulet, platinum amulet, ring of the sky, ruby necklace, scarab amulet, silver brooch and terra amulet." />
<parameter key="keyword_reply7" value="I buy these miscellaneous, doll, light shovel, pirate voodoo doll and voodoo doll." />
<parameter key="keyword_reply8" value="I buy these boots, crocodile boots, fur boots, glacier shoes, lightning boots, magma boots, pirate boots, steel boots and terra boots."/>
</parameters>
</npc>
 
Last edited:
Try that:
My CODES:

Rashid script XML:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Rashid" script="data/npc/scripts/Rashid.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="146" head="99" body="102" legs="122" feet="115" addons="2"/>
<parameters>
<parameter key="module_shop" value="1" />
		<parameter key="shop_sellable" value="dragon scale mail,2492,40000;dwarven armor,2503,30000;glacier robe,7897,11000;golden armor,2466,20000;hibiscus dress,8873,3000;leopard armor,3968,1000;glacier robe,7898,11000;glacier robe,7899,11000;glacier robe,7463,6000;glacier robe,8891,15000;glacier robe,6095,500;glacier robe,8889,18000;glacier robe,7884,11000;glacier robe,7896,11000;glacier robe,7895,11000;glacier robe,7894,11000;glacier robe,7464,850;glacier robe,5918,200;glacier robe,7885,11000;glacier robe,2541,80;glacier robe,2535,5000;glacier robe,2521,400;glacier robe,2520,30000;glacier robe,2536,9000;glacier robe,7460,1500;glacier robe,2540,2000;glacier robe,6131,150;glacier robe,3972,7500;glacier robe,2462,1000;glacier robe,7902,2500;glacier robe,7461,200;glacier robe,7901,2500;glacier robe,7900,2500;glacier robe,6096,1000;glacier robe,7462,400;glacier robe,5741,40000;glacier robe,7903,2500;glacier robe,3982,1000;glacier robe,7457,2000;glacier robe,7892,2500;glacier robe,7893,2500;glacier robe,7891,2500;glacier robe,2641,2000;glacier robe,5462,3000;glacier robe,2645,30000;glacier robe,7886,2500;glacier robe,7414,20000;glacier robe,7426,8000;glacier robe,7404,20000;glacier robe,3962,1500;glacier robe,7403,40000;glacier robe,7379,1500;glacier robe,7427,9000;glacier robe,7415,30000;glacier robe,7449,600;glacier robe,2439,110;glacier robe,2440,1000;glacier robe,7382,36000;glacier robe,7387,3000;glacier robe,7402,15000;glacier robe,7430,3000;glacier robe,7409,10000;glacier robe,2438,8000;glacier robe,7432,1000;glacier robe,2427,11000;glacier robe,2444,30000;glacier robe,2452,50000;glacier robe,2442,90;glacier robe,7389,30000;glacier robe,7422,25000;glacier robe,7424,5000;glacier robe,7381,300;glacier robe,7386,12000;glacier robe,7384,30000;glacier robe,2426,2000;glacier robe,7418,35000;glacier robe,7456,10000;glacier robe,7383,25000;glacier robe,6553,45000;glacier robe,7437,7000;glacier robe,2402,500;glacier robe,7452,5000;glacier robe,7425,500;glacier robe,7388,30000;glacier robe,2454,12000;glacier robe,7408,1500;g,7866,30000;g,7756,30000;g,7775,30000;g,7881,30000;g,7748,15000;g,7767,15000;g,7858,15000;g,7873,15000;g,7751,30000;g,7770,30000;g,7861,30000;aha,7876,30000;g,7746,30000;g,7765,30000;g,7856,30000;g,7871,30000;g,7745,25000;g,7764,25000;g,7855,25000;g,7870,25000;g,7753,12000;g,7772,12000;g,7863,12000;g,7878,12000;g,2142,200;g,2125,400;g,2142,250;g,6301,1000;g,2136,32000;g,2127,800;g,7888,1500;g,2179,8000;g,7889,1500;g,7890,1500;g,2171,2500;g,2123,30000;g,2133,2000;g,2135,200;g,2134,150;g,7887,1500;g,2110,200;g,5710,300;g,5810,500;g,3955,400;g,6300,1000" />
        <parameter key="message_greet" value="Ah, a customer! Be greeted, |PLAYERNAME|!"/>
        <parameter key="message_farewell" value="Farewell, |PLAYERNAME|, may the winds guide your way."/>
		<parameter key="message_walkaway" value="Farewell, |PLAYERNAME|, may the winds guide your way." />
</parameters>
</npc>


Rashid script LUA:
Code:
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

npcHandler:addModule(FocusModule:new())


Add this LUA codes in yourots/data/npc/scripts/lib/npcsystem/

keywordhandler.lua:

Code:
if(KeywordHandler == nil) then
	
	BEHAVIOR_SIMPLE = 1 -- Does not support nested keywords. If you choose this setting you must use a variable such as 'talkState' to keep track of how to handle keywords.
	BEHAVIOR_NORMAL = 2 -- Default behvaior. If a sub-keyword is not found, then the root is searched, not the parent hierarchy,
	BEHAVIOR_NORMAL_EXTENDED = 3 -- Same as BEHAVIOR_NORMAL but it also searches through the last node's parent.
	BEHAVIOR_COMPLEX = 4 -- Extended behavior. It a sub-keyword is not found, then the entire keyword hierarchy is searched upwards intil root is reached.
	
	
	-- BEHAVIOR_NORMAL_EXTENDED is recommended as it (probably) mimics the behavior of real Tibia's NPCs the most. 
	--		However, you are strongly recommended to test some (or all) other settings as well as it might suit you better.
	--		Also note that not much difference can be seen with the different settings unless you have a npc with a quite heavy 
	--		nestled keyword hierarchy. 
	-- Note: BEHAVIOR_SIMPLE should not be used unless you have any special reason to do so as it forces you to keep track of talkStates etc.
	--		This was pretty much the method used in the 2.0x versions of this system. It is here mainly for compability issues.
	KEYWORD_BEHAVIOR = BEHAVIOR_NORMAL_EXTENDED
	
	
	KeywordNode = {
		keywords = nil,
		callback = nil,
		parameters = nil,
		children = nil,
		parent = nil
	}
	
	-- Created a new keywordnode with the given keywords, callback function and parameters and without any childNodes.
	function KeywordNode:new(keys, func, param)
		local obj = {}
		obj.keywords = keys
		obj.callback = func
		obj.parameters = param
		obj.children = {}
		setmetatable(obj, self)
		self.__index = self
		return obj
	end
	
	-- Calls the underlying callback function if it is not nil.
	function KeywordNode:processMessage(cid, message)
		return (self.callback == nil or self.callback(cid, message, self.keywords, self.parameters, self))
	end
	
	-- Returns true if message contains all patterns/strings found in keywords.
	function KeywordNode:checkMessage(message)
		local ret = true
		if(self.keywords.callback ~= nil) then
			return self.keywords.callback(self.keywords, message)
		end
		for i,v in ipairs(self.keywords) do
			if(type(v) == 'string') then
				local a, b = string.find(message, v)
				if(a == nil or b == nil) then
					ret = false
					break
				end
			end
		end
		return ret
	end
	
	-- Returns the parent of this node or nil if no such node exists.
	function KeywordNode:getParent()
		return self.parent
	end
	
	-- Returns an array of the callback function parameters assosiated with this node.
	function KeywordNode:getParameters()
		return self.parameters
	end
	
	-- Returns an array of the triggering keywords assosiated with this node.
	function KeywordNode:getKeywords()
		return self.keywords
	end
	
	-- Adds a childNode to this node. Creates the childNode based on the parameters (k = keywords, c = callback, p = parameters)
	function KeywordNode:addChildKeyword(keywords, callback, parameters)
		local new = KeywordNode:new(keywords, callback, parameters)
		return self:addChildKeywordNode(new)
	end
	
	-- Adds a pre-created childNode to this node. Should be used for example if several nodes should have a common child.
	function KeywordNode:addChildKeywordNode(childNode)
		table.insert(self.children, childNode)
		childNode.parent = self
		return childNode
	end
	
	
	
	
	KeywordHandler = {
		root = nil,
		lastNode = nil
	}
	
	-- Creates a new keywordhandler with an empty rootnode. 
	function KeywordHandler:new()
		local obj = {}
		obj.root = KeywordNode:new(nil, nil, nil)
		setmetatable(obj, self)
		self.__index = self
		return obj
	end
	
	-- Resets the lastNode field, and this resetting the current position in the node hierarchy to root.
	function KeywordHandler:reset()
		self.lastNode = nil
	end
	
	
	-- Makes sure the correct childNode of lastNode gets a chance to process the message. 
	--	The behavior of this function depends much on the KEYWORD_BEHAVIOR.
	function KeywordHandler:processMessage(cid, message)
		local node = self:getLastNode()
		if(node == nil) then
			error('No root node found.')
			return false
		end
		if(KEYWORD_BEHAVIOR == BEHAVIOR_SIMPLE) then
			local ret = self:processNodeMessage(node, cid, message)
			if(ret) then
				return true
			end
		elseif(KEYWORD_BEHAVIOR == BEHAVIOR_NORMAL or KEYWORD_BEHAVIOR == BEHAVIOR_NORMAL_EXTENDED) then
			local ret = self:processNodeMessage(node, cid, message)
			if(ret) then
				return true
			end
			if(KEYWORD_BEHAVIOR == BEHAVIOR_NORMAL_EXTENDED and node:getParent()) then
				node = node:getParent() -- Search through the parent.
				local ret = self:processNodeMessage(node, cid, message)
				if(ret) then
					return true
				end
			end
			if(node ~= self:getRoot()) then
				node = self:getRoot() -- Search through the root.
				local ret = self:processNodeMessage(node, cid, message)
				if(ret) then
					return true
				end
			end
		elseif(KEYWORD_BEHAVIOR == BEHAVIOR_COMPLEX) then
			while true do
				
				local ret = self:processNodeMessage(node, cid, message)
				if(ret) then
					return true
				end
				
				if(node:getParent() ~= nil) then
					node = node:getParent() -- Move one step upwards in the hierarchy.
				else
					break
				end
			end
		else
			error('Unknown keyword behavior.')
		end
		return false
	end
	
	-- Tries to process the given message using the node parameter's children and calls the node's callback function if found.
	--	Returns the childNode which processed the message or nil if no such node was found.
	function KeywordHandler:processNodeMessage(node, cid, message)
		local messageLower = string.lower(message)
		for i, childNode in pairs(node.children) do
			if(childNode:checkMessage(messageLower)) then
				self.lastNode = childNode
				childNode.parent = node -- Make sure node is the parent of childNode (as one node can be parent to several nodes).
				if(childNode:processMessage(cid, message)) then
					return true
				end
			end
		end
		return false
	end
	
	-- Returns the root keywordnode
	function KeywordHandler:getRoot()
		return self.root
	end
	
	-- Returns the last processed keywordnode or root if no last node is found. 
	function KeywordHandler:getLastNode()
		if(KEYWORD_BEHAVIOR == BEHAVIOR_SIMPLE) then
			return self:getRoot()
		else
			return self.lastNode or self:getRoot()
		end
	end
	
	-- Adds a new keyword to the root keywordnode. Returns the new node. 
	function KeywordHandler:addKeyword(keys, callback, parameters)
		return self:getRoot():addChildKeyword(keys, callback, parameters)
	end
	
	-- Moves the current position in the keyword hierarchy count steps upwards. Count defalut value = 1.
	--	This function MIGHT not work properly yet. Use at your own risk.
	function KeywordHandler:moveUp(count)
		local steps = count
		if(steps == nil) then
			steps = 1
		end
		for i=1,steps,1 do
			if(self.lastNode == nil) then
				break
			else
				self.lastNode = self.lastNode:getParent() or self:getRoot()
			end
		end
		return self.lastNode
	end
	
end

modules.lua:


Code:
if(Modules == nil) then
	
	-- default words for greeting and ungreeting the npc. Should be a talbe containing all such words.
	FOCUS_GREETWORDS = {'hi', 'hello'}
	FOCUS_FAREWELLWORDS = {'bye', 'farewell', 'cya'}
	
	-- The word for accepting/declining an offer. CAN ONLY CONTAIN ONE FIELD! Should be a teble with a single string value.
	SHOP_YESWORD = {'yes'}
	SHOP_NOWORD = {'no'}
	
	-- Pattern used to get the amount of an item a player wants to buy/sell.
	PATTERN_COUNT = '%d+'
	
	
	-- Constants used to separate buying from selling.
	SHOPMODULE_SELL_ITEM 	= 1
	SHOPMODULE_BUY_ITEM 	= 2
	
	
	Modules = {
			parseableModules = {}
		}
	
	
	StdModule = {
		
		}
	
	
	
	-- These callback function must be called with parameters.npcHandler = npcHandler in the parameters table or they will not work correctly.
	-- Notice: The members of StdModule have not yet been tested. If you find any bugs, please report them to me.
	
	-- Usage:
		-- keywordHandler:addKeyword({'offer'}, StdModule.say, {npcHandler = npcHandler, text = 'I sell many powerful melee weapons.'})
	function StdModule.say(cid, message, keywords, parameters, node)
		local npcHandler = parameters.npcHandler
		if(npcHandler == nil) then
			error('StdModule.say called without any npcHandler instance.')
		end
		if(cid ~= npcHandler.focus and (parameters.onlyFocus == nil or parameters.onlyFocus == true)) then
			return false
		end
		local parseInfo = {
				[TAG_PLAYERNAME] = getPlayerName(cid),
			}
		msgout = npcHandler:parseMessage(parameters.text or parameters.message, parseInfo)
		npcHandler:say(msgout)
		if(parameters.reset == true) then
			npcHandler:resetNpc()
		elseif(parameters.moveup ~= nil and type(parameters.moveup) == 'number') then
			npcHandler.keywordHandler:moveUp(parameters.moveup)
		end
		return true
	end
	
	
	--Usage:
		-- local node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, text = 'I can promote you for 20000 gold coins. Do you want me to promote you?'})
		-- 		node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, promotions = {[1] = 5, [2] = 6, [3] = 7, [4] = 8}, cost = 20000, level = 20}, text = 'Congratulations! You are now promoted.')
		-- 		node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, text = 'Allright then. Come back when you are ready.'}, reset = true)
	function StdModule.promotePlayer(cid, message, keywords, parameters, node)
		local npcHandler = parameters.npcHandler
		if(npcHandler == nil) then
			error('StdModule.promotePlayer called without any npcHandler instance.')
		end
		if(cid ~= npcHandler.focus) then
			return false
		end
		
		local oldVoc = getPlayerVocation(cid)
		if(parameters.promotions[oldVoc] == oldVoc or parameters.promotions[oldVoc] == nil) then
			npcHandler:say('You are already promoted!')
		elseif(getPlayerLevel(cid) < parameters.level) then
			npcHandler:say('I am sorry, but I can only promote you once you have reached level ' .. parameters.level .. '.')
		elseif(doPlayerRemoveMoney(cid, parameters.cost) ~= TRUE) then
			npcHandler:say('You do not have enough money!')
		else
			doPlayerSetVocation(cid, parameters.promotions[oldVoc])
			npcHandler:say(parameters.text)
		end
		
		npcHandler:resetNpc()
		return true
		
	end
	
	
	
	function StdModule.travel(cid, message, keywords, parameters, node)
		local npcHandler = parameters.npcHandler
		if(npcHandler == nil) then
			error('StdModule.travel called without any npcHandler instance.')
		end
		if(cid ~= npcHandler.focus) then
			return false
		end
		
		if(isPlayerPremiumCallback == nil or isPlayerPremiumCallback(cid) == true or parameters.premium == false) then
			if(parameters.level ~= nil and getPlayerLevel(cid) < parameters.level) then
				npcHandler:say('You must reach level ' .. parameters.level .. ' before I can let you go there.')
			elseif(doPlayerRemoveMoney(cid, parameters.cost) ~= TRUE) then
				npcHandler:say('You do not have enough money!')
			else
				doTeleportThing(cid, parameters.destination)
				doSendMagicEffect(parameters.destination, 10)
			end
		else
			npcHandler:say('I can only allow premium players to travel with me.')
		end
		
		npcHandler:resetNpc()
		return true
	end
	
	
	
	FocusModule = {
			npcHandler = nil
		}
	
	-- Creates a new instance of FocusModule without an associated NpcHandler.
	function FocusModule:new()
		local obj = {}
		setmetatable(obj, self)
		self.__index = self
		return obj
	end
	
	-- Inits the module and associates handler to it.
	function FocusModule:init(handler)
		self.npcHandler = handler
		for i, word in pairs(FOCUS_GREETWORDS) do
			local obj = {}
			table.insert(obj, word)
			obj.callback = FOCUS_GREETWORDS.callback or FocusModule.messageMatcher
			handler.keywordHandler:addKeyword(obj, FocusModule.onGreet, {module = self})
		end
		
		for i, word in pairs(FOCUS_FAREWELLWORDS) do
			local obj = {}
			table.insert(obj, word)
			obj.callback = FOCUS_FAREWELLWORDS.callback or FocusModule.messageMatcher
			handler.keywordHandler:addKeyword(obj, FocusModule.onFarewell, {module = self})
		end
		
		return true
	end
	
	
	-- Greeting callback function.
	function FocusModule.onGreet(cid, message, keywords, parameters)
		parameters.module.npcHandler:onGreet(cid)
		return true
	end
	
	-- UnGreeting callback function.
	function FocusModule.onFarewell(cid, message, keywords, parameters)
		if(parameters.module.npcHandler.focus == cid) then
			parameters.module.npcHandler:onFarewell()
			return true
		else
			return false
		end
	end
	
	-- Custom message matching callback function for greeting messages.
	function FocusModule.messageMatcher(keywords, message)
		for i, word in pairs(keywords) do
			if(type(word) == 'string') then
				if string.find(message, word) and not string.find(message, '[%w+]' .. word) and not string.find(message, word .. '[%w+]') then
	        		return true
	    		end
	    	end
    	end
    	return false
	end
	
	
	
	KeywordModule = {
		npcHandler = nil
	}
	-- Add it to the parseable module list.
	Modules.parseableModules['module_keywords'] = KeywordModule
	
	function KeywordModule:new()
		local obj = {}
		setmetatable(obj, self)
		self.__index = self
		return obj
	end
	
	function KeywordModule:init(handler)
		self.npcHandler = handler
		return true
	end
	
	-- Parses all known parameters.
	function KeywordModule:parseParameters()
		local ret = NpcSystem.getParameter('keywords')
		if(ret ~= nil) then
			self:parseKeywords(ret)
		end
	end
	
	function KeywordModule:parseKeywords(data)
		local n = 1
		for keys in string.gmatch(data, '[^;]+') do
			local i = 1
			
			local keywords = {}
			
			for temp in string.gmatch(keys, '[^,]+') do
				table.insert(keywords, temp)
				i = i+1
			end
			
			if(i ~= 1) then
				local reply = NpcSystem.getParameter('keyword_reply' .. n)
				if(reply ~= nil) then
					self:addKeyword(keywords, reply)
				else
					print('[Warning] NpcSystem:', 'Parameter \'' .. 'keyword_reply' .. n .. '\' missing. Skipping...')
				end
			else
				print('[Warning] NpcSystem:', 'No keywords found for keyword set #' .. n .. '. Skipping...')
			end
			n = n+1
		end
	end
	
	function KeywordModule:addKeyword(keywords, reply)
		self.npcHandler.keywordHandler:addKeyword(keywords, StdModule.say, {npcHandler = self.npcHandler, onlyFocus = true, text = reply, reset = true})
	end
	
	
	
	TravelModule = {
		npcHandler = nil,
		destinations = nil,
		yesNode = nil,
		noNode = nil,
	}
	-- Add it to the parseable module list.
	Modules.parseableModules['module_travel'] = TravelModule
	
	function TravelModule:new()
		local obj = {}
		setmetatable(obj, self)
		self.__index = self
		return obj
	end
	
	function TravelModule:init(handler)
		self.npcHandler = handler
		self.yesNode = KeywordNode:new(SHOP_YESWORD, TravelModule.onConfirm, {module = self})
		self.noNode = KeywordNode:new(SHOP_NOWORD, TravelModule.onDecline, {module = self})
		self.destinations = {}
		return true
	end
	
	-- Parses all known parameters.
	function TravelModule:parseParameters()
		local ret = NpcSystem.getParameter('travel_destinations')
		if(ret ~= nil) then
			self:parseDestinations(ret)
			
			self.npcHandler.keywordHandler:addKeyword({'destination'}, TravelModule.listDestinations, {module = self})
			self.npcHandler.keywordHandler:addKeyword({'where'}, TravelModule.listDestinations, {module = self})
			self.npcHandler.keywordHandler:addKeyword({'travel'}, TravelModule.listDestinations, {module = self})
			
		end
	end
	
	function TravelModule:parseDestinations(data)
		for destination in string.gmatch(data, '[^;]+') do
			local i = 1
			
			local name = nil
			local x = nil
			local y = nil
			local z = nil
			local cost = nil
			local premium = false
			
			
			for temp in string.gmatch(destination, '[^,]+') do
				if(i == 1) then
					name = temp
				elseif(i == 2) then
					x = tonumber(temp)
				elseif(i == 3) then
					y = tonumber(temp)
				elseif(i == 4) then
					z = tonumber(temp)
				elseif(i == 5) then
					cost = tonumber(temp)
				elseif(i == 6) then
					premium = temp == 'true'
				else
					print('[Warning] NpcSystem:', 'Unknown parameter found in travel destination parameter.', temp, destination)
				end
				i = i+1
			end
			
			if(name ~= nil and x ~= nil and y ~= nil and z ~= nil and cost ~= nil) then
				self:addDestination(name, {x=x, y=y, z=z}, cost, premium)
			else
				print('[Warning] NpcSystem:', 'Parameter(s) missing for travel destination:', name, x, y, z, cost, premium)
			end
		end
	end
	
	function TravelModule:addDestination(name, position, price, premium)
		table.insert(self.destinations, name)
		
		local parameters = {
				cost = price,
				destination = position,
				premium = premium,
				module = self
			}
		local keywords = {}
		table.insert(keywords, name)
		
		local keywords2 = {}
		table.insert(keywords2, 'bring me to ' .. name)
		local node = self.npcHandler.keywordHandler:addKeyword(keywords, TravelModule.travel, parameters)
		self.npcHandler.keywordHandler:addKeyword(keywords2, TravelModule.bringMeTo, parameters)
		node:addChildKeywordNode(self.yesNode)
		node:addChildKeywordNode(self.noNode)
	end
	
	function TravelModule.travel(cid, message, keywords, parameters, node)
		local module = parameters.module
		if(cid ~= module.npcHandler.focus) then
			return false
		end
		
		local npcHandler = module.npcHandler
		
		
		local cost = parameters.cost
		local destination = parameters.destination
		local premium = parameters.premium
		
		module.npcHandler:say('Do you want to travel to ' .. keywords[1] .. ' for ' .. cost .. ' gold coins?')
		return true
		
	end
	
	function TravelModule.onConfirm(cid, message, keywords, parameters, node)
		local module = parameters.module
		if(cid ~= module.npcHandler.focus) then
			return false
		end
		
		local npcHandler = module.npcHandler
		
		
		local parentParameters = node:getParent():getParameters()
		local cost = parentParameters.cost
		local destination = parentParameters.destination
		local premium = parentParameters.premium
		
		if(isPlayerPremiumCallback == nil or isPlayerPremiumCallback(cid) == true or parameters.premium ~= true) then
			if(doPlayerRemoveMoney(cid, cost) ~= TRUE) then
				npcHandler:say('You do not have enough money!')
			else
				npcHandler:say('It was a pleasure doing business with you.', false)
				npcHandler:releaseFocus()
				doTeleportThing(cid, destination)
				doSendMagicEffect(destination, 10)
			end
		else
			npcHandler:say('I can only allow premium players to travel there.')
		end
		
		npcHandler:resetNpc()
		return true
	end
	
	-- onDecliune keyword callback function. Generally called when the player sais 'no' after wanting to buy an item. 
	function TravelModule.onDecline(cid, message, keywords, parameters, node)
		local module = parameters.module
		if(cid ~= module.npcHandler.focus) then
			return false
		end
		local parentParameters = node:getParent():getParameters()
		local parseInfo = {
				[TAG_PLAYERNAME] = getPlayerName(cid),
			}
		local msg = module.npcHandler:parseMessage(module.npcHandler:getMessage(MESSAGE_DECLINE), parseInfo)
		module.npcHandler:say(msg)
		module.npcHandler:resetNpc()
		return true
	end
	
	function TravelModule.bringMeTo(cid, message, keywords, parameters, node)
		local module = parameters.module
		if(cid == module.npcHandler.focus) then
			return false
		end
		
		local cost = parameters.cost
		local destination = parameters.destination
		local premium = parameters.premium
		
		if(isPlayerPremiumCallback == nil or isPlayerPremiumCallback(cid) == true or parameters.premium ~= true) then
			if(doPlayerRemoveMoney(cid, cost) == TRUE) then
				doTeleportThing(cid, destination)
				doSendMagicEffect(destination, 10)
			end
		end
		
		return true
	end
	
	function TravelModule.listDestinations(cid, message, keywords, parameters, node)
		local module = parameters.module
		if(cid ~= module.npcHandler.focus) then
			return false
		end
		
		local msg = 'I can bring you to '
		--local i = 1
		local maxn = table.maxn(module.destinations)
		for i,destination in pairs(module.destinations) do
			msg = msg .. destination
			if(i == maxn-1) then
				msg = msg .. ' and '
			elseif(i == maxn) then
				msg = msg .. '.'
			else
				msg = msg .. ', '
			end
			i = i+1
		end
		
		module.npcHandler:say(msg)
		module.npcHandler:resetNpc()
		return true
	end
	
	
	
	
	ShopModule = {
		yesNode = nil,
		noNode = nil,
		npcHandler = nil,
		noText = '',
		maxCount = 500,
		amount = 0
	}
	-- Add it to the parseable module list.
	Modules.parseableModules['module_shop'] = ShopModule
	
	-- Creates a new instance of ShopModule
	function ShopModule:new()
		local obj = {}
		setmetatable(obj, self)
		self.__index = self
		return obj
	end
	
	-- Parses all known parameters.
	function ShopModule:parseParameters()
		
		local ret = NpcSystem.getParameter('shop_sellable')
		if(ret ~= nil) then
			self:parseSellable(ret)
		end
		
		local ret = NpcSystem.getParameter('shop_buyable')
		if(ret ~= nil) then
			self:parseBuyable(ret)
		end
		
	end
	
	-- Parse a string contaning a set of buyable items.
	function ShopModule:parseBuyable(data)
		for item in string.gmatch(data, '[^;]+') do
			local i = 1
			
			local name = nil
			local itemid = nil
			local cost = nil
			local charges = nil
			
			for temp in string.gmatch(item, '[^,]+') do
				if(i == 1) then
					name = temp
				elseif(i == 2) then
					itemid = tonumber(temp)
				elseif(i == 3) then
					cost = tonumber(temp)
				elseif(i == 4) then
					charges = tonumber(temp)
				else
					print('[Warning] NpcSystem:', 'Unknown parameter found in buyable items parameter.', temp, item)
				end
				i = i+1
			end
			
			if(name ~= nil and itemid ~= nil and cost ~= nil) then
				if((isItemRune(itemid) == TRUE or isItemFluidContainer(itemid) == TRUE) and charges == nil) then
					print('[Warning] NpcSystem:', 'Charges missing for parameter item:' , item)
				else
					local names = {}
					table.insert(names, name)
					self:addBuyableItem(names, itemid, cost, charges)
				end
			else
				print('[Warning] NpcSystem:', 'Parameter(s) missing for item:', name, itemid, cost)
			end
		end
	end
	
	-- Parse a string contaning a set of sellable items.
	function ShopModule:parseSellable(data)
		for item in string.gmatch(data, '[^;]+') do
			local i = 1
			
			local name = nil
			local itemid = nil
			local cost = nil
			
			for temp in string.gmatch(item, '[^,]+') do
				if(i == 1) then
					name = temp
				elseif(i == 2) then
					itemid = tonumber(temp)
				elseif(i == 3) then
					cost = tonumber(temp)
				else
					print('[Warning] NpcSystem:', 'Unknown parameter found in sellable items parameter.', temp, item)
				end
				i = i+1
			end
			
			if(name ~= nil and itemid ~= nil and cost ~= nil) then
				local names = {}
				table.insert(names, name)
				self:addSellableItem(names, itemid, cost)
			else
				print('[Warning] NpcSystem:', 'Parameter(s) missing for item:', name, itemid, cost)
			end
		end
	end
	
	-- Initializes the module and associates handler to it.
	function ShopModule:init(handler)
		self.npcHandler = handler
		self.yesNode = KeywordNode:new(SHOP_YESWORD, ShopModule.onConfirm, {module = self})
		self.noNode = KeywordNode:new(SHOP_NOWORD, ShopModule.onDecline, {module = self})
		self.noText = handler:getMessage(MESSAGE_DECLINE)
		
		return true
	end
	
	-- Resets the module-specific variables.
	function ShopModule:reset()
		self.amount = 0
	end
	
	-- Function used to match a number value from a string.
	function ShopModule:getCount(message)
		local ret = 1
		local b, e = string.find(message, PATTERN_COUNT)
		if b ~= nil and e ~= nil then
			ret = tonumber(string.sub(message, b, e))
		end
		if(ret <= 0) then
			ret = 1
		elseif(ret > self.maxCount) then
			ret = self.maxCount
		end
		
		return ret
	end
	
	-- Adds a new buyable item. 
	--	names = A table containing one or more strings of alternative names to this item.
	--	itemid = the itemid of the buyable item
	--	cost = the price of one single item with item id itemid ^^
	--	charges - The charges of each rune or fluidcontainer item. Can be left out if it is not a rune/fluidcontainer and no realname is needed. Default value is nil.
	--	realname - The real, full name for the item. Will be used as ITEMNAME in MESSAGE_ONBUY and MESSAGE_ONSELL if defined. Default value is nil (keywords[1]/names  will be used)
	function ShopModule:addBuyableItem(names, itemid, cost, charges, realname)
		for i, name in pairs(names) do
			local parameters = {
					itemid = itemid,
					cost = cost,
					eventType = SHOPMODULE_BUY_ITEM,
					module = self
				}
			if(realname ~= nil) then
				parameters.realname = realname
			end
			if(isItemRune(itemid) == TRUE or isItemFluidContainer(itemid) == TRUE) then
				parameters.charges = charges
			end
			keywords = {}
			table.insert(keywords, name)
			local node = self.npcHandler.keywordHandler:addKeyword(keywords, ShopModule.tradeItem, parameters)
			node:addChildKeywordNode(self.yesNode)
			node:addChildKeywordNode(self.noNode)
		end
	end
	
	-- Adds a new sellable item. 
	--	names = A table containing one or more strings of alternative names to this item.
	--	itemid = the itemid of the buyable item
	--	cost = the price of one single item with item id itemid ^^
	--	realname - The real, full name for the item. Will be used as ITEMNAME in MESSAGE_ONBUY and MESSAGE_ONSELL if defined. Default value is nil (keywords[2]/names will be used)
	function ShopModule:addSellableItem(names, itemid, cost, realname)
		for i, name in pairs(names) do
			local parameters = {
					itemid = itemid,
					cost = cost,
					eventType = SHOPMODULE_SELL_ITEM,
					module = self
				}
			if(realname ~= nil) then
				parameters.realname = realname
			end
			keywords = {}
			table.insert(keywords, 'sell')
			table.insert(keywords, name)
			local node = self.npcHandler.keywordHandler:addKeyword(keywords, ShopModule.tradeItem, parameters)
			node:addChildKeywordNode(self.yesNode)
			node:addChildKeywordNode(self.noNode)
		end
	end
	
	
	-- onModuleReset callback function. Calls ShopModule:reset()
	function ShopModule:callbackOnModuleReset()
		self:reset()
		
		return true
	end
	
	
	-- tradeItem callback function. Makes the npc say the message defined by MESSAGE_BUY or MESSAGE_SELL
	function ShopModule.tradeItem(cid, message, keywords, parameters, node)
		local module = parameters.module
		if(cid ~= module.npcHandler.focus) then
			return false
		end
		local count = module:getCount(message)
		module.amount = count
		local tmpName = nil
		if(parameters.eventType == SHOPMODULE_SELL_ITEM) then
			tmpName = node:getKeywords()[2]
		elseif(parameters.eventType == SHOPMODULE_BUY_ITEM) then
			tmpName = node:getKeywords()[1]
		end
		local parseInfo = {
				[TAG_PLAYERNAME] = getPlayerName(cid),
				[TAG_ITEMCOUNT] = module.amount,
				[TAG_TOTALCOST] = parameters.cost*module.amount,
				[TAG_ITEMNAME] = parameters.realname or tmpName
			}
		
		if(parameters.eventType == SHOPMODULE_SELL_ITEM) then
			local msg = module.npcHandler:getMessage(MESSAGE_SELL)
			msg = module.npcHandler:parseMessage(msg, parseInfo)
			module.npcHandler:say(msg)
		elseif(parameters.eventType == SHOPMODULE_BUY_ITEM) then
			local msg = module.npcHandler:getMessage(MESSAGE_BUY)
			msg = module.npcHandler:parseMessage(msg, parseInfo)
			module.npcHandler:say(msg)
		end
		
		return true
		
	end
	
	
	-- onConfirm keyword callback function. Sells/buys the actual item.
	function ShopModule.onConfirm(cid, message, keywords, parameters, node)
		local module = parameters.module
		if(cid ~= module.npcHandler.focus) then
			return false
		end
		local parentParameters = node:getParent():getParameters()
		local parseInfo = {
				[TAG_PLAYERNAME] = getPlayerName(cid),
				[TAG_ITEMCOUNT] = module.amount,
				[TAG_TOTALCOST] = parentParameters.cost*module.amount,
				[TAG_ITEMNAME] = parentParameters.realname or node:getParent():getKeywords()[1]
			}
		
		if(parentParameters.eventType == SHOPMODULE_SELL_ITEM) then
			local ret = doPlayerSellItem(cid, parentParameters.itemid, module.amount, parentParameters.cost*module.amount)
			if(ret == LUA_NO_ERROR) then
				local msg = module.npcHandler:getMessage(MESSAGE_ONSELL)
				msg = module.npcHandler:parseMessage(msg, parseInfo)
				module.npcHandler:say(msg)
			else
				local msg = module.npcHandler:getMessage(MESSAGE_NOTHAVEITEM)
				msg = module.npcHandler:parseMessage(msg, parseInfo)
				module.npcHandler:say(msg)
			end
		elseif(parentParameters.eventType == SHOPMODULE_BUY_ITEM) then
			local ret = doPlayerBuyItem(cid, parentParameters.itemid, module.amount, parentParameters.cost*module.amount, parentParameters.charges)
			if(ret == LUA_NO_ERROR) then
				local msg = module.npcHandler:getMessage(MESSAGE_ONBUY)
				msg = module.npcHandler:parseMessage(msg, parseInfo)
				module.npcHandler:say(msg)
			else
				local msg = module.npcHandler:getMessage(MESSAGE_NEEDMOREMONEY)
				msg = module.npcHandler:parseMessage(msg, parseInfo)
				module.npcHandler:say(msg)
			end
		end
		
		module.npcHandler:resetNpc()
		return true
	end
	
	-- onDecliune keyword callback function. Generally called when the player sais 'no' after wanting to buy an item. 
	function ShopModule.onDecline(cid, message, keywords, parameters, node)
		local module = parameters.module
		if(cid ~= module.npcHandler.focus) then
			return false
		end
		local parentParameters = node:getParent():getParameters()
		local parseInfo = {
				[TAG_PLAYERNAME] = getPlayerName(cid),
				[TAG_ITEMCOUNT] = module.amount,
				[TAG_TOTALCOST] = parentParameters.cost*module.amount,
				[TAG_ITEMNAME] = parentParameters.realname or node:getParent():getKeywords()[1]
			}
		local msg = module.npcHandler:parseMessage(module.noText, parseInfo)
		module.npcHandler:say(msg)
		module.npcHandler:resetNpc()
		return true
	end
end
 
After I paste your codes and say: "trade" to any npc nothing happens. Now there is no working npcs at all so I had to restore old scrpits.
 
The system of reply request doesn't let me to show my npchandler.lua script because is too long 48195 characters, i will give you with two parts.
npchandler.lua:pART1
Code:
if(NpcHandler == nil) then
	
	-- Constant talkdelay behaviors.
	TALKDELAY_NONE = 0 -- No talkdelay. Npc will reply immedeatly.
	TALKDELAY_ONTHINK = 1 -- Talkdelay handled through the onThink callback function. (Default)
	TALKDELAY_EVENT = 2 -- Not yet implemented
	
	-- Currently applied talkdelay behavior. TALKDELAY_ONTHINK is default.
	NPCHANDLER_TALKDELAY = TALKDELAY_ONTHINK
	
	
	
	-- Constant indexes for defining default messages.
	MESSAGE_GREET 		= 1 -- When the player greets the npc.
	MESSAGE_FAREWELL 	= 2 -- When the player unGreets the npc.
	MESSAGE_BUY 		= 3 -- When the npc asks the player if he wants to buy something.
	MESSAGE_SELL 		= 4 -- When the npc asks the player if he wants to sell something.
	MESSAGE_ONBUY 		= 5 -- When the player successfully buys something
	MESSAGE_ONSELL 		= 6 -- When the player successfully sells something
	MESSAGE_NEEDMOREMONEY = 7 -- When the player does not have enough money
	MESSAGE_NOTHAVEITEM = 8 -- When the player is trying to sell an item he does not have.
	MESSAGE_IDLETIMEOUT = 9 -- When the player has been idle for longer then idleTime allows.
	MESSAGE_WALKAWAY 	= 10 -- When the player walks out of the talkRadius of the npc.
	MESSAGE_ALREADYFOCUSED = 11 -- When the player already has the focus of this nopc.
	MESSAGE_PLACEDINQUEUE = 12 -- When the player has been placed in the costumer queue. 
	MESSAGE_DECLINE 	= 13 -- When the player sais no to something.
	
	-- Constant indexes for callback functions. These are also used for module callback ids.
	CALLBACK_CREATURE_APPEAR 	= 1
	CALLBACK_CREATURE_DISAPPEAR = 2
	CALLBACK_CREATURE_SAY 		= 3
	CALLBACK_ONTHINK 			= 4
	CALLBACK_GREET 				= 5
	CALLBACK_FAREWELL 			= 6
	CALLBACK_MESSAGE_DEFAULT 	= 7
	
	-- Addidional module callback ids
	CALLBACK_MODULE_INIT		= 10
	CALLBACK_MODULE_RESET		= 11
	
	
	-- Constant strings defining the keywords to replace in the default messages.
	TAG_PLAYERNAME = '|PLAYERNAME|'
	TAG_ITEMCOUNT = '|ITEMCOUNT|'
	TAG_TOTALCOST = '|TOTALCOST|'
	TAG_ITEMNAME = '|ITEMNAME|'
	TAG_QUEUESIZE = '|QUEUESIZE|'
	
	
	NpcHandler = {
		keywordHandler = nil,
		queue = nil,
		focus = 0,
		talkStart = 0,
		idleTime = 30,
		talkRadius = 5,
		talkDelayTime = 1, -- Seconds to delay outgoing messages.
		talkDelay = nil,
		callbackFunctions = nil,
		modules = nil,
		messages = {
				-- These are the default replies of all npcs. They can/should be changed individually for each npc.
			[MESSAGE_GREET] 		= 'Welcome, |PLAYERNAME|! I have been expecting you.',
			[MESSAGE_FAREWELL] 		= 'Good bye, |PLAYERNAME|!',
			[MESSAGE_BUY] 			= 'Do you want to buy |ITEMCOUNT| |ITEMNAME| for |TOTALCOST| gold coins?',
			[MESSAGE_SELL] 			= 'Do you want to sell |ITEMCOUNT| |ITEMNAME| for |TOTALCOST| gold coins?',
			[MESSAGE_ONBUY] 		= 'It was a pleasure doing business with you.',
			[MESSAGE_ONSELL] 		= 'Thank you for this item, |PLAYERNAME|.',
			[MESSAGE_NEEDMOREMONEY] = 'You do not have enough money.',
			[MESSAGE_NOTHAVEITEM] 	= 'You don\'t even have that item!',
			[MESSAGE_IDLETIMEOUT] 	= 'Next please!',
			[MESSAGE_WALKAWAY] 		= 'How rude!',
			[MESSAGE_ALREADYFOCUSED]= '|PLAYERNAME|, I am already talking to you.',
			[MESSAGE_PLACEDINQUEUE] = '|PLAYERNAME|, please wait for your turn. There are |QUEUESIZE| customers before you.',
			[MESSAGE_DECLINE]		= 'Not good enough, is it?'
		}
	}
	
	
	-- Creates a new NpcHandler with an empty callbackFunction stack. 
	function NpcHandler:new(keywordHandler)
		local obj = {}
		obj.callbackFunctions = {}
		obj.modules = {}
		obj.talkDelay = {
				message = nil,
				time = nil
			}
		obj.queue = Queue:new(obj)
		obj.keywordHandler = keywordHandler
		obj.messages = {}
		setmetatable(obj.messages, self.messages)
		self.messages.__index = self.messages
		
		setmetatable(obj, self)
		self.__index = self
		return obj
	end
	
	-- Re-defines the maximum idle time allowed for a player when talking to this npc.
	function NpcHandler:setMaxIdleTime(newTime)
		self.idleTime = newTime
	end
	
	-- Attaches a new costumer queue to this npchandler.
	function NpcHandler:setQueue(newQueue)
		self.queue = newQueue
		self.queue:setHandler(self)
	end
	
	-- Attackes a new keyword handler to this npchandler
	function NpcHandler:setKeywordHandler(newHandler)
		self.keywordHandler = newHandler
	end
	
	-- Function used to change the focus of this npc. 
	function NpcHandler:changeFocus(newFocus)
		self.focus = newFocus
		self:updateFocus()
	end
	
	-- This function should be called on each onThink and makes sure the npc faces the player it is talking to.
	--	Should also be called whenever a new player is focused.
	function NpcHandler:updateFocus()
		doNpcSetCreatureFocus(self.focus)
	end
	
	-- Used when the npc should un-focus the player. 
	function NpcHandler:releaseFocus()
		self:changeFocus(0)
	end
	
	-- Returns the callback function with the specified id or nil if no such callback function exists.
	function NpcHandler:getCallback(id)
		local ret = nil
		if(self.callbackFunctions ~= nil) then
			ret = self.callbackFunctions[id]
		end
		return ret
	end
	
	-- Changes the callback function for the given id to callback.
	function NpcHandler:setCallback(id, callback)
		if(self.callbackFunctions ~= nil) then
			self.callbackFunctions[id] = callback
		end
	end
	
	-- Adds a module to this npchandler and inits it.
	function NpcHandler:addModule(module)
		if(self.modules ~= nil) then
			table.insert(self.modules, module)
			module:init(self)
		end
	end
	
	-- Calls the callback function represented by id for all modules added to this npchandler with the given arguments.
	function NpcHandler:processModuleCallback(id, ...)
		local ret = true
		for i, module in pairs(self.modules) do
			local tmpRet = true
			if(id == CALLBACK_CREATURE_APPEAR and module.callbackOnCreatureAppear ~= nil) then
				tmpRet = module:callbackCreatureAppear(unpack(arg))
				
			elseif(id == CALLBACK_CREATURE_DISAPPEAR and module.callbackOnCreatureDisappear ~= nil) then
				tmpRet = module:callbackCreatureDisappear(unpack(arg))
				
			elseif(id == CALLBACK_CREATURE_SAY and module.callbackOnCreatureSay ~= nil) then
				tmpRet = module:callbackCreatureSay(unpack(arg))
				
			elseif(id == CALLBACK_ONTHINK and module.callbackOnThink ~= nil) then
				tmpRet = module:callbackOnThink(unpack(arg))
				
			elseif(id == CALLBACK_GREET and module.callbackOnGreet ~= nil) then
				tmpRet = module:callbackOnGreet(unpack(arg))
				
			elseif(id == CALLBACK_FAREWELL and module.callbackOnFarewell ~= nil) then
				tmpRet = module:callbackOnFarewell(unpack(arg))
				
			elseif(id == CALLBACK_MESSAGE_DEFAULT and module.callbackOnMessageDefault ~= nil) then
				tmpRet = module:callbackOnMessageDefault(unpack(arg))
				
			elseif(id == CALLBACK_MODULE_RESET and module.callbackOnModuleReset ~= nil) then
				tmpRet = module:callbackOnModuleReset(unpack(arg))
			end
			if(not tmpRet) then
				ret = false
				break
			end
		end
		return ret
	end
	
	-- Returns the message represented by id.
	function NpcHandler:getMessage(id)
		local ret = nil
		if(self.messages ~= nil) then
			ret = self.messages[id]
		end
		return ret
	end
	
	-- Changes the default response message with the specified id to newMessage.
	function NpcHandler:setMessage(id, newMessage)
		if(self.messages ~= nil) then
			self.messages[id] = newMessage
		end
	end

- - - Updated - - -

PART2 npchandler.lua:
Code:
-- Translates all message tags found in msg using parseInfo
	function NpcHandler:parseMessage(msg, parseInfo)
		local ret = msg
		for search, replace in pairs(parseInfo) do
			ret = string.gsub(ret, search, replace)
		end
		return ret
	end
	
	-- Makes sure the npc un-focuses the furrently focused player, and greets the next player in the queue is it is not empty.
	function NpcHandler:unGreet()
		if(self.focus == 0) then
			return
		end
		local callback = self:getCallback(CALLBACK_FAREWELL)
		if(callback == nil or callback()) then
			if(self:processModuleCallback(CALLBACK_FAREWELL)) then
				if(self.queue == nil or not self.queue:greetNext()) then
					local msg = self:getMessage(MESSAGE_FAREWELL)
					local parseInfo = { [TAG_PLAYERNAME] = getPlayerName(self.focus) }
					msg = self:parseMessage(msg, parseInfo)
					self:say(msg)
					self:releaseFocus()
				end
			end
		end
	end
	
	-- Greets a new player. 
	function NpcHandler:greet(cid)
		if(cid ~= 0) then
			local callback = self:getCallback(CALLBACK_GREET)
			if(callback == nil or callback(cid)) then
				if(self:processModuleCallback(CALLBACK_GREET, cid)) then
					local msg = self:getMessage(MESSAGE_GREET)
					local parseInfo = { [TAG_PLAYERNAME] = getPlayerName(cid) }
					msg = self:parseMessage(msg, parseInfo)
					self:say(msg)
				else
					return
				end
			else
				return
			end
		end
		self:changeFocus(cid)
	end
	
	-- Handles onCreatureAppear events. If you with to handle this yourself, please use the CALLBACK_CREATURE_APPEAR callback.
	function NpcHandler:onCreatureAppear(cid)
		local callback = self:getCallback(CALLBACK_CREATURE_APPEAR)
		if(callback == nil or callback(cid)) then
			if(self:processModuleCallback(CALLBACK_CREATURE_APPEAR, cid)) then
				
			end
		end
	end
	
	-- Handles onCreatureDisappear events. If you with to handle this yourself, please use the CALLBACK_CREATURE_DISAPPEAR callback.
	function NpcHandler:onCreatureDisappear(cid)
		local callback = self:getCallback(CALLBACK_CREATURE_DISAPPEAR)
		if(callback == nil or callback(cid)) then
			if(self:processModuleCallback(CALLBACK_CREATURE_DISAPPEAR, cid)) then
				if(self.focus == cid) then
					self:unGreet()
				end
			end
		end
	end
	
	-- Handles onCreatureSay events. If you with to handle this yourself, please use the CALLBACK_CREATURE_SAY callback.
	function NpcHandler:onCreatureSay(cid, msgtype, msg)
		local callback = self:getCallback(CALLBACK_CREATURE_SAY)
		if(callback == nil or callback(cid, msgtype, msg)) then
			if(self:processModuleCallback(CALLBACK_CREATURE_SAY, cid, msgtype, msg)) then
				if(not self:isInRange(cid)) then
					return
				end
				if(self.keywordHandler ~= nil) then
					local ret = self.keywordHandler:processMessage(cid, msg)
					if(not ret) then
						local callback = self:getCallback(CALLBACK_MESSAGE_DEFAULT)
						if(callback ~= nil and callback(cid, msgtype, msg)) then
							self.talkStart = os.time()
						end
					else
						self.talkStart = os.time()
					end
				end
			end
		end
	end
	
	-- Handles onThink events. If you with to handle this yourself, please use the CALLBACK_ONTHINK callback.
	function NpcHandler:onThink()
		local callback = self:getCallback(CALLBACK_ONTHINK)
		if(callback == nil or callback()) then
			
			if(NPCHANDLER_TALKDELAY == TALKDELAY_ONTHINK and self.talkDelay.time ~= nil and self.talkDelay.message ~= nil and os.time() >= self.talkDelay.time) then
				selfSay(self.talkDelay.message)
				self.talkDelay.time = nil
				self.talkDelay.message = nil
			end
			
			if(self:processModuleCallback(CALLBACK_ONTHINK)) then
				if(self.focus ~= 0) then
					if(not self:isInRange(self.focus)) then
						self:onWalkAway(self.focus)
					elseif(os.time()-self.talkStart > self.idleTime) then
						self:unGreet()
					else
						self:updateFocus()
					end
				end
			end
		end
	end
	
	-- Tries to greet the player iwth the given cid. This function does not override queue order, current focus etc.
	function NpcHandler:onGreet(cid)
		if(self:isInRange(cid)) then
			if(self.focus == 0) then
				self:greet(cid)
			elseif(cid == self.focus) then
				local msg = self:getMessage(MESSAGE_ALREADYFOCUSED)
				local parseInfo = { [TAG_PLAYERNAME] = getPlayerName(cid) }
				msg = self:parseMessage(msg, parseInfo)
				self:say(msg)
			else
				if(not self.queue:isInQueue(cid)) then
					self.queue:push(cid)
				end
				local msg = self:getMessage(MESSAGE_PLACEDINQUEUE)
				local parseInfo = { [TAG_PLAYERNAME] = getPlayerName(cid), [TAG_QUEUESIZE] = self.queue:getSize() }
				msg = self:parseMessage(msg, parseInfo)
				self:say(msg)
			end
		end
	end
	
	-- Simply calls the underlying unGreet function. 
	function NpcHandler:onFarewell()
		self:unGreet()
	end
	
	-- Should be called on this npc's focus if the distance to focus is greater then talkRadius.
	function NpcHandler:onWalkAway(cid)
		if(cid == self.focus) then
			local callback = self:getCallback(CALLBACK_CREATURE_DISAPPEAR)
			if(callback == nil or callback()) then
				if(self:processModuleCallback(CALLBACK_CREATURE_DISAPPEAR, cid)) then
					if(self.queue == nil or not self.queue:greetNext()) then
						local msg = self:getMessage(MESSAGE_WALKAWAY)
						local parseInfo = { [TAG_PLAYERNAME] = getPlayerName(self.focus) }
						msg = self:parseMessage(msg, parseInfo)
						self:say(msg)
						self:releaseFocus()
					end
				end
			end
		end
	end
	
	-- Returns true if cid is within the talkRadius of this npc.
	function NpcHandler:isInRange(cid)
		local playerPos = getPlayerPosition(cid)
		if playerPos == LUA_ERROR or playerPos == LUA_NO_ERROR then
			return false
		end
		
		local sx, sy, sz = selfGetPosition()
		local dx = math.abs(sx-playerPos.x)
		local dy = math.abs(sy-playerPos.y)
		local dz = math.abs(sz-playerPos.z)
		
		local dist = (dx^2 + dy^2)^0.5
		
		return (dist <= self.talkRadius and dz == 0)
	end
	
	-- Resets the npc into it's initial state (in regard of the keyrodhandler). 
	--	All modules are also receiving a reset call through their callbackOnModuleReset function.
	function NpcHandler:resetNpc()
		if(self:processModuleCallback(CALLBACK_MODULE_RESET)) then
			self.keywordHandler:reset()
		end
	end
	
	
	-- Makes the npc represented by this instance of NpcHandler say something. 
	--	This implements the currently set type of talkdelay.
	--	shallDelay is a boolean value. If it is false, the message is not delayed. Default value is true.
	function NpcHandler:say(message, shallDelay)
		if(shallDelay == nil) then
			shallDelay = true
		end
		if(NPCHANDLER_TALKDELAY == TALKDELAY_NONE or shallDelay == false) then
			selfSay(message)
			return
		end
		self.talkDelay.message = message
		self.talkDelay.time = os.time()+self.talkDelayTime
	end
	
	
end

- - - Updated - - -

npcsystem.lua:
Code:
if(NpcSystem == nil) then
	
	-- Loads the underlying classes of the npcsystem.
	dofile('data/npc/scripts/lib/npcsystem/keywordhandler.lua')
	dofile('data/npc/scripts/lib/npcsystem/queue.lua')
	dofile('data/npc/scripts/lib/npcsystem/npchandler.lua')
	dofile('data/npc/scripts/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
	
	-- Gerrting and unGreeting keywords. For mor information look at the top of modules.lua
	FOCUS_GREETWORDS = {'hi', 'hello'}
	FOCUS_FAREWELLWORDS = {'bye', 'farewell', 'cya'}
	
	
	-- 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 mor information, look at the top of npchandler.lua.
	NPCHANDLER_TALKDELAY = TALKDELAY_ONTHINK
	
	-- 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('talkdelaytime')
		if(ret ~= nil) then
			npcHandler.talkDelayTime = 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_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_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_needmoremoney')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_NEEDMOREMONEY, ret)
		end
		local ret = NpcSystem.getParameter('message_nothaveitem')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_NOTHAVEITEM, 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_decline')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_DECLINE, 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 ~= 0 and module.parseParameters ~= nil) then
					local instance = module:new()
					npcHandler:addModule(instance)
					instance:parseParameters()
				end
			end
		end
		
	end
end

queue.lua:
Code:
if(Queue == nil) then
	
	Queue = {
		customers = nil,
		handler = nil,
	}
	
	-- Creates a new queue, connected to the given NpcHandler handler
	function Queue:new(handler)
		local obj = {}
		obj.handler = handler
		obj.customers = {}
		setmetatable(obj, self)
		self.__index = self
		return obj
	end
	
	-- Assigns a new handler to this queue.
	function Queue:setHandler(newHandler)
		self.handler = newHandler
	end
	
	-- Pushes a new cid onto the tail of this queue.
	function Queue:push(cid)
		if(isPlayer(cid)) then
			table.insert(self.customers, cid)
		end
	end
	
	-- Returns true if the given cid is already in the queue.
	function Queue:isInQueue(cid)
		return (isInArray(self.customers, cid) == TRUE)
	end
	
	-- Removes and returns the first cid from the queue
	function Queue:pop()
		return table.remove(self.customers, 1)
	end
	
	-- Returns the first cid in the queue, but does not remove it!
	function Queue:peek() 
		return self.customers[1]
	end
	
	-- Returns true if htis queue is empty.
	function Queue:empty()
		return(self:peek() == nil)
	end
	
	-- Returns the amount of players currently in the queue.
	function Queue:getSize()
		return table.maxn(self.customers)
	end
	
	-- Returns true if the creature with the given cid can be greeted by this npc.
	function Queue:canGreet(cid)
		if(isPlayer(cid)) then
			return self.handler:isInRange(cid)
		else
			return false
		end
	end
	
	-- Greets the player with the given cid.
	function Queue:greet(cid)
		if(self.handler ~= nil) then
			self.handler:greet(cid)
		else
			error('No handler assigned to queue!')
		end
	end
	
	-- Makes sure the next greetable player in the queue is greeted.
	function Queue:greetNext()
		while (not self:empty()) do
			local nextPlayer = self:pop()
			if(self:canGreet(nextPlayer)) then
				if(callback == nil or callback(nextPlayer)) then
					self:greet(nextPlayer)
					return true
				end
			end
		end
		return false
	end
	
end
.

- - - Updated - - -

After I paste your codes and say: "trade" to any npc nothing happens. Now there is no working npcs at all so I had to restore old scrpits.

Yes, because you have a bad argument in modules.lua and npchandler.lua

- - - Updated - - -

And there is another lua file, maybe you will need as well:

yourots/data/npc/scripts/libs/

npc.lua:
Code:
 -- Include external classes.
dofile('data/npc/scripts/lib/npcsystem/npcsystem.lua')

-- get the distance to a creature
function getDistanceToCreature(id)
	if id == 0 or id == nil then
		selfGotoIdle()
	end
	
	cx, cy, cz = creatureGetPosition(id)
	sx, sy, sz = selfGetPosition()
	
	if cx == nil then
		return nil
	end
	
	return math.max(math.abs(sx-cx), math.abs(sy-cy))
end

-- do one step to reach position
function moveToPosition(x,y,z)
	selfMoveTo(x, y, z)
end

-- do one step to reach creature
function moveToCreature(id)
	if id == 0 or id == nil then
		selfGotoIdle()
	end
	tx,ty,tz=creatureGetPosition(id)
	if tx == nil then
		selfGotoIdle()
	else
	   moveToPosition(tx, ty, tz)
   end
end

-- stop talking
function selfGotoIdle()
	following = false
	attacking = false
	selfAttackCreature(0)
	target = 0
end

-- getCount function by Jiddo
function getCount(msg)
	b, e = string.find(msg, "%d+")
	
	if b == nil or e == nil then
		count = 1
	else
		count = tonumber(string.sub(msg, b, e))
	end
	
	if count > 2000 then
		count = 2000
	elseif count == 0 then
		count = 1
	end
	
	return count
end

-- buy an item
function buy(cid, itemid, count, cost)
	cost = count*cost
	amount = count
	if doPlayerRemoveMoney(cid, cost) == 1 then
		if getItemStackable(itemid) then
			while count > 100 do
				doPlayerAddItem(cid, itemid, 100)
				count = count - 100
			end
			
			doPlayerAddItem(cid, itemid, count) -- add the last items, if there is left
		else
			while count > 0 do
				doPlayerAddItem(cid, itemid, 1)
				count = count - 1
			end
		end
		
		if amount <= 1 then
			selfSay('Here is your '.. getItemName(itemid) .. '!')
		else
			selfSay('Here are your '.. amount ..' '.. getItemName(itemid) .. 's!')		
		end
	else
		selfSay('Sorry, you do not have enough money.')
	end
end

function buyFluidContainer(cid, itemid, count, cost, fluidtype)
	cost = count*cost
	amount = count
	if doPlayerRemoveMoney(cid, cost) == 1 then
		while count > 0 do
			doPlayerAddItem(cid, itemid, fluidtype)
			count = count - 1
		end
		
		if amount <= 1 then
			selfSay('Here is your '.. getItemName(itemid) .. '!')
		else
			selfSay('Here are your '.. amount ..' '.. getItemName(itemid) .. 's!')		
		end
	else
		selfSay('Sorry, you do not have enough money.')
	end
end

function buyContainer(cid, container, itemid, count, money)
	if doPlayerRemoveMoney(cid, money) == 1 then
		bp = doPlayerAddItem(cid, container, 1)
		x = 0
		
		while x < 20 do
			doAddContainerItem(bp, itemid, count)
			x = x + 1
		end
		
		selfSay('Here you are.')
	else
		selfSay('Sorry, you don\'t have enough money.')
	end
end 

-- sell an item
function sell(cid, itemid, count, cost)
	cost = count*cost
	if doPlayerRemoveItem(cid, itemid, count) == 1 then
		doPlayerAddMoney(cid, cost)
		
		if cost > 0 then
			selfSay('You couldn\'t retrieve '.. cost ..' gold pieces, please contact the admin.')
		end
		
		if count <= 1 then
			selfSay('Thanks for this '.. getItemName(itemid) .. '!')
		else
			selfSay('Thanks for these '.. count..' '.. getItemName(itemid) .. 's!')		
		end
	else
		selfSay('Sorry, you do not have this item.')
	end
end

-- pay for anything?
function pay(cid, cost)
	if doPlayerRemoveMoney(cid, cost) == 1 then
		return true
	else
		return false
	end
end

-- learn spell
function learnSpell(cid, spell, cost)
	x,y,z = creatureGetPosition(cid)
	if doPlayerLearnSpell(cid, spell) == 1 then
		if doPlayerRemoveMoney(cid, cost) == 1 then
			doSendMagicEffect({x=x, y=y, z=z}, 14)
			selfSay('To use it say: '.. spell ..'.')
		else
			selfSay('Sorry, you do not have this item.')
		end
	else
		selfSay('You already know this spell.')
	end
end

-- Travel player
function travel(cid, x, y, z)
	destpos = {x = x, y = y, z = z}
	doTeleportThing(cid, destpos)
	doSendMagicEffect(destpos, 10)
end

-- add all addons
function addon(cid, addon)
	if getPlayerSex(cid) == 1 then
		for x = 128, 134 do
			doPlayerAddAddon(cid, x, addon)
		end

		for y = 143, 146 do
			doPlayerAddAddon(cid, y, addon)
		end
		
		for z = 151, 154 do
			doPlayerAddAddon(cid, z, addon)
		end
	else	
		for x = 136, 142 do
			doPlayerAddAddon(cid, x, addon)
		end

		for y = 147, 150 do
			doPlayerAddAddon(cid, y, addon)
		end
		
		for z = 155, 158 do
			doPlayerAddAddon(cid, z, addon)
		end
	end
end

function msgcontains(txt, str)
	return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end
 
Last edited:
Still not working:

[02/08/2013 03:20:42] [Error - Npc interface]
[02/08/2013 03:20:42] data/npc/lib/npc.lua
[02/08/2013 03:20:42] Description:
[02/08/2013 03:20:42] cannot open data/npc/scripts/lib/npcsystem/keywordhandler.lua: No such file or directory
[02/08/2013 03:20:42] Warning: [NpcScriptInterface::loadNpcLib] Cannot load data/npc/lib/npc.lua

[02/08/2013 03:20:42] [Error - Npc interface]
[02/08/2013 03:20:42] data/npc/scripts/explorer1.lua
[02/08/2013 03:20:42] Description:
[02/08/2013 03:20:42] data/npc/scripts/explorer1.lua:1: attempt to index global 'KeywordHandler' (a nil value)
[02/08/2013 03:20:43] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/explorer1.lua


[02/08/2013 03:20:43] [Error - Npc interface]
[02/08/2013 03:20:43] data/npc/scripts/itemsmissions.lua
[02/08/2013 03:20:43] Description:
[02/08/2013 03:20:43] data/npc/scripts/itemsmissions.lua:2: attempt to index global 'KeywordHandler' (a nil value)
[02/08/2013 03:20:43] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/itemsmissions.lua


[02/08/2013 03:20:43] [Error - Npc interface]
[02/08/2013 03:20:43] data/npc/scripts/furniture.lua
[02/08/2013 03:20:43] Description:
[02/08/2013 03:20:43] data/npc/scripts/furniture.lua:1: attempt to index global 'KeywordHandler' (a nil value)
[02/08/2013 03:20:43] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/furniture.lua


[02/08/2013 03:20:43] [Error - Npc interface]
[02/08/2013 03:20:43] data/npc/scripts/default.lua
[02/08/2013 03:20:43] Description:
[02/08/2013 03:20:43] data/npc/scripts/default.lua:1: attempt to index global 'KeywordHandler' (a nil value)
[02/08/2013 03:20:43] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/default.lua


[02/08/2013 03:20:43] [Error - Npc interface]
[02/08/2013 03:20:43] data/npc/scripts/temeriatp.lua
[02/08/2013 03:20:43] Description:
[02/08/2013 03:20:43] data/npc/scripts/temeriatp.lua:1: attempt to index global 'KeywordHandler' (a nil value)
[02/08/2013 03:20:43] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/temeriatp.lua

[02/08/2013 03:20:43] [Notice - Npc::Npc] NPC Name: Soraka - autowalk has been deprecated, use walkinterval.

[02/08/2013 03:20:43] [Error - Npc interface]
[02/08/2013 03:20:43] data/npc/scripts/soraka.lua
[02/08/2013 03:20:43] Description:
[02/08/2013 03:20:43] data/npc/scripts/soraka.lua:1: attempt to index global 'KeywordHandler' (a nil value)
[02/08/2013 03:20:43] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/soraka.lua


[02/08/2013 03:20:43] [Error - Npc interface]
[02/08/2013 03:20:43] data/npc/scripts/default.lua
[02/08/2013 03:20:43] Description:
[02/08/2013 03:20:43] data/npc/scripts/default.lua:1: attempt to index global 'KeywordHandler' (a nil value)
[02/08/2013 03:20:43] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/default.lua


[02/08/2013 03:20:43] [Error - Npc interface]
[02/08/2013 03:20:43] data/npc/scripts/addoner.lua
[02/08/2013 03:20:43] Description:
[02/08/2013 03:20:43] data/npc/scripts/addoner.lua:1: attempt to index global 'KeywordHandler' (a nil value)
[02/08/2013 03:20:43] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/addoner.lua


[02/08/2013 03:20:43] [Error - Npc interface]
[02/08/2013 03:20:43] data/npc/scripts/Rashid.lua
[02/08/2013 03:20:43] Description:
[02/08/2013 03:20:43] data/npc/scripts/Rashid.lua:1: attempt to index global 'KeywordHandler' (a nil value)
[02/08/2013 03:20:43] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Rashid.lua


[02/08/2013 03:20:43] [Error - Npc interface]
[02/08/2013 03:20:43] data/npc/scripts/promotion.lua
[02/08/2013 03:20:43] Description:
[02/08/2013 03:20:43] data/npc/scripts/promotion.lua:1: attempt to index global 'KeywordHandler' (a nil value)
[02/08/2013 03:20:43] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/promotion.lua


[02/08/2013 03:20:43] [Error - Npc interface]
[02/08/2013 03:20:43] data/npc/scripts/default.lua
[02/08/2013 03:20:43] Description:
[02/08/2013 03:20:43] data/npc/scripts/default.lua:1: attempt to index global 'KeywordHandler' (a nil value)
[02/08/2013 03:20:43] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/default.lua


[02/08/2013 03:20:43] [Error - Npc interface]
[02/08/2013 03:20:43] data/npc/scripts/old man.lua
[02/08/2013 03:20:43] Description:
[02/08/2013 03:20:43] data/npc/scripts/old man.lua:1: attempt to index global 'KeywordHandler' (a nil value)
[02/08/2013 03:20:43] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/old man.lua


[02/08/2013 03:20:43] [Error - Npc interface]
[02/08/2013 03:20:43] data/npc/scripts/teleporter.lua
[02/08/2013 03:20:43] Description:
[02/08/2013 03:20:43] data/npc/scripts/teleporter.lua:1: attempt to index global 'KeywordHandler' (a nil value)
[02/08/2013 03:20:43] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/teleporter.lua
 
Back
Top Bottom