Blysco
New Member
- Joined
- Oct 12, 2013
- Messages
- 163
- Reaction score
- 2
Hey, i have a Server with the version "The Forgotten Server 0.3.7_SVN Crying Damson.
My problem is when i say "Hi" to the Guard behind the King Tibianus and then "Hail king" or something else i dont got any responses of the King.
So my Question is whats wrong ??
Here is my code :
Npc
Script
My problem is when i say "Hi" to the Guard behind the King Tibianus and then "Hail king" or something else i dont got any responses of the King.
So my Question is whats wrong ??
Here is my code :
Npc
Code:
<?xml version="1.0" encoding="UTF-8"?>
-<npc floorchange="0" walkinterval="2000" script="data/npc/scripts/Sell/promotion.lua" name="King Tibianus"> <health max="100" now="100"/> <look addons="0" feet="95" legs="107" body="87" head="21" type="332"/> -<parameters> <parameter value="Hi there, how's it hanging, |PLAYERNAME|!" key="message_greet"/> <parameter value="Good bye, |PLAYERNAME|!" key="message_farewell"/> <parameter value="1" key="module_keywords"/> <parameter value="hail king;job;promotion;" key="keywords"/> <parameter value="I greet thee, my loyal subject |PLAYERNAME|." key="keyword_reply1"/> <parameter value="I am your sovereign, King Tibianus III, and it's my duty to provide justice and guidance for my subjects." key="keyword_reply2"/> <parameter value="Do you want to be promoted in your vocation for 20000 gold?" key="keyword_reply3"/> <parameter value="1" key="module_shop"/> <parameter value="" key="shop_sellable"/> <parameter value="" key="shop_buyable"/> </parameters> </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 node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to be promoted in your vocation?'})
node1:addChildKeyword({'yes'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You are already promoted'})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Okay then..', reset = true})
--[[
local node2 = keywordHandler:addKeyword({'epic'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can epicize you for 200000 gold coins. Do you want me to epicize you?'})
node2:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 200000, level = 120, promotion = 2, text = 'Congratulations! You are now epicized.'})
node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})
]]--
npcHandler:addModule(FocusModule:new())