Advertisement
Kaztalek

mirc script for !slots (for bonesaw)

Apr 21st, 2013
477
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.52 KB | None | 0 0
  1. ;here is the code to copy:
  2. on *:text:!slots:#:{
  3.   if (%face != 1) {
  4.     set %face 1
  5.     msg $chan $read(faces.txt) $read(faces.txt) $read(faces.txt)
  6.     timer 1 20 msg $me allow
  7.   }
  8. }
  9. on *:text:allow:?:{
  10.   if ($nick == $me) {
  11.     set %face 0
  12.   }
  13. }
  14.  
  15. ;here is my explanation:
  16. ;[on](included in every script) [*](means anyone can use):[text](check for script in messages):[!slots](name of your script):[#](means it can be done in any channel. specify a channel name for it to only work in that channel):{
  17. ;  [if (%face != 1)](% denotes a variable name) {
  18. ;    [set %face 1](do this to prevent this script from being called again)
  19. ;    [msg](do this to send a message) [$chan](this is an identifier for the channel the script was posted in) [$read(faces.txt) $read(faces.txt) $read(faces.txt)]($read is an identifier for reading from a text file, in this case, you have a file called faces.txt in AppData\Roaming\mIRC that contains a list of all twitch faces. when only 1 parameter is given, mirc automatically chooses a random line)
  20. ;    [timer 1 20](the following will execute after 20 seconds) msg [$me](this is an identifier for the bots nick, you are sending yourself a message) allow
  21. ;  }
  22. ;}
  23. ;[](the following script executes 20 seconds after !slots is called)
  24. ;on *:text:allow:[?](this means the bot looks for the message in a PM):{
  25. ;  [if ($nick == $me)](a simple check to see if the message is from you to prevent another user from bypassing the timer) {
  26. ;    [set %face 0](this allows !slots to be called again)
  27. ;  }
  28. ;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement