mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2003
Posts: 46
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Nov 2003
Posts: 46
Hi,

OK, Newbie to scripting question.
I'm looking for help with colouring the nicklist based on somones status (op,voice, reg etc). I want to use this in my remote section, prefferably with an on text event, or some other event, the reason I want to be able to do this is because I'm just starting out and need to understand it!

I've seen some stuff thats way over my head for now, multi lined scripts etc (the use of those stupid {} brackets is a constant source of annoyance for me as I cant them to work! lol)

Anyway, any help would be appreciated,and remember kee it simple please, I'm a newbie and need to be able to understan and branch from it myself.

Thanks
Dizkonnekted grin


Dizkonnekted from reality....!
Joined: Sep 2003
Posts: 58
S
Babel fish
Offline
Babel fish
S
Joined: Sep 2003
Posts: 58
You can use "/cline" to color the nickname list...

But you need to make a script that counts all nicks...
and then checks 'm all for ops/voice/reg...

I have it to in my script...

I did it like this :

Code:
 

on *:join:#: {
  if (($nick == $me) || ($nick != $me)) {
  set %t.n $nick(#,0)
  set %t.c #
  set %t.now 0
  timer.nl1 1 1 color.nl
}
}
alias color.nl {
  inc %t.now 1
  if ($nick(%t.c,%t.now) isowner %t.c) { cline 4 %t.c %t.now }
  elseif ($nick(%t.c,%t.now) isop %t.c) { cline 12 %t.c %t.now }
  elseif ($nick(%t.c,%t.now) isvoice %t.c) { cline 9 %t.c %t.now }
  elseif ($nick(%t.c,%t.now) isreg %t.c) { cline 1 %t.c %t.now }
  if (%t.now == %t.n) { halt }
  else { color.nl.2 }
}

alias color.nl.2 {
  inc %t.now 1
  if ($nick(%t.c,%t.now) isowner %t.c) { cline 4 %t.c %t.now }
  elseif ($nick(%t.c,%t.now) isop %t.c) { cline 12 %t.c %t.now }
  elseif ($nick(%t.c,%t.now) isvoice %t.c) { cline 9 %t.c %t.now }
  elseif ($nick(%t.c,%t.now) isreg %t.c) { cline 1 %t.c %t.now }
  if (%t.now == %t.n) { halt }
  else { color.nl }
}



Now i didn't use loops and stuff, because i don't know how to handle them...

Maybe this wil work for you to...

Just try it out...

Last edited by stimpy; 06/11/03 04:01 PM.

***************************
To chat, or not to chat.
That's the question
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Also see /help /cnick or Alt+B -> Colors

Joined: Sep 2003
Posts: 21
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Sep 2003
Posts: 21
All i did was make an alias in the remotes section.. and then I have it call on that alias when ever a nick joins, parts, gets ops/voice loses ops/voice, kicks, etc.. This was based off of another script I found else where.. but in my version of it i modified it a bit to suit my likings.. such as identifing certain people with a certain color by their dynamic host mask..
to get a dynamic address from someone use this alias
---------------------------------------------
alias dynamic {
/set %temp.msk $address($1,3)
/echo -a $1 %temp.msk
unset %temp.msk
}
;Syntax: /dynamic <nick>
---------------------------------------------
;the color can be changed by chaning the number after cline
;in the code to a diffrent number.. 0-15 to your likings..
alias nicklistcolors {
var %nicknametocolor ready
var %nicknameon 1
while ( %nicknametocolor != $null ) {
%nicknametocolor = $nick(#,%nicknameon)
if ( %nicknametocolor == $me ) { cline 7 # %nicknameon }
elseif ($address(%nicknametocolor,3) == *!*soulz@*.parole.was.violated.biz) { cline 4 # %nicknameon }
elseif ($address(%nicknametocolor,3) == *!*soulz@*.your.mother.bores.us) { cline 4 # %nicknameon }
elseif ($address(%nicknametocolor,3) == *!*soulz@*.worth.the.grief.ws) { cline 4 # %nicknameon }
elseif ($address(%nicknametocolor,3) == *!*soulz@*.with.retards.on.the.littleb.us) { cline 4 # %nicknameon }
elseif ($address(%nicknametocolor,3) == *!*soulz@69.50.174.*) { cline 4 # %nicknameon }
;## For someone whos voice ##
elseif ( %nicknametocolor isvo # ) { cline 14 # %nicknameon }
;## For someone whos op ##
elseif ( %nicknametocolor isop # ) { cline 15 # %nicknameon }
;## For someone whos nothing ##
else { cline 5 # %nicknameon }
inc %nicknameon
}
}
on *:join:#: { /nicklistcolors }
on *:part:#: { /nicklistcolors }
on *:op:#: { /nicklistcolors }
on *:deop:#: { /nicklistcolors }
on *:voice:#: { /nicklistcolors }
on *:devoice:#: { /nicklistcolors }
on *:kick:#: { /nicklistcolors }

----------------------------------------------------
hope that helps ya.. it may not be the easiest or cleanest way to do this.. but it works quite well for me..
smirk


Dejavue is only proof that dreams really do come true.
Joined: Sep 2003
Posts: 93
T
Babel fish
Offline
Babel fish
T
Joined: Sep 2003
Posts: 93
Or you can use the mirc color default option... Go to your address book in your mirc - click on color. Then add your modes such as op, voice, help etc... quite easy and no need for a seperate script.

For my own mirc I have nicklist colours for owners(depending on network), ops, help, voice, regulars and my own nick. smile

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
lol, noone seems to get that mirc has the addressbook and can color, huh..

*sigh* Why do you people write stuff that is pointless. Unless you want the colors to change every three seconds, just use the address book.


-KingTomato
Joined: Sep 2003
Posts: 93
T
Babel fish
Offline
Babel fish
T
Joined: Sep 2003
Posts: 93
I believe I said that in my post grin


Link Copied to Clipboard