You are currently looking at Flamebate, our community forums. Players can discuss the game here, strategize, and role play as their characters.
You need to be logged in to post and to see the uncensored versions of these forums.
Viewing a Post
|
This would be my suggested algorithm, which would allow for you to indicate which forums are part of the streak:
Create a new DB table to hold streaks. First column, is the alt’s ID#. Second column is to hold the forum ID# of any forums currently on the streak. One row per forum. The table is keyed on both columns.
Every time you complete a forum successfully, the system tries to insert a row for you and that forum. If it gets a duplicate key restraint, that means you broke your streak. All records for you are deleted from the table, and a new row is written with this most recent forum (the start of a new streak).
Then you do a “SELECT COUNT(*) FROM <table> WHERE user_id = <userid>”, and divide the result by four. If there’s no remainder, award the appropriate peen and scoops for that result number.
If you fail to beat a forum, the system deletes all rows in the table for you.
That’s what I’d do. |
||||||
Posted On: 11/12/2008 12:18PM | View MC Banhammer's Profile | # |