Jump to content

Ping()


 Share

Recommended Posts

I have a script and I want do to something like get the ping time of a server every couple seconds (adlib?) and add that delay to certain sleeps in my script. The problem is that I have no idea how to get the IP of the server I want to ping lol.

It's for a game and I know the server can change so could someone give me a direction to go?

:)

Link to comment
Share on other sites

if you do ping www.google.com, the IP will be revealed.

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Link to comment
Share on other sites

Do you have the host name of the server? If not you might have to use a tool live tcpview to see the list of connections and find the server that way.

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Link to comment
Share on other sites

Do you have the host name of the server? If not you might have to use a tool live tcpview to see the list of connections and find the server that way.

Yes this is what I think I'm going to need.

What kind of information can I get out of "netstat -n" and how can I use that information?

My goal is to use a combination of game modding and AutoIt to display the server currently connected to in the game Diablo II and display latency.

Now'>http://forums.diii.net/showthread.php?t=223863']Now onto how to get onto a server where DC will walk.

When searching for a game, its a lot easier to have your Diablo running in Window Mode. To do this, find the shortcut to Diablo, right click on it and go to properties. Look at the target, and you will see it says something like (depending on where Diablo is on your comp) CProgram Files\Diablo II\Diablo II.exe. TO make it run in window mode, put the current target in quotes, and add a –W to the end of it, outside the quotes. When edited, the previously mentioned target should now look like this: "CProgram Files\Diablo II\Diablo II.exe" –W. This will cause Diablo to run in a small window, and can be easily minimized so you can search for the correct IP quicker.

To search just follow these steps:

1) Create a game (always remember to password it so nobody steals your Anni)

2) Go to the start menu, click on run, and type in "cmd" and then press run

3) A black command box window should come up

4) Type in the following: netstat – n

5) You will get a list of a whole bunch of numbers; each one is a different IP address.

6) Look for the one that ends in .4000, that’s the Diablo one. It will look something like xx.xxx.xxx.xx.400 (the x’s are random numbers)

7) Look for the IP, it will be the 2 (or 3) numbers directly to the left of the .4000, so if you get something that looks like xx.xxx.xxx.86.4000, where the x’s are all different numbers, this means you are on server .86

8) Keep creating games and typing in netstat –n until you find a game that is on the IP you want.

9) If you make more than 3 games a minute, you will get a temporary IP ban, and you wont be able to connect to Battle net for 10 minutes.

Notice: There is no way to force yourself onto an IP address. You must keep creating games until you find the right one. This is where patience comes on, remember, servers range from .30 to .180, that’s 150 different servers, so essentially each time you create a game you have a 1 in 150 chance of it being the right one. Its completely random and takes patience. Sometimes you get lucky and get on the right IP in 3 tries, sometimes it has taken me 200+ games. Also, DC only spawns in Hell games created on the IP; he will not walk on a server that is a normal or nightmare game.

It would be really nice to be able to see the server number on the screen rather than minimize and use the CMD prompt every time. Especially since this is done repetitively. But I can't seem to bridge the gap between the command prompt and AutoIt.

Link to comment
Share on other sites

Yes this is what I think I'm going to need.

What kind of information can I get out of "netstat -n" and how can I use that information?

My goal is to use a combination of game modding and AutoIt to display the server currently connected to in the game Diablo II and display latency.

It would be really nice to be able to see the server number on the screen rather than minimize and use the CMD prompt every time. Especially since this is done repetitively. But I can't seem to bridge the gap between the command prompt and AutoIt.

That method doesn't work anymore since 2007/2008 something.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...