Warrock - Code Snippets

08/02/2012 05:39 scraprecon#91
Can anyone give me source to WORKING patch and restore class for unlimited ammo (thats what Im using it for) and show example on using it . Thanks :)

Quote:
//====================== [Walk Through Walls] ======================//
{
if ( GetAsyncKeyState ( VK_DOWN ))
{
*(float*)( ADR_MEM_WTW ) = -999;
}
if ( GetAsyncKeyState ( VK_UP ))
{
*(float*)( ADR_MEM_WTW ) = 6;
}
}
08/02/2012 09:22 __BuRn3R#92
Unlimited Ammo:

[Only registered and activated users can see links. Click Here To Register...]
08/03/2012 07:05 scraprecon#93
Could you give me the same class you used for that unlimited ammo source or just link me to it , Thanks very much :)

Also: I need working struct for OPK and if you can the Player OPK function using those structs , thanks :)

Quote:
//====================== [CQC Prone] ======================//
{
if ( Player != 0)
{
if (GetAsyncKeyState ('C'))
{
*(int*)( ADR_CQCPRONE ) = 2;
}
}
}
08/03/2012 11:16 GigaByte™#94
Quote:
Originally Posted by scraprecon View Post
Could you give me the same class you used for that unlimited ammo source or just link me to it , Thanks very much :)

Also: I need working struct for OPK and if you can the Player OPK function using those structs , thanks :)
Have you tried making it yourself? ... There's more C&P every day. This game is so dead now...
08/03/2012 13:23 scraprecon#95
I don't try to c & p. when someone shows me code I study it and try to make the code shorter and easier or just study it and learn what the code is actually doing :)
08/03/2012 13:50 xRoute66x#96
Quote:
Originally Posted by scraprecon View Post
I don't try to c & p. when someone shows me code I study it and try to make the code shorter and easier or just study it and learn what the code is actually doing :)
Haha xD

Code:
{
if ( Player != 0)
{
if (GetAsyncKeyState ('C'))
{
*(int*)( ADR_CQCPRONE ) = 2;
}
}
}
It is not realy short :o
Code:
if (CH_CQCProne)
{
*(int*)( ADR_CQCPRONE ) = 2;
}
08/03/2012 14:31 Angel-Piece#97
Quote:
Originally Posted by xroute66x™ :) View Post
Haha xD

Code:
{
if ( Player != 0)
{
if (GetAsyncKeyState ('C'))
{
*(int*)( ADR_CQCPRONE ) = 2;
}
}
}
It is not realy short :o
Code:
if (CH_CQCProne)
{
*(int*)( ADR_CQCPRONE ) = 3;
}
dein code ist auch nicht gerade kurz wozu machst du die { } ?

du kannst es direkt so machen:


Code:
if (CH_CQCProne) 
     *(int*)( ADR_CQCPRONE ) = 3;
08/04/2012 03:00 Kazbah__#98
3D Boxes(not the same as underscore have):

[Only registered and activated users can see links. Click Here To Register...]

Credits: Kazbah
08/04/2012 16:15 Angel-Piece#99
Quote:
Originally Posted by SiiKSiiNz View Post
3D Boxes(not the same as underscore have):

[Only registered and activated users can see links. Click Here To Register...]

Credits: Kazbah
warum so unnötig lang?



Code:
D3DCOLOR EspBoxColor (pInfo->team == 0 ? Yellow : Green);

if (GetDistance(p_Player2->pLocal, pPlayer)/10 > 110 )// 65
{
          menu.DrawBorder(EspView.x - 10, EspView.y - 30, 20, 30, 1, EspBoxColor , pDevice);
          menu.DrawBorder(EspView.x - 0, EspView.y - 40, 20, 30, 1, EspBoxColor , pDevice);
          menu.DrawLine(EspView.x - 10, EspView.y - 30, EspView.x - 0, EspView.y - 40, EspBoxColor , pDevice);
                  menu.DrawLine(EspView.x + 10, EspView.y - 30, EspView.x + 20, EspView.y - 40, EspBoxColor , pDevice);
                  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                  menu.DrawLine(EspView.x - 9, EspView.y - 2, EspView.x + 1, EspView.y - 12, EspBoxColor , pDevice);
                  menu.DrawLine(EspView.x + 10, EspView.y - 2, EspView.x + 20, EspView.y - 12, EspBoxColor , pDevice);
}
else if (GetDistance(p_Player2->pLocal, pPlayer)/10 > 65 )// 65
{
          menu.DrawBorder(EspView.x - 40, EspView.y - 70, 60, 80, 1, EspBoxColor , pDevice);
          menu.DrawBorder(EspView.x - 30, EspView.y - 80, 60, 80, 1, EspBoxColor , pDevice);
          menu.DrawLine(EspView.x - 40, EspView.y - 70, EspView.x - 30, EspView.y - 80, EspBoxColor , pDevice);
                  menu.DrawLine(EspView.x + 20, EspView.y - 70, EspView.x + 30, EspView.y - 80, EspBoxColor , pDevice);
                  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                  menu.DrawLine(EspView.x - 40, EspView.y + 9, EspView.x - 30, EspView.y - 1, EspBoxColor , pDevice);
                  menu.DrawLine(EspView.x + 20, EspView.y + 9, EspView.x + 30, EspView.y - 1, EspBoxColor , pDevice);
}
else if (GetDistance(p_Player2->pLocal, pPlayer)/10 > 0 )
{
          menu.DrawBorder(EspView.x - 40, EspView.y - 100, 90, 130, 1, EspBoxColor , pDevice);
          menu.DrawBorder(EspView.x - 30, EspView.y - 110, 90, 130, 1, EspBoxColor , pDevice);
          menu.DrawLine(EspView.x - 40, EspView.y - 100, EspView.x - 30, EspView.y - 110, EspBoxColor , pDevice);//Oben Links
                  menu.DrawLine(EspView.x + 50, EspView.y - 100, EspView.x + 60, EspView.y - 110, EspBoxColor , pDevice);//Oben Rechts
                  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                  menu.DrawLine(EspView.x - 40, EspView.y + 28, EspView.x - 30, EspView.y + 18, EspBoxColor , pDevice);//Unten Links
                  menu.DrawLine(EspView.x + 50, EspView.y + 28, EspView.x + 60, EspView.y + 18, EspBoxColor , pDevice);//Unten Rechts
}

so ist der code schonmal halb so groß man kann ihn noch kürzer machen indem man die checks (distance checks) vereinfacht aber keine lust euch das auch noch zu erklären
08/04/2012 16:36 Raz9r#100
Das ist doch eh unnötig kompliziert mit euren Versuchen, die Boxen 3D erscheinen zu lassen. Ihr müsst die Winkel berechnen, wie der Gegner zu euch steht und wie er gedreht ist. Dazu braucht ihr eure eigenen Rotationswinkel, die des Gegners und die, die ihr haben müsstet, um auf den Gegner zu schauen und umgekehrt.
Wenn man diese 4 besitzt, ist es kein Kunststück mit trigonometrischen Funktionen eine bestimmte eindimensionale Länge (davon gibt es natürlich drei, also die Breite, Höhe und Länge des Spielermodells) mit einem von diesen Winkeln abhängigen Faktor zwischen 0 und 1 darzustellen.
Steht der Gegner so, dass die Breite in voller Länge zu sehen ist (gleiche Höhe des Gegners, exakt 90° zu euch gedreht), so muss der berechnete Faktor exakt 1 für die Breite und exakt 0 für die Länge sein. Ähnlich verhält sich das mit der Höhe, wenn das ganze auch etwas komplizierter ist.

Das Ganze lässt sich in weniger als 50 Zeilen Code realisieren und ist zwar komplizierter als eure nach Entfernung abschätzende Methode, dafür aber effizienter und vor allem exakt in der Darstellung.
08/05/2012 12:10 UnknownData#101
VMT Hook:

Code:
DWORD OFS_DEVICEPOINTER = FindPattern((PBYTE)"\x8B\x80\x00\x00\x00\x00\x8B\x08\x50\xFF\x91\x00\x00\x00\x00\x33\xC0\xC0",xx????xxxxx????xxx",2,true);
DWORD ADR_DEVICEPOINTER = FindPattern((PBYTE)"\x05\x00\x00\x00\x00\x56\x8B\xF0\xE8\x00\x00\x00\x00\x81\xC6,"x????xxxx????xx",1,true);

DWORD WarRockDevice (int index)
{
        if ( !ADR_DEVICEPOINTER) return 0;
        DWORD dwDevicePointer = *(DWORD*)ADR_DEVICEPOINTER;
        if(!dwDevicePointer) return 0;
        
        DWORD dwDeviceAddress = *(DWORD*)(dwDevicePointer + OFS_DEVICEPOINTER );
        if(!dwDeviceAddress) return 0;
        dwDeviceAddress = *(DWORD*)dwDeviceAddress;

        if(!dwDeviceAddress) return 0;
        return dwDeviceAddress + (4*index);
}

#define  VMTInitialize(name, index)\
        DWORD dw##name##1 = WarRockDevice (index);\
        if(*(DWORD*)dw##name##1 != (DWORD)&n##name && dw##name##1 != NULL)\
{\
         p##name = (name##_t) *(DWORD*)dw##name##1;\
        *(DWORD*)dw##name##1 = (DWORD)&n##name;\
}


void __stdcall DirectX9Hook (  )
{

                 bool Ready = false;
                 while(true) 
                 {
                       Ready = WarRockDevice( 0 ) > 0;
                         if( Ready )
                         {
                                 VMTInitialize(myReset,16);
                                 VMTInitialize(myPresent,17);
                                 //Add ur DIP Here
                         }   
                         Sleep(300);
                 }

}
08/05/2012 21:58 jeffrey1994#102
I'm looking for:
- quick plant + defuse code
- plant + defuse anywhere
08/05/2012 22:20 xRoute66x#103
Quote:
Originally Posted by jeffrey1994 View Post
I'm looking for:
- quick plant + defuse code
- plant + defuse anywhere
[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]

Ich bin mir nicht 100% sicher ob sie richtig sind, ich habe sie ausm Kopf.

Credits: keine Ahnung
08/05/2012 23:19 .SiroSkill'#104
Auto Ammo/Medic pls
08/05/2012 23:57 Raz9r#105
Quote:
Originally Posted by .SiroSkill' View Post
Auto Ammo/Medic pls
Hook die Funktion send aus der ws2api und finde das Packet, welches gesendet wird, wenn man das Medic Kit benutzt. Sende dieses Packet dann regelmäßig selbst durch aufrufen der Funktion send. Socket etc. sind so ebenfalls leicht zu erhalten.