Looking for birdform MP conserving script

StormCrow42

Member
Looking better. It might be a good idea to put the various threshold values into variables for ease of customization. I look forward to seeing your solutions.

Edit: I'm not certain if this is worth implementing in this script. It certainly isn't a priority. One interesting tactic that can be used to make certain you get a roc feather is to take a cocobo or NPZR up against a physically resistant monster (most often in the knob mine shaft) and using the familiar to stasis enough MP to get in all your talon slashes. Perhaps detect if you're up against a ghost miner with such a familiar and then alternate talon slashes when you have MP with attacks when you're out and waiting to gain more.
 
Last edited:

Bale

Minion
Well, it already detects if your mp goes up (presumably from a starfish or coacobo type familiar) to see if I want to use another talon slash. I guess I can make it anticipate such tactics.
 

StormCrow42

Member
Well, it already detects if your mp goes up (presumably from a starfish or coacobo type familiar) to see if I want to use another talon slash. I guess I can make it anticipate such tactics.

I haven't tested it as it exists in such an attempt. Perhaps I'll do so after rollover and see how well it handles it in its current state.

Edit: Tested adventuring with NPZR in the knob shaft. Script successfully used all 15 skills, although it wing buffeted a number of times (probably because of risk factor, your upcoming fix for wing buffeting too early will probably catch that.
 
Last edited:

Elayne

New member
Hi. Tried it out to see if I can get other feathers today. Even after eating 5 tasty louse in birdform, it doesn't seem to recognize the skill granted by the louse, and it says I don't have the applicable skill.
 

medibot

New member
How exactly is feather collection handled by this script, or mafia in general? I ask because I'm having some trouble when using this script in my ccs while running the wormwood script I got elsewhere. Since absinthe lasts 10 turns and birdform 15, I get a point where I have 5 turns of absinthe left and it's time to collect the feather. The wormwood script sees I have 5 turns of absinthe-minded left and shuttles me to the second wormwood location. At this point, the wormwood script chokes and complains about unexpected text after "use" (I lacked the foresight to copy-paste the error message before clearing out the CLI). Most likely, this question is better suited to the people concerned with the wormwood script, but maybe a feather expert could lend some insight.

Hi. Tried it out to see if I can get other feathers today. Even after eating 5 tasty louse in birdform, it doesn't seem to recognize the skill granted by the louse, and it says I don't have the applicable skill.

I am having the same issue. You can dodge this by making the bug function always return true, but this is dangerous as hell. I'm guessing the quotes may have something to do with it. Perhaps it would be better for this specific case to do a partial match? For example, just check if the page contains "Give Your Opponent" or "The Bird". Offhand, I can't think of any false positives that would be thrown.
 

StormCrow42

Member
If you have "form of a bird" in your moods, Mafia automatically adventures at the noob cave to gather the welcome back adventure. Otherwise, mafia does nothing other than hitting the welcome back adventure while normally adventuring (since it doesn't take an adventure, it doesn't interfere with counters or the number of adventures in a zone, but it does (annoyingly) decrement the counter for choice adventures in goals.
 

medibot

New member
Turns out I'm actually a gigantic moron. The error was being thrown since my mood syntax was off: I had a comma where I should have a semicolon.

I'll change up the script a bit so that if I'm going to hit the feather adventure, the goal is set to two instead. Will report back after testing.

EDIT: Alright, so it's breaking with birdform at 0 and absinthe at 5 because Mafia's built-in absinthe counter cannot abide by me not being in the worm wood with 5 adventures of absinthe minded left, which is normally a good thing, but I want to collect a feather first.

EDIT2: Alright, some tweaks to the switch block in cookie-wormwood.ash have provided adequate results, for the most part. I just need to deal with the mood handling trying to use the gong before the feather is collected, resulting in that gong not doing anything and some unusualness where it used the gong unsuccessfully, collected the feather, spent adventures in the worm wood until the desired effect was acquired, then adventured at Noob Cave (presumably to collect the feather), then finally using the gong successfully.
 
Last edited:

Raven434

Member
Another hugely helpful script

I just got my llama and have learned quite a bit in how to use it more effectively.

Thanks!
 

Spiny

Member
Well, you know how I am. I had to start poking at this to see if I could figure out what the problem was. :)

I can't say that I found out the answer, but I learned a few things in the process to flesh out my own personal knowledge bank.

Going for a Roc Feather worked like a charm. Going for the Tit feather, as expected, did not.

I tried various things to debug and I got my head stuck on something I shouldn't have. I knew I had consumed a bunch of tasty louse, so it SHOULD have detected the skill. I saw it in the mini browser as available, but the script said I didn't have the skill and I needed to consume more tasty louse (lice).

I tried changing line 23

Code:
skill flip_off   = $skill[Give Your Opponent "The Bird"];
to
Code:
skill flip_off   = to_skill(7046);
and the same problem occurred.

I started playing with this little blip of code:

Code:
if (have_skill($skill[Give Your Opponent "The Bird")) {
	print("You have the bird skill");
} 
else {
	print("You do not have the bird skill");
}

I apparently didn't have the bird skill. The same thing happened after I consumed a scrumptious ice ant and changed to $skill[Antarctic Flap]. I assumed at that point, going for any other elemental feather would not work, I was wrong. Antarctic Flap was recognized in combat by the script when I switched the CCS to Note Penguin Feather.

Substituting skills I'm sure I know worked fine, like Moxious Madrigal and Sing. So somehow Mafia knows one has the birdform skills even though I could not figure out a way to figure it out for myself other than simply knowing I'd consumed the relevant item. My head was so wrapped around thinking the other elemental things wouldn't work simply because my blip of code didn't detect the associated skills that it took me over 3 hours to actually test this! lol. Gawd I can be stubborn.

Anyhow, I tried to think of other skills that would behave the way the birdform skills do to see if I could track something down that would make sense to me. Burrowgrub Hive came to mind. I have one, use it daily with breakfast. Mafia has two lines in my settings file:

Code:
burrowgrubHiveUsed=true
burrowgrubSummonsRemaining=3

But yet using my little blip of code above, Consume Burrowgrub is not a skill that I have. So transient skills are not detected with have_skill, but can be used via $skill() except in the case of Give Your Opponent "The Bird." This skill is bugged. Perhaps the skill needs a tweak in Mafia's skill table in order for this to work since it is not something that seems to be fixable by tweaking line 23 in this script.

So I have the following questions that I'll ask here first and if I have to ask elsewhere, separately, I can do that.

How does Mafia, or even this script, know that I've used the relevant bugs to obtain the relevant skills since have_skill doesn't detect them? Could this be related to the consumption message of the louse and not the skill name at all?

And not directly related to this script, but someone may know: I realize Mafia is tracking birdform skills used internally and I can access these counters with get_property(), but I don't see any counters on my relay browser or Mafia itself other than the actual bird form counter that is a straight countdown from 15 downward. I have seen some submissions to Bug Reports with screen shots showing skills used counters, but I didn't see this on my screen. I'd like this feature :)

So at the end of another long verbose post as only I can make... I wish I found the solution to the problem, but sadly I did not :(

-Spiny
 

jasonharper

Developer
At some point, mafia gave up on trying to keep track of what conditional combat skills you actually have available. There are just too many special cases - skills granted by equipment, skills granted by outfits, skills granted by effects, skills that disappear after a different skill has been used, etc.

I'm guessing that the problem here is that the script is checking for actual combat skill availability by something like contains_text(pageText, theSkill.to_string()) - which is failing here because the skill name has actual double quote marks in it, while the page has " entities.

If you're not seeing the Birdform skill counters, you probably have "Add buff maintenance links to left side pane" turned off in Preferences - that kills a lot of other sidepane decorations as well.
 

Spiny

Member
If you're not seeing the Birdform skill counters, you probably have "Add buff maintenance links to left side pane" turned off in Preferences - that kills a lot of other sidepane decorations as well.

I do have that particular preference disabled, I'll turn it on :D Thanks!

-Spiny
 

Bale

Minion
I'm guessing that the problem here is that the script is checking for actual combat skill availability by something like contains_text(pageText, theSkill.to_string()) - which is failing here because the skill name has actual double quote marks in it, while the page has " entities.

This has been troubling me for some time, thanks for spelling that out. So if I was searching for "Give Your Opponent "The Bird"" instead of the skill's name, then it would work?
 

Spiny

Member
This has been troubling me for some time, thanks for spelling that out. So if I was searching for "Give Your Opponent "The Bird"" instead of the skill's name, then it would work?

I got it working!

Original code lines 129-130:

Code:
	if(! page. contains_text(bird_skill. to_string()))
		abort("You don't have the "+bird_skill+ " skill. Use "+ to_string(5 - get_property(progress). to_int()) + " "+insect+ " and try again next fight.");

New code lines 129-131:

Code:
	if ((!page. contains_text(bird_skill. to_string())) && (!page. contains_text("The Bird"))) {
		abort("You don't have the "+bird_skill+ " skill. Use "+ to_string(5 - get_property(progress). to_int()) + " "+insect+ " and try again next fight.");
	}

-Spiny
 

Rinn

Developer
Hey while this is bumped, Bale do you think you could pull your birdform script out into it's own thread so it's easier to find?
 

Bale

Minion
I could... I'll do that as soon as I get around to finishing it. I just started reviewing it earlier today when I saw the thread bumped, so expect it soon-ish.
 
Top