From bf5c8b095f7c79ccda4d52d8a79b596dadae6bad Mon Sep 17 00:00:00 2001 From: silverwizard Date: Wed, 27 Apr 2022 23:40:15 -0400 Subject: [PATCH] Lots of scripting updates --- __pycache__/burningdice.cpython-38.pyc | Bin 12672 -> 16181 bytes burningdice.py | 122 +++++++++++++++++++++++-- help.html | 5 + metadata.ini | 13 ++- 4 files changed, 132 insertions(+), 8 deletions(-) diff --git a/__pycache__/burningdice.cpython-38.pyc b/__pycache__/burningdice.cpython-38.pyc index d1998ff427dc81b00cb44d33b30ef8ca1a24c24e..4b4b7359023478d1c5a0f3069a81aa6e78f186d8 100644 GIT binary patch delta 5488 zcmbVQTTmRw6`h`)oqe*rB@hS(gd`SW#6#B0l4T1P2}uS7=!Gn!WqX8nwGY%YfV5e8 z980#9#F8zK^Rn_-5~osB<&R3`J0JNmCB2a!ZP+6(0_ z+DH4LY@!475R}cI2$C?p8|--9lE>oML?t{HlDwuU;F z$pbMXW^0#)2ab#*TSw((LIhrO6>4r?6SMWp0`!U59avINMwr>DH|UKSA?DWuje@?b zQFty;Z=v19+rFPmdb7Se))H%_{wESHFc?ZI%sFwtvF3^6|Mp8*#P3nrKvuJXzTS1gAYA~ z-2(*~E^P~HdTPGgeC|Bg{W^39MaJc;zD?e#>0ze#n$_}t!wo|C48o&zL6~MpOvsXD zAuB={is}F8j*Li2qwtVmP*QS7WL;EzASDk$%K@#URD#w%XgQ%ZOl4>_=u*rXlc@{Y zNxe@TM7Y93O?Sa;4k~;k@)@0m?#_Cs4O0=g z3F{y*Nq(C3?{SU4$5op+)uS(v*_OE2_d>KQ{V$N$)8gVlS{Y8UL|8wrv@NFMarM5k zN6{iII1p^|0j*$Kx}+MiwpEw!@O`m0;aC)B*fsy#`KIjB0Nr zL1%1fjC}1VfItF71d6$doPR_&5e4zTvM7@(PPW5HI7t53&iAFOArV6!?kUb0L4W1{ zTu^bMeolkOP@zNzDqxH}5OtCjsR%KOS=j+GDrKasM1dF(K@g{yk*PB;Ph}Y6%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*tJg$!4aN*+r?1Sj#?3%ukSyk~*TxF}fS!_Q}4D_2`pYU^a z(BFD@t(T7T5!1l%z@)K?A(^VCJmKgM126FP^!I_6n#^M{3QC;^+y-E}*V4EInM8L1 z?=To{S" + for row in cur: + ret_text += str(row[1]) + ": " + row[0] + "
" + init_db.close() + gs.gui_service.quick_gui(ret_text, text_type='header', box_align='left') + return + + def cmd_revealv1(self, data): + self.reveal_actions(1) + return + + def cmd_revealv2(self, data): + self.reveal_actions(2) + return + + def cmd_revealv3(self, data): + self.reveal_actions(3) + return + + def whoscript(self,volleynum): + volley = "v" + str(volleynum) + init_db = sqlite3.connect('init.db') + cur = init_db.cursor() + cur.execute("SELECT * from " + volley + " ORDER BY name DESC") + ret_text = "Volley " + str(volleynum) + "
" + for row in cur: + ret_text += str(row[1]) + "
" + init_db.close() + gs.gui_service.quick_gui(ret_text, text_type='header', box_align='left') + return + + def cmd_scriptedv1(self, data): + self.whoscript(1) + return + + def cmd_scriptedv2(self, data): + self.whoscript(2) + return + + def cmd_scriptedv3(self, data): + self.whoscript(3) + return + + def cmd_scripted(self, data): + self.whoscript(1) + self.whoscript(2) + self.whoscript(3) + return + + def clear_volley(self, volleynum): + volley = "v" + str(volleynum) + init_db = sqlite3.connect('init.db') + init = init_db.cursor() + 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) + return + + def cmd_clearv2(self, data): + self.clear_volley(2) + return + + def cmd_clearv3(self, data): + self.clear_volley(3) + return + def cmd_bw(self, data): all_data = data.message.strip().split() try: @@ -112,9 +224,7 @@ class Plugin(PluginBase): gs.gui_service.quick_gui(ret_text, text_type='header', box_align='left') return except IndexError: - log(ERROR, CMD_INVALID_CUSTOM_ROLL, - origin=L_COMMAND, error_type=CMD_INVALID_ERR, print_mode=PrintMode.VERBOSE_PRINT.value) - gs.gui_service.quick_gui(CMD_INVALID_CUSTOM_ROLL, + gs.gui_service.quick_gui("Format: !bw # [a][a]", text_type='header', box_align='left') return @@ -194,9 +304,7 @@ class Plugin(PluginBase): gs.gui_service.quick_gui(ret_text, text_type='header', box_align='left') return except IndexError: - log(ERROR, CMD_INVALID_CUSTOM_ROLL, - origin=L_COMMAND, error_type=CMD_INVALID_ERR, print_mode=PrintMode.VERBOSE_PRINT.value) - gs.gui_service.quick_gui(CMD_INVALID_CUSTOM_ROLL, + gs.gui_service.quick_gui("!bwo # [a][a]", text_type='header', box_align='left') return diff --git a/help.html b/help.html index 69af63f..824af80 100644 --- a/help.html +++ b/help.html @@ -7,3 +7,8 @@ All commands can be run by typing it in the chat or privately messaging JJMumble !touchofages: Print the table of touch of ages difficulties.
!aurareading: Print the table of aura reading difficulties.
!sessionend: Print the Artha awards table.
+!volley: Sample !volley 1 Block Strike. Prepend the volley number and then the actions. Everything after the volley number is freeform.
+!revealv[1-3]: Prints everyone's script for given volley.
+!clearv[1-3]: Clears all scripts for given volley.
+!scriptedv[1-3]: Lists who has scripted for given volley.
+!scripted: Lists who has scripted for all volleys.
diff --git a/metadata.ini b/metadata.ini index 58bbd26..8d78199 100644 --- a/metadata.ini +++ b/metadata.ini @@ -11,7 +11,18 @@ PluginCommands: [ "touchofages", "aurareading", "sessionend", - "bwo" + "bwo", + "volley", + "revealv1", + "revealv2", + "revealv3", + "clearv1", + "clearv2", + "clearv3", + "scriptedv1", + "scriptedv2", + "scriptedv3", + "scripted" ] [Plugin Settings] -- 2.37.3