DashingStrike / Automato-ATITD

Automato scripts for A Tale in the Desert
MIT License
5 stars 25 forks source link

Glass.lua #91

Closed Jimbly closed 6 years ago

Jimbly commented 7 years ago

Submitter: Bramanaken Not reading the temp in bench window but does acknowledge when window is closed or another opened.

SildenEgypt commented 6 years ago

Changes to glass.lua needed:

Line 4, window_w = 320;
Line 6, temp_width = 95;
Before line 24, add: local numberImageWidth = 7; local numberImageHeight = 11;
Line 28, local pos = srFindImageInRange("glass" .. i .. ".png", x, y, numberImageWidth, numberImageHeight, tol);
Line 45, x = x + numberImageWidth + 1;
Line 47, local pos = srFindImageInRange("glass" .. i .. ".png", x, y, numberImageWidth, numberImageHeight, tol);
Remove line 96, replace with: 
cooking = srFindImageInRange("GlassCooking.png", window_pos[0]-10, window_pos[1], window_w, window_h, tol);
if cooking then
    nothing_cooking = false;
else
    nothing_cooking = true;
end

Needs the following new images: glass0.png: glass0 glass1.png: glass1 glass2.png: glass2 glass3.png: glass3 glass4.png: glass4 glass5.png: glass5 glass6.png: glass6 glass7.png: glass7 glass8.png: glass8 glass9.png: glass9 GlassCooking.png: glasscooking

Needs amendments to the following images: GlassTemperature.png: glasstemperature GlassTimeToStop.png: glasstimetostop

Jimbly commented 6 years ago

RE: the new images, just to double check, are you sure you've got the UI scale at default (most other scripts work)?

You should be able to make the edits yourself directly at https://github.com/DashingStrike/Automato-ATITD/blob/master/scripts/glass.lua (will make a "pull request") - just copy and paste the corrected file in, will be less error prone =). If you use Git directly, you could also upload the images, but Git can be a pain, so if you're not familiar with it, someone else could help with that part.

SildenEgypt commented 6 years ago

I have the UI Scale set to allow all macro's to work. There was a UI change on the Glass Benches in the middle of Tale 7 which caused it to break for everyone.

I have submitted a pull request, as it's my first, it may need extra scrutiny to ensure it's done right.

Jimbly commented 6 years ago

Great, thanks for submitting a pull request, it's been merged! I think all of the recent experts on ATITD macroing have stopped playing, I haven't played since Tale 4, I just maintain the Automato code (and sometimes use it for other games), so I'll accept pretty much any pull requests as-is =). If anyone steps up and wants to review PRs they're welcome to, but the ATITD scripts have been inactive enough that I'm happy to see any contributions =)