Re: [Discovery] Mixing pattern
Oh, nice work.
But it make sense that it has to be 2^x ^^
maybe try some id's like 2^21 +2^9 or ?
I try to help xD
Re: [Discovery] Mixing pattern
I tried a lot of things. When i put another number than 9 to 16, I only see the text "Mixing:" with no stats underneath.
I made a list of weapons with infos from 2^8 to 2^18 but my game crashed on login :D
Re: [Discovery] Mixing pattern
Rofl.
Hm don't know how to tell you what I want to say ^^.
It's has nothing to do with the engone.exe in so far as there has been something added, because we're using an old one, that is much older than the mixing system .
So, I wonder where the effects come from (where the code is).
Re: [Discovery] Mixing pattern
Our engine has mixing in it if i recall correctly. The one who released the files just deleted those parts from the server files. Just like D4 was missing. (not 100% sure)
Re: [Discovery] Mixing pattern
bitaccess = 32-bits??? flag 0/1 for 0-31 = 32 really values makes stuffs
Each bit in a variable can be addressed individually using bitwise operators
Re: [Discovery] Mixing pattern
Quote:
Originally Posted by
Lineage1563
Each bit in a variable can be addressed individually using bitwise operators
very true...
Re: [Discovery] Mixing pattern
Well the bitmarks in the Info table are
2^0 = 1 = equipped
2^1 = 2 ?
2^2 = 4 ?
2^3 = 8 = cheat
2^4 = 16 = storage
2^5 = 32 ?
2^6 = 64 = polished
2^7 = 128 = bound
2^8 and up = nothing but crashes
That's just how mixing works.. I just didnt use bimarks but powers of 2... Since they represent the bitmarks.
Re: [Discovery] Mixing pattern
For C++:
PHP Code:
//Stones:
define Stone_of_Shadow = 0x00000100
define Stone_of_Holy = 0x00000200
define Stone_of_Fire = 0x00000400
define Stone_of_Ice = 0x00000800
define Stone_of_Lightning = 0x00001000
define Stone_of_Poison = 0x00002000
define Stone_of_Paralyse = 0x00004000
define Stone_of_Strenght = 0x00008000
define Stone_of_Skill = 0x00010000
//Levels of stones:
define Mix_Level_1 = 0x01000000
define Mix_Level_2 = 0x00800000
//Some other states:
define Item_Equipped = 0x00000001
define Item_Cheated = 0x00000008
define Item_Storage = 0x00000010
define Item_Polished = 0x00000040
define Item_Bounded = 0x00000080
Yeah I found nothing about ..
Code:
Stone of Mystery
Stone of Demon Blood
Anyways in C++ you would do so:
PHP Code:
//Stone of Shadow LVL1..
Item_State = Mix_Level_1 | Stone_of_Shadow;
//Stone of Shadow LVL2
Item_State = Mix_Level_2 | Stone_of_Shadow;
//Stone of Holy LVL 1
Item_State = Mix_Level_1 | Stone_of_Holy ;
//Stone of Holy LVL 2
Item_State = Mix_Level_2 | Stone_of_Holy ;
...
/*
Do you really want to write me the whole list again ?
*/
//make my item bounded
Item_State |= Item_Bounded;
//make it cheated.. because i did now..
Item_State |= Item_Cheated;
Anyways.. I believe it's easyer to read .. this way ;)
Re: [Discovery] Mixing pattern
One questin.
What happens if you set the info to 17 ?
would it be equipped and stored ?
Re: [Discovery] Mixing pattern
Quote:
Originally Posted by
divinedignity
One questin.
What happens if you set the info to 17 ?
would it be equipped and stored ?
I believe .. yes .. I don't think the MainSvr check for :
Can't be equipped when stored..
or can't be stored when equipped..
I think they don't check it at loading..
So, I believe it works ;)
Re: [Discovery] Mixing pattern
So it would read 17 as 1 ?
I think that 1 has a higher priority.
Re: [Discovery] Mixing pattern
Quote:
Originally Posted by
divinedignity
So it would read 17 as 1 ?
I think that 1 has a higher priority.
there is no 17 and there is no 1
He reads everything -__-
I really don't know what you mean
Re: [Discovery] Mixing pattern
Quote:
Originally Posted by
BjornVH
Well the bitmarks in the Info table are
2^0 = 1 = equipped
2^1 = 2 ?
2^2 = 4 ?
2^3 = 8 = cheat
2^4 = 16 = storage
2^5 = 32 ?
2^6 = 64 = polished
2^7 = 128 = bound
2^8 and up = nothing but crashes
That's just how mixing works.. I just didnt use bimarks but powers of 2... Since they represent the bitmarks.
deos "128 = bound" work in the db / quests? and where are u all geting this stuff from? [Luca]
Re: [Discovery] Mixing pattern
in assembly of mainsvr u will find
shr shl opcodes like
shl register,8
shl register,16
shl register,128..
i explain this like.....
you read bit values from RIGHT TO LEFT..
|128| |64| |32| |16| |8| |4| |2| |1|
-----------------------------------------------
| 0 | | 0 | | 0 | |0 | |0 | |0 | |0 | |0 | | = 0 all flags are nothing so value is null mean 0
------------------------------------------------
When you shift LEFT you go
<--------- this way ( << )
When you shift RIGHT you go
this way -----------> ( >> )
|128| |64| |32| |16| |8| |4| |2| |1| = values of 2^[###]
-----------------------------------------------
| 0 | | 0 | | 0 | |0 | |0 | |0 | |0 | |0 | | = 0 all flags are nothing so value is null
------------------------------------------------
[ 8 ][ 7 ][ 6 ][ 5 ][ 4 ][ 3 ][ 2 ][ 1 ] = this positions (not important just helps understand better)
now lets make some 0's into 1's
|128| |64| |32| |16| |8| |4| |2| |1| = values of 2^[###]
-----------------------------------------------
| 0 | | 0 | | 1 | |1 | |1 | |0 | |0 | |0 | | = 56 4,5,6 flag ON
------------------------------------------------
[ 8 ][ 7 ][ 6 ][ 5 ][ 4 ][ 3 ][ 2 ][ 1 ] = this positions (not important just helps understand better)
see 4 5 6 positions are ON, rest are OFF.
now
bit pos 4 = 8 value
bit pos 5 = 16 value
bit pos 6 = 32 value
add up values that are ON.
32+16+8 = 56
now if you Turn ALL ON..
128+64+32+16+8+4+2+1 = 255! ..
Now I explain left and right shifting very easy to understand..
Lets Right shift position 8 which is value 128 by 3..
so you move from possition 8 3 times.. 7.... 6.....5!
you are at position 5 = which is value 16..
it looks like
128 >> 3 = ??? yes it equal 16!. because you move from position 8 to 5..
it same for all..
like position 6 = value 32 move from position 6 to position 5 same answer 16.
32 >> 1 = 16
now if you shift left.. it just going the other way..
lets start from position 5 which mean 16.. and shift left 3 times..
go from position 5 ..... 6 .... 7 and stop.. because shift is 3 times.
now you at position 7 which mean 128..
so 16 << 3 = 128...
don't think 128 is highest..
it keeps doubling by value of ^.. if you keep shifitng LEFT past 128..
mean it stop at position 8..how about position 9?? which is 2^9 = 512
so lets start at position 5 because you remember better and shift left 5 times..
16 << 5
start from position 5... now 6.... now 7...... now 8.. (did 4 shifts) now finally position 9..
so it should be 512..
and yes
16 << 5 = 512 ..
max you can go LEFT is 31.. times which is MAX SIGNED LONG in C++
2 ^ 31 = 2,147,483,648 [MAX MONEY IN KAL??] (just subtract 1 from this. mean 0 is value lol I think).
now this can be used to do things.. like
lets make for !!!EXAMPLE ONLY!!!
position 8 = POLISHED ITEM (128)
position 7 = BOUNDED ITEM (64)
now if value of position 8 (128) and value of position 7 (64) added up
128 + 64 = 192
192 = POLISHED + BOUNDED ITEM (this not 100% like kal right but i just show example)
now how bakabug use the operator ( OR )
it copy missing bits if they are offline like value is 0..
like
SOMETHING1 = |0|0|0|1|1|1|0|0| see bit 3 4 5 is ON, rest is OFF..
SOMETHING2 = |1|0|0|1|0|1|0|0| see bit 3 5 8 is ON, rest is OFF..
now
NEW = SOMETHING1 | SOMETHING2
will be what match up missing flags???? only bit 8 and 4 not in both.....
so new value is
NEW = |1|0|0|1|1|1|0|0| see bit 3 4 5 8 is ON, rest is OFF
now it combined missing from both in new value that has both..
this like condintional expression programming
AND's
if(value AND value = blahlbah) {
...
}
if(value && value = blahlbah) {
...
}
OR's
if(value = BLAH BLAH OR value = BLAHLBLAH) {
...
}
if(value = BLAH BLAH || value = BLAHLBLAH) {
...
}
but it on very very MICRO level (very very faster computing than typing if(blahlbah OR BLAH AND blahlbah) in programming)
It is very easy to understand just if you lazy to read.. than you think OMG!! This hard must be bill gate to figure out NO!!!!!!! no its easy shit.
:sweatdrop