mIRC Home    About    Download    Register    News    Help

Print Thread
X
XTZGZoReX
XTZGZoReX
X
This script is simply supposed to change the nicklist colors in all channels I'm on. Yet, it doesn't seem to do anything.

Code:
alias colors {
  echo -a Applying colors :]
  var %chans = 1
  while ( %chans <= $chan(0) ) {
    var %nicks = 1
    while ( %nicks <= $nick(%chans,0) ) {
      cline ($rand(0,15) $chan(%chans) %nicks
      inc %nicks
    }
    inc %chans
  }
}


Any ideas? Thanks.

Joined: Oct 2005
Posts: 1,671
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,671
This line is incorrect:

cline ($rand(0,15) $chan(%chans) %nicks

It should be:

cline $rand(0,15) $chan(%chans) $nick($chan(%chans),%nicks)
;cline <color> <channel> <nickname>


-genius_at_work

X
XTZGZoReX
XTZGZoReX
X
My script now looks like this:

Code:
alias colors {
  echo -a Applying colors :]
  var %chans = 1
  while ( %chans <= $chan(0) ) {
    var %nicks = 1
    while ( %nicks <= $nick(%chans,0) ) {
      cline $rand(0,15) $chan(%chans) $nick($chan(%chans),%nicks)
      inc %nicks
    }
    inc %chans
  }
}


However, it still does nothing.

Joined: Oct 2005
Posts: 1,671
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,671
This line was also incorrect:

while ( %nicks <= $nick(%chans,0) ) {

It should be this:

while ( %nicks <= $nick($chan(%chans),0) ) {


-genius_at_work

X
XTZGZoReX
XTZGZoReX
X
That seemed to work!

Thank you very much.


Link Copied to Clipboard