Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[eloot.lic] v1.6.11 check to make sure box is locked when using locksmith #1354

Merged
merged 1 commit into from
Nov 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 23 additions & 18 deletions scripts/eloot.lic
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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

Expand Down
Loading