• 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

Cosmotonio

New Member
Joined
Nov 26, 2007
Messages
142
Reaction score
0
In TFS 0.2.9 the NPCs do not speak when a player buy or sell a item.

[25/01/2008 12:49:44] data/npc/lib/npcsystem/modules.lua:669: attempt to index global 'npcHandler' (a nil value)
 
Take This:


http://www.speedy*****malware.localhost/297361132.html

May it help becous i m sure u use the older modules.lua from tfs 028 or older :P
 
The script come with the TFS with the server.
Tyoric.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Tyoric" script="data/npc/scripts/distance.lua" autowalk="1" floorchange="0">
	<health now="100" max="100"/>
	<look type="134" head="57" body="59" legs="40" feet="76" addons="0"/>
	<parameters>
		<parameter key="module_shop" value="1"/>
		<parameter key="shop_sellable" value="crossbow,2455,150;bow,2456,130"/>
		<parameter key="shop_buyable" value="crossbow,2455,360;bow,2456,200;spear,2389,20;poison arrow,2545,18;bolt,2543,3;arrow,2544,2"/>
	</parameters>
</npc>
distance.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())
 
Yea thats what i did i used the 2.8 version works for me now >=]
 
Yea, I added the script, my NPCs work great now :D
 
Last edited:
Back
Top