Olá deley
Está aqui:
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 20000 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({'promote2'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Eu posso vender a segunda promotion para voce. Custa 20k voce quer?'})
node2:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 200000, level = 120, promotion = 2, text = 'Congratulations! Agora voce e segunda promotion.'})
node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})
npcHandler:addModule(FocusModule:new())
Espero ter ajudado
, ele ja vem com o npc jhonny , porém tenque retirar os comentários do script.
Agora sobre escolher uma opção , tenque colocar storage (eu acho) , ai fica um pouco mais complicado




info
Grupo: Campones
Registrado: 12/05/09
Posts: 4
Reputação: 0
Tipo do script:Npc
Protocolo (versão do Tibia):8.6
Servidor utilizado:Alissow
Nível de experiência:Média
Adicionais/Informações: Eu procurei, por horas e não achei um script que realmente funcionasse. Ok! Vamos ao que interessa, eu desejo um npc, que lhe ofereça varias promotions, e não o tradicional , um exemplo melhor.. Você é um knight, e vai ao npc de promotion, e ele lhe oferece três opções, o normal, Elite knight, e duas novas promotions, Gladiator, e Monk, então você escolhe uma, e não pode mais mudar, ou seja é irreversível.
Basicamente, é um npc de promotion que foge do clássico, contendo mais opções.
Obrigado a todos!