diff --git a/scripts/eloot.lic b/scripts/eloot.lic index e0bd4f0b1..3c8d6c21d 100644 --- a/scripts/eloot.lic +++ b/scripts/eloot.lic @@ -12,8 +12,12 @@ contributors: SpiffyJr, Athias, Demandred, Tysong, Deysh, Ondreian game: Gemstone tags: loot - version: 1.6.10 + version: 1.6.11 Improvements: + v1.6.11 (2023-11-19) + - check to make sure box is locked when using locksmith +=end +=begin v1.6.10 (2023-11-03) - bugfix to use eonake gauntlet with correct hand - bugfix for sewer rat sack @@ -22,8 +26,6 @@ - add check for Gtk gem - fix typo in return_hands method - add look messaging for modular neck sheath -=end -=begin v1.6.9 (2023-11-02) - check mapdb and xmldata for trashcan searching fallback logic v1.6.8 (2023-09-21) @@ -3782,25 +3784,28 @@ module ELoot Inventory.drag(box) unless [GameObj.left_hand.type, GameObj.right_hand.type].include?("box") box = ELoot.box_unphase(box) - res = dothistimeout(activator, 2, /Gimme ([\d,]+) silvers/) - if res =~ /Gimme ([\d,]+) silvers/ - ELoot.data.silver_breakdown["Locksmith Pool"] += -1 * $1.delete(",").to_i - end + lines = ELoot.get_lines("open ##{box.id}", /open|locked/) - unless res - ELoot.msg "info", 'unknown locksmith response' - exit - end + if lines.any?(/locked/) + res = dothistimeout(activator, 2, /Gimme ([\d,]+) silvers/) + if res =~ /Gimme ([\d,]+) silvers/ + ELoot.data.silver_breakdown["Locksmith Pool"] += -1 * $1.delete(",").to_i + end - res = dothistimeout('pay', 2, /accepts|have enough/) - if res =~ /have enough/ - Inventory.single_drag(box, false) - ELoot.silver_withdraw(8000) - ELoot.go2('locksmith') + unless res + ELoot.msg "info", 'unknown locksmith response' + exit + end - return Sell.locksmith_open(box, activator) - end + res = dothistimeout('pay', 2, /accepts|have enough/) + if res =~ /have enough/ + Inventory.single_drag(box, false) + ELoot.silver_withdraw(8000) + ELoot.go2('locksmith') + return Sell.locksmith_open(box, activator) + end + end Loot.box_loot(box, "Locksmith", ELoot.data.silver_breakdown) end