import sys import MySQLdb import random import math import re sys.path.insert(0, '/home/bouncer/sassbot/modules/artifact2-0/') import EquipmentCreate def adventurersinc(phenny, input): #Variables if input.sender.lower() == "#fromsteamland" or input.sender.lower() == "#artifact": strInputGroup = input.group().split(" ") try: strCmd1 = strInputGroup[1] except: strCmd1 = "" try: strCmd2 = strInputGroup[2] except: strCmd2 = "" strPlayerState="debug" parameters = {} parameters['LiveDB'] = 'Artifact2.0' parameters['LiveVersion'] = '2.0' parameters['Nick'] = input.nick #Global Commands if strCmd1 == "git": phenny.say("Artifact v2 git: http://www.blatech.co.uk/JasonFS/Artifact-v2") elif strCmd1 == "version": phenny.say("Artifact v2 - alpha 0.0") else: #Actions based on player state if strPlayerState == "newchar": phenny.say("New Character") elif strPlayerState == "rest": phenny.say("Resting") elif strPlayerState == "adventuring": phenny.say("Exploring") elif strPlayerState == "combat": phenny.say("Combat") elif strPlayerState == "debug": itemCode = input.group(2).split(':') #phenny.say(str(input.group(2))) NewItem = EquipmentCreate.GenerateItem(phenny, parameters, itemCode) phenny.say(NewItem["EquipmentName"]) adventurersinc.commands = ['a'] adventurersinc.priority = 'high' #https://stackoverflow.com/questions/4340793/how-to-find-gaps-in-sequential-numbering-in-mysql