Either both green squares or both red squares can spawn Feebas.
Lottery Number:

Credits

PokemonRNG Discord
lincoln
EzPzStreamz

FAQ

How this Works

Both the lottery number and Feebas tiles are based on the group seed. This is a number that is randomly generated once when you create your save and each time you create a new group. When other players join your group, their group seed is updated to match yours. Each day, this value is progressed following a predictable pattern (unimportant to this tool).

The lottery number is computed as (group_seed * 0x41c64e6d + 0x3039) & 0xffff. Using this, we can calculate the 2 low bytes of the group seed as (lotto * 0xeb65 + 0xa683) & 0xffff (since the multiplicative inverse of 0x41c64e6d is 0xeeb9eb65 and 0xeeb9eb65 * -0x3039 = 0xfc77a683).

The 4 Feebas tiles are each based on one of the 4 bytes of the absolute value of the group seed. First, 4 indexes are calculated:

Then each index is looked up in a table of tile positions that is simply top-left to bottom-right skipping rocks.

Since we have the two low bytes of the group seed from the lottery number, we can find 2 Feebas tiles (in the bottom half). Due to the absolute value, we have two possible possitions for each tile (since we don't know the high bit of the group seed). This tool simply calculates the four possible values, two for each of the low bytes of the group seed.