Skip to content

Instantly share code, notes, and snippets.

@DamianDominoDavis
Last active July 19, 2023 17:41
Show Gist options
  • Save DamianDominoDavis/795f61098d683872136eaedbeb4b7586 to your computer and use it in GitHub Desktop.
Save DamianDominoDavis/795f61098d683872136eaedbeb4b7586 to your computer and use it in GitHub Desktop.
void main() {
int last_ptrack = get_property("_lastPtrack").to_int();
int track_rate = get_property("autoPtrackRate").to_int();
if (track_rate < 1) {
track_rate = 25;
print("Craptons Log defaulting to 25-turn intervals; set a different number to pref 'autoPtrackRate'",'yellow');
}
if (turns_played() > track_rate + last_ptrack) {
cli_execute("ptrack add " + turns_played());
set_property("_lastPtrack", turns_played());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment