ola eu tenho um servidor 8.54 com mtas vocations
eu keria um npc de promotion q qnd vc chegasse no lvl 30 ele trocasse dinheiro pela promotion, dai qnd vc chegasse no lvl 80 teria a second promotion, se alguem me ajudar dou resp +
ola eu tenho um servidor 8.54 com mtas vocations
eu keria um npc de promotion q qnd vc chegasse no lvl 30 ele trocasse dinheiro pela promotion, dai qnd vc chegasse no lvl 80 teria a second promotion, se alguem me ajudar dou resp +
Vá ate sua pasta de npc e crie um arquivo com o nome desejado e coloque dentro.
<npc name="osiris" script="data/npc/scripts/promotion.lua" walkinterval="6000" floorchange="0" access="5" level="1" maglevel="1">
<health now="150" max="150"/>
<look type="148" head="114" body="114" legs="114" feet="114" addons="3"/>
<parameters>
<parameter key="message_greet" value="Ola |PLAYERNAME|, Eu posso te promover, basta dizer promo1(30), promo2(80) " />
<parameter key="message_farewell" value="Boa sorte bravo aventureiro!" />
</parameters>
</npc>
Depois vá em npc/scripts crie uma pasta chamada promotion e coloque.
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({'promo1'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Posso te promover por 10000 gold coins. Quer que eu promova voce?'})
node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 10000, level = 30, promotion = 1, text = 'Parabens! Voce foi promovido.'})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})
local node1 = keywordHandler:addKeyword({'promo2'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Posso te promover por 30000 gold coins. Quer que eu promova voce?'})
node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 30000, premium = true, level = 80, promotion = 2, text = 'Parabens! Voce foi promovido.'})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})
npcHandler:addModule(FocusModule:new())
Sou novo aqui ainda não sei fazer aquele quadradinho, espero ter ajudado!
Ti Ajudei ? então Rep +
ja resolvi
Dúvida sanada, movido.
Atenciosamente, Vilden.