here is the current version of my Giant Castle script.
I keep thinking about changing the formula to be a bit more dynamic on regards to how many stat points are needed. For instance, I may want to stop a little lower than 69 on the non-primary stats in case I am nowhere near reaching level 11 yet. My initial thought is that I would go one stat point lower for every 5 points needed in another stat. So for instance, if I am still 10 points away from level 11, I would stop the non-primary stat levelling at 67. Any suggestions would be greatly appreciated.
Code:
stat Lookup_PrimaryStat()
{
stat ReturnStat;
if( my_class() == $class[turtle tamer] || my_class() == $class[seal clubber]) { ReturnStat = $stat[muscle]; }
if( my_class() == $class[pastamancer] || my_class() == $class[sauceror]) { ReturnStat = $stat[mysticality]; }
if( my_class() == $class[Disco Bandit] || my_class() == $class[accordion thief]) { ReturnStat = $stat[moxie]; }
return ReturnStat;
}
void Adv_SetWheelStat(stat StatNeeded)
{
if (StatNeeded == $stat[moxie] )
{
cli_execute("set choiceAdventure9=2");
cli_execute("set choiceAdventure10=2");
cli_execute("set choiceAdventure11=1");
cli_execute("set choiceAdventure12=3");
}
if (StatNeeded == $stat[muscle] )
{
cli_execute("set choiceAdventure9=3");
cli_execute("set choiceAdventure10=2");
cli_execute("set choiceAdventure11=1");
cli_execute("set choiceAdventure12=1");
}
if (StatNeeded == $stat[mysticality] )
{
cli_execute("set choiceAdventure9=1");
cli_execute("set choiceAdventure10=3");
cli_execute("set choiceAdventure11=2");
cli_execute("set choiceAdventure12=1");
}
}
void Quest_GiantCastle()
{
stat statNeeded;
int intStatTarget;
boolean blnMatch;
boolean blnHitIt;
stat StatPrimary;
stat Stat1;
stat Stat2;
StatPrimary = Lookup_PrimaryStat();
if ( StatPrimary == $stat[moxie] )
{
Stat1 = $stat[muscle];
Stat2 = $stat[mysticality];
}
if ( StatPrimary == $stat[muscle] )
{
Stat1 = $stat[moxie];
Stat2 = $stat[mysticality];
}
if ( StatPrimary == $stat[mysticality] )
{
Stat1 = $stat[moxie];
Stat2 = $stat[muscle];
}
blnHitIt = false;
if ( my_basestat(Stat1) < 69 ) { blnHitIt = true; }
if ( my_basestat(Stat2) < 69 ) { blnHitIt = true; }
if ( my_level() < 11 ) { blnHitIt = true; }
if ( my_adventures() == 0 ) { blnHitIt = false; }
while ( blnHitIt == true )
{
blnMatch = false;
if ( blnMatch == false && my_basestat($stat[moxie]) < 69 )
{
statNeeded = $stat[moxie];
intStatTarget=69;
blnMatch=true;
}
if ( blnMatch == false && my_basestat(Stat1) < 69 )
{
statNeeded = Stat1;
intStatTarget=69;
blnMatch=true;
}
if ( blnMatch == false && my_basestat(Stat2) < 69 )
{
statNeeded = Stat2;
intStatTarget=69;
blnMatch=true;
}
if ( blnMatch == false && my_level() < 11 )
{
statNeeded = StatPrimary;
intStatTarget=104;
blnMatch=true;
}
cli_execute("conditions clear");
Adv_SetWheelStat(statNeeded);
cli_execute("conditions add " + int_to_string(intStatTarget) + " " + stat_to_string(statNeeded));
adventure(my_adventures(), $location[Castle in the Clouds in the Sky]);
council();
blnHitIt = false;
if ( my_basestat(Stat1) < 69 ) { blnHitIt = true; }
if ( my_basestat(Stat2) < 69 ) { blnHitIt = true; }
if ( my_level() < 11 ) { blnHitIt = true; }
if ( my_adventures() == 0 ) { blnHitIt = false; }
}
}
I keep thinking about changing the formula to be a bit more dynamic on regards to how many stat points are needed. For instance, I may want to stop a little lower than 69 on the non-primary stats in case I am nowhere near reaching level 11 yet. My initial thought is that I would go one stat point lower for every 5 points needed in another stat. So for instance, if I am still 10 points away from level 11, I would stop the non-primary stat levelling at 67. Any suggestions would be greatly appreciated.