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

Modification in Travel Module [TFS 0.3]

Nutaharion

New Member
Joined
Oct 29, 2008
Messages
133
Reaction score
4
Location
Poland
Hello,

I need modification in Travel Module in my TFS server, I tried it by myself but always there were so many problems with IF and END ;/

If travel cost = 0 then NPC need to say "Do you want to travel to XXX?" but if travel cost is <> 0 then
"Do you want to travel to ' .. keywords[1] .. ' for ' .. parameters.cost .. ' gold coins"

I think that all those changes can be made in modules.lua so

Code:
	function TravelModule.travel(cid, message, keywords, parameters, node)
		local module = parameters.module
		if(not module.npcHandler:isFocused(cid)) then
			return false
		end

		module.npcHandler:say('Do you want to travel to ' .. keywords[1] .. ' for ' .. parameters.cost .. ' gold coins?', cid)
		return true
	end

I'm waiting for help ;p
 
Lua:
module.npcHandler:say((parameters.cost > 0 and 'Do you want to travel to ' .. keywords[1] .. ' for ' .. parameters.cost .. ' gold coins?' or 'Do you want to travel to ' .. keywords[1] .. '?'), cid)
 
Back
Top