Dark_Byte's Speedhack source code

Posts 16–30 of 86 · Page 2 of 6
Quote Originally Posted by Techtonic View Post
If(CH_Speed)
writefloat(ADR_Speed) = 0;
writefloat(ADR_Trigger) = 0;
writefloat(ADR_Reload) = 0;
}

I litterly just wrote that in this message lol so im not sure it will work
What the fuck is that?

Code:
If(CH_Speed)
   writefloat(ADR_Speed) = 0;
   writefloat(ADR_Trigger) = 0;
   writefloat(ADR_Reload) = 0; 
}
?????????????

It's for a speedhack.

Code:
if(YOURBOOL_HERE)
{
                                if(GetAsyncKeyState(VK_MENU/*ALTKEY*/)&1)
{
                                float SPEED_VAL = 250; 
				DWORD Protection;
		
				VirtualProtect((void*)0x123456,  
                                sizeof(value), PAGE_READWRITE, &Protection);
				memcpy((void*)0x123456, &SPEED_VAL,sizeof(SPEED_VAL));
				VirtualProtect((void*)0x123456, sizeof(SPEED_VAL), Protection, 0);
}
}
Quote Originally Posted by Synns View Post
What the fuck is that?

Code:
If(CH_Speed)
   writefloat(ADR_Speed) = 0;
   writefloat(ADR_Trigger) = 0;
   writefloat(ADR_Reload) = 0; 
}
?????????????

It's for a speedhack.

Code:
if(YOURBOOL_HERE)
{
                                if(GetAsyncKeyState(VK_MENU/*ALTKEY*/)&1)
{
                                float SPEED_VAL = 250; 
				DWORD Protection;
		
				VirtualProtect((void*)0x123456,  
                                sizeof(value), PAGE_READWRITE, &Protection);
				memcpy((void*)0x123456, &SPEED_VAL,sizeof(SPEED_VAL));
				VirtualProtect((void*)0x123456, sizeof(SPEED_VAL), Protection, 0);
}
}
That would be a "SIMPLE" C++ function for a fast reload
Quote Originally Posted by Techtonic View Post
That would be a "SIMPLE" C++ function for a fast reload
Well it doesn't make sense to me for a couple reasons
Code:
If(CH_Speed)
   writefloat(ADR_Speed) = 0;
   writefloat(ADR_Trigger) = 0;
   writefloat(ADR_Reload) = 0; 
}
Well first of all you forgot the opening brace, but apart from that, what is the writefloat function? where is it found, what does it do. Secondly I didn't know you could assign a value to a function. Infact that confuses me immensely
Quote Originally Posted by zeco View Post
all you forgot the opening brace, but apart from that, what is the writefloat function? where is it found, what does it do. Secondly I didn't know you could assign a value to a function. Infact that confuses me immensely
Functions receive arguments. Those arguments are called parameter. Functions are one of the major points of programming. writefloat() would no doubt write to the address specified in its parameters and change it to zero in this case.
Quote Originally Posted by why06 View Post
Functions receive arguments. Those arguments are called parameter. Functions are one of the major points of programming. writefloat() would no doubt write to the address specified in its parameters and change it to zero in this case.
Yeah but if that was so, it would be more like this

Code:
writefloat(adr_speed, 0);
It would have 2 arguments. Functions either return nothing or return some kind of value, assuming it returns a value, this value would not be stored anywhere as of yet, thus how could you assign another value to it. Infact even if this does work would be lost and irretrievable. Actually furthermore it makes even less sense cause i just remembered that you can't assign a value to a value (i.e. 3 = 4; ).

But then again adr_speed is an address so it wouldn't really matter if it was irretrievable so then in that case wouldn't it be more like
Code:
writefloat(*adr_speed) = 0;
But upon reflection this couldn't be correct either because the value returned by a function is just a copy not the actual value itself, and also the fact you can't assign a value(numeric constant i think) to another (numeric constant?) which brings me back to this not making sense v_v

As a side note i tried an example of this just to make sure.
Code:
#include <iostream>
using namespace std;

int blah(int x);

int main(){

	int x = 3;
	blah(x)=0;
	
	cin.get();
	cin.get();
	return 0;
}

int blah(int x){
	return x;
}
If one tries to compile this they get the error:
Error 1 error C2106: '=' : left operand must be l-value c:\users\jon\desktop\c++\c++ ranprojs\testing grounds console\whileloop test.cpp 195
Wow. Hmmm... where to start?

Well there is a way to directly assign a function a value. This is because the function doesn't just return a type. It returns a reference.

Functions are usually called by value, but there is a way to call by reference. It's called a call by reference. In fact I'm just getting into using call by references. As you come to understand more about C++ it should make sense, but here look at this:
Code:
#include <iostream>
using namespace std;

int &blah(int x);

int main(){

	int x = 3;
	blah(x)=0;
	
	cin.get();
	cin.get();
	return 0;
}

int &blah(int x){
	return x;
}
This should compile and run. And there's lot more crazy stuff you can do with call by references. Call by reference returns the address of the value being called and not the value like normal functions do.
Quote Originally Posted by why06 View Post
Wow. Hmmm... where to start?

Well there is a way to directly assign a function a value. This is because the function doesn't just return a type. It returns a reference.

Functions are usually called by value, but there is a way to call by reference. It's called a call by reference. In fact I'm just getting into using call by references. As you come to understand more about C++ it should make sense, but here look at this:
Code:
#include <iostream>
using namespace std;

int &blah(int x);

int main(){

	int x = 3;
	blah(x)=0;
	
	cin.get();
	cin.get();
	return 0;
}

int &blah(int x){
	return x;
}
This should compile and run. And there's lot more crazy stuff you can do with call by references. Call by reference returns the address of the value being called and not the value like normal functions do.
Hmm right somehow i forgot about that. The book i'm officially reading hasn't covered that yet, but i remember taking a quick like 20 page tutorial that mentioned this. I suppose it does make sense when you put it like that >_>. But it seems overly complicated for simply writing a value to a variable. Either way that's why i asked the poster what the function does. Anyway thanks for clearing this up >_<.
your avatar creeps me the fk out o_O!

@zeco: its a .dll It's the source code for dark byte's speed hack that Neverborn has been using. U just inject it into Engine.exe
Quote Originally Posted by why06 View Post
your avatar creeps me the fk out o_O!

@zeco: its a .dll It's the source code for dark byte's speed hack that Neverborn has been using. U just inject it into Engine.exe
Ok my idea won't work then xD
Quote Originally Posted by why06 View Post
Omg >_>... I was just about to say that... again. thx zeco.

@ techtonic: I am looking for some1 to translate this into C++, but that wasn't it. I mean translate the whole shebang. Ofcourse now I have to work on translating it to Delphi 2009 because as I said earlier this code is 2006 and won't compile properly in the 2009 compiler. And thanks for your interest in my lil project
Delphi code written and compiled in a Delphi 06 compiler shouldn't have any problems with running in Delphi 09. If you could post the error log here, it would help. I can't help you translate it to C++, I don't know C++
Here is the error I'm getting. Something a bout a global

[DCC Fatal Error] DBspdhack.dpr(5): F1026 File not found: 'globals.dcu'
Quote Originally Posted by why06 View Post
Here is the error I'm getting. Something a bout a global

[DCC Fatal Error] DBspdhack.dpr(5): F1026 File not found: 'globals.dcu'
'globals' is in the 'uses' part of the code, and if the file globals.dcu is not in the 'Lib' folder of your Delphi application. I'm not sure, but as far as I can remember DB included some in the source file. Check if it's there and move it to the correct folder or download it from internet. You can also remove it from the 'uses' and see if it gives errors. If it doesn't, then there's no problem.
Quote Originally Posted by Michelvd View Post
'globals' is in the 'uses' part of the code, and if the file globals.dcu is not in the 'Lib' folder of your Delphi application. I'm not sure, but as far as I can remember DB included some in the source file. Check if it's there and move it to the correct folder or download it from internet. You can also remove it from the 'uses' and see if it gives errors. If it doesn't, then there's no problem.
Wow thanks a lot I will see if that works.

EDIT: Actually I just got word back from DarkByte. This is his exact quote from a question I asked him:
Quote Originally Posted by Dark Byte
No idea, I only use delphi 7
Try looking at the errors and try to fix them

also, don't look for tutorials, look for data and information
Apparently he used Delphi 2007
Also, what version is the source code you use?
Apparently he used Delphi 2007
Well yea, so do I but that was the only way to fix it.

2convo'sin1threadftw?
Posts 16–30 of 86 · Page 2 of 6
This thread is closed for replies.

Similar Threads

Tags for this Thread

Talk with us