Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. var lastmes = "";
  2. var memes = "";
  3. var start = false;
  4.  
  5. function OnEvent_Initialize(MessengerStart)
  6. {
  7. }
  8.  
  9. function OnEvent_Uninitialize(MessengerExit)
  10. {
  11. }
  12.  
  13. function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind){
  14. lastmes = Message;
  15.  
  16. if(lastmes != memes ){
  17. if(start == true){
  18. ChatWnd.SendMessage(Message);
  19. }
  20. }
  21.  
  22. }
  23.  
  24. function OnEvent_ChatWndSendMessage(ChatWnd, Message){
  25. memes = Message
  26. if(Message == "/imitate"){
  27. start = true;
  28. MsgPlus.DisplayToast("", "test has started!");
  29. return '';
  30. }
  31. else if(Message == "/stopimitate"){
  32. start = false;
  33. MsgPlus.DisplayToast("","test has stopped!");
  34. return '';
  35. }
  36.  
  37. }
  38.  
  39. function OnGetScriptCommands(){
  40. var ScriptCommands = "<ScriptCommands>";
  41. ScriptCommands += "<Command>";
  42. ScriptCommands += "<Name>imitate</Name>";
  43. ScriptCommands +="<Description>lolwut</Description>";
  44. ScriptCommands += "</Command>";
  45.  
  46. ScriptCommands += "<Command>";
  47. ScriptCommands += "<Name>stopimitate</Name>";
  48. ScriptCommands += "<Description>Stop test.</Description>";
  49. ScriptCommands += "</Command>";
  50.  
  51. ScriptCommands+="</ScriptCommands>";
  52. return ScriptCommands;
  53.  
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement