All commands can be run by typing it in the chat or privately messaging JJMumbleBot.<br>
<b>!addinit</b>: Roll init for a user <i>!init 4 11 Malta</i> will add Malta with 4d6+11<br>
<b>!addinit</b>: Add init for a user <i>!addinit 4 11 Malta</i> will add Malta with 4d6+11<br>
<b>!delinit</b>: Remove init for a user <i>!delinit Malta</i> will remove Malta from the list<br>
<b>!listinit</b>: List all inits in the init DB<br>
<b>!listinitpools</b>: List all init pools in the init DB<br>
<b>!rollinit</b>: Rolls the inits for all of the users, and outputs it<br>
<b>!initpass</b>: Subtracts 10 from all inits, minimum 0<br>
<b>!interupt</b>: Subtracts an amount from a single user's init, wont work if you try to subtract more init from the character than they have <i>!interupt Malta 7</i> will subtract 7 init from Malta<br>
init.execute("CREATE TABLE inits (dice int, bonus int, total int, name string)")
init.execute("CREATE TABLE inits (dice int, bonus int, total int, name string UNIQUE)")
init_db.commit()
init_db.close()
self.is_running=True
@ -60,7 +60,7 @@ class Plugin(PluginBase):
character_name=str(all_data[3])
init_db=sqlite3.connect('init.db')
cur=init_db.cursor()
cur.execute("INSERT INTO inits values (?,?,?,?)",(number_of_dice,init_bonus,0,character_name))
cur.execute("INSERT INTO inits values (?,?,?,?) ON CONFLICT(name) DO UPDATE SET dice="+str(number_of_dice)+", bonus="+str(init_bonus),(number_of_dice,init_bonus,0,character_name))