• 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 help.

Xerez

New Member
Joined
Mar 6, 2008
Messages
45
Reaction score
0
Code:
<npc name="Mohammed" script="data/npc/scripts/carpet.lua" autowalk="1" floorchange="0" access="5" level="1" maglevel="1">
	<health now="150" max="150"/>
	<look type="133" head="20" body="120" legs="75" feet="13"/>
	<parameters>
<parameter key="message_greet" value="Hello |PLAYERNAME|, I can send you to Malmoe for a small fee." />
<parameter key="message_farewell" value="Good bye |PLAYERNAME|, May the spirits of Warberg be with you!" />

		<parameter key="module_travel" value="1" />
		<parameter key="travel_destinations"value="malmoe,238,564,6,50,true" />
		
	</parameters>
</npc>

How can I make this NPC check for PZ lock and dont let the player travel if he is PZ locked?
 
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
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
-- OTServ event handling functions end

npcHandler:addModule(FocusModule:new())

This is the carpet.lua I got when i downloaded the npc :P anyone knows how to do it?
 
Back
Top