Advertisement
OrFeAsGr

Pirate's Buffer Bot

Mar 16th, 2017
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.04 KB | None | 0 0
  1. ON *:QUIT: {
  2. var %buffchans = #chan1 #chan2
  3.   if ($nick == Test) {
  4. var %x = $numtok(%buffchans,32)
  5. while (%x) {
  6.     hmake $+($gettok(%buffchans,%x,32),-,buffer) 1
  7. Dec %x
  8. }
  9.     set %keepbuffer 1
  10.   }
  11. }
  12.  
  13. ON *:TEXT:*:#: {
  14.   if (%keepbuffer) {
  15. if ($istok(%buffchans,$chan,32)) {
  16.     hadd $+($chan,-,buffer) $+(<,$nick,>,-,$time) $1-
  17.   }
  18. }
  19. }
  20.  
  21. ON *:ACTION:*:#: {
  22.   if (%keepbuffer) {
  23. if ($istok(%buffchans,$chan,32)) {
  24.     hadd $+($chan,-,buffer) $+(<,$nick,>,-,$time) $1-
  25.   }
  26. }
  27. }
  28.  
  29. ON *:JOIN:*: {
  30.   if ($nick == Test) {
  31.     unset %keepbuffer
  32.     if ($hget($+($chan,-,buffer))) {
  33.       .notice $nick ***Buffer Start***
  34.     }
  35.     var %x = $hget($+($chan,-,buffer),0).data
  36.     while (%x) {
  37.       inc %buff 1
  38.       .timer 1 %buff .notice $nick *buffer $gettok($hget($+($chan,-,buffer),%x).item,2,45) $gettok($hget($+($chan,-,buffer),%x).item,1,45) $hget($+($chan,-,buffer),%x).data
  39.       dec %x
  40.       if (%x = 1) { .timer 1 $calc(%z + 1) .notice $nick ***Buffer End*** }
  41.     }
  42.     hfree $+($chan,-,buffer)
  43.     unset %buff
  44.   }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement