mIRC Homepage
Posted By: littlecramp make nick appear in color - 16/07/03 01:18 PM
Not a nicklist color, but make nick to appear in a variety of color. Is that possible?
Posted By: Dr4g0n Re: make nick appear in color - 16/07/03 01:36 PM
How do u want it randomized?
or if $nick is owner or voice or ref or operator
be a bit more specific please
:P
Posted By: pheonix Re: make nick appear in color - 16/07/03 01:38 PM
 $+ $r(0,15) is a random colour
Posted By: littlecramp Re: make nick appear in color - 16/07/03 01:47 PM
reference only. Btw, does the colored nick need to be an operator?
Posted By: Dr4g0n Re: make nick appear in color - 16/07/03 01:51 PM
no
Posted By: littlecramp Re: make nick appear in color - 16/07/03 01:55 PM
E,g nick is little[color:orange]cramp
Posted By: LocutusofBorg Re: make nick appear in color - 16/07/03 02:48 PM
Code:

; custom identifier
; usage: $rc(nick)
; returns a nick split in two, each half colored a random color
; note: because of the use of $rand, the two halves can occasionally end up the same color
;
alias rc {
  ; determine half-length of nick
  ;
  var %i = $int($calc($len($1) / 2))
  ;
  ; return the color nick 
  ; $chr(3) = colorcode
  ; $chr(15) = end all control codes
  ;
  return $chr(3) $+ $rand(00,15) $+ $left($1,%i) $+ $chr(3) $+ $rand(00,15) $+ $right($1,$calc($len($1) - %i)) $+ $chr(15)
}
 

LocutusofBorg
DALnet #HelpDesk
Posted By: Dr4g0n Re: make nick appear in color - 16/07/03 03:15 PM
now that youre taling about nickcolours how do i do something like this in my nicklist every nick in like this:
15[11D15r4g0n]
Posted By: littlecramp Re: make nick appear in color - 16/07/03 04:30 PM
But i want the effect to take place at the nicklist
Posted By: Dr4g0n Re: make nick appear in color - 16/07/03 04:32 PM
blush didnt read good enought (stupid me)
Posted By: Hammer Re: make nick appear in color - 16/07/03 04:35 PM
Just as /cline 12 #channel littlecramp will only color your entire nick (or not at all), and as the cnick system only has a single color choice per entry, so it is that you can only color a nick one color in the nicklist.

What you choose to do in the channel text (/help on TEXT) is completely up to you.
Posted By: qwerty Re: make nick appear in color - 16/07/03 04:38 PM
Using zeropadded parameters in $rand() won't make it return a zeropadded value too. You get away with the first $rand() (as it's impossible to have a nick that begins with a number) but the second $rand() could mess up. You'd need $base($rand(0,15),10,10,2). Also, $rand() could return the background colour of the user, meaning that at least half of the nickname would be invisible. Last, using it on 1-letter nicks would return <ctrl+k>N1<ctrl+k>N2<nick>, ie unnecessary colour codes.

Here's an alias that deals with these problems and also makes sure that the random colours will not be the same:
Code:
alias rc {
  var %a = $remtok(00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15,$color(b).dd,32), $&amp;
    %1 = $gettok(%a,$r(1,15),32)
  if ? iswm $1 { return $+($chr(3),%1,$1,$chr(3)) }
  var %2 = $gettok($remtok(%a,%1,32),$r(1,14),32), %a = $int($calc($len($1) / 2))
  return $+($chr(3),%1,$left($1,%a),$chr(3),%2,$right($1,- $+ %a),$chr(3))
}


Edit: bah, while I was previewing my post, littlecramp clarified that it's for the nicklist. I wrote this in vain ...and I can't even sell it.
Posted By: Hammer Re: make nick appear in color - 16/07/03 04:45 PM
Don't you hate that? MAN, can I sympathize. By the way, *cough* there's no $regex or $regsub in your rc alias. Slipping, or what? :tongue:
Posted By: littlecramp Re: make nick appear in color - 16/07/03 04:53 PM
Hmm, Mr Hammer, I saw an nick on a channel with different color on it, thought the nicklist box show the coding instead!. I dont know how he do it, mayb through dll?
Posted By: Hammer Re: make nick appear in color - 16/07/03 05:10 PM
With a dll, almost anything is possible.
© mIRC Discussion Forums