Register for your free account! | Forgot your password?

Go Back   elitepvpers > Other Online Games > Browsergames
You last visited: Today at 17:47

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[DL] Hero Zero Serverfiles (flash_129) [works with ruffle.rs and flash]

Discussion on [DL] Hero Zero Serverfiles (flash_129) [works with ruffle.rs and flash] within the Browsergames forum part of the Other Online Games category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jun 2018
Posts: 20
Received Thanks: 5
[DL] Hero Zero Serverfiles (flash_129) [works with ruffle.rs and flash]

Hey, at one time ruffle.rs is able to run the client of the game Hero Zero in one of the older versions that I happen to have on disk, it is of no use to me so I am uploading here the server files with added ruffle.rs

Download:
HTML Code:
https://hzprivate.vip/hz129_update3.zip
Demo:
HTML Code:
https://hzprivate.vip/
Manual installation:
HTML Code:
1. open the server/config.php file and change the following
a)
'hostname'=> 'localhost', (your base host)
'username'=> 'root', (your base user)
'password'=> '', (your database password)
'database'=> 'test', (your database name)
'charset'=> 'utf8', (DB character encoding, best leave as is)

b)
'server_id'=> 'S1', (here's the text in parentheses in the server name in the game menu if you like)
'server_name'=> 'ZeroGame', (for your name or leave as is)
'server_domain'=> 'localhost', (here for your host or leave as is localhost)
'title'=> 'ZeroGame', (on your name or leave as is)
'mail'=> 'none'
Auto-installer (Experimental - recommend to manual install):
HTML Code:
<?php
set_time_limit(300);
ini_set('memory_limit', '-1');


$error = '';
$success = '';

if(file_exists('lock')) {
    die('you can use setup file one time');
}

if (isset($_POST['submit'])) {
    if (!($pdo = checkMySQLConnection($_POST['hostname'], $_POST['username'], $_POST['password'], $_POST['database']))) {
        $error = 'Failed to connect to the MySQL database. Please check your credentials.';
    } else {
        $downloadResult = downloadZIP();
        if (!$downloadResult['status']) {
            $error = $downloadResult['message'];
        } else {
            $extractResult = extractZIP();
            if (!$extractResult['status']) {
                $error = $extractResult['message'];
            } else {
                $x = importDatabase($pdo);
                if(!$x) {
                    $error = 'Can\'t upload SQL file to DB';
                } else {
                    editConfigFile($_POST['hostname'], $_POST['username'], $_POST['password'], $_POST['database'], $_POST['defaultLocale'], $_POST['serverName'], $_POST['domain']);
                    
                    $success = 'Installation completed successfully! (do not remove lock file!)';
                    file_put_contents('lock', 'do not remove it!');
                }
            }
        }
    }
}

function checkMySQLConnection($hostname, $username, $password, $database) {
    try {
        $pdo = new PDO("mysql:host=$hostname;dbname=$database;charset=utf8", $username, $password);
        $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        return $pdo;
    } catch (PDOException $e) {
        return false;
    }
}

function downloadZIP() {
    $remoteFile = 'https://hzprivate.vip/hz129_update3.zip';
    $localFile = 'hz129_update3.zip';
    $bufferSize = 4096;

    try {
        $input = fopen($remoteFile, 'rb');
        if ($input === false) {
            throw new Exception('Failed to open remote file for reading.');
        }

        $output = fopen($localFile, 'wb');
        if ($output === false) {
            fclose($input);
            throw new Exception('Failed to open local file for writing.');
        }

        while (!feof($input)) {
            $chunk = fread($input, $bufferSize);
            fwrite($output, $chunk);
        }

        fclose($input);
        fclose($output);

        return ['status' => true, 'message' => 'File downloaded successfully'];

    } catch (Exception $e) {
        return ['status' => false, 'message' => 'An error occurred: ' . $e->getMessage()];
    }
}

function extractZIP() {
    try {
        $zip = new ZipArchive;
        $res = $zip->open('hz129_update3.zip');
        
        if ($res === TRUE) {
            $zip->extractTo(dirname(__FILE__) . '/');
            $zip->close();
            return ['status' => true, 'message' => 'Files extracted successfully'];
        } else {
            throw new Exception('Failed to extract ZIP file');
        }

    } catch (Exception $e) {
        return ['status' => false, 'message' => 'An error occurred: ' . $e->getMessage()];
    }
}

function editConfigFile($hostname, $username, $password, $database, $defaultLocale, $serverName, $domain) {
    define('IN_ENGINE', true);
    $x = include_once('server/config.php');

    $x['database']['hostname'] = $hostname;
    $x['database']['username'] = $username;
    $x['database']['password'] = $password;
    $x['database']['database'] = $database;
    $x['site']['default_locale'] = $defaultLocale;
    $x['site']['server_domain'] = $domain;
    $x['site']['title'] = $serverName;
    $x['site']['server_name'] = $serverName;

    $jsonString = json_encode($x, JSON_PRETTY_PRINT);
    $jsonString = str_replace(['{', '}', '":', '\/'], ['[', ']', '"=>', '/'], $jsonString);
    
    $config = "<?php".PHP_EOL;
    $config .= "if(!defined('IN_ENGINE')) exit(http_response_code(404));".PHP_EOL;
    $config .= "return ".$jsonString.PHP_EOL;
    $config .= "?>";
    
    file_put_contents('server/config.php', $config);
}

function importDatabase($pdo) {
        $result = $pdo->query("SHOW TABLES");
        $tables = $result->fetchAll(PDO::FETCH_COLUMN);
        
        foreach ($tables as $table) {
            $pdo->exec("DROP TABLE IF EXISTS `$table`");
        }
        
        $sql = file_get_contents('DATABASE.sql');
        $pdo->exec($sql);

        return true;
}
?>

<!DOCTYPE html>
<html>
<head>
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
</head>
<style>
    body {
        font-family: Arial, sans-serif;
        margin: 50px;
    }
    input[type="text"], input[type="password"], select {
        padding: 10px;
        width: 100%;
        margin-bottom: 10px;
        border: 1px solid #ddd;
    }
    input[type="submit"] {
        padding: 10px 15px;
        background-color: #007BFF;
        border: none;
        color: white;
        cursor: pointer;
    }
    input[type="submit"]:hover {
        background-color: #0056b3;
    }
    .message {
        padding: 10px;
        border: 1px solid #ddd;
        margin-bottom: 20px;
    }
    .error {
        background-color: #f8d7da;
        border-color: #f5c6cb;
        color: #721c24;
    }
    .success {
        background-color: #d4edda;
        border-color: #c3e6cb;
        color: #155724;
    }
</style>

<div class="container mt-5">
    <?php
    if (!empty($error)) {
        echo '<div class="alert alert-danger">' . $error . '</div>';
    }
    if (!empty($success)) {
        echo '<div class="alert alert-success">' . $success . '</div>';
    }
    ?>
    <form method="POST" action="">
        <div class="form-group">
            <label for="hostname">Hostname:</label>
            <input type="text" class="form-control" id="hostname" name="hostname" required autocomplete="off">
        </div>
        <div class="form-group">
            <label for="username">Username:</label>
            <input type="text" class="form-control" id="username" name="username" required autocomplete="off">
        </div>
        <div class="form-group">
            <label for="password">Password:</label>
            <input type="password" class="form-control" id="password" name="password" autocomplete="off">
        </div>
        <div class="form-group">
            <label for="database">Database:</label>
            <input type="text" class="form-control" id="database" name="database" required autocomplete="off">
        </div>
        <div class="form-group">
            <label for="serverName">Server Name:</label>
            <input type="text" class="form-control" id="serverName" name="serverName" required autocomplete="off">
        </div>
        <div class="form-group">
            <label for="domain">Domain:</label>
            <input type="text" class="form-control" id="domain" name="domain" value="<?=$_SERVER['HTTP_HOST']?>" required autocomplete="off">
        </div>
        <div class="form-group">
            <label for="defaultLocale">Default game language:</label>
            <select class="form-control" id="defaultLocale" name="defaultLocale" required>
                <option disabled selected>Choose one</option>
                <option value="en_GB">English</option>
                <option value="cs_CZ">Čeština</option>
                <option value="de_DE">Deutsch</option>
                <option value="el_GR">Ελληνικά</option>
                <option value="es_ES">Español</option>
                <option value="fr_FR">Français</option>
                <option value="it_IT">Italiano</option>
                <option value="lt_LT">Lietuvių</option>
                <option value="pl_PL">Polski</option>
                <option value="pt_BR">Português (Brasil)</option>
                <option value="ro_RO">Română</option>
                <option value="ru_RU">Русский</option>
                <option value="tr_TR">Türkçe</option>
            </select>
        </div>
        <div class="form-group">
            <input type="submit" class="btn btn-primary" name="submit" value="Install">
        </div>
    </form>
</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
[Updates 1.01]
HTML Code:
Hideouts working actions:
- Unlocking a hideout (unlockHideout)
- Building rooms (buildHideoutRoom, checkHideoutRoomActivityFinished)
- Upgrading rooms (upgradeHideoutRoom, checkHideoutRoomActivityFinished)
- Storage rooms (storeHideoutRoom, checkHideoutRoomActivityFinished)
- Placement rooms (placeHideoutRoom, checkHideoutRoomActivityFinished)
- Unlocking construction sites (unlockHideoutRoomSlot, instantFinishHideoutSlotUnlock, checkUnlockHideoutRoomSlotFinished)
- Calculating/collecting gold, zeronite and glue - without exceeding $player->hideout->max_resource_stone|glue limits, with harvest countdown at zeronite mine and super glue factory (checkHideoutRoomActivityFinished)
- Attack-o-bot, Defense-o-bot productions (startHideoutRoomProduction, checkHideoutRoomActivityFinished)
- Skipping actions for donuts (instantFinishHideoutRoomActivity)
- Upgrading defense post
Additional info:
- Special missions are unlocked with photos as on official servers
[Updates 1.02]
HTML Code:
Finished categories of heroic deeds: [202 / 221] 91.4%
Missing [22]: missles_fired, account_confirmed , first_guild_artifact_won<br>guild_artifacts_won, first_worldboss_attack_completed, worldboss_attacks_completed<br>first_worldboss_event_won, first_guild_dungeon_fought, guild_dungeons_fought<br>guild_dungeons_won, tournament_attended, tournament_top10_reached, tournament_top3_reached<br>first_surprise_box_opened, surprise_box_opened, herobook_first_objetive_finished<br>herobook_objectives_finished, first_quest_resource_request_accepted, quest_resource_request_accepted<br>hideout_hideout_points_reached, hideout_units_produced, hideout_build_generator
[Updates 1.03]
HTML Code:
Added Sewing machine and Collections
lujekk is offline  
Reply

Tags
hero zero, herozero, herozerogame.com, hz


Similar Threads Similar Threads
[DL/Tutorial] HeroZero private server 2023 (ruffle.rs)
11/25/2023 - Browsergames - 1 Replies
X
N126-FLASH SALE TH15-8 PETS-MAX 4 HERO-23 SKINS HERO-NICE TROOPS-GOOD DEFENSE-XP 235
02/02/2023 - Clash of Clans Trading - 1 Replies
Please check actual screenshots: FULL images - OPEN LINK : https://imgur.com/a/krgfLsi ------ Account information ------- Change Name : Free gems Android: Ready
[Release] Silk Ruffle Scroll [Best Performance]
07/29/2017 - SRO PServer Guides & Releases - 4 Replies
https://i.epvpimg.com/Ybguf.png The Procedure was taken from Reality SRO DB and re-coded by me The Procedure USE GO /****** Object: StoredProcedure . Script Date: 7/29/2017 7:36:03 AM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON
*FLASH FLASH FLASH* 66er mk auf s9
04/17/2009 - Metin2 Trading - 7 Replies
hey wie die ueberschrift schon sagt ich vk einen lvl 66er mk auf s9 was ich suche ? sachen auf s9 oder sura ab lvl 50 screens bekommt ihr ueber icq oder msn



All times are GMT +1. The time now is 17:47.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.