Script request

braak

New member
hi mighty coder :)

i have a slight problem.
when i use free run abilities such as peel out in pete path,i cant make mafia stop it to only use 1 peel out or 5 or 10.mafia just goes on until all peel outs are spend and then stops,regardless how many turns i put in ...
is there any script available that can help me with this?
 

Crowther

Active member
The function you need is adv1.

You could use it from the command line like this:
ash adv1($location[the peak], -1, "");
 

Bale

Minion
,regardless how many turns i put in ...

Just to clarify this point. The number of turns you put in is ZERO, regardless of how many peel outs you used. It's always zero until you actually use a turn -- hence the problem.
 

braak

New member
ash adv1($location[area], -1, ""); for using up my peel outs as pete path ;)

but this do only 1 turn,how can i make it using 30 turns?
i tried to change the -1 to 30 but still only do 1 turn
 

lostcalpolydude

Developer
Staff member
ash adv1($location[area], -1, ""); for using up my peel outs as pete path ;)

but this do only 1 turn,how can i make it using 30 turns?
i tried to change the -1 to 30 but still only do 1 turn

You would need something like
Code:
while ( to_int( get_property( "_petePeeledOut" ) ) < 30 )
{
	adv1($location[area], -1, "");
}

Using adv1() means that mafia will try to adventure exactly once, no matter how many turns it takes. To get what you need, you have to run the command repeatedly.
 
Last edited:

Bale

Minion
ash adv1($location[area], -1, ""); for using up my peel outs as pete path ;)

but this do only 1 turn,how can i make it using 30 turns?
i tried to change the -1 to 30 but still only do 1 turn

lost gave the answer, but for more information on what the -1 means you might want to read this.
 

lostcalpolydude

Developer
Staff member
I realized that I left in the "ash" part in my previous post, which I have now fixed. To answer the question that was sent as a PM for some reason, you want
Code:
ash while ( to_int(get_property("_buzzes into the area"))<30) { ash adv1 ($location[cobb's knob menagerie,level 1], -1, ""); }
to fix the syntax error you got.

Except "_buzzes into the area" isn't a mafia property (or one that you are doing something with), so you really need to use "_petePeeledOut" if you don't want this to use up all of your turns.
 
Top