|
|
@@ -27,8 +27,171 @@ def do_command(self, connection, event, user, channel):
|
|
|
|
|
|
if command == 'cmd' or command == 'cmds' or command == 'commands':
|
|
|
if cmdtype == 'cmd':
|
|
|
- connection.privmsg(replyto, '%sGames: %s %s' % (font.grey, CH.ccc(self, "8ball"), CH.ccc(self, "dice")[:-2]))#, CH.ccc(self, "player"), CH.ccc(self, "players"), CH.ccc(self, "levelup") ,CH.ccc(self, "givecoin")[:-2]))
|
|
|
- #connection.privmsg(replyto, font.grey + "Game help: " + font.blue + self.network.help_character + "level" + font.grey + ", " + font.blue + self.network.help_character + "xp" + font.grey + ", " + font.blue + self.network.help_character + "ap" + font.grey + ", " + font.blue + self.network.help_character + "coin" + font.grey + ", " + font.blue + self.network.help_character + "karma" + font.grey + ".")
|
|
|
+ connection.privmsg(replyto, '%sGames: %s %s %s %s %s %s' % (font.grey, CH.ccc(self, "player"), CH.ccc(self, "players"), CH.ccc(self, "levelup") ,CH.ccc(self, "givecoin"), CH.ccc(self, "8ball"), CH.ccc(self, "dice")[:-2]))
|
|
|
+ connection.privmsg(replyto, font.grey + "Game help: " + font.blue + self.network.help_character + "level" + font.grey + ", " + font.blue + self.network.help_character + "xp" + font.grey + ", " + font.blue + self.network.help_character + "ap" + font.grey + ", " + font.blue + self.network.help_character + "coin" + font.grey + ", " + font.blue + self.network.help_character + "karma" + font.grey + ".")
|
|
|
+
|
|
|
+
|
|
|
+ elif one == 'player':
|
|
|
+ if len(command.split()) == 1:
|
|
|
+ if cmdtype == 'help': # Display help text.
|
|
|
+ connection.privmsg(replyto, 'Displays a users game statistics. User optional.')
|
|
|
+ connection.privmsg(replyto, 'Usage: %s%s%s%s %snickname' % (font.blue, self.network.command_character, one, font.reset, font.italic))
|
|
|
+ return
|
|
|
+ message = '%s Your player stats: ' % font.grey
|
|
|
+ player_name = event.source.nick
|
|
|
+ player = queries.get_user(self, player_name)
|
|
|
+ elif len(command.split()) == 2:
|
|
|
+ player_name = command.split()[1]
|
|
|
+ if cmdtype == 'help':
|
|
|
+ connection.privmsg(replyto, 'Displays game stats for player: %s%s' % (font.red, player_name))
|
|
|
+ return
|
|
|
+ player = queries.get_user(self, player_name)
|
|
|
+ if not player:
|
|
|
+ connection.action(replyto, 'does not know of a %s%s%s.' % (font.red, trigger.split()[1], font.reset))
|
|
|
+ return
|
|
|
+ if player_name.lower() == connection.get_nickname().lower():
|
|
|
+ connection.privmsg(replyto, "The game does not play the master.")
|
|
|
+ return
|
|
|
+ message = '%sPlayer stats for %s%s%s: ' % (font.grey, font.red, player.name, font.reset)
|
|
|
+ else: # Too many arguments.
|
|
|
+ connection.privmsg(replyto, 'Too many arguments, For help type: %s%s%s' % (font.blue, self.network.help_character, one))
|
|
|
+ return
|
|
|
+
|
|
|
+ info = GameHelpers.player_info(self, player)
|
|
|
+ connection.privmsg(replyto, message + info)
|
|
|
+
|
|
|
+ elif one == 'levelup':
|
|
|
+ level, xp, xp_spent, total_xp, karma, coin, coin_spent, coin_given, ap, ap_spent = GameHelpers.get_info(self, user)
|
|
|
+ if cmdtype == 'help': #Display help text.
|
|
|
+ connection.privmsg(replyto, 'Spend %s XP to gain your next level. Levelup multiple levels by adding an amount.' % str(int(level * 2.7)))
|
|
|
+ connection.privmsg(replyto, 'Example: %s%s%s 3' % (font.blue, self.network.command_character, one))
|
|
|
+ elif cmdtype == "cmd":
|
|
|
+ upgrade_count = 1
|
|
|
+ if xp < int(level * 2.7):
|
|
|
+ connection.privmsg(replyto, "Insufficient XP, you need at least " + str(int(level * 2.7)) + ".")
|
|
|
+ return
|
|
|
+ elif ap <= 0:
|
|
|
+ connection.privmsg(replyto, "Insufficient AP, you need at least 1.")
|
|
|
+ return
|
|
|
+ elif len(command.split()) == 2: # Command with one argument.
|
|
|
+ try:
|
|
|
+ levels = int(command.split()[1])
|
|
|
+ except:
|
|
|
+ connection.privmsg(replyto, "Invalid amount.")
|
|
|
+ return
|
|
|
+ if levels < 1:
|
|
|
+ connection.privmsg(replyto, "Invalid amount.")
|
|
|
+ return
|
|
|
+ upgrade_count = levels # Valid amount.
|
|
|
+ elif len(command.split()) >= 3:
|
|
|
+ connection.privmsg(replyto, "Too many arguments. For help type " + font.blue + self.network.help_character + "levelup" + font.reset + ".")
|
|
|
+ return
|
|
|
+
|
|
|
+ while xp > int(level * 2.7) and ap > 0 and upgrade_count > 0:
|
|
|
+ queries.levelup_user(self, user, int(level * 2.7))
|
|
|
+ level, xp, xp_spent, total_xp, karma, coin, coin_spent, coin_given, ap, ap_spent = GameHelpers.get_info(self, user)
|
|
|
+
|
|
|
+ if upgrade_count < 0:
|
|
|
+ connection.privmsg(replyto, 'Exhausted XP or AP before levelup was complete. You are only partially levelled up.')
|
|
|
+ info = GameHelpers.player_info(self, user)
|
|
|
+ connection.privmsg(replyto, "Your new statistics: " + info)
|
|
|
+
|
|
|
+ elif command.split()[0] == "givecoin":
|
|
|
+ if cmdtype == "help": #Display help text.
|
|
|
+ connection.privmsg(replyto, "Give coins to another player. Amount optional.")
|
|
|
+ connection.privmsg(replyto, font.grey + "Usage: " + font.blue + self.network.command_character + "givecoin " + font.reset + font.italic + "user amount")
|
|
|
+ elif cmdtype == "cmd":
|
|
|
+
|
|
|
+ if len(command.split()) == 1:
|
|
|
+ connection.privmsg(replyto, "Insufficient arguments. For help type " + font.blue + self.network.help_character + "givecoin" + font.reset + ".")
|
|
|
+ return
|
|
|
+ elif len(command.split()) > 3:
|
|
|
+ connection.privmsg(replyto, "Too many arguments. For help type " + font.blue + self.network.help_character + "givecoin" + font.reset + ".")
|
|
|
+ return
|
|
|
+ elif command.split()[1] == event.source.nick.lower():
|
|
|
+ connection.privmsg(replyto, "You already have your own coin. For help type " + font.blue + self.network.help_character + "givecoin" + font.reset + ".")
|
|
|
+ return
|
|
|
+ elif len(command.split()) == 3:
|
|
|
+ stop = False
|
|
|
+ try:
|
|
|
+ if float(command.split()[2]) < 0:
|
|
|
+ connection.privmsg(replyto, "You clever abuser! The " + font.red + self.network.command_character + font.bold + "give" + font.bold + "coin" + font.reset + " command is not designed for robbing. There will be consequences...")
|
|
|
+ self.db.run("UPDATE users SET coin=coin-3, karma_correction=karma_correction-0.5 WHERE name=%s AND network=%s", (event.source.nick, self.network))
|
|
|
+ stop = True
|
|
|
+ except TypeError:
|
|
|
+ connection.privmsg(replyto, "Invalid amount. For help type " + font.blue + self.network.help_character + "givecoin" + font.reset + ".")
|
|
|
+ return
|
|
|
+ if stop:
|
|
|
+ return
|
|
|
+ elif not event.target == connection.get_nickname():
|
|
|
+ if not command.split()[1] in self.channels[event.target].users():
|
|
|
+ connection.privmsg(replyto, font.red + trigger.split()[1] + font.reset + " is not present.")
|
|
|
+ return
|
|
|
+
|
|
|
+ level, xp, xpspent, totalxp, karma, coin, coinspent, coingiven, ap, apspent = GameHelpers.get_info(self, event.source.nick)
|
|
|
+ receivingrecord = self.db.one("SELECT level, away FROM users WHERE LOWER(name)=%s AND network=%s", (command.split()[1], self.network, ))
|
|
|
+ if level < 1:
|
|
|
+ connection.privmsg(replyto, "You need to " + font.blue + self.network.command_character + "levelup " + font.reset + "to be able to give coin.")
|
|
|
+ return
|
|
|
+ elif coin < 1:
|
|
|
+ connection.privmsg(replyto, "You have no coin to give.")
|
|
|
+ return
|
|
|
+ elif not receivingrecord:
|
|
|
+ connection.action(replyto, "does not know of any \"" + font.red + trigger.split()[1] + font.reset + "\".")
|
|
|
+ return
|
|
|
+ elif receivingrecord[0] == 0:
|
|
|
+ connection.privmsg(replyto, font.red + trigger.split()[1] + font.reset + " is not playing the game.")
|
|
|
+ return
|
|
|
+ elif receivingrecord[1] == True:
|
|
|
+ connection.privmsg(replyto, font.red + trigger.split()[1] + font.reset + "is not here right now.")
|
|
|
+ return
|
|
|
+ elif ap < 1:
|
|
|
+ connection.privmsg(replyto, "You have no action points, go use IRC some more...")
|
|
|
+ return
|
|
|
+ if len(command.split()) == 2:
|
|
|
+ self.db.run("UPDATE users SET coin=coin-1, coin_spent=coin_spent+1, coin_given=coin_given+1, ap_spent=ap_spent+1 WHERE name=%s AND network=%s", (event.source.nick, self.network, ))
|
|
|
+ self.db.run("UPDATE users SET coin=coin+1 WHERE LOWER(name)=%s AND network=%s", (command.split()[1], self.network, ))
|
|
|
+ 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, event.source.nick)
|
|
|
+ connection.notice(event.source.nick, "Your new statistics: " + info)
|
|
|
+
|
|
|
+ elif command.split()[0] == "players":
|
|
|
+ if cmdtype == "help": #Display help text.
|
|
|
+ connection.privmsg(replyto, "Display top player rankings.")
|
|
|
+ elif cmdtype == "cmd":
|
|
|
+
|
|
|
+ toplevel = GameHelpers.list_top_players(self, "level")
|
|
|
+ if toplevel:
|
|
|
+ connection.notice(event.source.nick, "Ranking level: " + toplevel)
|
|
|
+ topxp = GameHelpers.list_top_players(self, "xp_spent")
|
|
|
+ if topxp:
|
|
|
+ connection.notice(event.source.nick, "Ranking experience: " + topxp)
|
|
|
+ topcoin = GameHelpers.list_top_players(self, "coin")
|
|
|
+ if topcoin:
|
|
|
+ connection.notice(event.source.nick, "Ranking wealth: " + topcoin)
|
|
|
+ if not toplevel and not topxp and not topcoin:
|
|
|
+ connection.privmsg(replyto, "Nobody is playing the game.")
|
|
|
+
|
|
|
+
|
|
|
+ elif command.split()[0] == "level":
|
|
|
+ if cmdtype == "help": #Display help text.
|
|
|
+ connection.privmsg(replyto, "For 10 XP you can use !levelup to gain a level. As your level increases, things become more difficult, while more capabilities and options are unlocked.")
|
|
|
+ elif command.split()[0] == "xp":
|
|
|
+ if cmdtype == "help": #Display help text.
|
|
|
+ connection.privmsg(replyto, "XP is earned by using IRC and playing the game, in channels with " + font.red + connection.get_nickname() + font.reset + ". Ask any operator in " + font.red + self.network.home_channel + font.reset + " to add a channel. XP is used to level up, advance classes, as a limit and as a multiplier. Once XP is expended it keeps counting towards your total.")
|
|
|
+ elif command.split()[0] == "ap":
|
|
|
+ if cmdtype == "help": #Display help text.
|
|
|
+ connection.privmsg(replyto, "AP is earned by using IRC and playing the game in channels with " + font.red + connection.get_nickname() + font.reset + ". Ask any operator in " + font.red + self.network.home_channel + font.reset + " to add a channel. AP is expended for every action you take in the game.")
|
|
|
+ elif command.split()[0] == "coin":
|
|
|
+ if cmdtype == "help": #Display help text.
|
|
|
+ connection.privmsg(replyto, "Coin is earned when certain events occur. Coin is used to buy items and classes. To give a player coin use " + font.blue + self.network.command_character + "givecoin" + font.reset + ". Coin affects karma.")
|
|
|
+ elif command.split()[0] == "karma":
|
|
|
+ if cmdtype == "help": #Display help text.
|
|
|
+ connection.privmsg(replyto, "Karma is a secret formula, based upon on your IRC events and how you play the game. It does not increase like XP. Some events, skills and items are karma based.")
|
|
|
+
|
|
|
+
|
|
|
|
|
|
elif command.split()[0] == "8ball":
|
|
|
if cmdtype == "help": #Display help text.
|
|
|
@@ -134,190 +297,3 @@ def do_command(self, connection, event, user, channel):
|
|
|
connection.privmsg(replyto, ", ".join(str(rolls) for rolls in GameHelpers.roll_dice(diceamount, dicetype)) + ".") # Roll x amount of x type dice.
|
|
|
else: # Invalid amount of arguments.
|
|
|
connection.privmsg(replyto, "Too many arguments. For help type: " + font.blue + self.network.help_character + "dice" + font.reset + ".")
|
|
|
-
|
|
|
- # elif command.split()[0] == "player":
|
|
|
- # if cmdtype == "help": #Display help text.
|
|
|
- # connection.privmsg(replyto, "Displays a users game statistics. User optional.")
|
|
|
- # elif cmdtype == "cmd":
|
|
|
- #
|
|
|
- # if len(command.split()) == 1:
|
|
|
- # user = event.source.nick.lower()
|
|
|
- # message = font.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, )):
|
|
|
- # connection.action(replyto, "does not know of a " + font.red + trigger.split()[1] + font.reset + ".")
|
|
|
- # return
|
|
|
- # if user == connection.get_nickname().lower():
|
|
|
- # connection.privmsg(replyto, "The game does not play the master.")
|
|
|
- # return
|
|
|
- # if user == event.source.nick.lower():
|
|
|
- # message = font.grey + "Your statistics. " + reset
|
|
|
- # else:
|
|
|
- # message = font.grey + "Statistics for " + font.red + trigger.split()[1] + font.reset + ". "
|
|
|
- # else:
|
|
|
- # connection.privmsg(replyto, "Too many arguments, For help type " + font.blue + self.network.help_character + "players " + font.reset + ".")
|
|
|
- # return
|
|
|
- #
|
|
|
- # level, xp, xpspent, totalxp, karma, coin, coinspent, coingiven, ap, apspent = GameHelpers.get_info(self, user)
|
|
|
- # if ap < 0:
|
|
|
- # ap = 0
|
|
|
- # info = GameHelpers.player_info(self, user)
|
|
|
- # 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 " + 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)) + ".")
|
|
|
- # elif ap < 1:
|
|
|
- # connection.privmsg(replyto, "Insufficient AP, you need at least 1.")
|
|
|
- # else:
|
|
|
- # self.db.run("UPDATE users SET level=level+1, xp_spent=xp_spent+%s, ap_spent=ap_spent+1 WHERE LOWER(name)=%s AND network=%s", (int(level * 2.7), user, self.network, ))
|
|
|
- # self.db.run("UPDATE users SET coin=coin+0.3 WHERE level>0 AND network=%s", (self.network, ))
|
|
|
- # info = GameHelpers.player_info(self, user)
|
|
|
- # connection.privmsg(replyto, "Your new statistics: " + info)
|
|
|
- # elif len(command.split()) == 2:
|
|
|
- # try:
|
|
|
- # levels = int(command.split()[1])
|
|
|
- # except:
|
|
|
- # connection.privmsg(replyto, "Invalid amount.")
|
|
|
- # return
|
|
|
- # if levels < 1:
|
|
|
- # connection.privmsg(replyto, "Invalid amount.")
|
|
|
- # elif xp < int(level * 2.7):
|
|
|
- # connection.privmsg(replyto, "Insufficient XP, you need at least " + str(int(level * 2.7)) + ".")
|
|
|
- # elif ap < levels:
|
|
|
- # connection.privmsg(replyto, "Insufficient AP, you need at least 1.")
|
|
|
- # else:
|
|
|
- # self.db.run("UPDATE users SET level=level+%s, xp_spent=xp_spent+%s, ap_spent=ap_spent+%s WHERE LOWER(name)=LOWER(%s) AND network=%s", (levels, int(level * 2.7), levels, user, self.network, ))
|
|
|
- # self.db.run("UPDATE users SET coin=coin+%s WHERE level>0 AND network=%s", (levels * 0.3, self.network, ))
|
|
|
- # info = GameHelpers.player_info(self, user)
|
|
|
- # connection.privmsg(replyto, "Your new statistics: " + info)
|
|
|
- # else:
|
|
|
- # connection.privmsg(replyto, "Too many arguments. For help type " + font.blue + self.network.help_character + "levelup " + font.reset + ".")
|
|
|
- #
|
|
|
- # elif command.split()[0] == "givecoin":
|
|
|
- # if cmdtype == "help": #Display help text.
|
|
|
- # connection.privmsg(replyto, "Give coins to another player. Amount optional.")
|
|
|
- # connection.privmsg(replyto, font.grey + "Usage: " + font.blue + self.network.command_character + "givecoin " + font.reset + font.italic + "user amount")
|
|
|
- # elif cmdtype == "cmd":
|
|
|
- #
|
|
|
- # if len(command.split()) == 1:
|
|
|
- # connection.privmsg(replyto, "Insufficient arguments. For help type " + font.blue + self.network.help_character + "givecoin" + font.reset + ".")
|
|
|
- # return
|
|
|
- # elif len(command.split()) > 3:
|
|
|
- # connection.privmsg(replyto, "Too many arguments. For help type " + font.blue + self.network.help_character + "givecoin" + font.reset + ".")
|
|
|
- # return
|
|
|
- # elif command.split()[1] == event.source.nick.lower():
|
|
|
- # connection.privmsg(replyto, "You already have your own coin. For help type " + font.blue + self.network.help_character + "givecoin" + font.reset + ".")
|
|
|
- # return
|
|
|
- # elif len(command.split()) == 3:
|
|
|
- # stop = False
|
|
|
- # try:
|
|
|
- # if float(command.split()[2]) < 0:
|
|
|
- # connection.privmsg(replyto, "You clever abuser! The " + font.red + self.network.command_character + font.bold + "give" + font.bold + "coin" + font.reset + " command is not designed for robbing. There will be consequences...")
|
|
|
- # self.db.run("UPDATE users SET coin=coin-3, karma_correction=karma_correction-0.5 WHERE name=%s AND network=%s", (event.source.nick, self.network))
|
|
|
- # stop = True
|
|
|
- # except TypeError:
|
|
|
- # connection.privmsg(replyto, "Invalid amount. For help type " + font.blue + self.network.help_character + "givecoin" + font.reset + ".")
|
|
|
- # return
|
|
|
- # if stop:
|
|
|
- # return
|
|
|
- # elif not event.target == connection.get_nickname():
|
|
|
- # if not command.split()[1] in self.channels[event.target].users():
|
|
|
- # connection.privmsg(replyto, font.red + trigger.split()[1] + font.reset + " is not present.")
|
|
|
- # return
|
|
|
- #
|
|
|
- # level, xp, xpspent, totalxp, karma, coin, coinspent, coingiven, ap, apspent = GameHelpers.get_info(self, event.source.nick)
|
|
|
- # receivingrecord = self.db.one("SELECT level, away FROM users WHERE LOWER(name)=%s AND network=%s", (command.split()[1], self.network, ))
|
|
|
- # if level < 1:
|
|
|
- # connection.privmsg(replyto, "You need to " + font.blue + self.network.command_character + "levelup " + font.reset + "to be able to give coin.")
|
|
|
- # return
|
|
|
- # elif coin < 1:
|
|
|
- # connection.privmsg(replyto, "You have no coin to give.")
|
|
|
- # return
|
|
|
- # elif not receivingrecord:
|
|
|
- # connection.action(replyto, "does not know of any \"" + font.red + trigger.split()[1] + font.reset + "\".")
|
|
|
- # return
|
|
|
- # elif receivingrecord[0] == 0:
|
|
|
- # connection.privmsg(replyto, font.red + trigger.split()[1] + font.reset + " is not playing the game.")
|
|
|
- # return
|
|
|
- # elif receivingrecord[1] == True:
|
|
|
- # connection.privmsg(replyto, font.red + trigger.split()[1] + font.reset + "is not here right now.")
|
|
|
- # return
|
|
|
- # elif ap < 1:
|
|
|
- # connection.privmsg(replyto, "You have no action points, go use IRC some more...")
|
|
|
- # return
|
|
|
- # if len(command.split()) == 2:
|
|
|
- # self.db.run("UPDATE users SET coin=coin-1, coin_spent=coin_spent+1, coin_given=coin_given+1, ap_spent=ap_spent+1 WHERE name=%s AND network=%s", (event.source.nick, self.network, ))
|
|
|
- # self.db.run("UPDATE users SET coin=coin+1 WHERE LOWER(name)=%s AND network=%s", (command.split()[1], self.network, ))
|
|
|
- # 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, event.source.nick)
|
|
|
- # connection.notice(event.source.nick, "Your new statistics: " + info)
|
|
|
- #
|
|
|
- # elif command.split()[0] == "players":
|
|
|
- # if cmdtype == "help": #Display help text.
|
|
|
- # connection.privmsg(replyto, "Display top player rankings.")
|
|
|
- # elif cmdtype == "cmd":
|
|
|
- #
|
|
|
- # toplevel = GameHelpers.list_top_players(self, "level")
|
|
|
- # if toplevel:
|
|
|
- # connection.notice(event.source.nick, "Ranking level: " + toplevel)
|
|
|
- # topxp = GameHelpers.list_top_players(self, "xp_spent")
|
|
|
- # if topxp:
|
|
|
- # connection.notice(event.source.nick, "Ranking experience: " + topxp)
|
|
|
- # topcoin = GameHelpers.list_top_players(self, "coin")
|
|
|
- # if topcoin:
|
|
|
- # connection.notice(event.source.nick, "Ranking wealth: " + topcoin)
|
|
|
- # if not toplevel and not topxp and not topcoin:
|
|
|
- # connection.privmsg(replyto, "Nobody is playing the game.")
|
|
|
- #
|
|
|
- # elif command.split()[0] == "level":
|
|
|
- # if cmdtype == "help": #Display help text.
|
|
|
- # connection.privmsg(replyto, "For 10 XP you can use !levelup to gain a level. As your level increases, things become more difficult, while more capabilities and options are unlocked.")
|
|
|
- # elif command.split()[0] == "xp":
|
|
|
- # if cmdtype == "help": #Display help text.
|
|
|
- # connection.privmsg(replyto, "XP is earned by using IRC and playing the game, in channels with " + font.red + connection.get_nickname() + font.reset + ". Ask any operator in " + font.red + self.homechannel + font.reset + " to add a channel. XP is used to level up, advance classes, as a limit and as a multiplier. Once XP is expended it keeps counting towards your total.")
|
|
|
- # elif command.split()[0] == "ap":
|
|
|
- # if cmdtype == "help": #Display help text.
|
|
|
- # connection.privmsg(replyto, "AP is earned by using IRC and playing the game in channels with " + font.red + connection.get_nickname() + font.reset + ". Ask any operator in " + font.red + self.homechannel + font.reset + " to add a channel. AP is expended for every action you take in the game.")
|
|
|
- # elif command.split()[0] == "coin":
|
|
|
- # if cmdtype == "help": #Display help text.
|
|
|
- # connection.privmsg(replyto, "Coin is earned when certain events occur, for instance when a player expends XP. Coin is used to buy items and classes. To give a player coin use " + font.blue + self.network.command_character + "givecoin" + font.reset + ". Coin affects karma.")
|
|
|
- # elif command.split()[0] == "karma":
|
|
|
- # if cmdtype == "help": #Display help text.
|
|
|
- # connection.privmsg(replyto, "Karma is a secret formula, based upon on your IRC events and how you play the game. It does not increase like XP. Some events, skills and items are karma based.")
|
|
|
-
|
|
|
-# elif command.split()[0] == "classup":
|
|
|
-# if cmdtype == "help": #Display help text.
|
|
|
-# connection.privmsg(replyto, "Spend 10 XP to gain a class in your current level. List available classes with " + font.blue + self.network.help_character + "classup available " + font.reset + ".")
|
|
|
-# connection.privmsg(replyto, font.grey + "Usage: " + font.blue + self.network.command_character + "classup " + font.reset + font.italic + "class")
|
|
|
-# elif cmdtype == "cmd":
|
|
|
-#
|
|
|
-# if len(command.split()) == 1:
|
|
|
-# connection.privmsg(replyto, "Insufficient arguments. For help type " + font.blue + self.network.help_character + "classup" + font.reset + ".")
|
|
|
-# if len(command.split()) == 2:
|
|
|
-# if command.split()[1] == "available":
|
|
|
-# level, xp, xpspent, karma = GameHelpers.get_info(self, event.source.nick)
|
|
|
-# if level == 0:
|
|
|
-# connection.privmsg(replyto, "There are no level 0 classes.")
|
|
|
-# if level == 1:
|
|
|
-# connection.privmsg(replyto, "Level 1 classes: Maggot, nubcake, ")
|
|
|
-# if level == 2:
|
|
|
-# connection.privmsg(replyto, "Level 2 classes: Retard, ")
|
|
|
-# if level == 3:
|
|
|
-# connection.privmsg(replyto, "Level 3 classes: ")
|
|
|
-# if level == 4:
|
|
|
-# connection.privmsg(replyto, "Level 3 classes: ")
|
|
|
-# if level == 5:
|
|
|
-# connection.privmsg(replyto, "Level 4 classes: ")
|
|
|
-# else:
|
|
|
-# else:
|
|
|
-# connection.privmsg(replyto, "Too many arguments. For help type " + font.blue + self.network.help_character + "classup" + font.reset + ".")
|