| View previous topic :: View next topic |
| Author |
Message |
Frouk Grandmaster Cheater
Reputation: 5
Joined: 22 Jun 2021 Posts: 510
|
Posted: Sat Aug 07, 2021 5:17 am Post subject: Bits |
|
|
How i can use bits to write in integer
Those bits
| Code: | -- Bits are in decimal
1 -- Default
2 -- Multiply speed
4 -- Multiply jump
8 -- Multiply damage
16 -- Multiply defence
32 -- Multiply critical hit
64 -- Multiply defence,critical,damage
128 --Unknown? |
|
|
| Back to top |
|
 |
LeFiXER Grandmaster Cheater Supreme
Reputation: 20
Joined: 02 Sep 2011 Posts: 1069 Location: 0x90
|
Posted: Sat Aug 07, 2021 8:03 am Post subject: |
|
|
Bits are not decimal. They're base 2. Decimal is base 10 but your request is somewhat confusing.
You want to convert integer to bits and vice-versa? |
|
| Back to top |
|
 |
TheyCallMeTim13 Wiki Contributor
Reputation: 51
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25815 Location: The netherlands
|
Posted: Sat Aug 07, 2021 10:57 am Post subject: |
|
|
I'm not sure what 1 means. If it's an uneven value all other bits are ignored ?
Anyhow, ignoring the weird bit 1, if you wish to activate Multiply damage (8) then
| Code: |
writeBytes(address,readBytes(address,1) | 8)
|
to disable Multiply damage:
| Code: |
writeBytes(address,readBytes(address,1) & ~8)
|
to activate both Multiply damage (8) and Multiply critical hit (32)
| Code: |
writeBytes(address,readBytes(address,1) | 8 | 32)
|
to deactivate both of them at the same time:
| Code: |
writeBytes(address,readBytes(address,1) & ~( 8 | 32))
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Frouk Grandmaster Cheater
Reputation: 5
Joined: 22 Jun 2021 Posts: 510
|
Posted: Sun Aug 08, 2021 12:42 pm Post subject: |
|
|
| Thanks for help |
|
| Back to top |
|
 |
|