Compare commits

..

No commits in common. 'main' and 'add_scripting' have entirely different histories.

  1. 58
      burningdice.py
  2. 3
      help.html
  3. 5
      metadata.ini

@ -72,34 +72,7 @@ class Plugin(PluginBase):
gs.gui_service.quick_gui(str(gs.mumble_inst.users[data.actor]['name']) + " has scripted volley " + str(v), text_type='header', box_align='left')
return
except IndexError:
gs.gui_service.quick_gui("Format: !volley # script_actions",
text_type='header', box_align='left')
return
def cmd_npcvolley(self, data):
all_data = data.message.strip().split()
try:
v = int(all_data[1])
if (v == 1):
volley = "v1"
elif (v == 2):
volley = "v2"
elif (v == 3):
volley = "v3"
else:
gs.gui_service.quick_gui("Format: !npcvolley # name script_actions",
text_type='header', box_align='left')
return
script = str(all_data[3:])
init_db = sqlite3.connect('init.db')
cur = init_db.cursor()
cur.execute("INSERT INTO " + volley + " values (?,?) ON CONFLICT(name) DO UPDATE SET content=\"" + script + "\"", (str(script),str(all_data[2])))
init_db.commit()
init_db.close()
gs.gui_service.quick_gui(str(gs.mumble_inst.users[data.actor]['name']) + " has scripted volley " + str(v), text_type='header', box_align='left')
return
except IndexError:
gs.gui_service.quick_gui("Format: !volley # name script_actions",
gs.gui_service.quick_gui("Format: !volley # script actions",
text_type='header', box_align='left')
return
@ -158,23 +131,15 @@ class Plugin(PluginBase):
return
def clear_volley(self, volleynum):
self.del_volley(volleynum, "ThisNonceWillNeverBeUsedAsAName");
def del_volley(self, volleynum, name):
volley = "v" + str(volleynum)
init_db = sqlite3.connect('init.db')
init = init_db.cursor()
if (name == "ThisNonceWillNeverBeUsedAsAName"):
init.execute("DROP TABLE " + volley)
init_db.commit()
init.execute("CREATE TABLE IF NOT EXISTS " + volley + " (content string, name string UNIQUE)")
gs.gui_service.quick_gui("Purged all for " + volley, text_type='header', box_align='left')
else:
dbname = "\'" + name + "\'"
init.execute("DELETE FROM " + volley + " where name LIKE " + dbname);
gs.gui_service.quick_gui("Removed " + name + " from volley " + volley, text_type='header', box_align='left')
init.execute("DROP TABLE " + volley)
init_db.commit()
init.execute("CREATE TABLE IF NOT EXISTS " + volley + " (content string, name string UNIQUE)")
init_db.commit()
init_db.close()
gs.gui_service.quick_gui("Purged all for " + volley, text_type='header', box_align='left')
def cmd_clearv1(self, data):
self.clear_volley(1)
@ -188,16 +153,6 @@ class Plugin(PluginBase):
self.clear_volley(3)
return
def cmd_unscript(self,data):
all_data = data.message.strip().split()
if(len(all_data) == 2):
self.del_volley(1,all_data[1])
self.del_volley(2,all_data[1])
self.del_volley(3,all_data[1])
else:
self.del_volley(int(all_data[2]),all_data[1])
return
def cmd_bw(self, data):
all_data = data.message.strip().split()
try:
@ -375,6 +330,3 @@ class Plugin(PluginBase):
def cmd_sessionend(self, data):
gs.gui_service.quick_gui("<table> <tbody><tr> <th>Name</th> <th>Earns/Type</th> <th>Description </th></tr> <tr> <td>Belief</td> <td>1 <i>Fate</i></td> <td>Driving the game forward with a Belief </td></tr> <tr> <td>Instinct</td> <td>1 <i>Fate</i></td> <td>Playing an Instinct makes the character's life difficult </td></tr> <tr> <td>Trait</td> <td>1 <i>Fate</i></td> <td>Invoking a trait that sends the story in an unforeseen direction </td></tr> <tr> <td>Humour</td> <td>1 <i>Fate</i></td> <td>For an in-character game-stopper </td></tr> <tr> <td>Right Skill, Right Time</td> <td>1 <i>Fate</i></td> <td>For having a skill to make the story go </td></tr> <tr> <td>Embodiment</td> <td>1 <i>Persona</i></td> <td>For really good or distinctive roleplaying </td></tr> <tr> <td>Moldbreaker</td> <td>1 <i>Persona</i></td> <td>For going beyond the bounds of the character </td></tr> <tr> <td>Workhorse</td> <td>1 <i>Persona</i></td> <td>For doing all the work of the scenario </td></tr> <tr> <td>MVP</td> <td>1 <i>Persona</i></td> <td>For being the crucial element of success </td></tr> <tr> <td>Personal Goals</td> <td>1 <i>Persona</i></td> <td>Revenge, triumph, seduction, victory </td></tr> <tr> <td>Greater Goals</td> <td>1 <i>Deeds</i></td> <td>Accomplishing goals bigger than you! </td></tr> <tr> <td>Beyond the Call</td> <td>1 <i>Deeds</i></td> <td>Helping, no matter the cost </td></tr></tbody></table>", text_type='header', box_align='left')
def cmd_obs(self, data):
gs.gui_service.quick_gui("<table> <tr><td>Ob 1</td><td>A simple act done with litttle thought</td></tr> <tr><td>Ob 2</td><td>An act performed routinely at your job</td></tr> <tr><td>Ob 3</td><td>An act you can accomplish if you concentrate</td></tr> <tr><td>Ob 4</td><td>A risky act</td></tr> <tr><td>Ob 5</td><td>An act that requires expertise</td></tr> <tr><td>Ob 6</td><td>An act that requires a heroic effort</td></tr> <tr><td>Ob 7</td><td>An improbable feat</td></tr> <tr><td>Ob 8</td><td>An act requiring preternatural ability or a lot of help</td></tr> <tr><td>Ob 9</td><td>An act deemed nearly impossible</td></tr> <tr><td>Ob 10</td><td>A miracle</td></tr> </table>", text_type='header', box_align='left')

@ -6,12 +6,9 @@ All commands can be run by typing it in the chat or privately messaging JJMumble
<b>!secondsight</b>: Print the table of second sight difficulties.<br>
<b>!touchofages</b>: Print the table of touch of ages difficulties.<br>
<b>!aurareading</b>: Print the table of aura reading difficulties.<br>
<b>!obs</b>: Print the standard difficulties table.<br>
<b>!sessionend</b>: Print the Artha awards table.<br>
<b>!volley</b>: Sample !volley 1 Block Strike. Prepend the volley number and then the actions. Everything after the volley number is freeform.<br>
<b>!npcvolley</b>: Sample !volley 1 Name Block Strike. Prepend the volley number, the name of the NPC, and then the actions. Everything after the volley number is freeform.<br>
<b>!revealv[1-3]</b>: Prints everyone's script for given volley.<br>
<b>!clearv[1-3]</b>: Clears all scripts for given volley.<br>
<b>!scriptedv[1-3]</b>: Lists who has scripted for given volley.<br>
<b>!scripted</b>: Lists who has scripted for all volleys.<br>
<b>!unscript</b>: Uses the format !unscript Name [#]. Removes the given name from the volley if a number is supplied. Otherwise, removes them from all volleys.<br>

@ -12,9 +12,7 @@ PluginCommands: [
"aurareading",
"sessionend",
"bwo",
"obs",
"volley",
"npcvolley",
"revealv1",
"revealv2",
"revealv3",
@ -24,8 +22,7 @@ PluginCommands: [
"scriptedv1",
"scriptedv2",
"scriptedv3",
"scripted",
"unscript"
"scripted"
]
[Plugin Settings]

Loading…
Cancel
Save