mIRC Home    About    Download    Register    News    Help

Print Thread
#54807 14/10/03 08:11 PM
Joined: Dec 2002
Posts: 111
F
Frog Offline OP
Vogon poet
OP Offline
Vogon poet
F
Joined: Dec 2002
Posts: 111
Well..I've not scripted in a long time, so I wanted to polish my skills a bit. I made this..

Code:
alias mcolor {
  var %i 1,%c 14,%x
  while (%i <= $len($1-)) {
    var %c = $iif(%c == 14,7,14)
    %x = $iif($mid($1-,%i,1) == $chr(32),$+(%x,$chr(160)),$+(%x,$+(,%c),$iif($mid($1-,%i,1) == $chr(32),$chr(160),$mid($1-,%i,1))))
    inc %i
  }
  if ($isid) return %x
  else say %x
}


Ok, well, it works like I want it to..but, use numbers in that. (/mcolor 2003)

It errors like it used to back when you didn't add 16 to the color codes in remotes. But now, when I add 16, it does nothing. Those are like transparent now..or something.

Anyway..anyone know of a way to fix that?


Experience The Void.. Are You Ready?
Joined: Dec 2002
Posts: 16
T
tye Offline
Pikka bird
Offline
Pikka bird
T
Joined: Dec 2002
Posts: 16
Code:
mcolor {
  var %i 1,%c 14,%x
  while (%i <= $len($1-)) {
    var %c = [color:red]$base([/color]$iif(%c == 14,7,14)[color:red],10,10,2)[/color]
    %x = $iif($mid($1-,%i,1) == $chr(32),$+(%x,$chr(160)),$+(%x,$+(,%c),$iif($mid($1-,%i,1) == $chr(32),$chr(160),$mid($1-,%i,1))))
    inc %i
  }
  if ($isid) return %x
  else say %x
} 


When you use colour codes you need to use two digit numbers when specify your colour. Example: [Ctrl+K]01 for colour 1. $base will pad the number with a 0 if it is only 1 digit.

Last edited by tye; 15/10/03 01:43 AM.

Tye on Undernet and DALnet

Link Copied to Clipboard