LUA:
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({'1'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to warp to Meadow Creek for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 100, destination = {x=1802, y=1688, z=5} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'2'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to Edron for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 100, destination = {x=2416, y=1715, z=6} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'3'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to Knightdale for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 100, destination = {x=873, y=2354, z=7} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'4'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to Stonemoor for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 100, destination = {x=1696, y=2296, z=7} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'5'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to Knightdale trainers for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 100, destination = {x=899, y=2411, z=7} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'6'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to Stonemoor trainers for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 50, destination = {x=1695, y=2260, z=7} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'7'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to Hero Entrance Cave for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 50, destination = {x=1721, y=1605, z=7} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'8'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to Hero Cave Level 7 (Juggs, Hellhounds, Undead Dragons) for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 50, destination = {x=1491, y=1503, z=12} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'9'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to Hero Cave (Ancient Helmet Quest) for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 50, destination = {x=1607, y=1509, z=15} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'10'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to Hero Cave level 5 (Dragon lords) for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 50, destination = {x=1495, y=1460, z=12} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'11'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to Turtle island for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 50, destination = {x=1055, y=1572, z=7} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'12'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to Turtle Island Level 2 (King Cobra Quest) for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 50, destination = {x=1024, y=1543, z=9} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'13'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to Dragon Cave Level 4 (Dragon Lords) for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 50, destination = {x=1844, y=1905, z=11} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'14'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to Triple Dragon Quest for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 50, destination = {x=1762, y=1916, z=11} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'15'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to Dragon Cave (Black Knights) for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 50, destination = {x=1762, y=1904, z=8} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'16'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to Dragon Cave Level 4 (Warlocks, Demons) for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 50, destination = {x=1794, y=1965, z=11} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'17'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to Gang Member Cave for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 50, destination = {x=1807, y=1785, z=7} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'18'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to Gang Member Cave Level 2 (Gladiators) for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 50, destination = {x=1776, y=1823, z=9} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'19'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to Gang Member Cave Level 4 (Mad Scientists) for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 50, destination = {x=1680, y=1687, z=11} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'20'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to Dwarf Tower for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 50, destination = {x=1787, y=1619, z=7} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'21'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to Hero Plains for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 50, destination = {x=1623, y=1634, z=7} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'22'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to Medusa Lair (Hellhounds) for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 50, destination = {x=1560, y=1514, z=7} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'23'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to Tiquandas Woods (Tiquandas Revenge) for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 50, destination = {x=1523, y=1589, z=7} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'24'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to the Graveyard for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 50, destination = {x=1567, y=1563, z=7} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'25'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to the Graveyard Level 3 (Grim Reapers) for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 50, destination = {x=1662, y=1513, z=9} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
local travelNode = keywordHandler:addKeyword({'26'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'would you like to warp to Woodward for 1000 gold?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 50, destination = {x=1474, y=1669, z=7} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'We would like to serve you some time.'})
keywordHandler:addKeyword({'cities'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Where to? {1} (Meadow Creek), {2} (Edron), {3} (Knightdale), {4} (Stonemoor).'})
keywordHandler:addKeyword({'trainers'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Where to? {5} (Knightdale trainers), {6} (Stonemoor trainers).'})
keywordHandler:addKeyword({'Meadow Creek'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Where to? {7} (Hero Cave Entrance), {8} (Hero Cave Level 7 (Juggs, Hellhounds, Undead dragons)), {9} (Hero Cave (Ancient Helmet Cave) ), {10} (Hero Cave Level 5 (Dragon Lords) ), {11} (Turtle island), {12} (Turtle Island Level 2 (King Cobra Quest) ), {13} (Dragon Cave Level 4 (Dragon Lords) ), {14} (Triple Dragon Lord Quest), {15} (Dragon Cave (Black Knights) ), {16} (Dragon Cave Level 4 (Warlocks, Demons) ), {17} (Gang Member Cave), {18} (Gang Member Cave Level 2 (Gladiators) ), {19} (Gang Member Cave Level 4 (Mad Scientists) ), {20} (Dwarf Tower), {21} (Hero Plains), {22} (Medusa Lair (Hellhounds) ), {23} (Tiquandas Woods (Tiquandas Revenger) ), {24} (The Graveyard), {25} (The Graveyard Level 3 (grim Reapers) ), {26} (Woodward),
npcHandler:addModule(FocusModule:new())
This is a script for an npc to "warp" you to places and it stops working after number 19** Also it will not recognize numbers past 9.