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

Again a help here

brunolopes

New Member
Joined
Nov 8, 2009
Messages
49
Reaction score
1
Hello!
I am wanting to use the old npc system BEFORE the 8.2x update.

Is that okay, I changed a option in lib/npcsystem to use this system:

Code:
NPCHANDLER_CONVBEHAVIOR = CONVERSATION_DEFAULT

But now, the NPC is greeting the player with two messages!!

Code:
18:44 Wernardo: Welcome, Bruno! I have been expecting you.
18:44 Wernardo: Welcome, Bruno! I have been expecting you.

Is there a way to fix that?
I only want to use this system because I don't want a multi-focus...
 
Modify your npchandler.lua :p

remove line in red:
Code:
	-- 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] = getCreatureName(cid) }
					msg = self:parseMessage(msg, parseInfo)

					self:say(msg)
					self:addFocus(cid)
					[B][COLOR="Red"]self:say(msg, cid)[/COLOR][/B]
				end
			end
		end
	end
 
Back
Top