function scrapbots_run()
{
    global $session;
    page_header("ScrapBots testing");
    if ($session['user']['alive'] == 0) {
        addnav("Daily News", "news.php");
        page_footer();
        break;
    } else {
        addnav("Scavenge");
        addnav("Scavenge x 1", "runmodule.php?module=scrapbots&scavenge=1");
        addnav("Scavenge x 10", "runmodule.php?module=scrapbots&scavenge=10");
        addnav("Village", "village.php");
        addnav("Search for an Opponent", "runmodule.php?module=scrapbots&op=findopponent");
        require_once "modules/scrapbots/lib.php";
        $op = httpget('op');
        if ($op) {
            include "scrapbots/run/case_{$op}.php";
        }
        if (httpget('reset') == 1) {
            set_module_pref("scrap", 0);
        }
        if (httpget('scavenge') == 1) {
            scrapbots_scavenge();
            output("`n`n");
        }
        if (httpget('scavenge') == 10) {
            scrapbots_scavenge(10);
            output("`n`n");
        }
        if (httpget('testfight') == 1) {
            require_once "modules/scrapbots/battle-2.php";
            scrapbots_battle(96);
        }
        scrapbots_list_player_scrap();
        scrapbots_list_combinations();
        scrapbots_list_scrapbots();
        scrapbots_list_requirements();
        addnav("Debug");
        addnav("Clear Scrap array", "runmodule.php?module=scrapbots&reset=1");
        addnav("Fight against playerid 96", "runmodule.php?module=scrapbots&testfight=1");
    }
    page_footer();
}
<?php

output("TODO: Check if opponent has scrapbots, can be attacked etc`n`n");
$name = httpget('name');
$sql = "SELECT acctid FROM " . db_prefix("accounts") . " WHERE login='******'";
$result = db_query($sql);
$row = db_fetch_assoc($result);
require_once "modules/scrapbots/battle-2.php";
scrapbots_battle($row['acctid']);