Register for your free account! | Forgot your password?

Go Back   elitepvpers > Shooter > WarRock
You last visited: Today at 19:09

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

Advertisement



[C++] Advanced Patch Class - Get your hack releases more stable!

Discussion on [C++] Advanced Patch Class - Get your hack releases more stable! within the WarRock forum part of the Shooter category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2011
Posts: 128
Received Thanks: 279
Wink [C++] Advanced Patch Class - Get your hack releases more stable!

This will help you coders to get your releases more stable.
Credts: r a z e r _ (me).

-----

// usage 1, simple address:

#define adr_speed 0x...
mp<float> speed( adr_speed );
speed *= 2.0f; // increase speed by factor 2
speed = 500.0f; // set speed to 500
speed.reset(); // reset speed to old value

//usage 2, pointer + offset:

#define ptr_player 0x...
#define ofs_z 0x...
mp<float> pos_z( ptr_player, ofs_z );
//superjump example:
pos_z += 10.0f;
// for resetting the value:
pos_z.reset();
// for re-saving the patch value:
pos_z.save();
// for reading the value:
pos_z.get();

// the following operators are added to the class:
// # =
// # +=
// # -=
// # *=
// # /=

//mp.h

Code:
template <class type>
class mp {
public:
	mp( unsigned long adr );
	mp( unsigned long ptr, unsigned long ofs );
	type get();
	void reset();
	void save();
	void operator=( type val );
	void operator+=( type val );
	void operator*=( type val );
	void operator-=( type val );
	void operator/=( type val );
private:
	type *adr;
	unsigned long *ptr;
	unsigned long ofs;
	bool patched;
	type sval;
};

template <class type>
mp<type>::mp( unsigned long adr ) {
	this->adr = (type*)(adr);
	this->ptr = NULL;
	this->ofs = NULL;
	this->sval = *this->adr;
	this->patched = false;
}

template <class type>
mp<type>::mp( unsigned long *ptr, unsigned long ofs ) {
	this->adr = NULL;
	this->ptr = (unsigned long*)(ptr);
	this->ofs = (unsigned long)(ofs);
	this->sval = *(type*)(*this->ptr+this->ofs);
	this->patched = false;
}

template <class type>
void mp<type>::operator=( type val ) {
	if( this->adr )
		*this->adr = val;
	else if( *this->ptr )
		*(type*)( *this->ptr + this->ofs ) = val;
	if( this->adr || *this->ptr ) 
		this->patched = true;
}

template <class type>
void mp<type>::operator+=( type val ) {
	if( this->adr )
		*this->adr += val;
	else if( *this->ptr )
		*(type*)( *this->ptr + this->ofs ) += val;
	if( this->adr || *this->ptr ) 
		this->patched = true;
}	

template <class type>
void mp<type>::operator-=( type val ) {
	if( this->adr )
		*this->adr -= val;
	else if( *this->ptr )
		*(type*)( *this->ptr + this->ofs ) -= val;
	if( this->adr || *this->ptr ) 
		this->patched = true;
}	

template <class type>
void mp<type>::operator*=( type val ) {
	if( this->adr )
		*this->adr *= val;
	else if( *this->ptr )
		*(type*)( *this->ptr + this->ofs ) *= val;
	if( this->adr || *this->ptr ) 
		this->patched = true;
}	

template <class type>
void mp<type>::operator/=( type val ) {
	if( this->adr )
		*this->adr *= (1/val);
	else if( *this->ptr )
		*(type*)( *this->ptr + this->ofs ) *= (1/val)
	if( this->adr || *this->ptr ) 
		this->patched = true;
}	

template <class type>
type mp<type>::get() {
	if( this->adr )
		return *this->adr;
	else if( *this->ptr )
		return *(type*)( *this->ptr + this->ofs );
	return 0;
}

template <class type>
void mp<type>::reset() {
	if( this->adr )
		*this->adr = this->sval;
	else if( *this->ptr )
		*(type*)( *this->ptr + this->ofs ) = this->sval;
	if( this->adr || *this->ptr ) 
		this->patched = false;
}

template <class type>
void mp<type>::save() {
	if( this->adr ) 
		this->sval = *this->adr;
	else if ( *this->ptr )
		this->sval = *(type*)( *this->ptr + this->ofs );
	this->patched = false;
}
r a z e r _ is offline  
Thanks
4 Users
Old 04/02/2011, 18:33   #2
 
Lord0fCyberWar's Avatar
 
elite*gold: 1
Join Date: Sep 2009
Posts: 1,836
Received Thanks: 642
Ich verstehe zwar kein Wort, aber es sieht hilfreich aus ^^

Kommt aber in die Guide-Sektion.

#moverequest
Lord0fCyberWar is offline  
Old 04/02/2011, 18:33   #3
 
elite*gold: 0
Join Date: Sep 2010
Posts: 10,215
Received Thanks: 5,781
Sehr nice.
theitfan1337 is offline  
Old 04/02/2011, 18:34   #4
 
elite*gold: 0
Join Date: Oct 2010
Posts: 27
Received Thanks: 19
lol nice thank you alot
Arkane´ is offline  
Old 04/02/2011, 18:37   #5
 
elite*gold: 0
Join Date: Jan 2011
Posts: 128
Received Thanks: 279
Quote:
Originally Posted by Lord0fCyberWar View Post
Ich verstehe zwar kein Wort, aber es sieht hilfreich aus ^^

Kommt aber in die Guide-Sektion.

#moverequest
Coder wissen das zu verwenden. BTW wenn die Mods dir zustimmen sollen sie es ruhig moven, hatte kA wohin. Es soll auf jeden Fall nicht in den Sammelthread, da diese Source dort unterginge.
r a z e r _ is offline  
Old 04/02/2011, 18:41   #6
 
elite*gold: 0
Join Date: Apr 2011
Posts: 212
Received Thanks: 56
xxkingskill is offline  
Old 04/02/2011, 18:44   #7
 
elite*gold: 0
Join Date: Jan 2011
Posts: 128
Received Thanks: 279
Quote:
Originally Posted by xxkingskill View Post
es gibt in epvp keine coder, oder die c++ können.
das ist alles nur c&p

Ich habe das nicht nur hier realeased, deswegen hab ich mir auch nicht die Mühe gemacht es nochmal ins deutsche zu übersetzen.
r a z e r _ is offline  
Thanks
2 Users
Reply


Similar Threads Similar Threads
SWTOR: Imperial Agent advanced class info available
11/05/2010 - Gaming News - EN - 2 Replies
Finally, more information has been uncovered on the Star Wars: The Old Republic Imperial Agent! The advanced classes are a key feature in player customization in SWTOR and we now know that the Imperial Agents will have the ability to choose to be an Operative or a Sniper. Star Wars: The Old Republic | Classes Also check out the new trailer: http://www.swtor.com/media/trailers/imperial-agen t
:HH: Speed++Zoom| Patch:[5017] Stable Release
05/06/2008 - CO2 Exploits, Hacks & Tools - 100 Replies
:HH: Speed++Zoom Hey everyone, Im releasing my very first Speed+Zoom hack combo. :HH: Speed++Zoom is a multi-functional hack which is quite like Fujiy's famous Speed+Zoom hack. It can support UNLIMITED characters at 1 time. For Patch 5020.



All times are GMT +1. The time now is 19:12.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.