bumcheekcend.ash - A zero setup semi-automated ascension script!

picklish

Member
Code:
		//Set to turn the wheel. 134 is the initial and 135 subsequent visits. 
		set_property("choiceAdventure134","1");
		set_property("choiceAdventure135","1");
		if (!contains_text(visit_url("pyramid.php"),"pyramid3b.gif")) {
			[b]if (item_amount($item[carved wooden wheel]) == 0)[/b]
				bumAdv($location[Upper Chamber], "", "", "carved wooden wheel", "Getting the Carved Wooden Wheel");
			bumAdv($location[Middle Chamber], "", "", "choiceadv", "Getting the initial choice adventure", "-");
		}
I think you need to add the check for the wooden wheel here (as edited above). If you cancel the script after getting it, but before the initial choice adventure, then the next run of the script adventures forever in the upper chamber.
 
Last edited:

picklish

Member
Code:
		cli_execute("goal clear");
		setFamiliar("itemsnc");
		while (my_basestat($stat[Moxie]) < sMox) {
			if (item_amount($item[dance card]) > 0) {
				use(1, $item[dance card]);
				adventure(4, $location[Haunted Ballroom]);
			} else {
				[b]cli_execute("goal set 1 dance card");[/b]
				//We can't use bumAdv here as we'd get into an infinite loop. And that would be bad. 
				if ((my_buffedstat($stat[Moxie]) < 130) && canMCD()) cli_execute("mcd 0");
				[b]adventure(my_adventures(), $location[Haunted Ballroom]);[/b]
			}
		}
If a dance card doesn't drop, you can end up adventuring far more than you need to in the ballroom. You're already looping until the mox level is hit. I think you should not set the goal at all and only adventure once. If a dance card is found, it will get used by the conditional above. Then, if the moxie level is hit, it will early out a lot sooner.
 

picklish

Member
I'd also like to suggest two features for this script, if you have the time to add them and think they're good ideas:

* Allow a user-configurable script to be called when some user-configurable minimum amount of meat is hit. This could get called during bumAdv or whenever you needed to check for some amount of meat and you didn't have it. That would allow me to automate the autoselling I always end up needing to do on the first two or three days prior to getting the dictionary.

* Allow a user-configurable script to be called when some user-configurable minimum amount of adventures is hit. This would allow me to use adventures crafting food and booze if I need to (or buying a range or a coc.) On early days, if I had no more food at all, I could even attempt to adventure for some food.

By making it configurable, you allow it to still be automatable, but you don't have to write all that logic yourself. :)
 

Theraze

Active member
Gah... 3 posts instead of one.

Regarding your script you want called, that's your between battle script... just put a meat check on it and run whatever you want. It'll check between every battle. And can check based on adventures remaining, or redirect adventures or anything else...

Basically, the functionality is there already, you just need to use it. :) And write the script that does what you want it to.
 

picklish

Member
Oh! I never realized that there was a between battle script. *blush* Thanks for pointing that out; I'll take a look.

Also, I had three unrelated things to say, so I made them separate posts. I'll smush them all together next time if that's the preferred communication style around here.
 

Veracity

Developer
Staff member
I do the same thing, with separate posts going into separate replies. Unlike the main KoL forums, there are no rules against it here, and I think it makes it clearer.

Obviously, not everyone agrees with me/us...
 

tgetgel

Member
I am doing an HC no clover run to unlock BM. I am stuck getting worthless items to get to the hermit. I will never get the big rock to create a legendary weapon since I will not be using a clover in the Casino, nor going to the Heap (since I would be in aftercore by the time I was strong enough).
Code:
1092	//If we're an AT, we should make our Epic Weapon now. It'll be the best weapon for a long time. 
1093	bcascEpicWeapons();
I am using the cloverless variable in the declarations at the top to skip creating the legendary weapon.
Code:
	1093	[COLOR="red"]if (!bcasc_cloverless)[/COLOR]   bcascEpicWeapons();
 

bumcheekcity

Active member
I've changed the ballroom to adventure once without a dance card, added the wooden wheel check, and edited the EpicWeapons() function to do a clovercheck itself.
 

Theraze

Active member
Well, answering different posts, I'd consider different posts... if I'm making a new suggestion though, I'd keep it together as long as nobody else had talked about it. Until a day or two had passed. Just makes it harder to answer the multiple bits together, since posts 2 and 3 were actually the same issue.
 

tgetgel

Member
I've changed the ballroom to adventure once without a dance card, added the wooden wheel check, and edited the EpicWeapons() function to do a clovercheck itself.
That sounds good. Thanks for all of your work. What is the schedule for the posting of the updated script?
 

josmul123

New member
if (!can_drink()) {
if (!can_eat()) {
steelName = "steel lasagna";
whatToDo = "eat steel lasagna";
limitToCheckFor = spleen_limit();
} else {
steelName = "steel-scented air freshener";
whatToDo = "use steel-scented air freshener";
limitToCheckFor = fullness_limit();
}
}

This logic seems wrong to me, and I think that's why this script is looping through the friars for an oxygenarian who already has steel-scented air freshener.
 

picklish

Member
Here's a tavern solver for you.

Code:
boolean bcascTavern() {
    if (checkStage("tavern")) return true;

    if (!checkStage("spookyforest"))
        return false;

    levelMe(14, false);
    visit_url("tavern.php?place=barkeep");
    setMood("");

    while (true) {
        int faucet = 0;
        int try = 0;

        string cellar = visit_url("cellar.php");

        for x from 1 to 5 {
            for y from 1 to 5 {
                if (index_of(cellar, "Explore the Darkness (1) (" + x + "," + y + ")") > 0) {
                    try = x + (y - 1) * 5;
                }
                else if (index_of(cellar, "A Rat Faucet (1) (" + x + "," + y + ")") > 0) {
                    faucet = x + (y - 1) * 5;
                }
            }
        }

        if (faucet != 0) {
            print("BCC: Faucet turned off!", "purple");
            visit_url("council.php");
            checkStage("tavern", true);
            return true;
        } else if (try != 0) {
            if (my_adventures() == 0) abort("No Adventures");

            cli_execute("mood execute; uneffect beaten up; restore hp; restore mp;");
            visit_url("cellar.php?action=explore&whichspot=" + try);
            run_combat();
            visit_url("choice.php?whichchoice=496&option=1&pwd="+my_hash());
            visit_url("choice.php?whichchoice=509&option=1&pwd="+my_hash());
            visit_url("choice.php?whichchoice=510&option=1&pwd="+my_hash());
            visit_url("choice.php?whichchoice=511&option=2&pwd="+my_hash());
            visit_url("choice.php?whichchoice=512&option=2&pwd="+my_hash());
            visit_url("choice.php?whichchoice=513&option=1&pwd="+my_hash());
            visit_url("choice.php?whichchoice=514&option=1&pwd="+my_hash());
            visit_url("choice.php?whichchoice=515&option=1&pwd="+my_hash());
        } else {
            abort("Can't find faucet or dark squares in the tavern.");
            return false;
        }
    }
}
On a related note, I think levelMe should probably execute the current mood. There are some cases where if you interrupt a script right when madrigal runs out, then levelMe thinks it needs to level up when it really doesn't.
 

zarufan1

New member
I'm incredibly ignorant when it comes to scripts and computer languages so I've had trouble actually using this script. When I tried running the thing in mafia, mafia told me that I needed to set up some basic stuff by editing the original script. Unfortunately for myself, I don't really know what to edit. So I'm basically wondering, what all do I have to set that isn't already set, and what do I have to add to make this thing go? Thank you in advance to all you mafia-savvy uber users!
The file itself gives me all this, as I'm sure everyone else knows:

Code:
/**************************************************
* EDIT THESE SETTINGS TO CUSTOMISE YOUR ASCENSION *
**************************************************/


switch (my_name()) {
	case "bumcheekcity":
		bcasc_100familiar = "stocking mimic";
		bcasc_doWarAs = "frat";
		bcasc_doSideQuestArena = true;
		bcasc_doSideQuestJunkyard = true;
		bcasc_doSideQuestBeach = true;
		bcasc_doSideQuestOrchard = true;
		bcasc_doSideQuestNuns = false;
		bcasc_doSideQuestDooks = false;
	break;
	
	case "bumcheekasctest" :
	case "bumcheekasctest2" :
		bcasc_doWarAs = "hippy";
		bcasc_cloverless = true;
		bcasc_doSideQuestArena = false;
		bcasc_doSideQuestJunkyard = false;
		bcasc_doSideQuestBeach = false;
		bcasc_doSideQuestOrchard = true;
		bcasc_doSideQuestNuns = true;
		bcasc_doSideQuestDooks = true;
	break;
	
	default:
		//The name of any familiar if you want to do a 100% run, else just ignore this.
		bcasc_100familiar = "";
		
		//True if you want to make a bartender. The script will always make a chef if it can. 
		bcasc_bartender = false;
		
		//Set this to true if you want the script to do the Bedroom for you after the Bonerdagon, automatically opening up the ballroom. 
		//If you have few skills, you may want to do this manually. 
		bcasc_bedroom = true;
		
		//Set this to true if you want to do a cloverless ascension. 
		bcasc_cloverless = false;
		
		//String "frat" or "hippy" in lowercase.
		bcasc_doWarAs = "frat";

		//Indicate whether or not you want to do each of the sidequests.
		bcasc_doSideQuestArena = true;
		bcasc_doSideQuestJunkyard = true;
		bcasc_doSideQuestBeach = true;
		bcasc_doSideQuestOrchard = true;
		bcasc_doSideQuestNuns = false;
		bcasc_doSideQuestDooks = false;
	break;
}

/***************************************
* DO NOT EDIT ANYTHING BELOW THIS LINE *
***************************************/
 

Bale

Minion
Here's a tavern solver for you.

picklish, thanks for the tavern solver. Here's a mafia tip for you. The following line is a bit excessive.

Code:
visit_url("choice.php?whichchoice=513&option=1&pwd="+my_hash());

KoLmafia will automatically fill in the hash for you. There's a very convenient shortcut that anytime you need a password hash you only need to use pwd, so that line could be merely:

Code:
visit_url("choice.php?whichchoice=513&option=1&pwd");
 

Winterbay

Active member
Interesting error today (a new setup so it might be some kind of Mafia setting as well, lost my usb drive somewhere):

Code:
Using 1 disassembled clover...
You acquire an item: ten-leaf clover
Finished using 1 disassembled clover.
BCC: Getting the Big Rock
Searching for "casino pass"...
Purchasing casino pass (1 @ 100)...
You acquire an item: casino pass
You spent 100 Meat
Purchases complete.

[62] Lemon Party
You acquire an item: big rock
That item cannot be created.

It appears on rerunning the script to be trying to make a rock-and-roll legend, but fails since I do not have a tenderizing hammer and do not have access to Innabox and thus Mafia can't create the item. I also did not have the 1k meat needed to buy the hammer...
Possibly add a check for that?
 

halfvoid

Member
Code:
Using 1 disassembled clover...
You acquire an item: ten-leaf clover
Finished using 1 disassembled clover.
BCC: Getting the Big Rock
Searching for "casino pass"...
Purchasing casino pass (1 @ 100)...
You acquire an item: casino pass
You spent 100 Meat
Purchases complete.

[62] Lemon Party
You acquire an item: big rock
That item cannot be created.

Yeah this happens to me every run as well, if i forget to sell of my pork elf goodies first.

And my god that rabbit is cute.
 
Top