How do i change this script so NPC will talk/teleport onlny 400lvl and more ?
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid)
npcHandlernCreatureAppear(cid)
end
function onCreatureDisappear(cid)
npcHandlernCreatureDisappear(cid)
end
function onCreatureSay(cid, type, msg)
npcHandlernCreatureSay(cid, type, msg)
end
function onThink()
npcHandlernThink()
end
local voices = { {text = 'Do you want to go top of the mountain? .'} }
npcHandler:addModule(VoiceModule:new(voices))
-- Travel
local travelKeyword = keywordHandler:addKeyword({'yes'}, StdModule.say, {npcHandler = npcHandler, text = 'Do you realy want to go up for |TRAVELCOST|?', cost = 1000000, discount = 'postman'})
travelKeyword:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, cost = 1000000, discount = 'postman', destination = Position(935, 289, 1)})
travelKeyword:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, text = 'By direct edict of the honorable Henricus himself... well, you know.', reset = true})
keywordHandler:addAliasKeyword({'town'})
-- Kick
keywordHandler:addKeyword({'kick'}, StdModule.kick, {npcHandler = npcHandler, destination = {Position(936, 290, 1)}})
-- Basic
keywordHandler:addKeyword({'sail'}, StdModule.say, {npcHandler = npcHandler, text = "uh?"})
npcHandler:setMessage(MESSAGE_GREET, "Welcome, |PLAYERNAME| Ready to go up?")
npcHandler:setMessage(MESSAGE_FAREWELL, "Oh...")
npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye then.")
npcHandler:addModule(FocusModule:new())