boolean buy_tokens = true;
boolean burn_mana = false;
boolean libram_burn = false;
string last_page;
boolean PlayDungeonFist()
{
visit_url( "place.php?whichplace=arcade&action=arcade_fist&pwd", false );
visit_url( "choice.php?forceoption=0" );
cli_execute( "choice-goal" );
return false;
}
void Arcade()
{
last_page=visit_url("arcade.php");
if (contains_text(last_page, "The Game Grid Arcade"))
{
if (my_adventures() < 5)
{
abort("You need 5 adventures remaining to play Dungeon Fist!");
}
if (item_amount($item[game grid token]) == 0)
{
if (buy_tokens == true)
{
buy(1, $item[game grid token]);
} else {
abort("You need more tokens!");
}
}
last_page=visit_url("arcade.php?action=game&whichgame=3&pwd");
last_page=visit_url("choice.php");
}
while (PlayDungeonFist()){}
}
void main( int times )
{
for i from 1 to times
{
if (times != 1)
{
print("Iteration " + i + " of " + times , "blue" );
}
if (libram_burn == true)
{
cli_execute("call libramburn.ash");
}
if (burn_mana == true)
{
cli_execute("burn *");
}
Arcade();
}
}