Feature - Implemented add reminder to buy free goofballs before ascending if not already done

jimmeofdoom

New member
once-per-ascension freebie goofballs should be collected before ascending (along with all the other reminders about buying skills, breaking zap wands, etc)
 

Bale

Minion
My preAscensionScript has these lines:

PHP:
void goofballs() {
	if(visit_url("tavern.php?place=susguy&pwd").contains_text("First bottle's free, man")) {
		print("I know they're bad for me, but... \"Hey! Free Goofballs!\"", "olive");
		visit_url("tavern.php?action=buygoofballs&pwd");
	}
}

boolean get_monkey() {
	item monkey = $item[balloon monkey];
	if(item_amount(monkey) > 0) return true;
	if(storage_amount(monkey) > 0) return take_storage(1, monkey);
	if(closet_amount(monkey) > 0) return take_closet(1, monkey);
	return false;
}

void balloon_monkey() {
	if(get_property("lastEasterEggBalloon").to_int() < my_ascensions() && get_monkey())
		visit_url("lair2.php?preaction=key&whichkey=436&pwd");
}

void gunpowder() { 
    if(available_amount($item[barrel of gunpowder]) > 4)  {
        retrieve_item(available_amount($item[barrel of gunpowder]), $item[barrel of gunpowder]);
        visit_url("postwarisland.php?place=lighthouse&action=pyro&pwd");
    }
}

// Convert all Loathing Legion whatevers into their base form
void LoathingLegionKnife() {
	foreach other in get_related($item[Loathing Legion knife], "fold")
		while(available_amount(other) > 0 && other != $item[Loathing Legion knife])
			cli_execute("fold Loathing Legion knife");
}

void main() {
	if(get_property("kingLiberated").to_boolean()) {
		goofballs();
		balloon_monkey();
		gunpowder();
		LoathingLegionKnife();
		print("Prepared for Ascension.");
	} else abort("WTF!?  Why is a preAscensionScript runnin'?");
}
 
So, balloon monkey reminder is already a reminder. The gunpowder should be covered with breakfast (seems unnecessary to have a reminder to do breakfast), and that's not a "per ascension" thing anyways. And the loathing legion knife I assume is a convenience thing, not because you're missing out on an opportunity? So, unless I'm missing something the goofball add is the only piece we're missing?

I'll take a stab at this if someone doesn't get to it earlier, the next time I'm ready to ascend.
 

Bale

Minion
Gun powder is covered by breakfast? I wasn't aware of that.

The balloon monkey is automated since I'd always want to do it and sometimes it ends up in my closet to avoid PvP theft so the function is actually rather helpful.

I like to fold my knife because once I wanted to lend it to someone while I was in hardcore, but could not since only the base form can be traded. I'm not sure if that is an opportunity or a convenience, but it might be worth a warning.

I'll take a stab at this if someone doesn't get to it earlier, the next time I'm ready to ascend.

If you're going to do that something should be pointed out. My apology if this was obvious to you. None of mafia's reminders require a server hit. I'd recommend that you add a preference to indicate if free goofballs are still available. (Set it false if free goofballs are acquired.) Then use that instead of hitting the server.
 

roippi

Developer
I reverted r12293.

It is inappropriate to add an extra server hit every time valhalladecorator is called just to check for free goofballs. Implement a preference if you want to add this feature.
 
Top