Post: [1.15/C#] Prestige Selector Script
12-09-2013, 09:25 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Hello NGU,

Today I am going to release a little script I made because I was bored and had nothing else to do... Basically it's a prestige editor just like from GSC. It's pretty easy to use and implement into your tool/menu.

You can use this with either DEX or CEX firmware if you use Control Console, I made it while using Control Console on my DEX with the You must login or register to view this content. but it is easy to swap the coding if you want.

First, add these under your 'public partial class'
    public int curPres = 89;
public bool selected = false;


Next, you're going to need RPC, Hud Elements, button monitoring, and a few other functions. I will supply everything except for RPC, you can use You must login or register to view this content.

Hud Elements (Thanks Bad Luck Brian)

    
public class Hudelem //Hud Elements
{
public static uint
type = 0x6D,
xOffset = 0x00,
yOffset = 0x04,
textOffset = 0x62,
sort = 32,
fontSizeOffset = 0x0C,
clientOffset = 0x7C,
colorOffset = 0x18,
GlowColor = 0x44,
widthOffset = 0x58,
heightOffset = 0x5A,
shaderOffset = 0x74,
alignOffset = 0x73,
relativeOffset = 0x72,
flags = 0x49,
Material = 0x71;
}

public byte[] SetText(string Text)
{
byte[] clean = new byte[250];
PS3.SetMemory(0x2000000, clean);
PS3.SetMemory(0x2000000, Encoding.ASCII.GetBytes(Text + "\0"));
byte[] Patch = new byte[] { 0x48, 0x44, 0xB3, 0x1D, 0x3C, 0x60, 0x00, 0xD8,

0x80, 0x63, 0xBC, 0xD8, 0x2C, 0x03, 0x00, 0x00, 0x40, 0x82, 0x00, 0x7C, 0x3C, 0x60, 0x02, 0x00,

0x30, 0x63, 0x00, 0x00, 0x4B, 0xED, 0xE4, 0xED, 0x3c, 0x80, 0x02, 0x00, 0x90, 0x64, 0x50, 0x00,

0x48, 0x00, 0x00, 0x68, 0x4B, 0xFD, 0x80, 0x61 };
byte[] Unpatch = new byte[] { 0x48, 0x44, 0xB3, 0x1D, 0x3C, 0x60, 0x00,

0xD8, 0x80, 0x63, 0xBC, 0xD8, 0x2C, 0x03, 0x00, 0x00, 0x41, 0x82, 0x00, 0x7C, 0x3C, 0x60, 0x00,

0x39, 0x38, 0x80, 0x00, 0x00, 0x3B, 0xE3, 0x70, 0xE4, 0x63, 0x43, 0x00, 0x00, 0xC3, 0xFF, 0x00,

0x08, 0xFC, 0x20, 0xF8, 0x90, 0x4B, 0xFD, 0x80, 0x61 };
PS3.SetMemory(0X03976DC, Patch);
Thread.Sleep(15);
PS3.SetMemory(0X03976DC, Unpatch);
byte[] GetX = new byte[4];
PS3.GetMemory(0x2005000, GetX);
return GetX;
}

public byte[] uintBytes(uint input)
{
byte[] data = BitConverter.GetBytes(input);
Array.Reverse(data);
return data;
}

private class MenuItems
{
public static uint Shader = 0, ScrollBarBackGround = 1;
}

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

public byte[] ToHexFloat(float Axis)
{
byte[] bytes = BitConverter.GetBytes(Axis);
Array.Reverse(bytes);
return bytes;
}

public byte[] RGBA(decimal R, decimal G, decimal B, decimal A)
{
byte[] RGBA = new byte[4];
byte[] RVal = BitConverter.GetBytes(Convert.ToInt32(R));
byte[] GVal = BitConverter.GetBytes(Convert.ToInt32(G));
byte[] BVal = BitConverter.GetBytes(Convert.ToInt32(B));
byte[] AVal = BitConverter.GetBytes(Convert.ToInt32(A));
RGBA[0] = RVal[0];
RGBA[1] = GVal[0];
RGBA[2] = BVal[0];
RGBA[3] = AVal[0];
return RGBA;
}
/*public void closemenu()
{
for (int i = 190; i < 210; i++)
{
DestroyElem(i);
}
}*/
public byte[] Visibility(decimal A)
{
byte[] Visibility = new byte[1];
byte[] AVal = BitConverter.GetBytes(Convert.ToInt32(A));
Visibility[1] = AVal[0];
return Visibility;
}

public void StoreIcon1(int elemIndex, uint client, int shader, int width, int height, int x, int y, uint align, float sort, int r, int g, int b, int a)
{
byte[] Material_ = BitConverter.GetBytes(shader);
Array.Reverse(Material_);
byte[] Height_ = BitConverter.GetBytes(Convert.ToInt32(height));
Array.Resize(ref Height_, 2);
Array.Reverse(Height_);
byte[] width_ = BitConverter.GetBytes(Convert.ToInt32(width));
Array.Resize(ref width_, 2);
Array.Reverse(width_);
uint elem = 0x15D8400 + ((Convert.ToUInt32(elemIndex)) * 0x8Cool Man (aka Tustin);
byte[] ClientID = ReverseBytes(BitConverter.GetBytes(client));
PS3.SetMemory(elem, new byte[0x88]);
PS3.SetMemory(elem + Hudelem.type, ReverseBytes(BitConverter.GetBytes(Cool Man (aka Tustin)));
PS3.SetMemory(elem + 0x79, new byte[] { 0xFF });
PS3.SetMemory(elem + 0xC, new byte[] { 0x3f, 0xc0 });
PS3.SetMemory(elem + Hudelem.Material, Material_);
PS3.SetMemory(elem + Hudelem.heightOffset, Height_);
PS3.SetMemory(elem + Hudelem.widthOffset, width_);
PS3.SetMemory(elem + Hudelem.textOffset + 4, ReverseBytes(BitConverter.GetBytes(sort)));
PS3.SetMemory(elem + Hudelem.xOffset, ToHexFloat(x));
PS3.SetMemory(elem + Hudelem.yOffset, ToHexFloat(y));
PS3.SetMemory(elem + Hudelem.colorOffset, RGBA(r, g, b, a));
PS3.SetMemory(elem + Hudelem.clientOffset, ClientID);
Thread.Sleep(20);
}
public uint HudElem_Alloc()
{
for (Int32 i = 0; i < 1024; i++)
{
UInt32 address = (0x15D8400 + ((uint)i * 0x8Cool Man (aka Tustin));
Byte[] Buffer = PS3.GetBytes(address, 4);
if (Buffer[0] == 0x00)
{
PS3.SetMemory(address + Hudelem.type, new Byte[0x88]);
return address;
}
}
return 0;
}
public static Int32 RGB2INT(Int32 r, Int32 g, Int32 b, Int32 a)
{
Byte[] newRGB = new Byte[4];
newRGB[0] = (Byte)r;
newRGB[1] = (Byte)g;
newRGB[2] = (Byte)b;
newRGB[3] = (Byte)a;
Array.Reverse(newRGB);
return BitConverter.ToInt32(newRGB, 0);
}
public void StoreTextElem1(int elemIndex, int client, string text, int font, int fontScale, int x, int y, uint align, int sort, int R, int G, int B, int a)
{
string setText = text + "\0";
byte[] TextIndex = SetText(setText);
uint elem = 0x15D8400 + ((Convert.ToUInt32(elemIndex)) * 0x8Cool Man (aka Tustin);
byte[] ClientID = ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(client)));

PS3.SetMemory(elem, new byte[0x88]);
PS3.SetMemory(elem + Hudelem.type, ReverseBytes(BitConverter.GetBytes(1)));


PS3.SetMemory(elem + 0x79, new byte[] { 0xFF });
PS3.SetMemory(elem + 0xC, new byte[] { 0x3f, 0xc0 });
PS3.SetMemory(elem + Hudelem.textOffset, TextIndex);
PS3.SetMemory(elem + Hudelem.fontSizeOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToSingle(font))));
PS3.SetMemory(elem + Hudelem.xOffset, ToHexFloat(x));
PS3.SetMemory(elem + Hudelem.yOffset, ToHexFloat(y));
PS3.SetMemory(elem + Hudelem.colorOffset, RGBA(R, G, B, a));
PS3.SetMemory(elem + Hudelem.clientOffset, ClientID);
Thread.Sleep(20);
}

public void isVisible(int index, int a)
{
uint elem = 0x15D8400 + ((Convert.ToUInt32(index)) * 0x8Cool Man (aka Tustin);
PS3.SetMemory(elem + Hudelem.colorOffset, Visibility(a));
}

public void ShowElem(int index, int Brightness)
{
isVisible(index, Brightness);
}

public void HideElem(int index)
{
isVisible(index, 0);
}

public void ActivateIndex(bool State, int index, int type)
{

uint elem = 0x15D8400 + ((Convert.ToUInt32(index)) * 0x8Cool Man (aka Tustin);
byte[] Type_ = BitConverter.GetBytes(type);
Array.Reverse(Type_);
if (State == true)
{
PS3.SetMemory(elem, Type_);
}
else
{
PS3.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x00 });
}
}


Button Handling (Thanks to Seb)

    
public class Buttons
{
public static UInt32
X = 8192,
O = 16384,
Square = 4,
L3 = 1088,
R3 = 32,
L2 = 256,
R2 = 512,
L1 = 2147487744,
R1 = 128,
Crouch = 16384,
Prone = 32768;
}
public Boolean ButtonPressed(UInt32 clientIndex, UInt32 Button)
{
Byte[] xRevolution = PS3.GetBytes(0x0177B828 + 0x547C + (clientIndex * 0x580Cool Man (aka Tustin), 4);//0x0177B828 is g_client Update on a new Update
UInt32 Buttonz = BitConverter.ToUInt32(xRevolution, 0);
if (Buttonz == Button)
return true;
return false;
}


And the other functions

    
public void MoveShader2(uint index, int X_, int Y_, int Width_, int Height_)
{
byte[] X = new byte[4];
byte[] Y = new byte[4];
X = BitConverter.GetBytes(Convert.ToSingle(X_));
Y = BitConverter.GetBytes(Convert.ToSingle(Y_));
byte[] Width = new byte[4];
byte[] Height = new byte[4];
Width = BitConverter.GetBytes(Width_);
Height = BitConverter.GetBytes(Height_);
Array.Reverse(X);
Array.Reverse(Y);
Array.Reverse(Width);
Array.Reverse(Height);
PS3.SetMemory(0x15D8400 + (index * 0x8Cool Man (aka Tustin) + 0, X);
PS3.SetMemory(0x15D8400 + (index * 0x8Cool Man (aka Tustin) + 4, Y);
PS3.SetMemory(0x15D8400 + (index * 0x8Cool Man (aka Tustin) + 68, Width);
PS3.SetMemory(0x15D8400 + (index * 0x8Cool Man (aka Tustin) + 72, Height);

}
public void DestroyElem(int index)
{
uint elem = 0x15D8400 + ((Convert.ToUInt32(index)) * 0x8Cool Man (aka Tustin);
PS3.SetMemory(elem, new byte[0x88]);
}
public void ChangeHudIcon(int index, int shader)
{
uint elem = 0x15D8400 + ((Convert.ToUInt32(index)) * 0x8Cool Man (aka Tustin);
byte[] Material_ = BitConverter.GetBytes(shader);
Array.Reverse(Material_);
PS3.SetMemory(elem + Hudelem.Material, Material_);
}
public void iPrintLn(int ClientNum, string Text)
{
BO2.RPC.Call(0x349edc, 0, 0, "; \"" + Text + "\"");//I change this to work with Choco's RPC which isn't the RPC I use
}
public void iPrintLnBold(int ClientNum, string Text)
{
BO2.RPC.Call(0x349edc, 0, 0, "< \"" + Text + "\"");//I change this to work with Choco's RPC which isn't the RPC I use
}
public int ChangePres()
{
if (curPres == 89)
return 0;
else if (curPres == 90)
return 1;
else if (curPres == 91)
return 2;
else if (curPres == 92)
return 3;
else if (curPres == 93)
return 4;
else if (curPres == 94)
return 5;
else if (curPres == 95)
return 6;
else if (curPres == 96)
return 7;
else if (curPres == 97)
return 8;
else if (curPres == 9Cool Man (aka Tustin)
return 9;
else if (curPres == 99)
return 10;
else if (curPres == 100)
return 11;
else return 0;
}
public void UpPrestige()
{
ChangePres();
if (curPres == 89)
{
curPres = 100;
ChangeHudIcon(194, curPres);
iPrintLnBold(0, "^5Prestige: " + Convert.ToString(ChangePres()));
}
else
{
curPres--;
ChangeHudIcon(194, curPres);
iPrintLnBold(0, "^5Prestige: " + Convert.ToString(ChangePres()));
}
}
public void DownPrestige()
{
ChangePres();
if (curPres == 100)
{
curPres = 89;
ChangeHudIcon(194, curPres);
iPrintLnBold(0, "^5Prestige: " + Convert.ToString(ChangePres()));
}
else
{
curPres++;
ChangeHudIcon(194, curPres);
iPrintLnBold(0, "^5Prestige: " + Convert.ToString(ChangePres()));
}
}


Other things you will need in your program

    
A button (To start the function)
A timer


Add this to your button's coding

    
StoreIcon1(194, 0, 89, 60, 60, 290, 180, 0, 0, 255, 255, 255, 255);
PrestigeTimer.Start();
iPrintLn(0, "^5[{+smoke}] / [{+frag}] to scroll");
iPrintLn(0, "^5[{+gostand}] to select prestige");


Add this to your timer's coding.

    
if (ButtonPressed(0, Buttons.R2) && selected == false)
{
DownPrestige();
}
if (ButtonPressed(0, Buttons.L2) && selected == false)
{
UpPrestige();
}
if (ButtonPressed(0, Buttons.X) && selected == false)
{
if (ChangePres() == 0)
{
PS3.SetMemory(0x026F3F6C, new byte[] { 0x00 });
iPrintLnBold(0, "^1Prestige Set To: 0");
}
else if (ChangePres() == 1)
{
PS3.SetMemory(0x026F3F6C, new byte[] { 0x01 });
iPrintLnBold(0, "^1Prestige Set To: 1");
}
else if (ChangePres() == 2)
{
PS3.SetMemory(0x026F3F6C, new byte[] { 0x02 });
iPrintLnBold(0, "^1Prestige Set To: 2");
}
else if (ChangePres() == 3)
{
PS3.SetMemory(0x026F3F6C, new byte[] { 0x03 });
iPrintLnBold(0, "^1Prestige Set To: 3");
}
else if (ChangePres() == 4)
{
PS3.SetMemory(0x026F3F6C, new byte[] { 0x04 });
iPrintLnBold(0, "^1Prestige Set To: 4");
}
else if (ChangePres() == 5)
{
PS3.SetMemory(0x026F3F6C, new byte[] { 0x05 });
iPrintLnBold(0, "^1Prestige Set To: 5");
}
else if (ChangePres() == 6)
{
PS3.SetMemory(0x026F3F6C, new byte[] { 0x06 });
iPrintLnBold(0, "^1Prestige Set To: 6");
}
else if (ChangePres() == 7)
{
PS3.SetMemory(0x026F3F6C, new byte[] { 0x07 });
iPrintLnBold(0, "^1Prestige Set To: 7");
}
else if (ChangePres() == Cool Man (aka Tustin)
{
PS3.SetMemory(0x026F3F6C, new byte[] { 0x08 });
iPrintLnBold(0, "^1Prestige Set To: 8");
}
else if (ChangePres() == 9)
{
PS3.SetMemory(0x026F3F6C, new byte[] { 0x09 });
iPrintLnBold(0, "^1Prestige Set To: 9");
}
else if (ChangePres() == 10)//
{
PS3.SetMemory(0x026F3F6C, new byte[] { 0x0A });
iPrintLnBold(0, "^1Prestige Set To: 10");
}
else if (ChangePres() == 11)
{
PS3.SetMemory(0x026F3F6C, new byte[] { 0x0B });
iPrintLnBold(0, "^1Prestige Set To: 11");
}
double scrollspeed = 40; //Scrolling Speed
for (double i = 290; i < 1000; )
{
i = i + scrollspeed;
MoveShader2(194, (int)i, 180, 60, 60);
}
selected = true;
PrestigeTimer.Stop();
}


And if you need Choco's getMemory function here it is [You don't need this if you use PS3Lib

    
public byte[] GetMemory(uint address, int length)
{
byte[] buffer = new byte[length];
PS3TMAPI.ProcessGetMemory(0, PS3TMAPI.UnitType.PPU, processID, 0L, (ulong)address, ref buffer);
return buffer;
}


Right now, I don't have a video or a picture of the prestige selector, but if someone would be kind to as record it for me, that would be greatly appreciated. Smile

How to use

    
R2 - To scroll right
L2 - To scroll left
X - To select


Credits

    
Choco
Imcsx
Enstone
Seb5594
Bad Luck Brian
and there might be more, but I don't know.


If anyone wants the pre-compiled project here it is, it's for people using CEX/CCAPI right now, I'm too lazy to compile it for DEX I will in a day or so, but if anyone wants to record they can and I will put it on the thread Smile

You must login or register to view this content.

You must login or register to view this content.
(adsbygoogle = window.adsbygoogle || []).push({});

The following 9 users say thank you to Black Panther for this useful post:

{H} | Exception, Asian, EliteHackzPS3, FM|T Enstone, Mango_Knife, Notorious, RAV-_-MALWA, SnaY

The following user groaned Black Panther for this awful post:

DazedMods
12-10-2013, 03:57 PM #2
seb5594
Proud Former Admin
Not bad have you any pictures or a Video for it? Smile
12-11-2013, 11:38 AM #3
Originally posted by seb5594 View Post
Not bad have you any pictures or a Video for it? Smile


Sorry, I can't do that now, I dont have my ps3 right now Smile
12-12-2013, 09:27 PM #4
SnaY
Former Lead of GS
Originally posted by Corey View Post
Hello NGU,

Today I am going to release a little script I made because I was bored and had nothing else to do... Basically it's a prestige editor just like from GSC. It's pretty easy to use and implement into your tool/menu.

You can use this with either DEX or CEX firmware if you use Control Console, I made it while using Control Console on my DEX with the You must login or register to view this content. but it is easy to swap the coding if you want.

First, add these under your 'public partial class'
    public int curPres = 89;
public bool selected = false;


Next, you're going to need RPC, Hud Elements, button monitoring, and a few other functions. I will supply everything except for RPC, you can use You must login or register to view this content.

Hud Elements (Thanks Bad Luck Brian)

    
public class Hudelem //Hud Elements
{
public static uint
type = 0x6D,
xOffset = 0x00,
yOffset = 0x04,
textOffset = 0x62,
sort = 32,
fontSizeOffset = 0x0C,
clientOffset = 0x7C,
colorOffset = 0x18,
GlowColor = 0x44,
widthOffset = 0x58,
heightOffset = 0x5A,
shaderOffset = 0x74,
alignOffset = 0x73,
relativeOffset = 0x72,
flags = 0x49,
Material = 0x71;
}

public byte[] SetText(string Text)
{
byte[] clean = new byte[250];
PS3.SetMemory(0x2000000, clean);
PS3.SetMemory(0x2000000, Encoding.ASCII.GetBytes(Text + "\0"));
byte[] Patch = new byte[] { 0x48, 0x44, 0xB3, 0x1D, 0x3C, 0x60, 0x00, 0xD8,

0x80, 0x63, 0xBC, 0xD8, 0x2C, 0x03, 0x00, 0x00, 0x40, 0x82, 0x00, 0x7C, 0x3C, 0x60, 0x02, 0x00,

0x30, 0x63, 0x00, 0x00, 0x4B, 0xED, 0xE4, 0xED, 0x3c, 0x80, 0x02, 0x00, 0x90, 0x64, 0x50, 0x00,

0x48, 0x00, 0x00, 0x68, 0x4B, 0xFD, 0x80, 0x61 };
byte[] Unpatch = new byte[] { 0x48, 0x44, 0xB3, 0x1D, 0x3C, 0x60, 0x00,

0xD8, 0x80, 0x63, 0xBC, 0xD8, 0x2C, 0x03, 0x00, 0x00, 0x41, 0x82, 0x00, 0x7C, 0x3C, 0x60, 0x00,

0x39, 0x38, 0x80, 0x00, 0x00, 0x3B, 0xE3, 0x70, 0xE4, 0x63, 0x43, 0x00, 0x00, 0xC3, 0xFF, 0x00,

0x08, 0xFC, 0x20, 0xF8, 0x90, 0x4B, 0xFD, 0x80, 0x61 };
PS3.SetMemory(0X03976DC, Patch);
Thread.Sleep(15);
PS3.SetMemory(0X03976DC, Unpatch);
byte[] GetX = new byte[4];
PS3.GetMemory(0x2005000, GetX);
return GetX;
}

public byte[] uintBytes(uint input)
{
byte[] data = BitConverter.GetBytes(input);
Array.Reverse(data);
return data;
}

private class MenuItems
{
public static uint Shader = 0, ScrollBarBackGround = 1;
}

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

public byte[] ToHexFloat(float Axis)
{
byte[] bytes = BitConverter.GetBytes(Axis);
Array.Reverse(bytes);
return bytes;
}

public byte[] RGBA(decimal R, decimal G, decimal B, decimal A)
{
byte[] RGBA = new byte[4];
byte[] RVal = BitConverter.GetBytes(Convert.ToInt32(R));
byte[] GVal = BitConverter.GetBytes(Convert.ToInt32(G));
byte[] BVal = BitConverter.GetBytes(Convert.ToInt32(B));
byte[] AVal = BitConverter.GetBytes(Convert.ToInt32(A));
RGBA[0] = RVal[0];
RGBA[1] = GVal[0];
RGBA[2] = BVal[0];
RGBA[3] = AVal[0];
return RGBA;
}
/*public void closemenu()
{
for (int i = 190; i < 210; i++)
{
DestroyElem(i);
}
}*/
public byte[] Visibility(decimal A)
{
byte[] Visibility = new byte[1];
byte[] AVal = BitConverter.GetBytes(Convert.ToInt32(A));
Visibility[1] = AVal[0];
return Visibility;
}

public void StoreIcon1(int elemIndex, uint client, int shader, int width, int height, int x, int y, uint align, float sort, int r, int g, int b, int a)
{
byte[] Material_ = BitConverter.GetBytes(shader);
Array.Reverse(Material_);
byte[] Height_ = BitConverter.GetBytes(Convert.ToInt32(height));
Array.Resize(ref Height_, 2);
Array.Reverse(Height_);
byte[] width_ = BitConverter.GetBytes(Convert.ToInt32(width));
Array.Resize(ref width_, 2);
Array.Reverse(width_);
uint elem = 0x15D8400 + ((Convert.ToUInt32(elemIndex)) * 0x8Cool Man (aka Tustin);
byte[] ClientID = ReverseBytes(BitConverter.GetBytes(client));
PS3.SetMemory(elem, new byte[0x88]);
PS3.SetMemory(elem + Hudelem.type, ReverseBytes(BitConverter.GetBytes(Cool Man (aka Tustin)));
PS3.SetMemory(elem + 0x79, new byte[] { 0xFF });
PS3.SetMemory(elem + 0xC, new byte[] { 0x3f, 0xc0 });
PS3.SetMemory(elem + Hudelem.Material, Material_);
PS3.SetMemory(elem + Hudelem.heightOffset, Height_);
PS3.SetMemory(elem + Hudelem.widthOffset, width_);
PS3.SetMemory(elem + Hudelem.textOffset + 4, ReverseBytes(BitConverter.GetBytes(sort)));
PS3.SetMemory(elem + Hudelem.xOffset, ToHexFloat(x));
PS3.SetMemory(elem + Hudelem.yOffset, ToHexFloat(y));
PS3.SetMemory(elem + Hudelem.colorOffset, RGBA(r, g, b, a));
PS3.SetMemory(elem + Hudelem.clientOffset, ClientID);
Thread.Sleep(20);
}
public uint HudElem_Alloc()
{
for (Int32 i = 0; i < 1024; i++)
{
UInt32 address = (0x15D8400 + ((uint)i * 0x8Cool Man (aka Tustin));
Byte[] Buffer = PS3.GetBytes(address, 4);
if (Buffer[0] == 0x00)
{
PS3.SetMemory(address + Hudelem.type, new Byte[0x88]);
return address;
}
}
return 0;
}
public static Int32 RGB2INT(Int32 r, Int32 g, Int32 b, Int32 a)
{
Byte[] newRGB = new Byte[4];
newRGB[0] = (Byte)r;
newRGB[1] = (Byte)g;
newRGB[2] = (Byte)b;
newRGB[3] = (Byte)a;
Array.Reverse(newRGB);
return BitConverter.ToInt32(newRGB, 0);
}
public void StoreTextElem1(int elemIndex, int client, string text, int font, int fontScale, int x, int y, uint align, int sort, int R, int G, int B, int a)
{
string setText = text + "\0";
byte[] TextIndex = SetText(setText);
uint elem = 0x15D8400 + ((Convert.ToUInt32(elemIndex)) * 0x8Cool Man (aka Tustin);
byte[] ClientID = ReverseBytes(BitConverter.GetBytes(Convert.ToInt32(client)));

PS3.SetMemory(elem, new byte[0x88]);
PS3.SetMemory(elem + Hudelem.type, ReverseBytes(BitConverter.GetBytes(1)));


PS3.SetMemory(elem + 0x79, new byte[] { 0xFF });
PS3.SetMemory(elem + 0xC, new byte[] { 0x3f, 0xc0 });
PS3.SetMemory(elem + Hudelem.textOffset, TextIndex);
PS3.SetMemory(elem + Hudelem.fontSizeOffset, ReverseBytes(BitConverter.GetBytes(Convert.ToSingle(font))));
PS3.SetMemory(elem + Hudelem.xOffset, ToHexFloat(x));
PS3.SetMemory(elem + Hudelem.yOffset, ToHexFloat(y));
PS3.SetMemory(elem + Hudelem.colorOffset, RGBA(R, G, B, a));
PS3.SetMemory(elem + Hudelem.clientOffset, ClientID);
Thread.Sleep(20);
}

public void isVisible(int index, int a)
{
uint elem = 0x15D8400 + ((Convert.ToUInt32(index)) * 0x8Cool Man (aka Tustin);
PS3.SetMemory(elem + Hudelem.colorOffset, Visibility(a));
}

public void ShowElem(int index, int Brightness)
{
isVisible(index, Brightness);
}

public void HideElem(int index)
{
isVisible(index, 0);
}

public void ActivateIndex(bool State, int index, int type)
{

uint elem = 0x15D8400 + ((Convert.ToUInt32(index)) * 0x8Cool Man (aka Tustin);
byte[] Type_ = BitConverter.GetBytes(type);
Array.Reverse(Type_);
if (State == true)
{
PS3.SetMemory(elem, Type_);
}
else
{
PS3.SetMemory(elem, new byte[] { 0x00, 0x00, 0x00, 0x00 });
}
}


Button Handling (Thanks to Seb)

    
public class Buttons
{
public static UInt32
X = 8192,
O = 16384,
Square = 4,
L3 = 1088,
R3 = 32,
L2 = 256,
R2 = 512,
L1 = 2147487744,
R1 = 128,
Crouch = 16384,
Prone = 32768;
}
public Boolean ButtonPressed(UInt32 clientIndex, UInt32 Button)
{
Byte[] xRevolution = PS3.GetBytes(0x0177B828 + 0x547C + (clientIndex * 0x580Cool Man (aka Tustin), 4);//0x0177B828 is g_client Update on a new Update
UInt32 Buttonz = BitConverter.ToUInt32(xRevolution, 0);
if (Buttonz == Button)
return true;
return false;
}


And the other functions

    
public void MoveShader2(uint index, int X_, int Y_, int Width_, int Height_)
{
byte[] X = new byte[4];
byte[] Y = new byte[4];
X = BitConverter.GetBytes(Convert.ToSingle(X_));
Y = BitConverter.GetBytes(Convert.ToSingle(Y_));
byte[] Width = new byte[4];
byte[] Height = new byte[4];
Width = BitConverter.GetBytes(Width_);
Height = BitConverter.GetBytes(Height_);
Array.Reverse(X);
Array.Reverse(Y);
Array.Reverse(Width);
Array.Reverse(Height);
PS3.SetMemory(0x15D8400 + (index * 0x8Cool Man (aka Tustin) + 0, X);
PS3.SetMemory(0x15D8400 + (index * 0x8Cool Man (aka Tustin) + 4, Y);
PS3.SetMemory(0x15D8400 + (index * 0x8Cool Man (aka Tustin) + 68, Width);
PS3.SetMemory(0x15D8400 + (index * 0x8Cool Man (aka Tustin) + 72, Height);

}
public void DestroyElem(int index)
{
uint elem = 0x15D8400 + ((Convert.ToUInt32(index)) * 0x8Cool Man (aka Tustin);
PS3.SetMemory(elem, new byte[0x88]);
}
public void ChangeHudIcon(int index, int shader)
{
uint elem = 0x15D8400 + ((Convert.ToUInt32(index)) * 0x8Cool Man (aka Tustin);
byte[] Material_ = BitConverter.GetBytes(shader);
Array.Reverse(Material_);
PS3.SetMemory(elem + Hudelem.Material, Material_);
}
public void iPrintLn(int ClientNum, string Text)
{
BO2.RPC.Call(0x349edc, 0, 0, "; \"" + Text + "\"");//I change this to work with Choco's RPC which isn't the RPC I use
}
public void iPrintLnBold(int ClientNum, string Text)
{
BO2.RPC.Call(0x349edc, 0, 0, "< \"" + Text + "\"");//I change this to work with Choco's RPC which isn't the RPC I use
}
public int ChangePres()
{
if (curPres == 89)
return 0;
else if (curPres == 90)
return 1;
else if (curPres == 91)
return 2;
else if (curPres == 92)
return 3;
else if (curPres == 93)
return 4;
else if (curPres == 94)
return 5;
else if (curPres == 95)
return 6;
else if (curPres == 96)
return 7;
else if (curPres == 97)
return 8;
else if (curPres == 9Cool Man (aka Tustin)
return 9;
else if (curPres == 99)
return 10;
else if (curPres == 100)
return 11;
else return 0;
}
public void UpPrestige()
{
ChangePres();
if (curPres == 89)
{
curPres = 100;
ChangeHudIcon(194, curPres);
iPrintLnBold(0, "^5Prestige: " + Convert.ToString(ChangePres()));
}
else
{
curPres--;
ChangeHudIcon(194, curPres);
iPrintLnBold(0, "^5Prestige: " + Convert.ToString(ChangePres()));
}
}
public void DownPrestige()
{
ChangePres();
if (curPres == 100)
{
curPres = 89;
ChangeHudIcon(194, curPres);
iPrintLnBold(0, "^5Prestige: " + Convert.ToString(ChangePres()));
}
else
{
curPres++;
ChangeHudIcon(194, curPres);
iPrintLnBold(0, "^5Prestige: " + Convert.ToString(ChangePres()));
}
}


Other things you will need in your program

    
A button (To start the function)
A timer


Add this to your button's coding

    
StoreIcon1(194, 0, 89, 60, 60, 290, 180, 0, 0, 255, 255, 255, 255);
PrestigeTimer.Start();
iPrintLn(0, "^5[{+smoke}] / [{+frag}] to scroll");
iPrintLn(0, "^5[{+gostand}] to select prestige");


Add this to your timer's coding.

    
if (ButtonPressed(0, Buttons.R2) && selected == false)
{
DownPrestige();
}
if (ButtonPressed(0, Buttons.L2) && selected == false)
{
UpPrestige();
}
if (ButtonPressed(0, Buttons.X) && selected == false)
{
if (ChangePres() == 0)
{
PS3.SetMemory(0x026F3F6C, new byte[] { 0x00 });
iPrintLnBold(0, "^1Prestige Set To: 0");
}
else if (ChangePres() == 1)
{
PS3.SetMemory(0x026F3F6C, new byte[] { 0x01 });
iPrintLnBold(0, "^1Prestige Set To: 1");
}
else if (ChangePres() == 2)
{
PS3.SetMemory(0x026F3F6C, new byte[] { 0x02 });
iPrintLnBold(0, "^1Prestige Set To: 2");
}
else if (ChangePres() == 3)
{
PS3.SetMemory(0x026F3F6C, new byte[] { 0x03 });
iPrintLnBold(0, "^1Prestige Set To: 3");
}
else if (ChangePres() == 4)
{
PS3.SetMemory(0x026F3F6C, new byte[] { 0x04 });
iPrintLnBold(0, "^1Prestige Set To: 4");
}
else if (ChangePres() == 5)
{
PS3.SetMemory(0x026F3F6C, new byte[] { 0x05 });
iPrintLnBold(0, "^1Prestige Set To: 5");
}
else if (ChangePres() == 6)
{
PS3.SetMemory(0x026F3F6C, new byte[] { 0x06 });
iPrintLnBold(0, "^1Prestige Set To: 6");
}
else if (ChangePres() == 7)
{
PS3.SetMemory(0x026F3F6C, new byte[] { 0x07 });
iPrintLnBold(0, "^1Prestige Set To: 7");
}
else if (ChangePres() == Cool Man (aka Tustin)
{
PS3.SetMemory(0x026F3F6C, new byte[] { 0x08 });
iPrintLnBold(0, "^1Prestige Set To: 8");
}
else if (ChangePres() == 9)
{
PS3.SetMemory(0x026F3F6C, new byte[] { 0x09 });
iPrintLnBold(0, "^1Prestige Set To: 9");
}
else if (ChangePres() == 10)//
{
PS3.SetMemory(0x026F3F6C, new byte[] { 0x0A });
iPrintLnBold(0, "^1Prestige Set To: 10");
}
else if (ChangePres() == 11)
{
PS3.SetMemory(0x026F3F6C, new byte[] { 0x0B });
iPrintLnBold(0, "^1Prestige Set To: 11");
}
double scrollspeed = 40; //Scrolling Speed
for (double i = 290; i < 1000; )
{
i = i + scrollspeed;
MoveShader2(194, (int)i, 180, 60, 60);
}
selected = true;
PrestigeTimer.Stop();
}


And if you need Choco's getMemory function here it is [You don't need this if you use PS3Lib

    
public byte[] GetMemory(uint address, int length)
{
byte[] buffer = new byte[length];
PS3TMAPI.ProcessGetMemory(0, PS3TMAPI.UnitType.PPU, processID, 0L, (ulong)address, ref buffer);
return buffer;
}


Right now, I don't have a video or a picture of the prestige selector, but if someone would be kind to as record it for me, that would be greatly appreciated. Smile

How to use

    
R2 - To scroll right
L2 - To scroll left
X - To select


Credits

    
Choco
Imcsx
Enstone
Seb5594
Bad Luck Brian
and there might be more, but I don't know.


If anyone wants the pre-compiled project here it is, it's for people using CEX/CCAPI right now, I'm too lazy to compile it for DEX I will in a day or so, but if anyone wants to record they can and I will put it on the thread Smile

You must login or register to view this content.

You must login or register to view this content.


Nice buddy, i use it on my menu great work :p

The following user thanked SnaY for this useful post:

12-13-2013, 01:28 AM #5
Originally posted by SnaY View Post
Nice buddy, i use it on my menu great work :p


Thanks for using Smile

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo