Advertisement
Seb

Nicklist Coloring

Seb
May 7th, 2011
842
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 8.74 KB | None | 0 0
  1. #####################################
  2. #    Nicklist coloring Script       #
  3. # Made by: http://www.jrIRC.vze.com #
  4. #         Shared by: xplo           #
  5. #####################################
  6.  
  7. menu menubar,channel {
  8.   .NickList Colors:nicklistcl
  9. }
  10. alias nicklistcl {
  11.   if ($dialog(background) == $null) { dialog -m background background }
  12. }
  13. alias _vr {
  14.   if ($exists(data\setting.ini) == $false) { mkdir data | write -c data\setting.ini }
  15.   return $readini data\setting.ini $$1 $$2
  16. }
  17. alias _vw {
  18.   if ($exists(data\setting.ini) == $false) { mkdir data | write -c data\setting.ini }
  19.   writeini data\setting.ini $$1 $$2 $$3-
  20. }
  21. alias _vrem {
  22.   if ($exists(data\setting.ini) == $false) { mkdir data | write -c data\setting.ini }
  23.   remini data\setting.ini $$1 $$2
  24. }
  25.  
  26. dialog background {
  27.   title "NickList Colors"
  28.   size -1 -1 86 132
  29.   option dbu
  30.   icon 100, 10 87 172 82
  31.   button "Apply", 50, 15 116 25 10
  32.   button "Close", 51, 45 116 25 10, default ok
  33.   box "NickList Colors", 14, 2 1 83 90
  34.   check "Enable Color Nicklist", 2, 5 9 62 10
  35.   check "Ops", 3, 5 24 22 10
  36.   check "Voice", 4, 5 35 27 10
  37.   check "Half-ops", 30, 5 46 29 10
  38.   check "Regular", 5, 5 56 27 10
  39.   check "Own Nick", 6, 5 66 33 10
  40.   text "Background", 33, 6 77 32 9
  41.   combo 7, 45 25 37 50, drop
  42.   combo 8, 45 35 37 50, drop
  43.   combo 12, 45 45 37 50, drop
  44.   combo 9, 45 55 37 50, drop
  45.   combo 10, 45 65 37 50, drop
  46.   combo 11, 45 75 37 50, drop
  47.   text "Shared by: xplo", 300, 20 100 40 7
  48. }
  49.  
  50. on *:DIALOG:background:sclick:598:.run http://xplorer.mircscripting.info/
  51. on *:dialog:background:sclick:*:{
  52.   if ($did == 2) {
  53.     var %xt = 3
  54.     :loop
  55.     did - $+ $iif($did(2).state,e,b) background %xt
  56.     if (%xt < 6) { inc %xt | goto loop }
  57.     _vw  nicklist switch 0
  58.   }
  59.   if ($did == 7) { _vw nicklist ops $calc($did(background,7).sel - 1) }
  60.   if ($did == 8) { _vw nicklist voice $calc($did(background,8).sel - 1) }
  61.   if ($did == 12) { _vw nicklist hops $calc($did(background,12).sel - 1) }
  62.   if ($did == 9) { _vw nicklist reg $calc($did(background,9).sel - 1) }
  63.   if ($did == 10) { _vw nicklist me $calc($did(background,10).sel - 1) }
  64.   if ($did == 30) {
  65.     if ($_vr(nicklist,s.hops) == 1) { _vw nicklist s.hops 0  }
  66.     else { _vw nicklist s.hops 1 }
  67.   }  
  68.   if ($did == 3) {
  69.     if ($_vr(nicklist,s.ops) == 1) { _vw nicklist s.ops 0  }
  70.     else { _vw nicklist s.ops 1 }
  71.   }  
  72.   if ($did == 4) {
  73.     if ($_vr(nicklist,s.voice) == 1) { _vw nicklist s.voice 0  }
  74.     else { _vw nicklist s.voice 1 }
  75.   }  
  76.   if ($did == 5) {
  77.     if ($_vr(nicklist,s.reg) == 1) { _vw nicklist s.reg 0  }
  78.     else { _vw nicklist s.reg 1 }
  79.   }  
  80.   if ($did == 6) {
  81.     if ($_vr(nicklist,s.me) == 1) { _vw nicklist s.me 0  }
  82.     else { _vw nicklist s.me 1 }
  83.   }
  84.   if ($did == 27) { run http://www.jIRC.vze.com | beep }
  85.   if ($did == 50) {
  86.     cl.apply
  87.   }
  88. }
  89.  
  90. on *:dialog:background:init:*:{
  91.   .timer -m 1 1 nl.back
  92.   _vrem background window | _vrem background type | _vrem background default
  93.   did - $+ $iif($_vr(nicklist,switch),c,u) background 2
  94.   nfcolor 7 | nfcolor 8 | nfcolor 9 | nfcolor 10 | nfcolor 11 | nfcolor 12
  95.   did -c background 7 $calc($_vr(nicklist,ops) + 1)
  96.   did -c background 8 $calc($_vr(nicklist,voice) + 1)
  97.   did -c background 12 $calc($_vr(nicklist,hops) + 1)
  98.   did -c background 9 $calc($_vr(nicklist,reg) + 1)
  99.   did -c background 10 $calc($_vr(nicklist,me) + 1)
  100.   if ($_vr(nicklist,s.hops) == 1) { did -c background 30 }
  101.   if ($_vr(nicklist,s.ops) == 1) { did -c background 3 }
  102.   if ($_vr(nicklist,s.voice) == 1) { did -c background 4 }
  103.   if ($_vr(nicklist,s.reg) == 1) { did -c background 5 }
  104.   if ($_vr(nicklist,s.me) == 1) { did -c background 6 }
  105. }
  106.  
  107. alias -l nl.back {
  108.   if ($_vr(background,nicklist) == $null) { _vw background nicklist black }
  109.   if ($colour(listbox) == $null) { _vw background nicklist black | did -c background 11 2 }  
  110.   elseif ($colour(listbox) == 0) { did -c background 11 1 }
  111.   elseif ($colour(listbox) == 1) { did -c background 11 2 }
  112.   elseif ($colour(listbox) == 2) { did -c background 11 3 }
  113.   elseif ($colour(listbox) == 3) { did -c background 11 4 }
  114.   elseif ($colour(listbox) == 4) { did -c background 11 5 }
  115.   elseif ($colour(listbox) == 5) { did -c background 11 6 }
  116.   elseif ($colour(listbox) == 6) { did -c background 11 7 }
  117.   elseif ($colour(listbox) == 7) { did -c background 11 8 }
  118.   elseif ($colour(listbox) == 8) { did -c background 11 9 }
  119.   elseif ($colour(listbox) == 9) { did -c background 11 10 }
  120.   elseif ($colour(listbox) == 10) { did -c background 11 11 }
  121.   elseif ($colour(listbox) == 11) { did -c background 11 12 }
  122.   elseif ($colour(listbox) == 12) { did -c background 11 13 }
  123.   elseif ($colour(listbox) == 13) { did -c background 11 14 }
  124.   elseif ($colour(listbox) == 14) { did -c background 11 15 }
  125.   elseif ($colour(listbox) == 15) { did -c background 11 16 }
  126. }
  127. alias -l chan.l {
  128.   var %channum = 0
  129.   :findchan
  130.   inc %channum 1
  131.   var %chan = $chan(%channum)
  132.   if (%chan == $null) { goto end }
  133.   if ($dialog(background) != $null) { did -i background 43 1 %chan }
  134.   goto findchan
  135.   :end
  136. }
  137.  
  138. alias cl.apply {
  139.   _vw nicklist switch $did(background,2).state
  140.   var %xt = 3
  141.   :start
  142.   if (%xt < 6) { inc %xt | goto start }
  143.   var %xt = 7
  144.   :loop
  145.   if (%xt < 10) { inc %xt | goto loop }
  146.   if ($_vr(nicklist,switch) == 0) { colour listbox 0 }
  147.   else colour listbox $calc($did(background,11).sel - 1)
  148.   clchans
  149. }
  150.  
  151. on *:join:#:{
  152.   if ($_vr(nicklist,switch) == $null) { _vw nicklist switch 1 }
  153.   if ($_vr(nicklist,s.ops) == $null) { _vw nicklist s.ops 1 }
  154.   if ($_vr(nicklist,s.reg) == $null) { _vw nicklist s.reg 1 }
  155.   if ($_vr(nicklist,s.voice) == $null) { _vw nicklist s.voice 1 }
  156.   if ($_vr(nicklist,s.me) == $null) {  _vw nicklist s.me 1 }
  157.   if ($_vr(nicklist,ops) == $null) { _vw nicklist ops 12 }
  158.   if ($_vr(nicklist,voice) == $null) { _vw nicklist voice 8 }
  159.   if ($_vr(nicklist,s.hops) == $null) { _vw nicklist s.hops 1 }
  160.   if ($_vr(nicklist,reg) == $null) { _vw nicklist reg 3 }
  161.   if ($_vr(nicklist,hops) == $null) { _vw nicklist hops 10 }
  162.   if ($_vr(nicklist,me) == $null) { _vw nicklist me 4 }
  163.   cl.nick $chan $nick
  164.   if ($nick == $me) && ($_vr(background,channel) == on) {
  165.     if ($exists($_vr(background,channelback)) == $true) { .background - $+ $_vr(background,channeltype) $chan $_vr(background,channelback)" }
  166.     elseif ($exists($_vr(background,channelback)) == $false) _vrem background channelback
  167.   }
  168. }
  169. on *:part:#:{
  170.   if ($nick == $me) { background -x $chan }
  171. }
  172. on *:help:#:cl.nick $chan $hnick
  173. on *:dehelp:#:cl.nick $chan $hnick
  174. on *:deop:#:cl.nick $chan $opnick
  175. on *:devoice:#:cl.nick $chan $vnick
  176. on *:op:#:cl.nick $chan $opnick
  177. on *:serverdeop:#:cl.nick $chan $opnick
  178. on *:serverop:#:cl.nick $chan $opnick
  179. on *:voice:#:cl.nick $chan $vnick
  180. raw 366:*:if ($me ison $2) { cl.loop $2 }
  181. alias -l cl.loop {
  182.   var %t = $nick($1,0)
  183.   var %t2 = 1
  184.   while (%t2 <= %t) { cl.nick $1 $nick($1,%t2) | inc %t2 1 }
  185. }
  186. alias -l clchans {
  187.   if ($_vr(nicklist,switch) == 1) {
  188.     var %c = $chan(0)
  189.     var %c1 = 1
  190.     while (%c1 <= %c) { cl.loop $chan(%c1) | inc %c1 1 }
  191.   }
  192. }
  193. alias -l cl.nick {
  194.   if ($2) {
  195.     if ($_vr(nicklist,switch) == 1) {
  196.       if ($2 == $me) && ($_vr(nicklist,s.me) == 1) { cline $_vr(nicklist,me) $1 $nick($1,$2) }
  197.       elseif ($2 ishop $1) && ($_vr(nicklist,s.hops) == 1) { cline $_vr(nicklist,hops) $1 $nick($1,$2) }
  198.       elseif ($2 isop $1) && ($_vr(nicklist,s.ops) == 1) { cline $_vr(nicklist,ops) $1 $nick($1,$2) }
  199.       elseif ($2 isvoice $1) && ($_vr(nicklist,s.voice) == 1) { cline $_vr(nicklist,voice) $1 $nick($1,$2) }
  200.       elseif ($2 isreg $1) && ($_vr(nicklist,s.reg)) { cline $_vr(nicklist,reg) $1 $nick($1,$2) }
  201.       else { cline $colour(nick) $1 $nick($1,$2) }
  202.     }
  203.   }
  204. }
  205.  
  206. alias -l vcl.nick {
  207.   var %a = $nick($active,0)  
  208.   var %a1 = 1
  209.   while (%a1 <= %a) {
  210.     if ($nick($active,%a1) isop $active) { cline 3 $1 %a1 }
  211.     elseif ($nick($active,%a1) isvoice $active) { cline 8 $1 %a1 }
  212.     elseif ($nick($active,%a1) isreg $active) { cline 7 $1 %a1 }
  213.     elseif ($nick($active,%a1) ishop $active) { cline 12 $1 %a1 }
  214.     cline 4 $1 $nick($active,$me)  
  215.     inc %a1 1
  216.   }
  217. }
  218.  
  219. alias flash.off {
  220.   .timer91 off
  221.   .timer92 off
  222.   clchans
  223. }
  224. on *:INPUT:*: {
  225.   .timer91 off
  226.   .timer92 off
  227.   ;clchans
  228. }
  229. alias -l nfcolor {
  230.   did -r background $1
  231.   did -a background $1 White
  232.   did -a background $1 Black
  233.   did -a background $1 Blue
  234.   did -a background $1 Green
  235.   did -a background $1 Lightred
  236.   did -a background $1 Brown
  237.   did -a background $1 Purple
  238.   did -a background $1 Orange
  239.   did -a background $1 Yellow
  240.   did -a background $1 Lightgreen
  241.   did -a background $1 Cyan
  242.   did -a background $1 Lightcyan
  243.   did -a background $1 Lightblue
  244.   did -a background $1 Pink
  245.   did -a background $1 Grey
  246.   did -a background $1 Lightgrey
  247. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement