• 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 Private system

Pietia

Active Member
Joined
Jan 13, 2008
Messages
2,147
Reaction score
49
Location
Poland
hello all how to make this script compatible with private npc system ? because when some1 say edron for example and u say yes it get u to edron ... same is with npc who is selling time rings too here are 2 scripts
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
        
        
        -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions!
	local travelNode = keywordHandler:addKeyword({'venore'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Venore for 150 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 150, destination = {x=32952, y=32022, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
        
	local travelNode = keywordHandler:addKeyword({'darashia'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Darashia for 100 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 100, destination = {x=33289, y=32480, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
        
	local travelNode = keywordHandler:addKeyword({'edron'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Edron for 160 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 160, destination = {x=33173, y=31764, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
        
	local travelNode = keywordHandler:addKeyword({'port hope'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Port Hope for 70 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 70, destination = {x=32527, y=32784, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
        
        keywordHandler:addKeyword({'sail'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to Venore, Port Hope, Darashia and Edron.'})
        keywordHandler:addKeyword({'job'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I am the captain of this ship.'})
        keywordHandler:addKeyword({'travel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can only take you to Venore, Port Hope, Darashia and Edron.'})
        -- Makes sure the npc reacts when you say hi, bye etc.
        npcHandler:addModule(FocusModule:new())
Code:
<npc name="Eremo" script="data/npc/scripts/bles.lua" WALKINTERVAL="1500" floorchange="0" access="5" level="1" maglevel="1">
	<health now="150" max="150"/>
	<look type="134" head="114" body="113" legs="113" feet="113" addons="3" corpse="2212"/>
	<parameters>
		<parameter key="module_shop" value="1" />
		<parameter key="message_greet" value="Hello |PLAYERNAME|. I sell amulet of loss,blessings ,time ring,energy ring,stealth ring,life ring, ring of healing, club ring ,sword ring and axe ring." />
		<parameter key="shop_buyable" value="vial,2006,10;flask,2006,10" />
		<parameter key="shop_buyable" value="amulet of loss,2173,50000;time ring,2169,2000;energy ring,2167,2000;stealth ring,2165,2000;life ring,2168,2000;ring of healing,2214,4000;axe ring,2208,200;club ring,2209,200;sword ring,2207,200;stone skin,2197,5000,5" />
		<parameter key="keywords" value="name;offer;help;mission;quest;fuck;shit;basterd;retard;gay" />
<parameter key="keyword_reply2" value="My name isen't inportant at the moment," />
<parameter key="keyword_reply3" value="I sell blessings." />
<parameter key="keyword_reply4" value="I amsorry but i cant help u!" />
<parameter key="keyword_reply5" value="A mission.. Are you trying to hit me?" />
<parameter key="keyword_reply6" value="I am sorry but u are at the wrong place, try to ask my colleague." />
<parameter key="keyword_reply7" value="If you keep talking like that i will fuck up your face!" />
<parameter key="keyword_reply8" value="Oh my god, dit u shit your pants again |PLAYERNAME|?" />
<parameter key="keyword_reply9" value="Why are u herassing me i dit nothing wrong!" />
<parameter key="keyword_reply10" value="Who are u calling a retard, you retarted fast ass!" />
<parameter key="keyword_reply11" value="I'm not gay, you bloody basterd!" />
		
	</parameters>
</npc>
so any1 please i'm need help because people are abusing it :S
 
Back
Top