ewcke
Santiria 8.60
- Joined
- Apr 13, 2009
- Messages
- 39
- Reaction score
- 1
I've got some problems with a NPC I've made. The thing is that i dont know what to do now, or what the cause of the problem could be. Could someone please help me?
ERROR MESSAGE:
NPC SCRIPT 1:
NPC SCRIPT 2:
ERROR MESSAGE:
[29/12/2009 21:18:41] [Warning - NpcScript::NpcScript] Can not load script: The Oracle.lua
[29/12/2009 21:18:41] The Oracle.lua:18: '}' expected near 's'
NPC SCRIPT 1:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="The Oracle" script="data/npc/scripts/oracle.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="133" head="20" body="39" legs="45" feet="7" addons="0"/>
</npc>
NPC SCRIPT 2:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
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
-- OTServ event handling functions end
-- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions!
local travelNode = keywordHandler:addKeyword({'Leadme'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Im sorry, can you please explain what you mean?'})
travelNode:addChildKeyword({'happypancakeland'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 200, cost = 0, destination = {x=1950, y=1030, z=5} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Okey, it's your desition.'})
keywordHandler:addKeyword({'travle'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Were can i take you my kind sir?.'})
-- Makes sure the npc reacts when you say hi, bye etc.
npcHandler:addModule(FocusModule:new())
Last edited: