mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2003
Posts: 20
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Feb 2003
Posts: 20
I've tried to make it so people cant mess it up as much as I can but wondering if some of it is a bit redundant.
Code:
 
;;;;;(%utdir == $mircdir) is checked because if at some point u had clicked OK @ $sdir, it picks the $mircdir 

on *:start:{
  if (%nick == $null) || (%pass=null) {
    setup 
  }
  elseif (%utdir == $null) || (%utdir == $mircdir) { 
    echo -a  $+ $color(info) $+ * * * $+ $color(info2) Your UT path settings are missing! Please set your Unreal Tournament directory $+ $color(info) $+ * * *
    echo -a  $+ $color(info) $+ * * * $+ $color(info2) Your UT path settings are missing! Please set your Unreal Tournament directory $+ $color(info) $+ * * *
    echo -a  $+ $color(info) $+ * * * $+ $color(info2) Your UT path settings are missing! Please set your Unreal Tournament directory $+ $color(info) $+ * * *
    utsetup
  }
  else .nick %nick
  server irc.server.net
}


alias setup {
  if %nick == $null || %pass == $null || $?!="Your pass and nick are already set $crlf $+ Do u wish to change them?" {
    set %nick $$?="Enter your registerd NickName"
    set %pass $$?*="Enter your Password"
    .nick %nick
  }
  if (%utdir == $null) || (%utdir == $mircdir) { 
    utsetup
  }
  else echo -a  $+ $color(info) $+ * * * $+ $color(info2) Setup Completed!  $+ $color(info) $+ * * *
  .nick %nick
  if ($server == $null) { .server irc.server.net }
}


alias utsetup {
  :start
  set %utdir $sdir(dir,Select your UNREAL TOURNAMENT Folder: $crlf !NOT THE SYSTEM FOLDER!)
  if (%utdir == $null) || (%utdir == $mircdir) {
    echo -a  $+ $color(info) $+ * * * $+ $color(info2) You did not select a folder! Please set a folder!  $+ $color(info) $+ * * *
    goto start
  }
  echo -a  $+ $color(info) $+ * * * $+ $color(info2) Setup Completed!  $+ $color(info) $+ * * *
  .nick %nick
  if ($server == $null) { .server irc.server.net }
}

Joined: Mar 2003
Posts: 272
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Mar 2003
Posts: 272
A bit redundant indeed, if it'd be mine, i would use $findfile() to set the UT directory instead of having the user select it. But that's just me.


- cF
Dedicated helper for rent.
Joined: Jan 2003
Posts: 96
J
Babel fish
Offline
Babel fish
J
Joined: Jan 2003
Posts: 96
you should use $readini & $writeini instead of perm variables like %utdir and %nick smile


Link Copied to Clipboard