Hi! , I was trying to make an boat npc when i started the server i got this message in console
[07/12/2008 07:08:00] [Warning - NpcScript::NpcScript] Can not load script: data/npc/scripts/teleport.lua
[07/12/2008 07:08:00] data/npc/scripts/teleport.lua:34: '}' expected near 'Demons'
please help.
Here is the Npc Script.
[07/12/2008 07:08:00] [Warning - NpcScript::NpcScript] Can not load script: data/npc/scripts/teleport.lua
[07/12/2008 07:08:00] data/npc/scripts/teleport.lua:34: '}' expected near 'Demons'
please help.
Here is the Npc Script.
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({'demons'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to go to Demons?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 50, cost = 0, destination = {x=1313, y=293, z=11} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Covard.'})
local travelNode = keywordHandler:addKeyword({'ferumbras tower'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to go to Ferumbas Tower?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 80, cost = 0, destination = {x=1045, y=756, z=7} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Its up to you.'})
local travelNode = keywordHandler:addKeyword({'giant spiders'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to go to giant spiders?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 40, cost = 0, destination = {x=964, y=1190, z=7} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Its up to you.'})
local travelNode = keywordHandler:addKeyword({'minotaurs'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to go to Minotaurs?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 40, cost = 0, destination = {x=1175, y=1028, z=7} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Its up to you.'})
local travelNode = keywordHandler:addKeyword({'frost dragons'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to go to Frost Dragons?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 30, cost = 0, destination = {x=934, y=800, z=7} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Its up to you.'})
local travelNode = keywordHandler:addKeyword({'behemoths'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to go to Behemoths?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 10, cost = 0, destination = {x=982, y=1256, z=13} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Its up to you.'})
keywordHandler:addKeyword({'travel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can teleport you to 'Demons' , 'Ferumbras tower' , 'Giant spiders' , 'Minotaurs' ,'Frost Dragons' , 'Behemoths' ... '})
npcHandler:addModule(FocusModule:new())