Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Need help with my warrock trainer [VC++]

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
alexd1999
How do I cheat?
Reputation: 0

Joined: 04 Dec 2007
Posts: 1

PostPosted: Thu Feb 14, 2008 8:36 am    Post subject: Need help with my warrock trainer [VC++] Reply with quote

I have a problem
I get my trainer warrock simply not UD
Could someone help me please.

Code:

void Popup( char* szText, char* szCaption );
void OpenBrowser( char* szURL );
int GetHandle( );
void *memcpy_ex( void* pvAddress, void* pvBuffer, unsigned long stSize );
unsigned long GetPointer( );
bool IsKeyPressed( int vKey );


Code:

#include "stdafx.h"
#include "Form1.h"
#include <windows.h>
#include "form_funcs.h"
#include <shellapi.h>
#include <stdio.h>
#include <psapi.h>

using namespace tgs_public_new;

HANDLE hWarRock = 0;
HWND hWnd = 0;

int APIENTRY _tWinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPTSTR    lpCmdLine,
                     int       nCmdShow)
{
   System::Threading::Thread::CurrentThread->ApartmentState = System::Threading::ApartmentState::STA;
   Application::Run(new Form1());
   return 0;
}

void Popup( char* szText, char* szCaption )
{
   MessageBox( 0, szText, szCaption, MB_OK );
}

void OpenBrowser( char* szURL )
{
   ShellExecute( 0, "open", szURL, 0, 0, 0 );
}

int GetHandle( )
{
   DWORD proc_id = 0;
   if( hWarRock != NULL )return (int)hWarRock;
   hWnd = FindWindow( "WarRock", 0 );
   if( hWnd == NULL )return NULL;
   GetWindowThreadProcessId( hWnd, &proc_id );
   return (int)OpenProcess( PROCESS_ALL_ACCESS, false, proc_id );
}

void *memcpy_ex( void* pvAddress, void* pvBuffer, unsigned long stSize )
{
   DWORD Dummy = 0;
   if( WriteProcessMemory( (HANDLE)GetHandle( ), pvAddress, pvBuffer, stSize, &Dummy ) == TRUE )
   {
      return pvAddress;
   }
   return NULL;
}

unsigned long GetPointer( )
{
   DWORD dummy, dwRead = 0;
   if( ReadProcessMemory( ( HANDLE )GetHandle( ), ( void* )0x008AF2E8, &dummy, sizeof( DWORD ), &dwRead ) == TRUE )
   {
      return dummy;
   }
   return 0;
}

bool IsKeyPressed( int vKey )
{
   if( GetAsyncKeyState( vKey )&1 )
      return true;
   return false;
}


Code:

#include "form_funcs.h"

#pragma once

struct pVars
{
   bool ZoomHack, StaminaHack, CrossHair, SuperJump, Spread, Recoil, Fall;
   float fSuperJump;
   bool bFlipZoom;
};

pVars cvar;

namespace tgs_public_new
{
   using namespace System;
   using namespace System::ComponentModel;
   using namespace System::Collections;
   using namespace System::Windows::Forms;
   using namespace System::Data;
   using namespace System::Drawing;

   /// <summary>
   /// Summary for Form1
   ///
   /// WARNING: If you change the name of this class, you will need to change the
   ///          'Resource File Name' property for the managed resource compiler tool
   ///          associated with all .resx files this class depends on.  Otherwise,
   ///          the designers will not be able to interact properly with localized
   ///          resources associated with this form.
   /// </summary>
   public __gc class Form1 : public System::Windows::Forms::Form
   {   
   public:
      Form1(void)
      {
         InitializeComponent();
      }
 
   protected:
      void Dispose(Boolean disposing)
      {
         if (disposing && components)
         {
            components->Dispose();
         }
         __super::Dispose(disposing);
      }
   private: System::Windows::Forms::PictureBox *  pictureBox1;
   private: System::Windows::Forms::CheckBox *  checkBox1;
   private: System::Windows::Forms::CheckBox *  checkBox2;
   private: System::Windows::Forms::CheckBox *  checkBox3;
   private: System::Windows::Forms::CheckBox *  checkBox4;
   private: System::Windows::Forms::TextBox *  textBox1;
   private: System::Windows::Forms::Label *  label1;
   private: System::Windows::Forms::CheckBox *  checkBox5;
   private: System::Windows::Forms::CheckBox *  checkBox6;
   private: System::Windows::Forms::CheckBox *  checkBox7;
   private: System::Windows::Forms::Timer *  timer1;
   private: System::Windows::Forms::Button *  button1;
   private: System::Windows::Forms::Button *  button2;
   private: System::ComponentModel::IContainer *  components;

   private:
      /// <summary>
      /// Required designer variable.
      /// </summary>


      /// <summary>
      /// Required method for Designer support - do not modify
      /// the contents of this method with the code editor.
      /// </summary>
      void InitializeComponent(void)
      {
         this->components = new System::ComponentModel::Container();
         System::Resources::ResourceManager *  resources = new System::Resources::ResourceManager(__typeof(tgs_public_new::Form1));
         this->pictureBox1 = new System::Windows::Forms::PictureBox();
         this->checkBox1 = new System::Windows::Forms::CheckBox();
         this->checkBox2 = new System::Windows::Forms::CheckBox();
         this->checkBox3 = new System::Windows::Forms::CheckBox();
         this->checkBox4 = new System::Windows::Forms::CheckBox();
         this->textBox1 = new System::Windows::Forms::TextBox();
         this->label1 = new System::Windows::Forms::Label();
         this->checkBox5 = new System::Windows::Forms::CheckBox();
         this->checkBox6 = new System::Windows::Forms::CheckBox();
         this->checkBox7 = new System::Windows::Forms::CheckBox();
         this->timer1 = new System::Windows::Forms::Timer(this->components);
         this->button1 = new System::Windows::Forms::Button();
         this->button2 = new System::Windows::Forms::Button();
         this->SuspendLayout();
         //
         // pictureBox1
         //
         this->pictureBox1->Image = (__try_cast<System::Drawing::Image *  >(resources->GetObject(S"pictureBox1.Image")));
         this->pictureBox1->Location = System::Drawing::Point(8, 8);
         this->pictureBox1->Name = S"pictureBox1";
         this->pictureBox1->Size = System::Drawing::Size(296, 64);
         this->pictureBox1->TabIndex = 0;
         this->pictureBox1->TabStop = false;
         //
         // checkBox1
         //
         this->checkBox1->Location = System::Drawing::Point(8, 80);
         this->checkBox1->Name = S"checkBox1";
         this->checkBox1->Size = System::Drawing::Size(160, 16);
         this->checkBox1->TabIndex = 1;
         this->checkBox1->Text = S"No Spread";
         this->checkBox1->CheckedChanged += new System::EventHandler(this, checkBox1_CheckedChanged);
         //
         // checkBox2
         //
         this->checkBox2->Location = System::Drawing::Point(8, 96);
         this->checkBox2->Name = S"checkBox2";
         this->checkBox2->Size = System::Drawing::Size(152, 16);
         this->checkBox2->TabIndex = 2;
         this->checkBox2->Text = S"No Recoil";
         this->checkBox2->CheckedChanged += new System::EventHandler(this, checkBox2_CheckedChanged);
         //
         // checkBox3
         //
         this->checkBox3->Location = System::Drawing::Point(8, 112);
         this->checkBox3->Name = S"checkBox3";
         this->checkBox3->Size = System::Drawing::Size(160, 16);
         this->checkBox3->TabIndex = 3;
         this->checkBox3->Text = S"No Fall Damage";
         this->checkBox3->CheckedChanged += new System::EventHandler(this, checkBox3_CheckedChanged);
         //
         // checkBox4
         //
         this->checkBox4->Location = System::Drawing::Point(8, 128);
         this->checkBox4->Name = S"checkBox4";
         this->checkBox4->Size = System::Drawing::Size(104, 16);
         this->checkBox4->TabIndex = 4;
         this->checkBox4->Text = S"Super Jump";
         this->checkBox4->CheckedChanged += new System::EventHandler(this, checkBox4_CheckedChanged);
         //
         // textBox1
         //
         this->textBox1->BackColor = System::Drawing::SystemColors::InfoText;
         this->textBox1->BorderStyle = System::Windows::Forms::BorderStyle::None;
         this->textBox1->ForeColor = System::Drawing::SystemColors::ScrollBar;
         this->textBox1->Location = System::Drawing::Point(256, 80);
         this->textBox1->MaxLength = 4;
         this->textBox1->Name = S"textBox1";
         this->textBox1->Size = System::Drawing::Size(40, 14);
         this->textBox1->TabIndex = 5;
         this->textBox1->Text = S"500";
         this->textBox1->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
         this->textBox1->TextChanged += new System::EventHandler(this, textBox1_TextChanged);
         //
         // label1
         //
         this->label1->Location = System::Drawing::Point(160, 80);
         this->label1->Name = S"label1";
         this->label1->Size = System::Drawing::Size(96, 16);
         this->label1->TabIndex = 6;
         this->label1->Text = S"Jump Height:";
         //
         // checkBox5
         //
         this->checkBox5->Location = System::Drawing::Point(8, 144);
         this->checkBox5->Name = S"checkBox5";
         this->checkBox5->Size = System::Drawing::Size(136, 16);
         this->checkBox5->TabIndex = 7;
         this->checkBox5->Text = S"Stamina Hack";
         this->checkBox5->CheckedChanged += new System::EventHandler(this, checkBox5_CheckedChanged);
         //
         // checkBox6
         //
         this->checkBox6->Location = System::Drawing::Point(8, 160);
         this->checkBox6->Name = S"checkBox6";
         this->checkBox6->Size = System::Drawing::Size(128, 16);
         this->checkBox6->TabIndex = 8;
         this->checkBox6->Text = S"Zoom Hack";
         this->checkBox6->CheckedChanged += new System::EventHandler(this, checkBox6_CheckedChanged);
         //
         // checkBox7
         //
         this->checkBox7->Location = System::Drawing::Point(8, 176);
         this->checkBox7->Name = S"checkBox7";
         this->checkBox7->Size = System::Drawing::Size(128, 16);
         this->checkBox7->TabIndex = 9;
         this->checkBox7->Text = S"Crosshair";
         this->checkBox7->CheckedChanged += new System::EventHandler(this, checkBox7_CheckedChanged);
         //
         // timer1
         //
         this->timer1->Enabled = true;
         this->timer1->Interval = 10;
         this->timer1->Tick += new System::EventHandler(this, timer1_Tick);
         //
         // button1
         //
         this->button1->Location = System::Drawing::Point(160, 168);
         this->button1->Name = S"button1";
         this->button1->Size = System::Drawing::Size(136, 24);
         this->button1->TabIndex = 10;
         this->button1->Text = S"Visit Us!";
         this->button1->Click += new System::EventHandler(this, button1_Click);
         //
         // button2
         //
         this->button2->Location = System::Drawing::Point(160, 136);
         this->button2->Name = S"button2";
         this->button2->Size = System::Drawing::Size(136, 24);
         this->button2->TabIndex = 11;
         this->button2->Text = S"About";
         this->button2->Click += new System::EventHandler(this, button2_Click);
         //
         // Form1
         //
         this->AutoScaleBaseSize = System::Drawing::Size(7, 14);
         this->ClientSize = System::Drawing::Size(306, 200);
         this->Controls->Add(this->button2);
         this->Controls->Add(this->button1);
         this->Controls->Add(this->checkBox7);
         this->Controls->Add(this->checkBox6);
         this->Controls->Add(this->checkBox5);
         this->Controls->Add(this->label1);
         this->Controls->Add(this->textBox1);
         this->Controls->Add(this->checkBox4);
         this->Controls->Add(this->checkBox3);
         this->Controls->Add(this->checkBox2);
         this->Controls->Add(this->checkBox1);
         this->Controls->Add(this->pictureBox1);
         this->Font = new System::Drawing::Font(S"Verdana", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, (System::Byte)0);
         this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedToolWindow;
         this->Name = S"Form1";
         this->StartPosition = System::Windows::Forms::FormStartPosition::CenterScreen;
         this->Text = S"[thisgamesux.net] public warrock trainer";
         this->Load += new System::EventHandler(this, Form1_Load);
         this->ResumeLayout(false);

      }   
   private: System::Void textBox1_TextChanged(System::Object *  sender, System::EventArgs *  e)
          {
          }

private: System::Void Form1_Load(System::Object *  sender, System::EventArgs *  e)
       {
       }

private: System::Void checkBox1_CheckedChanged(System::Object *  sender, System::EventArgs *  e)
       {
          cvar.Spread = !cvar.Spread;
       }

private: System::Void checkBox2_CheckedChanged(System::Object *  sender, System::EventArgs *  e)
       {
          cvar.Recoil = !cvar.Recoil;
       }

private: System::Void checkBox3_CheckedChanged(System::Object *  sender, System::EventArgs *  e)
       {
          cvar.Fall = !cvar.Fall;
       }

private: System::Void checkBox4_CheckedChanged(System::Object *  sender, System::EventArgs *  e)
       {
          cvar.SuperJump = !cvar.SuperJump;
       }

private: System::Void checkBox5_CheckedChanged(System::Object *  sender, System::EventArgs *  e)
       {
          cvar.StaminaHack = !cvar.StaminaHack;
       }

private: System::Void checkBox6_CheckedChanged(System::Object *  sender, System::EventArgs *  e)
       {
          cvar.ZoomHack = !cvar.ZoomHack;
       }

private: System::Void checkBox7_CheckedChanged(System::Object *  sender, System::EventArgs *  e)
       {
          cvar.CrossHair = !cvar.CrossHair;
       }

private: System::Void timer1_Tick(System::Object *  sender, System::EventArgs *  e)
       {
          System::IFormatProvider* iForm;
          double suprJMP = this->textBox1->Text->ToDouble( iForm );
          cvar.fSuperJump = ( float )suprJMP;
          if( GetHandle( ) != 0 && GetPointer( ) != 0 )
          {
            if( cvar.Spread )
            {
               float fSpread = 0.0f;
               memcpy_ex( ( void* )0x92611F, &fSpread, sizeof( float ) );
            }
            if( cvar.Recoil )
            {
               float fRecoil = 0.0f;
               memcpy_ex( ( void* )0x926129, &fRecoil, sizeof( float ) );
            }
            if( cvar.Fall )
            {
               unsigned long ulFall = 0xFFFF4108;
               memcpy_ex( ( void* )( ( GetPointer( ) ) + 0x26E ), &ulFall, sizeof( unsigned long ) );
            }
            if( cvar.SuperJump )
            {
               if( IsKeyPressed( 0x20 ) ) //VK_SPACE
               {
                  memcpy_ex( ( void* )( ( GetPointer( ) ) + 0x180 ), &cvar.fSuperJump, sizeof( float ) );
               }
            }
            if( cvar.StaminaHack )
            {
               unsigned long ulStamina = 1120403456;
               memcpy_ex( ( void* )0x7F1110, &ulStamina, sizeof( unsigned long ) );
            }
            if( cvar.ZoomHack )
            {
               if( IsKeyPressed( 0x2 ) ) //RIGHT CLICK
               {
                  cvar.bFlipZoom = !cvar.bFlipZoom;
               }
               if( cvar.bFlipZoom )
               {
                  char cZoomOn = 1;
                  memcpy_ex( ( void* )0x9260E6, &cZoomOn, sizeof( char ) );
               }
               else
               {
                  char cZoomOff = 0;
                  memcpy_ex( ( void* )0x9260E6, &cZoomOff, sizeof( char ) );
               }
            }
            if( cvar.CrossHair )
            {
               char bCross = 1;
               memcpy_ex( ( void* )0x92610C, &bCross, sizeof( char ) );
            }
          }
       }

private: System::Void button2_Click(System::Object *  sender, System::EventArgs *  e)
       {
           OpenBrowser( "http://community.cheatz.de.tl/" );
       }


};
}


Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Thu Feb 14, 2008 3:52 pm    Post subject: Reply with quote

What's wrong?
_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
FerrisBuellerYourMyHero
Master Cheater
Reputation: 0

Joined: 14 Feb 2007
Posts: 401
Location: Inside your <kernel>

PostPosted: Thu Feb 14, 2008 4:11 pm    Post subject: Reply with quote

what do you mean UD?

you have to explain the problem if you want someone to help lol

we can't read your mind Smile

_________________
You know, life moves pretty fast. If you don't stop and look around once in a while, You could miss it!

Back to top
View user's profile Send private message MSN Messenger
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Thu Feb 14, 2008 4:21 pm    Post subject: Reply with quote

UD probably stands for Undetected since Warrock has cheat protection. (Punkbuster I believe.) I assume he is asking for help getting it undetected.

Strings are the first thing to look at when undetecting something. You have things named "####Hack" like "ZoomHack". That will get you detected off the bat. Basically everything in pVars structure will be detected most likely.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites