tagban / bnubot

Cross platform Battle.net bot written in Java by BNU-Camel
http://www.clanbnu.net/
3 stars 0 forks source link

Autopromotions #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
For now, I'm going to implement them in the exact same way they have always
been. Got an idea to improve them? Post now!

For those that don't know, here's how it works:

There's an "accounts" table in the database; it contains all of the
information relating to each bot account. There is another table for
"users" - the battle.net logins for each user. Among the columns are
'starcraft wins' 'broodwar wins' 'warcraft 2 wins' 'diablo 2 character
level' and 'warcraft 3 level'

The number of "wins" an account has is the sum of (W2BN+STAR+SEXP) for each
user linked to the account; this is why we did not allow low level members
to link their old accounts for sc/w2.

The "d2 level" is the highest level character the person has, and the "w3
level" is their highest level account.

Each time the user joins the channel, the AP conditions are checked: days
since promotion AND any one of wins/d2level/w3level. If they've met the
days requirement, but none of the others, the bot messages the user "you
need [x] more [wins/levels] to get a promotion" - if the wins/level
requirement is also met, the bot gives the account a promotion, and
announces to the channel that they have recieved a promotion.
_________________

Original issue reported on code.google.com by sco...@gmail.com on 2 Jul 2007 at 7:20

GoogleCodeExporter commented 9 years ago
Implemented for 2.0 beta 3; still has open issues.

When a user recieves a promotion, there's a field called 'lastRankChange' that 
is
supposed to be set to the current time - this isn't done, and it needs to be 
resolved
before APs can be considered "working."

Need to continue testing for bugs.

Original comment by sco...@gmail.com on 2 Jul 2007 at 7:20

GoogleCodeExporter commented 9 years ago
The lastRankChange issue has been resolved.

There were a few other bugs I fixed, all were minor.

Currently, if a rank level has a greeting and an autopromotion, when someone at 
that
rank recieves a promotion, they will see the greeting from their current rank 
with
their current prefix, and then a message congratulating them for the promotion 
with
the new rank/prefix. This is different from the behavior or the original 
BNU`Bot, but
is fairly simple to change later if we want it that way.

Original comment by sco...@gmail.com on 2 Jul 2007 at 7:21

GoogleCodeExporter commented 9 years ago
Added prefix/suffix filtering. This is something we added late-stage to the 
original
bot because new members wanted to have access to the bot on their aliases, but 
we did
not want them to get autopromotion credit from their aliases.

The defaults are no suffix, and prefix is BNU-

Only accounts containing the prefix/suffix are considered when calculating
wins/levels. Easily disabled in settings.ini (blank=disabled).

Original comment by sco...@gmail.com on 2 Jul 2007 at 7:21

GoogleCodeExporter commented 9 years ago
Changed a few formatting issues; floating point precision is a bitch!

Added a descriptive error message for when the rank of an account doesn't exist 
in
the database.

Original comment by sco...@gmail.com on 12 Jul 2007 at 1:54