コード例 #1
0
ファイル: ClientTroll.php プロジェクト: alliaces/Zappy
function boucle()
{
    global $play;
    while (42) {
        $out = $play->command->inventaire();
        if (count($out) > 1) {
            if ((int) $out[0][1] >= 20) {
                if ($play->lvl > 1) {
                    trollMode();
                } else {
                    if ($play->checkRessources($out) == True) {
                        $play->toutPrendre();
                        $play->poseNecessaireIncantation();
                        $play->command->incantation();
                    } else {
                        $play->toutPrendre();
                        $play->avanceRandom();
                    }
                }
            } else {
                survivor();
            }
        }
    }
}
コード例 #2
0
ファイル: Client.php プロジェクト: alliaces/Zappy
function boucle()
{
    global $res;
    global $play;
    global $levelFood;
    while (42) {
        $out = $play->command->inventaire();
        if (count($out) > 1) {
            if ((int) $out[0][1] >= 20 && $play->lvl < 8) {
                if ($play->checkSlotTeam() == True) {
                    continue;
                }
                if ($play->receive->broadcast) {
                    $play->goToElevation();
                } else {
                    if ($play->checkRessources($out)) {
                        $play->elevation();
                    } else {
                        print "";
                        $play->PrendreSeulNecessaire();
                        $play->PoseNonNecessaire();
                        $play->avanceRandomWithCheck();
                        print "";
                    }
                }
            } else {
                survivor();
                entreNiveau($nourriture);
            }
        }
    }
}