I have a working script now, it prevents cheating but user will always be able to edit stat variables.

The game is a 1 on 1 battle game, it compares user stats and declares a winner.
A good example of this is www.newage3.com

You attack a player, it then sends a probe string to check if its a valid nick.
If it is, the opponent returns his user stats along a random 3 digit code or id
using $rand(1,9) $+ $rand(A,Z) $+ $rand(a,z) and saves it to %hash

The receiver saves that to %hash too. Then every query made to each other sends the %hash along with it. If the hash is missing, or doesn't match it breaks. (for example if ($2 == %hash) { perform } else { cheater })
Before the %hash is created, there is an /unset %hash to prevent a user from creating their own. The id is created on the opponents side, so an attacker can't make a fake one.

I added some other protection to cover possibilities, and I am confident I covered it all, this is very efficient. This prevents a user from manually entering a query to the opponent through notice.

The code is large and complicated enough that noone wants to bother editing it, I just have to trust them to not change the variable stats, if they do I will use my IRC Bot to store stats in a .txt smirk


I also took the liberty of hiding my variables with extremely pointless algorithms using $sin $cos and $tan :tongue:
its kind of harder for me to understand it, but it's 100 times harder for them.

Last edited by BNX; 31/08/05 03:49 AM.