Skin Engine v2

By Horolaggia on Oct 13, 2009

Welp! Time for an update. We are now at v2 of my Skin dialog, and I plan to only have it getting better! I added in a random skin generator, and some text that explains what every button does! I would like to thank HeatedHeart for helping me fix the alias that the skin runs from. Aki deserves a lot of thanks for fixing the way the dialog looks, as well as for teaching me how to make mouse roll over things. So try it out, tell me what I should add into my third variation and have a good day. COMMENT!

Alias ReplaceMe {
  var %h = 1 , %end1
  while (%h <= $numtok($1-,32)) {
    %end1 = %end1 %skincolor $+ $chr(2) $+ $char(2) $+ $left($gettok($1-,%h,32),1) $+ %skincolor2 $+ $chr(2) $+ $char(2) $+ $mid($gettok($1-,%h,32),2) $+ 
    inc %h
  }
  return %end1
}

alias Skin { dialog $iif($dialog(Skin),-v,-dm) Skin Skin }
dialog Skin {
  title "Skin Engine- Horolaggia"
  size -1 -1 102 87
  option dbu
  text "Skins", 1, 18 1 28 10
  list 2, 1 11 80 50
  button "RTG", 3, 81 11 20 20
  button "Save", 4, 81 33 20 20
  button "Close", 5, 81 55 20 20, ok cancel
  button "Add", 6, 1 60 39 15
  button "Remove", 7, 40 60 40 15
  edit "", 8, 1 76 100 10, read
}

On *:Dialog:*:*:*:{
  if ($dname == Skin) {
    if ($devent == init) {
      loadbuf -ro $dname 2 SkinKeeper.txt  
    }
    elseif ($devent == sclick) {
      if ($did == 6) {
        set %sname $$?="Name the skin? (No spaces allowed!)"
        var %firstcolor $$?="Set the first color in the skin. (Numbers only. Format: 01 or 10)"
        var %lastcolor $$?="Set the last color in the skin. (Numbers only. Format: 01 or 10)"
        if (!$read(SkinKeeper.txt,w,%sname)) { 
          did -a $dname 2 %sname
          write SkinKeeper.txt %sname
          writeini SkinKeep.ini %sname First %firstcolor
          writeini SkinKeep.ini %sname Last %lastcolor
        }
        %sname
        dialog -v $dname
      }
      elseif ($did == 7) {       
        remini SkinKeep.ini $did(2).seltext
        write -dl $+ $did(2).sel SkinKeeper.txt
        did -d $dname 2 $did(2).sel        
      }
      elseif ($did == 2) {
        set %skintest  [ $+ [ $readini(SkinKeep.ini,$did(2).seltext,First) ] ] | set %skintest2  [ $+ [ $readini(SkinKeep.ini,$did(2).seltext,Last) ] ]
        echo -a $+(<,$me,>) $+(%skintest $+ T $+ %skintest2 $+ his %skintest $+ I $+ %skintest2 $+ s %skintest $+ A  %skintest $+ T $+ %skintest2 $+ est!)
      }
      elseif ($did == 4) {
        set %skincolor  [ $+ [ $readini(SkinKeep.ini,$did(2).seltext,First) ] ] | set %skincolor2  [ $+ [ $readini(SkinKeep.ini,$did(2).seltext,Last) ] ] | set %Skin $did(2).seltext | set %R %skincolor $+ ¯\_ | set %L %skincolor $+ _/¯
        msg $active $ReplaceMe(Skin changed to %Skin Skin!)
      }
      elseif ($did == 3) {
        set %skincolor  $+ $rand(0,15) | set %skincolor2  $+ $rand(0,15) | set %R %skincolor $+ ¯\_ | set %L %skincolor $+ _/¯ 
        set %skintest  $+ $rand(0,15) | set %skintest2  $+ $rand(0,15) 
        echo -a $+(<,$me,>) $+(%skintest $+ T $+ %skintest2 $+ his %skintest $+ I $+ %skintest2 $+ s %skintest $+ A  %skintest $+ T $+ %skintest2 $+ est!)
        if (%skincolor == %skincolor) { set %skincolor2  $+ $rand(0,15)
          set %R %skincolor $+ ¯\_ | set %L %skincolor $+ _/¯
        }
      }
    }
    if ($devent == mouse) { 
      If ($did == 6) { did -ra Skin 8 This button adds a skin. }
      If ($did == 7) { did -ra Skin 8 This button removes a skin. }
      If ($did == 5) { did -ra Skin 8 This button closes the dialog. }
      If ($did == 4) { did -ra Skin 8 This button saves your selected skin. }
      If ($did == 3) { did -ra Skin 8 This button gives you a random skin. }
    }
  }
}
Menu Channel,Query,Nicklist {
  -  
  SkinDialog: /Skin
}

Comments

Sign in to comment.
Horolaggia   -  Oct 14, 2009

Yes, any you put into it.

 Respond  
Cracker200   -  Oct 14, 2009

@ Horolaggia ah okay o.o will it load any theme with out, crashing mIRC.?

 Respond  
Horolaggia   -  Oct 14, 2009

Sorry been a while, I wont double post again.

Cracker: yes I did.

 Respond  
sunslayer   -  Oct 13, 2009

You may not post an updated snippet separately, you need to edit your first post.does no1 ever read the rules anymore?

 Respond  
Cracker200   -  Oct 13, 2009

lol wuT? u made this..?

 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.