Post: Clan Tag Problem/error coding in C#
10-05-2015, 12:40 AM #1
(adsbygoogle = window.adsbygoogle || []).push({});
I've said multiple times I'm new to C# and I'm getting used to it and I have a problem so I've imported this code from Adrians OPEN SOURCE tool and I seem to get an error here.
You must login or register to view this content.

Possibly cause I'm using MetroTextbox?

The Code I found:
    
private void SetClan(uint offset, string input)
{
PS3.SetMemory(offset, new byte[6]);
if (input.Length == 1)
{
this.CombSetClan = this.Combine(new byte[7], Encoding.ASCII.GetBytes(input).Reverse<byte>().ToArray<byte>()).Reverse<byte>().ToArray<byte>();
}
else if (input.Length == 2)
{
this.CombSetClan = this.Combine(new byte[6], Encoding.ASCII.GetBytes(input).Reverse<byte>().ToArray<byte>()).Reverse<byte>().ToArray<byte>();
}
else if (input.Length == 3)
{
this.CombSetClan = this.Combine(new byte[5], Encoding.ASCII.GetBytes(input).Reverse<byte>().ToArray<byte>()).Reverse<byte>().ToArray<byte>();
}
else if (input.Length == 4)
{
this.CombSetClan = this.Combine(new byte[4], Encoding.ASCII.GetBytes(input).Reverse<byte>().ToArray<byte>()).Reverse<byte>().ToArray<byte>();
}
if (input.Length > 0)
{
PS3.SetMemory(offset, BitConverter.GetBytes((ulong)(BitConverter.ToUInt64(this.CombSetClan, 0) * ((ulong)0x40L))));
}
}

private byte[] Combine(byte[] Arr1, byte[] Arr2)
{
byte[] array = new byte[Arr1.Length + Arr2.Length];
Buffer.BlockCopy(Arr1, 0, array, 0, Arr1.Length);
Buffer.BlockCopy(Arr2, 0, array, Arr1.Length, Arr2.Length);
return array;
}

private void metroButton15_Click(object sender, EventArgs e)
{
SetClan(0x2708238, metroTextBox3.Text);
}
(adsbygoogle = window.adsbygoogle || []).push({});
10-05-2015, 04:27 AM #2
Adrian
Adrian is back!
Originally posted by Elitexboxer View Post
I've said multiple times I'm new to C# and I'm getting used to it and I have a problem so I've imported this code I found off a website and I seem to get an error here.
You must login or register to view this content.

Possibly cause I'm using MetroTextbox?

The Code I found:
    
private void SetClan(uint offset, string input)
{
PS3.SetMemory(offset, new byte[6]);
if (input.Length == 1)
{
this.CombSetClan = this.Combine(new byte[7], Encoding.ASCII.GetBytes(input).Reverse<byte>().ToArray<byte>()).Reverse<byte>().ToArray<byte>();
}
else if (input.Length == 2)
{
this.CombSetClan = this.Combine(new byte[6], Encoding.ASCII.GetBytes(input).Reverse<byte>().ToArray<byte>()).Reverse<byte>().ToArray<byte>();
}
else if (input.Length == 3)
{
this.CombSetClan = this.Combine(new byte[5], Encoding.ASCII.GetBytes(input).Reverse<byte>().ToArray<byte>()).Reverse<byte>().ToArray<byte>();
}
else if (input.Length == 4)
{
this.CombSetClan = this.Combine(new byte[4], Encoding.ASCII.GetBytes(input).Reverse<byte>().ToArray<byte>()).Reverse<byte>().ToArray<byte>();
}
if (input.Length > 0)
{
PS3.SetMemory(offset, BitConverter.GetBytes((ulong)(BitConverter.ToUInt64(this.CombSetClan, 0) * ((ulong)0x40L))));
}
}

private byte[] Combine(byte[] Arr1, byte[] Arr2)
{
byte[] array = new byte[Arr1.Length + Arr2.Length];
Buffer.BlockCopy(Arr1, 0, array, 0, Arr1.Length);
Buffer.BlockCopy(Arr2, 0, array, Arr1.Length, Arr2.Length);
return array;
}

private void metroButton15_Click(object sender, EventArgs e)
{
SetClan(0x2708238, metroTextBox3.Text);
}


Yes the bottom part
    SetClan(0x2708238, metroTextBox3.Text);

goes in your button. And make sure you name it to your textBox.

all the other stuff above it just goes directly above you setClan button.
10-05-2015, 04:30 AM #3
Originally posted by Adrian View Post
Yes the bottom part
    SetClan(0x2708238, metroTextBox3.Text);

goes in your button. And make sure you name it to your textBox.

all the other stuff above it just goes directly above you setClan button.


I've done that but like I said I have an error with Reverse<byte>() it shows a red line under all the Reverse<byte>()
10-05-2015, 04:30 AM #4
Originally posted by Adrian View Post
Yes the bottom part
    SetClan(0x2708238, metroTextBox3.Text);

goes in your button. And make sure you name it to your textBox.

all the other stuff above it just goes directly above you setClan button.


You must login or register to view this content.
10-05-2015, 04:32 AM #5
Adrian
Adrian is back!
Originally posted by Elitexboxer View Post
You must login or register to view this content.


Picture doesnt seem to be working. Is the application decompiled?
10-05-2015, 04:34 AM #6
Originally posted by Adrian View Post
Picture doesnt seem to be working. Is the application decompiled?


Look here for the image You must login or register to view this content.
10-05-2015, 04:37 AM #7
Adrian
Adrian is back!
Originally posted by Elitexboxer View Post
Look here for the image You must login or register to view this content.


Is this a decompiled form?
10-05-2015, 04:39 AM #8
Originally posted by Adrian View Post
Is this a decompiled form?


No I go it from you Open Source Non-Host End Game I believe
10-05-2015, 04:40 AM #9
I consider I might've forgotten some code?
10-05-2015, 04:44 AM #10
Adrian
Adrian is back!
Originally posted by Elitexboxer View Post
I consider I might've forgotten some code?


Oh so you are using my open source non host end game?

Put this above your button:
    private void SetClan(uint offset, string input)
{
PS3.SetMemory(offset, new byte[6]);
if (input.Length == 1)
{
CombSetClan = Combine(new byte[7], Encoding.ASCII.GetBytes(input).Reverse<byte>().ToArray<byte>()).Reverse<byte>().ToArray<byte>();
}
else
{
if (input.Length == 2)
{
CombSetClan = Combine(new byte[6], Encoding.ASCII.GetBytes(input).Reverse<byte>().ToArray<byte>()).Reverse<byte>().ToArray<byte>();
}
else
{
if (input.Length == 3)
{
CombSetClan = Combine(new byte[5], Encoding.ASCII.GetBytes(input).Reverse<byte>().ToArray<byte>()).Reverse<byte>().ToArray<byte>();
}
else
{
if (input.Length == 4)
{
CombSetClan = Combine(new byte[4], Encoding.ASCII.GetBytes(input).Reverse<byte>().ToArray<byte>()).Reverse<byte>().ToArray<byte>();
}
}
}
}
if (input.Length > 0)
{
PS3.SetMemory(offset, BitConverter.GetBytes(BitConverter.ToUInt64(CombSetClan, 0) * 64uL));
}
}
private byte[] Combine(byte[] Arr1, byte[] Arr2)
{
byte[] array = new byte[Arr1.Length + Arr2.Length];
Buffer.BlockCopy(Arr1, 0, array, 0, Arr1.Length);
Buffer.BlockCopy(Arr2, 0, array, Arr1.Length, Arr2.Length);
return array;
}


then something in a button would look like so:
    SetClan(0x2708238, textBox1.Text);//remember to change to your textBox


you will also need this in your application with the new API stuff
    private byte[] CombSetClan;

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo