Automatic Rave Combo for pickpocketing as a Disco Bandit

Bale

Minion
Here's a cute little consult script I just got around to writing since I wanted an example for the wiki that did something interesting, but wouldn't be very long.

This will attempt to steal by any means possible. If you've got two chances to steal because you're wearing the Bling of the New Wave and fail the first time, then it will attempt to steal a second time. If you fail to pick a pocket, then if you're a Disco Bandit it will attempt the Rave Combo that is guaranteed to steal an item.

PHP:
void main(int initround, monster foe, string url) {
   while(contains_text(url, "form name=steal")) {
      url = steal();
      if((contains_text(url, "grab something") || contains_text(url, "You manage to wrest")))
         return;   // Something has been stolen. Job done!
   }
   if(my_class() != $class[Disco Bandit]) return;
   matcher combo = create_matcher("(.+),(.+),(.+)", get_property("raveCombo5"));
   if(combo.find())
      for i from 1 to 3 {
         if(contains_text(url, "You win the fight")) return;
         url = use_skill(combo.group(i).to_skill());
      }
}

Use it like any other consult script:

Code:
[ default ]
1: consult RaveSteal.ash
2: attack

Of course, this is just a little stand-by until zarqon adds Rave Combos to FTF/SS, but I liked it, so I thought I'd share it.
 
Last edited:

DuckAndCower

New member
Alright, I'm a total Mafia noob. I can't figure out how to get this script to run, and not for lack of trying. How does it know what makes up the Rave Combo? Also, Mafia doesn't seem to let me use the Rave moves in the custom combat script thing. When I click Save, it changes them to "attack with weapon". Any idea what I'm doing wrong?
 

Bale

Minion
Save the code as a script in your /script directory as RaveSteal.ash. (You'll want to copy-paste it into notepad or other unformatted text editor.) Consult scripts are not part of the ccs. Then set up your CCS as I suggested.

The script only works if you've used the Rave Combo in a recent version of mafia. Mafia then recognizes that you used a combo and saved the information about the skill order to do that. This information can then be recalled with get_property("raveCombo5"). I then parse it out using a regular expression.
 
Hello!

I've been trying to use this script in my CCS, consulting as per the directions, but it seems to attempt to rave steal even if a pickpocket attempt is successful. I was wondering if I need to run the script alone first (and set the variables it asks for). I have a build 10005 at the present, and do have all the combos saved into mafia.
 
Top