E ae, belezera? :smile_positivo:
então, vamos lá:
No meu map editor, na seção "npc", estão lá todos os npcs bonitinhos e talz.
Eu escolho uma área pra eles ficarem, e coloco - os lá.
Carrego o OT e boa, podendo comprar, vender, enfim, executar a função do NPC.
Mas tem um tal de King Yourots que tá me deixando louco aqui. haeuhae
Ele apareçe no map editor, beleza. Mas não apareçe no server =X
Data\NPC\King Yourot
<?xml version="1.0" encoding="UTF-8"?><npc name="King Yurots" script="data/npc/scripts/promotion.lua" walkinterval="10000" floorchange="0">
<health now="100" max="100"/>
<look type="73" head="20" body="39" legs="45" feet="7" addons="0"/>
<parameters>
<parameter key="message_greet" value="Hi |PLAYERNAME|!. I can {promote} you, are you looking for this?"/>
</parameters>
</npc>
Script dele
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 20000 gold coins. Do you want me to promote you?'})
node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, 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})
npcHandler:addModule(FocusModule:new())
Porque será que não tá indo?
Se alguém souber, me ajuda ae
abraçooooo !