nt num_rave_skills_known()
{
int num = 0 ;
foreach sk in $skills[ Break It On Down, Pop and Lock It, Run Like the Wind ]
if ( have_skill( sk ) ) num += 1 ;
return num ;
}
int num_combos_known()
{
int num = 0 ;
if ( get_property( "lastNemesisReset" ) != get_property("knownAscensions") ) return num;
for i from 1 to 6
if ( get_property( "raveCombo" + i ) != "" ) num += 1;
return num ;
}
boolean identify_combo()
{
if ( get_property( "lastNemesisReset" ) != get_property("knownAscensions") ) return false;
if ( get_property( "raveCombo5" ) != "" ) return true;
if ( num_combos_known() < 5 ) return false;
// 5/6 Rave combos have been identified, the last one is Rave Steal
vprint( "Identifying last Rave combo", "green", 4 );
string [ int ] rave_possible;
rave_possible[ 1 ] = "Break It On Down,Pop and Lock It,Run Like the Wind";
rave_possible[ 2 ] = "Break It On Down,Run Like the Wind,Pop and Lock It";
rave_possible[ 3 ] = "Pop and Lock It,Break It On Down,Run Like the Wind";
rave_possible[ 4 ] = "Pop and Lock It,Run Like the Wind,Break It On Down";
rave_possible[ 5 ] = "Run Like the Wind,Pop and Lock It,Break It On Down";
rave_possible[ 6 ] = "Run Like the Wind,Break It On Down,Pop and Lock It";
for i from 1 to 6
{
boolean known = false;
for j from 1 to 6
{
if ( get_property( "raveCombo" + j ) == rave_possible[ i ] )
{
known = true ;
break;
}
}
if ( !known )
{
set_property( "raveCombo5", rave_possible[ i ] );
break;
}
}
return true;
}
// combat filter, needs to be at the top level
string randrave( int rnd, string opp, string text )
{
vprint( num_combos_known() + "/6 combos known","green", 4 );
if ( num_combos_known() < 5 ) return "combo Random Rave";
return "attack";
}
boolean learn2combo()
{
if ( num_rave_skills_known() < 3 ) return vprint( "You have not learned all the Rave skills, exiting...",-1 );
if ( get_property( "raveCombo5" ) != "" && get_property( "lastNemesisReset" ) == get_property( "knownAscensions" ) )
return vprint( "Rave Steal combo already identified.",6 );
if ( my_adventures() == 0 ) return vprint( "Out of adventures.",-1 );
vprint( "Testing combos...","green",2 );
// adventure outside the club until you identify Rave Steal
if ( my_buffedstat( $stat[ moxie ] ) < ( 155+monster_level_adjustment() ) )
cli_execute( "maximize moxie, -melee, -ML, -familiar" );
use_familiar( best_fam("delevel") );
set_property( "autoEntangle", "false" );
while ( my_adventures() > 0 )
{
if ( my_mp() < 20 && !restore_mp( 20 ) ) return vprint( "Out of MP, exiting... please configure Mafia's automatic MP restoring",-1 );
adventure( 1 ,$location[ Outside the Club ], "randrave" );
if ( identify_combo() ) return vprint( "Rave Steal combo identified.",6 );
}
return vprint( "Out of adventures, exiting...",-1 );
}