Sample wizard script for Warcraft III

Gamer's Internet Tunnel, formerly Gamer's IPX Tunnel

Sample wizard script for Warcraft III

Postby Ark » Thu Sep 16, 2004 4:49 pm

For those curious before you try v0.99 BETA, here is the .git script file for WC3:


Code: Select all
# GIT Wizard script for Warcraft III

# Standard Page about Client/Server
loadvar clisrv
setvar heading "Client or Server"
setvar subheading "Please select if you are hosting or joining the game below."
addline control "radio|clisrv|Please select one:|"
appendstring control "|First Remote Client on my LAN"
appendstring control "|Another Remote Client on my LAN"
appendstring control "|Local Client"
appendstring control "|The Server"
addline control "space|||2"
addline control "label||Select 'First Remote Client on my LAN' if the server hosted someplace else and you are the first or only client on your LAN."
appendstring control " Only one person per LAN should select this option, the rest must select 'Another Remote Client on my LAN'."
appendstring control " If the server is local on your own LAN, but not on your computer, select 'Local Client'."
appendstring control " If you are the server, select 'The Server'.|5"
showpage
savevar clisrv

# No need for GIT if another remote client
if clisrv = 1
   cancel "You do not need to run GIT as another remote client.  Only the first remote client needs to run GIT and you will be able to find the server."
endif

# No need for GIT if local client
if clisrv = 2
   cancel "You do not need to run GIT as a local client. You should be able to see the game server using the normal method."
endif

# Basic common settings
setvar sockets ""
setvar ports "6112 : Warcraft III"
setvar options OPT_FRAME_ETH2
addflag options OPT_IPV4_NOUC
setvar packets 0
setvar protos PROTO_UDP

# Server Pages
if clisrv = 3
   # Only need this information for server
   # Standard Network Configuration page
   loadvar hostname
   loadvar firewall
   loadvar nat
   loadvar externalhostname
   setvar heading "Network Configuration"
   setvar subheading "Please enter your IP address information below."
   addline control "label||What is your hostname or IP address?"
   addline control "text1|hostname||4"
   addline control "label||Are you open to receive incoming connections or are you firewalled?"
   addline control "radio|firewall||4|Open|Firewalled"
   addline control "label||Do you have a direct connection to the Internet or are you using NAT?"
   addline control "radio|nat||4|Direct Connection|NAT"
   addline control "label||If you are using NAT, what is your external hostname or IP address?"
   addline control "text1|externalhostname||4"
   addline control "space|||3"
   addline control "specl||ipfwnat";
   showpage
   savevar hostname
   savevar firewall
   savevar nat
   savevar externalhostname

   # Page Providing Server IP + Asking for Number of Remote LANs
   loadvar multimax
   math multimax multimax - 1
   setvar heading "Server IP + Number of Remote LANs"
   setvar subheading "Information to provide to the clients."
   addline control "label||Reminder: Your external hostname or IP is:"
   if nat = 0
      addline control "textr|hostname||4"
   else
      addline control "textr|externalhostname||4"
      addflag options OPT_IPV4_NAT
      setvar natinternal hostname
      setvar natexternal externalhostname
   endif
   addline control "label||You must provide this information to each of the clients now."
   addline control "space|||4"
   addline control "label||How many remote LANs are there? (Two clients on the same LAN only count as one)"
   addline control "dropd|multimax||10|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16"
   # If firewalled, add a reminder text
   # NAT with no firewall implies DMZ, so the port should be open
   if firewall != 0
      addline control "space|||4"
      if nat != 0
         addline control "label||Reminder: Since you are using NAT, you must map port 213 from "
         appendstring control externalhostname
         appendstring control " to "
         appendstring control hostname
         appendstring control "|2"
      else
         addline control "label||Reminder: Since you are firewalled, you must be able to open access to incoming connections on port 213.|2"
      endif
   endif
   showpage
   math multimax multimax + 1
   savevar multimax

   setvar multiport 213
   addflag options OPT_TCP_MULTI
   setvar hosts ""
else # Client Pages
   # Page Requesting Server IP
   loadvar servhost
   setvar heading "Server IP"
   setvar subheading "Enter the hostname or IP of the server."
   addline control "label||Enter the hostname or IP of the server."
   addline control "text1|servhost||4"
   addline control "label||This information should be provided by the person running the server."
   showpage
   savevar servhost

   setvar hosts servhost
   appendstring hosts ":213"
   appendstring hosts METH_TCP_CONNECT
endif
Ark
Site Admin
 
Posts: 2108
Joined: Sat Sep 13, 2003 4:21 pm

Postby argoth » Sun Oct 17, 2004 11:20 am

Looks great, Ark. One question -

With the following configuration

LAN A (NAT/FW)
GIT only machine
game server machine (no GIT)

LAN B (NAT/FW)
gaming client (GIT)
gaming client (no GIT)

The GIT only machine would actually be configured with "The Server" option? (e.g., the game server can't support GIT)
argoth
 
Posts: 1
Joined: Sun Oct 17, 2004 11:08 am

Postby Ark » Sun Oct 17, 2004 12:03 pm

Yeah well there are tons of odd configurations other then what the script allows for. Yes, you can pick "the server" for the GIT computer on the same LAN as the server. For WC3 there should be no issue since it does the tunneling of broadcast only and you need to open port 6112 via your NAT to the game server as well.
For other games where GIT is tunneling unicast traffic, if you separate the game server and GIT server, it may not work correctly if you use a switch instead of a hub, since GIT may not physically be able to see the same traffic the game server sees in that case.
Ark
Site Admin
 
Posts: 2108
Joined: Sat Sep 13, 2003 4:21 pm


Return to GIT

Who is online

Users browsing this forum: No registered users and 22 guests

cron