severen1999

Landail !nextstream script

Jul 27th, 2018
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 4.20 KB | None | 0 0
  1. ;do everything inside { } when detected a user with level 10 sends !setnextstream on channel #landail
  2. ;user with lvl 10 or higher can type in chat !setnextstream which returns in #landail
  3. ;what to say when !nextstream is ran by ANYUSER
  4. ;script includes notes as to what ways use to achieve this as proper uses of spaces
  5. ;in messages send to chat channels need syntax like $+ $chr(160) to display spaces in some cases
  6.  
  7. on 10:text:!setnextstream*:#landail: {
  8.  
  9.   ;setup the first part of the next stream msg
  10.   set %prestreamannouncemsg Lan's next stream will be
  11.  
  12.   ;append a SPACE aka $chr(160) to the %prestreamannouncemsg variable
  13.   set %prestreamannouncemsg %prestreamannouncemsg $+ $chr(160)
  14.  
  15.   ;assign the userinput that contains the next stream data to the %nextstreampt2 variable
  16.   set %nextstreampt2 $2-
  17.  
  18.   ;possible 2 ways to achieve the same thing
  19.   ;set %wholestreammsg to include the static %prestreamannouncemsg variable and dynanmic variable %prestreamannounce containing the user input
  20.   set %wholestreammsg %prestreamannouncemsg $+ %nextstreampt2
  21.  
  22.   ;announce to channel what the new !nextstream command has been set to
  23.   msg #landail %wholestreammsg
  24.   ;assign 1 to %streamnext to be used in a check later by !nextstream command
  25.   set %streamnext 1
  26.   ;sent to logfile who ran command
  27.   echo -s $nick ran the !setnextstream command !nextstream should return -> %wholestreammsg
  28. }
  29.  
  30. ;------------------------------------------------------------------------------------------;
  31. ;                                                                                          ;
  32. ;             !nonextstream command and how to use & what it does                          ;
  33. ;                                                                                          ;
  34. ;------------------------------------------------------------------------------------------;
  35.  
  36. ;user with lvl 10 or above can run !nonextstream to set !nextstream to msg channel #landail
  37. ;Sorry we don't have info/date re: lan's next stream yet.
  38.  
  39. on 10:text:!nonextstream*:#landail: {
  40.   set %streamnext 0
  41.   msg # the !nextsteam has been set to -> "Sorry we don't have info/date re: lan's next stream yet.
  42.   ;log to console & logfile the username who ran the !nonextstream command
  43.   echo -s $nick ran !nonextstream
  44.   ;(POSSIBLY) convert this to be ran via a whisper to the bot instead of to the main chat channel
  45.   ;code to possibly achieve the above
  46.   ;query $nick !nextstream has been set to "Sorry we don't have info/date re: lan's next stream yet."
  47.  
  48. }
  49.  
  50. ;------------------------------------------------------------------------------------------;
  51. ;                                                                                          ;
  52. ;                              !nextstream command                                         ;
  53. ;                                                                                          ;
  54. ;------------------------------------------------------------------------------------------;
  55.  
  56. ;when ANY user types !nextstream then send msg
  57. ;to channel #landail with what the nextdate was set to
  58. ;if %streamnext variable holds the next stream date
  59.  
  60. on *:text:!nextstream*:#landail: {
  61.   if (%streamnext = 1) {
  62.     msg # %wholestreammsg
  63.     echo -s $nick ran the !nextstream command
  64.   }
  65.   if (%streamnext = 0) {
  66.     msg # Sorry we don't have info/date re: lan's next stream yet.
  67.   }
  68. }
  69.  
  70.  
  71.  
  72.  
  73.  
  74. ;everything below betwen /*  and  */ are comments
  75. /*
  76. misc debug / test ways to achieve results via mirc scripting syntax
  77.  
  78. on 10:text:!testnextstream*:#sevwren: {
  79.   set %prestreamannouncemsg Lan's next stream will be
  80.   set %prestreamannouncemsg %prestreamannouncemsg $+ $chr(160)
  81.   set %wholestreammsg %prestreamannounce $+ %nextstream
  82.   %wholestreammsg
  83.   ;send to console what the next stream date was set to
  84.   echo The final wholestreammsg variable now contains. - %wholestreammsg
  85. }
  86.  
  87. %prestreamannouncemsg msg #landail Lan's next stream will be 
  88. %wholestreammsg Lan's next stream will be Friday (partyin', partyin', yeah)
  89. %nextstreampt2 Friday (partyin', partyin', yeah)
  90. %prestreamannounce Lan's next stream will be 
  91. %streammsg Lan's next stream will be Friday (partyin', partyin', yeah)
  92. %nextstream  Wednesday, July 25th
  93. */
Add Comment
Please, Sign In to add comment