newbie code help

braak

New member
hi all :)

i need a code for mafia where i can use my pete skill peel out or my mayfly bait necklace 30 times
i know it has to do with ash adv1... but since now i didnt manage mafia to do it 30 times,anyone can help?
offer is 500,000 meat for working script
 

Bale

Minion
Code:
void main(location where_to) {
   while(get_property("_petePeeledOut").to_int() < 30)
      adv1(where_to, -1, "skill 15015;");
}

That will prompt you for a location to spend your turns peeling out. It will then go to that location and peel out until you run out of peel outs.
 
Last edited:

Bale

Minion
After a little bit more consideration, although you did not request it, I decided it would be best to check if the character's Motorbike actually has Racing Slicks. If he does not, then it should only peel out 10 times. That improvement follows:

Code:
void main(location where_to) {
   int max_peel = 10;
   if(get_property("peteMotorbikeTires") == "Racing Slicks")
      max_peel = 30;
   while(get_property("_petePeeledOut").to_int() < max_peel)
      adv1(where_to, -1, "skill 15015;");
}

I am same name in game, so you can send the meat in a bown paper package from the gift shop. I'll admit that I am puzzled why you would want this. Is there some reason why you wan to simply spend peel outs to waste turns without any other condition? Is this just so you can have some basic code to modify for other uses?
 
Last edited:

lostcalpolydude

Developer
Staff member
Based on your previous thread, I'm guessing that you need more guidance. Put the stuff from Bale's post in a .ash file, using a plain text editor (Notepad will work, Word will not). Save that file in your /scripts folder. Then go to Scripts -> Load script to run it.
 
Top