Post: [Source/Release] Forge Mode
11-10-2014, 01:01 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); All credits go to xCSBKx for his original MW3 Forge Mode function.
I ported this to AW today. I know it isn't that hard to do, but some people don't have the knowledge to do it themselves. This isn't here to be copy-pasted (which I know it will), but to be learned from so you can create cool stuff yourselves!

This teleports the nearest player to your crosshair and moves them around. This isn't an advanced forgemode to pickup any entity. Tested with TMAPI without problems.


Offsets required, these are easily updated for future updates:

    
public static UInt32
G_Client = 0x01905300,
G_ClientSize = 0x4180,
Client_mFlag = G_Client + 0x3da7,
Client_Angles = G_Client + 0x01b4,
Client_Origin = G_Client + 0x0078;



Forge Mode function:

    
public static float[] distances = new float[18];


public class ForgeMode
{
public static void ForgeMode(uint Client, uint Target, uint Distance_in_Meters = 6)
{
float[] Angles = ReadFloatLength(Client_Angles + (Client * G_ClientSize), 2);
float[] Origin = ReadFloatLength(Client_Origin + (Client * G_ClientSize), 3);

float diff = Distance_in_Meters * 40;

float num = ((float)Math.Sin((Angles[0] * Math.PI) / 180)) * diff;
float num1 = (float)Math.Sqrt(((diff * diff) - (num * num)));
float num2 = ((float)Math.Sin((Angles[1] * Math.PI) / 180)) * num1;
float num3 = ((float)Math.Cos((Angles[1] * Math.PI) / 180)) * num1;
float[] forward = new float[] { Origin[0] + num3, Origin[1] + num2, Origin[2] - num };

Freeze(Target, true);
WriteFloatArray(Client_Origin + (Target * G_ClientSize), forward);
}

public static uint FindClosestEnemy(uint Attacker)
{
for (uint i = 0; i < 18; i++)
{
if (IsClientAlive(i))
{
float[] O1 = ReadFloatLength(Client_Origin + (Attacker * G_ClientSize), 3);
float[] O2 = ReadFloatLength(Client_Origin + (i * G_ClientSize), 3);
distances[i] = (float)(Math.Sqrt(((O2[0] - O1[0]) * (O2[0] - O1[0])) + ((O2[1] - O1[1]) * (O2[1] - O1[1])) + ((O2[2] - O1[2]) * (O2[2] - O1[2]))));

}
else
{
distances[i] = float.MaxValue;
}
}

float[] newDistances = new float[18];
Array.Copy(distances, newDistances, distances.Length);

Array.Sort(newDistances);
for (uint i = 0; i < 18; i++)
{
if (distances[i] == newDistances[1])
{
return i;
}
}
int Failed = -1;
return (uint)Failed;
}
}



You also need these functions:

    
public static void WriteFloatArray(uint Offset, float[] Array)
{
byte[] buffer = new byte[Array.Length * 4];
for (int Lenght = 0; Lenght < Array.Length; Lenght++)
{
ReverseBytes(BitConverter.GetBytes(Array[Lenght])).CopyTo(buffer, Lenght * 4);
}
PS3.SetMemory(Offset, buffer);
}

public static float[] ReadFloatLength(uint Offset, int Length)
{
byte[] buffer = new byte[Length * 4];
PS3.GetMemory(Offset, buffer);
ReverseBytes(buffer);
float[] Array = new float[Length];
for (int i = 0; i < Length; i++)
{
Array[i] = BitConverter.ToSingle(buffer, (Length - 1 - i) * 4);
}
return Array;
}

public static void Freeze(uint Client, bool State)
{
if (State == true)
PS3.Extension.WriteByte(Client_mFlag + (Client * G_ClientSize), 0x05);
else
PS3.Extension.WriteByte(Client_mFlag + (Client * G_ClientSize), 0x00);
}

private static byte[] ReverseBytes(byte[] inArray)
{
Array.Reverse(inArray);
return inArray;
}

public static bool IsClientAlive(uint Client)
{
byte Alive = PS3.Extension.ReadByte(0x1815300 + (Client*0x280) + 0x1AF);
if(Alive != 0)
return true;
else
return false;
}



How to use:

Call this on a timer:

    
public void monitorForgemode()
{
uint Enemy = Aimbot_Forgemode.FindClosestEnemy(0); //0 is the client using it.

if (ButtonMonitoring.ButtonPressed(0, ButtonMonitoring.Buttons.L1)) //any buttonmonitoring you want
{
Freeze(Enemy, true);
ForgeMode.ForgeMode(0, Enemy);
}
else
{
Freeze(Enemy, false);
}
}



You must login or register to view this content.
Last edited by Joren ; 11-10-2014 at 03:58 PM.

The following 14 users say thank you to Joren for this useful post:

ALI ALHILFI, Bad Luck Brian, Boliberrys, bymelasuda, EG6, Welsh, MrToxlcBooty, NotALegitPlayer, RGaming, Synergy, Thirst, xCSBKx, xDebugKiller, zRayz-

The following 3 users groaned at Joren for this awful post:

One, OLDSCHOOLMODZHD
11-10-2014, 07:14 PM #11
nice!
11-10-2014, 07:15 PM #12
Just GYFDO
11-10-2014, 09:08 PM #13
Jannik007
Do a barrel roll!
Originally posted by xJoren View Post
"This teleports the nearest player to your crosshair and moves them around. This isn't an advanced forgemode to pickup any entity" What


I'm sorry. Didn't read the details :P

The following user thanked Jannik007 for this useful post:

Joren
11-16-2014, 08:51 PM #14
xCLS
Do a barrel roll!
Thank You
11-17-2014, 04:27 PM #15
update 1.03?
11-17-2014, 04:49 PM #16
Originally posted by bymelasuda View Post
update 1.03?


0x01905900 - G_Client
0x4180 - G_client Size

Copyright © 2025, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo