nibbles.m 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828
  1. /*---------------------------------------------------
  2. -----------------------------------------------------
  3. Filename: nibbles.m
  4. Version: 1.0
  5. Type: maki
  6. Date: 23. Okt. 2006 - 21:11
  7. Author: Martin Poehlmann aka Deimos
  8. E-Mail: [email protected]
  9. Internet: www.skinconsortium.com
  10. www.martin.deimos.de.vu
  11. -----------------------------------------------------
  12. ---------------------------------------------------*/
  13. #define GAME_SPEED 30
  14. #define MAX_H 59
  15. #define MAX_W 72
  16. #define MAX_LLAMAS 9
  17. function init_nibbles();
  18. Function setLlama();
  19. Function gotLlama();
  20. Function showInfo(string s);
  21. Function showInfo2();
  22. Function hideInfo2();
  23. Function startGame(int level);
  24. Function setPos(layer l, int x, int y);
  25. Function checkforWalls(layer l);
  26. Function checkforLlama(layer l);
  27. Function checkforSammy(layer l);
  28. Function sammyDies ();
  29. Function addSammy();
  30. Function syncSammy();
  31. Function Layer createSammy(int num, int x, int y);
  32. Global group nibbles;
  33. Global Layer bg, llama, info, info2;
  34. Global Text infotxt, infotxt2a, infotxt2b, infotxt2c, infotxt2d;
  35. Global Layer sammy0;
  36. Global String gamestate = "startup";
  37. Global String direction;
  38. Global Boolean gotkey = 0;
  39. Global Timer move;
  40. Global Boolean paused;
  41. Global map wall;
  42. Global int s_score, s_lives, s_level, currentllama;
  43. Global Text t_score, t_lives, t_level;
  44. Global int n_sammy, expn_sammy;
  45. Global List sammy, sammy_x, sammy_y;
  46. Global Group sammys;
  47. Global int cheat, nocheat;
  48. Global int cheat2, nocheat2;
  49. Global int cheat3, nocheat3;
  50. Global int evercheat;
  51. Global Text c1, c2, c3;
  52. init_nibbles()
  53. {
  54. sammy = new List;
  55. sammy_x = new List;
  56. sammy_y = new List;
  57. llama = nibbles.getObject("llama");
  58. sammy0 = nibbles.getObject("sammy0");
  59. info = nibbles.getObject("info");
  60. infotxt = nibbles.getObject("infotxt");
  61. sammys = nibbles.getObject("sammys");
  62. bg = nibbles.getObject("bg");
  63. info2 = nibbles.getObject("info2");
  64. infotxt2a = nibbles.getObject("infotxt2a");
  65. infotxt2b = nibbles.getObject("infotxt2b");
  66. infotxt2c = nibbles.getObject("infotxt2c");
  67. infotxt2d = nibbles.getObject("infotxt2d");
  68. t_lives = nibbles.getObject("lives");
  69. t_score = nibbles.getObject("score");
  70. t_level = nibbles.getObject("level");
  71. c1 = nibbles.getObject("c1");
  72. c2 = nibbles.getObject("c2");
  73. c3 = nibbles.getObject("c3");
  74. gamestate = "startup";
  75. n_sammy = 0;
  76. expn_sammy = 0;
  77. s_level = 1;
  78. s_score = 0;
  79. s_lives = 5;
  80. cheat = 0;
  81. nocheat = 0;
  82. cheat2 = 0;
  83. nocheat2 = 0;
  84. cheat3 = 0;
  85. nocheat3 = 0;
  86. evercheat = 0;
  87. move = new Timer;
  88. move.setDelay(GAME_SPEED);
  89. }
  90. System.onKeyDown (String key)
  91. {
  92. if (nibbles.isVisible() && nibbles.isActive())
  93. {
  94. if (!gotkey)
  95. {
  96. if (strsearch(key, "up") != -1 && direction != "d" && direction != "u")
  97. {
  98. if (move.isRunning())
  99. {
  100. gotkey = 1;
  101. direction = "u";
  102. complete;
  103. return;
  104. }
  105. }
  106. else if (strsearch(key, "down") != -1 && direction != "u" && direction != "d")
  107. {
  108. if (move.isRunning())
  109. {
  110. gotkey = 1;
  111. direction = "d";
  112. complete;
  113. return;
  114. }
  115. }
  116. else if (strsearch(key, "left") != -1 && direction != "r" && direction != "l")
  117. {
  118. if (move.isRunning())
  119. {
  120. gotkey = 1;
  121. direction = "l";
  122. complete;
  123. return;
  124. }
  125. }
  126. else if (strsearch(key, "right") != -1 && direction != "l" && direction != "r")
  127. {
  128. if (move.isRunning())
  129. {
  130. gotkey = 1;
  131. direction = "r";
  132. complete;
  133. return;
  134. }
  135. }
  136. }
  137. /* Cheet on */
  138. if (key == "n" && cheat == 0 && cheat3 != 4 && nocheat3 != 4 && cheat3 != 1 && nocheat3 != 1)
  139. {
  140. cheat = 1;
  141. complete;
  142. return;
  143. }
  144. else if (key == "o" && cheat == 1)
  145. {
  146. cheat = 2;
  147. complete;
  148. return;
  149. }
  150. else if (key == "s" && cheat == 2)
  151. {
  152. cheat = 3;
  153. complete;
  154. return;
  155. }
  156. else if (key == "a" && cheat == 3)
  157. {
  158. cheat = 4;
  159. complete;
  160. return;
  161. }
  162. else if (key == "m" && cheat == 4 && cheat != 5)
  163. {
  164. cheat = 5;
  165. complete;
  166. return;
  167. }
  168. else if (key == "m" && cheat == 5 && cheat != 4)
  169. {
  170. cheat = 6;
  171. complete;
  172. return;
  173. }
  174. else if (key == "y" && cheat == 6)
  175. {
  176. c1.setText("NOSAMMY");
  177. cheat = 7;
  178. evercheat = 1;
  179. complete;
  180. return;
  181. }
  182. /* Cheet off */
  183. else if (key == "n" && cheat == 7 && cheat3 != 4 && nocheat3 != 4 && cheat3 != 1 && nocheat3 != 1)
  184. {
  185. nocheat = 1;
  186. complete;
  187. return;
  188. }
  189. else if (key == "o" && nocheat == 1)
  190. {
  191. nocheat = 2;
  192. complete;
  193. return;
  194. }
  195. else if (key == "s" && nocheat == 2)
  196. {
  197. nocheat = 3;
  198. complete;
  199. return;
  200. }
  201. else if (key == "a" && nocheat == 3)
  202. {
  203. nocheat = 4;
  204. complete;
  205. return;
  206. }
  207. else if (key == "m" && nocheat == 4 && nocheat != 5)
  208. {
  209. nocheat = 5;
  210. complete;
  211. return;
  212. }
  213. else if (key == "m" && nocheat == 5 && nocheat != 4)
  214. {
  215. nocheat = 6;
  216. complete;
  217. return;
  218. }
  219. else if (key == "y" && nocheat == 6 && nocheat3 != 7)
  220. {
  221. c1.setText("");
  222. cheat = 0;
  223. nocheat = 0;
  224. complete;
  225. return;
  226. }
  227. /* end cheat */
  228. /* Cheet2 on */
  229. else if (key == "f" && cheat2 == 0 && cheat3 != 2 && nocheat3 != 2)
  230. {
  231. cheat2 = 1;
  232. complete;
  233. return;
  234. }
  235. else if (key == "r" && cheat2 == 1)
  236. {
  237. cheat2 = 2;
  238. complete;
  239. return;
  240. }
  241. else if (key == "e" && cheat2 == 2 && cheat2 != 3)
  242. {
  243. cheat2 = 3;
  244. complete;
  245. return;
  246. }
  247. else if (key == "e" && cheat2 == 3 && cheat2 != 2)
  248. {
  249. cheat2 = 4;
  250. complete;
  251. return;
  252. }
  253. else if (key == "s" && cheat2 == 4)
  254. {
  255. cheat2 = 5;
  256. complete;
  257. return;
  258. }
  259. else if (key == "a" && cheat2 == 5)
  260. {
  261. cheat2 = 6;
  262. complete;
  263. return;
  264. }
  265. else if (key == "m" && cheat2 == 6)
  266. {
  267. c2.setText("FREESAM");
  268. cheat2 = 7;
  269. evercheat = 1;
  270. complete;
  271. return;
  272. }
  273. /* Cheet2 off */
  274. else if (key == "f" && cheat2 == 7 && cheat3 != 2 && nocheat3 != 2)
  275. {
  276. nocheat2 = 1;
  277. complete;
  278. return;
  279. }
  280. else if (key == "r" && nocheat2 == 1)
  281. {
  282. nocheat2 = 2;
  283. complete;
  284. return;
  285. }
  286. else if (key == "e" && nocheat2 == 2 && nocheat2 != 3)
  287. {
  288. nocheat2 = 3;
  289. complete;
  290. return;
  291. }
  292. else if (key == "e" && nocheat2 == 3 && nocheat2 != 2)
  293. {
  294. nocheat2 = 4;
  295. complete;
  296. return;
  297. }
  298. else if (key == "s" && nocheat2 == 4)
  299. {
  300. nocheat2 = 5;
  301. complete;
  302. return;
  303. }
  304. else if (key == "a" && nocheat2 == 5)
  305. {
  306. nocheat2 = 6;
  307. complete;
  308. return;
  309. }
  310. else if (key == "m" && nocheat2 == 6)
  311. {
  312. c2.setText("");
  313. cheat2 = 0;
  314. nocheat2 = 0;
  315. complete;
  316. return;
  317. }
  318. /* end cheat2 */
  319. /* Cheet3 on */
  320. else if (key == "i" && cheat3 == 0 && cheat3 != 3 && cheat3 != 5)
  321. {
  322. cheat3 = 1;
  323. complete;
  324. return;
  325. }
  326. else if (key == "n" && cheat3 == 1 && cheat3 != 4)
  327. {
  328. cheat3 = 2;
  329. complete;
  330. return;
  331. }
  332. else if (key == "f" && cheat3 == 2)
  333. {
  334. cheat3 = 3;
  335. complete;
  336. return;
  337. }
  338. else if (key == "i" && cheat3 == 3 && cheat3 != 5 && cheat3 != 0)
  339. {
  340. cheat3 = 4;
  341. complete;
  342. return;
  343. }
  344. else if (key == "n" && cheat3 == 4 && cheat3 != 2)
  345. {
  346. cheat3 = 5;
  347. complete;
  348. return;
  349. }
  350. else if (key == "i" && cheat3 == 5 && cheat3 != 3 && cheat3 != 0)
  351. {
  352. cheat3 = 6;
  353. complete;
  354. return;
  355. }
  356. else if (key == "t" && cheat3 == 6)
  357. {
  358. cheat3 = 7;
  359. complete;
  360. return;
  361. }
  362. else if (key == "y" && cheat3 == 7)
  363. {
  364. c3.setText("INFINITY");
  365. cheat3 = 8;
  366. evercheat = 1;
  367. complete;
  368. return;
  369. }
  370. /* Cheet3 off */
  371. else if (key == "i" && cheat3 == 8 && nocheat3 != 3 && nocheat3 != 5)
  372. {
  373. nocheat3 = 1;
  374. complete;
  375. return;
  376. }
  377. else if (key == "n" && nocheat3 == 1 && nocheat3 != 4)
  378. {
  379. nocheat3 = 2;
  380. complete;
  381. return;
  382. }
  383. else if (key == "f" && nocheat3 == 2)
  384. {
  385. nocheat3 = 3;
  386. complete;
  387. return;
  388. }
  389. else if (key == "i" && nocheat3 == 3 && nocheat3 != 5 && nocheat3 != 0)
  390. {
  391. nocheat3 = 4;
  392. complete;
  393. return;
  394. }
  395. else if (key == "n" && nocheat3 == 4 && nocheat3 != 1)
  396. {
  397. nocheat3 = 5;
  398. complete;
  399. return;
  400. }
  401. else if (key == "i" && nocheat3 == 5 && nocheat3 != 3 && nocheat3 != 0)
  402. {
  403. nocheat3 = 6;
  404. complete;
  405. return;
  406. }
  407. else if (key == "t" && nocheat3 == 6)
  408. {
  409. nocheat3 = 7;
  410. complete;
  411. return;
  412. }
  413. else if (key == "y" && nocheat3 == 7 && nocheat != 6)
  414. {
  415. c3.setText("");
  416. cheat3 = 0;
  417. nocheat3 = 0;
  418. complete;
  419. return;
  420. }
  421. /* end cheat3 */
  422. else if (key == "space")
  423. {
  424. if (gamestate == "startup" || gamestate == "New Try" || gamestate == "Next level")
  425. {
  426. hideInfo2();
  427. info.hide();
  428. infotxt.hide();
  429. gamestate = "running";
  430. startGame(s_level);
  431. complete;
  432. return;
  433. }
  434. if (gamestate == "Game Over")
  435. {
  436. info.hide();
  437. infotxt.hide();
  438. showInfo2();
  439. s_level = 1;
  440. complete;
  441. return;
  442. }
  443. if (gamestate == "Once Again")
  444. {
  445. s_level = 1;
  446. s_score = 0;
  447. s_lives = 5;
  448. hideInfo2();
  449. info.hide();
  450. infotxt.hide();
  451. gamestate = "running";
  452. startGame(s_level);
  453. complete;
  454. return;
  455. }
  456. if (move.isRunning())
  457. {
  458. paused = 1;
  459. move.stop();
  460. showInfo("Game Paused ... Push Space");
  461. complete;
  462. return;
  463. }
  464. if (paused == 1)
  465. {
  466. paused = 0;
  467. info.hide();
  468. infotxt.hide();
  469. move.start();
  470. complete;
  471. return;
  472. }
  473. }
  474. else
  475. {
  476. complete;
  477. return;
  478. }
  479. /* if (key == "up" && direction != "d")
  480. {
  481. if (move.isRunning())
  482. {
  483. direction = "u";
  484. complete;
  485. return;
  486. }
  487. }
  488. if (key == "down" && direction != "u")
  489. {
  490. if (move.isRunning())
  491. {
  492. direction = "d";
  493. complete;
  494. return;
  495. }
  496. }
  497. if (key == "left" && direction != "r")
  498. {
  499. if (move.isRunning())
  500. {
  501. direction = "l";
  502. complete;
  503. return;
  504. }
  505. }
  506. if (key == "right" && direction != "l")
  507. {
  508. if (move.isRunning())
  509. {
  510. direction = "r";
  511. complete;
  512. return;
  513. }
  514. }*/
  515. }
  516. }
  517. startGame (int level)
  518. {
  519. if (level == 11) level = 10;
  520. if (wall) delete wall;
  521. wall = new map;
  522. wall.loadMap("level" + integerToString(level));
  523. bg.setXmlParam("image", "level" + integerToString(level));
  524. int n = sammy.getNumItems();
  525. for ( int i = 1; i <= n; i++ )
  526. {
  527. layer newsammy = sammy.enumItem(0);
  528. sammy.removeItem(0);
  529. newsammy.hide();
  530. }
  531. currentllama = 0;
  532. t_lives.setText(translate("Lives: ") + integerToString(s_lives));
  533. t_score.setText(translate("Score: ") + integerToString(s_score));
  534. t_level.setText(translate("Level: ") + integerToString(s_level) + " [" + integerToString(currentllama) + "/" + integerToString(MAX_LLAMAS) + "]");
  535. n_sammy = 0;
  536. expn_sammy = 5;
  537. gotkey = 1;
  538. if (level != 8) direction = "r";
  539. else direction = "u";
  540. setLlama();
  541. sammy.removeAll();
  542. sammy_x.removeAll();
  543. sammy_y.removeAll();
  544. sammy0.setXmlParam("x", "180");
  545. sammy0.setXMLParam("y", "155");
  546. sammy0.show();
  547. move.start();
  548. }
  549. move.onTimer ()
  550. {
  551. if (n_sammy < expn_sammy)
  552. {
  553. addSammy();
  554. }
  555. else
  556. {
  557. syncSammy();
  558. }
  559. if (direction == "r")
  560. {
  561. setPos(sammy0, 1, 0);
  562. }
  563. else if (direction == "l")
  564. {
  565. setPos(sammy0, -1, 0);
  566. }
  567. else if (direction == "u")
  568. {
  569. setPos(sammy0, 0, -1);
  570. }
  571. else if (direction == "d")
  572. {
  573. setPos(sammy0, 0, 1);
  574. }
  575. checkForWalls (sammy0);
  576. checkForSammy (sammy0);
  577. checkForllama (sammy0);
  578. }
  579. setPos (layer l, int x, int y)
  580. {
  581. l.setXMLParam("x", integerToString(l.getGuiX() + x*5));
  582. l.setXMLParam("y", integerToString(l.getGuiY() + y*5));
  583. gotkey = 0;
  584. }
  585. setLlama ()
  586. {
  587. int lx = 5+random(MAX_W-3)*5;
  588. int ly = 20+random(MAX_H-3)*5;
  589. int x = sammy0.getGuiX();
  590. int y = sammy0.getGuiY();
  591. if ((x == lx || x == lx + 5 || x == lx + 10) && (y == ly || y == ly + 5 || y == ly + 10))
  592. {
  593. setLlama ();
  594. return;
  595. }
  596. if (wall.getValue(lx, ly) == 255 || wall.getValue(lx+5, ly) == 255 || wall.getValue(lx+10, ly) == 255 ||
  597. wall.getValue(lx, ly+5) == 255 || wall.getValue(lx+5, ly+5) == 255 || wall.getValue(lx+10, ly+5) == 255 ||
  598. wall.getValue(lx, ly+10) == 255 || wall.getValue(lx+5, ly+10) == 255 || wall.getValue(lx+10, ly+10) == 255 )
  599. {
  600. setLlama ();
  601. return;
  602. }
  603. int n = sammy_x.getNumItems();
  604. for ( int i = 0; i < n; i++ )
  605. {
  606. x = sammy_x.enumItem(i);
  607. y = sammy_y.enumItem(i);
  608. if ((x == lx || x == lx + 5 || x == lx + 10) && (y == ly || y == ly + 5 || y == ly + 10))
  609. {
  610. setLlama ();
  611. return;
  612. }
  613. }
  614. if ((x == lx || x == lx + 5 || x == lx + 10) && (y == ly || y == ly + 5 || y == ly + 10)) gotLlama();
  615. llama.setXMLParam("x", integerToString(lx));
  616. llama.setXMLParam("y", integerToString(ly));
  617. llama.show();
  618. }
  619. addSammy ()
  620. {
  621. int x = sammy0.getGuiX();
  622. int y = sammy0.getGuiY();
  623. n_sammy++;
  624. layer newsammy = createSammy(n_sammy, x, y);
  625. sammy.addItem(newsammy);
  626. sammy_x.addItem(x);
  627. sammy_y.addItem(y);
  628. newsammy.setXMLParam("x", integerToString(x));
  629. newsammy.setXMLParam("y", integerToString(y));
  630. newsammy.show();
  631. }
  632. Layer createSammy (int num, int x, int y)
  633. {
  634. layer l = new Layer;
  635. l.setXmlParam("id", "sammy" + integerToString(num));
  636. l.setXmlParam("image", "sammy");
  637. l.setXMLParam("x", integerToString(x));
  638. l.setXMLParam("y", integerToString(y));
  639. l.init(sammys);
  640. return l;
  641. }
  642. syncSammy ()
  643. {
  644. layer newsammy = sammy.enumItem(0);
  645. sammy.removeItem(0);
  646. sammy_x.removeItem(0);
  647. sammy_y.removeItem(0);
  648. int x = sammy0.getGuiX();
  649. int y = sammy0.getGuiY();
  650. newsammy.setXMLParam("x", integerToString(x));
  651. newsammy.setXMLParam("y", integerToString(y));
  652. sammy.addItem(newsammy);
  653. sammy_x.addItem(x);
  654. sammy_y.addItem(y);
  655. }
  656. showInfo (string s)
  657. {
  658. infotxt.setText(s);
  659. info.show();
  660. infotxt.show();
  661. }
  662. checkForWalls (layer l)
  663. {
  664. if ( cheat2 == 7 ) return;
  665. int x = l.getGuiX();
  666. int y = l.getGuiY();
  667. if (wall.getValue(x, y) == 255) sammyDies();
  668. }
  669. checkForLlama (layer l)
  670. {
  671. int x = l.getGuiX();
  672. int y = l.getGuiY();
  673. int lx = llama.getGuiX();
  674. int ly = llama.getGuiY();
  675. if ((x == lx || x == lx + 5 || x == lx + 10) && (y == ly || y == ly + 5 || y == ly + 10)) gotLlama();
  676. }
  677. checkForSammy (layer l)
  678. {
  679. if ( cheat == 7 ) return;
  680. int x = l.getGuiX();
  681. int y = l.getGuiY();
  682. int n = sammy_x.getNumItems();
  683. for ( int i = 0; i < n; i++ )
  684. {
  685. if (sammy_x.enumItem(i) == x && sammy_y.enumItem(i) == y)
  686. {
  687. sammyDies ();
  688. }
  689. }
  690. }
  691. sammyDies ()
  692. {
  693. llama.hide();
  694. move.stop();
  695. sammy0.hide();
  696. s_lives--;
  697. s_score -= 1000;
  698. t_lives.setText(translate("Lives: ") + integerToString(s_lives));
  699. t_score.setText(translate("Score: ") + integerToString(s_score));
  700. t_level.setText(translate("Level: ") + integerToString(s_level) + " [" + integerToString(currentllama) + "/" + integerToString(MAX_LLAMAS) + "]");
  701. gamestate = "New Try";
  702. if (s_lives == 0) {
  703. gamestate = "Game Over";
  704. }
  705. showInfo ("Sammy Dies! Push Space!");
  706. }
  707. gotLlama ()
  708. {
  709. currentllama++;
  710. s_score += 100 * currentllama;
  711. t_score.setText(translate("Score: ") + integerToString(s_score));
  712. t_level.setText(translate("Level: ") + integerToString(s_level) + " [" + integerToString(currentllama) + "/" + integerToString(MAX_LLAMAS) + "]");
  713. if (currentllama >= MAX_LLAMAS && cheat3 != 8)
  714. {
  715. move.stop();
  716. s_level++;
  717. llama.hide();
  718. gamestate = "Next Level";
  719. showInfo (translate("Level: ") + integerToString(s_level) + translate(", Push Space"));
  720. }
  721. else
  722. {
  723. expn_sammy += 12;
  724. setLlama();
  725. }
  726. }
  727. showInfo2 ()
  728. {
  729. if (evercheat == 0)
  730. {
  731. if (s_score > getPrivateInt("Nibbles", "Personal Best", 0))
  732. {
  733. setPrivateInt("Nibbles", "Personal Best", s_score);
  734. infotxt2d.setText("Congrats, New Highscore!");
  735. }
  736. else infotxt2d.setText(translate("Highscore") +": " + integerToString(getPrivateInt("Nibbles", " ", 0)));
  737. }
  738. else
  739. {
  740. infotxt2d.setTExt("You have cheated!");
  741. }
  742. if (cheat == 0 && cheat2 == 0 && cheat3 ==0) evercheat = 0;
  743. gamestate = "Once Again";
  744. infotxt2b.setText(translate("Your Score") + ": " + integerToString(s_score));
  745. info2.show();
  746. infotxt2a.show();
  747. infotxt2d.show();
  748. infotxt2b.show();
  749. infotxt2c.show();
  750. }
  751. hideInfo2 ()
  752. {
  753. info2.hide();
  754. infotxt2a.hide();
  755. infotxt2b.hide();
  756. infotxt2c.hide();
  757. infotxt2d.hide();
  758. }