PDA

View Full Version : Updated boot5zones


Muuss
09-27-2004, 02:10 AM
As I m bored at work, i modified my boot5zones.bat file to automatically detect my external ip address. It changes each time i connect my box to internet.

Don't write that code, COPY PASTE it or you may forget some backquotes

@echo off

REM >> Update INTERNAL_IP with the IP address used by YOUR server on YOUR lan
set INTERNAL_IP=192.168.0.2

if NOT exist spells_en.txt goto NOSPELL

for /f "tokens=1-7 usebackq delims=:. " %%a in (`ipconfig ^| find "IP" ^| find "ress" ^| find /v "0.0.0.0" ^| find /v "%INTERNAL_IP%"`) do set EXTERNAL_IP=%%d.%%e.%%f.%%g
echo External ip for this system is %EXTERNAL_IP%, internal is %INTERNAL_IP%

start zone . %EXTERNAL_IP% 7995 %INTERNAL_IP%
start zone . %EXTERNAL_IP% 7996 %INTERNAL_IP%
start zone . %EXTERNAL_IP% 7997 %INTERNAL_IP%
start zone . %EXTERNAL_IP% 7998 %INTERNAL_IP%
start zone . %EXTERNAL_IP% 7999 %INTERNAL_IP%

exit
cls

:NOSPELL
echo Copy spells_en.txt into that directory !


Please be aware that the row starting by for may not perfectly work on localized windows. Adapt it to yours :

type ipconfig on your computer, search the row showing your external ip address, then, modify the 'find' commands to select only that row.

Once done, modify the tokens=1-7 option and the %%c...%%f variables to catch the 4 numbers of your ip address.

If you do this in command line, use the single % syntax, not the double % one, IE :

for /f "tokens=1-7 usebackq delims=:. " %a in (`ipconfig ^| find "IP" ^| find "ress" ^| find /v "0.0.0.0"`) do set EXTERNAL_IP=%d.%e.%f.%g

Could someone confirm if this is working on a US windows (french one here) ?

Muuss

krash
10-09-2004, 01:25 AM
Here are the changes I made for my Win2K machine... Seems to work. Good Job Muuss.

@echo off

REM >> Update INTERNAL_IP with the IP address used by YOUR server on YOUR lan
REM I'm not on a LAN, so I set this down below to match the external IP
REM set INTERNAL_IP=127.0.0.1

if NOT exist spells_us.txt goto NOSPELL

for /f "tokens=1-6 usebackq delims=:. " %%a in (`ipconfig ^| find "IP" ^| find "ress" ^| find /v "0.0.0.0" ^| find /v "%INTERNAL_IP%"`) do set EXTERNAL_IP=%%c.%%d.%%e.%%f
set INTERNAL_IP=%EXTERNAL_IP%
echo External ip for this system is %EXTERNAL_IP%, internal is %INTERNAL_IP%

start zone . %EXTERNAL_IP% 7995 %INTERNAL_IP%
start zone . %EXTERNAL_IP% 7996 %INTERNAL_IP%
start zone . %EXTERNAL_IP% 7997 %INTERNAL_IP%
start zone . %EXTERNAL_IP% 7998 %INTERNAL_IP%
start zone . %EXTERNAL_IP% 7999 %INTERNAL_IP%

exit
cls

:NOSPELL
echo Copy spells_us.txt into that directory !

Arcane
10-09-2004, 08:39 AM
I'm going to try this; although, now I've got 10 zones running at the same time, I didn't want to boot the folks already online, I'll restart my server from scratch later when no one is online. This is a great piece of work from the both of you, way to go, definate bonus to the EQEmu community.

Arcane
10-09-2004, 08:52 AM
I'm using a Linksys something or other, somehow my server knows what it's external IP is. I'll have to look at how my login scripts work again on my UO Shard, my UO shard actually goes out to the internet and is able to figure out it's IP.

hoppy02
11-17-2004, 08:18 PM
a small question, why do you have to have 5 zones starting up to begin with ?

I have my own server and am at the moment the only one that plays on it (not on the net), can I get away with just having one of the

start zone . %EXTERNAL_IP% 7995 %INTERNAL_IP%

lines ?

that way it may load alot faster ?

a_Guest03
11-17-2004, 08:21 PM
Might be smart to have 2 so that it can load a new one as you zone out of the old one.

hoppy02
11-17-2004, 08:31 PM
ok thanks mate :-)

Chilla
11-30-2004, 12:49 AM
I'm not sure if anyone else has noticed this but went to download the guide and it kept getting 404, realising that everquestserver.com isn't working anymore I tried the website www.eqemulator.net/guidebook and found it ... Just in case anyone hadn't worked it out :)

sdabbs65
11-30-2004, 07:20 AM
I'm not sure if anyone else has noticed this but went to download the guide and it kept getting 404, realising that everquestserver.com isn't working anymore I tried the website www.eqemulator.net/guidebook and found it ... Just in case anyone hadn't worked it out :)

That guide is a bit outdated theres over 500 races.