Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*A few things are needed:
- //http://pastebin.com/u/NGUWinter
- Lib.cs: https://mega.co.nz/#!5I81kDDK!0B32RvG34OOaTPvro4g65M_9QoMcHZrv97OkNBaO03A
- PS3.cs: https://mega.co.nz/#!ZIdB3BoI!4OhchZ8erRIAjnHKmxRkULPIpvuAhYbG6GB07ak70aU
- RPC: http://pastebin.com/RjVbhLFR
- Source: http://www.nextgenupdate.com/forums/call-duty-black-ops-2-mods-cheats-guides/761437-1-18-winter-s-stuff-thread.html
- */
- //Get Local Name
- //Spoiler:
- //Code:
- public static string GetLocalName() {
- return PS3.Extension.ReadString(0x26C067F);
- }
- //Example:
- label1.Text = GetLocalName();
- //Set Name
- //Spoiler:
- //Code:
- public static void SetName(string Name) {
- PS3.Extension.WriteString(0x026C0658, Name);
- PS3.Extension.WriteString(0x026c067f, Name);
- }
- //Example:
- SetName("Winter");
- //Set Any Level
- //Spoiler:
- //Code:
- public static uint[] XP = new uint[] {
- 800, 1900, 3300, 5300,
- 7900, 11100, 14900, 19300,
- 24300, 30100, 36700, 44100,
- 52300, 61300, 71100, 81700,
- 93100, 105300, 118300, 132100,
- 146700, 162100, 178300, 195300,
- 213100, 231700, 251100, 271300,
- 292300, 314100, 337100, 361300,
- 386700, 413300, 441100, 470100,
- 500300, 531700, 564300, 598100,
- 633100, 669300, 706700, 745300,
- 785100, 826100, 868300, 911700,
- 958300, 1002100, 1049100, 1097300,
- 1146700, 1249100
- };
- public static void SetXP(int Level) {
- byte[] i = BitConverter.GetBytes(Convert.ToInt32(XP[Level - 2]));
- if (Level <= 55)
- PS3.Extension.WriteBytes(0x26FD02C, i);
- else
- Console.Write("Value is greater than 55");
- }
- //Example:
- SetXP((int)numericUpDown1.Value);
- SetXP(55);
- //Any Weapon Rapid-Fire
- //Spoiler:
- //Code:
- uint BG_GetWeaponDef(int WeaponIndex = 1) {
- return (uint)RPC.Call(0x607098, WeaponIndex);
- } //0x607098 - BG_GetWeaponDef
- int GetCurrentWeapon(int Client = 0) {
- return PS3.Extension.ReadInt32(0x1780F28 + 0x5808 * (uint)Client + 0x1B8);
- } //0x1780F28 + 0x1B8 - playerstate + get weapon in view
- void RapidFire(int Client = 0) {
- PS3.SetMemory(BG_GetWeaponDef(GetCurrentWeapon(Client)) + 0x33, new byte[] { 0x07 });
- }////Example: RapidFire(0);
- //Example:
- RapidFire(0); //0 = Client
- //Wallhack with no Blur
- //Spoiler:
- //Code:
- public static void Wallhack() {
- if (PS3.Extension.ReadByte(0x1CBF9F8) != 0) {
- PS3.SetMemory(0x1CBF9F8, new byte[] { 0x00 }); //r_dof_enabled
- PS3.SetMemory(0x000834D0, new byte[] { 0x38, 0xC0, 0xFF, 0xFF }); //wallhack
- }
- else {
- PS3.SetMemory(0x1CBF9F8, new byte[] { 0x01 }); //r_dof_enabled
- PS3.SetMemory(0x000834D0, new byte[] { 0x63, 0x26, 0x00, 0x00 }); //wallhack
- }
- }
- //Example:
- Wallhack(); //If it's enabled when you've called it, it'll disable it.
- //Clone Player
- //Spoiler:
- //Code:
- public static void ClonePlayer(uint Client)
- {
- PS3.SetMemory(0x001F6564, new byte[] { 0x38, 0x60, 0x00, 0x00 });
- PS3.Extension.WriteInt16(0x001F6564 + 2, (short)Client);
- RPC.Call(0x01F6528, Client);
- }
- //Example:
- Clone(0); //0 = Client
- //Custom Invite Messages
- //Spoiler:
- //Subject:
- //Code:
- public static void Subject(string Subject) {
- PS3.Extension.WriteString(0x30933206, Subject);
- }
- //Message:
- //Code:
- public static void Message(string Message) {
- PS3.Extension.WriteString(0x30933223, Message);
- }
- //Example:
- Subject("I want you to Join");
- Message("Join");
- //End Probation (League Play)
- //Spoiler:
- //Code:
- public static void EndProbation() {
- PS3.SetMemory(0x097047C, new byte[] { 0x00 });
- }
- //Example:
- EndProbation();
- //Unlimited Time, Score, Lives
- //Spoiler:
- //Code:
- public static void cbuf_addtext(string Command)
- {
- RPC.Call(0x313E88, 0, Command);
- }
- public static void UnlimitedTCL() {
- cbuf_addtext("gametype_setting timelimit 0");
- cbuf_addtext("gametype_setting scorelimit 0");
- cbuf_addtext("gametype_setting playerNumlives 0");
- }
- //Example:
- UnlimitedTCL();
- //All Medal Offsets
- //Spoiler:
- //Code:
- enum Medals
- {
- Afterlife = 0x026FCCCA,
- Aggression = 0x026FCCE8,
- Assisted_Suicide = 0x026FCB92,
- Avenger = 0x026FCCEE,
- Backfire = 0x026FCD06,
- Back_Stabber = 0x026FCB98,
- Bait_Taken = 0x026FCCFA,
- Bankrupted = 0x026FCD2A,
- Bankshot = 0x026FCBAA,
- Big_Game_Hunter = 0x026FCBFE,
- Blackout = 0x026FCC46,
- Bloodthirsty = 0x026FCD6C,
- Bomber = 0x026FCBA4,
- Boomstick = 0x026FCDDE,
- Bouncer = 0x026FCB8C,
- Brutal = 0x026FCD60,
- Bullseye = 0x026FCD9C,
- Burn_Out = 0x026FCC04,
- Buzz_Kill = 0x026FCEB0,
- Chopped_Up = 0x026FCC88,
- Clean_Up = 0x026FCCBE,
- Close_Call = 0x026FCC76,
- Clutch_HQ = 0x026FCBD4,
- Clutch_SND = 0x026FCBE0,
- Combo_Breaker = 0x026FCD36,
- Comeback = 0x026FCBBC,
- Cooked = 0x026FCD96,
- Crackdown = 0x026FCE20,
- Cropduster = 0x026FCEB6,
- Deadeye = 0x026FCBC8,
- Death_From_Above = 0x026FCCA0,
- Decimated = 0x026FCBCE,
- Demolished = 0x026FCBF8,
- Denied_Bomb = 0x026FCD3C,
- Denied_Flag = 0x026FCD48,
- Distant_Thunder = 0x026FCE0E,
- Double_Down = 0x026FCECE,
- Double_Kill = 0x026FCDAE,
- Drone_Hunter = 0x026FCBE6,
- Dropshot = 0x026FCCDC,
- Efficiency = 0x026FCCC4,
- Elimination_OITC = 0x026FCC52,
- Elimination_SND = 0x026FCC58,
- Exterminator = 0x026FCC10,
- Falling_Skies = 0x026FCDA2,
- First_Blood = 0x026FCC6A,
- Flyswatter = 0x026FCC1C,
- Forward_Position = 0x026FCDFC,
- Frenzy_Kill = 0x026FCDC0,
- Frugal = 0x026FCD7E,
- Fury_Kill = 0x026FCDBA,
- Fuzzbuster = 0x026FCBEC,
- Gun_Expert = 0x026FCDA8,
- Gunslinger = 0x026FCD1E,
- Hacked = 0x026FCC82,
- Hardpoint_Secure = 0x026FCD84,
- Headshot = 0x026FCC8E,
- Hero = 0x026FCBDA,
- Hijacker = 0x026FCBB0,
- Hogtied = 0x026FCC3A,
- Humiliation = 0x026FCCB8,
- Intercepted = 0x026FCC28,
- Kaboom = 0x026FCE02,
- Kill_Chain = 0x026FCDD8,
- Last_Man_Standing = 0x026FCC5E,
- Long_Shot = 0x026FCD8A,
- Mega_Kill = 0x026FCDCC,
- Merciless = 0x026FCD4E,
- No_Tip = 0x026FCC40,
- Nuclear = 0x026FCD66,
- One_Shot_One_Kill = 0x026FCCD6,
- Opening_Move = 0x026FCDE4,
- Pancake = 0x026FCCF4,
- Playmaker = 0x026FCC70,
- Quad_Feed = 0x026FCEC2,
- Raining_Death = 0x026FCE08,
- Red_Baron = 0x026FCDF6,
- Regicide_GG = 0x026FCD78,
- Regicide_SAS = 0x026FCD24,
- Rejected = 0x026FCC0A,
- Relentless = 0x026FCD5A,
- Retrieved = 0x026FCE14,
- Revenge = 0x026FCE1A,
- Road_Rage = 0x026FCC22,
- Ruthless = 0x026FCD54,
- Savior = 0x026FCCD0,
- Scrapped = 0x026FCC34,
- Secure_D = 0x026FCDF0,
- Secure_HQ = 0x026FCCAC,
- Shadow_Catcher = 0x026FCBF2,
- Shared_AGR = 0x026FCE26,
- Shared_Counter_UAV = 0x026FCE32,
- Shared_Death_Machine = 0x026FCE38,
- Shared_Dragon_Fire = 0x026FCE7A,
- Shared_EMP_Systems = 0x026FCE44,
- Shared_Escort_Drone = 0x026FCE50,
- Shared_Guardian = 0x026FCE5C,
- Shared_Hellstorm_Missile = 0x026FCE86,
- Shared_Hunter_Killer = 0x026FCE62,
- Shared_K9_Unit = 0x026FCE3E,
- Shared_Lightning_Strike = 0x026FCE74,
- Shared_Lodestar = 0x026FCE8C,
- Shared_Orbital_VSAT = 0x026FCE92,
- Shared_RCXD = 0x026FCE80,
- Shared_Sentry_Gun = 0x026FCE98,
- Shared_Stealth_Chopper = 0x026FCE4A,
- Shared_Swarm = 0x026FCE68,
- Shared_UAV = 0x026FCEA4,
- Shared_VTOL_Warship = 0x026FCE56,
- Shared_War_Machine = 0x026FCE6E,
- Shared_Warthog = 0x026FCE9E,
- Shield_Bash = 0x026FCD90,
- Silent_Killer = 0x026FCC94,
- Skewered = 0x026FCB9E,
- Stick = 0x026FCEAA,
- Strength_and_Honor = 0x026FCBC2,
- Strike_Delivered = 0x026FCDEA,
- Super_Kill = 0x026FCDC6,
- Survivor = 0x026FCCE2,
- Switch_Hitter = 0x026FCD30,
- Takedown_Bomb = 0x026FCD42,
- Takedown_Flag = 0x026FCD0C,
- TKO = 0x026FCC16,
- Triple_Kill = 0x026FCDB4,
- Ultra_Kill = 0x026FCDD2,
- Underdog = 0x026FCD00,
- Unstoppable = 0x026FCD72,
- Uppercut = 0x026FCC2E,
- Victor = 0x026FCEC8,
- Warbeast = 0x026FCC4C,
- Wingman = 0x026FCC9A,
- Wipeout = 0x026FCBB6,
- }
- //Example:
- PS3.SetMemory(Medals.Wipeout, new byte[] { 0x00 });
- //G_SetOrigin, G_SetAngles
- //Spoiler:
- //G_SetOrigin
- //Code:
- public static void G_SetOrigin(int gentity, float[] Origin) {
- RPC.Call(0x279698, gentity, Origin); //G_SetOrigin
- }
- //Code:
- public static void G_SetAngles(int gentity, float[] Angles) {
- RPC.Call(0x279D78, gentity, Angles); //G_SetAngles
- }
- //G_FreeEntity (Delete Entity)
- //Spoiler:
- //Code:
- public static void G_FreeEntity(int gentity){
- RPC.Call(0x279140, gentity);
- }
- //Scr_PlayFX
- //Spoiler:
- //Scr_PlayFX
- //Code:
- public static void Scr_PlayFX(float[] Origin, int FX) {
- uint i = (uint)RPC.Call(0x279740, Origin, 86); //G_TempEntity
- PS3.Extension.WriteInt32(i + 0xD4, FX);
- } //Thanks to Shark for his Ghosts Scr_PlayFX, which I was able to port to Black Ops 2
- //G_EffectIndex
- //Code:
- public static int G_EffectIndex(string FX) {
- return RPC.Call(0x0276978, FX);
- }
- //Example:
- Scr_PlayFX(GetOrigin(0), 12);
- //Here is a list of FX's for Nuketown which I made ages ago: [Black Ops 2] Nuketown FX List - Pastebin.com
- //G_SpawnHelicopter
- //Spoiler:
- //Code:
- public static uint G_SpawnHelicopter(uint Owner, string Type, string Model, float[] Origin, float[] Angles) {
- uint Entity = (uint)RPC.Call(0x278C60); //G_Spawn
- Lib.WriteSingle(Entity + 0x134, Origin);
- Lib.WriteSingle(Entity + 0x140, Angles);
- RPC.Call(0x22C558, Entity, Owner, Type, Model); //G_SpawnHelicopter
- return Entity;
- }
- //Example:
- G_SpawnHelicopter(Functions.G_Entity(0), "heli_ai_mp", "veh_t6_air_attack_heli_mp_dark", GetOrigin(0), getViewAngles(0));
- //Kick Player
- //Spoiler:
- //Code:
- public static void KickClient(int Client, string Reason) {
- RPC.SV_GameSendServerCommand(Client, "5 \"\n" + Reason + "\"");
- }
- //Example:
- KickClient(5, "Get the fuck out my lobby mate");
- //SV_GameSendServerCommand
- //Spoiler:
- //Code:
- public static void SV_GameSendServerCommand(int Client, string Command) {
- RPC.Call(0x34A1DC, Client, 1, Command);
- }
- //Example:
- SV_GameSendServerCommand(0, "< \"SV_GameSendServerCommand Test!\""); //Prints "SV_GameSendServerCommand" to the middle of the screen
- //CBuf_Addtext
- //Spoiler:
- //Code:
- public static void CBuf_Addtext(string Command) {
- RPC.Call(0x313E88, 0, Command);
- }
- //Example:
- CBuf_Addtext("party_connectToOthers 0"); //Enables force host
- //G_GivePlayerWeapon
- //Spoiler:
- //Code:
- public static int G_GetWeaponIndexForName(string Weapon) {
- return RPC.Call(0x2A6BE8, Weapon);
- }
- public static void G_GivePlayerWeapon(int Client, int Weapon) {
- RPC.Call(0x2A8364, 0x1780F28 + 0x5808 * (uint)Client, Weapon, 0);
- }
- public static void G_GivePlayerWeapon(int Client, string Weapon) {
- int WepNum = G_GetWeaponIndexForName(Weapon);
- RPC.Call(0x2A8364, 0x1780F28 + 0x5808 * (uint)Client, WepNum, 0);
- }
- //Example:
- G_GivePlayerWeapon(1, 2); Goto Weapon Index - Pastebin.com for a full list of weapons
- //GetHeldWeapon
- //Spoiler:
- //Code:
- public static int GetHeldWeapon(int Client) {
- return Lib.ReadByte(0x17810E0 + 0x5808 * (uint)Client);
- }
- //Example:
- int HW = GetHeldWeapon(0);
- //G_InitializeAmmo
- //Spoiler:
- //Code:
- public static void G_InitalizeAmmo(int Client) {
- RPC.Call(0x1E6838, 0x16B9F20 + 0x31C * (uint)Client);
- }
- //Example:
- G_InitalizeAmmo(0);
- //Add_Ammo
- //Spoiler:
- //Code:
- public static void Add_Ammo(int Client, int Ammo) {
- RPC.Call(0x208B48, 0x16B9F20 + 0x31C * (uint)Client, GetHeldWeapon(Client), Ammo, Ammo, Ammo, Ammo);
- }
- //Example:
- Add_Ammo(0, 50);
- //G_SetModel
- //Spoiler:
- //Code:
- public static void G_SetModel(int Client, string Model) {
- RPC.Call(Offsets.G_SetModel, 0x16B9F20 + 0x31C * (uint)Client, Model);
- }
- //Example:
- G_SetModel(Client, "defaultactor"); Goto http://pastebin.com/rV41PK1e for a full list of models
- IsClientSameTeam
- //Spoiler:
- //Code:
- public static bool IsClientSameTeam(int Client, int otherPlayer) {
- if (Lib.ReadByte(0x178642C + 0x5808 * (uint)Client) == Lib.ReadByte(0x178642C + 0x5808 * (uint)Client))
- return true;
- else
- return false;
- }
- //Example:
- IsClientSameTeam(0, 6);
- //IsClientAlive
- //Spoiler:
- //Code:
- public static bool IsClientAlive(int Client) {
- if (Lib.ReadByte(0x17864F8 + 0x5808 * (uint)Client) == 1)
- return true;
- else
- return false;
- }
- //Example:
- IsClientAlive(0);
- //RandomCamo
- //Spoiler:
- //Code:
- public static void RandomCamo(int Client) {
- Random rand = new Random();
- int Camo = rand.Next(0, 43);
- PS3.SetMemory(0x01781203 + 0x5808 * (uint)Client, new byte[] { (byte)Camo });
- PS3.SetMemory(0x017811e7 + 0x5808 * (uint)Client, new byte[] { (byte)Camo });
- }
- //Example:
- RandomCamo(0);
- // Jetpack
- //Spoiler:
- //Code:
- static Thread[] JetpackThread = new Thread[18];
- static bool[] JetpackBool = new bool[18];
- public static void DoJetpack(int Client) {
- if (!JetpackBool[Client]) {
- JetpackThread[Client] = new Thread(() => Jetpack(Client));
- JetpackThread[Client].Start();
- JetpackBool[Client] = true;
- }
- else {
- JetpackThread[Client].Abort();
- JetpackBool[Client] = false;
- }
- }
- private static void Jetpack(int Client) {
- PS3.Reconnect();
- for(;;) {
- float num = Lib.ReadSingle(0x1780F28 + 0x28 + 8 + 0x5808 * (uint)Client);
- if (PS3.Extension.ReadInt32(0x1780F28 + 0x569C + 0x5808 * (uint)Client) == 2097152) {
- Lib.WriteSingle(0x1780F28 + 0x28 + 8 + 0x5808 * (uint)Client, num + 3);
- }
- }
- }
- //Example:
- DoJetpack(1); //1 = Client
- //Spawn Entity
- //Spoiler:
- //Code:
- public static void SpawnEntity(string Model, float[] Origin, float[] Angles) {
- uint gentitys = (uint)RPC.Call(0x278C60);
- Lib.WriteSingle(gentitys + 0x134, Origin);
- Lib.WriteSingle(gentitys + 0x140, Angles);
- RPC.Call(0x277644, gentitys, Model);
- RPC.Call(0x2670E8, gentitys);
- }
- //Example:
- SpawnEntity("t6_wpn_supply_drop_axis", Origin, Angles);
- //Spin Mode
- //Spoiler:
- //Code:
- public static void setViewAngles(int Client, float[] Angles) {
- Lib.WriteSingle(0x10040000, Angles);
- RPC.Call(0x1E1D90, 0x16B9F20 + 0x31C * (uint)Client, 0x10040000);
- }
- public static float[] getViewAngles(int Client) {
- return Lib.ReadSingle(0x1780F28 + 0x56BC + 0x5808 * (uint)Client, 3);
- }
- public static bool[] SpinningModeActive = new bool[18];
- private static Thread[] SpinningModeThread = new Thread[18];
- public static void InitSpinningMode(int Client)
- {
- if (!SpinningModeActive[Client])
- {
- SpinningModeActive[Client] = true;
- SpinningModeThread[Client] = new Thread(() => SpinningMode(Client));
- SpinningModeThread[Client].Start();
- SpinningModeActive[Client] = true;
- RPC.iPrintln(Client, "Spinning Mode: ^2On");
- }
- else
- {
- SpinningModeActive[Client] = false;
- SpinningModeThread[Client].Abort();
- RPC.iPrintln(Client, "Spinning Mode: ^1Off");
- }
- }
- private static void SpinningMode(int Client) {
- PS3.Reconnect();
- for (; ; ) {
- Single[] Angles = getViewAngles(Client);
- Angles[1] += 15;
- setViewAngles(Client, Angles);
- System.Threading.Thread.Sleep(100);
- }
- }
- //Example:
- InitSpinningMode(1); //1 = Client
- //Get Amount of Players in the Game
- //Spoiler:
- //Code:
- public static int GetPlayerSize() {
- int Num = 0;
- for (int i = 0; i < 18; i++)
- if (Lib.ReadByte(0x1780F28 + 0x5808 * (uint)i) != 0)
- Num++;
- return Num;
- }
- //Example:
- int Interger = GetPlayerSize();
- //Get Client Name
- //Spoiler:
- //Code:
- public static string GetClientName(int Client) {
- string players = Lib.ReadString(0x1780F28 + 0x5544 + 0x5808 * (uint)Client);
- if (players == "")
- return "Not Connected";
- else
- return players;
- }
- //Example:
- label1.Text = GetClientName(1); //1 = Client
- Get Host Number
- //Spoiler:
- //Code:
- public static int GetHostNumber() {
- int Num = 0;
- string localname = Lib.ReadString(0x26C067F);
- for (int i = 0; i < GetNumPlayers(); i++)
- if (GetClientName(i) == localname)
- Num = i;
- return Num;
- }
- //Example:
- int Interger = GetHostNumber();
- Get View Angles / Set View Angles
- //Spoiler:
- //Code:
- public static float[] getViewAngles(int Client) {
- return Lib.ReadSingle(0x1780F28 + 0x56BC + 0x5808 * (uint)Client, 3);
- }
- //Code:
- public static void setViewAngles(int Client, float[] Angles) {
- Lib.WriteSingle(0x10040000, Angles);
- RPC.Call(0x1E1D90, 0x16B9F20 + 0x31C * (uint)Client, 0x10040000);
- }
- //Example:
- float[] Float = getViewAngles(1); //1 = Client
- setViewAngles(1, Angles); //1 = Client
- /*
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement