Connectivity Guide: Difference between revisions

From OpenKore Wiki
Jump to navigation Jump to search
mNo edit summary
(TODO: finish serverTypes and other servers.txt options)
Line 1: Line 1:
OpenKore comes with a large list of server information. But some servers are not in the list, and sometimes the server information changes (for instance, when a server changes IP address or upgrades the server software). This guide teaches you several ways to figure out the (new) server information. Read this guide completely and carefully! If you encounter problems, finish reading this guide first before asking questions on the forum or IRC!
==Getting Server Information==
OpenKore comes with a list of official servers information only, because of the high amount of private servers, it is impossible to have and keep them updated, so private servers players should follow this guide to get and update their server information.  


But before you do that, read the list of [[unsupported servers]]. Your server may not be supported at all - in that case reading this guide would be a waste of time.
'''<span style="color:red">Before continuing, read the list of [[unsupported servers]]. Your server might have anti-bot protection resulting in not being supported by Openkore.</span>'''


OpenKore needs the following information about the Ragnarok Online server before it can login:
OpenKore needs the following information about the Ragnarok Online server before it can login:
* The server name
* The server's address (IP address or host name) and port number
* The server's master version number
* The server's server version number (not the same as the master version number)
* The server's character encoding
* The server's type version.


*The server name.
There are two ways to collect server information, which is using [http://wpepro.net '''WPE'''] or [http://www.wireshark.org '''Wireshark'''].  
*The server's address (IP address or host name) and port number.
*The server's master version number.
*The server's server version number. (not the same as the master version number)
*The server's character encoding.
*The server's type version.
 
 
==Getting Server Information==
There are two ways for getting them, which is using [http://wpepro.net WPE] or [http://www.wireshark.org Wireshark]. WPE is the easiest one, because most ragnarok players are familiarized with it already or at least know what it does and how it works. But some servers block it's use, so you better use Wireshark.


===WPE (Winsock Packet Editor)===
===WPE (Winsock Packet Editor)===
:'''1.''' Download and extract it. Download it [http://wpepro.net/download.html here].
'''1.''' [http://wpepro.net/download.html Download] WPE and extract it.  
::'''<span style="color:red">Before downloading, make a sure to disable your anti-virus as it can mark WPE as a virus and delete it. Also, download at your risk, we will not be resposabilized if your computer crashes.</span>'''


::'''''Note:''''' You will need some programs to extract it, the common ones are [http://www.rarlab.com/ WinRAR] and [http://www.7-zip.org/ 7zip].
:* Before downloading, make a sure to disable your anti-virus as it can mark WPE as a virus and delete it. '''Download at your risk''', we will not be resposabilized if your computer crashes.
:You will need some programs to extract it, the common ones are [http://www.rarlab.com/ WinRAR] and [http://www.7-zip.org/ 7zip].


:'''2.''' Open your ragnarok but '''''don't login yet!''''' Leave it on the login screen and open WPE.
'''2.''' Open your ragnarok but '''''don't login yet!''''' Leave it on the login screen and open WPE.


:'''3.''' At WPE's window, click on '''''Target Programs''''' button.
'''3.''' At WPE's window, click on '''''Target Programs''''' button.
::[[File:Targetyc.png]]
:[[File:Targetyc.png]]


'''4.''' A window will open, search for the server's executable and double-click it.
:[[File:clickrag.png]]


::A window will open, search for your server's executable and double-click it.
:'''Note.''' Some servers "hide" their executables by renaming it (like from xxxRO.exe to xxxx.dll or xxxxx.bin), so don't worry if the executable isn't a .exe one.
:::[[File:clickrag.png]]


::'''''Note.''''' Some servers "hide" their executables by renaming it (like from xxxRO.exe to binadds.dll), so don't worry if your executable isn't a .exe one.
'''5.''' In the WPE's window, click on '''Play button'''.
:[[File:play.png]]


'''6.''' Maximize your Ragnarok's window, put and try to login.
:'''Note.''' Valid login information are not needed.


:'''4.''' In the WPE's window, click on '''Play button'''.
'''7.''' Back to WPE's window, click on '''Stop button'''
::[[File:play.png]]
:[[File:stopjw.png]]


'''8.''' A window will open with some packets. The server's '''version and master_version, IP and port''' can be found there.
The packets will be different on each server, but most of the time it will start with '''64 00'''.
These are the packets that contains the version and master_version. Write them down because they are going to be used later.
:[[File:inforb.png]]


:'''5.''' Maximize your Ragnarok's window and login. You don't need to login to the map-server, just the login-server is enough.
:'''Legend''':
::'''''Note.''''' Valid login information are not needed.
#Version.
#IP
#Port
#Master version


'''9.''' See [[Connectivity Guide#Converting Hexadecimal to Decimal numbers|Converting Hexadecimal to Decimal numbers]] to convert the master_version and version before configuring Kore.


:'''6.''' Back to WPE's window, click on '''Stop button'''
===Wireshark===
::[[File:stopjw.png]]
'''1.''' [http://www.wireshark.org/download.html Download] and install Wireshark.


'''2.''' Open your ragnarok but '''''don't login yet!''''' Leave it on the login screen and open Wireshark.


::A window will open with some packets. Here we can find the server's '''version and master_version, IP and port'''.
'''3.''' At Wireshark's window, go to '''Capture > Options''' on the upper menu or press '''Ctrl + K'''.
::The packets will be different on each server, but most of the time it will start with '''64 00'''.
:[[File:Capiture.png]]
::These are the packets that contains the version and master_version. Write them down because they are going to be used later.
:::[[File:inforb.png]]


::'''Legend''':
'''4.''' In the "Interface" dropdown box, select an interface which will be used to capture on. If there isn't any specific interface to use, select the one whose IP address is equal to the your ip address or is not '''''unknown'''''. Alternatively you can try all of them and use the one that records the packets. Set the others settings like the images bellow:
:#Version.
:[[File:options.png]]
:#IP
:#Port
:#Master version


'''5.''' Click on '''Start button''' and go back to the Ragnarok window and login.
:'''Note.''' Valid information are not needed.


:'''7.''' Now, the '''version and master version''' need to be converted, because they are a hexadecimal number (base-16) and Kore expects a decimal number (base-10). Use [http://www.statman.info/conversions/hexadecimal.html this calculator]. With the numbers converted, you can now make openkore use it. See [[Connectivity Guide#Passing server information to OpenKore|Passing server information to OpenKore]].
'''6.''' Back to Wireshark and click on '''Stop button'''.
:[[File:stop.png]]


'''7.''' In Wireshark main window, you can see the TCP segments that were captured. Fill in the packet filter, but what to fill in depends on the username you used to login.
:Enter this in the "Filter" text box:
eth contains "xxxxxx" or eth contains xxxxxx


===Wireshark===
:Replace '''''xxxxxx''''' with the username that was used to login and press enter. In the example bellow, username was Mushroom.
:'''1.''' Download and install Wireshark. (Download link [http://www.wireshark.org/download.html here]).
:[[File:filter.png]]


:'''2.''' Open your ragnarok but '''''don't login yet!''''' Leave it on the login screen and open Wireshark.
'''8.''' There will be only one entry now, click on it to show some information about it. This is where the '''IP and port''' is stored.
:[[File:ip.png]]


:'''3.''' At Wireshark's window, go to '''Capture > Options''' on the upper menu or press '''Ctrl + K'''.
: Write down the IP and port.
::[[File:Capiture.png]]


'''9.''' On the entry again, right-click on it and go to '''Follow TCP Stream'''.
:[[File:tcp.png]]


:'''4.''' In the "Interface" dropdown box, select an interface which you want to capture on. If you're unsure which interface to use, select the one whose IP address is equal to your ip address or is not '''''unknown'''''. Alternatively you can try all of them and use the one that records the packets. Set the others settings like the images bellow:
'''10.''' A new window will open, in the bottom left, select '''Hex Dump'''.
::[[File:options.png]]
:[[File:hex.png]]


'''11.''' These are the login packets. Take a look at it and write down the packets that contains the '''version and master version''' numbers. They are marked on the image bellow.
:[[File:packets.png]]


:'''5.''' After configuring the options, click on '''Start button''' and go back to your ragnarok and login. Loginning to the map-server is not needed, the login-server is enough.
'''12.''' See [[Connectivity Guide#Converting Hexadecimal to Decimal numbers|Converting Hexadecimal to Decimal numbers]] to convert the master_version and version before configuring Kore.
::'''''Note.''''' Valid information are not needed.


:'''6.''' After loginning, go back to Wireshark and press the '''Stop button'''.
== Converting Hexadecimal to Decimal numbers ==
::[[File:stop.png]]
Master_version and server version collected from the login packets are in hexadecimal number (base-16) and Kore expects a decimal number (base-10), so converting those numbers are needed before Kore can read them.


Converting can be made using Windows' calculator or any other site that has a hex to dec calculator.


:'''7.''' In the Wireshark main window you can see the TCP segments that were captured. Fill in the packet filter, but what to fill in depends on the username you used to login.
'''1.''' Open Windows calculator '''Start > Accessories > Calculator'''.
::Enter this in the "Filter" text box:
:[[File:calc.PNG]]
  eth contains "xxxxxx" or eth contains xxxxxx


::Replace '''''xxxxxx''''' with your username that you used to login and press enter. In my example, my username was Mushroom.
'''2.''' Go to '''View''' on the upper menu and click on '''Scientific'''.
:::[[File:filter.png]]
:[[File:sci.PNG]]


'''3.''' Check the circle beside '''Hex'''.
:[[File:hexa.PNG]]


:'''8.''' You will now have only one entry, click on it and you will have some information about it. This is where you are going to get the server's IP and port.  
'''4.''' On the calculator, type the number that you got for master_version and version. In the example, master_version hexadecimal number is '''10'''.
::[[File:ip.png]]
:[[File:type.PNG]]


'''5.''' Check the circle beside '''Dec'''.
:[[File:dec.PNG]]


::: Write down your ip and port because you are going to need them later.
'''6.''' After checking, the number shown should automatically be converted from hexadecimal to decimal.
:[[File:done.PNG]]


: You must convert '''master_version''' and '''version'''.
:'''9.''' On the entry again, right-click on it and go to '''Follow TCP Stream'''.
::[[File:tcp.png]]


== Configuring Openkore ==
OpenKore reads server information from a file named '''servers.txt'''. The file is on ''tables'' folder.


:'''10.''' A new window will open, in the bottom left, select '''Hex Dump'''.
If your server is not listed in the file, then add a new entry. If your server is already listed, then modify the existing entry.  
::[[File:hex.png]]


=== Syntax ===
[<server name>]
ip <number/host>
port <number>
version <number>
master_version <number>
serverType <serverType name>
serverEncoding <enconding>
charBlockSize <number>
''' Following configs are optinal'''
addTableFolders <folder path>
chatLangCode <boolean flag>
gameGuard <flag>
private <boolean flag>
paddedPackets <boolean flag>
paddedPackets_attackID <packet switches>
paddedPackets_skillUseID <packet switches>
secureLogin <boolean flag>
secureLogin_type <type>
secureLogin_requestCode <hex string>
secureLogin_account <boolean flag>
storageEncryptKey <encrypt key>
recvpackets <file name>


:'''11.''' Now we got the login packets. Take a look at it and write down the packets that contains the '''version and master version''' numbers. They are marked on the image bellow.
; [<server name>]
::[[File:packets.png]]
: The name of the server that you want to bot. The name '''must be''' between '''[ ]'''.


; ip <number/host>
: Server's login IP.


:'''12.''' With the informations above, you have to convert them, because they're a hexadecimal number (base-16) and Kore expects a decimal number (base-10). You can use [http://www.statman.info/conversions/hexadecimal.html this calculator]. With the numbers converted, you can now make openkore use it. See the section bellow for how to use it.
; port <number>
: Server's login port number.


; version <number>
: Server's version (converted from hex to decimal).


==Passing server information to OpenKore==
; master_version <number>
OpenKore reads server information from a file named servers.txt. The file is on ''tables'' folder.
: Server's master_version (converted from hex to decimal).


If your server is not listed in the file, then add a new entry. If your server is already listed, then modify the existing entry. Here is the format:
; serverType
: Server's type. Each official server have its serverType, private servers must use '''kRO serverTypes''' according to executables dates.


[Server's Name] -> Your server's name. Must be between '[' and ']'
:: Known list of '''official''' server's serverType:
ip x.x.x.x -> Your server's IP.
::{| class="wikitable" border="1" cellspacing="1" cellpadding="2"
port xxxx -> Your server's port number.
!Server Name
master_version xx -> Your server's master_version. The one that you converted from hex to
!ServerType
  decimal.
|- align=center
version xx -> The server's version. The one that you converted from hex to decimal.
| Brazil Ragnarok Online Odin
serverType xxx -> Your serverType. For privates default one is 8_4. Officials one have
| bRO
  their own.
|- align=center
charBlockSize xx -> Set this if you are getting wrong char name and job name. Default is 106.
| Brazil Ragnarok Online Thor
serverEncoding xxxx -> Character encoding. More information read bellow.
| bRO_Thor
private 1 -> Only set this if the bot connects to the wrong map server IP.
|- align=center
  Used by private servers.
| Europe Ragnarok Online
recvpackets xxxxxx.txt -> Your recvpackets' name file. It this option is not set, it will use
| euRO
  the default one (recvpackets.txt). More informations read bellow.
|- align=center
| France Ragnarok Online
| fRO
|- align=center
| India Ragnarok Online
| inRO
|- align=center
| Indonesia Ragnarok Online
| idRO
|- align=center
| International Ragnarok Online
| iRO
|- align=center
| Korea Ragnarok Online
| kRO_RagexeRE_0
|- align=center
| Malaysia Ragnarok Online
| mRO
|- align=center
| Philippines Ragnarok Online
| pRO
|- align=center
|Russia Ragnarok Online
| rRO
|- align=center
| Taiwan Ragnarok Online
| twRO
|- align=center
| Thailand Ragnarok Online
| tRO
|- align=center
| Vietnam Ragnarok Online
| vRO
|}
<!-- TODO: add all 100 serverTypes, but how? o.O
:: Other serverTypes:
-->


; serverEncoding
: Characters encoding type. The character encoding cannot be automatically detected, but here's a list of possible character encodings that you can use:


And here is an example:
:{| class="wikitable" border="1" cellspacing="1"
[MushroomRO]
ip 127.0.0.1
port 6900
master_version 16
version 20
serverType 8_4
charBlockSize 108
serverEncoding Western
recvpackets mush-recvpackets.txt
 
After having modified servers.txt, restart OpenKore.
 
 
===Character encoding===
The character encoding cannot be automatically detected, but here's a list of possible character encodings that you can use:
 
{| class="wikitable" border="1" cellspacing="0"
|-style=background-color:#F9F9F9;
!Encoding
!Encoding
!Language used  
!Language used  
|-
|-
|align=center|Western  
|align=center|Western  
| English, or a language which uses a Roman-based alphabet. For example, German, French, Portuguese, etc., but also Indonesian.  
| Language which uses a Roman-based alphabet. Example: English, German, French, Portuguese, Indonesian, etc.  
|-
|-
|align=center|Simplified Chinese  
|align=center|Simplified Chinese  
Line 176: Line 245:
|}
|}


==Packet Length Extractor==
; charBlockSize <value>
Packet Length Extractor is a program which retreives the packet lengths from the RO client and stores them in recvpackets.txt.  
: Configures character name size. Currently known values are 106, 108 or 112 (renewal servers). Set this option if Openkore is having problems showing character name, job and level when selecting the character.
If you're having server problems, such as:
*Packet Tokenizer: Unknown switch: xxxx
*Getting disconnected after a few seconds
*NPCs, players and monsters are not recognized by Kore


Then generating a new recvpackets.txt might solve the problem. It's advisable to '''''always''''' extract the recvpackets for any server that you will play. The file must be on tables folder.
; addTablesFolder <path>
: Configures Kore to load tables file from the specified path.


'''''Note.''''' You may have problems extracting the recvpackets if your server's client has some kind of protection.
; chatLangCode <boolean flag>
: Removes language code on messages.


<!-- ; gameGuard <value>
: ??
-->
; private <boolean flag>
: Set this option if Openkore connects to a wrong map-server IP. Usually for private servers.


===About Recvpackets===
<!-- ; paddedPackets <boolean flag>
The network data that the server sends to Kore, is a byte stream. Kore must be able to recognize messages inside that byte stream to be able to do something with it. But the size of the messages can vary from to server to server. Recvpackets.txt contains information about the size of each message, so Kore can correctly split the byte stream into messages.
: ??


; paddedPackets_attackID <packet switches>
: ??
; paddedPackets_skillUseID <packet switches>
: ??


===Download===
; secureLogin <boolean flag>
There are two programs you can use to extract the recvpackets:
: ??
*JCV's RO Tools
*OpenKore Packet Length Extractor


It's better to use JCV's RO Tools as it is more up to date and have some fixes for newer clients. Also it's much easier to maintain, but it has undesirable and outdated options in addition to the packet extractor.
; secureLogin_type <type>
*[http://www.megaupload.com/?d=7PXQ9J1N JCV's RO Tools v1.0.3]
: ??
*[http://www.megaupload.com/?d=MLUVJLSL OpenKore Packet Length Extractor v1.1.0]
 
; secureLogin_code <hex string>
: ??
 
; secureLogin_account <boolean flag>
: ??
-->
; recvpackets <file name.txt>
: Configures file's name for recvpackets.
 
=== Example ===
[MushroomRO]
ip 127.0.0.1
port 6900
master_version 16
version 20
serverType 8_4
charBlockSize 108
serverEncoding Western
recvpackets mush-recvpackets.txt

Revision as of 02:09, 3 April 2010

Getting Server Information

OpenKore comes with a list of official servers information only, because of the high amount of private servers, it is impossible to have and keep them updated, so private servers players should follow this guide to get and update their server information.

Before continuing, read the list of unsupported servers. Your server might have anti-bot protection resulting in not being supported by Openkore.

OpenKore needs the following information about the Ragnarok Online server before it can login:

  • The server name
  • The server's address (IP address or host name) and port number
  • The server's master version number
  • The server's server version number (not the same as the master version number)
  • The server's character encoding
  • The server's type version.

There are two ways to collect server information, which is using WPE or Wireshark.

WPE (Winsock Packet Editor)

1. Download WPE and extract it.

  • Before downloading, make a sure to disable your anti-virus as it can mark WPE as a virus and delete it. Download at your risk, we will not be resposabilized if your computer crashes.
  • You will need some programs to extract it, the common ones are WinRAR and 7zip.

2. Open your ragnarok but don't login yet! Leave it on the login screen and open WPE.

3. At WPE's window, click on Target Programs button.

Targetyc.png

4. A window will open, search for the server's executable and double-click it.

File:clickrag.png
Note. Some servers "hide" their executables by renaming it (like from xxxRO.exe to xxxx.dll or xxxxx.bin), so don't worry if the executable isn't a .exe one.

5. In the WPE's window, click on Play button.

File:play.png

6. Maximize your Ragnarok's window, put and try to login.

Note. Valid login information are not needed.

7. Back to WPE's window, click on Stop button

File:stopjw.png

8. A window will open with some packets. The server's version and master_version, IP and port can be found there. The packets will be different on each server, but most of the time it will start with 64 00. These are the packets that contains the version and master_version. Write them down because they are going to be used later.

File:inforb.png
Legend:
  1. Version.
  2. IP
  3. Port
  4. Master version

9. See Converting Hexadecimal to Decimal numbers to convert the master_version and version before configuring Kore.

Wireshark

1. Download and install Wireshark.

2. Open your ragnarok but don't login yet! Leave it on the login screen and open Wireshark.

3. At Wireshark's window, go to Capture > Options on the upper menu or press Ctrl + K.

Capiture.png

4. In the "Interface" dropdown box, select an interface which will be used to capture on. If there isn't any specific interface to use, select the one whose IP address is equal to the your ip address or is not unknown. Alternatively you can try all of them and use the one that records the packets. Set the others settings like the images bellow:

File:options.png

5. Click on Start button and go back to the Ragnarok window and login.

Note. Valid information are not needed.

6. Back to Wireshark and click on Stop button.

File:stop.png

7. In Wireshark main window, you can see the TCP segments that were captured. Fill in the packet filter, but what to fill in depends on the username you used to login.

Enter this in the "Filter" text box:
eth contains "xxxxxx" or eth contains xxxxxx
Replace xxxxxx with the username that was used to login and press enter. In the example bellow, username was Mushroom.
File:filter.png

8. There will be only one entry now, click on it to show some information about it. This is where the IP and port is stored.

File:ip.png
Write down the IP and port.

9. On the entry again, right-click on it and go to Follow TCP Stream.

File:tcp.png

10. A new window will open, in the bottom left, select Hex Dump.

File:hex.png

11. These are the login packets. Take a look at it and write down the packets that contains the version and master version numbers. They are marked on the image bellow.

File:packets.png

12. See Converting Hexadecimal to Decimal numbers to convert the master_version and version before configuring Kore.

Converting Hexadecimal to Decimal numbers

Master_version and server version collected from the login packets are in hexadecimal number (base-16) and Kore expects a decimal number (base-10), so converting those numbers are needed before Kore can read them.

Converting can be made using Windows' calculator or any other site that has a hex to dec calculator.

1. Open Windows calculator Start > Accessories > Calculator.

File:calc.PNG

2. Go to View on the upper menu and click on Scientific.

File:sci.PNG

3. Check the circle beside Hex.

File:hexa.PNG

4. On the calculator, type the number that you got for master_version and version. In the example, master_version hexadecimal number is 10.

File:type.PNG

5. Check the circle beside Dec.

File:dec.PNG

6. After checking, the number shown should automatically be converted from hexadecimal to decimal.

File:done.PNG
You must convert master_version and version.

Configuring Openkore

OpenKore reads server information from a file named servers.txt. The file is on tables folder.

If your server is not listed in the file, then add a new entry. If your server is already listed, then modify the existing entry.

Syntax

[<server name>]
ip <number/host>
port <number>
version <number>
master_version <number> 
serverType <serverType name>
serverEncoding <enconding>
charBlockSize <number>

 Following configs are optinal
addTableFolders <folder path>
chatLangCode <boolean flag>
gameGuard <flag>
private <boolean flag> 
paddedPackets <boolean flag>
paddedPackets_attackID <packet switches>
paddedPackets_skillUseID <packet switches>
secureLogin <boolean flag>
secureLogin_type <type>
secureLogin_requestCode <hex string>
secureLogin_account <boolean flag>
storageEncryptKey <encrypt key>
recvpackets <file name>
[<server name>]
The name of the server that you want to bot. The name must be between [ ].
ip <number/host>
Server's login IP.
port <number>
Server's login port number.
version <number>
Server's version (converted from hex to decimal).
master_version <number>
Server's master_version (converted from hex to decimal).
serverType
Server's type. Each official server have its serverType, private servers must use kRO serverTypes according to executables dates.
Known list of official server's serverType:
Server Name ServerType
Brazil Ragnarok Online Odin bRO
Brazil Ragnarok Online Thor bRO_Thor
Europe Ragnarok Online euRO
France Ragnarok Online fRO
India Ragnarok Online inRO
Indonesia Ragnarok Online idRO
International Ragnarok Online iRO
Korea Ragnarok Online kRO_RagexeRE_0
Malaysia Ragnarok Online mRO
Philippines Ragnarok Online pRO
Russia Ragnarok Online rRO
Taiwan Ragnarok Online twRO
Thailand Ragnarok Online tRO
Vietnam Ragnarok Online vRO
serverEncoding
Characters encoding type. The character encoding cannot be automatically detected, but here's a list of possible character encodings that you can use:
Encoding Language used
Western Language which uses a Roman-based alphabet. Example: English, German, French, Portuguese, Indonesian, etc.
Simplified Chinese Simplified Chinese.
Traditional Chinese Traditional Chinese.
Korean Korean
Russian Russian, or a Cyrillic-based language.
Japanese Japanese
Thai Thai
charBlockSize <value>
Configures character name size. Currently known values are 106, 108 or 112 (renewal servers). Set this option if Openkore is having problems showing character name, job and level when selecting the character.
addTablesFolder <path>
Configures Kore to load tables file from the specified path.
chatLangCode <boolean flag>
Removes language code on messages.
private <boolean flag>
Set this option if Openkore connects to a wrong map-server IP. Usually for private servers.
recvpackets <file name.txt>
Configures file's name for recvpackets.

Example

[MushroomRO]
ip 127.0.0.1
port 6900
master_version 16
version 20
serverType 8_4
charBlockSize 108
serverEncoding Western
recvpackets mush-recvpackets.txt