Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Loader)
- *
- * @ Version : 2.0.0.3
- * @ Author : DeZender
- * @ Release on : 06.05.2013
- * @ Official site : http://DeZender.Net
- *
- */
- class Game {
- private $features = null;
- public function __construct() {
- if (isset($_SESSION["demo"]["features"]))
- {
- $this->features = unserialize($_SESSION["demo"]["features"]);
- }
- return;
- }
- public function __destruct() {
- $_SESSION["demo"]["features"] = serialize($this->features);
- return;
- }
- public function get_casino_configuration() {
- return array("GAMES_URL" => "/games/", "CURRENCY_NAME" => "RUB", "SECKEY" => "icTopSecret", "CURRENCY_PRECISION" => "2");
- }
- public function onLoadComplete() {
- $_SESSION["demo"]["balance"] = 1000;
- $_SESSION["demo"]["bank"] = 1000;
- $_SESSION["demo"]["KEY_ACCUMULATOR"] = 0;
- $_SESSION["demo"]["bet_per_line"] = 1;
- $_SESSION["demo"]["lines"] = $this->maxLines;
- $_SESSION["demo"]["denomination"] = 1;
- $suits = array("SPADES", "CLUBS", "DIAMONDS", "HEARTS", "CLUBS");
- shuffle($suits);
- $_SESSION["demo"]["suits"] = $suits;
- $dice = array("ONE", "TWO", "THREE", "FOUR", "FIVE", "SIX");
- shuffle($dice);
- $_SESSION["demo"]["dice"] = $dice;
- return;
- }
- public function get_balance() {
- return new BigDecimalHolder($_SESSION["demo"]["balance"]);
- }
- public function checkExternalBalance() {
- return new BigDecimalHolder($_SESSION["demo"]["balance"]);
- }
- public function getSpin($iMinWin, $iMaxWin, $bonus) {
- return;
- }
- public function generateDynamicHelpInfo() {
- return;
- }
- public function get_dynamic_help_info($param) {
- list($_SESSION["demo"]["bet_per_line"]) = $param->params;
- list(, $_SESSION["demo"]["lines"]) = $param->params;
- $_SESSION["demo"]["denomination"] = floatval($param["params"][2]->val);
- return $this->generateDynamicHelpInfo();
- }
- public function generateGameHistoryItem() {
- return new GameHistoryItem(array(new ArrayCollection(array($this->features)), new SlotBettingParameters(array($_SESSION["demo"]["bet_per_line"], $_SESSION["demo"]["lines"], new BigDecimalHolder($_SESSION["demo"]["denomination"]))), new GameStatus($_SESSION["demo"]["game_status"]), new GameInitState(null)));
- }
- public function get_last_game() {
- $this->features[] = $this->start_feature("SLOT", array(0, 0, false));
- $this->features[] = $this->start_feature("SLOT", array(0, 0, false));
- $this->features[] = $this->start_feature("SLOT", array(0, 0, false));
- $this->step_feature();
- $this->end_game();
- return $this->generateGameHistoryItem();
- }
- public function start_game($param) {
- list($_SESSION["demo"]["bet_per_line"]) = $param->params;
- list(, $_SESSION["demo"]["lines"]) = $param->params;
- $_SESSION["demo"]["denomination"] = floatval($param["params"][2]->val);
- $_SESSION["demo"]["balance"] -= $_SESSION["demo"]["lines"] * $_SESSION["demo"]["bet_per_line"] * $_SESSION["demo"]["denomination"];
- require_once "dispatchers/mat/" . $_SESSION["demo"]["game"] . "_mat.php";
- $this->start_feature("SLOT", array($iMinWin, $iMaxWin, $bonus));
- $this->step_feature($bonus);
- return new BalanceWrapper(array($this->generateGameHistoryItem(), new BigDecimalHolder($_SESSION["demo"]["balance"])));
- }
- public function end_game() {
- $_SESSION["demo"]["game_status"] = "FINISHED";
- return new BigDecimalHolder($_SESSION["demo"]["balance"]);
- }
- public function start_feature($feature, $params = null) {
- $_SESSION["demo"]["game_status"] = "IN_PROGRESS";
- switch ($feature)
- {
- case "SLOT":
- {
- $spin = $this->getSpin($params[0], $params[1], $params[2]);
- foreach ($spin["wins_now"] as $line => $win)
- {
- foreach ($win["positions"] as $pos => $symbolInLine)
- {
- $spin["wins_now"][$line]["positions"][$pos] = new Position2D(array(floor(($symbolInLine - 1) / 3), ($symbolInLine - 1) % 3));
- continue;
- }
- continue;
- }
- $spinResultItems = array();
- $winAll = 0;
- $numBonuses = 0;
- $this->features = array();
- foreach ($spin["wins_now"] as $line => $win)
- {
- $winAll += $win["win"] * $win["multiplier"] * $_SESSION["demo"]["bet_per_line"];
- $spinResultItems[] = new SpinResultItem(array(new ArrayCollection(array($win["positions"])), new ArrayCollection(array($win["symbols"])), new ArrayCollection(array($win["jokers"])), new ArrayCollection(array($win["symbols"])), $win["longanim"], $win["muz"], $win["linii"], $win["win"] * $_SESSION["demo"]["bet_per_line"], $win["multiplier"], new FeatureID($win["feature"]), $win["feature"] == "NO_BONUS" ? 0 : (++$numBonuses)));
- if (!($win["feature"] != "NO_BONUS" && $win["feature"] != "EXPANDING_JOKER" && $win["feature"] != "KEY_ACCUMULATOR"))
- {
- continue;
- }
- $this->start_feature($win["feature"], 1);
- $this->features[count($this->features) - 1]->status->val = "NOT_STARTED";
- continue;
- }
- array_unshift($this->features, new FeatureState(array(new FeatureID("SLOT"), new SlotInitParameters(), new SlotCurrentState(null), new BigDecimalHolder($winAll), new FeatureStatus("IN_PROGRESS"), new FeatureStep(array(new SlotAction(), new SlotReaction(new SlotSpinResult(array($spin["choosen_symbols"], new ArrayCollection(array($spinResultItems)), array(false, false, false, false, false)))))), 0)));
- return $this->features[0];
- }
- case "GAMBLE":
- {
- if (!$params)
- {
- foreach ($this->features as $key => $feature)
- {
- if (!($feature->id->val == "GAMBLE" && $this->features[$key]->status->val == "NOT_STARTED"))
- {
- continue;
- }
- $this->features[$key]->status->val = "IN_PROGRESS";
- return $this->features[$key];
- continue;
- }
- }
- if (((($_SESSION["demo"]["game"] == "AztecGold") && $_SESSION["demo"]["game"] == "Champagne") && $_SESSION["demo"]["game"] == "SlotOPol") && $_SESSION["demo"]["game"] == "SlotOPolDlx")
- {
- require_once "bonuses/gamble_megajack.php";
- }
- else
- {
- if ((((((((((($_SESSION["demo"]["game"] == "FruitCocktail2") && $_SESSION["demo"]["game"] == "FruitCocktail") && $_SESSION["demo"]["game"] == "Garage") && $_SESSION["demo"]["game"] == "Pirate2") && $_SESSION["demo"]["game"] == "Resident") && $_SESSION["demo"]["game"] == "LuckyHaunter") && $_SESSION["demo"]["game"] == "RockClimber") && $_SESSION["demo"]["game"] == "CrazyMonkey") && $_SESSION["demo"]["game"] == "Island2") && $_SESSION["demo"]["game"] == "Keks") && $_SESSION["demo"]["game"] == "SweetLife2")
- {
- require_once "bonuses/gamble_igrosoft.php";
- }
- else
- {
- if ($_SESSION["demo"]["game"] == "Pirate")
- {
- require_once "bonuses/gamble_Pirate.php";
- }
- else
- {
- require_once "bonuses/gamble.php";
- }
- }
- }
- $this->features[] = startFeature($this->features[0], null);
- return $this->features[count($this->features) - 1];
- }
- case "COCKTAIL_WIN":
- {
- if (!$params)
- {
- foreach ($this->features as $key => $feature)
- {
- if (!($feature->id->val == "COCKTAIL_WIN" && $this->features[$key]->status->val == "NOT_STARTED"))
- {
- continue;
- }
- $this->features[$key]->status->val = "IN_PROGRESS";
- return $this->features[$key];
- continue;
- }
- }
- require_once "bonuses/igrosoft/sequetial_cocktail.php";
- $this->features[] = startFeature();
- return $this->features[count($this->features) - 1];
- }
- case "BOXES_WIN":
- {
- if (!$params)
- {
- foreach ($this->features as $key => $feature)
- {
- if (!($feature->id->val == "BOXES_WIN" && $this->features[$key]->status->val == "NOT_STARTED"))
- {
- continue;
- }
- $this->features[$key]->status->val = "IN_PROGRESS";
- return $this->features[$key];
- continue;
- }
- }
- require_once "bonuses/igrosoft/sequetial_boxes.php";
- $this->features[] = startFeature();
- return $this->features[count($this->features) - 1];
- }
- case "KEYS_WIN":
- {
- if (!$params)
- {
- foreach ($this->features as $key => $feature)
- {
- if (!($feature->id->val == "KEYS_WIN" && $this->features[$key]->status->val == "NOT_STARTED"))
- {
- continue;
- }
- $this->features[$key]->status->val = "IN_PROGRESS";
- return $this->features[$key];
- continue;
- }
- }
- require_once "bonuses/igrosoft/sequetial_keys.php";
- $this->features[] = startFeature();
- return $this->features[count($this->features) - 1];
- }
- case "BARRELS_WIN":
- {
- if (!$params)
- {
- foreach ($this->features as $key => $feature)
- {
- if (!($feature->id->val == "BARRELS_WIN" && $this->features[$key]->status->val == "NOT_STARTED"))
- {
- continue;
- }
- $this->features[$key]->status->val = "IN_PROGRESS";
- return $this->features[$key];
- continue;
- }
- }
- require_once "bonuses/igrosoft/sequetial_barrels.php";
- $this->features[] = startFeature();
- return $this->features[count($this->features) - 1];
- }
- case "PICKME":
- {
- if (!$params)
- {
- foreach ($this->features as $key => $feature)
- {
- if (!($feature->id->val == "PICKME" && $this->features[$key]->status->val == "NOT_STARTED"))
- {
- continue;
- }
- $this->features[$key]->status->val = "IN_PROGRESS";
- return $this->features[$key];
- continue;
- }
- }
- require_once "bonuses/igrosoft/sequetial_pickme.php";
- $this->features[] = startFeature();
- return $this->features[count($this->features) - 1];
- }
- case "SEQUENTIAL_WINS":
- {
- if (!$params)
- {
- foreach ($this->features as $key => $feature)
- {
- if (!($feature->id->val == "SEQUENTIAL_WINS" && $this->features[$key]->status->val == "NOT_STARTED"))
- {
- continue;
- }
- $this->features[$key]->status->val = "IN_PROGRESS";
- return $this->features[$key];
- continue;
- }
- }
- require_once "bonuses/igrosoft/sequetial_" . $_SESSION["demo"]["game"] . ".php";
- $this->features[] = startFeature();
- return $this->features[count($this->features) - 1];
- }
- case "CHAMPAGNE_WIN":
- {
- if (!$params)
- {
- foreach ($this->features as $key => $feature)
- {
- if (!($feature->id->val == "CHAMPAGNE_WIN" && $this->features[$key]->status->val == "NOT_STARTED"))
- {
- continue;
- }
- $this->features[$key]->status->val = "IN_PROGRESS";
- return $this->features[$key];
- continue;
- }
- }
- require_once "bonuses/champagne.php";
- $this->features[] = startFeature();
- return $this->features[count($this->features) - 1];
- }
- .........................................................................
- .................................
- ..............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement