Can someone explain this to me?

08/06/2020 18:00 bashondegek#1
I've got this in Redux:

Code:
/// <summary>
///  [0x400000000]
/// </summary>
TopGuildLeader = 1U << 34, //17179869184,
Its for the Halo's.
I upgraded the Client to 5079 (rest is working and Packets are no problem anymore).

When i try to add this to myself, with a custom command (its adding the 'NoBody' status). and then my Character disappears...

Code:
/// <summary>
/// [0x00000004]
/// </summary>
NoBody = 1U << 2,
It looks like the bitshift isn't correct, but i doubt it is the problem.

Is there anybody that can help me?

Client should not be the problem, since Halo's were added in 5078 if i'm right.

Kind regards.
08/07/2020 03:55 Latyos#2
It should be 1UL << 34.

1U means unsigned integer (uint). Unsigned integers have 32 bits and can't have a value bigger than 4,294,967,295 and smaller than 0. So after 31 bitshifts, 32nd will just reset the value

(1U << 32 == 1U << 0)

1UL on the other hand, means unsigned long (ulong) and can take absurdly high values and most importantly, can shift bits 63 times in one direction (64th will reset again)

(1UL << 64 == 1UL << 0 == 1U << 0)

[Only registered and activated users can see links. Click Here To Register...]
08/07/2020 09:18 bashondegek#3
Quote:
Originally Posted by Latyos View Post
It should be 1UL << 34.

1U means unsigned integer (uint). Unsigned integers have 32 bits and can't have a value bigger than 4,294,967,295 and smaller than 0. So after 31 bitshifts, 32nd will just reset the value

(1U << 32 == 1U << 0)

1UL on the other hand, means unsigned long (ulong) and can take absurdly high values and most importantly, can shift bits 63 times in one direction (64th will reset again)

(1UL << 64 == 1UL << 0 == 1U << 0)

[Only registered and activated users can see links. Click Here To Register...]
Thanks for the explanation! Thats seems to work indeed.
Problem that i'm having now, is that the client is not showing the effect anyways...
When i try it with the older effects its working pretty good, so the luckytime effects are working... But still not the halo's..

Its not giving me any errors or something.

Patched the client from 5065 to 5082, so that shouldn't be the problem..
08/07/2020 09:54 Latyos#4
Quote:
Originally Posted by bashondegek View Post
Thanks for the explanation! Thats seems to work indeed.
Problem that i'm having now, is that the client is not showing the effect anyways...
When i try it with the older effects its working pretty good, so the luckytime effects are working... But still not the halo's..

Its not giving me any errors or something.

Patched the client from 5065 to 5082, so that shouldn't be the problem..
try "/string 10 gamemain" or "/string gamemain 10" (not really sure about the order). If you see halo on your character, there's no issue with files. Else, you are probably on wrong version (still can check "/c3/effect/other" for "gamemain" directory.)

If string command works, there's probably issue in statuseffect.ini file. Try to locate gamemain entry there as well.
08/07/2020 10:06 bashondegek#5
Quote:
Originally Posted by Latyos View Post
try "/string 10 gamemain" or "/string gamemain 10" (not really sure about the order). If you see halo on your character, there's no issue with files. Else, you are probably on wrong version (still can check "/c3/effect/other" for "gamemain" directory.)

If string command works, there's probably issue in statuseffect.ini file. Try to locate gamemain entry there as well.

Never knew that.
Guess something else is wrong, since i'm seeing fireworks... haha

I've got the effects in the c3/effect/other folder...
Seeing the dds files there which are containing: Top-Trojan and Top Archer for example.


Update:
/String is doing other stuff, its not related to the statuseffects..
08/07/2020 13:43 Latyos#6
Quote:
Originally Posted by bashondegek View Post
Never knew that.
Guess something else is wrong, since i'm seeing fireworks... haha

I've got the effects in the c3/effect/other folder...
Seeing the dds files there which are containing: Top-Trojan and Top Archer for example.


Update:
/String is doing other stuff, its not related to the statuseffects..
Do you see "gamemain" folder?

Also sorry, forgot string command in redux was ass.

Code:
private static void Process_String(Player client, string[] command)
        {
            if (client.Account.Permission < PlayerPermission.GM)
                return;
            if (command.Length < 2)
                client.SendMessage("Error: Proper format is /string Content");
            else
                client.SendToScreen(StringsPacket.Create(client.UID, (StringAction)int.Parse(command[1]), command2[2]), true);
        }
Replace it with this instead. Then try "/string 10 gamemain".
08/07/2020 14:19 bashondegek#7
Quote:
Originally Posted by Latyos View Post
Do you see "gamemain" folder?

Also sorry, forgot string command in redux was ass.

Code:
private static void Process_String(Player client, string[] command)
        {
            if (client.Account.Permission < PlayerPermission.GM)
                return;
            if (command.Length < 2)
                client.SendMessage("Error: Proper format is /string Content");
            else
                client.SendToScreen(StringsPacket.Create(client.UID, (StringAction)int.Parse(command[1]), command2[2]), true);
        }
Replace it with this instead. Then try "/string 10 gamemain".
Cool! That seems to work...!
Seeing the Halo at my own character now.

Then there is something wrong with my packets or the enum?