diff --git a/scripts/bigshot.lic b/scripts/bigshot.lic index e60c8ffce..f5dd088f0 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.9.4 + version: 5.9.5 required: Lich >= 5.12.1 Setup Instructions: https://gswiki.play.net/Script_Bigshot @@ -17,6 +17,12 @@ Version Control: Major_change.feature_addition.bugfix + v5.9.5 (2025-07-22) + - remove companion_check calls as no longer needed with migration to GameObj.targets for valid creatures + - add check_disks param to bigclaim? method + - add claim check to attack_break and need_to_loot (ignoring disk check) + - add coupdegrace buff check and command check + - increase bs_move timeout from 2 to 5 v5.9.4 (2025-07-08) - bugfix for leader final loot to only work if claim is true v5.9.3 (2025-07-02) @@ -3011,7 +3017,7 @@ class Bigshot # check mana/stamina/health(percentage)/encumbrance/unarmed tiering/mobs in room/target not prone/target undead # ! means the inverse/opposite effect original_command = command - if (command =~ /(.*)\((.*?(?:!?506|!?ancient|!?animate|!?barrage|!?bearhug|buff|!?burst|!?celerity|censer|!?disease|!?e|!?frozen|!?flurry|!?flying|!?fury|!?garrote|!?h|!?hidden|!?holler|!?justice|!?k|!?m|!?mob|!?momentum|!?noncorporeal|once|!?outside|!?pcs|!?poison|!?prone|!?pummel|!?rapid|!?rebuke|!?reflex|room|!?rooted|!?s|!?scourge|!?shout|!?surge|!?tailwind|!?tier|!?tier1|!?tier2|!?tier3|!?thrash|!?undead|!?v|!?vigor|!?voidweaver|!?yowlp).*?)\)$/i) + if (command =~ /(.*)\((.*?(?:!?506|!?ancient|!?animate|!?barrage|!?bearhug|buff|!?burst|!?celerity|censer|!?coupdegrace|!?disease|!?e|!?frozen|!?flurry|!?flying|!?fury|!?garrote|!?h|!?hidden|!?holler|!?justice|!?k|!?m|!?mob|!?momentum|!?noncorporeal|once|!?outside|!?pcs|!?poison|!?prone|!?pummel|!?rapid|!?rebuke|!?reflex|room|!?rooted|!?s|!?scourge|!?shout|!?surge|!?tailwind|!?tier|!?tier1|!?tier2|!?tier3|!?thrash|!?undead|!?v|!?vigor|!?voidweaver|!?yowlp).*?)\)$/i) command = $1.strip $2.split(" ").each { |s| @@ -3045,24 +3051,25 @@ class Bigshot if s =~ /((?:buff))(\d+)/i amount = $2.to_i buff_check = { - 'barrage' => lambda { !(Effects::Buffs.time_left("Enh. Dexterity (+10)") <= (amount / 60.to_f)) }, - 'bearhug' => lambda { !(Effects::Buffs.time_left("Enh. Strength (+10)") <= (amount / 60.to_f)) }, - 'flurry' => lambda { !(Effects::Buffs.time_left("Slashing Strikes") <= (amount / 60.to_f)) }, - 'fury' => lambda { !(Effects::Buffs.time_left("Enh. Constitution (+10)") <= (amount / 60.to_f)) }, - 'garrote' => lambda { !(Effects::Buffs.time_left("Enh. Agility (+10)") <= (amount / 60.to_f)) }, - 'kweed' => lambda { !(Effects::Buffs.time_left("Tangleweed Vigor") <= (amount / 60.to_f)) }, - 'pummel' => lambda { !(Effects::Buffs.time_left("Concussive Blows") <= (amount / 60.to_f)) }, - 'shout' => lambda { !(Effects::Buffs.time_left("Empowered (+20)") <= (amount / 60.to_f)) }, - 'thrash' => lambda { !(Effects::Buffs.time_left("Forceful Blows") <= (amount / 60.to_f)) }, - 'weed' => lambda { !(Effects::Buffs.time_left("Tangleweed Vigor") <= (amount / 60.to_f)) }, - 'yowlp' => lambda { !(Effects::Buffs.time_left("Yertie's Yowlp") <= (amount / 60.to_f)) }, + 'barrage' => lambda { !(Effects::Buffs.time_left("Enh. Dexterity (+10)") <= (amount / 60.to_f)) }, + 'bearhug' => lambda { !(Effects::Buffs.time_left("Enh. Strength (+10)") <= (amount / 60.to_f)) }, + 'coupdegrace' => lambda { !(Effects::Buffs.time_left(/Empowered \(\+\d+\)/) <= (amount / 60.to_f)) }, + 'flurry' => lambda { !(Effects::Buffs.time_left("Slashing Strikes") <= (amount / 60.to_f)) }, + 'fury' => lambda { !(Effects::Buffs.time_left("Enh. Constitution (+10)") <= (amount / 60.to_f)) }, + 'garrote' => lambda { !(Effects::Buffs.time_left("Enh. Agility (+10)") <= (amount / 60.to_f)) }, + 'kweed' => lambda { !(Effects::Buffs.time_left("Tangleweed Vigor") <= (amount / 60.to_f)) }, + 'pummel' => lambda { !(Effects::Buffs.time_left("Concussive Blows") <= (amount / 60.to_f)) }, + 'shout' => lambda { !(Effects::Buffs.time_left("Empowered (+20)") <= (amount / 60.to_f)) }, + 'thrash' => lambda { !(Effects::Buffs.time_left("Forceful Blows") <= (amount / 60.to_f)) }, + 'weed' => lambda { !(Effects::Buffs.time_left("Tangleweed Vigor") <= (amount / 60.to_f)) }, + 'yowlp' => lambda { !(Effects::Buffs.time_left("Yertie's Yowlp") <= (amount / 60.to_f)) }, } debug_msg(@DEBUG_COMMANDS, "command_check section 2 | s: #{s} | command: #{command} | buff_check[command]: #{result = buff_check[command].call} | called by #{caller[0]}") return result if result end - if s =~ /((?:!?506|!?ancient|!?animate|!?barrage|!?bearhug|!?burst|!?celerity|censer|!?disease|!?flurry|!?flying|!?frozen|!?fury|!?garrote|!?hidden|!?holler|!?justice|!?momentum|!?noncorporeal|once|!?outside|!?pcs|!?poison|!?prone|!?pummel|!?rapid|!?rebuke|!?reflex|room|!?rooted|!?scourge|!?shout|!?surge|!?tailwind|!?thrash|!?tier1|!?tier2|!?tier3|!?undead|!?vigor|!?voidweaver|!?yowlp))/i + if s =~ /((?:!?506|!?ancient|!?animate|!?barrage|!?bearhug|!?burst|!?celerity|censer|!?coupdegrace|!?disease|!?flurry|!?flying|!?frozen|!?fury|!?garrote|!?hidden|!?holler|!?justice|!?momentum|!?noncorporeal|once|!?outside|!?pcs|!?poison|!?prone|!?pummel|!?rapid|!?rebuke|!?reflex|room|!?rooted|!?scourge|!?shout|!?surge|!?tailwind|!?thrash|!?tier1|!?tier2|!?tier3|!?undead|!?vigor|!?voidweaver|!?yowlp))/i item = $1.strip other_checks = { '506' => lambda { (!Spell[506].active?) }, @@ -3079,6 +3086,8 @@ class Bigshot '!burst' => lambda { Effects::Cooldowns.active?("Burst of Swiftness") }, 'celerity' => lambda { (!Spell[506].active?) }, '!celerity' => lambda { (Spell[506].active? && Spell[506].timeleft <= 0.05) }, + 'coupdegrace' => lambda { !Effects::Buffs.active?(/Empowered \(\+\d+\)/) }, + '!coupdegrace' => lambda { Effects::Buffs.active?(/Empowered \(\+\d+\)/) }, 'disease' => lambda { !checkdisease }, '!disease' => lambda { checkdisease }, 'flurry' => lambda { !Effects::Buffs.active?("Slashing Strikes") }, @@ -5142,11 +5151,11 @@ class Bigshot debug_msg(@DEBUG_STATUS, "groupcheck | Group.members.map(&:noun): #{Lich::Gemstone::Group.members.map(&:noun)} | called by #{caller[0]}") end - def bigclaim? + def bigclaim?(check_disks: true) debug_msg(@DEBUG_STATUS, "bigclaim? | $bigshot_quick: #{$bigshot_quick} | Claim.mine?: #{Lich::Gemstone::Claim.mine?} | Disks: #{(Lich::Gemstone::Disk.all - Lich::Gemstone::Group.disks)} | called by #{caller[0]}") return true if $bigshot_quick return false unless Lich::Gemstone::Claim.mine? - return false unless @IGNORE_DISKS || (Lich::Gemstone::Disk.all - Lich::Gemstone::Group.disks).empty? + return false unless @IGNORE_DISKS || (!check_disks || (Lich::Gemstone::Disk.all - Lich::Gemstone::Group.disks).empty?) return true end @@ -5197,7 +5206,7 @@ class Bigshot debug_msg(@DEBUG_STATUS, "lead | called by #{caller[0]}") monitor_interaction() - companion_check() + # companion_check() # commented out 7/22/2025, no longer needed with move to GameObj.targets for valid creatures npc_room_check() @followers = my_group || Group.new() if !checkpcs.nil? @@ -5729,6 +5738,7 @@ class Bigshot def attack_break(target) break_conditions = { + "No Claim" => !bigclaim?(check_disks: false), "Invalid target" => !valid_target?(target), "Should Rest" => $bigshot_should_rest, "Ambusher present" => $ambusher_here, @@ -5782,6 +5792,7 @@ class Bigshot end def need_to_loot?(final_loot = false) + return unless bigclaim?(check_disks: false) return unless leading? return unless checkroom("Duskruin Arena, Dueling Sands").nil? return if should_flee? @@ -6697,7 +6708,7 @@ class Bigshot $wander_rooms.push(next_room) way = room.wayto[next_room] if way.is_a?(String) - move(way, 2) # attempts to move WAY with timeout of 2 seconds + move(way, 5) # attempts to move WAY with timeout of 5 seconds else way.call end @@ -7256,7 +7267,7 @@ elsif (Script.current.vars[1] =~ /tail|follow|link/i) bs = Bigshot.new(Script.current.vars) group.add_member(bs) - bs.companion_check() + # bs.companion_check() # commented out 7/22/2025, no longer needed with move to GameObj.targets for valid creatures bs.npc_room_check() end end