From 08fd058b8304f9edc3342542806e052cf37abe83 Mon Sep 17 00:00:00 2001 From: hat071af Date: Mon, 30 Sep 2024 00:31:16 -0700 Subject: [PATCH 1/4] [script] [bescort] Added more flying mount functionality Added support for flying mounts that use different nouns for the activation item and the mount. Flying mounts that don't change nouns retain the same functionality they have. ```# Flying mount setting # Currently only used by bescort for the Faldesu and Segoltha. # Example: flying_mount: silk carpet flying_mount: # If the item you use to summon your mount is different than the mount include it here as well as the activation/dismount verbs, otherwise leave all blank. mountable_item: mountable_verb: mountable_dismount: ``` Possible missing things: - activation/dimount text matches for all mounts - additional speed options. Currently supports items with slow|glide|skim|fly and slow|drift|hover|fly --- bescort.lic | 54 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 45 insertions(+), 9 deletions(-) diff --git a/bescort.lic b/bescort.lic index 6d188cafc0..d12a5225a4 100644 --- a/bescort.lic +++ b/bescort.lic @@ -238,6 +238,13 @@ class Bescort @settings = get_settings @equipment_manager = EquipmentManager.new(@settings) @flying_mount = @settings.flying_mount + if @settings.mountable_item + @flying_mount_item = @settings.mountable_item + else + @flying_mount_item = @settings.flying_mount + end + @flying_mount_activate = @settings.mountable_verb + @flying_mount_dismount = @settings.mountable_dismount pause @@ -324,16 +331,17 @@ class Bescort mode = mode.downcase case mode when 'mount' - DRCI.get_item?(type) case type - when /broom|dirigible/i + when /broom|dirigible/i #### This section is for broom type flying mounts that are just mounted + DRCI.get_item?(type) case DRC.bput("mount my #{type}", /You mount your/, /You are already mounted/, /What were you referring/) when /What were you referring/ DRC.message("Can't mount your #{type}, where is it?") exit end DRC.bput("command #{type} to #{speed}", /You command your/) - when /carpet|rug/i + when /carpet|rug/i #### This section is for carpet style flying mounts that are lowered/unrolled before mounting + DRCI.get_item?(type) DRC.bput(DRC.right_hand == type ? "lower ground right" : "lower ground left", /You lower/, /But you aren't holding/) DRC.bput("unroll #{type}", /You carefully unroll/, /You can't unroll/, /What were you referring/) case DRC.bput("mount #{type}", /You step onto your .* which comes to life and slowly raises up off of the ground/, /You are already mounted/, /What were you referring/) @@ -342,22 +350,34 @@ class Bescort exit end DRC.bput("command #{type} to #{speed}", /You command your/) - else - DRC.message("#{type} is not a valid type of flying mount.") - exit + when /cloud/i #### This section is for mounts with different nouns than their activating item. May need to add more activation matches. + DRCI.remove_item?(@flying_mount_item) + DRCI.get_item_if_not_held?(@flying_mount_item) + case DRC.bput("#{@flying_mount_activate} my #{@flying_mount_item}", /You gently buff/, /Rub what/) + when /What were you referring/ + DRC.message("Can't mount your #{type}, where is it?") + exit + end + DRC.bput("command #{type} to #{speed}", /You command your/, /You signal the/) end when 'dismount' case type when /broom|dirigible/i DRC.bput('dismount', /Your .* floats down to the ground/, /You climb off/) + DRCI.put_away_item?(type) when /carpet|rug/i DRC.bput('dismount', /Your .* floats down to the ground/, /You climb off/) DRC.bput("roll #{type}", /You roll up/, /You can't roll/) + DRCI.put_away_item?(type) + when /cloud/i + DRC.bput("#{@flying_mount_dismount} #{type}", /With a gesture,/) + DRCI.wear_item?(@flying_mount_item) + DRCI.put_away_item?(@flying_mount_item) if checkright + DRCI.put_away_item?(@flying_mount_item) if checkleft else DRC.message("#{type} is not a valid type of flying mount.") exit end - DRCI.put_away_item?(type) end end @@ -1112,7 +1132,15 @@ class Bescort if @flying_mount move_fast = true - use_flying_mount(@flying_mount, 'mount', 'glide') + case @flying_mount + when /broom|dirigible|carpet|rug/i + use_flying_mount(@flying_mount, 'mount', 'glide') + when /cloud/i + use_flying_mount(@flying_mount, 'mount', 'drift') + else + DRC.message("#{@flying_mount} is not a valid type of flying mount.") + exit + end path = mode == 'shard' ? %w[se se sw sw se] : %w[nw ne ne nw sw] else # If the footwear setting has been defined then respect that @@ -1499,7 +1527,15 @@ class Bescort end if @flying_mount - use_flying_mount(@flying_mount, 'mount', 'skim') + case @flying_mount + when /broom|dirigible|carpet|rug/i + use_flying_mount(@flying_mount, 'mount', 'skim') + when /cloud/i + use_flying_mount(@flying_mount, 'mount', 'hover') + else + DRC.message("#{@flying_mount} is not a valid type of flying mount.") + exit + end if dir_of_travel == 'south' move 'go bank' move 'west' From fefd8ca50eac8a819ab6ab80d27f764a0eb82cc1 Mon Sep 17 00:00:00 2001 From: hat071af Date: Mon, 30 Sep 2024 00:38:52 -0700 Subject: [PATCH 2/4] Update bescort.lic --- bescort.lic | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bescort.lic b/bescort.lic index d12a5225a4..dc44e561d9 100644 --- a/bescort.lic +++ b/bescort.lic @@ -332,7 +332,7 @@ class Bescort case mode when 'mount' case type - when /broom|dirigible/i #### This section is for broom type flying mounts that are just mounted + when /broom|dirigible/i # This section is for broom type flying mounts that are just mounted DRCI.get_item?(type) case DRC.bput("mount my #{type}", /You mount your/, /You are already mounted/, /What were you referring/) when /What were you referring/ @@ -340,7 +340,7 @@ class Bescort exit end DRC.bput("command #{type} to #{speed}", /You command your/) - when /carpet|rug/i #### This section is for carpet style flying mounts that are lowered/unrolled before mounting + when /carpet|rug/i # This section is for carpet style flying mounts that are lowered/unrolled before mounting DRCI.get_item?(type) DRC.bput(DRC.right_hand == type ? "lower ground right" : "lower ground left", /You lower/, /But you aren't holding/) DRC.bput("unroll #{type}", /You carefully unroll/, /You can't unroll/, /What were you referring/) @@ -350,7 +350,7 @@ class Bescort exit end DRC.bput("command #{type} to #{speed}", /You command your/) - when /cloud/i #### This section is for mounts with different nouns than their activating item. May need to add more activation matches. + when /cloud/i # This section is for mounts with different nouns than their activating item. May need to add more activation matches. DRCI.remove_item?(@flying_mount_item) DRCI.get_item_if_not_held?(@flying_mount_item) case DRC.bput("#{@flying_mount_activate} my #{@flying_mount_item}", /You gently buff/, /Rub what/) @@ -1139,7 +1139,7 @@ class Bescort use_flying_mount(@flying_mount, 'mount', 'drift') else DRC.message("#{@flying_mount} is not a valid type of flying mount.") - exit + exit end path = mode == 'shard' ? %w[se se sw sw se] : %w[nw ne ne nw sw] else @@ -1534,7 +1534,7 @@ class Bescort use_flying_mount(@flying_mount, 'mount', 'hover') else DRC.message("#{@flying_mount} is not a valid type of flying mount.") - exit + exit end if dir_of_travel == 'south' move 'go bank' From 0fc19020277fd6bd2e20a67f428db024630cdac6 Mon Sep 17 00:00:00 2001 From: hat071af Date: Mon, 30 Sep 2024 01:16:22 -0700 Subject: [PATCH 3/4] Update bescort.lic --- bescort.lic | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bescort.lic b/bescort.lic index dc44e561d9..cc42a78880 100644 --- a/bescort.lic +++ b/bescort.lic @@ -359,6 +359,9 @@ class Bescort exit end DRC.bput("command #{type} to #{speed}", /You command your/, /You signal the/) + else + DRC.message("#{type} is not a valid type of flying mount.") + exit end when 'dismount' case type From ca7ee3ee2f10dbc2f823540a2324050aae749a93 Mon Sep 17 00:00:00 2001 From: hat071af Date: Fri, 11 Oct 2024 23:18:53 -0700 Subject: [PATCH 4/4] Update bescort.lic Added fix for characters less than 100 ranks getting stuck in the Faldesu. Using the mount now happens before entering the Faldesu. --- bescort.lic | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bescort.lic b/bescort.lic index cc42a78880..8f28a7b330 100644 --- a/bescort.lic +++ b/bescort.lic @@ -1223,9 +1223,9 @@ class Bescort start = north ? 1375 : 473 manual_go2(start) moveset = north ? %w[north northwest northeast] : %w[south southwest southeast] - move 'dive river' if @flying_mount use_flying_mount(@flying_mount, 'mount') + move 'go river' if north move n move nw @@ -1236,6 +1236,7 @@ class Bescort move 'go bridge' use_flying_mount(@flying_mount, 'dismount') else + move 'dive river' swim(moveset[0]) while XMLData.room_exits.include?(moveset[0]) swim(moveset[1]) while XMLData.room_exits.include?('east') swim(moveset[2]) while XMLData.room_exits.include?(moveset[0])