Ir para conteúdo
  • 0

error em npc pra comprar promote


llevell

Pergunta

boa galera tenho um problema o npc Queen Eloise nao vende promote vo mostra os arquivos xml e lua sei nao oq tem errado

 

 

Queen Eloise.xml

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Queen Eloise" script="data/npc/scripts/Queen Eloise.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="331" head="96" body="94" legs="79" feet="115" addons="0"/>
<parameters>
       <parameter key="message_greet" value="I greet thee, my loyal subject."/>
        <parameter key="message_farewell" value="Farewell, |PLAYERNAME|"/>
		<parameter key="message_walkaway" value="Farewell, |PLAYERNAME|" />
        <parameter key="module_keywords" value="1" />
        <parameter key="keywords" value="job;king;" />
        <parameter key="keyword_reply1" value="I am Queen Eloise. It is my duty to reign over this marvellous city and the lands of the north." />
		 <parameter key="keyword_reply2" value="I am the Queen, the only rightful ruler on the continent!" />
    </parameters>
</npc>

Queen Eloise.lua

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 = 'I can promote you for 20.000 gold coins. Do you want me to promote you?'})
 node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, promotion = 1, text = 'Congratulations! You are now promoted.'})
 node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', 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())
Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

  • 0

Bom cara, o erro talvez esteja da forma que está escrito "promote", pois ela só vai te dar a promoção se você disser: "promot".

 

Correção Queen Eloise.lua

 

 

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({'promote'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 20.000 gold coins. Do you want me to promote you?'})
node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, promotion = 1, text = 'Congratulations! You are now promoted.'})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', 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())

 

 

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...