From 04f34cc3a69fd9c7ee35dbcaef4e0b72fb1e9463 Mon Sep 17 00:00:00 2001 From: Deysh <61760541+Deysh@users.noreply.github.com> Date: Mon, 20 Jan 2025 05:44:35 -0500 Subject: [PATCH 1/3] [bigshot] v5.7.3 added cmd tether for 706 wait --- scripts/bigshot.lic | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/scripts/bigshot.lic b/scripts/bigshot.lic index d9314af6d..f3a7c3b05 100644 --- a/scripts/bigshot.lic +++ b/scripts/bigshot.lic @@ -8,7 +8,7 @@ contributors: SpiffyJr, Tillmen, Kalros, Hazado, Tysong, Athias, Falicor, Deysh, Nisugi game: Gemstone tags: hunting, bigshot, combat - version: 5.7.2 + version: 5.7.3 required: Lich >= 5.5.0, infomon >= 1.18.11 Setup Instructions: https://gswiki.play.net/Script_Bigshot @@ -17,6 +17,8 @@ Version Control: Major_change.feature_addition.bugfix + v5.7.3 (2025-01-20) + - added command tether to have spell 706 wait until completion v5.7.2 (2025-01-15) - added implosion(720) cooldown - added check for voidweaver buff from 720 @@ -2936,6 +2938,8 @@ class Bigshot cmd_wield($1, $2) elsif (command =~ /^store\s+(left|right|both)?/i) cmd_store($1) + elsif (command =~ /^tether/i) + cmd_tether(npc) else return if $ambusher_here return if $obvious_hiding_player @@ -4619,6 +4623,30 @@ class Bigshot } end + def cmd_tether(target) + debug_msg(@DEBUG_COMMANDS, "cmd_tether | called by #{caller[0]}") + + return if npc.status =~ /dead|gone/ + return unless GameObj.targets.any? { |s| s.id == npc.id } + return unless Spell[706].known? and Spell[706].affordable? + + waitrt? + waitcastrt? + time_out = Time.now + 12 + Spell[706].cast + + loop { + line = get? + break if Time.now > time_out + break if should_flee? + break if npc.status =~ /dead|gone/ + break unless GameObj.targets.any? { |s| s.id == npc.id } + break if line =~ /dissolve into black mist/ + stand unless standing? + sleep(0.01) + } + end + def group_status_ailments() debug_msg(@DEBUG_STATUS, "group_status_ailments | called by #{caller[0]}") From 34780dd475aec84af14d5005dfe964ab455f15c7 Mon Sep 17 00:00:00 2001 From: Deysh <61760541+Deysh@users.noreply.github.com> Date: Mon, 20 Jan 2025 05:52:47 -0500 Subject: [PATCH 2/3] variable typo --- scripts/bigshot.lic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bigshot.lic b/scripts/bigshot.lic index f3a7c3b05..22691a2d9 100644 --- a/scripts/bigshot.lic +++ b/scripts/bigshot.lic @@ -4623,7 +4623,7 @@ class Bigshot } end - def cmd_tether(target) + def cmd_tether(npc) debug_msg(@DEBUG_COMMANDS, "cmd_tether | called by #{caller[0]}") return if npc.status =~ /dead|gone/ From 829d3ccda6f77dea28dc80076fe7f1f1025b4b0d Mon Sep 17 00:00:00 2001 From: Deysh <61760541+Deysh@users.noreply.github.com> Date: Tue, 21 Jan 2025 08:07:23 -0500 Subject: [PATCH 3/3] efury/testher update and incorporated constant redefinition --- scripts/bigshot.lic | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/scripts/bigshot.lic b/scripts/bigshot.lic index 22691a2d9..ad56a9543 100644 --- a/scripts/bigshot.lic +++ b/scripts/bigshot.lic @@ -19,6 +19,8 @@ Major_change.feature_addition.bugfix v5.7.3 (2025-01-20) - added command tether to have spell 706 wait until completion + - update to efury command + - fix for constant redefinition Ruby warnings v5.7.2 (2025-01-15) - added implosion(720) cooldown - added check for voidweaver buff from 720 @@ -325,9 +327,9 @@ require 'logger' FileUtils.mkdir_p(File.join($data_dir, XMLData.game, Char.name, "bigshot_profiles")) # Global Variables -BIGSHOT_VERSION = get_script_version -RALLY_TIME = 1 -REST_INTERVAL = 60 +$bigshot_version = get_script_version +$bigshot_rally_time = 1 +$bigshot_rest_interval = 60 $bigshot_1614_list = [] $bigshot_703_list = [] $bigshot_adrenal_surge = Time.now + 301 @@ -1032,7 +1034,7 @@ class Bigshot load_settings set_tooltips self['main'].keep_above = true - self['main'].set_title "Big Shot: v#{BIGSHOT_VERSION}" + self['main'].set_title "Big Shot: v#{$bigshot_version}" # connect signals after settings are loaded to a bunch of handlers don't trigger connect_signals { |handler| method(handler) } @@ -1895,7 +1897,7 @@ class Bigshot :REMAINING_SKINS, :SKIN, :BUNDLE_SKIN, :GEM, :GEM_NUMBER, :TRACKING_CREATURE, :BOUNTY_EVAL, :CHECK_FAVOR, :DEBUG_COMBAT, :DEBUG_COMMANDS, :DEBUG_STATUS, :DEBUG_SYSTEM, :DEBUG_FILE, :debug_logger, :LAST_CALLED, :REST_PREP - PRONE = /sleeping|webbed|stunned|kneeling|sitting|^lying|prone|frozen|held in place|entangled/ + PRONE ||= /sleeping|webbed|stunned|kneeling|sitting|^lying|prone|frozen|held in place|entangled/ # Changed to gameobj-data.xml detection 4.12.2 update # No longer needed # BOON_LIST_ADJECTIVES = /^(?:adroit |afflicted |apt |barbed |belligerent |blurry |canny |combative |dazzling |deft |diseased |drab |dreary |ethereal |flashy |flexile |flickering |flinty |frenzied |ghastly |ghostly |gleaming |glittering |glorious |glowing |grotesque |hardy |illustrious |indistinct |keen |lanky |luminous |lustrous |muculent |nebulous |oozing |pestilent |radiant |raging |ready |resolute |robust |rune-covered |shadowy |shielded |shifting |shimmering |shining |sickly green |sinuous |slimy |sparkling |spindly |spiny |stalwart |steadfast |stout |tattooed |tenebrous |tough |twinkling |unflinching |unyielding |wavering |wispy )/ @@ -2043,7 +2045,7 @@ class Bigshot rows << [{ value: "Options can be combined:", colspan: 2, alignment: :left }] rows << [{ value: " #{$lich_char}#{Script.current.name} debug combat commands status ", colspan: 2, alignment: :left }] - table = Terminal::Table.new :title => "#{Script.current.name.capitalize} Debug Help v#{BIGSHOT_VERSION}", :rows => rows + table = Terminal::Table.new :title => "#{Script.current.name.capitalize} Debug Help v#{$bigshot_version}", :rows => rows table.align_column(1, :right) respond respond table @@ -2052,7 +2054,7 @@ class Bigshot respond "" respond "#############################################################################" respond "" - respond " #{Script.current.name.capitalize} Debug Help v#{BIGSHOT_VERSION}" + respond " #{Script.current.name.capitalize} Debug Help v#{$bigshot_version}" respond "" respond " Debug options have changed to be more helpful." respond "------------------------------------------------------------" @@ -2218,7 +2220,7 @@ class Bigshot stop_script(hs_name) if running?(hs_name) } fput("movement autosneak off") if $bigshot_sneaky_hunt - echo "debug active for bigshot version #{BIGSHOT_VERSION}" if $bigshot_debug + echo "debug active for bigshot version #{$bigshot_version}" if $bigshot_debug } end @@ -4205,10 +4207,13 @@ class Bigshot return unless GameObj.targets.any? { |s| s.id == npc.id } return unless Spell[917].known? and Spell[917].affordable? + complete_line = /The (?:floor|ground) beneath .* suddenly calms\./ + waitrt? waitcastrt? time_out = Time.now + 12 - Spell[917].force_incant("#{extra}") + result = Spell[917].force_incant("#{extra}") + return if result =~ complete_line loop { line = get? @@ -4216,7 +4221,7 @@ class Bigshot break if should_flee? break if npc.status =~ /dead|gone/ break unless GameObj.targets.any? { |s| s.id == npc.id } - break if line =~ /The (?:floor|ground) beneath .* suddenly calms\./ + break if line =~ complete_line break if line =~ /The evanescent shield shrouding .* flares to life and absorbs the essence of the spell, dissipating it harmlessly\./ stand unless standing? sleep(0.01) @@ -4630,10 +4635,13 @@ class Bigshot return unless GameObj.targets.any? { |s| s.id == npc.id } return unless Spell[706].known? and Spell[706].affordable? + complete_line = /dissolve into black mist/ + waitrt? waitcastrt? time_out = Time.now + 12 - Spell[706].cast + result = Spell[706].force_incant(nil, /dissolve into black mist\./) + return if result =~ complete_line loop { line = get? @@ -4641,7 +4649,7 @@ class Bigshot break if should_flee? break if npc.status =~ /dead|gone/ break unless GameObj.targets.any? { |s| s.id == npc.id } - break if line =~ /dissolve into black mist/ + break if line =~ complete_line stand unless standing? sleep(0.01) } @@ -5383,7 +5391,7 @@ class Bigshot message("yellow", "#{name} isn't hunting because: #{reason}") } _respond - sleep(REST_INTERVAL) + sleep($bigshot_rest_interval) end # make sure we get everyone recognized as part of the group @@ -6994,7 +7002,7 @@ elsif (Script.current.vars[1] =~ /profile/i) Bigshot.profile(Script.current.vars) elsif (Script.current.vars[1] =~ /display/i) - echo "Version: #{BIGSHOT_VERSION}" + echo "Version: #{$bigshot_version}" UserVars.op.each_pair { |k, v| echo "#{k}: #{v}" unless v.nil? || v.class.to_s == 'Array' || v.to_s =~ /^\s*$/ } @@ -7051,7 +7059,7 @@ elsif (Script.current.vars[1] =~ /head|lead/i) my_group.set_leader(bs) # announce/go - (1..RALLY_TIME).each { |_i| fput "whisper ooc group Bigshot rallying at #{uri}"; sleep(1); } + (1..$bigshot_rally_time).each { |_i| fput "whisper ooc group Bigshot rallying at #{uri}"; sleep(1); } echo "Waiting for members to join Bigshot rally..." wait_until { (my_group.size() > 1) }