|
|
@@ -139,12 +139,12 @@ def do_command(self, connection, event):
|
|
|
|
|
|
elif command.split()[0] == "player":
|
|
|
if cmdtype == "help": #Display help text.
|
|
|
- connection.privmsg(replyto, "Displays a users game info. User optional.")
|
|
|
+ connection.privmsg(replyto, "Displays a users game statistics. User optional.")
|
|
|
elif cmdtype == "cmd":
|
|
|
|
|
|
if len(command.split()) == 1:
|
|
|
user = event.source.nick.lower()
|
|
|
- message = grey + "Your info. " + reset
|
|
|
+ message = grey + "Your statistics. " + reset
|
|
|
elif len(command.split()) == 2:
|
|
|
user = command.split()[1]
|
|
|
if not self.db.one("SELECT id FROM users WHERE LOWER(name)=%s AND network='" + self.network + "'", (user, )):
|
|
|
@@ -154,9 +154,9 @@ def do_command(self, connection, event):
|
|
|
connection.privmsg(replyto, "The game does not play the master.")
|
|
|
return
|
|
|
if user == event.source.nick.lower():
|
|
|
- message = grey + "Your info. " + reset
|
|
|
+ message = grey + "Your statistics. " + reset
|
|
|
else:
|
|
|
- message = grey + "Info for " + red + trigger.split()[1] + reset + ". "
|
|
|
+ message = grey + "Statistics for " + red + trigger.split()[1] + reset + ". "
|
|
|
else:
|
|
|
connection.privmsg(replyto, "Too many arguments, For help type " + blue + self.helpchar + "players " + reset + ".")
|
|
|
return
|
|
|
@@ -168,12 +168,11 @@ def do_command(self, connection, event):
|
|
|
connection.privmsg(replyto, message + info)
|
|
|
|
|
|
elif command.split()[0] == "levelup":
|
|
|
+ user = event.source.nick.lower()
|
|
|
+ level, xp, xpspent, totalxp, karma, coin, coinspent, coingiven, ap, apspent = GameHelpers.get_info(self, user)
|
|
|
if cmdtype == "help": #Display help text.
|
|
|
- connection.privmsg(replyto, "Spend XP to gain a level. Gain multiple levels by specifying the amount.")
|
|
|
- elif cmdtype == "cmd":
|
|
|
-
|
|
|
- user = event.source.nick.lower()
|
|
|
- level, xp, xpspent, totalxp, karma, coin, coinspent, coingiven, ap, apspent = GameHelpers.get_info(self, user)
|
|
|
+ connection.privmsg(replyto, "Spend " + str(int(level * 2.7)) + "XP to gain your next level. Gain multiple levels (for the price of the lowest level) by specifying the amount.")
|
|
|
+ elif cmdtype == "cmd":
|
|
|
if len(command.split()) == 1:
|
|
|
if xp < int(level * 2.7):
|
|
|
connection.privmsg(replyto, "Insufficient XP, you need at least " + str(int(level * 2.7)) + ".")
|
|
|
@@ -262,7 +261,7 @@ def do_command(self, connection, event):
|
|
|
elif len(command.split()) == 3:
|
|
|
self.db.run("UPDATE users SET coin=coin-%s, coin_spent=coin_spent+%s, coin_given=coin_given+%s, ap_spent=ap_spent+1 WHERE name=%s AND network=%s", (command.split()[2], command.split()[2], command.split()[2], event.source.nick, self.network, ))
|
|
|
self.db.run("UPDATE users SET coin=coin+%s WHERE LOWER(name)=%s AND network=%s", (command.split()[2], command.split()[1], self.network))
|
|
|
- info = GameHelpers.player_info(self, user)
|
|
|
+ info = GameHelpers.player_info(self, event.source.nick)
|
|
|
connection.notice(event.source.nick, "Your new statistics: " + info)
|
|
|
|
|
|
elif command.split()[0] == "players":
|