; Visit #rattmuffen for more information, Good Luck
menu menubar,channel {
Servcon:/servcon
}
alias servcon { /dialog -m servcon servcon }
dialog servcon {
title "Servcon (/servcon)"
size -1 -1 120 58
option dbu
combo 1, 30 19 80 39, sort size edit drop
text "Serverip:", 2, 7 4 23 8
combo 3, 30 3 80 47, sort size edit drop
text "Password:", 4, 4 20 25 8
button "Connect", 5, 83 45 27 9, flat
button "Path", 6, 83 35 27 9, flat
radio "cs1.6", 7, 55 39 22 11
radio "css", 8, 31 39 18 11
box "Games", 9, 29 33 51 18
}
on *:dialog:servcon:init:*:{
did -b $dname 5
if ($read(pass.txt)) { /loadbuf 20 -o servcon 1 pass.txt }
if ($read(servers.txt)) { /loadbuf 20 -o servcon 3 servers.txt }
if (%game == -applaunch 10) { did -c $dname 7 }
if (%game == -applaunch 220) { did -c $dname 8 }
}
on *:dialog:servcon:sclick:*:{
if ($did == 5) { run %path %game +connect $did(3).text $+ ; $+ password $did(1).text | write servers.txt $did(3).text | write pass.txt $did(1).text | echo -a Connecting to ' $+ $did(3).text $+ '... }
if ($did == 6) { set %path $sfile(C:\Steam.exe,Find Steam.exe,Ok) }
if ($did == 7) { set %game -applaunch 10 }
if ($did == 8) { set %game -applaunch 220 }
}
on *:dialog:servcon:edit:*:{
if ($did(3).text == $null) { did -b $dname 5 }
elseif ($did(3).text) { did -e $dname 5 }
}
on *:LOAD:{ echo -a Script succesfully loaded, visit #rattmuffen }
on *:UNLOAD:{ echo -a Script succesfully unloaded, visit #rattmuffen }