westor

AutoThanker (fix) for Koragg v1.1

Aug 19th, 2020 (edited)
538
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 4.86 KB | None | 0 0
  1. ;taken from http://www.ladysclub.net/index.php/downloads/download/2-mirc-scripte/1-g-script.html
  2.  
  3. ON *:START: { init }
  4. ON *:LOAD: { init }
  5.  
  6. ON *:EXIT: {
  7.   if ($hget(thx)) { hsave thx $qt(settings.hsh) }
  8. }
  9.  
  10. dialog -l autothx {
  11.   title "Mode Thanker - (/mt)"
  12.   size -1 -1 172 266
  13.   option dbu
  14.   box "Voice", 1, 3 3 166 21
  15.   edit "", 2, 5 11 162 10, autohs
  16.   box "Halfop", 3, 3 51 166 21
  17.   edit "", 4, 5 59 162 10, autohs
  18.   box "Op", 5, 3 99 166 21
  19.   edit "", 6, 5 107 162 10, autohs
  20.   box "", 7, 3 242 166 21
  21.   check "Activate Mode Thanker", 8, 43 250 85 10
  22.   ;box "", 9, 1 -2 170 267
  23.   box "Devoice", 10, 3 25 166 21
  24.   edit "", 11, 5 33 162 10, autohs
  25.   box "Dehalfop", 12, 3 73 166 21
  26.   edit "", 13, 5 81 162 10, autohs
  27.   edit "", 14, 5 128 162 10, autohs
  28.   box "Deop", 15, 3 120 166 21
  29.   box "Deprotect", 16, 3 167 166 21
  30.   box "Protect", 17, 3 146 166 21
  31.   edit "", 18, 5 154 162 10, autohs
  32.   edit "", 19, 5 175 162 10, autohs
  33.   box "Owner", 20, 3 193 166 21
  34.   box "Deowner", 21, 3 214 166 21
  35.   edit "", 22, 5 201 162 10, autohs
  36.   edit "", 23, 5 222 162 10, autohs
  37. }
  38.  
  39. ON *:DIALOG:autothx:*:*: {
  40.   if ($devent == init) {
  41.     if ($hget(thx,akt)) { did -c $dname 8 }
  42.     if ($hget(thx,voice)) { did -a $dname 2 $v1 }
  43.     if ($hget(thx,devoice)) { did -a $dname 11 $v1 }
  44.     if ($hget(thx,halfop)) { did -a $dname 4 $v1 }
  45.     if ($hget(thx,dehalfop)) { did -a $dname 13 $v1 }
  46.     if ($hget(thx,op)) { did -a $dname 6 $v1 }
  47.     if ($hget(thx,deop)) { did -a $dname 14 $v1 }
  48.     if ($hget(thx,prot)) { did -a $dname 18 $v1 }
  49.     if ($hget(thx,deprot)) { did -a $dname 19 $v1 }
  50.     if ($hget(thx,own)) { did -a $dname 22 $v1 }
  51.     if ($hget(thx,deown)) { did -a $dname 23 $v1 }
  52.   }
  53.  
  54.   if ($devent == edit) {
  55.     if ($did == 2) { hadd thx voice $did($did).text }
  56.     if ($did == 11) { hadd thx devoice $did($did).text }
  57.     if ($did == 4) { hadd thx halfop $did($did).text }
  58.     if ($did == 13) { hadd thx dehalfop $did($did).text }
  59.     if ($did == 6) { hadd thx op $did($did).text }
  60.     if ($did == 14) { hadd thx deop $did($did).text }
  61.     if ($did == 18) { hadd thx prot $did($did).text }
  62.     if ($did == 19) { hadd thx deprot $did($did).text }
  63.     if ($did == 22) { hadd thx own $did($did).text }
  64.     if ($did == 23) { hadd thx deown $did($did).text }
  65.   }
  66.  
  67.   if ($devent == sclick) && ($did = 8) { hadd thx akt $did($did).state }
  68.   if ($devent == close) { hsave thx $qt(settings.hsh) }
  69. }
  70.  
  71. ON *:RAWMODE:#: {
  72.   if ($nick != $me) && ($hget(thx,akt)) {
  73.     if ($me isin $strip($1-)) {
  74.       if ($nick == ChanServ) || ($nick == OperServ) || ($nick == BotServ) || ($nick == NickServ) || ($nick == Global) || ($nick == HostServ) || ($nick == MemoServ) || (help isin $chan) { return }
  75.       if ($network == ICQ-Chat) && ($nick == Autobot) { return }
  76.       if ($network == UnderNET) && ($nick == X) { return }
  77.       if ($network == Quakenet) && ($nick == Q) { return }
  78.       if ($evalnext($+(%,modethankercheck,.,$nick))) { return }
  79.  
  80.       if (+v isincs $1-) && ($chr(46) !isin $nick) && ($hget(thx,voice)) { awaynoticesystem $nick $hget(thx,voice) | set -eu10 $+(%,modethankercheck,.,$nick) 1 }
  81.       if (-v isincs $1-) && ($chr(46) !isin $nick) && ($hget(thx,devoice)) { awaynoticesystem $nick $hget(thx,devoice) | set -eu10 $+(%,modethankercheck,.,$nick) 1 }
  82.       if (+h isincs $1-) && ($chr(46) !isin $nick) && ($hget(thx,halfop)) { awaynoticesystem $nick $hget(thx,halfop) | set -eu10 $+(%,modethankercheck,.,$nick) 1 }
  83.       if (-h isincs $1-) && ($chr(46) !isin $nick) && ($hget(thx,dehalfop)) { awaynoticesystem $nick $hget(thx,dehalfop) | set -eu10 $+(%,modethankercheck,.,$nick) 1 }
  84.       if (+o isincs $1-) && ($chr(46) !isin $nick) && ($hget(thx,op)) { awaynoticesystem $nick $hget(thx,op) | set -eu10 $+(%,modethankercheck,.,$nick) 1 }
  85.       if (-o isincs $1-) && ($chr(46) !isin $nick) && ($hget(thx,deop)) { awaynoticesystem $nick $hget(thx,deop) | set -eu10 $+(%,modethankercheck,.,$nick) 1 }
  86.       if (+a isincs $1-) && ($chr(46) !isin $nick) && ($hget(thx,prot)) { awaynoticesystem $nick $hget(thx,prot) | set -eu10 $+(%,modethankercheck,.,$nick) 1 }
  87.       if (-a isincs $1-) && ($chr(46) !isin $nick) && ($hget(thx,deprot)) { awaynoticesystem $nick $hget(thx,deprot) | set -eu10 $+(%,modethankercheck,.,$nick) 1 }
  88.       if (+q isincs $1-) && ($chr(46) !isin $nick) && ($hget(thx,own)) { awaynoticesystem $nick $hget(thx,own) | set -eu10 $+(%,modethankercheck,.,$nick) 1 }
  89.       if (-q isincs $1-) && ($chr(46) !isin $nick) && ($hget(thx,deown)) { awaynoticesystem $nick $hget(thx,deown) | set -eu10 $+(%,modethankercheck,.,$nick) 1 }
  90.     }
  91.   }
  92. }
  93.  
  94. alias mt { $iif(!$dialog(autothx),dialog -md,dialog -v) autothx autothx }
  95.  
  96. alias -l awaynoticesystem { .quote notice $1 $+ $chr(32) $+ $chr(58) $+ $2- }
  97. alias -l init {
  98.   var %h = thx
  99.   var %f = settings.hsh
  100.  
  101.   if ($hget(%h)) { hfree %h }
  102.   if (!$hget(%h)) { hmake %h 100 }
  103.   if ($file(%f)) { hload %h $qt(%f) }
  104. }
Add Comment
Please, Sign In to add comment