First Things First -- a multipurpose pre-combat consult script

Status
Not open for further replies.
Raw code block for those without diff/patch utilities convenient:
Code:
  // ID bang potions: always ID multiples, ID singles only if mafia's autoPotionID
   if (my_level() > 5 && intheclear() && vprint("Checking for unidentified potions...",9)) {
      int firstpotion = 0; int secondpotion = 0;
      for i from 819 to 827
         if (get_property("lastBangPotion"+i) == "" && item_amount(to_item(i)) > to_int(get_property("autoPotionID") == "false"))
         {
            vprint(to_string(to_item(i)) + " unidentified", 11);
            if (firstpotion == 0)
            { 
              vprint("planning to throw " + to_string(to_item(i)), 10);
                firstpotion = i;
            }
            else if (secondpotion == 0)
            {
                vprint("planning to throw " + to_string(to_item(i)), 10);
                secondpotion = i;
            }
         }
     if (firstpotion != 0 && secondpotion != 0 && have_skill($skill[ambidextrous funkslinging])) {
        vprint("throwing " + to_string(to_item(firstpotion)) + " and " + to_string(to_item(secondpotion)), 6);
        page = act(throw_items(to_item(firstpotion), to_item(secondpotion)));
     }
     else if (firstpotion != 0) {
        vprint("throwing " + to_string(to_item(firstpotion)), 6);
        page = act(throw_item(to_item(firstpotion)));
     }
   }
  // ID spheres transparent with mafia's autoSphereID
 
Hi zarqon, I'm liking this script + smartstasis for the most part, but today I tried to farm bits of clingfilm from the F'c'le. I wondered why I hadn't gotten a single piece in 100 adventures, so I checked the log and discovered to my dismay that it was using cocktail napkins on the clingy pirates. Isn't there supposed to be an exception specifically for this?
 
Did you have clingfilm set as a goal? FTF will use cocktail napkins on clingy pirates unless you have clingfilm (or clingfilm items) set as a goal.
 
Yes, the goal was 140 bit of clingfilm (140 was a nigh-impossible amount, but I just wanted it to burn all my turns and farm clingfilm).

Here is a sample combat gCLI output:
[6505] F'c'le
Encounter: clingy pirate
Round 0: Jatopian wins initiative!
Round 1: Pomp 'n' Circumstance takes a pull on the hookah, and immediately goes into a coughing fit, blowing a cloud of smoke in your face. Since this is magic smoke, instead of giving you cancer (or, perhaps in addition to giving you cancer), it gives you an effect:
You acquire an effect: Spirit of Alph (duration: 6 Adventures)
> 1/6 monsters dropping goals.
> This monster drops all your remaining goals!
Round 1: Jatopian uses the cocktail napkin!
 
Last edited:
Got it. Silly me, break won't break out of a switch loop when it's already in a for loop. Fixed!

And just to pre-empt the sure-to-come-anyway error reports, please note that you'll also need a recent build of mafia when updating. I'd already started working in ASH's brand new item_drops_array() function for calculating monster value; builds older than 8356 won't recognize that function.
 
Pretty sure you can pin Rinn's auto-updater though (link in his sig two posts above). Even better!
 
Having problems with latest version

I did update to smartstasis 2.4 along with updating to the new FirstThingsFirst, and thought that might have been my problem, but it seems that it still isn't working for me. I figured I would mention this in case it helps for debugging.

[35700] Frat House (Stone Age)
Encounter: caveman frat boy
Strategy: C:\Documents and Settings\Administrator\My Documents\KOL\ccs\Smart Stasis Script.ccs [default]
Round 0: Stores Are Searchable wins initiative!
Function 'item_drops_array( )' undefined (FirstThingsFirst.ash, line 60)
Consult script 'SmartStasis.ash' not found.
You're on your own, partner.

B. Bandit
 
Last edited:
Got it. Silly me, break won't break out of a switch loop when it's already in a for loop. Fixed!

And just to pre-empt the sure-to-come-anyway error reports, please note that you'll also need a recent build of mafia when updating. I'd already started working in ASH's brand new item_drops_array() function for calculating monster value; builds older than 8356 won't recognize that function.


Does this aswer your Q?
 
I guess I'll find out if it works on Sunday

The latest exe isn't up to that build number yet. I'm too lazy to mess around figuring out the jar file so I'll just wait until the next exe build comes out and see if it works then.
 
11 posts so far. About average, I'd say.

Are we close to a default page cutoff? Because that will probably make some more. :)
 
@heeheehee: seems like contains_text(" pirate") might be the only detection needed...?

I know this reply is a bit late as the fix is already in, but not exactly. If you're fighting on the F'c'le, there's really no need to keep insulting pirates. A location based check (or even just checking if the monster name starts with an S or T) would save some server hits and some embarrassment (for my character).

EDIT: Checking for an S name does give a false positive on the scary pirate, but otherwise w**ks out.
 
Last edited:
I used to replace this line:
Code:
   if (should_putty ||
with this:
Code:
   if (should_putty || m == $monster[goth giant] ||
to make sure that it always use a putty sheet on a goth giant.
But at the moment it doesn't do that anymore.
 
Last edited:
Status
Not open for further replies.
Back
Top