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

Boat man check for pz?

Xerez

New Member
Joined
Mar 6, 2008
Messages
45
Reaction score
0
Is it possible to make my boat/carpet man to check if the player is pz locked before he lets him travel?

Code:
<?xml version="1.0"?>
<npc name="Mohammed" script="data/npc/scripts/carpet.lua" autowalk="0" floorchange="0" access="5">
	<health now="150" max="150"/>
	<look type="133" head="20" body="120" legs="75" feet="13" addons="3"/>
	<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>

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



-- Makes sure the npc reacts when you say hi, bye etc.
npcHandler:addModule(FocusModule:new())
 
in places where you want npc to check if player got pz
like before he will ask if you want go somewhere :p
and if he will be pz you can write "else selfsay~~ you got pz .. sry :p"
 
Back
Top