• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

NPC script issue. Hi and bye working

Mhako

New Member
Joined
Sep 5, 2008
Messages
8
Solutions
1
Reaction score
0
Hello, I was wondering if anyone can help me with my NPC problem.

NPC loads properly.
Npc responds to "hi"
nothing else works.

I'm using 0.3.6PL1 with Emporia VAPUS NPC's

Example:

Player: Hi -> answer: Uzon: Greetings, traveller "Playername". Where do you want me to fly you?

Player: darashia -> no answer

Player: bye -> no answer

I have checked the server log and there is no error message or anything. Here is an example script in

data/npc/scripts/Uzon.lua


Code:
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({'darashia'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you seek a ride to Darashia on Darama for 60 gold?'})
            travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost =60, destination = {x=33270, y=32441, z=6} })
            travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'You shouldn\'t miss the experience.'})
      
        local travelNode = keywordHandler:addKeyword({'svargrond'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you seek a ride to Svargrond for 60 gold?'})
            travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 60, destination = {x=32253, y=31097, z=4} })
            travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'You shouldn\'t miss the experience.'})
      
        local travelNode = keywordHandler:addKeyword({'edron'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you seek a ride to Edron for 60 gold?'})
            travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 60, destination = {x=33193, y=31784, z=3} })
            travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'You shouldn\'t miss the experience.'})
     

        npcHandler:addModule(FocusModule:new())

and here is example of XML file in:
data/npc/Uzon.XML
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Uzon" script="Uzon.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="130" head="95" body="5" legs="18" feet="76" addons="0"/>
<voices>
<voice text="Feel the wind in your hair during one of my carpet rides!" interval2="120" margin="1" yell="no"/>
</voices>
<parameters>
        <parameter key="message_greet" value="Greetings, traveller |PLAYERNAME|. Where do you want me to fly you?"/>
        <parameter key="message_farewell" value="Good bye!"/>
        <parameter key="message_walkaway" value="Good bye!" />
</parameters>
</npc>

Does anyone know what the problem may be? i would be very greatful for help :)
 
Last edited:
nope, my bad... the files are capital U aswell

there must be something wrong with the keywordhandler or something, it doesnt respond to any of the keywords :/

question is... since this is the case for all of the NPC's, is there 1 problem affecting them all? where can i see where the server initially looks for script locations etc?
 
Last edited by a moderator:
Back
Top