-snip-
Sorry, I found it. But still, you need to know how to read this code ...
-snip-
update smf_members set ID_POST_GROUP=21 where ID_POST_GROUP=8 and
activity>=775 and activity>=775+conv(substr(sha1(concat(ID_MEMBER,
secretSeed)), 1, 2), 16, 10);
The required activity level per user is suitably random for betting, but anyone who can read my code (there are a few such people) will be able to exactly predict when someone will become Legendary, so I don't really recommend it.
The problem is that we dont know what the "secretSeed" is, thus a proper prediction on the exact result in only available for those that have access to the full code.
We just need to pay off some mod. Question is if that secretSeed is account specific or global.
I think I saw that it was specific for each account (but I may be mistaken).
The exact amount of activity required to become legendary varies from user to user, however the secret seed is global.
In theory, if you were to monitor when enough users are promoted to legendary status, it would be possible to reverse engineer what the secret seed is (you would however need to take into consideration that the required activity for each member may not be divisible by 14), although it would probably take more effort/work then it is really worth.
IIRC there was this exact discussion already. Theymos said that the seed has too much entropy to be reverse engeneerd. One more point is that you can't see when someone gets promoted, activity jumps by 14 points.
Even if you found a secretseed that matches the past results of all accounts, it doesn't say anthing about future accounts because there are an incredible big number of seeds that would match.