Guest User

Untitled

a guest
Jul 31st, 2015
1,111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  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 voices = { {text = 'Hello, how are you.'} }
  11. npcHandler:addModule(VoiceModule:new(voices))
  12.  
  13.  
  14. keywordHandler:addKeyword({'job'}, StdModule.say, {npcHandler = npcHandler, text = "I buy everything!. I love itens!"})
  15.  
  16. npcHandler:setMessage(MESSAGE_GREET, "Welcome to my shop |PLAYERNAME|! I buy stuff, all kinds of stuff!")
  17. npcHandler:setMessage(MESSAGE_FAREWELL, "Thank you, come again, |PLAYERNAME|.")
  18. npcHandler:setMessage(MESSAGE_WALKAWAY, "Thank you, come again")
  19.  
  20. npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
  21. npcHandler:addModule(FocusModule:new())
Advertisement
Add Comment
Please, Sign In to add comment