Exemplo n.º 1
0
     $schiff->x--;
 }
 if ($wert == 1 && $schiff->y > 1) {
     $schiff->energie--;
     $schiff->y--;
 }
 if ($wert == 2) {
     $schiff->energie--;
     $schiff->x++;
 }
 if ($wert == 3) {
     $schiff->energie--;
     $schiff->y++;
 }
 echo $schiff->x, '|', $schiff->y;
 $schiff->setData($schiff->id);
 $abfrage2 = mysql_query("SELECT * FROM schiffe WHERE x='{$schiff->x}' AND y='{$schiff->y}' AND typ!='s'");
 while ($s2 = mysql_fetch_array($abfrage2)) {
     echo '---->', $s2["typ"], ' ', id2name($s2["besitzer"]);
     if ($s2["typ"] == 'm') {
         $empf = $s2["besitzer"];
         $datum = date("Y-m-d H:i:s");
         $check3 = false;
         $npclog = mysql_query("SELECT * FROM npclog WHERE besitzer='{$empf}'");
         while ($npc = mysql_fetch_array($npclog)) {
             $check3 = true;
         }
         if (!$check3) {
             $betreff = 'Besuch bei ' . $schiff->x . '|' . $schiff->y;
             $inhalt = "Hallo\n\ndas Schiff {$schiff->name} hat dich besucht!";
             mysql_query("INSERT INTO mail (absender,empfaenger,betreff,inhalt,datum,neu) VALUES ('4','{$empf}','{$betreff}','{$inhalt}','{$datum}','1')");
Exemplo n.º 2
0
     $amountA = $to->lager - $to->rohstoffa - $to->rohstoffb - $to->rohstoffc - $to->rohstoffd - $to->deuterium;
 }
 echo 'Baustoff: ';
 while (!$break) {
     $partamount = $amountA < 20 ? $amountA : 20;
     if ($partamount <= 0) {
         $break = true;
     }
     if (!$break) {
         if ($from->energie > 0) {
             $amountA -= $partamount;
             echo $partamount, ': <span style="color:green;">ok</span> ';
             $from->energie--;
             $from->rohstoffa -= $partamount;
             $to->rohstoffa += $partamount;
             $from->setData($from->id);
             $to->setData($to->id);
             $from->getData($from->id);
             $to->getData($to->id);
         } else {
             $break = true;
             echo $partamount, ': <span style="color:red;">Nicht genug Energie!</span>';
         }
     }
 }
 //rohstoff b
 $amountB = $_POST["rb"];
 //if($amoumtA=="") $amountB=0;
 if ($amountB > $from->rohstoffb) {
     echo '<br /><span style="color:yellow;">Hinweis: ', $amountB, ' angepasst an ', $from->rohstoffb, '!<br />';
     $amountB = $from->rohstoffb;
Exemplo n.º 3
0
         $e = 1;
         $continue = false;
     }
     mysql_query("UPDATE planet2 SET {$feldnummer}='{$newvar1}' WHERE pid='{$pid}'");
 }
 if ($_POST["produktion"] == 'photonen') {
     $e = 1;
     $newvar = $a . "-" . $b . "-" . $c . "-" . $d . "-1";
     mysql_query("UPDATE planet2 SET {$feldnummer}='{$newvar}' WHERE pid='{$pid}'");
 }
 if ($_POST["produktion"] == 'quanten') {
     $e = 2;
     $newvar = $a . "-" . $b . "-" . $c . "-" . $d . "-2";
     mysql_query("UPDATE planet2 SET {$feldnummer}='{$newvar}' WHERE pid='{$pid}'");
 }
 $aktPlanet->setData();
 $do = $_POST["do"];
 echo '<h3>Torpedoproduktion</h3>';
 echo '<br />Produktion: <b>';
 if ($e == 0) {
     echo "keine Produktion";
 }
 if ($e == 1) {
     echo "Photonentorpedos";
 }
 if ($e == 2) {
     echo "Quantentorpedos";
 }
 echo '</b><br /><br />Du kannst hier den Produktionszyklus einstellen. Die Produktion wird solange fortgesetzt bis keine Rohstoffe mehr vorhanden sind oder man die Fabrik abschaltet.<br /><br />';
 echo '<table class="bordered">';
 echo '<tr><form action="torpedo.php?pid=', $pid, '&fid=', $fid, '" method="post"><input type="hidden" name="produktion" value="photonen" /><td><img src="photonen.png" border="0" /></td><td>Photonentorpedos</td><td>8 Schaden</td><td>-3 Duranium<br />-5 Baustoffe<br />-2 Antimaterie<br />-2 Deuterium<br />-4 Energie</td><td><input type="submit" value="Auf Photonentorpedos umstellen" /></td></form></tr>';
Exemplo n.º 4
0
                 $tplanet->energie -= 10;
                 $tplanet->rohstoffb -= 30;
                 $tplanet->rohstoffa -= 40;
                 $tplanet->antimaterie -= 4;
                 $tplanet->dili -= 2;
                 $tplanet->isochips += 1;
             }
             if ($a == 22 && $tplanet->energie >= 100 && $tplanet->rohstoffb >= 5 && $tplanet->rohstoffc >= 12) {
                 $tplanet->energie -= 100;
                 $tplanet->rohstoffb -= 5;
                 $tplanet->rohstoffc -= 12;
                 $tplanet->tritanium += 1;
             }
         }
         $tfeld->setData($tpid);
         $tplanet->setData($tpid);
         $tfeld->getData($tpid);
         $tplanet->getData($tpid);
     }
 }
 mysql_query("UPDATE schiffe SET energie=maxenergie WHERE typ='m) AND energie>maxenergie");
 //warenkzinsen
 mysql_query("UPDATE konto SET rohstoffa=ceil(rohstoffa*0.9),rohstoffb=ceil(rohstoffb*0.9),rohstoffc=ceil(rohstoffc*0.9),rohstoffd=ceil(rohstoffd*0.9),deuterium=ceil(deuterium*0.9)");
 //mailerinnerungen
 $rememberquery = mysql_query("SELECT * FROM account WHERE inaktiv=56 AND id>9");
 while ($rem = mysql_fetch_array($rememberquery)) {
     $mail1 = $rem["email"];
     $name1 = $rem["name"];
     $message = "Hallo {$name1},\n\nDu bekommst diese Mail weil du seit 56 Ticks (7 Tagen) dich nicht mehr bei Galaxy Adventures gemeldet hast. Dies soll nur eine kleine Erinnerung sein, dass dein Account noch existiert ;). Solltest du kein Interesse mehr an Galaxy-Adventures 2 haben und weitere 56 Ticks verstreichen, so wird dein Account geloescht und alle deine Daten aus der Datenbank entfernt.\nIch wuensche dir viel Spass\n\ncremetorte";
     mail($mail1, "Erinnerung - 7 Tage", $message, "From: GA-Team <*****@*****.**>");
 }
Exemplo n.º 5
0
     $schiff->x--;
 }
 if ($wert == 1 && $schiff->y > 1) {
     $schiff->energie--;
     $schiff->y--;
 }
 if ($wert == 2 && $schiff->x < 100) {
     $schiff->energie--;
     $schiff->x++;
 }
 if ($wert == 3 && $schiff->y < 100) {
     $schiff->energie--;
     $schiff->y++;
 }
 echo $schiff->x, '|', $schiff->y;
 $schiff->setData();
 $abfrage2 = mysql_query("SELECT * FROM schiffe WHERE x='{$schiff->x}' AND y='{$schiff->y}' AND typ!='s'");
 while ($s2 = mysql_fetch_array($abfrage2)) {
     echo '---->', $s2["typ"], ' ', id2name($s2["besitzer"]);
     if ($s2["typ"] == 'm') {
         $empf = $s2["besitzer"];
         $datum = date("Y-m-d H:i:s");
         $check3 = false;
         $npclog = mysql_query("SELECT * FROM npclog WHERE besitzer='{$empf}'");
         while ($npc = mysql_fetch_array($npclog)) {
             $check3 = true;
         }
         if (!$check3) {
             $betreff = 'Besuch bei ' . $schiff->x . '|' . $schiff->y;
             $inhalt = "Spezies {$empf} \n\n im Gitter entdeckt. Scanne....  Keine Bedrohung f&uuml;r das Kollektiv. Bewege zu Gitte 3423-alpha.";
             mysql_query("INSERT INTO mail (absender,empfaenger,betreff,inhalt,datum,neu) VALUES ('4','{$empf}','{$betreff}','{$inhalt}','{$datum}','1')");