Gameinformer dungeon script

kain

Member
Since I haven't seen one yet ... here's a basic script to complete one dungeon. Set your outfit/familiar/mood/ccs manually, of course. It could, of course, be prettier. But it works as-is.

I've used it for 250+ magazines so far without any intervention.

Just copy/paste into a .txt file.
Code:
<inline-ash-script>
	visit_url("inv_use.php?pwd&which=3&whichitem=6174");
	visit_url("inv_use.php?pwd&confirm=Yep.&whichitem=6174");
	adventure(my_adventures(), $location[level 1]);
	adventure(my_adventures(), $location[level 2]);
	# adding this seems to prevent the 'a gracious maze' from re-appearing over and over and over again.
	visit_url("place.php?whichplace=faqdungeon");
	adventure(my_adventures(), $location[level 3]);
</inline-ash-script>
 

kain

Member
that's hilarious Bale! Almost exactly like what I posted. Thanks for pointing that out. I searched back when the dungeon came out ... and never searched again.

I didn't post the version that loops through each of my X/day drop familiars and rotates familiars through the CoT while doing so, though. It's pretty similar to the snippet I posted ... not very polished.
 
Last edited:
I didn't post the version that loops through each of my X/day drop familiars and rotates familiars through the CoT while doing so, though. It's pretty similar to the snippet I posted ... not very polished.

i've been thinking lately that it would be nice to have something that looped through my spleen familiars for me while adventuring, but i didn't know if it made sense to do it as a between battle script or what... it would be awesome if it was a setting/preference in one of the more commonly used mechanisms though so i wouldnt have to customize or replace. wonder if anyone has a solution for just your run of the mill adventuring with familiar switching (as opposed to being in a dungeon script like yours)
 

DuRhone

New member
How can I modify to always choose Choice 1 in dungeon 1 so that I can farm a dungeon level over and over?

Thanks.
 

Bale

Minion
After
Code:
void DailyPro()
{
	cli_execute("inv refresh");
	if (item_amount(walkthru) == 0)
	{
		if (item_amount(magazine) == 0)
			buy(1, magazine);

		visit_url("inv_use.php?pwd&whichitem=6174&confirm=Yep.");
		cli_execute("inv refresh");
	}

	if (item_amount(walkthru) == 0)
		abort("Failed to use a " + magazine );

Add:

Code:
	// Set to always fail
	for i from 659 to 663 {
		string par = "choiceAdventure" + to_string(i);
		int x = get_property(par).to_int();
		string y = x == 3? "1": to_string(x+1);
		if(x != 0) {
			set_property(par, y);
			print(par+"... Old: "+x+", New: "+get_property(par));
		}
	}

That will ensure that regardless of the correct answer, it will always choose the wrong answer.
 

DuRhone

New member
I tried:
Code:
void DailyPro()
{
	cli_execute("inv refresh");
	if (item_amount(walkthru) == 0)
	{
		if (item_amount(magazine) == 0)
			buy(1, magazine);

		visit_url("inv_use.php?pwd&whichitem=6174&confirm=Yep.");
		cli_execute("inv refresh");
	}

	if (item_amount(walkthru) == 0)
		abort("Failed to use a " + magazine );
// Set to always fail
	for i from 659 to 663 {
		string par = "choiceAdventure" + to_string(i);
		int x = get_property(par).to_int();
		string y = x == 3? "1": to_string(x+1);
		if(x != 0) {
			set_property(par, y);
			print(par+"... Old: "+x+", New: "+get_property(par));
		}
	}
and saved it as an .ash file. when I tried to load it into mafia it does not recognize "walkthru".

Thanks for the help.
 
Last edited by a moderator:

Bale

Minion
You also need a final close curly-brackets at the end.

Sorry I thought we were modifying an already existing script I referenced earlier in the thread. (That's what happens when you tack your question onto a previously existing thread.)
 

DuRhone

New member
sorry, I did not mean to sound ungrateful. I am not very good at this.

If I were to add the "choose only choice 1" into Dailypro.ash, where would I add it?

Thanks,
 

Bale

Minion
It's NOT that simple. There are several possible choice adventures. You'd need to tell me which one you are getting for which you want to use choice 1. The code that I posted will set mafia to always choose a wrong choice regardless of which choice adventure or which answer would be correct.

tl;dr: Tell me which choice adventure you are getting and I'll tell you how to set it to choice one.
 

DuRhone

New member
Hmmm...

OK, I am not sure what to answer so:

In the level 1 (first dungeon) I am offered a choice of "Check the bookshelves" , "move the candlesticks" and "search the fireplace"

If I choose #3, then dungeon 1 will close and dungeon 2 will open. I keep choosing #1 and fighting (for leveling purposes) the scaling monsters. The choice pops up so annoyingly much that I just wanted to have a little script to fight the monsters and choose #1 so I can do other things with my lazy self. :)

I did not expect it to be that annoying and I am sorry for the irritation. I will compensate with something. I am trying to get stuffed hodgemen for Bale, but no one is selling so I may have to think of something else.
 

Ethelred

Member
Hmmm...

OK, I am not sure what to answer so:

In the level 1 (first dungeon) I am offered a choice of "Check the bookshelves" , "move the candlesticks" and "search the fireplace"

If I choose #3, then dungeon 1 will close and dungeon 2 will open. I keep choosing #1 and fighting (for leveling purposes) the scaling monsters. The choice pops up so annoyingly much that I just wanted to have a little script to fight the monsters and choose #1 so I can do other things with my lazy self. :)

I did not expect it to be that annoying and I am sorry for the irritation. I will compensate with something. I am trying to get stuffed hodgemen for Bale, but no one is selling so I may have to think of something else.

There are 3 choices. One of them is correct, and which one is correct will be revealed by your game walkthru. If you select one of the other ones, an incorrect one, you will not finish the level and thus may continure leveling. Which choice is the correct one will vary from dungeon to dungeon. So you can't always assume that 1 will be a wrong choice. Sometimes you even get a different kind of level and don't have the option of the 3 choices, so you can't even get the option. When you use the magazine and read the walkthru, mafia parses it and selects the correct adventure for you. The script fragment posted above will change the choice to guarantee an incorrect answer, if you got the right dungeon. You can also do it manually by using the mini-browser and seeing which choice adventure you have encounted and then entering the CLI command "set choiceAdventureXXX=Y" (without the quotes), where XXX is the choice adventure number as revealed by the mini-browser and Y is one of the 2 incorrect choices for you, i.e, not the one that mafia has already set. Once you've set the choice adventure to fail, you can automate your turns and let mafia handle choosing the incorrect adventure for you.

Does that make it clearer?
 

Bale

Minion
Hmmm...

OK, I am not sure what to answer so:

In the level 1 (first dungeon) I am offered a choice of "Check the bookshelves" , "move the candlesticks" and "search the fireplace"

If I choose #3, then dungeon 1 will close and dungeon 2 will open. I keep choosing #1 and fighting (for leveling purposes) the scaling monsters. The choice pops up so annoyingly much that I just wanted to have a little script to fight the monsters and choose #1 so I can do other things with my lazy self. :)

There are 6 possible choice adventures that could have ended dungeon level 1. You happen to have encountered the noncombat titled, "It's a Place Where Books Are Free" which is noncombat number 660 according to the wiki. To chose the first answer for that particular noncombat you would copy/paste the following line into your CLI: (capitalization counts, so please copy/paste)

Code:
set choiceAdventure660 = 1

If you had a different random dungeon the answer could have been different.
 
Last edited:
Top