WarRock EU - Code Snippets

11/19/2011 21:03 Dogukan47#5866
Quote:
Originally Posted by hero9910 View Post
addys

#define MEM_STAMINA1 0x823FA0 //
#define MEM_STAMINA2 0x823FA4 //
#define MEM_STAMINA3 0x823FA8 //
#define MEM_STAMINA4 0x823FAC //
#define MEM_STAMINA5 0x823FB0 //

funktion
Code:
//Stamina
if (stamina==1)
{
       DWORD dwPlayerPtr = *(DWORD*)ADR_PLAYERPOINTER;
       if (dwPlayerPtr != 0)
       {
*(float*)MEM_STAMINA1 = 1000;   
*(float*)MEM_STAMINA2 = 1000;
*(float*)MEM_STAMINA3 = 0;
*(float*)MEM_STAMINA4 = 0;
*(float*)MEM_STAMINA5 = 0;
       }
}
	
if (stamina==0)
{
       DWORD dwPlayerPtr = *(DWORD*)ADR_PLAYERPOINTER;
       if (dwPlayerPtr != 0)
       {
*(float*)MEM_STAMINA1 = 60;   
*(float*)MEM_STAMINA2 = 60;
*(float*)MEM_STAMINA3 = 0;
*(float*)MEM_STAMINA4 = 0;
*(float*)MEM_STAMINA5 = 0;
       }
}
die stamina source ist falsch das 2. und 3. ist double wenn ich mich richtig erninnere :S
11/19/2011 21:35 hero9910#5867
die source geht bei mir ;)
11/19/2011 21:45 SK1LL0R..#5868
Quote:
Originally Posted by hero9910 View Post
addys

#define MEM_STAMINA1 0x823FA0 //
#define MEM_STAMINA2 0x823FA4 //
#define MEM_STAMINA3 0x823FA8 //
#define MEM_STAMINA4 0x823FAC //
#define MEM_STAMINA5 0x823FB0 //

funktion
Code:
//Stamina
if (stamina==1)
{
       DWORD dwPlayerPtr = *(DWORD*)ADR_PLAYERPOINTER;
       if (dwPlayerPtr != 0)
       {
*(float*)MEM_STAMINA1 = 1000;   
*(float*)MEM_STAMINA2 = 1000;
*(float*)MEM_STAMINA3 = 0;
*(float*)MEM_STAMINA4 = 0;
*(float*)MEM_STAMINA5 = 0;
       }
}
	
if (stamina==0)
{
       DWORD dwPlayerPtr = *(DWORD*)ADR_PLAYERPOINTER;
       if (dwPlayerPtr != 0)
       {
*(float*)MEM_STAMINA1 = 60;   
*(float*)MEM_STAMINA2 = 60;
*(float*)MEM_STAMINA3 = 0;
*(float*)MEM_STAMINA4 = 0;
*(float*)MEM_STAMINA5 = 0;
       }
}
if(nStamina)
{
Stamina1Patch.Patch();
Stamina2Patch.Patch();
Stamina3Patch.Patch();
Stamina4Patch.Patch();
Stamina5Patch.Patch();
}
else
{
Stamina1Patch.Restore();
Stamina2Patch.Restore();
Stamina3Patch.Restore();
Stamina4Patch.Restore();
Stamina5Patch.Restore();
}
cMemPatch<float>Stamina1Patch(ADR_STAMINA1,1000);
cMemPatch<double>Stamina2Patch(ADR_STAMINA2,1000);
cMemPatch<double>Stamina3Patch(ADR_STAMINA3,0);
cMemPatch<float>Stamina4Patch(ADR_STAMINA4,0);
cMemPatch<float>Stamina5Patch(ADR_STAMINA5,0);

#define ADR_STAMINA1 0x823FA0
#define ADR_STAMINA2 0x823FA4
#define ADR_STAMINA3 0x823FA8
#define ADR_STAMINA4 0x823FAC
#define ADR_STAMINA5 0x823FB0

MemPatch:
#pragma once
#ifndef __CMEMORYPATCH_H__
#define __CMEMORYPATCH_H__

#include <windows.h>

template <typename T>
class cMemPatch
{
private:
unsigned long Address;
T OffValue;
T OnValue;
int PatchStatus;
int OffValueSaved;

enum PATCHSTATUS
{
NORMAL,
PATCHED
};

bool SaveOffValue(void);

public:
cMemPatch(void);
cMemPatch(unsigned long ADR, T VAL);

void Patch(void);
void Restore(void);
};

template <typename T>
cMemPatch<T>::cMemPatch(void)
{
}

template <typename T>
cMemPatch<T>::cMemPatch(unsigned long ADR, T VAL)
{
this->Address = ADR;
this->OnValue = VAL;
this->PatchStatus = NORMAL;
this->OffValueSaved = false;
}

template <typename T>
void cMemPatch<T>::Patch()
{
if (this->PatchStatus == NORMAL)
{
if (this->OffValueSaved == false)
{
if (!this->SaveOffValue())
return;
}
else
{
//*(T*)(this->Address) = this->OnValue;
unsigned long size;
VirtualProtect((void*)this->Address, sizeof(this->OnValue), PAGE_READWRITE, &size);
memcpy((void*)this->Address, &this->OnValue , sizeof(this->OnValue));
VirtualProtect((void*)this->Address, sizeof(this->OnValue), size, 0);
this->PatchStatus = PATCHED;
}
}
}

template <typename T>
void cMemPatch<T>::Restore()
{
if (this->PatchStatus == PATCHED)
{
*(T*)(this->Address) = this->OffValue;
this->PatchStatus = NORMAL;
}
}

template <typename T>
bool cMemPatch<T>::SaveOffValue()
{
if (IsBadReadPtr((void*)(this->Address), sizeof(T)))
return false;
else
{
this->OffValue = *(T*)(this->Address);
this->OffValueSaved = true;
return true;
}
}


#endif
11/19/2011 22:02 __BuRn3R#5869
Quote:
Originally Posted by hero9910 View Post
addys

#define MEM_STAMINA1 0x823FA0 //
#define MEM_STAMINA2 0x823FA4 //
#define MEM_STAMINA3 0x823FA8 //
#define MEM_STAMINA4 0x823FAC //
#define MEM_STAMINA5 0x823FB0 //

funktion
Code:
//Stamina
if (stamina==1)
{
[COLOR="Red"]DWORD dwPlayerPtr = *(DWORD*)ADR_PLAYERPOINTER;
       if (dwPlayerPtr != 0)
       {[/COLOR]
*(float*)MEM_STAMINA1 = 1000;   
*(float*)MEM_STAMINA2 = 1000;
*(float*)MEM_STAMINA3 = 0;
*(float*)MEM_STAMINA4 = 0;
*(float*)MEM_STAMINA5 = 0;
[COLOR="Red"]       }[/COLOR]
}
	
if (stamina==0)
{
  [COLOR="red"]     DWORD dwPlayerPtr = *(DWORD*)ADR_PLAYERPOINTER;
       if (dwPlayerPtr != 0)
       {[/COLOR]
*(float*)MEM_STAMINA1 = 60;   
*(float*)MEM_STAMINA2 = 60;
*(float*)MEM_STAMINA3 = 0;
*(float*)MEM_STAMINA4 = 0;
*(float*)MEM_STAMINA5 = 0;
[COLOR="red"]       }[/COLOR]
}
Das rote ist unötig ;)
11/19/2011 22:20 ■DarknessIM■#5870
Also mein Stamina ist relativ simple:

if(Stamina)
{
*(float*)MEM_STAMINA4 = -300000f;
}

Was macht es:
Es lädt das Stamina des Spielers auf indem Man rollt.

Credits:Me
Also ich habe es selbst gemacht(gesucht) ich weis nicht ob es jemand vor mir schonmal hatte.
11/19/2011 23:06 hero9910#5871
Quote:
Originally Posted by _BuRn3R_ View Post
Das rote ist unötig ;)
It´s 4 me ;)
11/20/2011 01:14 NikM#5872
@Burner
das nennt man kommentar ...
11/20/2011 09:34 __BuRn3R#5873
Quote:
Originally Posted by NikM View Post
@Burner
das nennt man kommentar ...
Irgendwie ist das Unötige nicht rot geworde.. habs nicht bemerkt.
11/20/2011 14:45 CyberVeezy :)#5874
WalkSpeedFactor [Only registered and activated users can see links. Click Here To Register...]

Addy: #define MEM_WALKSPEEDFACTOR 0x083D650

Source
Code:
if(CH_WalkSpeedFactor ==1) 
{
  *(double*)(MEM_WALKSPEEDFACTOR) = -***; //Wer sich mit Assembler auskennt weiss es :)
}
//Creditz: CyberVeezy
11/20/2011 17:24 Dogukan47#5875
#request speedroll
11/20/2011 17:35 hero9910#5876
Quote:
Originally Posted by Dogukan47 View Post
#request speedroll
dein ernst :confused:

Code:
//speedrolle
	  
			switch(speedr)
			
	  {
			//Speed Roll x1
{if (speedr == 0){
case 1:*(float*)(SpeedRoll) = 1.5f;}};break;

		//Speed Roll x2
{if (speedr == 1){
case 2:*(float*)(SpeedRoll) = 2.0f;}};break;

//Speed Roll x3
{if (speedr == 2){
case 3:*(float*)(SpeedRoll) = 3.0f;}};break;

//Speed Roll x4
{if (speedr == 4){
case 4:*(float*)(SpeedRoll) = 4.0f;}};break;

//Speed Roll x5
{if (speedr == 5){
case 5:*(float*)(SpeedRoll) = 5.0f;}};break;

//Speed Roll x6
{if (speedr == 6){
case 6:*(float*)(SpeedRoll) = 6.0f;}};break;
		}
ich weiß doppelt gemoppelt :DD aber so bin ich
so ist mein stiel
11/20/2011 17:49 .Tiq3reye™#5877
Quote:
Originally Posted by hero9910 View Post
dein ernst :confused:

Code:
//speedrolle
	  
			switch(speedr)
			
	  {
			//Speed Roll x1
{if (speedr == 0){
case 1:*(float*)(SpeedRoll) = 1.5f;}};break;

		//Speed Roll x2
{if (speedr == 1){
case 2:*(float*)(SpeedRoll) = 2.0f;}};break;

//Speed Roll x3
{if (speedr == 2){
case 3:*(float*)(SpeedRoll) = 3.0f;}};break;

//Speed Roll x4
{if (speedr == 4){
case 4:*(float*)(SpeedRoll) = 4.0f;}};break;

//Speed Roll x5
{if (speedr == 5){
case 5:*(float*)(SpeedRoll) = 5.0f;}};break;

//Speed Roll x6
{if (speedr == 6){
case 6:*(float*)(SpeedRoll) = 6.0f;}};break;
		}
ich weiß doppelt gemoppelt :DD aber so bin ich
so ist mein stiel
:facepalm:

Code:
{
switch(ROLLSPEED)
{
case 0:*(float*)(ADR_ROLLSPEED) = 1.75;break;
case 1:*(float*)(ADR_ROLLSPEED) = 1.75*2;break;
case 2:*(float*)(ADR_ROLLSPEED) = 1.75*3;break;
case 3:*(float*)(ADR_ROLLSPEED) = 1.75*4;break;
case 4:*(float*)(ADR_ROLLSPEED) = 1.75*5;break;
}
11/20/2011 18:17 Raz9r#5878
Quote:
Originally Posted by .Tiq3reye™ View Post
:facepalm:

Code:
{
switch(ROLLSPEED)
{
case 0:*(float*)(ADR_ROLLSPEED) = 1.75;break;
case 1:*(float*)(ADR_ROLLSPEED) = 1.75*2;break;
case 2:*(float*)(ADR_ROLLSPEED) = 1.75*3;break;
case 3:*(float*)(ADR_ROLLSPEED) = 1.75*4;break;
case 4:*(float*)(ADR_ROLLSPEED) = 1.75*5;break;
}
Code:
static float *pfRollSpeed = (float *)ADR_ROLLSPEED;
*pfRollSpeed = 1.75f * (ROLLSPEED + 1);
Macht exakt das gleiche, ist aber fehlerfrei, kürzer und schneller.
11/20/2011 18:32 CyberVeezy :)#5879
AntiAbnormalGamePlay by CyberRazzer
Code:
#define ADR_ANTIABNORMALGAMEPLAY1 0x079E776
#define ADR_ANITABNORMALGAMEPLAY2 0x079E778
#define ADR_ANTIABNORMALGAMEPLAY2 0x079E710

Source
if(AbnormayGameplay ==1)
{
 *(int*)ADR_ANTIABNORMALGAMEPLAY1 = 1;
 *(int*)ADR_ANTIABNORMALGAMEPLAY2 = 1;
 *(int*)ADR_ANTIABNORMALGAMEPLAY3 = 0;
}
//Credits: CyberVeezy(Addys searched), CyberRazzer(Source)
11/20/2011 19:24 Dogukan47#5880
Quote:
Originally Posted by __underScore View Post
Code:
static float *pfRollSpeed = (float *)ADR_ROLLSPEED;
*pfRollSpeed = 1.75f * (ROLLSPEED + 1);
Macht exakt das gleiche, ist aber fehlerfrei, kürzer und schneller.
du hast ROLLSPEED nicht definiert