I was using a consult script (My first attempt at one) to record when boots get charged so I could use it to stomp Beastly Paste before farming. Unfortunately, I set the property as bootsCharged. Behold a few days later support for boot charging was added in r9854. The problem was it used the same exact name. The script looks like this:
The farming script would then go stomp some ducks for Beastly Paste and set the property back to false. The only time it would be set back to true is when the boots were charged again, unless something else turned it to true, in this case KoLmafia itself by coincidence of using the same exact variable.
What would be a good way to ensure this doesn't happen? Should I have used a Zlib variable instead of KoLmafia settings?
Code:
void main(int initround, monster foe, string page) {
boolean charge = get_property("bootsCharged").to_boolean();
if(contains_text(page,"rubs its soles together") && charge != true ){
set_property("bootsCharged", true);
}
else if( charge != false ){
set_property("bootsCharged", false);
}
}
What would be a good way to ensure this doesn't happen? Should I have used a Zlib variable instead of KoLmafia settings?