Parsing

GhostsTU8Lib

Feb 19th, 2014
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 22.16 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using XDevkit;
  7. using System.Runtime.InteropServices;
  8. using XRPCLib;
  9. using XRPCPlusPlus;
  10. using XDevkitPlusPlus;
  11.  
  12. namespace GhostsTU7ClassLib
  13.  {
  14.    
  15.     public class Tu8Offsets
  16.     {
  17.         public static uint ChromePlayers = 0x82659F2B; //TU8
  18.         public static uint Recoil = 0x822BAE9C; //tu8
  19.         public static uint Ammo = 0x8223A0E8; //tu8
  20.         public static uint AdvUAV = 0x82257003; // tu8
  21.         public static uint FallDamage = 0x82222780; // tu8
  22.         public static uint JumpValue = 0x820157B4; //tu8
  23.         public static uint RedBoxes = 0x8225ED6C;//tu8
  24.         public static uint Laser = 0x82270DEB; // tu8
  25.         public static uint G_GivePlayerWeapon = 0x8241FFD8; //TU8
  26.         public static uint G_GetWeaponIndexForName = 0x8223BF28;//TU8
  27.         public static uint Automatic = 0x8224A03C; // tu8
  28.         public static uint SV_GameSendServerCommand = 0x824C2764;//TU8
  29.         public static uint SV_SetConfigstring = 0x824C4E58;//tu8
  30.         public static uint CBuf = 0x82439B90;//TU8
  31.         public static uint HudElem_Alloc = 0x823DA550; //TU8
  32.         public static uint MaterialIndex = 0x821556E0;//TU8
  33.         public static uint LocalisedStringIndex = 0x82157920;//TU8
  34.        
  35.     }
  36.    
  37.     public class Tu8Stats
  38.     {
  39.         public static uint Entry = 0x834EDDA4;
  40.         public static uint Deaths = 0x5D;
  41.         public static uint Suicides = 0x9A;
  42.         public static uint Kills = 0x85;
  43.         public static uint KillStreaks = 0x89;
  44.         public static uint GamePlayed = 0x75;
  45.         public static uint Losses = 0x8D;
  46.         public static uint Wins = 0xD6;
  47.         public static uint Score = 0xAE;
  48.         public static uint TimePlayed = 0xCA;
  49.         public static uint Hits = 0x6D;
  50.         public static uint Misses = 0x92;
  51.         public static uint SquadPoints = 0x4C30;
  52.         public static uint Prestige = 0x4F28;
  53.         public static uint RankXP = 0x9A;
  54.         public static uint PerSquadPlayer = 0x564;
  55.  
  56.     }
  57.     public class FPSOffsets
  58.     {
  59.         public static uint FPS = 0x82526C1C;//TU8
  60.         public static uint TextSize = 0x82000B58;//ti7
  61.         public static uint TextColor = 0x8204C2CC;//tu7
  62.         public static uint TextPos1 = 0x82002890;//tu7
  63.         public static uint TextPos2 = 0x8201B028;//tu7
  64.         public static uint Text = 0x82049CFC;//TU8
  65.  
  66.     }
  67.     public class ButtonMonitoring
  68.     {
  69.         public static int
  70.             DPAD_Right = 0x17,
  71.             DPAD_Left = 0x16,
  72.             DPAD_Down = 0x15,
  73.             DPAD_Up = 0x14,
  74.             Right_Trigger = 0x13,
  75.             Left_Trigger = 0x12,
  76.             Right_Bumper = 0x06,
  77.             Left_Bumper = 0x05,
  78.             Back_Button = 0x0F,
  79.             Start_Button = 0x0E,
  80.             Left_Stick = 0x10,
  81.             Right_Stick = 0x11,
  82.             A = 0x01,
  83.             B = 0x02,
  84.             X = 0x03,
  85.             Y = 0x04;
  86.     }
  87.  
  88.     public class TextSpawnging
  89.     {
  90.        
  91.         public class FPS
  92.         {
  93.             public void EnableFPS(bool enabled, XRPC Tex)
  94.             {
  95.                 if (enabled)
  96.                 {
  97.                     Tex.WriteByte(FPSOffsets.FPS, 0x40);
  98.                 }
  99.                 else
  100.                 {
  101.                     Tex.WriteByte(FPSOffsets.FPS, 0x41);
  102.                 }
  103.             }
  104.             public void TextPositionX(float X, XRPC Tex)
  105.             {
  106.                 Tex.WriteFloat(FPSOffsets.TextPos1, X);
  107.             }
  108.             public void TextPostionY(float Y, XRPC Tex)
  109.             {
  110.                 Tex.WriteFloat(FPSOffsets.TextPos2, Y);
  111.             }
  112.             public void ClearFPSText(XRPC Tex)
  113.             {
  114.                Tex.SetMemory(FPSOffsets.Text, new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
  115.             }
  116.             public void SpawnFPSText(string str, XRPC Tex)
  117.             {
  118.                Tex.SetMemory(FPSOffsets.Text, Encoding.ASCII.GetBytes(str));
  119.             }
  120.         }
  121.  
  122.         public class HudElems
  123.         {
  124.  
  125.     }
  126.            
  127.     }
  128.     public class Position
  129.     {
  130.         //public  XRPC Pos = new XRPC();
  131.         public float x;
  132.         public float y;
  133.         public float z;
  134.  
  135.         public uint PlayerState(int clientNum)
  136.         {
  137.             return (uint)(0x8328F100 + (clientNum * 0x3600));
  138.         }
  139.         public void GetOrigin(int client, XRPC Pos)
  140.         {
  141.             x = Pos.ReadFloat(PlayerState(client) + 0x1C);
  142.             y = Pos.ReadFloat(PlayerState(client) + 0x20);
  143.             z = Pos.ReadFloat(PlayerState(client) + 0x24);
  144.         }
  145.         public void SetOrigin(int client, float Ypos, float Xpos, float Zpos, XRPC Pos)
  146.         {
  147.             Pos.WriteFloat(PlayerState(client) + 0x1C, Xpos);
  148.             Pos.WriteFloat(PlayerState(client) + 0x20, Ypos);
  149.             Pos.WriteFloat(PlayerState(client) + 0x24, Zpos);
  150.         }
  151.         public void TeleportTo(int client, XRPC Console)
  152.         {
  153.             for (int i = 0; i < 18; i++)
  154.             {
  155.                 GetOrigin(client, Console);
  156.                 SetOrigin(i, x, y, z, Console);
  157.             }
  158.          }
  159.    
  160.     }
  161.     public class GameFunctions
  162.     {
  163.         //public XRPC GF = new XRPC();
  164.  
  165.         public void SV_GameSendServerCommand(int client, int t, string command, XRPC GF)
  166.         {
  167.             GF.Call(Tu8Offsets.SV_GameSendServerCommand, new object[] { client, t, command });
  168.         }
  169.         public void CommandBuffer_AddText(int client, string command, XRPC GF)
  170.         {
  171.             if (client == -1)
  172.              for (int i = 0; i < 4; i++)
  173.                 {
  174.                     GF.Call(Tu8Offsets.CBuf, new object[] { i, command });
  175.                 }
  176.                 else
  177.                 {
  178.                     GF.Call(Tu8Offsets.CBuf, new object[] { client, command });        
  179.                 }
  180.         }
  181.      }
  182.     public class SV_GameSendSeverCommand_Examples
  183.     {
  184.         public void KillfeedText(int client, string text, XRPC Console)
  185.         {
  186.            new GameFunctions().SV_GameSendServerCommand(client, 0, "e\"" + text + "\"", Console);
  187.         }
  188.         public void CenteredText(int client, string text, XRPC Console)
  189.         {
  190.            new GameFunctions().SV_GameSendServerCommand(client, 0, "f\"" + text + "\"", Console);
  191.         }
  192.         public void SetVision(int client, string vision, XRPC Console)
  193.         {
  194.             new GameFunctions().SV_GameSendServerCommand(client, 0, "J \"" + vision + "\"", Console);
  195.         }
  196.         public void KickClient(int client, string message, XRPC Console)
  197.         {
  198.             new GameFunctions().SV_GameSendServerCommand(client, 0, "r \"" + message + "\"", Console);
  199.         }
  200.  
  201.     }
  202.     public class CBuf_Examples
  203.     {
  204.         public void SendXp(int client, XRPC Console)
  205.         {
  206.             new GameFunctions().CommandBuffer_AddText(client, "set scr_dom_score_kill \"251600\"", Console);
  207.             new GameFunctions().CommandBuffer_AddText(client, "set scr_dom_scorelimit \"50000\"", Console);
  208.             new GameFunctions().CommandBuffer_AddText(client, "set scr_war_score_kill \"251600\"", Console);
  209.             new GameFunctions().CommandBuffer_AddText(client, "set scr_sr_score_kill \"251600\"", Console);
  210.             new GameFunctions().CommandBuffer_AddText(client, "set scr_conf_score_kill \"251600\"", Console);
  211.         }
  212.         public void ForceHost(XRPC Console)
  213.         {
  214.             new GameFunctions().CommandBuffer_AddText(-1, "set party_minplayers \"1\"", Console);
  215.             new GameFunctions().CommandBuffer_AddText(-1, "set hostmigration \"0\"", Console);
  216.             new GameFunctions().CommandBuffer_AddText(-1, "set host \"1\"", Console);
  217.             new GameFunctions().CommandBuffer_AddText(-1, "set migration_timeBetween \"30000\"", Console);
  218.             new GameFunctions().CommandBuffer_AddText(-1, "set migration_msgtimeout \"500\"", Console);
  219.             new GameFunctions().CommandBuffer_AddText(-1, "set badhost_maxHappyPingTime \"400\"", Console );
  220.         }
  221.         public void SetDvar_(int client, string Dvar, XRPC Console)
  222.         {
  223.             new GameFunctions().CommandBuffer_AddText(client, Dvar, Console);
  224.             /* Example :
  225.              * CBuf_Examples(0, "r_znear 99");
  226.              * Dont use "set "
  227.              *
  228.             */
  229.         }
  230.  
  231.    
  232.     }    
  233.     public class OffXex
  234.     {
  235.         private static XRPC Xex;
  236.         public void JumpHeight(float value)
  237.         {
  238.             Xex.WriteFloat(Tu8Offsets.JumpValue, value);
  239.         }
  240.         public void ChromePlayer(bool enabled)
  241.         {
  242.             if (enabled)
  243.             {
  244.                Xex.SetMemory(Tu8Offsets.ChromePlayers, new byte[]{ 0x01});
  245.             }
  246.             else
  247.             {
  248.                 Xex.SetMemory(Tu8Offsets.ChromePlayers, new byte[] { 0x00 });
  249.             }
  250.         }
  251.         public void NoFallDamage(float value)
  252.         {
  253.             Xex.WriteFloat(Tu8Offsets.FallDamage, value);
  254.         }
  255.         public void AdvancedUAV(bool enabled)
  256.         {
  257.             if (enabled)
  258.             {
  259.                 Xex.SetMemory(Tu8Offsets.AdvUAV, new byte[] { 0x01 });
  260.             }
  261.             else
  262.             {
  263.                 Xex.SetMemory(Tu8Offsets.AdvUAV, new byte[] { 0x00 });
  264.             }
  265.         }
  266.         public void Laser(bool enabled)
  267.         {
  268.             if (enabled)
  269.             {
  270.                 Xex.SetMemory(Tu8Offsets.Laser, new byte[] { 0x01 });
  271.             }
  272.             else
  273.             {
  274.                 Xex.SetMemory(Tu8Offsets.Laser, new byte[] { 0x00 });
  275.             }
  276.         }
  277.         public void UnlimitedAmmo(bool enabled)
  278.         {
  279.             if (enabled)
  280.             {
  281.                 Xex.SetMemory(Tu8Offsets.Ammo, new byte[] { 0x05 });
  282.             }
  283.             else
  284.             {
  285.                 Xex.SetMemory(Tu8Offsets.Ammo, new byte[] { 0x01 });
  286.             }
  287.         }
  288.         public void NoRecoil(bool enabled)
  289.         {
  290.             if (enabled)
  291.             {
  292.                 Xex.SetMemory(Tu8Offsets.Recoil, new byte[] { 0x60, 0x00, 0x00, 0x00 });
  293.             }
  294.             else
  295.             {
  296.                 Xex.SetMemory(Tu8Offsets.Recoil, new byte[] { 0x41, 0x9A, 0x00, 0x0C });
  297.             }
  298.         }
  299.        public void FullyAutomatic(bool enabled)
  300.        {
  301.            if(enabled)
  302.            {
  303.                Xex.SetMemory(Tu8Offsets.Automatic, new byte[] { 0x41 });
  304.            }        
  305.            else
  306.            {
  307.                Xex.SetMemory(Tu8Offsets.Automatic, new byte[] { 0x4B });
  308.            }
  309.        }
  310.        public void RedBox(bool enabled)
  311.        {
  312.            if (enabled)
  313.            {
  314.                Xex.SetMemory(Tu8Offsets.RedBoxes, new byte[] { 0x40 });
  315.            }
  316.            else
  317.            {
  318.                Xex.SetMemory(Tu8Offsets.RedBoxes, new byte[] { 0x41 });
  319.            }
  320.        }
  321.     }
  322.     public class P_State
  323.     {
  324.         private static XRPC Pars;
  325.         public uint getPlayerState(int clientNum)
  326.         {
  327.             return (uint)(0x8328F100 + (clientNum * 0x3600)); // tu8
  328.         }
  329.         public uint client_s(uint Client)
  330.         {
  331.             return (uint)(0x83987680 + 0x207E90) + (Client * 0x6C600);
  332.         }
  333.         public uint gEntity(int clientNum)
  334.         {
  335.             return (uint)(0x83306580 + (clientNum * 0x280)); // tu8
  336.         }
  337.         public uint ButtonPressed(int p)
  338.         {
  339.             return Pars.ReadUInt32(getPlayerState(p) + 0x568C);
  340.         }
  341.         public void GodMode(int client, bool enabled)
  342.         {
  343.             if (enabled)
  344.             {
  345.                 Pars.WriteInt32(getPlayerState(client) + 0x18, 0x1);
  346.             }
  347.             else
  348.             {
  349.                 Pars.WriteInt32(getPlayerState(client) + 0x18, ~0x1);
  350.             }
  351.         }
  352.         public void Invisible(int client, bool enabled)
  353.         {
  354.             if (enabled)
  355.             {
  356.                 Pars.AND_Int32(getPlayerState(client) + 0x124, 0x32);
  357.             }
  358.             else
  359.             {
  360.                 Pars.AND_Int32(getPlayerState(client) + 0x124, ~0x32);
  361.             }
  362.  
  363.  
  364.         }
  365.         public void setSpread(int Client, uint Spread)
  366.         {
  367.             Pars.WriteUInt32(getPlayerState(Client) + 0x430, Spread);
  368.             Pars.WriteUInt32(getPlayerState(Client) + 0x434, 2);
  369.         }
  370.         public void ThirdPerson(int client, bool enabled)
  371.         {
  372.             if (enabled)
  373.             {
  374.                 Pars.WriteUInt32(getPlayerState(client) + 0x10, 0x2);
  375.             }
  376.             else
  377.             {
  378.                 Pars.WriteUInt32(getPlayerState(client) + 0x10, 0x0);
  379.             }
  380.         }
  381.         public void Laser(int client, bool enabled)
  382.         {
  383.             if (enabled)
  384.             {
  385.                 Pars.WriteUInt32(getPlayerState(client) + 0x124, 0x10000);
  386.             }
  387.             else
  388.             {
  389.                 Pars.WriteUInt32(getPlayerState(client) + 0x124, 0x00);          
  390.             }
  391.         }
  392.         public void Freeze(int client, bool enabled)
  393.         {
  394.             if (enabled)
  395.             {
  396.                 Pars.WriteUInt32(getPlayerState(client) + 0x321C, 0x04);
  397.             }
  398.             else
  399.             {
  400.                 Pars.WriteUInt32(getPlayerState(client) + 0x321C, 0x00);
  401.             }
  402.         }
  403.         public void UFOMode(int client, bool enabled)
  404.         {
  405.             if (enabled)
  406.             {
  407.                 Pars.WriteUInt32(getPlayerState(client) + 0x321C, 0x02);
  408.             }
  409.             else
  410.             {
  411.                 Pars.WriteUInt32(getPlayerState(client) + 0x321C, 0x00);
  412.             }
  413.         }
  414.         public void NoClipping(int client, bool enabled)
  415.         {
  416.             if (enabled)
  417.             {
  418.                 Pars.WriteUInt32(getPlayerState(client) + 0x321C, 0x01);
  419.             }
  420.             else
  421.             {
  422.                 Pars.WriteUInt32(getPlayerState(client) + 0x321C, 0x00);
  423.             }
  424.        
  425.         }
  426.         public void NormalMovement(int client)
  427.         {
  428.             Pars.WriteUInt32(getPlayerState(client) + 0x321C, 0x00);
  429.         }
  430.         public void MovePreGame(int client, bool enabled)
  431.         {
  432.             if (enabled)
  433.             {
  434.                 Pars.WriteUInt32(getPlayerState(client) + 0x01, 0x00);
  435.             }
  436.             else
  437.             {
  438.                 Pars.WriteUInt32(getPlayerState(client) + 0x01, 0x01);
  439.             }
  440.         }
  441.         public void SetSpeed(int client, float value)
  442.         {
  443.             Pars.WriteFloat(getPlayerState(client) + 0x2F50, value);
  444.         }
  445.         public void GiveWeapon(int client, string wName)
  446.         {
  447.             int wIndex = (int)Pars.Call(Tu8Offsets.G_GivePlayerWeapon, new object[] { wName });
  448.             Pars.Call(Tu8Offsets.G_GivePlayerWeapon, getPlayerState(client), wIndex, 0, 0);
  449.         }
  450.         public void RedBoxesThermal(int client, bool enabled)
  451.         {
  452.             Pars.SetMemory(getPlayerState(client) + 0x13, new byte[] { 0x18 });
  453.         }
  454.         public void ThermalVision(int client, bool enabled)
  455.         {
  456.             if (enabled)
  457.             {
  458.                 Pars.WriteUInt32(getPlayerState(client) + 0x10, 0x08);
  459.             }
  460.             else
  461.             {
  462.                 Pars.WriteUInt32(getPlayerState(client) + 0x10, 0x00);
  463.             }
  464.         }
  465.        
  466.         public void TakeAllWeapons(int client)
  467.         {          
  468.             Pars.WriteUInt32(getPlayerState(client) + 0x41C, 0);
  469.             for (int i = 0; i < 0xF; i++)
  470.             Pars.WriteUInt32((uint)(getPlayerState(client) + 0x2E4 + (0x4 * i)), 0);
  471.         }
  472.         public void BindExample(int client)
  473.         {
  474.             for (int i = 0; i <= 0x11; i++)
  475.             {
  476.                 if (ButtonPressed(i) == ButtonMonitoring.Right_Trigger)
  477.                 {
  478.                     /*Mod goes Here*/
  479.                 }
  480.             }
  481.         }
  482.         public string GetGamertag(int Client)
  483.         {
  484.             if (Pars.ReadByte(getPlayerState(Client) + 0x2F9C) != 0)
  485.                 return Pars.ReadString(getPlayerState(Client) + 0x2F9C, new byte[] {0x32});
  486.             return "";
  487.         }
  488.         public void SetClantag(int client, string str)
  489.         {
  490.             Pars.WriteString(getPlayerState(client) + 0x300C, str + "\0");
  491.         }
  492.         public void SetGamertag(int Client, string Gamertag)
  493.         {
  494.             Pars.WriteString(getPlayerState(Client) + 0x2F9C, Gamertag + "\0");
  495.         }
  496.      
  497.        
  498.    
  499.     }
  500.     public class SetStats
  501.     {
  502.         private static XRPC St;
  503.         public uint non;
  504.  
  505.         public void Prestige(int Value)
  506.         {
  507.             St.xbCon.DebugTarget.WriteInt32(Tu8Stats.Entry + Tu8Stats.Prestige, Value, false);
  508.         }
  509.         public void Deaths(int Value)
  510.         {
  511.             St.xbCon.DebugTarget.WriteInt32(Tu8Stats.Entry + Tu8Stats.Deaths, Value, false);
  512.         }
  513.         public void Suicides(int Value)
  514.         {
  515.             St.xbCon.DebugTarget.WriteInt32(Tu8Stats.Entry + Tu8Stats.Suicides, Value, false);
  516.         }
  517.         public void Kills(int Value)
  518.         {
  519.             //byte[] data = BitConverter.GetBytes((uint)Value);
  520.             St.xbCon.DebugTarget.WriteInt32(Tu8Stats.Entry + Tu8Stats.Kills, Value, false);
  521.         }
  522.         public void HighestKillStreak(int Value)
  523.         {
  524.             //byte[] data = BitConverter.GetBytes((uint)Value);
  525.             St.xbCon.DebugTarget.WriteInt32(Tu8Stats.Entry + Tu8Stats.KillStreaks, Value, false);
  526.         }
  527.         public void GamesPlayed(int Value)
  528.         {
  529.             //byte[] data = BitConverter.GetBytes((uint)Value);
  530.             St.xbCon.DebugTarget.WriteInt32(Tu8Stats.Entry + Tu8Stats.GamePlayed, Value, false);
  531.         }
  532.         public void GamesLost(int Value)
  533.         {
  534.             //byte[] data = BitConverter.GetBytes((uint)Value);
  535.             St.xbCon.DebugTarget.WriteInt32(Tu8Stats.Entry + Tu8Stats.Losses, Value, false);
  536.         }
  537.         public void GamesWon(int Value)
  538.         {
  539.            // byte[] data = BitConverter.GetBytes((uint)Value);
  540.             St.xbCon.DebugTarget.WriteInt32(Tu8Stats.Entry + Tu8Stats.Wins, Value, false);
  541.         }
  542.         public void RankXP(int Value)
  543.         {
  544.             //byte[] data = BitConverter.GetBytes((uint)Value);
  545.             St.xbCon.DebugTarget.WriteInt32(Tu8Stats.Entry + Tu8Stats.RankXP, Value, false);
  546.         }
  547.         public void OveralScore(int Value)
  548.         {
  549.             //byte[] data = BitConverter.GetBytes((uint)Value);
  550.             St.xbCon.DebugTarget.WriteInt32(Tu8Stats.Entry + Tu8Stats.Score, Value, false);
  551.         }
  552.         public void TimePlayed(int Value)
  553.         {
  554.             //byte[] data = BitConverter.GetBytes((uint)Value);
  555.             St.xbCon.DebugTarget.WriteInt32(Tu8Stats.Entry + Tu8Stats.TimePlayed, Value, false);
  556.         }
  557.         public void ShotHits(int Value)
  558.         {
  559.             //byte[] data = BitConverter.GetBytes((uint)Value);
  560.             St.xbCon.DebugTarget.WriteInt32(Tu8Stats.Entry + Tu8Stats.Hits, Value, false);
  561.         }
  562.         public void ShotMisses(int Value)
  563.         {
  564.            // byte[] data = BitConverter.GetBytes((uint)Value);
  565.             St.xbCon.DebugTarget.WriteInt32(Tu8Stats.Entry + Tu8Stats.Misses, Value, false);
  566.         }
  567.         public void SquadPoints(int Value)
  568.         {
  569.            // byte[] data = BitConverter.GetBytes((uint)Value);
  570.             St.xbCon.DebugTarget.WriteInt32(Tu8Stats.Entry + Tu8Stats.SquadPoints, Value, false);
  571.         }
  572.         public void SquadRank(int Value)
  573.         {
  574.             //byte[] data = BitConverter.GetBytes((uint)Value);
  575.             St.xbCon.DebugTarget.WriteInt32(Tu8Stats.Entry + Tu8Stats.PerSquadPlayer, Value, false);
  576.         }
  577.         public void UnlockAll()
  578.         {
  579.             byte[] buffer = new byte[2] { 4, 4 };
  580.  
  581.             uint Offset;
  582.             for (uint Off = 0x4300; Off < 0x4B00; Off += 0x0002)
  583.             {
  584.                 Offset = Tu8Stats.Entry + Off;
  585.                 St.SetMemory(Offset, buffer);
  586.  
  587.             }
  588.             for (uint iO = 0x7700; iO < 0x7750; iO += 0x0002)
  589.             {
  590.                 Offset = Tu8Stats.Entry + iO;
  591.                 St.SetMemory(Offset, buffer);
  592.             }
  593.        
  594.         }
  595.         public void AllSquadLevel60()
  596.         {
  597.          for (uint c = 0; c < 10; c++)
  598.                 {
  599.                     St.SetMemory(Tu8Stats.Entry + (c * 0x564) + 0xFE8, new byte[] { 0xFF });
  600.                 }
  601.         }
  602.         public void AllPerks()
  603.         {
  604.             for (uint h = 0; h < 10; h++)
  605.             {
  606.                 for (uint i = 0; i < 6; i++)
  607.                 {
  608.                     St.SetMemory(Tu8Stats.Entry + (h * 0x564) + (i * 0x80) + 0xD39, new byte[] { 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F });
  609.                 }
  610.             }
  611.         }
  612.                
  613.     }
  614. }
Advertisement
Add Comment
Please, Sign In to add comment