Ir para conteúdo

Baalszor

Membro
  • Registro em

  • Última visita

Solutions

  1. Baalszor's post in (Resolvido)NPC de PROMOTION was marked as the answer   
    @Jonathan005 utilize esse script ou usa como base para fazer o seu, grato.
     
    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 = 0, level = 7, 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})
    npcHandler:addModule(FocusModule:new())

Informação Importante

Confirmação de Termo