Autoselect Range.

01/06/2010 03:43 dukado#1
Hello All Elitepvpers!
I have a problem. I need know, what exactly the Loader (from lolkop) does.
See, I updated the Autoselect to Media, all ok, but I'm having problems with the Range.
I need know, how change the range, without the Loader!
Thanks,
Menna
:bandit:
01/06/2010 04:35 Epic_Rage#2
You could use autoit to do something along the lines of this:

Code:
$kernel32 = DllOpen('kernel32.dll')
$pid = Run(@ScriptDir & '\sro_client.exe ' & '0 /4 0 0'); change the '0' after '/4' to change the division, eg: 1=Division 2
$mid = memopen($pid)
		;ECSRO
		If memread($mid, 0x9F6A70, 'byte[4]') = '0x00008C42' Then memwrite($mid, 0x9F6A70, ReverseHex(FloatToHex(5000)))
		;SJSRO
		If memread($mid, 0x9F48C0, 'byte[4]') = '0x00008C42' Then memwrite($mid, 0x9F48C0, ReverseHex(FloatToHex(5000)))
		;MYSRO/SJSRO
		If memread($mid, 0x655934, 'byte[4]') = '0x00008C42' Then memwrite($mid, 0x655934, ReverseHex(FloatToHex(5000)))
EndIf
memclose($mid)
DllClose($kernel32)
Func memopen($pid)
	Local $mid = DllCall($kernel32, 'int', 'OpenProcess', 'int', 0x1F0FFF, 'int', 1, 'int', $pid)
	Return $mid[0]
EndFunc   ;==>memopen
Func memread($mid, $adress, $type = 'dword')
	Local $struct = DllStructCreate($type)
	DllCall($kernel32, 'int', 'ReadProcessMemory', 'int', $mid, 'int', $adress, 'ptr', DllStructGetPtr($struct), 'int', DllStructGetSize($struct), 'int', '')
	Return DllStructGetData($struct, 1)
EndFunc   ;==>memread
Func memwrite($mid, $adress, $hex)
	Local $struct = DllStructCreate('byte[' & BinaryLen('0x' & $hex) & ']')
	For $i = DllStructGetSize($struct) To 1 Step - 1
		DllStructSetData($struct, 1, BinaryMid('0x' & $hex, $i, 1), $i)
	Next
	Local $x = DllCall($kernel32, 'int', 'VirtualProtectEx', 'int', $mid, 'ptr', $adress, 'int', DllStructGetSize($struct), 'dword', 0x40, 'dword*', 0)
	DllCall($kernel32, 'int', 'WriteProcessMemory', 'int', $mid, 'int', $adress, 'ptr', DllStructGetPtr($struct), 'int', DllStructGetSize($struct), 'int', 0)
	DllCall($kernel32, 'int', 'VirtualProtectEx', 'int', $mid, 'ptr', $adress, 'int', DllStructGetSize($struct), 'dword', $x[5], 'dword*', 0)
EndFunc   ;==>memwrite
Func memclose($mid)
	DllCall($kernel32, 'int', 'CloseHandle', 'int', $mid)
EndFunc   ;==>memclose
Func FloatToHex($float)
	Local $a = DllCall($kernel32, 'int', 'MulDiv', 'Float', $float, 'int', 1, 'int', 1)
	Return Hex($a[0])
EndFunc   ;==>FloatToHex
Func ReverseHex($hex)
	Local $x
	For $i = StringLen($hex) + 1 To 1 Step - 2
		$x &= StringMid($hex, $i, 2)
	Next
	Return $x
EndFunc   ;==>ReverseHex
That should do it (btw, yes this is code from lolkop's loader, but seeing as he posts the source to all his apps, i dont see any harm in shortening it to your needs)

Hope this helped, just post if you need more help :o
01/06/2010 08:22 dukado#3
Wow!!
Thanks for help, but man, I ain't no programmer!!!
So, thanks for search, and post for us..
Autoit? I gonna GOOGLE THIS, and see what I can do with this code :D
What I need, Really, is a simple program, that can do it automaticaly for me.
Isn't so hard do this, is?
hehehe
Thanks,
Menna
01/06/2010 08:51 Epic_Rage#4
Quote:
Originally Posted by dukado View Post
Wow!!
Thanks for help, but man, I ain't no programmer!!!
So, thanks for search, and post for us..
Autoit? I gonna GOOGLE THIS, and see what I can do with this code :D
What I need, Really, is a simple program, that can do it automaticaly for me.
Isn't so hard do this, is?
hehehe
Thanks,
Menna
If you download autoit and put that code i posted above into a script and compile it(very easy), and run it in the folder than ecsro or w/e server, is installed at, it should work :)
01/06/2010 09:10 dukado#5
Man..
Doens't worked for me..
I do what you said, and appears a error like:
Line 7 (File **):
Error: "EndIf" statement with no matching "If" statement.

:S
01/06/2010 09:17 Epic_Rage#6
My bad

Code:
$kernel32 = DllOpen('kernel32.dll')
$pid = Run(@ScriptDir & '\sro_client.exe ' & '0 /4 0 0'); change the '0' after '/4' to change the division, eg: 1=Division 2
$mid = memopen($pid)
		If memread($mid, 0x9F6A70, 'byte[4]') = '0x00008C42' Then memwrite($mid, 0x9F6A70, ReverseHex(FloatToHex(5000)))
		If memread($mid, 0x9F48C0, 'byte[4]') = '0x00008C42' Then memwrite($mid, 0x9F48C0, ReverseHex(FloatToHex(5000)))
		If memread($mid, 0x655934, 'byte[4]') = '0x00008C42' Then memwrite($mid, 0x655934, ReverseHex(FloatToHex(5000)))
memclose($mid)
DllClose($kernel32)
Func memopen($pid)
	Local $mid = DllCall($kernel32, 'int', 'OpenProcess', 'int', 0x1F0FFF, 'int', 1, 'int', $pid)
	Return $mid[0]
EndFunc   ;==>memopen
Func memread($mid, $adress, $type = 'dword')
	Local $struct = DllStructCreate($type)
	DllCall($kernel32, 'int', 'ReadProcessMemory', 'int', $mid, 'int', $adress, 'ptr', DllStructGetPtr($struct), 'int', DllStructGetSize($struct), 'int', '')
	Return DllStructGetData($struct, 1)
EndFunc   ;==>memread
Func memwrite($mid, $adress, $hex)
	Local $struct = DllStructCreate('byte[' & BinaryLen('0x' & $hex) & ']')
	For $i = DllStructGetSize($struct) To 1 Step - 1
		DllStructSetData($struct, 1, BinaryMid('0x' & $hex, $i, 1), $i)
	Next
	Local $x = DllCall($kernel32, 'int', 'VirtualProtectEx', 'int', $mid, 'ptr', $adress, 'int', DllStructGetSize($struct), 'dword', 0x40, 'dword*', 0)
	DllCall($kernel32, 'int', 'WriteProcessMemory', 'int', $mid, 'int', $adress, 'ptr', DllStructGetPtr($struct), 'int', DllStructGetSize($struct), 'int', 0)
	DllCall($kernel32, 'int', 'VirtualProtectEx', 'int', $mid, 'ptr', $adress, 'int', DllStructGetSize($struct), 'dword', $x[5], 'dword*', 0)
EndFunc   ;==>memwrite
Func memclose($mid)
	DllCall($kernel32, 'int', 'CloseHandle', 'int', $mid)
EndFunc   ;==>memclose
Func FloatToHex($float)
	Local $a = DllCall($kernel32, 'int', 'MulDiv', 'Float', $float, 'int', 1, 'int', 1)
	Return Hex($a[0])
EndFunc   ;==>FloatToHex
Func ReverseHex($hex)
	Local $x
	For $i = StringLen($hex) + 1 To 1 Step - 2
		$x &= StringMid($hex, $i, 2)
	Next
	Return $x
EndFunc   ;==>ReverseHex
Should work :P
01/06/2010 11:59 Nieles#7
after the update it wont work at all. it says fdor me this version of the game is not supported contact blablalba
01/06/2010 12:07 Epic_Rage#8
Quote:
Originally Posted by Nieles View Post
after the update it wont work at all. it says fdor me this version of the game is not supported contact blablalba
Update? Sorry, no idea what server your talking about
01/06/2010 12:12 Lubco#9
Quote:
Originally Posted by Epic_Rage View Post
My bad

Code:
$kernel32 = DllOpen('kernel32.dll')
$pid = Run(@ScriptDir & '\sro_client.exe ' & '0 /4 0 0'); change the '0' after '/4' to change the division, eg: 1=Division 2
$mid = memopen($pid)
		If memread($mid, 0x9F6A70, 'byte[4]') = '0x00008C42' Then memwrite($mid, 0x9F6A70, ReverseHex(FloatToHex(5000)))
		If memread($mid, 0x9F48C0, 'byte[4]') = '0x00008C42' Then memwrite($mid, 0x9F48C0, ReverseHex(FloatToHex(5000)))
		If memread($mid, 0x655934, 'byte[4]') = '0x00008C42' Then memwrite($mid, 0x655934, ReverseHex(FloatToHex(5000)))
memclose($mid)
DllClose($kernel32)
Func memopen($pid)
	Local $mid = DllCall($kernel32, 'int', 'OpenProcess', 'int', 0x1F0FFF, 'int', 1, 'int', $pid)
	Return $mid[0]
EndFunc   ;==>memopen
Func memread($mid, $adress, $type = 'dword')
	Local $struct = DllStructCreate($type)
	DllCall($kernel32, 'int', 'ReadProcessMemory', 'int', $mid, 'int', $adress, 'ptr', DllStructGetPtr($struct), 'int', DllStructGetSize($struct), 'int', '')
	Return DllStructGetData($struct, 1)
EndFunc   ;==>memread
Func memwrite($mid, $adress, $hex)
	Local $struct = DllStructCreate('byte[' & BinaryLen('0x' & $hex) & ']')
	For $i = DllStructGetSize($struct) To 1 Step - 1
		DllStructSetData($struct, 1, BinaryMid('0x' & $hex, $i, 1), $i)
	Next
	Local $x = DllCall($kernel32, 'int', 'VirtualProtectEx', 'int', $mid, 'ptr', $adress, 'int', DllStructGetSize($struct), 'dword', 0x40, 'dword*', 0)
	DllCall($kernel32, 'int', 'WriteProcessMemory', 'int', $mid, 'int', $adress, 'ptr', DllStructGetPtr($struct), 'int', DllStructGetSize($struct), 'int', 0)
	DllCall($kernel32, 'int', 'VirtualProtectEx', 'int', $mid, 'ptr', $adress, 'int', DllStructGetSize($struct), 'dword', $x[5], 'dword*', 0)
EndFunc   ;==>memwrite
Func memclose($mid)
	DllCall($kernel32, 'int', 'CloseHandle', 'int', $mid)
EndFunc   ;==>memclose
Func FloatToHex($float)
	Local $a = DllCall($kernel32, 'int', 'MulDiv', 'Float', $float, 'int', 1, 'int', 1)
	Return Hex($a[0])
EndFunc   ;==>FloatToHex
Func ReverseHex($hex)
	Local $x
	For $i = StringLen($hex) + 1 To 1 Step - 2
		$x &= StringMid($hex, $i, 2)
	Next
	Return $x
EndFunc   ;==>ReverseHex
Should work :P
It write me Please Execute the "Silkroad.exe" Pls help :P
01/06/2010 12:21 Epic_Rage#10
Quote:
Originally Posted by Lubco View Post
It write me Please Execute the "Silkroad.exe" Pls help :P
What server are you trying to run this on?
01/06/2010 12:38 Lubco#11
Quote:
Originally Posted by Epic_Rage View Post
What server are you trying to run this on?
Fembria
01/06/2010 13:05 Epic_Rage#12
Quote:
Originally Posted by Lubco View Post
Fembria
Ah, since there is a new patch with a new sro_client.exe, i need the new opcodes or else it wont work :p

Guess i gotta wait for lolkop to log on and beg him to tell me how to find the opcodes for multiclient/nodc/autoselect/etc >.<
01/06/2010 13:09 Lubco#13
Quote:
Originally Posted by Epic_Rage View Post
Ah, since there is a new patch with a new sro_client.exe, i need the new opcodes or else it wont work :p

Guess i gotta wait for lolkop to log on and beg him to tell me how to find the opcodes for multiclient/nodc/autoselect/etc >.<
:D i got something like lolkop loader, and it fully working... :P it is same loader and bot and autopot :D:D THX for your time :P
11/12/2010 13:31 kingdom02#14
this work for zszc?
02/26/2012 03:29 yuoh18#15
hellow guys can you edit this for the new silkroad-r v1.017 this is the link of the sro_client updated..

[Only registered and activated users can see links. Click Here To Register...]