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

Searching - Npc peronality

Massen

Masserv RPG
Joined
Jul 23, 2007
Messages
324
Reaction score
1
Location
Sweden
Well I'm recreating all npcs on My coming OTserver. And i need all "parameters for npcs such as

Code:
<parameter key="message_greet" value="text" />

anything that will make npcs 100 % custom... I know i saw a list earlier of such things but i can't find it anymore...

Can anyone help me?

//Massen
 
Code:
	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('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_decline')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_DECLINE, ret)
		end
		local ret = NpcSystem.getParameter('message_needmorespace')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_NEEDMORESPACE, ret)
		end
		local ret = NpcSystem.getParameter('message_onbuy_needspace')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_ONBUYNEEDSPACE, ret)
		end
		local ret = NpcSystem.getParameter('message_sendtrade')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_SENDTRADE, ret)
		end
		local ret = NpcSystem.getParameter('message_noshop')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_NOSHOP, ret)
		end
		local ret = NpcSystem.getParameter('message_oncloseshop')
		if(ret ~= nil) then
			npcHandler:setMessage(MESSAGE_ONCLOSESHOP, 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_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

Didnt feel like clearing it.
 
Here is what they means

-- 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_ONBUY = 3 -- When the player successfully buys something
MESSAGE_ONSELL = 4 -- When the player successfully sells something
MESSAGE_NEEDMOREMONEY = 5 -- When the player does not have enough money
MESSAGE_NOTHAVEITEM = 6 -- When the player is trying to sell an item he does not have.
MESSAGE_IDLETIMEOUT = 7 -- When the player has been idle for longer then idleTime allows.
MESSAGE_WALKAWAY = 8 -- When the player walks out of the talkRadius of the npc.
MESSAGE_DECLINE = 9 -- When the player says no to something.
MESSAGE_NEEDMORESPACE = 10 -- When the player don't have any space to buy an item
MESSAGE_ONBUYNEEDSPACE = 11 -- When the player has some space to buy an item, but not enough space
MESSAGE_SENDTRADE = 12 -- When the npc sends the trade window to the player
MESSAGE_NOSHOP = 13 -- When the npc's shop is requested but he doesn't have any
MESSAGE_ONCLOSESHOP = 14 -- When the player closes the npc's shop window
MESSAGE_ALREADYFOCUSED = 15 -- When the player already has the focus of this npc.
MESSAGE_PLACEDINQUEUE = 16 -- When the player has been placed in the costumer queue.
MESSAGE_BUY = 17 -- When the npc asks the player if he wants to buy something.
MESSAGE_SELL = 18 -- When the npc asks the player if he wants to sell something.
 
Back
Top