Automate Choice Adventure?

Tenten21

New member
So i've been staring at these walls of text again (only 3 hours this time) trying to figure out how to make a simple script line that will allow me to:

1. Visit Barf Mountain and turn in a bag of garbage.

I have this:


void main() {
set_property( "choiceAdventure1067", "6" );
}

But it doesn't actually take the action. I tried using the "place.php?whichplace=airport_stench&action=airport3_tunnels" in an ash script but keep getting unknown variable errors, and i've expended about all the mental energy I can bear on this for today, and for whatever reason my searches for a suitable copy-paste option have been fruitless as well. If there is a repository of common script lines i'd love to know where it is, this seems like it would be a part of many people's breakfast.
 

ckb

Minion
Staff member
You are close. This is the code I use:
Code:
if (!to_boolean(get_property("_dinseyGarbageDisposed"))) {
    if (retrieve_item(1,$item[bag of park garbage])) {
        visit_url("place.php?whichplace=airport_stench&action=airport3_tunnels");
        visit_url("choice.php?pwd&option=6&whichchoice=1067");
    }
}

The set_property() command you have just sets the Mafia preference. That is, it sets it so that IF you come across choice #1067, Mafia will choose option 6. This command just sets the setting - it does not actually make it happen.

The ash command to go to a specific page click is visit_url(). The URL you had was correct - this will take you to the choice adventure. After that, you have to tell mafia to take the choice. This is what the second line in my code above does.
If you are in a choice, you can also use the ASH command run_choice() to select the option instead of the visit_url(). That would look like this:

Code:
if (!to_boolean(get_property("_dinseyGarbageDisposed"))) {
    if (retrieve_item(1,$item[bag of park garbage])) {
        visit_url("place.php?whichplace=airport_stench&action=airport3_tunnels");
        run_choice(6);
    }
}

With run_choice() you can specify the number of the choice you want to take. run_choice(-1) will take the choice set by the Mafia preference (f it is set).

Hope this helps!
 

Tenten21

New member
You are close. This is the code I use:
Code:
if (!to_boolean(get_property("_dinseyGarbageDisposed"))) {
    if (retrieve_item(1,$item[bag of park garbage])) {
        visit_url("place.php?whichplace=airport_stench&action=airport3_tunnels");
        visit_url("choice.php?pwd&option=6&whichchoice=1067");
    }
}

The set_property() command you have just sets the Mafia preference. That is, it sets it so that IF you come across choice #1067, Mafia will choose option 6. This command just sets the setting - it does not actually make it happen.

The ash command to go to a specific page click is visit_url(). The URL you had was correct - this will take you to the choice adventure. After that, you have to tell mafia to take the choice. This is what the second line in my code above does.
If you are in a choice, you can also use the ASH command run_choice() to select the option instead of the visit_url(). That would look like this:

Code:
if (!to_boolean(get_property("_dinseyGarbageDisposed"))) {
    if (retrieve_item(1,$item[bag of park garbage])) {
        visit_url("place.php?whichplace=airport_stench&action=airport3_tunnels");
        run_choice(6);
    }
}

With run_choice() you can specify the number of the choice you want to take. run_choice(-1) will take the choice set by the Mafia preference (f it is set).

Hope this helps!
This is perfect! Thank you :D
 
Top