Advertisement
Guest User

Untitled

a guest
May 16th, 2017
79
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local keywordHandler = KeywordHandler:new()
  2. local npcHandler = NpcHandler:new(keywordHandler)
  3. NpcSystem.parseParameters(npcHandler)
  4.  
  5. function onCreatureAppear(cid)              npcHandler:onCreatureAppear(cid)            end
  6. function onCreatureDisappear(cid)           npcHandler:onCreatureDisappear(cid)         end
  7. function onCreatureSay(cid, type, msg)      npcHandler:onCreatureSay(cid, type, msg)    end
  8. function onThink()                          npcHandler:onThink()                        end
  9.  
  10. 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?'})
  11.     node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, text = 'Congratulations! You are now promoted.'})
  12.     node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})
  13.  
  14. npcHandler:addModule(FocusModule:new())
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement