From 01a4e7414c30881711acf0a87d6414a2daf14413 Mon Sep 17 00:00:00 2001 From: Rares Bozga Date: Fri, 9 Jan 2026 13:24:07 +0200 Subject: [PATCH] Various bugfixes --- scripts/lib/textbox.dsc | 50 +++++++++++-------- scripts/misc/compatibility_check.dsc | 2 +- .../storyboard/intro/intro_interactions.dsc | 5 ++ .../tasks/storyboard_player_tasks.dsc | 3 +- scripts/tabcomplete/tabcomplete_data.dsc | 3 ++ 5 files changed, 39 insertions(+), 24 deletions(-) diff --git a/scripts/lib/textbox.dsc b/scripts/lib/textbox.dsc index 2b47816..b0e715b 100644 --- a/scripts/lib/textbox.dsc +++ b/scripts/lib/textbox.dsc @@ -35,7 +35,7 @@ textbox_write: - queue stop <[queue]> - run textbox_flush def.player:<[player]> - stop - - define lines <[line3s].split[$$nl].parse_tag[<[parse_value].trim>]> + - define lines <[line3s].split[$$nl].parse_tag[<[parse_value].trim.replace[<&0>].with[<&6>]>]> - flag <[player]> textbox_state:writing - flag <[player]> textbox_input:<[lines]> - flag <[player]> textbox_lines:<[lines].size> @@ -57,7 +57,7 @@ textbox_write: - stop - if !<[player].is_online>: - stop - - bossbar update textbox_<[player].uuid>_<[loop_index]> title:<[line].substring[1,<[value]>]> + - bossbar update textbox_<[player].uuid>_<[loop_index]> title:<&6><&l><[line].substring[1,<[value]>]> - if <[value].sub[1].mod[3]> == 0: - playsound sound:textbox.text <[player]> custom pitch: volume:|sound_textbox_volume].div[100].if_null[1]> - wait <[write_speed]>t @@ -100,7 +100,7 @@ textbox_skip: - bossbar create textbox_<[player].uuid>_<[value]> players:<[player]> title: - define lines <[player].flag[textbox_input]> - foreach <[lines]> as:line: - - bossbar update textbox_<[player].uuid>_<[loop_index]> title:<[line]> + - bossbar update textbox_<[player].uuid>_<[loop_index]> title:<&6><&l><[line]> - flag <[player]> textbox_state:continue # Clears textbox and flushes all flag memory values @@ -208,12 +208,12 @@ textbox_handle_click: - ratelimit 5t - else if <[state]> == continue: - determine cancelled passively - - playsound sound:textbox.close custom volume:|sound_textbox_volume].div[100].if_null[1]> + - playsound sound:textbox.close custom volume:|sound_textbox_volume].div[100].if_null[1]> - ~run textbox_flush def.player: - ratelimit 10t - else if <[state]> == choice: - determine cancelled passively - - playsound sound:input.ok custom volume:|sound_textbox_volume].div[100].if_null[1]> + - playsound sound:input.ok custom volume:|sound_textbox_volume].div[100].if_null[1]> - flag textbox_choice_select: - ~run textbox_flush def.player: - ratelimit 10t @@ -250,7 +250,13 @@ textbox_choice: - teleport <[player]> <[player].location.below.above.with_y[<[player].location.below.above.y.round_down>]> - else: - stop - - waituntil <[player].flag[textbox_state].if_null[null]> == null + - waituntil <[player].flag[textbox_state].if_null[null]> == null || !<[player].is_online> + - if !<[player].is_online>: + - if <[queue].if_null[null]> != null: + - debug log "[Textbox] Choice; cancelled queue <[queue].numeric_id><&at><[queue].script.name> for <[player].name>; offline" + - queue stop <[queue]> + - run textbox_flush def.player:<[player]> + - stop - ~run textbox_flush def.player:<[player]> - flag <[player]> textbox_state:choice - flag <[player]> textbox_choices:].with[current].as[left]> @@ -284,35 +290,35 @@ textbox_internal_choice_select: - bossbar create textbox_<[player].uuid>_bottom players:<[player]> title: - define choices <[player].flag[textbox_choices].get[data]> # - - define left <&0><&l><[choices].get[left].get[text].if_null[null]> - - define right <&0><&l><[choices].get[right].get[text].if_null[null]> - - define top <&0><&l><[choices].get[top].get[text].if_null[null]> - - define bottom <&0><&l><[choices].get[bottom].get[text].if_null[null]> + - define left <&6><&l><[choices].get[left].get[text].if_null[null]> + - define right <&6><&l><[choices].get[right].get[text].if_null[null]> + - define top <&6><&l><[choices].get[top].get[text].if_null[null]> + - define bottom <&6><&l><[choices].get[bottom].get[text].if_null[null]> # - if <[choice_dir]> == left: - - if <[left]> == <&0><&l>null: + - if <[left]> == <&6><&l>null: - stop - - define left "<&4>❤ <&0><&l><[left]>" + - define left "<&4>❤ <&6><&l><[left]>" - else if <[choice_dir]> == right: - - if <[right]> == <&0><&l>null: + - if <[right]> == <&6><&l>null: - stop - - define right "<&4>❤ <&0><&l><[right]>" + - define right "<&4>❤ <&6><&l><[right]>" - else if <[choice_dir]> == top: - - if <[top]> == <&0><&l>null: + - if <[top]> == <&6><&l>null: - stop - - define top "<&4>❤ <&0><&l><[top]>" + - define top "<&4>❤ <&6><&l><[top]>" - else: - - if <[bottom]> == <&0><&l>null: + - if <[bottom]> == <&6><&l>null: - stop - - define bottom "<&4>❤ <&0><&l><[bottom]>" + - define bottom "<&4>❤ <&6><&l><[bottom]>" # - define mid_padding ].repeat[].sub[<[right].strip_color.length>]>]> # - - if <[top]> != <&0><&l>null: + - if <[top]> != <&6><&l>null: - bossbar update textbox_<[player].uuid>_top title:<[top]> - - if <[left]> != <&0><&l>null || <[right]> != <&0><&l>null: + - if <[left]> != <&6><&l>null || <[right]> != <&6><&l>null: - bossbar update textbox_<[player].uuid>_mid title:<[left]><[mid_padding]><[right]> - - if <[bottom]> != <&0><&l>null: + - if <[bottom]> != <&6><&l>null: - bossbar update textbox_<[player].uuid>_bottom title:<[bottom]> - flag <[player]> textbox_choices:].with[current].as[<[choice_dir]>]> - - playsound BLOCK_NOTE_BLOCK_BIT <[player]> pitch:2 volume:|sound_textbox_volume].div[100].if_null[1]> + - playsound BLOCK_NOTE_BLOCK_BIT <[player]> pitch:2 volume:|sound_textbox_volume].div[100].if_null[1]> \ No newline at end of file diff --git a/scripts/misc/compatibility_check.dsc b/scripts/misc/compatibility_check.dsc index d1ca357..df45608 100644 --- a/scripts/misc/compatibility_check.dsc +++ b/scripts/misc/compatibility_check.dsc @@ -22,7 +22,7 @@ compatibility_check_world: after player joins: - if |general_ignore_version_compatibility_check]>: - stop - - define player_version + - define player_version - define server_version - if |<[server_version]>]> == -1: - wait 5s diff --git a/scripts/storyboard/intro/intro_interactions.dsc b/scripts/storyboard/intro/intro_interactions.dsc index 4145a2f..e6c8174 100644 --- a/scripts/storyboard/intro/intro_interactions.dsc +++ b/scripts/storyboard/intro/intro_interactions.dsc @@ -78,6 +78,11 @@ intro_interact_laptop_task_name_callback: script: - define __player <[player]> - define name <[input].substring[1,24]> + - if ]>: + - narrate targets:<[player]> "<&c>That RP name is already taken. Try a different one!" + - wait 1s + - run anvil_input def.player: "def.prompt:Character Name" def.callback:intro_interact_laptop_task_name_callback + - stop - execute as_player player:<[player]> "rpname <[name]>" - ~run textbox_write def.player: def.queue: def.line3s:<[name]> - ~run textbox_write def.player: def.queue: "def.line3s:How nice!" diff --git a/scripts/storyboard/tasks/storyboard_player_tasks.dsc b/scripts/storyboard/tasks/storyboard_player_tasks.dsc index 1295fd1..c44ca20 100644 --- a/scripts/storyboard/tasks/storyboard_player_tasks.dsc +++ b/scripts/storyboard/tasks/storyboard_player_tasks.dsc @@ -72,7 +72,6 @@ storyboard_player_begin_atomic_sequence: type: task definitions: queue|player script: - - announce to_ops <[queue].script.name> - if <[player].flag[storyboard_atomic].if_null[].contains[<[queue].script.name>]>: - queue <[queue]> stop - stop @@ -88,6 +87,8 @@ storyboard_player_end_atomic_sequence: - if !<[player].flag[storyboard_atomic].if_null[].contains[<[queue].script.name>]>: - debug error "Tried ending storyboard atomic sequence <[queue].script.name> before storyboard_player_begin_atomic_sequence was called! (Player UUID <[player].uuid>)" - stop + - waituntil ! + - wait 5t - flag <[player]> storyboard_atomic:<[player].flag[storyboard_atomic].if_null[].exclude[<[queue].script.name>]> ## Internal only! diff --git a/scripts/tabcomplete/tabcomplete_data.dsc b/scripts/tabcomplete/tabcomplete_data.dsc index 2252cd3..c41cedb 100644 --- a/scripts/tabcomplete/tabcomplete_data.dsc +++ b/scripts/tabcomplete/tabcomplete_data.dsc @@ -4,7 +4,10 @@ tabcomplete_config: groups: default: commands: + # please keep these here... - plugins + - denizenclickable + # anything else - sit - lay - crawl