New Content - Implemented AWOL Yetis

Theraze

Active member
Unknown item found: A. W. O. L. commendation (5116, 542484240)
--------------------
5116 A. W. O. L. commendation usable display 0
5116 542484240 A. W. O. L. commendation
# A. W. O. L. commendation
--------------------

Got the commendation for repeatedly killing skeletons.

Also, you can use a hideous egg in the plains (AWOL Camp) to hatch a Yeti. This does not cost an adventure.

After you have a Yeti, you can fight in the Astral Slash. The actual url is invasion.php?action=1, at which point you have three options. This is choice adventure 529, and the choices are:
Dive right into the fray
Fly above to get a better look
Fly underneath the swarm

The first is muscle, second is mysticality, and third is moxie. You need to match your weapon type to the adventure selected. Picking the wrong one does still use an adventure, but doesn't hurt you or kill skeletons.

Damage from muscle is 5% of max, rounded up to HP.
Damage from mysticality is 5% of max, rounded up to MP.
Damage from moxie is 4% of max, rounded up to both HP/MP.

HP/MP regen items DO fire, so you can use those to make the adventure not cost HP/MP if you're properly prepared...

Looks like the requirement to adventure is having at least 20% of max HP/MP else you get a message that says:
You don't have the energy to attack a problem this size. Go drink some soda or something.

When that message shows up, it does not cost an adventure.
 
Last edited:

Veracity

Developer
Staff member
Chances are, I will not spend the time making it easy to automate this.
Write a script and use visit_url, if it is important to you.

The item will be added, by and by.
 

Theraze

Active member
Script is done, automatically sets my choice and all. Got tired of clicking after ~100 adventures manually, so... yep.

Just thought I should mention since last I heard was that mafia was going to be adding seasonal/temporary content. Though I'd definitely make that a lower priority than actually making stuff work... :)
 

Veracity

Developer
Staff member
If it were an adventure.php zone, sure. This, however, is invasion.php redirecting to choice.php, and I don't have time to write it.
If somebody wants to write a patch and let people test it, I will integrate it, though, once it passes...
 

Veracity

Developer
Staff member
Well, I got tired of my session log not showing that adventures are being consumed by this. Revision 9285 makes The Skies Over Valhalla an adventurable location and logs like this:

[4120] The Skies Over Valhalla
Encounter: A Swarm of Yeti-Mounted Skeletons
You defeated 43 skeletons
You acquire an item: A. W. O. L. commendation
You lose 16 hit points
You lose 19 Mojo Points
 

Bale

Minion
:)

I tucked a refresh_status() into my script to deal with the consuming of adventures. This is definitely nicer though. Thanks.
 
Last edited:

Winterbay

Active member
I used the following from the CLI:
Code:
ash string thing; thing = visit_url("invasion.php?arrival=1"); while(my_adventures() > 0) { if(my_mp() < my_maxmp() / 5) { cli_execute("restore mp"); } else { thing = visit_url("invasion.php?action=1"); thing = visit_url("choice.php?pwd&whichchoice=529&option=2&choiceform2=Fly+above+to+get+a+better+look"); } }

Edit: Needless to say as a S I went the Spell damage way. I managed to get to 35 skeletons/turn.
 

slyz

Developer
I had a scriptlet that just used visit_url(), and the number of adventures was being tracked correctly by Mafia:
PHP:
// find out which choice gets you more kills
record {
	int damage;
	int choice;
} [ int ] mod;

mod[ 0 ].damage = numeric_modifier( "Weapon Damage" );
mod[ 0 ].choice = 1;
mod[ 1 ].damage = numeric_modifier( "Spell Damage" );
mod[ 1 ].choice = 2;
mod[ 2 ].damage = numeric_modifier( "Ranged Damage" );
mod[ 2 ].choice = 3;

sort mod by -value.damage;

void main( int turns )
{
	turns = min( turns, my_adventures() );

	int turns_used = 0;
	int kills;
	string page;
	matcher m;

	while ( turns_used < turns )
	{
		turns_used += 1;

		cli_execute( "mood execute" );
		if ( my_hp() < my_maxhp() * 0.2 ) restore_hp( ceil( my_maxhp() * get_property( "hpAutoRecoveryTarget" ).to_float() ) ) ;
		if ( my_mp() < my_maxmp() * 0.2 ) restore_mp( ceil( my_maxhp() * get_property( "mpAutoRecoveryTarget" ).to_float() ) ) ;
		
		print( "turn " + turns_used + "/" + turns, "green" );

		page = visit_url( "invasion.php?action=1" );
		if ( !page.contains_text( "action=choice.php" ) ) abort( "Huh? something went wrong." );

		page = visit_url( "choice.php?whichchoice=529&option=" + mod[ 0 ].choice );
		m = create_matcher( "You defeated <b>(\\d+)</b> skeletons", page );
		if ( !m.find() ) abort( "Hum... something went wrong." );
		print_html( m.group( 0 ) );
		kills += m.group( 1 ).to_int();
	}

	print( "" );
	print( kills + " skeletons killed." );
}
 

Theraze

Active member
Fun fact... $stat[<stat>].to_int() returns 1-3. For example, weapon_type(equipped_item($slot[weapon])).to_int()...

Edit: Thanks, Veracity! Makes my session logs look much more reasonable now.
 
Last edited:

slyz

Developer
Thanks Veracity!

I thought adding a non-adventure.php location would be more of a hassle, but apparently adventures.txt is more flexible than I remembered.
 

Bale

Minion
Well, yesterday's script (with tiny changes) worked quite nicely since I was impatient to wait for the new area to be added to Mafia today. ;)

I'm not sure why Veracity and I had trouble updating adventures while slyz and Winterbay did not. Perhaps slyz's mood execute served that purpose, but I cannot figure out what Winterbay did for that affect. I added a refresh status, but now I'm using mood execute instead and that works fine.
 

Winterbay

Active member
I did have "mood execute" in there a while but then I figured that it's easier to just get enough buffs from the beginning and then just go with it :)
 

Winterbay

Active member
That was the version I ran with in the end and it seemed to be updating fine (at least the number of tokens I receievd went into the session tally and the turn count was correct at the end of the day).
I had another if-statement with a loop variable that got reset after 10 turns and doing a mood execute in there before I decided to just make sure I had 200 turns of whatever buff I needed and then go ahead.
I should say that when I didn't have that in there the mood did not execute so if that's what we're discussing then no it didn't work. The session result seemed to work fine though :)
 

slyz

Developer
I added the "mood execute" later on, so people in my clan who ran moods wouldn't have any problem. The adventure count was updating fine before I added that line, if I remember correctly.
 

Veracity

Developer
Staff member
The adventure count increments when we visit charpane.php. I just didn't like the fact that the Session Log did not show adventures being used - which requres that we recognize invasion.php as an Adventure.
 

Rinn

Developer
New zone info:
The Bone Star
invasion.php?action=5
choiceadv 534 (That's No Bone Moon...)
First option is use protoprotoneutron torpedos
Second option is +initiative
Third option is +ml
 
Top