How do i solve these skill numbers

03/06/2020 19:28 cocoemre#1
i want to add new effect for my new event. everythings is okay. i was edit new effect. but i cant add this effect for my c# source. what is this numbers ?
I think it is an encrypted system ?. if so how do i decrypt this encryption system ?. Thank you for your help..
03/06/2020 20:55 Asphy×ia#2
#s are generated using a bitwise shift that coincides with statuseffect.ini I believe.

Much easier to look at if you use:

1UL << 38 which is the same as 274877906944
1UL << 39 = 549755813888
1UL << 40 = 1099511627776
1UL << 41 = 2199023255552
1UL << 42 = 4398046511104
1UL << 43 = 8796093022208


Search before you post, this has been answered a few times.
03/06/2020 20:57 Relic#3
You need to send the "10017 - MsgUserAttrib" packet to the client with the correct StatusType. The packet structure is outlined in Spirited's co wiki [Only registered and activated users can see links. Click Here To Register...]

I'd check out how it's handled in WorldConquer or CandyConquer source if I were you.
03/07/2020 09:36 cocoemre#4
Yes, it looks good i guess i will solve it when i go home.
Can someone give me this codes;
1UL >> 62, ???????
1UL >> 63 = ???????
1UL >> 64 = ???????
1UL >> 65 = ???????
1UL >> 66 = ???????
1UL >> 67 = ???????
03/07/2020 20:43 Spirited#5
Quote:
Originally Posted by cocoemre View Post
Yes, it looks good i guess i will solve it when i go home.
Can someone give me this codes;
1UL >> 62, ???????
1UL >> 63 = ???????
1UL >> 64 = ???????
1UL >> 65 = ???????
1UL >> 66 = ???????
1UL >> 67 = ???????
So, let's get started with a small correction: these examples are backwards. You should be doing left bit shifts, not right. With that out of the way, these are integer literals for a bit shift from unsigned long 1. In other words, the C# compiler understands how to resolve this operation for you as part of the language. If you want to learn how to resolve this yourself by hand, then you'll need to understand binary. In very basic sense,

Code:
0 decimal = 0 binary
1 decimal = 1 binary
2 decimal = 10 binary
3 decimal = 11 binary
4 decimal = 100 binary
etc.
Binary is just a base 2 number system (0 and 1). For reference, decimal is a base 10 system (0 through 9).
This can be represented by the number of bits a 1 can be shifted over by. So for example,

Code:
1 << 0 = 1 binary = 1 decimal
1 << 1 = 10 binary = 2 decimal
1 << 2 = 100 binary = 4 decimal
1 << 3 = 1000 binary = 8 decimal
A really good way to increment this quickly by hand in decimal is to remember your powers of 2. (2 ^ 4) in decimal is the same as 1 << 4. Simply put, you can do this because binary places are powers of 2 in decimal.

You don't have to do any of this by hand though. If you start up a Calculator on Windows or Mac, there's a Programmer mode you can set it in from the menu. Then, you'll have access to the bit shift operators. It'll show you that number in binary, decimal, hexadecimal, and octal. You don't have to convert any of these shifts into decimals though. As I said, the language understands these operations as literals, so you can just place them in your source instead of using those weird decimal numbers that make little sense.

Edit: Here's a full tutorial I found on bit flags (which is what status effects are):
[Only registered and activated users can see links. Click Here To Register...]

But as a summary, you can apply multiple status effects using bitwise operations and bit shifting. Each 1 in the bitmap indicates that the status effect is enabled. So for example, you can be both poisoned (1 << 1 or 10 in binary) and blue name flashing (1 << 0 or 1 in binary), which is 11 in binary. You combine them using bitwise OR operations. More info is in that tutorial I linked you to.
03/08/2020 03:56 Asphy×ia#6
Quote:
Originally Posted by Spirited View Post
So, let's get started with a small correction: these examples are backwards. You should be doing left bit shifts, not right.
I was mistaken when replying to that. Spirited is correct, it should be a left shift, not right.
03/08/2020 16:15 cocoemre#7
it's hard for me to do this.. I solved the problem like this;
I used one of the effects ready in the source. because i was unable to put a new one.
you can use one of the ready ones. for example : in source have topssfb effect i was change this effect to (example): topconquer.

I will review this issue later and try to understand it..
I'm currently inexperienced to understand this..
Thanks for everything guys