Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Coding Corner
You last visited: Today at 14:29

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Range modify ESRO code chaning?

Discussion on Range modify ESRO code chaning? within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
smedheaddk's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 525
Received Thanks: 362
Range modify ESRO code chaning?

having toruble with creating a dll... the guy posted the source which is below for his dll that goes with his loader:

esroLoaderdll.cpp:
Code:
#include "windows.h"

void WriteMemory(DWORD address, LPVOID patch, DWORD size)
{
	DWORD oldProtect;
	VirtualProtect((LPVOID)address, 4, PAGE_EXECUTE_READWRITE, &oldProtect);
	memcpy((LPVOID)address, patch, size);
}

DWORD WINAPI PatchRangeThread(LPVOID lpParam) //need to wait for sro window or we get protection error
{
	while(1)
	{
		HWND hWnd = FindWindowA("CLIENT", 0);
		DWORD pid = 0;
		GetWindowThreadProcessId(hWnd, &pid);
		if(pid == GetCurrentProcessId())
			break;

		Sleep(10);
	}

	float range = 5000;
	WriteMemory(0xD10678, &range, sizeof(float));

	return 0;
}

BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
	if(ul_reason_for_call == DLL_PROCESS_ATTACH)
	{
		CreateMutexA(0, 0, "Silkroad Online Launcher");
		CreateMutexA(0, 0, "Ready");

		CreateThread(0, 0, &PatchRangeThread, 0, 0, 0);
	}
	return true;
}
i put this in c++ and when i tried to compile it i got the foloowing error:

Code:
1>------ Build started: Project: test, Configuration: Release Win32 ------
1>  test.cpp
1>test.cpp(40): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "StdAfx.h"' to your source?
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Im a nooby to all this i just copy and pasted the code in c++, and starterd a new win 32 console appliaction and selcted dll, than pasted this. press build and results above :P

can anyone tell me where im going wrong?

heres a link to the origonal thread, my purpose is to simply change the line:



Code:
	float range = 5000;
too

Code:
	float range = 2000;
smedheaddk is offline  
Old 06/13/2011, 19:08   #2
 
* White *'s Avatar
 
elite*gold: 0
Join Date: Oct 2010
Posts: 717
Received Thanks: 330
Code:
#include "windows.h"
[U][COLOR="Red"]#include "StdAfx.h"[/COLOR][/U]  [COLOR="#ff0000"]// Try to add this( i dont know too about this but just try :D )[/COLOR]

void WriteMemory(DWORD address, LPVOID patch, DWORD size)
{
	DWORD oldProtect;
	VirtualProtect((LPVOID)address, 4, PAGE_EXECUTE_READWRITE, &oldProtect);
	memcpy((LPVOID)address, patch, size);
}

DWORD WINAPI PatchRangeThread(LPVOID lpParam) //need to wait for sro window or we get protection error
{
	while(1)
	{
		HWND hWnd = FindWindowA("CLIENT", 0);
		DWORD pid = 0;
		GetWindowThreadProcessId(hWnd, &pid);
		if(pid == GetCurrentProcessId())
			break;

		Sleep(10);
	}

	float range = 5000;
	WriteMemory(0xD10678, &range, sizeof(float));

	return 0;
}

BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
	if(ul_reason_for_call == DLL_PROCESS_ATTACH)
	{
		CreateMutexA(0, 0, "Silkroad Online Launcher");
		CreateMutexA(0, 0, "Ready");

		CreateThread(0, 0, &PatchRangeThread, 0, 0, 0);
	}
	return true;
}
* White * is offline  
Old 06/13/2011, 19:33   #3
 
bootdisk's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 134
Received Thanks: 41
or just don't use precompiled headers...
they're useful on large scale project but for hacks, emus it looks pointless...
bootdisk is offline  
Old 06/14/2011, 10:09   #4
 
chea77er's Avatar
 
elite*gold: 12
Join Date: Oct 2009
Posts: 290
Received Thanks: 193
Quote:
Originally Posted by bootdisk View Post
or just don't use precompiled headers...
they're useful on large scale project but for hacks, emus it looks pointless...
emus are large projects.

BTT: You can disable precompiled headers. in Visual-Studio
(Project Properties -> C/C++ -> Precompiled Header -> .. )
chea77er is offline  
Reply


Similar Threads Similar Threads
[ESRO] Loader with range patch
03/12/2019 - SRO PServer Guides & Releases - 261 Replies
I've seen few requests for the range patch so i wanted to do it. I guess the only way to patch it without bypassing gameguard is with injected dll, which need to be injected before gameguard loads. Gameguard detected the patch at startup (protection error), but if we wait the sro to be loaded we can modify the value of pointers with the injected dll. I tried patching static address, but game guard detected it few minutes later. That means zoomhack, etc are not possible. Loader: Download...
[Req]Guide How To Modify Auto select Range at KSroClient
03/15/2012 - Silkroad Online - 7 Replies
Hi,All..... I was play sunworld which have no bot's only one work is an auto select+a modified client to support high range with auto select ,so i need to do same thing at ksro i have the media.pk2 with auto select and i need sro client which support high range,in other way i need a guide how to increase auto select range throw sro client ty i will w8 it Sorry 4 my poor english
Range modify EXRO code chaning?
06/13/2011 - SRO Coding Corner - 0 Replies
# delete request no idea why it posted twice
How can i modify this code?
12/16/2009 - CO2 Private Server - 2 Replies
Aight here is my question if i have this code for CoEmu source else if ((ItemID >= 181300 && ItemID <= 192000 || ItemID >= 930000 && ItemID <= 940000 || ItemID >= 199305 && ItemID <= 199335) && EquipLocation == 9)//Returns Garment Position { return 9; } Now how do i modify that code to work on the 5165 source?
HELP with Ip chaning for registerpage
10/02/2008 - EO PServer Hosting - 2 Replies
Where can I can the ip for the Registerpage C:\wamp And than ? :S



All times are GMT +2. The time now is 14:29.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.