Résolu C# Classes en couleurs ? Besoin d'explications

Axlnh

Premium
Inscription
3 Avril 2014
Messages
1 945
Réactions
676
Points
3 551
RGCoins
0
Salut, comme dit dans le titre je code un tool BO2 en C# et j'ai les codes mais je ne comprend pas trop comment les utiliser avec mes textbox :/

Voilà à quoi cela ressemble sans les codes :
739417Capture.png

Voilà les codes que j'ai :
Code:
this.SetClass(this.Class1Offset, "^1Unlock All");
            this.SetClass(this.Class1Offset + 0x10, "^4By");
            this.SetClass(this.Class1Offset + 0x20, "^2ZeK");
            this.SetClass(this.Class1Offset + 0x30, "^3Trac");
            this.SetClass(this.Class1Offset + 0x40, "^5Modz");
            this.SetClass(this.Class1Offset + 80, "^8--------");
            this.SetClass(this.Class1Offset + 0x60, "^5Forum:");
            this.SetClass(this.Class1Offset + 0x70, "^1Pepsyz");
            this.SetClass(this.Class1Offset + 0x80, "^2Modding");
            this.SetClass(this.Class1Offset + 0x90, "^6.fr");
            this.SetClass(this.Class1Offset + 0x100, "^2Peace!!");
 
Salut,

Tu l'es à trouver comment eux ? :mmh:
Car moi j'ai ça comme ça

public void SetClass(uint offset, string input)
{
PS3.SetMemory(offset, new byte[16]);
byte[] Multiplier = new byte[] { 0x04 };
byte[] inputBytes = Encoding.ASCII.GetBytes(input);
PS3.SetMemory(offset, BO2Classes.Multiply(inputBytes, Multiplier));
}

uint Class1Offset = 0x02707AC7;


public static byte[] Multiply(this byte[] A, byte[] B)
{
List<byte> ans = new List<byte>();

byte ov, res;
int idx = 0;
for (int i = 0; i < A.Length; i++)
{
ov = 0;
for (int j = 0; j < B.Length; j++)
{
short result = (short)(A * B[j] + ov);
ov = (byte)(result >> 8);
res = (byte)result;
idx = i + j;
if (idx < (ans.Count))
ans = _add_(ans, res, idx);
else ans.Add(res);
}
if (ov > 0)
if (idx + 1 < (ans.Count))
ans = _add_(ans, ov, idx + 1);
else ans.Add(ov);
}

return ans.ToArray();
}
private static List<byte> _add_(List<byte> A, byte b, int idx = 0, byte rem = 0)
{
short sample = 0;
if (idx < A.Count)
{
sample = (short)((short)A[idx] + (short)b);
A[idx] = (byte)(sample % 256);
rem = (byte)((sample - A[idx]) % 255);
if (rem > 0)
return _add_(A, (byte)rem, idx + 1);
}
else A.Add(b);

return A;

SetClass(Class1Offset, logInNormalTextBox4.Text);
SetClass(Class1Offset + 0x10, logInNormalTextBox5.Text);
SetClass(Class1Offset + 0x20, logInNormalTextBox6.Text);
SetClass(Class1Offset + 0x30, logInNormalTextBox7.Text);
SetClass(Class1Offset + 0x40, logInNormalTextBox8.Text);
SetClass(Class1Offset + 0x50, logInNormalTextBox9.Text);
SetClass(Class1Offset + 0x60, logInNormalTextBox10.Text);
SetClass(Class1Offset + 0x70, logInNormalTextBox11.Text);
SetClass(Class1Offset + 0x80, logInNormalTextBox12.Text);
SetClass(Class1Offset + 0x90, logInNormalTextBox13.Text);


this.logInNormalTextBox4.Text = "^1" + this.logInNormalTextBox14.Text;
this.logInNormalTextBox5.Text = "^2" + this.logInNormalTextBox14.Text;
this.logInNormalTextBox6.Text = "^3" + this.logInNormalTextBox14.Text;
this.logInNormalTextBox7.Text = "^4" + this.logInNormalTextBox14.Text;
this.logInNormalTextBox8.Text = "^5" + this.logInNormalTextBox14.Text;
this.logInNormalTextBox9.Text = "^6" + this.logInNormalTextBox14.Text;
this.logInNormalTextBox10.Text = "^1" + this.logInNormalTextBox14.Text;
this.logInNormalTextBox11.Text = "^2" + this.logInNormalTextBox14.Text;
this.logInNormalTextBox12.Text = "^3" + this.logInNormalTextBox14.Text;
this.logInNormalTextBox13.Text = "^4" + this.logInNormalTextBox14.Text;
 
Salut, merci je vais essayer tout ça et je reviens vers toi.
Je les ai trouver sur un topic un peu foireux (ne trouvant pas sur RG et les concurrents)

De toute façon tout forum est jaloux de :RG: ça se vois à des KM ^^
Daccord pas de problème :)
 
J'ai pas bien compris, le code dans le spoiler "Set Classes" est à mettre sur le bouton "Send" pour une seule classe ?
Et le code dans le spoiler "Nouvel Form BO2CLASSES" j'ai pas compris, je dois créer une nouvelle Form appeller BO2CLASSES et y mettre le code ?
 
J'ai pas bien compris, le code dans le spoiler "Set Classes" est à mettre sur le bouton "Send" pour une seule classe ?
Et le code dans le spoiler "Nouvel Form BO2CLASSES" j'ai pas compris, je dois créer une nouvelle Form appeller BO2CLASSES et y mettre le code ?

Moi j'ai fais les 10 classes dans un seul bouttons
Yep je l'ai appelé : BO2Classes
 
Je comprend pas dans ce cas là
Je créer la Form et je l'appelle BO2CLASSES
Je rentre le code dans BO2CLASSES_Load
Et ça m'affiche des erreurs, il y a un using ou autre ?
 
Salut,

Tu l'es à trouver comment eux ? :mmh:
Car moi j'ai ça comme ça

public void SetClass(uint offset, string input)
{
PS3.SetMemory(offset, new byte[16]);
byte[] Multiplier = new byte[] { 0x04 };
byte[] inputBytes = Encoding.ASCII.GetBytes(input);
PS3.SetMemory(offset, BO2Classes.Multiply(inputBytes, Multiplier));
}

uint Class1Offset = 0x02707AC7;


public static byte[] Multiply(this byte[] A, byte[] B)
{
List<byte> ans = new List<byte>();

byte ov, res;
int idx = 0;
for (int i = 0; i < A.Length; i++)
{
ov = 0;
for (int j = 0; j < B.Length; j++)
{
short result = (short)(A * B[j] + ov);
ov = (byte)(result >> 8);
res = (byte)result;
idx = i + j;
if (idx < (ans.Count))
ans = _add_(ans, res, idx);
else ans.Add(res);
}
if (ov > 0)
if (idx + 1 < (ans.Count))
ans = _add_(ans, ov, idx + 1);
else ans.Add(ov);
}

return ans.ToArray();
}
private static List<byte> _add_(List<byte> A, byte b, int idx = 0, byte rem = 0)
{
short sample = 0;
if (idx < A.Count)
{
sample = (short)((short)A[idx] + (short)b);
A[idx] = (byte)(sample % 256);
rem = (byte)((sample - A[idx]) % 255);
if (rem > 0)
return _add_(A, (byte)rem, idx + 1);
}
else A.Add(b);

return A;

SetClass(Class1Offset, logInNormalTextBox4.Text);
SetClass(Class1Offset + 0x10, logInNormalTextBox5.Text);
SetClass(Class1Offset + 0x20, logInNormalTextBox6.Text);
SetClass(Class1Offset + 0x30, logInNormalTextBox7.Text);
SetClass(Class1Offset + 0x40, logInNormalTextBox8.Text);
SetClass(Class1Offset + 0x50, logInNormalTextBox9.Text);
SetClass(Class1Offset + 0x60, logInNormalTextBox10.Text);
SetClass(Class1Offset + 0x70, logInNormalTextBox11.Text);
SetClass(Class1Offset + 0x80, logInNormalTextBox12.Text);
SetClass(Class1Offset + 0x90, logInNormalTextBox13.Text);

this.logInNormalTextBox4.Text = "^1" + this.logInNormalTextBox14.Text;
this.logInNormalTextBox5.Text = "^2" + this.logInNormalTextBox14.Text;
this.logInNormalTextBox6.Text = "^3" + this.logInNormalTextBox14.Text;
this.logInNormalTextBox7.Text = "^4" + this.logInNormalTextBox14.Text;
this.logInNormalTextBox8.Text = "^5" + this.logInNormalTextBox14.Text;
this.logInNormalTextBox9.Text = "^6" + this.logInNormalTextBox14.Text;
this.logInNormalTextBox10.Text = "^1" + this.logInNormalTextBox14.Text;
this.logInNormalTextBox11.Text = "^2" + this.logInNormalTextBox14.Text;
this.logInNormalTextBox12.Text = "^3" + this.logInNormalTextBox14.Text;
this.logInNormalTextBox13.Text = "^4" + this.logInNormalTextBox14.Text;
On le met ou le code "Nouvelle Form BO2Classe"
 
On le met ou le code "Nouvelle Form BO2Classe"

Tu crée une nouvel form.cs nommé : BO2Classe.cs puis tu colles le code dedans.
Sinon je crée vite fais une form puis je la partagerais. Pour vous aidés
 
Bonjour,

Ton topic est résolu ?
Clique sur 'Cette réponse a répondu à ma question' si quelqu'un a su t'aider, pour le remercier et pouvoir déplacer ton topic dans la section adéquate.



Bonne après-midi,
Aigeane SEC
 
Retour
Haut