Best Between Battle Script Ever -- formerly AutoMCD

EdFox

Member
I have a strange set of fuzzy matching errors to report. These matching warnings go away when bbb_turtles is set to 0 and occur with it set to 1, so I can only assume BBB is responsible, however the string "Back 40" does not occur in the latest BBB, nor do the other errors. I'm stumped.

This must be an edge case. I'm running HC BHY TT (hehe) to farm some factoids. Auto taming works and everything runs, it's just a bit disconcerting to see so many red flashes go by. :)

Code:
mcmillicancuddy's back 40
mcmillicancuddy's other back 40
[COLOR=red]Multiple      matches against Back 40.[/COLOR]
The string "Bat Hole Entryway" no      longer matches a location name; use "The Bat Hole Entrance" instead
The      string "Fernswarthy's Ruins" no longer matches a location name; use "Tower      Ruins" instead
giant's castle (basement)
giant's castle (ground      floor)
giant's castle (top floor)
[COLOR=red]Multiple matches      against Giant's Castle.[/COLOR]
the knob shaft
the knob shaft (mining)
[COLOR=red]Multiple      matches against Knob Shaft.[/COLOR]
The string "Oasis in the Desert" no      longer matches a location name; use "The Oasis" instead
The      string "Orc Chasm" no longer matches a location name; use "The Valley of      Rof L'm Fao" instead
The string "Outskirts of The Knob" no longer      matches a location name; use "The Outskirts of Cobb's Knob" instead
The      string "Post-War Sonofa Beach" no longer matches a location name; use      "Sonofa Beach" instead
The string "Wartime Sonofa Beach" no      longer matches a location name; use "Sonofa Beach" instead
[COLOR=black]Preparing      to tame a turtle wax...[/COLOR]
 

Bale

Minion
This is because mafia was updated. Go update BBB, there's a newer version in the first post that will fix the problem.

You might need an even newer version of KoLmafia to run it.
 

EdFox

Member
This is because mafia was updated. Go update BBB, there's a newer version in the first post that will fix the problem.

You might need an even newer version of KoLmafia to run it.

Ack, Bale... you wound me! But the fault is mine, I neglected to include version info in my report so I did--indeed--look like one of *those* idiots who's running 15.0 or somesuch. And you deal with so many of them; it must be horrible. But still.... the Shame... :(

The same set of fuzzy matching warnings occurs on every combat when using r12407. I am using BBB 2.7 from the first post--redownloaded today to check--and all my other scripts are SVN updated daily. That's what has me so confused. I've even corrected a few less frequently updated scripts to get rid of fuzzy matching warnings myself (Omnivore and ChibiBuddy) so I checked BBB 2.7 for the offending location names and they're not there. I can't figure why these warnings are still occurring. I wouldn't even suspect BBB if not for the fact that the warnings are tied to auto turtle taming.
 

Razorsoup

Member
That's what has me so confused. I've even corrected a few less frequently updated scripts to get rid of fuzzy matching warnings myself (Omnivore and ChibiBuddy) so I checked BBB 2.7 for the offending location names and they're not there. I can't figure why these warnings are still occurring. I wouldn't even suspect BBB if not for the fact that the warnings are tied to auto turtle taming.

The error is probably going to be in the turtles.txt file in your data folder. IIRC, this file is downloaded from zarqon's map manager so you should check to make double sure you have the most recent version of that file. If you do and it still gives the error, you could fix your copy and upload it.

Map Manager : http://zachbardon.com/mafiatools/autoupdate.php
 

Theraze

Active member
Nope... I updated the map-version on 7/19 and it now has:
Code:
McMillicancuddy's Back 40	hedgeturtle	none	3
McMillicancuddy's Barn	hedgeturtle	none	3
McMillicancuddy's Farm	hedgeturtle	none	3
McMillicancuddy's Other Back 40	hedgeturtle	none	3
McMillicancuddy's Pond	hedgeturtle	none	3
So... wouldn't be due to that file. Unless, as you said, EdFox's copy isn't updated. In which case deleting it (and his zversions, or at least removing it from there) should fix the problem.

Edit: I also updated clover_adventures and noncombats at the same time. So it shouldn't be any of those, either. :)
 

Bale

Minion
The same set of fuzzy matching warnings occurs on every combat when using r12407.

The fact that you are using an up to date version of mafia tells me that your error is definitely parsed from a data file, not a script since it does not show line numbers.


So... wouldn't be due to that file. Unless, as you said, EdFox's copy isn't updated. In which case deleting it (and his zversions, or at least removing it from there) should fix the problem.

You forgot a culprit! If the data file is elsewhere in the KoLmafia directory, then the map manager could have updated it and it would still be failing. I recommend that you search for a turtles.txt somewhere other than your /data directory. Note that your base level KoLmafia directory is a valid place to for KoLmafia to find a data file even though you'd think it is safe.
 

EdFox

Member
That data file was definitely the issue. I had not moved it but it was an older version. Why that didn't update itself is a mystery but may be related to the fact that I haven't run as a TT for a very long time. Cleaning out /data periodically seems like a good idea, of course being aware of things like the OCD settings file and such so it can't be indiscriminate.

Deleting the offending data file so the newer version gets downloaded will fix it for anyone else who runs into the same issue. I actually had mine update itself when I manually edited it after Razorsoup's suggestion. It seems just changing the file caused a recheck and the newer version was downloaded at that point.

Regardless, issue resolved. BBB still has some fuzzy matching warnings that were listed in post 470 but those don't cycle with every combat so they can wait on the SVN version. Thanks, guys. :)
 

zarqon

Well-known member
I've got the SVN version of this almost ready to release but having a little trouble with the Punk Rock Giant's room:

678 Punk
1: complete quest with mohawk wig, else fight Punk
2: meat
3: to Steampunk (post quest only)
4: Raver choice

What is the proper check for choice "3" appearing? I tried simply checking get_property("questL10Garbage") == "finished", but that didn't work for several of my characters who haven't ascended since before the Castle was revamped -- they do not have the shortcut option visible despite having "completed" the quest, according to the Council and therefore mafia. I'm fairly sure I wouldn't be the only person to have such characters, either. Ideas?

@Bale: Thanks a lot! You're right, the Twin Peaks code is extremely handy. I've added some of your code to BBB, will explain more upon release.
 

xKiv

Active member
What is the proper check for choice "3" appearing? I tried simply checking get_property("questL10Garbage") == "finished", but that didn't work for several of my characters who haven't ascended since before the Castle was revamped -- they do not have the shortcut option visible despite having "completed" the quest, according to the Council and therefore mafia. I'm fairly sure I wouldn't be the only person to have such characters, either. Ideas?

They have the intergalactic rowboat? Do they also have the steam-powered rocket modelship (that's the new item to do that)?
My character has both and ... I still don't see that option, so I think you could check the rowboat, which doesn't exist when you complete the *new* giant's quest)
 

zarqon

Well-known member
That's perfect! Thanks xKiv.

Best Between Battle Script Ever is now on SourceForge!

Lots of updates! First, BBB now has improved familiar handling:

  • As suggested by someone early on in the implementation of farming familiar drops, BBB now rotates your drop familiars, getting one familiar drop per familiar before continuing to the next familiar. This will allow you to maximize your familiar drops for the day. If you would like to skip a given familiar, remove it from the list around line 585. Also, the order matters much less now, but you can still change the order of rotation there if it matters.
  • BBB now ensures the taming property is reset if you aren't taming and missed the normal reset for whatever reason.
  • Don't tame tier 3 turtles in the Spooky Gravy Burrow.
  • Don't farm familiar drops there either, OR in the Sea, OR if you're an Avatar.

The biggest updates this time around are probably in choiceadv handling, so in the interest of building to the climax I will discuss some trivial tweaks!

  • Use exact names.
  • Check be_good() rather than specific path names.
  • Removed the sand dollar vs. dolphin whistle price comparison, as it appears that mafia already does that.

And now, the moment you've all been waiting for: improved choiceadv handling!

  • Haunted Library: Also unlock the Gallery in Bugbear Invasion (thanks Theraze).
  • Hidden Temple: If you have a choiceadv or the Nostril of the Serpent as a goal, facilitate that goal by using a stone wool if you have one.
  • Defiled Nook: Do skip non-primestat moxie stats. The original reason was script synergy, but as our polyscient (not quite omniscient) BatBrain doesn't use the "threshold" setting anymore, and my other scripts have also somewhat moved away from that, BBB no longer needs to grab non-primestat moxie.
  • Twin Peak: Add Bale's absolutely lovely code for setting the choiceadv paths depending on your preparation. If you are unprepared for the next choice (not enough stench resistance, +food%, initiative, etc.) it sets the choice to "Show in browser." You may want to add something to your mood to abort when choiceAdventure606 == "0".
  • Tavern Cellar: Another helpful contribution from Bale which assists you in <element>ing out the rats.
  • Mer-kin Colosseum: Automatically equip the Mer-kin weapon that the next monster will be vulnerable to. It's checking the most recent monster in the Colosseum's combat queue, so note that this will get screwed up if you lose a combat (at which point the same monster repeats). BBB can't check run_combat() contains WINWINWIN, because you may have adventured elsewhere between fights (semirare, etc). Solution: don't lose.
  • Mer-kin Library: With full vocabulary skill, learn clues. Thanks again to Bale for this code.
  • Penultimate Fantasy Airship: Get a model airship if you haven't completed the castle quest yet. Also, prefer combat over stats when BIG!

And now, speaking of the castle quest, to go out with a bang, I'm pleased to roll out initial support for the Castle in the Clouds! Let's begin with the Basement. Courses of action here are listed in order of preference.

Furry Giant's Room:
  • If you have a titanium umbrella, complete the quest.
  • If there's nothing in the Neckbeard room and you are below level 13, get primestat moxie.
  • Proceed to Neckbeard.

Neckbeard Giant's Room:
  • With a dumbbell, unlock the ground floor.
  • If Fitness is set to unlock with amulet, proceed to Fitness.
  • If O'RLY manuals or open sauce are goals, get those.
  • Get mainstat mysticality if below level 13.
  • Skip adventure.

Fitness Giant's Room:
  • With an amulet of extreme plot significance, unlock the ground floor.
  • If pec oil, giant jars of protein powder, or Squat-Thrust Magazine are goals, open the gym bag.
  • Get a dumbbell, then skip the adventure.

This implementation has a significant known issue: BBB always assumes the ground floor is locked. It doesn't know whether or not the ground floor has been unlocked, because so far as I know, there's no server-hit-free detection method. I'm hoping mafia will eventually have a lastGroundFloorUnlock property or somesuch, but until I figure that out, anyone adventuring in the Basement after unlocking the Ground Floor will probably want to disable this. Suggestions, anyone?

There's also a feature! For the amulet and umbrella choices, if you have one but don't have it equipped, the script will automatically set the choice to repeat, equip the item, perform the unlock, then equip what you had on previously (not tested with unarmed characters).

By default, without any goals set, this means that the Basement will unlock the ground floor as quickly as possible, then skip all adventures.

Now, let's move on to the Top Floor!

Raver Giant's Room:
  • Unless you have a mohawk wig equipped (in which case you'll pass through to the final choice), get a drum 'n' bass (x2) record.
  • If Raver Giants have goals, fight them.
  • If the user has set the choice to restore HP/MP, respect that setting.
  • Proceed to Punk.

Punk Rock Giant's Room:
  • With the mohawk wig equipped, complete the quest.
  • If Punk Rock Giants have goals, fight them.
  • If there's something important in Raver (it isn't set to Punk), proceed to Raver.
  • If the user has set the choice to get meat, respect that choice.
  • If the shortcut option exists, proceed to Steampunk.

Steampunk Giant's Room:
  • With a model airship, complete the quest.
  • Pick up a steam-powered model rocketship.
  • With more than one brass gear as a goal, get brass gears.
  • If Steampunk Giants have goals, fight them. This is a more profitable source of a single brass gear, hence the check in the previous option.
  • Proceed to Goth.

Goth Giant's Room:
  • With a drum 'n' drum 'n' bass 'n' bass record, complete the quest.
  • With more than one thin black candle as a goal, get candles (same reasoning here as with the brass gears above).
  • If there's something to do in Steampunk (it isn't set to Goth), proceed to Steampunk.
  • Fight Goth Giants

Thankfully, this does not assume the quest is always incomplete. :) By default, without any goals set, this will complete the quest as soon as possible, get an airship, and then all choices will fall through to fighting Goth Giants.

Characters who have not ascended since before the Castle revamp will not have the shortcut option in the Punk Rock Giant's room, so they will need to set an option manually. By default, the script will avoid an endless loop in this case by setting it to fight Punk Rock Giants, but if you'd prefer meat, changing it will stick.

What a nice climax. Now it's time for some denouement:

I suspect that the new Castle handling may be incomplete, or that it may not account for a case correctly. If so, please report the problem. And if you know of a way to detect Ground Floor unlocked-ness, please tell me.

Enjoy!
 
Last edited:

Magus_Prime

Well-known member
I tried BBB's new Castle automation and when it hit "The Fast the the Furry-ous" choice adventure it looped. I had to open the relay browser and select a choice before it would continue.

I had a titanium umbrella in inventory but not equipped.

Code:
Request 9 of 10 (Beanstalk: The Castle in the Clouds in the Sky (Basement)) in progress...

[552] The Castle in the Clouds in the Sky (Basement)
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
KoLmafia declares world peace.
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: The Fast and the Furry-ous
Encounter: Out in the Open Source
Encounter: Out in the Open Source
Encounter: You Don't Mess Around with Gym

Internal checkpoint created.
Putting on amulet of extreme plot significance...
Equipment changed.
BBB: Unlock the ground floor with your amulet.
choiceAdventure670 => 4

Request 9 of 10 (Beanstalk: The Castle in the Clouds in the Sky (Basement)) in progress...

[552] The Castle in the Clouds in the Sky (Basement)
Encounter: You Don't Mess Around with Gym

Putting on Boots of Twilight Whispers...
Equipment changed.
BBB: Repeat the Fitness room with an amulet.
choiceAdventure670 => 5

Edit: The top floor automation worked. BBB set the choice adventures to get a Drum-n-Bass record and then completed the quest. Is there any way to tell BBB to get the steam powered model rocketship first. Before completing the quest?

I also tested BBB in unlocking the Hidden Temple. I set the goals in Mafia to get all three components of but, with the spooky sapling remaining as a goal the choice adventure stayed set at "Conciousness of Stream" rather than being reset to "The Road Less Traveled'.
 
Last edited:

zarqon

Well-known member
Evidently the betweenBattleScript is not firing between those? The script should be equipping the umbrella there (cf. line 618), then setting the property to attempt opening it when it next encounters the room. I'll have to research why that's not working.

If it's going to cause endless loops in the meantime, however, I'll go ahead and comment out the Basement for now. r4. Anyone able to help me test, feel free to uncomment and have a go, just be aware that the repeat-equip-unlock code is evidently failing (so you can't automate the Basement unattended until this is fixed).

Also, why would you want the rocketship before completing the quest? If you complete the quest first, then any of the 4 choiceadvs will get you the model rocketship.
 

Theraze

Active member
Main() function suggestion. I'd changed mine at some point to the following, and can keep it in my own SVN copy, but figure I should throw it out as a possibility.
Code:
void main() { if (!last_monster().to_string().contains_text("Ed the Undying")) bbb(); }

I also had BBB set to restore HP and MP because dolphin whistle fights can end up VERY depressing if BBB goes into the fight unprepared.
 

zarqon

Well-known member
I would have put money on you making this exact post. Whenever I post an update, I can count on a post containing a diff between your version and mine. :)

I did review your latest posted BBB as part of my preparations for the SVN release and did not include those bits because

1) BBB would not run for the combat following Ed. I have had no problem with BBB firing between Ed combats, either.
2) HP/MP recovery code is better suited to a recovery script -- which also fires between combats, incidentally. Does your recovery script not fire when using items containing combats?
 

Theraze

Active member
The issue with dolphins specifically is that if I run BBB as a before battle script, the recovery script runs before adventuring, BBB fights a Dolphin, and... goes straight into the next fight without healing. That's... not good.
If I run BBB as an after battle script, the recovery script does NOT run for the dolphin, because it hasn't started combat yet... the adventure is already over! So we go straight into the dolphin fight without any healing. That's also not good.
By running BBB as a confused hybrid with it being set to restore health (which does use my recovery script, because any recovery will use the script unless the specifics are hardcoded), it calls the dolphin-fight after combat, but BBB will call for healing before it starts the fight. This is a very good thing. Then the dolphin-fight finishes and the adventure is done. Next adventure begins, BBB considers any new choiceadv changes needed and so forth, and takes care of what's missing.

As we now have more people underwater adventuring, there's probably other people who have experienced this issue and just hadn't traced out their combat failures to BBB forcing unhealed adventuring yet.

Regarding (2), at least before, when whistling, mafia wouldn't do healing on a whistle or after it. Should it? Maybe. It might even be running, but doing it's healing like so:
1) I tell mafia to adventure in the Anemone Mine.
2) Mafia runs restoration to get me healthy for the Anemone Mine.
3) Mafia runs BBB, which sees that dolphins stole my good stuff and uses a whistle.
4) Mafia runs restoration to get me healthy for the whistle.
5) I fight and get somewhat hurt from stasising the dolphins using +item gear rather than combat gear.
6) Mafia goes straight into the Anemone Mine fight because it's already run its restoration for it at step 2. This goes less well than hoped.

And I didn't have issues with fighting Ed until I started using BCA. The issue there is that the way it runs combat so that it will actually have AA scripts and moods trigger is by 'adventuring' in the Noob Cave. Because the location isn't actually Ed's, the proper safety bits don't trigger right and mafia will sometimes abort if combining healing into the BBB or AA script.

Anyways, YMMV. With the magic of SVN I can fix this for myself. Just thought that other people who use BBB and either use BCA or adventure underwater might want to avoid aborting automation and being beaten up. :)
 

EdFox

Member
I noticed that BBB wouldn't cycle to the Happy Medium when farming familiar drops. Adding the following at line 569--to keep it alphabetical--seems to work. The 20 is purely arbitrary but a high number seems valid as the medium is last in the line after the rest are exhausted and won't ever run out of drops.

Code:
case $familiar[happy medium]: return clim("_mediumSiphons",20);
 

zarqon

Well-known member
r6/7 Update

First of all, some more fixes to familiar drop farming:
  • Skip for $location[none]. Chances are you'll want your current familiar for these.
  • I forgot to add the property check which enables the Happy Medium, as noted by EdFox. Added that.
  • Added the Knob Goblin Organ Grinder.
  • Skip Pair of Boots if all monsters in your location smash to pastes that SS won't stomp for.
  • Skip Hipster if adventuring in non-adventure.php location, since those combats won't ever happen there.

Next, Theraze's comments made me realize that I'd had the same problem with recovering HP before fighting items -- in fact that's why I originally added a restore_hp() command to fight_items(). Dolphins were the one item which was not included -- so now have added recovery before fighting dolphins.

Now, some zone-specific goodies:

  • Mer-kin Colosseum: A small but very important refinement to the weapon switching: if you just lost to a Colosseum monster, don't switch your weapon since the same monster will appear again. Combats in the Colosseum are almost ready to be fully automated!
  • Castle (Basement): I have reactivated the choiceadvs here, with a few changes. First, though it can't yet detect the Ground Floor being open, it can certainly detect the entire Castle quest being complete, which means the Ground Floor is open. So once you complete the entire Castle quest, BBB will no longer try to unlock the Ground Floor here. Second, since the equip-repeat code was causing an endless loop, for now we'll only make that choice if you actually have the item equipped.
  • Convention Hall Lobby: As you farm slime vials, BBB will create and use unknown vials so that you can discover and get Slimeform as quickly as possible.
  • All zones: For choices granting stats, check ZLb's new is_goal(stat). Now people will be able to get non-primestat stats if they want.

Enjoy!
 

Rinn

Developer
I really like the updated familiar swapping, I have a few suggestions you might want to consider:
* If a player broke their hippy stone, use the goth kid instead of the mini-hipster for the extra pvp fights.
* Organ grinder could equip a microwave stogie to get the drops faster.
* Goth kid could equip a little wooden mannequin to get more pvp fights.
* Drops from the happy medium and the organ grinder typically take a lot longer to get then drops like game grid tokens, so it might be better to defer getting them. You could probably do that pretty easily by doubling the property and max values when you check them.
* Could equip the snow suit if it's set to the carrot nose and there are drops left.
 
Last edited:

Bale

Minion
Went through this and compared it to my divergent version. Nice stuff. I really appreciate all the work you put into the new Castle in the Clouds in the Sky. My handling for that was much less complete. I was really impressed by your next_w() function which made brilliant use of the new monster queue!


Also, you lack these locations:

Code:
	case $location[The Enormous Greater-Than Sign]:
		if(item_amount($item[plus sign]) < 1 && my_meat() > 999)
			friendlyset(451,3,"Get a plus sign.");
		else if(item_amount($item[plus sign]) > 0 && my_meat() > 999)
			friendlyset(451,5,"Get teleportitis to look for the oracle.");
		else friendlyset(451,1,"Get left parenthesis.");
		return;

	case $location[The eXtreme Slope]:
		if(get_property("choiceAdventure575") == "0") return;
		if(have_outfit("eXtreme Cold-Weather Gear"))
			friendlyset(575,4,"Have the eXtreme Cold-Weather Gear.");
		else friendlyset(575,1,"Need the eXtreme Cold-Weather Gear.");
		return;

	case $location[Domed City of Grimacia]:
		if(get_property("questF04Elves") == "step1") {
			if(item_amount($item[E.M.U. harness]) < 1) {
				friendlyset(536, 4,"Get EMU Harness");
				return;
			} else if(item_amount($item[E.M.U. helmet]) < 1) {
				friendlyset(536, 6,"Get EMU Helmet");
				return;
			}
		}
		if(available_amount($item[synthetic dog hair pill]) > available_amount($item[distention pill]))
			friendlyset(536, 1,"Get distention pill");
		else
			friendlyset(536, 2,"Get synthetic dog hair pill");
		return;
	case $location[Domed City of Ronaldus]:
		if(get_property("questF04Elves") == "step1") {
			if(item_amount($item[E.M.U. rocket thrusters]) < 1) {
				friendlyset(535, 1,"Get EMU rocket thrusters");
				return;
			} else if(item_amount($item[E.M.U. joystick]) < 1)
				friendlyset(535, 3,"Get EMU joystick");
				return;
		}
		switch(my_primestat()) {
		case $stat[muscle]:
			friendlyset(535, 5,"+5 Muscle per fight");
			break;
		case $stat[mysticality]:
			friendlyset(535, 2,"+5 Myst per fight");
			break;
		case $stat[moxie]:
			friendlyset(535, 6,"+5 Mox per fight");
			break;
		}
		return;

	case $location[Chinatown Tenement]:
		if(item_amount($item[gold piece]) > 29) {
			friendlyset(657,1,"Spend 30 GP");
			friendlyset(658,1,"Enter Debasement");
		} else
			friendlyset(657,2,"Not enough GP yet");
	return;

A few things that don't really matter:
  • Commented lines 380-391 wandered away from the section where they belong.
  • Cobb's Knob Barracks is out of alphabetical order
 

Theraze

Active member
Two bits which I either add or comment out currently, respectively. First, olfaction, since it was just mentioned:
Code:
boolean auto_olfact() {
   if (!have_skill($skill[transcendent olfaction])) return false;
   if (count(get_goals()) > 0) {
      set_property("autoOlfact", "goals");
      return true;
   }
   return false;
}
Since mafia automatically clears the autoOlfact property every time it olfacts, setting it back to goals will make it properly get used by WHAM and whatever else pays attention to mafia. I just throw the auto_olfact() function after auto_mcd(my_location()) in the bbb() function.

Second, it was mentioned that one of the major slowdowns in BBB is due to the two run_combat() checks for the bag of tricks. For anyone not currently using, it's just wasted RL time. So I generally comment out the two lines, but the better check would be checking it the bag of tricks is currently equipped. Really, it's something for an afterAdventure script, since then having it equipped would definitely be useful, but... eh. What can you do? :)
 
Top