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

Paramter 'keyword_reply3' missing. Skipping...

Dankoo

Active Member
Joined
Sep 4, 2010
Messages
1,007
Reaction score
27
Crap, already searched my npc libs and I can't find where to put keyword_reply3 ¬¬"

here's one part of my modules.lua:

LUA:
	-- 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
	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

Where else it could be?

Here's one example of keyword_reply3 on a NPC:

LUA:
		<parameter key="keywords" value="quest;help;blood herb" />
		<parameter key="keyword_reply1" value="I have always wanted one of those blood herbs, and I have a chest in my room. You can have the thing in there if you give me a blood herb..." />
		<parameter key="keyword_reply2" value="I have always wanted one of those blood herbs, and I have a chest in my room. You can have the thing in there if you give me a blood herb..." />
<parameter key="keyword_reply3" value="Do you have it!? No! I don't trust you! What is my name then?" />
 
Crap, I have like 100+ NPCs

It's the only way? rsrs

Thanks for the help

REP+

-- Edit --

Thanks a lot Grehy, it works :]

I've opened every NPC and put this ; but I've missed a few, there's only 3~4 messages like that showing up, at first there was a lot of them lol

Thanks again
 
Last edited:
Back
Top