Hey Leute,
ich suche ein InGame Hack Menü mit AutoIT gecodet.
Wäre nett, wenn mir jemand eines anbieten könnte.
MfG
Yevii
ich suche ein InGame Hack Menü mit AutoIT gecodet.
Wäre nett, wenn mir jemand eines anbieten könnte.
MfG
Yevii
#include "stdafx.h"
// Menu
const D3DCOLOR txtBlack = D3DCOLOR_ARGB( 255, 0, 0, 0 );
const D3DCOLOR txtGreen = D3DCOLOR_ARGB( 255, 0, 255, 0 );
const D3DCOLOR txtGray = D3DCOLOR_ARGB( 0, 125, 125, 125 );
const D3DCOLOR txtRed = D3DCOLOR_ARGB( 255, 255, 0, 0 );
const D3DCOLOR txtPink = D3DCOLOR_ARGB( 255, 255, 0, 255 );
const D3DCOLOR txtWeith = D3DCOLOR_ARGB( 0, 255, 255, 255 );
int ShowMenu = 0;
int Is_Credit_on = 1;
int i = 1;
int t = 0;
int Show_Text = 1;
POINT curPos;
LPDIRECT3DTEXTURE9 texturPink;
ButtonStats buttonstats[ Size_of_Menu ] = { };
bool IsCursorOverButton( int X, int Y, int W, int H, int SpacingBuff, int Spacing );
void MenuFunktions( LPDIRECT3DDEVICE9 m_pDevice, ID3DXFont* pFont, D3DPRIMITIVETYPE PrimitiveType, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount, int myStride );
struct MenuData
{
int x;
int y;
int bright;
int withe;
};
MenuData MenuSettings =
{
0,
0,
200,
250
};
struct MenuOpt
{
char* Name;
bool IsMouseOver;
bool Checked;
};
MenuOpt MenuOption[ Size_of_Menu ] = { };
void AddItem( char* OptionName, int Index )
{
MenuOption[ Index ].Name = OptionName;
}
void DrawRect( LPDIRECT3DDEVICE9 Device_t, int X, int Y, int L, int H, D3DCOLOR color )
{
D3DRECT rect = { X, Y, X + L, Y + H };
Device_t->Clear( 1, &rect, D3DCLEAR_TARGET, color, 0, 1 );
}
void DrawMenuFont( ID3DXFont* pFont, int X, int Y, D3DCOLOR Color, char* format )
{
RECT FontRect = { X, Y, X + 120, Y + 16 };
pFont->DrawTextA( NULL, format, -1, &FontRect, DT_NOCLIP , Color );
}
void DrawNonFilledRect( IDirect3DDevice9* dev, int x, int y, int w, int h, DWORD color )
{
DrawRect( dev, x, y, w, 1, color );
DrawRect( dev, x, y, 1, h, color );
DrawRect( dev, x, y + h, w, 1, color );
DrawRect( dev, x + w, y, 1, h, color );
}
void GenetateTex( LPDIRECT3DDEVICE9 Device )
{
GenerateTexture( Device, &texturPink, txtPink );
}
void CreateMenu( LPDIRECT3DDEVICE9 Device, ID3DXFont* Font, D3DPRIMITIVETYPE PrimitiveType, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount, int MyStride )
{
if ( i == 1 )
{
AddItem( "Charms", 0 );
AddItem( "Zoom Hack", 1 );
AddItem( "Swear Filter", 2 );
AddItem( "Credits", 3 );
GenetateTex( Device );
i = 0;
}
if ( GetAsyncKeyState( VK_DELETE ) & 1 )
{
GetCursorPos( &curPos );
MenuSettings.x = curPos.x;
MenuSettings.y = curPos.y;
ShowMenu = !ShowMenu;
}
if ( ShowMenu == 1 )
{
DrawRect( Device, MenuSettings.x - 62, MenuSettings.y, MenuSettings.bright - 98, MenuSettings.withe - 140, txtWeith );
for ( int i = 0; i < Size_of_Menu; i++ )
{
DrawRect( Device, MenuSettings.x, MenuSettings.y + (i * 30), 40, 20, txtGray );
if ( IsCursorOverButton( MenuSettings.x, MenuSettings.y, 40, 20, i, 30 ) )
{
MenuOption[ i ].IsMouseOver = TRUE;
}
else
{
MenuOption[ i ].IsMouseOver = FALSE;
}
if ( MenuOption[ i ].IsMouseOver )
{
if ( GetAsyncKeyState( VK_LBUTTON ) & 1 )
{
MenuOption[ i ].Checked = !MenuOption[ i ].Checked;
}
}
if ( MenuOption[ i ].Checked )
{
DrawMenuFont( Font, MenuSettings.x - 62, MenuSettings.y + ( i * 30 ) + 1, txtBlack, MenuOption[ i ].Name );
DrawMenuFont( Font, MenuSettings.x + 3, MenuSettings.y + ( i * 30 ) + 1, txtGreen, " [ ON ]" );
buttonstats[ i ].IsChecked = TRUE;
}
else
{
DrawMenuFont( Font, MenuSettings.x - 62, MenuSettings.y + ( i * 30 ) + 1, txtBlack, MenuOption[ i ].Name );
DrawMenuFont( Font, MenuSettings.x + 3, MenuSettings.y + ( i * 30 ) + 1, txtRed, "[ OFF ]" );
buttonstats[ i ].IsChecked = FALSE;
}
}
}
MenuFunktions( Device, Font, PrimitiveType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount, MyStride );
}
bool IsCursorOverButton( int X, int Y, int W, int H, int SpacingBuff, int Spacing )
{
GetCursorPos( &curPos );
if( curPos.x >= X && curPos.x <= X + W && curPos.y >= Y + ( SpacingBuff * Spacing ) && curPos.y <= Y + H + ( SpacingBuff * Spacing ) )
{
return TRUE;
}
else
{
return FALSE;
}
}
void MenuFunktions( LPDIRECT3DDEVICE9 m_pDevice, ID3DXFont* pFont, D3DPRIMITIVETYPE PrimitiveType, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount, int myStride )
{
if ( ( buttonstats[ 3 ].IsChecked == TRUE && Is_Credit_on == 1 ) ) // Credits
{
DrawFont( pFont, 420, 1, txtGreen, "An example how to detour D3D functions. Created by yihaaa." );
DrawFont( pFont, 420, 20, txtGreen, "Credits goes to: Twice and Azorbix. Still, and always, coding for fun!" );
Is_Credit_on = 0;
}
else
{
Is_Credit_on = 1;
}
if ( ( buttonstats[ 0 ].IsChecked == TRUE ) ) // Charms
{
if ( myStride == 52 )
{
m_pDevice->SetRenderState( D3DRS_ZENABLE, FALSE );
m_pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_SOLID );
m_pDevice->SetTexture( 0, texturPink );
m_pDevice->DrawIndexedPrimitive( PrimitiveType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
}
}
if ( ( buttonstats[ 1 ].IsChecked == TRUE ) ) // Zoom Hack
{
}
}
#include "stdafx.h"
void CreateMenu( LPDIRECT3DDEVICE9 Device, ID3DXFont* Font, D3DPRIMITIVETYPE PrimitiveType, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount, int myStride );
const int Size_of_Menu = 4;
struct ButtonStats
{
bool IsChecked;
char* Name;
};
Ganz genau, es flimmert, das ist normal, wenn du mit GDI über DirectX Anwendungen zeichnen willst. Ohne D3D Hook wirst du kein vernünftiges Ingame Menü hinbekommen, es sei denn, du machst einfach ein unabhängiges Fenster, was die ganze Zeit im Vordergrund ist und Events nach eigenem Verarbeiten an das Spiel weiterleitet, aber das bezeichne ich nicht als Ingame Menü, sondern als völlig idiotische Idee.Quote:
Könnte man das nicht einfach über das Game drüberpixeln?
Hab was mit WinAPI probiert.
Es hat auch teilweise geklappt.
Teilweise deshalb, weil das ganze flimmert.
Das hier habe ich im autoitbot Forum gefunden:
Das alles wurde mit AutoIT geschrieben.
Es muss also möglich sein.
Addet mich mal in Skype, würde gerne mal erfahren wie das ganze funktioniert.
@yihaaa
Leider kann ich mit C++ nichts anfangen :-)
Wenn du mir das ganze aber zeigen könntest, wäre ich sehr dankabar.
Klar geht das.Quote:
da du mit AutoIt keine DLL Injecten kannst
Quote:
Wer sagt denn dass ingame Menüs zwingend als dll gecodet werden müssen???
Und das mit dem flimmern, liegt daran, dass die gui höchstwahrscheinlich in einer schleife ist.
Dass kann man aber beheben, indem man z.B. die gui "aktualisierung" in jede funktion setzt.
Z.B. hotkeyset insert, dann in die funktion die gui aktualisieren, und aufblenden.
Bei hotkeys wie left,right etc, das selbe nur eben ohne die gui zu schließen/öffnen.
@Yevii
könntest du mir vll den source geben? Würde mich mal Interessieren ob ich mit meiner meinung richtig liege