westor

Mode Thanker for Koragg v2.0

Sep 3rd, 2020 (edited)
542
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 4.69 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 -m thx voice $did($did).text }
  56.     if ($did == 11) { hadd -m thx devoice $did($did).text }
  57.     if ($did == 4) { hadd -m thx halfop $did($did).text }
  58.     if ($did == 13) { hadd -m thx dehalfop $did($did).text }
  59.     if ($did == 6) { hadd -m thx op $did($did).text }
  60.     if ($did == 14) { hadd -m thx deop $did($did).text }
  61.     if ($did == 18) { hadd -m thx prot $did($did).text }
  62.     if ($did == 19) { hadd -m thx deprot $did($did).text }
  63.     if ($did == 22) { hadd -m thx own $did($did).text }
  64.     if ($did == 23) { hadd -m thx deown $did($did).text }
  65.   }
  66.  
  67.   if ($devent == sclick) && ($did = 8) { hadd -m thx akt $did($did).state }
  68.   if ($devent == close) { hsave thx $qt(settings.hsh) }
  69. }
  70.  
  71. ON !*:RAWMODE:#: {
  72.   tokenize 32 $strip($1-)
  73.  
  74.   var %spam = $evalnext($+(%,modethankercheck,.,$nick))
  75.  
  76.   if (%spam) { return }
  77.  
  78.   if ($hget(thx,akt)) && ($me isin $2-) {
  79.     if ($right($nick,4) == Serv) || ($nick == Global) || (help isin $chan) || ($chr(46) isin $nick) { return }
  80.  
  81.     var %not_nicks = Autobot X Q
  82.     if ($istok(%not_nicks,$nick,32)) { return }
  83.  
  84.     var %voice = $hget(thx,voice)
  85.     var %devoice = $hget(thx,devoice)
  86.     var %halfop = $hget(thx,halfop)
  87.     var %dehalfop = $hget(thx,dehalfop)
  88.     var %op = $hget(thx,op)
  89.     var %deop = $hget(thx,deop)
  90.     var %protect = $hget(thx,prot)
  91.     var %deprotect = $hget(thx,deprot)
  92.     var %owner = $hget(thx,own)
  93.     var %deowner = $hget(thx,deown)
  94.  
  95.     if (*+* iswm $1) {
  96.       if (!%voice) && (!%halfop) && (!%op) && (!%protect) && (!%owner) { return }
  97.  
  98.       if (*q* iswmcs $1) && (%owner) { awaynoticesystem $nick $evalnext(%owner) }
  99.       if (*a* iswmcs $1) && (%protect) { awaynoticesystem $nick $evalnext(%protect) }
  100.       if (*o* iswmcs $1) && (%op) { awaynoticesystem $nick $evalnext(%op) }
  101.       if (*h* iswmcs $1) && (%halfop) { awaynoticesystem $nick $evalnext(%halfop) }
  102.       if (*v* iswmcs $1) && (%voice) { awaynoticesystem $nick $evalnext(%voice) }
  103.     }
  104.  
  105.     if (*-* iswm $1) {
  106.       if (!%devoice) && (!%dehalfop) && (!%deop) && (!%deprotect) && (!%deowner) { return }
  107.  
  108.       if (*q* iswmcs $1) && (%deowner) { awaynoticesystem $nick $evalnext(%deowner) }
  109.       if (*a* iswmcs $1) && (%deprotect) { awaynoticesystem $nick $evalnext(%deprotect) }
  110.       if (*o* iswmcs $1) && (%deop) { awaynoticesystem $nick $evalnext(%deop) }
  111.       if (*h* iswmcs $1) && (%dehalfop) { awaynoticesystem $nick $evalnext(%dehalfop) }
  112.       if (*v* iswmcs $1) && (%devoice) { awaynoticesystem $nick $evalnext(%devoice) }
  113.     }
  114.  
  115.   }
  116. }
  117.  
  118. alias mt { $iif(!$dialog(autothx),dialog -md,dialog -v) autothx autothx }
  119.  
  120. alias -l awaynoticesystem {
  121.   var %spam = $evalnext($+(%,modethankercheck,.,$nick))
  122.  
  123.   if (%spam) { return }
  124.  
  125.   .quote notice $1 $+ $chr(32) $+ $chr(58) $+ $2-
  126.  
  127.   set -eu10 $+(%,modethankercheck,.,$nick) 1
  128. }
  129.  
  130. alias -l init {
  131.   var %h = thx
  132.   var %f = settings.hsh
  133.  
  134.   if ($hget(%h)) { hfree %h }
  135.   if (!$hget(%h)) { hmake %h 100 }
  136.   if ($file(%f)) { hload %h $qt(%f) }
  137. }
  138.  
Add Comment
Please, Sign In to add comment