Beispiel #1
0
            }
            // not previously picked yet
            if (!$picked[$signid]) {
                // add to picked list
                $picked[$signid] = TRUE;
                // reduce amount
                $amount--;
                // add to orbsigns
                $sql = "INSERT INTO orbsigns (orb, sign) VALUES ('{$orb['id']}', '{$signid}')";
                $result = $db->query($sql);
            }
        }
        echo '
			You buy an orb with the following properties:<br><br>
			
			' . gGetOrbDescription($orb) . '<br>
			';
        $sql = "UPDATE accounts SET resused = resused + ({$gdCreditCost['2']} * 100000) WHERE id='{$acc['id']}'";
        $result = $db->query($sql);
    }
}
if ($action == "aidnethers") {
    $no = 0;
    if ($scholarperc >= 100 && $creatorperc >= 100 && $builderperc >= 100) {
        echo 'There are no unbuild buildings left.<br>';
    } elseif (!$brimstone && !$crystal && !$essence && !$granite) {
        echo 'Invalid resources.<br>';
        $no = 1;
    } else {
        if ($brimstone && !gCheckInt($brimstone) || $crystal && !gCheckInt($crystal) || $essence && !gCheckInt($essence) || $granite && !gCheckInt($granite)) {
            echo 'Invalid resources.<br>';
Beispiel #2
0
if ($action == "castitherian2") {
    $no = 0;
    $sql = "SELECT o.color, ao.* FROM accorbs AS ao, orbs AS o WHERE ao.id = '{$aoid}' AND ao.account = '{$acc['id']}' AND ao.orb = o.id";
    $result = $db->query($sql);
    $numrows = $db->num_rows($result);
    if ($numrows != 1) {
        echo 'Invalid aoid.<br>';
        $no = 1;
    } else {
        $orb = $db->fetch_array($result);
    }
    if ($no == 0) {
        tBegin("Gem Selection");
        // print orb
        echo 'You are casting an Itherian spell with the following orb:<br>';
        echo gGetOrbDescription($orb), '<br><br>';
        echo 'Please select exactly one gem for each sign required for this orb.<br><br><br>';
        $sql = "SELECT g.id, s.name AS signname, g.level AS glevel, g.type AS gtype, g.quality, s.type AS signtype FROM gems AS g, signs AS s WHERE g.owner = 'mage' AND g.target = '{$acc['id']}' AND g.sign = s.id ORDER BY s.name, g.level, g.type, g.quality ASC";
        $result = $db->query($sql);
        $numrows = $db->num_rows($result);
        fTitle("index.php?page=items&action=castitherian3&aoid={$aoid}&itid={$itid}");
        $counter = 0;
        while ($row = $db->fetch_array($result)) {
            $counter++;
            echo '<input type="checkbox" name="gemsselected[', $row["id"], ']">';
            echo gEchoGem($row), '<br>';
        }
        if ($numrows == 0) {
            echo 'You don\'t have any gems right now.<br><br>';
        }
        fEnd("Cast Itherian Orb Spell!");
         case 1:
             $sql = "UPDATE Itherian SET account = '{$aid}' WHERE id = '{$oid}'";
             $result = $db->query($sql);
             // get amount of sacs
             $sql = "SELECT count(*) FROM Itheriansacs WHERE Itherian = '{$oid}' AND used = 'no'";
             $result = $db->query($sql);
             $sacs = $db->result($result, 0);
             $text .= gEchoItherian($other, $sacs) . "<br>";
             $amount = 1;
             break;
             // Nether Orb
         // Nether Orb
         case 2:
             $sql = "UPDATE accorbs SET account = '{$aid}' WHERE id = '{$oid}'";
             $result = $db->query($sql);
             $text .= gGetOrbDescription($other) . "<br>";
             $amount = 2;
             break;
             // package
         // package
         case 3:
             $sql = "UPDATE packages SET account = '{$aid}' WHERE id = '{$oid}'";
             $result = $db->query($sql);
             $text .= "{$other['type']} package: gives {$other['amount']} {$other['type']}<br>";
             $amount = 3;
     }
     $date = date("Y-m-d H:i:s");
     $sql = "INSERT INTO donatelogs (account, target, amount, date, type) VALUES ('{$acc['id']}', '{$aid}', '{$amount}', '{$date}', 'other')";
     $result = $db->query($sql);
 }
 $output .= "Donation successful!<br>";
         $sql = "SELECT count(*) FROM Itheriansacs WHERE Itherian = '{$row['itid']}' AND used = 'no'";
         $result = $db->query($sql);
         $sacs = $db->result($result, 0);
         // get output
         $tmp["name"] = gEchoItherian($row, $sacs);
         $tmp["value"] = "1-" . $row["itid"];
         $array[] = $tmp;
     }
 }
 // get Nether orbs items
 if ($acc["level"] >= gdArcaneLevelMin) {
     $sql = "SELECT o.color, ao.uses, ao.id FROM accorbs AS ao, orbs AS o WHERE ao.account = '{$acc['id']}' AND ao.orb = o.id ORDER BY o.color ASC, ao.uses ASC";
     $result = $db->query($sql);
     $numrows = $db->num_rows($result);
     while ($row = $db->fetch_array($result)) {
         $tmp["name"] = gGetOrbDescription($row);
         $tmp["value"] = "2-" . $row["id"];
         $array[] = $tmp;
     }
 }
 // get packages
 $sql = "SELECT id, type, amount FROM packages WHERE account = '{$acc['id']}' ORDER BY type ASC, amount ASC";
 $result = $db->query($sql);
 while ($row = $db->fetch_array($result)) {
     $tmp["name"] = "{$row['type']} package: gives {$row['amount']} {$row['type']}";
     $tmp["value"] = "3-" . $row["id"];
     $array[] = $tmp;
 }
 if ($otherlist != "extended") {
     fSelect("Other:", "other", $array);
 } else {