In case anyone needs to script TimeSpinner use (before it is implemented natively), I wrote a few functions you may find useful.
PHP:
//Fight a monster based on ID #
boolean TimeFight(int mid) {
monster mon = to_monster(mid);
print("TimeFighting a "+mon,"maroon");
buffer page = visit_url("inv_use.php?pwd=&whichitem=9104");
if (get_property("_timeSpinnerMinutesUsed").to_int()>7) {
print("TimeFighting failed, not enough minutes","red");
return false;
}
page = run_choice(1);
if (contains_text(page,"option value=\""+mid+"\"")) {
//print("TimeFighting "+mon,"blue");
page = visit_url("choice.php?pwd=&whichchoice=1196&option=1&monid="+mid);
page = run_combat();
return true;
} else {
print("TimeFighting failed, "+mon+" not available","red");
return false;
}
}
//Fight a $monster[]
boolean TimeFight(monster mon) {
return TimeFight(to_int(mon.id));
}
//Eat a remembered food
boolean TimeEat(item fud) {
int iid = to_int(fud);
buffer page = visit_url("inv_use.php?pwd=&whichitem=9104");
if (get_property("_timeSpinnerMinutesUsed").to_int()>7) {
print("TimeEating failed, not enough minutes","red");
return false;
}
page = run_choice(2);
if (contains_text(page,"option value=\""+iid+"\"")) {
print("TimeEating "+fud,"blue");
page = visit_url("choice.php?pwd=&whichchoice=1197&option=1&foodid="+iid);
return true;
} else {
print("TimeEating failed, "+fud+" not available","red");
return false;
}
}
//Fight a scaling back in time monster
boolean TimePower() {
buffer page = visit_url("inv_use.php?pwd=&whichitem=9104");
if (get_property("_timeSpinnerMinutesUsed").to_int()>9) {
print("TimePower failed, not enough minutes","red");
return false;
}
print("TimePower leveling","maroon");
page = run_choice(3);
run_combat();
if (item_amount($item[compounded experience])>0) {
return true;
} else {
print("TimePower failed","red");
return false;
}
}