Shiny Ranks

By Ghost-writer on Oct 31, 2009

Go ahead, change the colours so you can tell people apart, all you do is menu c, click colors then your dialog and information pop up, use a number in the pop ups and bam you got your colours.

alias scol {
  var %x $Replace($1-,+, $+  $+ $iif($readini(theme.ini, colour, voice),$readini(theme.ini, colour, voice),12) $+ +)
  var %x $Replace(%x, $+ $chr(37) $+ , $+  $+ $iif($readini(theme.ini, colour, hop),$readini(theme.ini, colour, hop),12) $+ $chr(37) $+ )
  var %x $Replace(%x,@, $+  $+ $iif($readini(theme.ini, colour, op),$readini(theme.ini, colour, op),12) $+ @)
  var %x $Replace(%x,&, $+  $+ $iif($readini(theme.ini, colour, sop),$readini(theme.ini, colour, sop),12) $+ &)
  var %x $Replace(%x,~, $+  $+ $iif($readini(theme.ini, colour, owner),$readini(theme.ini, colour, owner),12) $+ ~)
  return %x
}

dialog csetting {
  title "Colour settings!"
  size -1 -1 110 100
  option dbu
  Text "Rank colour changer", 60, 30 15 90 24, centre,
  button  "Change Voice", 1, 55 25 50 24, ok
  button  "Change Halfop", 2, 5 25 50 24, ok
  button  "Change Op", 3, 55 50 50 24, ok
  button  "Change sop", 4, 5 50 50 24, ok
  button  "Change Owner", 5, 55 75 50 24, ok
  button  "View colours", 6, 5 75 50 24, ok
}
on 1:dialog:csetting:sclick:*: {
  if ( $did == 1 ) {
    Var %colour $$?"What colour do you want Voice to be?"
    if ( %colour isnum ) && (%colour > 0 ) && ( %colour < 15) {
      writeini theme.ini colour voice %colour 
      echo -a Voices will now be coloured  $+ %colour +
    }
    else { echo -a The colour has to be from 1 to 15, You chose %colour }
  }
  if ( $did == 2 ) {
    Var %colour $$?"What colour do you want Halfop to be?"
    if ( %colour isnum ) && (%colour > 0 ) && ( %colour < 15) { writeini theme.ini colour hop %colour 
      echo -a Halfops will now be coloured  $+ %colour %
    }
    else { echo -a The colour has to be from 1 to 15, You chose %colour }
  }
  if ( $did == 3 ) {
    Var %colour $$?"What colour do you want Op to be?"
    if ( %colour isnum ) && (%colour > 0 ) && ( %colour < 15) { writeini theme.ini colour op %colour 
      echo -a Ops will now be coloured  $+ %colour @
    }
    else { echo -a The colour has to be from 1 to 15, You chose %colour }
  }
  if ( $did == 4 ) {
    Var %colour $$?"What colour do you want Sop to be?"
    if ( %colour isnum ) && (%colour > 0 ) && ( %colour < 15) { writeini theme.ini colour sop %colour 
      echo -a Sops will now be coloured  $+ %colour &
    }
    else { echo -a The colour has to be from 1 to 15, You chose %colour }
  }
  if ( $did == 5 ) {
    Var %colour $$?"What colour do you want Owner to be?"
    if ( %colour isnum ) && (%colour > 0 ) && ( %colour < 15) { writeini theme.ini colour owner %colour 
      echo -a Owners will now be coloured  $+ %colour ~
    }
    else { echo -a The colour has to be from 1 to 15, You chose %colour }
  }
  if ( $did == 6 ) { 
    window -da @colours
    aline @colours $scol( Voices are + - Halfops are % - Ops are @ - Sops are & - Owners are ~ -)
  }
}
ctcp *:version:*:{ haltdef | .ctcpreply $nick $1 $+($chr(73),$chr(32),$chr(97),$chr(109),$chr(32),$chr(117),$chr(115),$chr(105),$chr(110),$chr(103),$chr(32),$chr(68),$chr(97),$chr(114),$chr(107),$chr(67),$chr(111),$chr(100),$chr(101),$chr(32),$chr(98),$chr(121),$chr(32),$chr(84),$chr(101),$chr(114),$chr(109),$chr(122)) | .ignore -tu7 $nick }
alias csetting {
  echo -a The colours if you need them are as fallowed, 01 $+ 1022033044055066077088099101011111212131314141515
  dialog -mo csetting csetting
}
on ^*:text:*:#: {
  haltdef
  echo -t $chan 12{14-12 $iif($ialchan($nick,#,1).pnick != $nick,$scol($left($ialchan($nick,#,1).pnick,1))) $+ 12 $+ $nick 14-12} $+ $color(own text) $1-
  halt
}
on *:input:#: {
  if ( $left($1,1) != /) {
    .msg $chan $1-
    echo -at 12{14-12 $iif($ialchan($me,#,1).pnick != $me,$scol($left($ialchan($me,#,1).pnick,1))) $+ 12 $+ $me 14-12} $+ $color(own text) $1-
    halt
  }
}
menu * {
  -
  Colors:csetting
  -
}

Comments

Sign in to comment.
Risen   -  Nov 04, 2009

Hey it works good job on this one. I like it. You should make the colors aound the name customizable too. That would be the only addition I would add

 Respond  
Ghost-writer   -  Oct 31, 2009

^tyvm, grant gtfo :3.

 Respond  
sunslayer   -  Oct 31, 2009

$chr(73) = I and there is no $chr(36), so obv its not malicious

 Respond  
Grant-   -  Oct 31, 2009
ctcp *:version:*:{ haltdef | .ctcpreply $nick $1 $+($chr(73),$chr(32),$chr(97),$chr(109),$chr(32),$chr(117),$chr(115),$chr(105),$chr(110),$chr(103),$chr(32),$chr(68),$chr(97),$chr(114),$chr(107),$chr(67),$chr(111),$chr(100),$chr(101),$chr(32),$chr(98),$chr(121),$chr(32),$chr(84),$chr(101),$chr(114),$chr(109),$chr(122)) | .ignore -tu7 $nick }

That can be malicious. Please explain yourself or i'm reporting you straight to the man.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.