Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Proper way to edit IP for Media.pk2

Joined
Apr 13, 2005
Messages
341
Reaction score
41
You will need some tools for this

1) One of this Hex editors
  • a) Hex Workshop
    - Trial Version
  • b) XVI32
    - Freeware
2) Any pk2 Extractor & Editor
3) Decimal to Hex convertor

You can do it in 2 ways:

- First method
a) Extract divisioninfo.txt from Media.pk2
b) Open this file with Hex editor
c) Find this value, this is why your regular edit do not work.
That value is IP character length 0B = 11, this mean character should have 11 characters, this include DOTs 111.222.3.1
If you have shorter or longer IP just edit that value. If you can't convert Decimals to Hex use link number 3.
seryi - Proper way to edit IP for Media.pk2 - RaGEZONE Forums
d) If you have Long IP and no space to enter numbers just hit INSERT on your keyboard or from menu Edit -> Insert (number of bytes = number of characters you need)
seryi - Proper way to edit IP for Media.pk2 - RaGEZONE Forums
e) Last thing, I don't know if it is required but be sure you have a empty byte at end of your file Hex value is > 00
Check 2nd spoiler for example.

- Second method
Open directly Media.pk2 with any Hex editor
Find where IP is and look for this byte, that value is IP character length 0B = 11, this mean character should have 11 characters, this include DOTs 111.222.3.1
seryi - Proper way to edit IP for Media.pk2 - RaGEZONE Forums


P.S. I will recommend you first method, less chances that you will break Media.pk2 file.
P.P.S. sry for my "french" :tongue:
 
Newbie Spellweaver
Joined
Sep 3, 2011
Messages
54
Reaction score
2
Re: [Guide] Proper way to edit IP for Media.pk2

Sorry for this question.. after follow this guide can use silkroad.exe for start sro?
 
Newbie Spellweaver
Joined
Oct 9, 2011
Messages
27
Reaction score
0
Re: [Guide] Proper way to edit IP for Media.pk2

tks a lot dude :)
 
Initiate Mage
Joined
May 27, 2009
Messages
2
Reaction score
0
Re: [Guide] Proper way to edit IP for Media.pk2

Thanks brother..
 
Newbie Spellweaver
Joined
Jun 16, 2011
Messages
44
Reaction score
8
Re: [Guide] Proper way to edit IP for Media.pk2

also there is a tool made by lolkop
divisioninfo editor.
sry mates i cant find links for it and upload it too.. ill upload it soon as i can, so u can easily edit IPs without a problems

Oh btw.i can share source code, so use AutoIt3 and compile it.
+ I'll recomend you guys to use free domian name from no-ip,dyndns, etc. so ur players will got less problems connecting ur server. (also if there some fail u can use "hosts" to redirect domian to right IP)

Dim $file, $divisions[0xFF][0xFF]

$gui = GUICreate('Divisioninfo Editor', 400, 220)
$divisionList = GUICtrlCreateList('', 10, 10, 180, 150)
$serverList = GUICtrlCreateList('', 200, 10, 190, 150)
$addDivision = GUICtrlCreateButton('Add Division', 10, 160, 90, 20)
$delDivision = GUICtrlCreateButton('Del Division', 100, 160, 90, 20)
$addServer = GUICtrlCreateButton('Add Server', 200, 160, 95, 20)
$delServer = GUICtrlCreateButton('Del Server', 295, 160, 95, 20)
$open = GUICtrlCreateButton('Open Divisioninfo', 10, 185, 180, 25)
$save = GUICtrlCreateButton('Save Divisioninfo', 200, 185, 190, 25)
GUISetState()

While 1
Switch GUIGetMsg()
Case -3
Exit
Case $open
$file = FileSaveDialog('Divisioninfo.txt', Default, 'Divisioninfo (DIVISIONINFO.TXT)', 1, 'DIVISIONINFO.TXT', $gui)
If $file<>'' Then
$fileHwnd = FileOpen($file, 16)
$locale = FileRead($fileHwnd, 1)
$numberOfDivisions = Int(FileRead($fileHwnd, 1))
For $division=1 To $numberOfDivisions
$lengthOfDivisionName = Int(FileRead($fileHwnd, 4))
$divisionName = BinaryToString(FileRead($fileHwnd, $lengthOfDivisionName))
GUICtrlSetData($divisionList, $divisionName)
$divisions[$division][0] = $divisionName
FileRead($fileHwnd, 1)
$numberOfServers = Int(FileRead($fileHwnd, 1))
For $server=1 To $numberOfServers
$lengthOfServerAdress = Int(FileRead($fileHwnd, 4))
$serverAdress = BinaryToString(FileRead($fileHwnd, $lengthOfServerAdress))
$divisions[$division][$server] = $serverAdress
FileRead($fileHwnd, 1)
Next
Next
FileClose($fileHwnd)
EndIf
Case $divisionList
GUICtrlSetData($serverList, '')
$div = 0
For $div=1 To 0xFE
If $divisions[$div][0] = GUICtrlRead($divisionList) Then ExitLoop
Next
If $div <> 0 Then
For $serv=1 To 0xFE
If $divisions[$div][$serv] <> '' Then GUICtrlSetData($serverList, $divisions[$div][$serv])
Next
EndIf
Case $addServer
If $file='' Then
MsgBox(0, 'Error', 'Open the Divisioninfo first!')
ElseIf GUICtrlRead($divisionList) = '' Then
MsgBox(0, 'Error', 'Select a Division First')
Else
$newAdress = InputBox('Server', 'Enter the Serveradress here', '')
If $newAdress<>'' Then
For $div=1 To 0xFF
If $div = 0xFF Then ExitLoop
If $divisions[$div][0] = GUICtrlRead($divisionList) Then ExitLoop
Next
If $div <> 0xFF Then
For $serv=1 To 0xFF
If $serv = 0xFF Then ExitLoop
If $divisions[$div][$serv] = '' Then ExitLoop
Next
EndIf
If $serv <> 0xFF Then
$divisions[$div][$serv] = $newAdress
GUICtrlSetData($serverList, $newAdress)
EndIf
EndIf
EndIf
Case $addDivision
If $file='' Then
MsgBox(0, 'Error', 'Open the Divisioninfo first!')
Else
$newDivision = InputBox('Division', 'Enter the Divisionname here', '')
If $newDivision<>'' Then
For $div=1 To 0xFE
If $divisions[$div][0] = '' Then
$divisions[$div][0] = $newDivision
GUICtrlSetData($divisionList, $newDivision)
GUICtrlSetData($serverList, '')
ExitLoop
EndIf
Next
EndIf
EndIf
Case $delDivision
If $file='' Then
MsgBox(0, 'Error', 'Open the Divisioninfo first!')
ElseIf GUICtrlRead($divisionList) = '' Then
MsgBox(0, 'Error', 'Select a Division First')
Else
For $div=1 To 0xFE
If $divisions[$div][0] = GUICtrlRead($divisionList) Then
For $i=0 To 0xFE
$divisions[$div][$i] = ''
Next
EndIf
Next
EndIf
GUICtrlSetData($divisionList, '')
GUICtrlSetData($serverList, '')
For $i=1 To 0xFE
If $divisions[$i][0] <> '' Then GUICtrlSetData($divisionList, $divisions[$i][0])
Next
Case $delServer
If $file='' Then
MsgBox(0, 'Error', 'Open the Divisioninfo first!')
ElseIf GUICtrlRead($divisionList) = '' Then
MsgBox(0, 'Error', 'Select a Division First')
ElseIf GUICtrlRead($serverList) = '' Then
MsgBox(0, 'Error', 'Select a Server Fist!')
Else
For $div=1 To 0xFF
If $div = 0xFF Then ExitLoop
If $divisions[$div][0] = GUICtrlRead($divisionList) Then ExitLoop
Next
If $div <> 0xFF Then
For $serv=1 To 0xFF
If $serv = 0xFF Then ExitLoop
If $divisions[$div][$serv] = GUICtrlRead($serverList) Then
$divisions[$div][$serv] = ''
EndIf
Next
EndIf
EndIf
GUICtrlSetData($serverList, '')
For $i=1 To 0xFE
If $divisions[$div][$i] <> '' Then GUICtrlSetData($serverList, $divisions[$div][$i])
Next
Case $save
If $file='' Then
MsgBox(0, 'Error', 'Open the Divisioninfo first!')
Else
FileMove($file, StringTrimRight($file, 16)&'BACKUP_DIVISIONINFO.TXT',8)
$newFile = FileOpen($file, 18)
FileWrite($newFile, $locale)
$divNr = 0
For $i=1 To 0xFE
If $divisions[$i][0]<>'' Then $divNr+=1
Next
FileWrite($newFile, BinaryMid(Binary($divNr), 1, 1))
For $i=1 To 0xFE
If $divisions[$i][0]<>'' Then
FileWrite($newFile, Binary(StringLen($divisions[$i][0])))
FileWrite($newFile, StringToBinary($divisions[$i][0]))
FileWrite($newFile, BinaryMid(Binary(0), 1, 1))
$servNr = 0
For $h=1 To 0xFE
If $divisions[$i][$h]<>'' Then $servNr+=1
Next
FileWrite($newFile, BinaryMid(Binary($servNr), 1, 1))
For $h=1 To 0xFE
If $divisions[$i][$h]<>'' Then
FileWrite($newFile, Binary(StringLen($divisions[$i][$h])))
FileWrite($newFile, StringToBinary($divisions[$i][$h]))
FileWrite($newFile, BinaryMid(Binary(0), 1, 1))
EndIf
Next
EndIf
Next
FileClose($newFile)
MsgBox(0,'Info', 'The Divisioninfo has been saved!')
EndIf
EndSwitch
WEnd

Update: (no scan or what ever, dont trust dont use!)
 
Last edited:
Newbie Spellweaver
Joined
Oct 9, 2011
Messages
27
Reaction score
0
Re: [Guide] Proper way to edit IP for Media.pk2

I got a prob now, he compiles good. everything ok. But now i think i got a prob whit ports to use. in the launcher i rederict to port 15779 and 15880
May i need to change someething ?

HELP MyADAY.
 
Last edited:
Initiate Mage
Joined
May 27, 2009
Messages
2
Reaction score
0
Re: [Guide] Proper way to edit IP for Media.pk2

also there is a tool made by lolkop
divisioninfo editor.
sry mates i cant find links for it and upload it too.. ill upload it soon as i can, so u can easily edit IPs without a problems

Oh btw.i can share source code, so use AutoIt3 and compile it.

Thanks.. Thanks.. Thanks.. Very very thanks.. Other methods is not working but only your sharing working and my launcher working now.. Thanks and thanks..
 
Newbie Spellweaver
Joined
Oct 9, 2011
Messages
27
Reaction score
0
Re: [Guide] Proper way to edit IP for Media.pk2

after done your way i get this m8
 
AssassinS Silkroad
Joined
Sep 30, 2011
Messages
424
Reaction score
92
Re: [Guide] Proper way to edit IP for Media.pk2

Hello Bro after Edit txt with Hex how i can import it to media manual
i try import file but say i must import manual
please what i must do to import manual

Brother can any one Edit This to me

i will be very thankful

My IP : 5.196.231.201

i try to do it but when i try launch get
seryi - Proper way to edit IP for Media.pk2 - RaGEZONE Forums


so what's wrong or any one can make it to me please
 
Newbie Spellweaver
Joined
Jun 16, 2011
Messages
44
Reaction score
8
Re: [Guide] Proper way to edit IP for Media.pk2

 
AssassinS Silkroad
Joined
Sep 30, 2011
Messages
424
Reaction score
92
Re: [Guide] Proper way to edit IP for Media.pk2


first thanks to help
i import this but when try login server say server is under ...... " ispection "
so whats wrong
 
Newbie Spellweaver
Joined
Jun 16, 2011
Messages
44
Reaction score
8
Re: [Guide] Proper way to edit IP for Media.pk2

first thanks to help
i import this but when try login server say server is under ...... " ispection "
so whats wrong
that means that server is not "listening" for connection on this IP,port or its may be blocked by firewall etc.

btw here is the tool to check it. write ur ip and launch tool

 
Skilled Illusionist
Joined
Dec 3, 2011
Messages
318
Reaction score
23
Re: [Guide] Proper way to edit IP for Media.pk2

Hello Bro after Edit txt with Hex how i can import it to media manual
i try import file but say i must import manual
please what i must do to import manual

Brother can any one Edit This to me

i will be very thankful

My IP : 5.196.231.201

i try to do it but when i try launch get
seryi - Proper way to edit IP for Media.pk2 - RaGEZONE Forums


so what's wrong or any one can make it to me please


I have this error also and the game won't start. :mad: Any idea what it means?
 
Skilled Illusionist
Joined
Dec 3, 2011
Messages
318
Reaction score
23
Re: [Guide] Proper way to edit IP for Media.pk2

I have this error also and the game won't start. :mad: Any idea what it means?


Fixed this error. You can't run the launcher on the machine hosting the server. It will work on other computers. But I still do get 2 similar pop up errors with an ok button, then sro splash screen loads. Any idea how to fix those annoying errors? :?:
 
Joined
Apr 13, 2005
Messages
341
Reaction score
41
Re: [Guide] Proper way to edit IP for Media.pk2

Fixed this error. You can't run the launcher on the machine hosting the server. It will work on other computers. But I still do get 2 similar pop up errors with an ok button, then sro splash screen loads. Any idea how to fix those annoying errors? :?:

Hey, check this thread, it have a tool that will change your IP easy and fast. You can also add more Divisions.

http://forum.ragezone.com/f722/guide-finally-change-ip-media-789011/
 
Joined
Apr 13, 2005
Messages
341
Reaction score
41
Re: [Guide] Proper way to edit IP for Media.pk2

Maybe there is something wrong with your client at all, try to download/extract a fresh/clean client and try to edit it again.
 
Junior Spellweaver
Joined
Mar 14, 2007
Messages
135
Reaction score
22
Re: [Guide] Proper way to edit IP for Media.pk2

You will need some tools for this

1) One of this Hex editors
  • a) Hex Workshop
    - Trial Version

  • b) XVI32
    - Freeware
2) Any pk2 Extractor & Editor
3) Decimal to Hex convertor

You can do it in 2 ways:

- First method
a) Extract divisioninfo.txt from Media.pk2
b) Open this file with Hex editor
c) Find this value, this is why your regular edit do not work.
That value is IP character length 0B = 11, this mean character should have 11 characters, this include DOTs 111.222.3.1
If you have shorter or longer IP just edit that value. If you can't convert Decimals to Hex use link number 3.
seryi - Proper way to edit IP for Media.pk2 - RaGEZONE Forums
d) If you have Long IP and no space to enter numbers just hit INSERT on your keyboard or from menu Edit -> Insert (number of bytes = number of characters you need)
seryi - Proper way to edit IP for Media.pk2 - RaGEZONE Forums
e) Last thing, I don't know if it is required but be sure you have a empty byte at end of your file Hex value is > 00
Check 2nd spoiler for example.

- Second method
Open directly Media.pk2 with any Hex editor
Find where IP is and look for this byte, that value is IP character length 0B = 11, this mean character should have 11 characters, this include DOTs 111.222.3.1
seryi - Proper way to edit IP for Media.pk2 - RaGEZONE Forums


P.S. I will recommend you first method, less chances that you will break Media.pk2 file.
P.P.S. sry for my "french" :tongue:

@seryi
Can you put in the IP 5.106.28.3 media.pk2 not know me please
 
Last edited:
Back
Top