Ir para conteúdo

[Action] Promotion Bugada


ymmotthep

Posts Recomendados

Protocolo: 8.54

Servidor: SQL

Mapa: Alissow

Tipo: TFS

 

Quando você coloca a promotion, ela vai de boa, mais se colocar promotion novamente, volta pra classe 0...

Link para o comentário
Compartilhar em outros sites

hm pode ser do npc então.

 

tente usar esse:

 

\data\npc\scripts\promotion.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 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({'Nome da sua vocaçao'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for new vocation per 40000 gold coins. Do you want me to promote you?'})

node2:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 40000, level = 40, promotion = 2, text = 'You are now promoted for second vocation'})

node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})npcHandler:addModule(FocusModule:new())

 

Oque estiver em vermelho voce pode editar.

Editado por Nicekid
Link para o comentário
Compartilhar em outros sites

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...