Renegade Server Launcher

By Firstmate on Apr 03, 2009

*Screenshot will come later today

This is for those that play renegade :p
But it's basically a replica of renconnect. I figured why load an entirely new program, when mirc can do it!

To use:

Fill out the player information (click 'Find' to locate the game.exe)
Fill out any server information and click save, you should see it appear in the bottom-right listbox.
To connect, click on a server in the listbox, and press 'Play Renegade'

The other buttons are self-explanatory

alias rencon { dialog $iif($dialog(renip),-v,-dm) rencon rencon }
alias rencon.loadserv {
  if ($isfile(rencon.ini)) {
    var %x = $1, %y $ini(rencon.ini,$1,0)
    while (%y > 0) {
      if ($ini(rencon.ini,%x,%y) == Port) { did -ra rencon 12 $readini(rencon.ini,$1,Port) }
      if ($ini(rencon.ini,%x,%y) == IP) { did -ra rencon 11 $readini(rencon.ini,$1,IP) }
      if ($ini(rencon.ini,%x,%y) == Name) { did -ra rencon 10 $readini(rencon.ini,$1,Name) }
      if ($ini(rencon.ini,%x,%y) == Pass) { did -ra rencon 23 $readini(rencon.ini,$1,Pass) }
      dec %y
    }
  }
}
alias rencon.loadlist {
  if ($isfile(rencon.ini)) {
    var %x $ini(rencon.ini,0)
    did -r rencon 15
    while (%x > 1) { did -a rencon 15 $ini(rencon.ini,%x) | dec %x }   
  }
}
dialog rencon {
  title "Renegade Server Launcher"
  size -1 -1 200 112
  option dbu
  box "Player Information", 1, 1 2 196 36
  text "Location", 2, 5 13 24 7
  edit "", 3, 37 11 120 10
  button "Find", 4, 163 9 18 10
  text "Name", 5, 5 24 25 8
  edit "", 6, 37 23 120 10
  box "Server Information", 7, 0 42 115 52
  text "Name", 8, 5 52 20 8
  text "IP and Port", 9, 5 63 31 8
  edit "", 10, 37 51 76 10
  edit "", 11, 37 62 51 10
  edit "", 12, 92 62 21 10
  box "Server List", 14, 122 42 76 66
  list 15, 126 51 68 30, size vsbar
  button "Load", 16, 127 83 22 10
  button "Save", 17, 152 83 17 10
  button "Delete", 18, 172 83 24 10
  button "Play Renegade", 19, 127 94 42 10
  button "Quit", 20, 170 94 26 10, ok cancel
  text "Password     (Optional)", 21, 4 74 32 16
  edit "", 22, 37 74 75 10
  text "", 23, 1 96 114 15
}
on *:dialog:rencon:init:0: {
  rencon.loadlist
  var %x $ini(rencon.ini,General,0)
  while (%x > 0) {
    if ($ini(rencon.ini,General,%x) == Path) { did -ra rencon 3 $readini(rencon.ini,General,Path) }
    if ($ini(rencon.ini,General,%x) == Player) { did -ra rencon 6 $readini(rencon.ini,General,Player) }
    dec %x
  }
}
on *:dialog:rencon:sclick:4: {
  var %path $sfile(C:\,Select the game executable)
  if ($right(%path,4) == .exe && %path) {
    writeini rencon.ini General Path %path
    did -ra rencon 3 %path
  }
  else { did -ra rencon 23 Please select a proper game file }
}
on *:dialog:rencon:edit:6: { writeini rencon.ini General Player $did(rencon,6).text }
on *:dialog:rencon:sclick:16: {
  if ($did(rencon,15).sel != 0) { rencon.loadserv $did(rencon,15,$did(rencon,15).sel) }
  else { did -ra rencon 23 Please select a server from the list } 
}
on *:dialog:rencon:sclick:17: {
  if ($did(rencon,10).text && $did(rencon,11).text && $did(rencon,12).text) {
    if ($numtok($did(rencon,10).text,32) == 1) {
      var %name $did(rencon,10).text, %ip $did(rencon,11).text, %port $did(rencon,12).text
      if ($did(rencon,22).text) { var %pass $did(rencon,22).text }
      writeini -n rencon.ini %name Name %name
      writeini -n rencon.ini %name IP %ip
      writeini -n rencon.ini %name Port %port
      if (%pass) { writeini -n rencon.ini %name Pass %pass }
      rencon.loadlist
    }
    else { did -ra rencon 23 Keep the server name as one word please. }
  }
}
on *:dialog:rencon:sclick:18: {
  if ($did(rencon,15).sel != 0) {
    if ($input(You sure you want to delete $did(rencon,15,$did(rencon,15).sel), yu,)) {
      remini rencon.ini $did(rencon,15,$did(rencon,15).sel)
      rencon.loadlist
    }
  }
  else { did -ra rencon 23 Please select a server from the list }
}
on *:dialog:rencon:sclick:19: {
  if ($did(rencon,15).sel != 0) {
    var %path $qt($readini(rencon.ini,General,Path)), %player $readini(rencon.ini,General,Player), %ip $readini(rencon.ini,$did(rencon,15,$did(rencon,15).sel).text,IP), %port $readini(rencon.ini,$did(rencon,15,$did(rencon,15).sel).text,Port), %pass $iif($readini(rencon.ini,$did(rencon,15,$did(rencon,15).sel).text,Pass),$readini(rencon.ini,$did(rencon,15,$did(rencon,15).sel).text,Pass),$null)
    run %path +netplayername $qt(%player) +connect $+(%IP,:,%port) $iif(%pass,+password $qt(%pass),$null)
  }
  else { did -ra rencon 23 Please select a server from the list to play }
}

Comments

Sign in to comment.
crysis992   -  Apr 09, 2009

Maybe its Sound a bit Stupid, but can you create an save auto !autch Script for the irc client?
Because im mod in some servers and its suck to autch me every time, lol
Maybe with Serial or IP check or something.

^^

 Respond  
Aucun50   -  Apr 04, 2009

Looks nice tho, your got C&C Renegade i'm guessing? Should stop by my Server sometime called "AuServ".

 Respond  
Firstmate   -  Apr 04, 2009

Because it connects to a server, but eh I guess it makes more sense for game launcher. But it's the same concept.

 Respond  
Aucun50   -  Apr 04, 2009

Ok so i loads the game.exe why is it called "Renegade Server Launcher" not "Renegade Game Launcher" ?

 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.