Malurth / Auto-2-day-HCCS

KoLmafia script to automate 2-day Hardcore Community Service
9 stars 4 forks source link

No detection of which services have been performed #4

Closed MrHrulgin closed 8 years ago

MrHrulgin commented 8 years ago

Having failed to complete day 1 by rollover, when I ran the script again later that evening, it started buffing and feeding for day 2's plan despite none of day 1's services being completed.

Malurth commented 8 years ago

(whoops, didn't mean to close this, thought it was your other issue, that you apparently closed yourself before I got to it :p)

yeah the script is structured to just run day 1's stuff on the first day and run day 2's stuff on the second day. If you didn't manage to actually finish day 1's stuff before rollover your run is almost certainly screwed anyway, frankly, so I don't think making it more flexible in this manner would really be beneficial.

MrHrulgin commented 8 years ago

Is it possible to handle each service separately? The script failed before I'd done even the first one on day one, so it wouldn't have been an offence from my perspective to have re-run day 1. If nothing else, is there a way to make it think it's day 1 again so I don't have to do this run manually before I can try the script again?

Malurth commented 8 years ago

well how it works it it just checks which day you are in, then runs that day, skipping any tasks that it has saved as being already done

So if you wanna manually run day 1 despite it being day 2, find the line near the bottom of the script:

if (my_daycount() == 1 && actuallyrun) {

change '== 1' to '== 2' and it will run the day 1 portion for you. It should pick up where you left off, but it will probably screw with the script overall since there's a lot of stuff that's day-dependent (summons, consumables, etc).

MrHrulgin commented 8 years ago

Cool, thank you. If it can handle a chunk of it, it'll still be appreciated.

Edit:

call scripts\AutoHCCS.ash

Running HCCS Day 1... Day 1 complete!!

Malurth commented 8 years ago

yeah so I guess it didn't pick up where it left off. I'm guessing it ran day 2 and saved your progress. You can change that manually too, in data/AutoHCCSvars.txt; the variable "questStage" is where it picks off from; the code

saveProgress(int questStage);
is used to denote what to skip. So you'd have to comb through the code a bit, prolly searching for that function being called, but you just change that variable in AutoHCCSvars.txt, save the file, and run it again.
MrHrulgin commented 8 years ago

Thank you.