rookki90
Maniacus totalus
- Joined
- Apr 15, 2009
- Messages
- 68
- Reaction score
- 1
Hello. Today I wrote this npc, and I can't summon him in game.
log from putty:
script xml:
and lua code:
Help me, what's wrong is?!
Kind regards,
rookki90
log from putty:
[19:26:15.267] Info: failed to load external entity "data/npc/namteh.xml"
script xml:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Namteh" script="data/npc/scripts/Namteh.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="138" head="19" body="69" legs="107" feet="50" addons="0"/>
<voices>
<voice text="Help, help! We need your help!" interval2="100" margin="1" yell="no"/>
</voices>
<parameters>
<parameter key="message_farewell" value="Good bye. Please come back as fast as you can!" />
<parameter key="message_walkaway" value="Good bye. Please come back as fast as you can!" />
<parameter key="module_keywords" value="1" />
<parameter key="keywords" value="name;thais;darashia;" />
<parameter key="keyword_reply1" value="My name is Namteh. I'm mayor of Baldura. Our village is under attack. Dragond, dragons!" />
<parameter key="message_greet" value="Hello, |PLAYERNAME|. How can I help you?"/>
</parameters>
</npc>
and lua code:
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({'fight'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Our {village} is under attack! If you want to join to us just say {fight}. We need your help... '})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 0, destination = {x=1365, y=1202, z=7} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Are you not ready yet? Come back if you will be sure!'})
keywordHandler:addKeyword({'village'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Cos tam cos tam'})
keywordHandler:addKeyword({'job'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Zjedz zupy'})
keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Jebac to!'})
npcHandler:addModule(FocusModule:new())
Help me, what's wrong is?!
Kind regards,
rookki90