CristianXtreme
Active Member
- Joined
- Apr 14, 2016
- Messages
- 76
- Reaction score
- 45
Hi! My NPC don't answer to "Hi"... Just when you say "Hi" the NPC turns to look at you but he dont say anything... I saw when you walk away from him it says "Good bye then." but not anymore... Just it says that...
.XML
.LUA
BUMP! Help?
BUMP! I know there is a lot of people that knows how to fix this... Why don't I get an answer?
.XML
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Muten Roshi" script="roshi.lua" walkinterval="500" floorchange="0" access="5">
<health now="100" max="100"/>
<look type="66" head="0" body="0" legs="0" feet="0" addons="0"/>
<voices>
<voice text="Hello |PLAYERNAME|, I can bring you to any place on my boat or teach you the basics..." interval2="100" margin="1" yell="no"/>
</voices>
<parameters>
<parameter key="message_farewell" value="Good bye." />
<parameter key="message_walkaway" value="Good bye then." />
<parameter key="module_keywords" value="1" />
<parameter key="keywords" value="travel; information;" />
<parameter key="keyword_reply1" value="Do you want me take you to {West City} or {Namek}?" />
<parameter key="keyword_reply2" value="Ok, wait a momment..." />
<parameter key="message_greet" value="Welcome, |PLAYERNAME|! I\'m Roshi the Turtle Master! I\'m here to help you. If you need to {travel} or learn some {information} I can help you."/>
</parameters>
</npc>
.LUA
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({'West City'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to go to West City?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost =0, destination = {x=33311, y=31989, z=15} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Ok, tell me when you\'re ready.'})
local travelNode = keywordHandler:addKeyword({'Namek'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do want to go to Namek for 250 Zenis?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost =250, destination = {x=33025, y=31553, z=10} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Ok, tell me when you\'re ready.'})
npcHandler:addModule(FocusModule:new())
BUMP! Help?
BUMP! I know there is a lot of people that knows how to fix this... Why don't I get an answer?
Last edited by a moderator: