home *** CD-ROM | disk | FTP | other *** search
/ Špidla: Hráčůj ráj 2 / Hracuv-raj-2.bin / gamespy / gamespy.exe / %MAINDIR% / gamespy.mirc < prev    next >
Encoding:
Text File  |  2000-03-13  |  1.7 KB  |  53 lines

  1. ; Example mIRC script to read LaunchInfo.txt
  2. ;
  3. ; To load copy this file to your scripts directory and type
  4. ; /load -rs <pathname>gamespy.mirc
  5. ; in any mIRC window and click yes when the warning appears.
  6. ;
  7. ; Don't e-mail me about how it works (or doesn't)
  8. ;
  9. ; Feel free to improve on it!
  10. ; If you want to send me a copy. It might even get included with GameSpy!
  11. ; Kevin "Zob the Slayer" Brown
  12. ; techsupport@gamespy.com    
  13. ;
  14.  
  15. alias gs_check { if $exists("C:\Program Files\GameSpy\LaunchInfo.txt") == $true doGsLaunch }
  16.  
  17.  
  18. on 1:LOAD: { if (%LaunchInfo == $null) {
  19.     %q_temp = $nofile( [ $sdir[="Locate the GameSpy folder"] c:\ ] )}
  20.     if (%q_temp != $null) {%LaunchInfo = %q_temp $+ LaunchInfo.txt}
  21.     else {
  22.       echo 4 $active No GameSpy folder selected ... Aborting...}
  23.       
  24.     }
  25.  
  26. ON 1:START:{ .timergs_timer 0 2 gs_check }
  27.  
  28. on 1:INPUT:#: if (%gs_active = 1) /back
  29.  
  30. alias doGsLaunch { 
  31.    .timergs_timer off
  32.    set %gs_game $read -l1 %Launchinfo
  33.    set %gs_game $remove( %gs_game , GameType )
  34.    set %gs_serv $read -l2 %Launchinfo
  35.    set %gs_serv $remove( %gs_serv ,ServerName )
  36.    set %gs_add  $read -l3 %Launchinfo
  37.    set %gs_add  $remove( %gs_add ,ServerAddr )    
  38.    set %gs_mod  $read -l4 %Launchinfo
  39.    set %gs_mod  $remove( %gs_mod ,ServerMod )
  40.    msg #gamespy Playing %gs_game %gs_mod at %gs_serv - %gs_add
  41.    .AWAY Playing %gs_game %gs_mod at %gs_serv - %gs_add
  42.    .remove " $+ %LaunchInfo $+ " 
  43.    .echo -a You are marked AWAY - Type /BACK when you return
  44.    set %gs_active 1
  45. }
  46.  
  47. alias back {
  48.    me is back, fresh from the kill!
  49.    away
  50.    if $exists(%LaunchInfo) { .remove " $+ %LaunchInfo $+ " }
  51.       .timergs_timer 0 1 gs_check
  52.       set %gs_active 0
  53.  }