• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Travel npc, storage value

TriamerA

The Mystic One.
Joined
Nov 16, 2008
Messages
1,257
Reaction score
18
Location
Poland
Pytanko, da sie przerobić tak, aby npc przenosił nas tylko wtedy gdy mamy pewien storage value? Jeżeli tak to jak, jeżeli nie, jaki jest inny najlepszy sposób na to?

Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

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

local travelNode = keywordHandler:addKeyword({'peg leg'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ohhhh. So... <lowers his voice> you know who sent you so I sail you to you know where. <wink> <wink> It will cost 50 gold to cover my expenses. Is it that what you wish?'})
	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 50, destination = {x=32234, y=32610, z=7} })
	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Mrgh'})

keywordHandler:addKeyword({'travel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Great Kingdom is my destination.'})

npcHandler:addModule(FocusModule:new())
 
o npc takiego nie widzialem ale mozesz zrobic kratke albo drzwi ktore przepuszcza jezeli ma sie dane storage.
 
O ile dobrze pamietam narozia miala cos w stylu donator i po wykupieniu go dostawales acces na 3 wyspy. Poszukaj i ewentualnie edytuj.
 
Back
Top