home *** CD-ROM | disk | FTP | other *** search
- ; Example mIRC script to read LaunchInfo.txt
- ;
- ; To load copy this file to your scripts directory and type
- ; /load -rs <pathname>gamespy.mirc
- ; in any mIRC window and click yes when the warning appears.
- ;
- ; Don't e-mail me about how it works (or doesn't)
- ;
- ; Feel free to improve on it!
- ; If you want to send me a copy. It might even get included with GameSpy!
- ; Kevin "Zob the Slayer" Brown
- ; techsupport@gamespy.com
- ;
-
- alias gs_check { if $exists("C:\Program Files\GameSpy\LaunchInfo.txt") == $true doGsLaunch }
-
-
- on 1:LOAD: { if (%LaunchInfo == $null) {
- %q_temp = $nofile( [ $sdir[="Locate the GameSpy folder"] c:\ ] )}
- if (%q_temp != $null) {%LaunchInfo = %q_temp $+ LaunchInfo.txt}
- else {
- echo 4 $active No GameSpy folder selected ... Aborting...}
-
- }
-
- ON 1:START:{ .timergs_timer 0 2 gs_check }
-
- on 1:INPUT:#: if (%gs_active = 1) /back
-
- alias doGsLaunch {
- .timergs_timer off
- set %gs_game $read -l1 %Launchinfo
- set %gs_game $remove( %gs_game , GameType )
- set %gs_serv $read -l2 %Launchinfo
- set %gs_serv $remove( %gs_serv ,ServerName )
- set %gs_add $read -l3 %Launchinfo
- set %gs_add $remove( %gs_add ,ServerAddr )
- set %gs_mod $read -l4 %Launchinfo
- set %gs_mod $remove( %gs_mod ,ServerMod )
- msg #gamespy Playing %gs_game %gs_mod at %gs_serv - %gs_add
- .AWAY Playing %gs_game %gs_mod at %gs_serv - %gs_add
- .remove " $+ %LaunchInfo $+ "
- .echo -a You are marked AWAY - Type /BACK when you return
- set %gs_active 1
- }
-
- alias back {
- me is back, fresh from the kill!
- away
- if $exists(%LaunchInfo) { .remove " $+ %LaunchInfo $+ " }
- .timergs_timer 0 1 gs_check
- set %gs_active 0
- }