示例#1
0
        echo '"</i><br><br>
			
			<form method="POST" action="index.php?page=travel&action=submitscholarname">
			';
        tBegin();
        $array = array();
        while ($row = $db->fetch_array($result)) {
            $creature = new Creature($row);
            $row["skill"] = $creature->data["sortskill"];
            $array[] = $row;
        }
        gSortCreatures($array);
        foreach ($array as $row) {
            $creature = new Creature($row);
            $url = array("<input type='checkbox' name='summons[", "#id", "]'>&nbsp;&nbsp;", "#creaturename");
            $creature->echoCreature($url);
        }
        echo '
			</table>
			<br><br>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
			<td width="20%">
			</td>
			<td width="60%">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			';
        fText("Brimstone:", "brimstone", "0");
        fText("Crystal:", "crystal", "0");
        fText("Essence:", "essence", "0");
        fText("Granite:", "granite", "0");
示例#2
0
            if ($acc[$classname] < $challenge["value"]) {
                echo 'Invalid chid.<br>';
                $no = 1;
            }
        }
    }
    if ($no == 0) {
        tBegin($challenge["name"] . " challenge");
        $sql = "SELECT {$gdChallengeCreatureSelect}, cc.xp FROM (challengecreatures AS cc, creatures AS c, races AS r) LEFT JOIN items AS i ON cc.item = i.id WHERE cc.challenge = '{$chid}' AND cc.creature = c.id AND c.race = r.id ORDER BY c.name ASC";
        $result = $db->query($sql);
        $numrows = $db->num_rows($result);
        echo 'To beat this challenge, you have to defeat the ', $numrows, ' following creatures.<br><br>';
        tBegin();
        while ($row = $db->fetch_array($result)) {
            $creature = new Creature($row);
            $creature->echoCreature();
        }
        echo '</table>';
        echo '<br><a href="index.php?page=character&action=trychallenge&chid=', $chid, '">Try this challenge!</a><br>';
        tEnd();
    }
}
if ($action == "trychallenge") {
    $no = 0;
    if (!$chid) {
        echo 'Invalid data.<br>';
        $no = 1;
    } else {
        $sql = "SELECT * FROM challenges WHERE id = '{$chid}'";
        $result = $db->query($sql);
        $numrows = $db->num_rows($result);