Skip to content

Commit

Permalink
[bigshot.lic] v5.7.3 fix constant redefinition Ruby warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhoribu authored Jan 18, 2025
1 parent c7816ed commit 467ee6e
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions scripts/bigshot.lic
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -17,6 +17,8 @@
Version Control:
Major_change.feature_addition.bugfix
v5.7.3 (2025-01-18)
- fix for constant redefinition Ruby warnings
v5.7.2 (2025-01-15)
- added implosion(720) cooldown
- added check for voidweaver buff from 720
Expand Down Expand Up @@ -323,9 +325,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
Expand Down Expand Up @@ -1030,7 +1032,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) }
Expand Down Expand Up @@ -1893,7 +1895,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 )/
Expand Down Expand Up @@ -2041,7 +2043,7 @@ class Bigshot
rows << [{ value: "Options can be combined:", colspan: 2, alignment: :left }]
rows << [{ value: " #{$lich_char}#{Script.current.name} debug combat commands status <true/false>", 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
Expand All @@ -2050,7 +2052,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 "------------------------------------------------------------"
Expand Down Expand Up @@ -2173,7 +2175,7 @@ class Bigshot
end

if [@DEBUG_COMBAT, @DEBUG_COMMANDS, @DEBUG_STATUS, @DEBUG_SYSTEM].any?(&:itself)
echo "debug active for bigshot version #{BIGSHOT_VERSION}"
echo "debug active for bigshot version #{$bigshot_version}"
$bigshot_debug = true
end
debug_msg(@DEBUG_SYSTEM, "initialize | options: #{options} | called by #{caller[0]}")
Expand Down Expand Up @@ -2216,7 +2218,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

Expand Down Expand Up @@ -5355,7 +5357,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
Expand Down Expand Up @@ -6966,7 +6968,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*$/
}
Expand Down Expand Up @@ -7023,7 +7025,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) }
Expand Down

0 comments on commit 467ee6e

Please sign in to comment.