View Full Version : Winchester Code Help
shocky
12-14-2007, 05:09 PM
if somone could post the timer code, and the button code for thge winchester with the hotkey set to 6 i would really appreciate it.
Thanks
wr194t
12-14-2007, 05:22 PM
case TIMERNAMEHERE: //Timer name for Winchester + hotkey.
{
if (GetKeyState(VK_KEYHERE)&1)
{
WritePointerLong(0x12C8520, 0x4C, 42);
}
}
break;
ganglyman21
12-14-2007, 06:34 PM
I've tried this, and it doesn't seem to work for me. I've had to resort to buttons,
void CDanDlg::SHOTGUNBUTTON()
{
WPL-func-here(0x12C8520, 0x4C, 42);
}
but thats just me rarely use it, tried many ways for hot keys but failed miserably
wr194t
12-14-2007, 06:37 PM
In your WritePointerFloat function code did you change float value to long value?:
void WritePointerFloat(long addy, short offset, long value)
{
long maddy;
long saddy;
memory();
ReadProcessMemory(hProcess, (LPVOID*)(DWORD) addy, &maddy, sizeof(maddy), NULL);
saddy = maddy + offset;
WriteProcessMemory(hProcess, (LPVOID*)(DWORD) saddy, &value, sizeof(value), NULL);
}
ganglyman21
12-14-2007, 06:45 PM
Me personally yes. works as I posted above, however the help you gave me on hotkeys, I couldn't implement. I want key 5+6 to be winschester and flash bangs, but can make it work no matter what I try so given up. As I say not important.
Only real thing I want that I dont have is ESP addy, but I don't expect it. I make do with my glass/no fog/full bright code with boxes it works alright, is no esp but bettter by far than nothing ;D
shocky
12-14-2007, 10:10 PM
please spot the exact hotkey for the numeber 6 key not in num pad please somone VK_KEY6 dident work, and please post how to make winchester a 1 button so that it turns on and off from clicking once on that hotkey.
Thanks
wr194t
12-15-2007, 06:03 AM
please spot the exact hotkey for the numeber 6 key not in num pad please somone VK_KEY6 dident work, and please post how to make winchester a 1 button so that it turns on and off from clicking once on that hotkey.
ThanksVK_36 .
shocky
12-15-2007, 07:33 AM
VK_36 .
that doesent work it says error C2065: 'VK_36' : undeclared identifier
ganglyman21
12-15-2007, 09:37 AM
just use "36" not "VK_36" thats what u need ;D
shocky
12-15-2007, 11:18 AM
now the winchester dont work..
wr194t
12-15-2007, 11:39 AM
now the winchester dont work..In your coding search for:
SetIcon(m_hIcon, FALSE);
Under that paste:
SetTimer(TIMERHERE,1,NULL);
zezima
12-15-2007, 01:50 PM
In your coding search for:
SetIcon(m_hIcon, FALSE);
Under that paste:
SetTimer(TIMERHERE,1,NULL);
thank you very much! helped me
matthijs289
12-30-2007, 09:40 AM
EY , i am new in C++ and i want to make my shoty code but it doesnt work i has read this al but i dont realt get it...:o can somebody help me:rolleyes:
wr194t
12-30-2007, 09:56 AM
EY , i am new in C++ and i want to make my shoty code but it doesnt work i has read this al but i dont realt get it...:o can somebody help me:rolleyes:Make sure your WritePointerFloat function's value is long (I would copy & paste your original WritePointerFloat function code, and just change float to long):
void WritePointerFloat(long addy, short offset, long value)
{
long maddy;
long saddy;
memory();
ReadProcessMemory(hProcess, (LPVOID*)(DWORD) addy, &maddy, sizeof(maddy), NULL);
saddy = maddy + offset;
WriteProcessMemory(hProcess, (LPVOID*)(DWORD) saddy, &value, sizeof(value), NULL);
}
And your Winchester code should look like this:
WritePointerFloat(0x12A8560, 0x4C, 42);
That goes in a button.
matthijs289
12-31-2007, 08:18 AM
oke first question:
where i need to place the first code? and the second:
i get this errors when i want to make it:
error C2065: 'memory' : undeclared identifier
J:C++ hack WRShotgun hack 1Shotgun hack 1Dlg.cpp(178) : error C2065: 'hProcess' : undeclared identifier
this is all the code what i can find:
// Shotgun hack 1Dlg.cpp : implementation file
//
#include "stdafx.h"
#include "Shotgun hack 1.h"
#include "Shotgun hack 1Dlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About
class CAboutDlg : public CDialog
{
public:
CAboutDlg();
// Dialog Data
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_ABOUTBOX };
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAboutDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
//{{AFX_MSG(CAboutDlg)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAboutDlg)
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
// No message handlers
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CShotgunhack1Dlg dialog
CShotgunhack1Dlg::CShotgunhack1Dlg(CWnd* pParent /*=NULL*/)
: CDialog(CShotgunhack1Dlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CShotgunhack1Dlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
void CShotgunhack1Dlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CShotgunhack1Dlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CShotgunhack1Dlg, CDialog)
//{{AFX_MSG_MAP(CShotgunhack1Dlg)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_BN_CLICKED(IDC_BUTTON1, OnShotgunOn)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CShotgunhack1Dlg message handlers
BOOL CShotgunhack1Dlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Add "About..." menu item to system menu.
// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
CString strAboutMenu;
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
return TRUE; // return TRUE unless you set the focus to a control
}
void CShotgunhack1Dlg::OnSysCommand(UINT nID, LPARAM lParam)
{
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
{
CAboutDlg dlgAbout;
dlgAbout.DoModal();
}
else
{
CDialog::OnSysCommand(nID, lParam);
}
}
// If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the document/view model,
// this is automatically done for you by the framework.
void CShotgunhack1Dlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting
SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CDialog::OnPaint();
}
}
// The system calls this to obtain the cursor to display while the user drags
// the minimized window.
HCURSOR CShotgunhack1Dlg::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
}
void WritePointerFloat(long addy, short offset, long value)
{
long maddy;
long saddy;
memory();
ReadProcessMemory(hProcess, (LPVOID*)(DWORD) addy, &maddy, sizeof(maddy), NULL);
saddy = maddy + offset;
WriteProcessMemory(hProcess, (LPVOID*)(DWORD) saddy, &value, sizeof(value), NULL);
}
void CShotgunhack1Dlg::OnShotgunOn()
{
WritePointerFloat(0x12A8560, 0x4C, 42);
}
:D
wr194t
12-31-2007, 10:16 AM
Under #Endif at the top, paste:
DWORD proc_id;
HANDLE hProcess;
void memory()
{
HWND hWnd = FindWindow(0, "WarRock");
GetWindowThreadProcessId(hWnd, &proc_id);
hProcess = OpenProcess(PROCESS_ALL_ACCESS|PROCESS_VM_OPERATIO N|PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_QUERY_I NFORMATION, FALSE, proc_id);
}
And you already have the WritePointerFloat function code, with the hack at the bottom which is fine.
DutchHelFire
12-31-2007, 03:07 PM
lol it needs to be 0x36 then it perfect ;)
Powered by vBulletin® Version 4.1.12 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.