Advertisement
Guest User

Untitled

a guest
Jun 16th, 2014
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.78 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Loader)
  6. *
  7. * @ Version : 2.0.0.3
  8. * @ Author : DeZender
  9. * @ Release on : 06.05.2013
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. class Game {
  15.  
  16.  
  17. private $features = null;
  18. public function __construct() {
  19.  
  20. if (isset($_SESSION["demo"]["features"]))
  21. {
  22. $this->features = unserialize($_SESSION["demo"]["features"]);
  23. }
  24. return;
  25. }
  26.  
  27. public function __destruct() {
  28.  
  29. $_SESSION["demo"]["features"] = serialize($this->features);
  30. return;
  31. }
  32.  
  33. public function get_casino_configuration() {
  34.  
  35. return array("GAMES_URL" => "/games/", "CURRENCY_NAME" => "RUB", "SECKEY" => "icTopSecret", "CURRENCY_PRECISION" => "2");
  36. }
  37.  
  38. public function onLoadComplete() {
  39.  
  40. $_SESSION["demo"]["balance"] = 1000;
  41. $_SESSION["demo"]["bank"] = 1000;
  42. $_SESSION["demo"]["KEY_ACCUMULATOR"] = 0;
  43. $_SESSION["demo"]["bet_per_line"] = 1;
  44. $_SESSION["demo"]["lines"] = $this->maxLines;
  45. $_SESSION["demo"]["denomination"] = 1;
  46. $suits = array("SPADES", "CLUBS", "DIAMONDS", "HEARTS", "CLUBS");
  47. shuffle($suits);
  48. $_SESSION["demo"]["suits"] = $suits;
  49. $dice = array("ONE", "TWO", "THREE", "FOUR", "FIVE", "SIX");
  50. shuffle($dice);
  51. $_SESSION["demo"]["dice"] = $dice;
  52. return;
  53. }
  54.  
  55. public function get_balance() {
  56.  
  57. return new BigDecimalHolder($_SESSION["demo"]["balance"]);
  58. }
  59.  
  60. public function checkExternalBalance() {
  61.  
  62. return new BigDecimalHolder($_SESSION["demo"]["balance"]);
  63. }
  64.  
  65. public function getSpin($iMinWin, $iMaxWin, $bonus) {
  66.  
  67. return;
  68. }
  69.  
  70. public function generateDynamicHelpInfo() {
  71.  
  72. return;
  73. }
  74.  
  75. public function get_dynamic_help_info($param) {
  76.  
  77. list($_SESSION["demo"]["bet_per_line"]) = $param->params;
  78. list(, $_SESSION["demo"]["lines"]) = $param->params;
  79. $_SESSION["demo"]["denomination"] = floatval($param["params"][2]->val);
  80. return $this->generateDynamicHelpInfo();
  81. }
  82.  
  83. public function generateGameHistoryItem() {
  84.  
  85. 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)));
  86. }
  87.  
  88. public function get_last_game() {
  89.  
  90. $this->features[] = $this->start_feature("SLOT", array(0, 0, false));
  91. $this->features[] = $this->start_feature("SLOT", array(0, 0, false));
  92. $this->features[] = $this->start_feature("SLOT", array(0, 0, false));
  93. $this->step_feature();
  94. $this->end_game();
  95. return $this->generateGameHistoryItem();
  96. }
  97.  
  98. public function start_game($param) {
  99.  
  100. list($_SESSION["demo"]["bet_per_line"]) = $param->params;
  101. list(, $_SESSION["demo"]["lines"]) = $param->params;
  102. $_SESSION["demo"]["denomination"] = floatval($param["params"][2]->val);
  103. $_SESSION["demo"]["balance"] -= $_SESSION["demo"]["lines"] * $_SESSION["demo"]["bet_per_line"] * $_SESSION["demo"]["denomination"];
  104. require_once "dispatchers/mat/" . $_SESSION["demo"]["game"] . "_mat.php";
  105. $this->start_feature("SLOT", array($iMinWin, $iMaxWin, $bonus));
  106. $this->step_feature($bonus);
  107. return new BalanceWrapper(array($this->generateGameHistoryItem(), new BigDecimalHolder($_SESSION["demo"]["balance"])));
  108. }
  109.  
  110. public function end_game() {
  111.  
  112. $_SESSION["demo"]["game_status"] = "FINISHED";
  113. return new BigDecimalHolder($_SESSION["demo"]["balance"]);
  114. }
  115.  
  116. public function start_feature($feature, $params = null) {
  117.  
  118. $_SESSION["demo"]["game_status"] = "IN_PROGRESS";
  119. switch ($feature)
  120. {
  121. case "SLOT":
  122. {
  123. $spin = $this->getSpin($params[0], $params[1], $params[2]);
  124. foreach ($spin["wins_now"] as $line => $win)
  125. {
  126. foreach ($win["positions"] as $pos => $symbolInLine)
  127. {
  128. $spin["wins_now"][$line]["positions"][$pos] = new Position2D(array(floor(($symbolInLine - 1) / 3), ($symbolInLine - 1) % 3));
  129. continue;
  130. }
  131. continue;
  132. }
  133. $spinResultItems = array();
  134. $winAll = 0;
  135. $numBonuses = 0;
  136. $this->features = array();
  137. foreach ($spin["wins_now"] as $line => $win)
  138. {
  139. $winAll += $win["win"] * $win["multiplier"] * $_SESSION["demo"]["bet_per_line"];
  140. $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)));
  141. if (!($win["feature"] != "NO_BONUS" && $win["feature"] != "EXPANDING_JOKER" && $win["feature"] != "KEY_ACCUMULATOR"))
  142. {
  143. continue;
  144. }
  145. $this->start_feature($win["feature"], 1);
  146. $this->features[count($this->features) - 1]->status->val = "NOT_STARTED";
  147. continue;
  148. }
  149. 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)));
  150. return $this->features[0];
  151. }
  152. case "GAMBLE":
  153. {
  154. if (!$params)
  155. {
  156. foreach ($this->features as $key => $feature)
  157. {
  158. if (!($feature->id->val == "GAMBLE" && $this->features[$key]->status->val == "NOT_STARTED"))
  159. {
  160. continue;
  161. }
  162. $this->features[$key]->status->val = "IN_PROGRESS";
  163. return $this->features[$key];
  164. continue;
  165. }
  166. }
  167. if (((($_SESSION["demo"]["game"] == "AztecGold") && $_SESSION["demo"]["game"] == "Champagne") && $_SESSION["demo"]["game"] == "SlotOPol") && $_SESSION["demo"]["game"] == "SlotOPolDlx")
  168. {
  169. require_once "bonuses/gamble_megajack.php";
  170. }
  171. else
  172. {
  173. 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")
  174. {
  175. require_once "bonuses/gamble_igrosoft.php";
  176. }
  177. else
  178. {
  179. if ($_SESSION["demo"]["game"] == "Pirate")
  180. {
  181. require_once "bonuses/gamble_Pirate.php";
  182. }
  183. else
  184. {
  185. require_once "bonuses/gamble.php";
  186. }
  187. }
  188. }
  189. $this->features[] = startFeature($this->features[0], null);
  190. return $this->features[count($this->features) - 1];
  191. }
  192. case "COCKTAIL_WIN":
  193. {
  194. if (!$params)
  195. {
  196. foreach ($this->features as $key => $feature)
  197. {
  198. if (!($feature->id->val == "COCKTAIL_WIN" && $this->features[$key]->status->val == "NOT_STARTED"))
  199. {
  200. continue;
  201. }
  202. $this->features[$key]->status->val = "IN_PROGRESS";
  203. return $this->features[$key];
  204. continue;
  205. }
  206. }
  207. require_once "bonuses/igrosoft/sequetial_cocktail.php";
  208. $this->features[] = startFeature();
  209. return $this->features[count($this->features) - 1];
  210. }
  211. case "BOXES_WIN":
  212. {
  213. if (!$params)
  214. {
  215. foreach ($this->features as $key => $feature)
  216. {
  217. if (!($feature->id->val == "BOXES_WIN" && $this->features[$key]->status->val == "NOT_STARTED"))
  218. {
  219. continue;
  220. }
  221. $this->features[$key]->status->val = "IN_PROGRESS";
  222. return $this->features[$key];
  223. continue;
  224. }
  225. }
  226. require_once "bonuses/igrosoft/sequetial_boxes.php";
  227. $this->features[] = startFeature();
  228. return $this->features[count($this->features) - 1];
  229. }
  230. case "KEYS_WIN":
  231. {
  232. if (!$params)
  233. {
  234. foreach ($this->features as $key => $feature)
  235. {
  236. if (!($feature->id->val == "KEYS_WIN" && $this->features[$key]->status->val == "NOT_STARTED"))
  237. {
  238. continue;
  239. }
  240. $this->features[$key]->status->val = "IN_PROGRESS";
  241. return $this->features[$key];
  242. continue;
  243. }
  244. }
  245. require_once "bonuses/igrosoft/sequetial_keys.php";
  246. $this->features[] = startFeature();
  247. return $this->features[count($this->features) - 1];
  248. }
  249. case "BARRELS_WIN":
  250. {
  251. if (!$params)
  252. {
  253. foreach ($this->features as $key => $feature)
  254. {
  255. if (!($feature->id->val == "BARRELS_WIN" && $this->features[$key]->status->val == "NOT_STARTED"))
  256. {
  257. continue;
  258. }
  259. $this->features[$key]->status->val = "IN_PROGRESS";
  260. return $this->features[$key];
  261. continue;
  262. }
  263. }
  264. require_once "bonuses/igrosoft/sequetial_barrels.php";
  265. $this->features[] = startFeature();
  266. return $this->features[count($this->features) - 1];
  267. }
  268. case "PICKME":
  269. {
  270. if (!$params)
  271. {
  272. foreach ($this->features as $key => $feature)
  273. {
  274. if (!($feature->id->val == "PICKME" && $this->features[$key]->status->val == "NOT_STARTED"))
  275. {
  276. continue;
  277. }
  278. $this->features[$key]->status->val = "IN_PROGRESS";
  279. return $this->features[$key];
  280. continue;
  281. }
  282. }
  283. require_once "bonuses/igrosoft/sequetial_pickme.php";
  284. $this->features[] = startFeature();
  285. return $this->features[count($this->features) - 1];
  286. }
  287. case "SEQUENTIAL_WINS":
  288. {
  289. if (!$params)
  290. {
  291. foreach ($this->features as $key => $feature)
  292. {
  293. if (!($feature->id->val == "SEQUENTIAL_WINS" && $this->features[$key]->status->val == "NOT_STARTED"))
  294. {
  295. continue;
  296. }
  297. $this->features[$key]->status->val = "IN_PROGRESS";
  298. return $this->features[$key];
  299. continue;
  300. }
  301. }
  302. require_once "bonuses/igrosoft/sequetial_" . $_SESSION["demo"]["game"] . ".php";
  303. $this->features[] = startFeature();
  304. return $this->features[count($this->features) - 1];
  305. }
  306. case "CHAMPAGNE_WIN":
  307. {
  308. if (!$params)
  309. {
  310. foreach ($this->features as $key => $feature)
  311. {
  312. if (!($feature->id->val == "CHAMPAGNE_WIN" && $this->features[$key]->status->val == "NOT_STARTED"))
  313. {
  314. continue;
  315. }
  316. $this->features[$key]->status->val = "IN_PROGRESS";
  317. return $this->features[$key];
  318. continue;
  319. }
  320. }
  321. require_once "bonuses/champagne.php";
  322. $this->features[] = startFeature();
  323. return $this->features[count($this->features) - 1];
  324. }
  325. .........................................................................
  326. .................................
  327. ..............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement