Advertisement
Guest User

Different Platforms Automatic

a guest
Jul 15th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //"Horror!" button
  2. on(release){
  3.     poz = 10;
  4. }
  5. //"In the Dark (up)" button
  6. on(release){
  7.     che.gotoAndStop(2);
  8. }
  9. //"Change" button
  10. /*
  11. Couldn't you just do this?
  12. on(release){guh=(guh%5)+1;douxie.gotoAndStop(guh);}
  13. */
  14. on(release){
  15.     if(guh == 5) {
  16.         duoxie.gotoAndStop(1);
  17.         guh = 1;
  18.     } else if(guh == 1) {
  19.         duoxie.gotoAndStop(2);
  20.         guh = 2;
  21.     } else if(guh == 2) {
  22.         duoxie.gotoAndStop(3);
  23.         guh = 3;
  24.     } else if(guh == 3) {
  25.         duoxie.gotoAndStop(4);
  26.         guh = 4;
  27.     } else if(guh == 4) {
  28.         duoxie.gotoAndStop(5);
  29.         guh = 5;
  30.     }
  31. }
  32. //frame 1
  33. getUrl("FSCommand:showmenu", "false");
  34. getUrl("FSCommand:trapallkeys", "true");
  35. //frame 2
  36. if(getBytesLoaded() < getBytesTotal()) {
  37.     gotoAndPlay(1);
  38. }
  39. //frame 3
  40. /*
  41. These abbreviations confuse me.
  42. */
  43. var huh = 1;
  44. var tuh = 1;
  45. var guh = 1;
  46. gotoAndStop(10);
  47. //frame 4
  48. var pan = 1;
  49. var timery = 0;
  50. var veloy = 0;
  51. var onob = 0;
  52. var namo = 0;
  53. var velox = 0;
  54. var timer = 0;
  55. var poz = 0;
  56. var score = 0;
  57. var b1 = 1;
  58. var b2 = 0;
  59. var fur = 0;
  60. var sooth = -17;
  61. var escore;
  62. var good = 0;
  63. var go = 0;
  64. var tootoo = 0;
  65. var platon = 0;
  66. var jh = 0;
  67. var jt = 0;
  68. if(huh == 1) {
  69.     mhm.gotoAndStop(1);
  70. } else if(huh == 2) {
  71.     mhm.gotoAndStop(9);
  72. } else if(huh == 3) {
  73.     mhm.gotoAndStop(10);
  74. } else if(huh == 4) {
  75.     mhm.gotoAndStop(11);
  76. } else if(huh == 5) {
  77.     mhm.gotoAndStop(12);
  78. }
  79. if(tuh == 1) {
  80.     pla1.gotoAndStop(1);
  81.     pla2.gotoAndStop(1);
  82.     pla3.gotoAndStop(1);
  83.     pla4.gotoAndStop(1);
  84. } else if(tuh == 2) {
  85.     pla1.gotoAndStop(2);
  86.     pla2.gotoAndStop(2);
  87.     pla3.gotoAndStop(2);
  88.     pla4.gotoAndStop(2);
  89. } else if(tuh == 3) {
  90.     pla1.gotoAndStop(3);
  91.     pla2.gotoAndStop(3);
  92.     pla3.gotoAndStop(3);
  93.     pla4.gotoAndStop(3);
  94. } else if(tuh == 4) {
  95.     pla1.gotoAndStop(4);
  96.     pla2.gotoAndStop(4);
  97.     pla3.gotoAndStop(4);
  98.     pla4.gotoAndStop(4);
  99. } else if(tuh == 5) {
  100.     pla1.gotoAndStop(5);
  101.     pla2.gotoAndStop(5);
  102.     pla3.gotoAndStop(5);
  103.     pla4.gotoAndStop(5);
  104. }
  105. //frame 5
  106. fo._x = mhm._x;
  107. if(mhm._y < -30) {
  108.     fo.gotoAndStop(2);
  109.     fo._height = - mhm._y;
  110.     fo._width = (- mhm._y) / 2 + 130;
  111. } else if(mhm._y >= -30) {
  112.     fo.gotoAndStop(1);
  113. }
  114. if(Key.isDown(17)) {
  115.     che.gotoAndStop(3);
  116.     _quality = "LOW";
  117. }
  118. if(Key.isDown(34)) {
  119.     good = 1;
  120. }
  121. che._x = mhm._x;
  122. che._y = mhm._y;
  123. if(Key.isDown(38) && fur == 0) {
  124.     if(che._currentframe == 2) {
  125.         che.gotoAndStop(1);
  126.         _quality = "HIGH";
  127.     } else if(Key.isDown(38)) {
  128.         che.gotoAndStop(2);
  129.         _quality = "MEDIUM";
  130.     }
  131.     fur = 8;
  132. }
  133. if(fur > 0) {
  134.     fur--;
  135. }
  136. escore = score;
  137. if(Key.isDown(36) && poz < 0) {
  138.     poz = 1;
  139.     doy.gotoAndStop(1);
  140. } else if(Key.isDown(45)) {
  141.     poz = -5;
  142.     doy.gotoAndStop(2);
  143. }
  144. if(poz == 0) {
  145.     doy.gotoAndStop(1);
  146. }
  147. if(Key.isDown(33)) {
  148.     sooth = -150;
  149. }
  150. if(mhm._currentframe == 9 || mhm._currentframe == 10 || mhm._currentframe == 11 || mhm._currentframe == 12) {
  151.     mhm.gotoAndStop(mhm._currentframe);
  152. } else if(velox < 0.5 && velox > -0.5) {
  153.     velox = 0;
  154. } else if(veloy != 0 && velox == 0) {
  155.     mhm.gotoAndStop(8);
  156. } else if(veloy != 0 && velox < 0) {
  157.     mhm.gotoAndStop(7);
  158. } else if(veloy != 0 && velox > 0) {
  159.     mhm.gotoAndStop(6);
  160. } else if(velox > 5) {
  161.     mhm.gotoAndStop(2);
  162. } else if(velox < -5) {
  163.     mhm.gotoAndStop(3);
  164. } else if(velox > 1) {
  165.     mhm.gotoAndStop(4);
  166. } else if(velox < -1) {
  167.     mhm.gotoAndStop(5);
  168. } else {
  169.     mhm.gotoAndStop(1);
  170. }
  171. if(onob == 1) {
  172.     if(mhm._y <= pla1._y + 30) {
  173.         platon = plon - 1 + tootoo;
  174.     } else {
  175.         platon = plon - 9 + tootoo;
  176.     }
  177. }
  178. pla1.num = tootoo;
  179. var i = 1;
  180. while(i <= 8) {
  181.     if(mhm._y > _root["pla" + i]._y - 10 && mhm._y < _root["pla" + i]._y + 10 && veloy > 0 && mhm._x > _root["pla" + i]._x - 85 && mhm._x < _root["pla" + i]._x + 85) {
  182.         mhm._y = _root["pla" + i]._y;
  183.         onob = 1;
  184.         veloy = 0;
  185.         plon = i;
  186.     } else if((mhm._x < _root["pla" + i]._x - 85 || mhm._x > _root["pla" + i]._x + 85) && mhm._y > _root["pla" + i]._y - 10 && mhm._y < _root["pla" + i]._y + 10) {
  187.         onob = 0;
  188.     }
  189.     i++;
  190. }
  191. if(bul1._x > 560 && b1 == 1 || bul1._x < -10 && b1 == 0) {
  192.     if(Math.random() > 0.5) {
  193.         bul1._x = Math.random() * 200 + 570;
  194.         bul1._y = Math.random() * 80;
  195.         b1 = 0;
  196.     } else {
  197.         bul1._x = Math.random() * 200 - 220;
  198.         bul1._y = Math.random() * 80;
  199.         b1 = 1;
  200.     }
  201. }
  202. if(onob == 1) {
  203.     velox = velox * 0.83;
  204. } else {
  205.     velox = velox * 0.9;
  206. }
  207. if(bul2._x > 560 && b2 == 1 || bul2._x < -10 && b2 == 0) {
  208.     if(Math.random() > 0.5) {
  209.         bul2._x = Math.random() * 200 + 570;
  210.         bul2._y = Math.random() * 80;
  211.         b2 = 0;
  212.     } else {
  213.         bul2._x = Math.random() * 200 - 200;
  214.         bul2._y = Math.random() * 80;
  215.         b2 = 1;
  216.     }
  217. }
  218. if(b1 == 1 && guh > 1) {
  219.     bul1._x = bul1._x + 10;
  220.     bul1.gotoAndStop(guh);
  221.     bul1._y = bul1._y + pan;
  222. }
  223. if(b1 == 0 && guh > 1) {
  224.     bul1._x = bul1._x - 10;
  225.     bul1.gotoAndStop(guh);
  226.     bul1._y = bul1._y + pan;
  227. }
  228. if(b2 == 1 && guh > 1) {
  229.     bul2._x = bul2._x + 10;
  230.     bul2.gotoAndStop(guh);
  231.     bul2._y = bul2._y + pan;
  232. }
  233. if(b2 == 0 && guh > 1) {
  234.     bul2._x = bul2._x - 10;
  235.     bul2.gotoAndStop(guh);
  236.     bul2._y = bul2._y + pan;
  237. }
  238. if(mhm._currentframe < 9) {
  239.     if(mhm._x > bul1._x - 40 && mhm._x < bul1._x + 40) {
  240.         if(mhm._y > bul1._y && mhm._y < bul1._y + 120) {
  241.             if(b1 == 1) {
  242.                 bul1._x = 560;
  243.                 velox = velox + 10;
  244.             } else if(b1 == 0) {
  245.                 bul1._x = -10;
  246.                 velox = velox + -10;
  247.             }
  248.         }
  249.     } else if(mhm._x > bul2._x - 40 && mhm._x < bul2._x + 40) {
  250.         if(mhm._y > bul2._y && mhm._y < bul2._y + 120) {
  251.             if(b2 == 1) {
  252.                 bul2._x = 560;
  253.                 velox = velox + 10;
  254.             } else if(b2 == 0) {
  255.                 bul2._x = -10;
  256.                 velox = velox + -10;
  257.             }
  258.         }
  259.     }
  260. } else if(mhm._currentframe == 9) {
  261.     if(mhm._x > bul1._x - 40 && mhm._x < bul1._x + 40) {
  262.         if(mhm._y > bul1._y && mhm._y < bul1._y + 50) {
  263.             if(b1 == 1) {
  264.                 bul1._x = 560;
  265.                 velox = velox + 10;
  266.             } else if(b1 == 0) {
  267.                 bul1._x = -10;
  268.                 velox = velox + -10;
  269.             }
  270.         }
  271.     } else if(mhm._x > bul2._x - 40 && mhm._x < bul2._x + 40) {
  272.         if(mhm._y > bul2._y && mhm._y < bul2._y + 50) {
  273.             if(b2 == 1) {
  274.                 bul2._x = 560;
  275.                 velox = velox + 10;
  276.             } else if(b2 == 0) {
  277.                 bul2._x = -10;
  278.                 velox = velox + -10;
  279.             }
  280.         }
  281.     }
  282. } else if(mhm._currentframe == 11) {
  283.     if(mhm._x > bul1._x - 40 && mhm._x < bul1._x + 40) {
  284.         if(mhm._y > bul1._y - 40 && mhm._y < bul1._y + 40) {
  285.             if(b1 == 1) {
  286.                 bul1._x = 560;
  287.                 velox = velox + 10;
  288.             } else if(b1 == 0) {
  289.                 bul1._x = -10;
  290.                 velox = velox + -10;
  291.             }
  292.         }
  293.     } else if(mhm._x > bul2._x - 40 && mhm._x < bul2._x + 40) {
  294.         if(mhm._y > bul2._y - 40 && mhm._y < bul2._y + 40) {
  295.             if(b2 == 1) {
  296.                 bul2._x = 560;
  297.                 velox = velox + 10;
  298.             } else if(b2 == 0) {
  299.                 bul2._x = -10;
  300.                 velox = velox + -10;
  301.             }
  302.         }
  303.     }
  304. }
  305. if(mhm._y <= 200) {
  306.     pan = poz + (200 - mhm._y) / 10;
  307. }
  308. mhm._y = mhm._y + (veloy + pan);
  309. mhm._x = mhm._x + velox;
  310. if(onob == 1) {
  311.     veloy = 0;
  312. }
  313. pla1._y = pla1._y + pan;
  314. pla2._y = pla2._y + pan;
  315. pla3._y = pla3._y + pan;
  316. pla4._y = pla4._y + pan;
  317. pla6._y = pla6._y + pan;
  318. pla7._y = pla7._y + pan;
  319. pla8._y = pla8._y + pan;
  320. pla5._y = pla5._y + pan;
  321. if(sky.covero._y <= 1000) {
  322.     sky.covero._y = sky.covero._y + pan / 2.05;
  323. }
  324. if(mhm._x > 500) {
  325.     velox = - Math.abs(velox);
  326.     mhm._x = 495;
  327. } else if(mhm._x < 50) {
  328.     velox = Math.abs(velox);
  329.     mhm._x = 55;
  330. } else if(onob == 0 && veloy < 16) {
  331.     veloy = veloy + 3;
  332. }
  333. if(onob == 1 && mhm._x - _root["pla" + plon]._x + velox * 50 <= 0 || onob == 0 && mhm._x - _root["pla" + jt]._x >= 0 && (- velox) * 2 < mhm._x - _root["pla" + jt]._x) {
  334.     velox = velox - 3;
  335.     a2.gotoAndPlay(2);
  336. } else if(onob == 1 && mhm._x - _root["pla" + plon]._x + velox * 50 >= 0 || onob == 0 && mhm._x - _root["pla" + jt]._x <= 0 && velox * 2 < _root["pla" + jt]._x - mhm._x) {
  337.     velox = velox + 3;
  338.     a3.gotoAndPlay(2);
  339. }
  340. if(veloy >= 0 && mhm._y > _root["pla" + jt]._y && onob == 0) {
  341.     jt--;
  342. }
  343. if(jt == 0) {
  344.     jt = 8;
  345. }
  346. if((Math.abs(mhm._x - _root["pla" + plon]._x) > 73 - Math.abs(velox) || Math.abs(velox) >= 18 || Math.abs(velox) >= 10 && mhm._y >= 450) && (onob == 1 || good == 1)) {
  347.     if(sooth == -150) {
  348.         veloy = sooth;
  349.     } else {
  350.         veloy = -26 - Math.abs(velox);
  351.         score = score + Math.round((- veloy) / 3);
  352.     }
  353.     a1.gotoAndPlay(2);
  354.     jh = Math.abs(veloy * veloy / 6 + veloy / 2 + 8);
  355.     jt = plon + Math.floor(jh / 75);
  356.     if(jt >= 9) {
  357.         jt = jt - 8;
  358.     }
  359.     onob = 0;
  360. }
  361. disscore = score;
  362. if(Math.floor(tootoo / 40) + 1 <= 10) {
  363.     var i = 0;
  364.     while(i <= 8) {
  365.         if(_root["pla" + i]._y > 550) {
  366.             _root["pla" + i]._y = _root["pla" + i]._y - 600;
  367.             _root["pla" + i]._x = Math.random() * 350 + 100;
  368.             score = score + poz;
  369.             if(i == 1) {
  370.                 tootoo = tootoo + 8;
  371.             }
  372.             _root["pla" + i].goof.gotoAndStop(Math.floor(tootoo / 40) + 1);
  373.         }
  374.         i++;
  375.     }
  376. }
  377. gotoAndPlay(5);
  378. if(mhm._y > 600) {
  379.     gotoAndStop("die");
  380.     play();
  381. }
  382. if(sky._currentframe != Math.floor(tootoo / 40) + 1) {
  383.     sky.gotoAndStop(Math.floor(tootoo / 40) + 1);
  384.     sky.covero._y = -300;
  385. }
  386. //frame 6
  387. gotoAndPlay(5);
  388. if(tootoo == 400) {
  389.     jt = 1;
  390.     poz = 0.5;
  391.     pan = 0.5;
  392. } else {
  393.     timer++;
  394.     if(poz == 10) {
  395.         poz = 10;
  396.     }
  397.     if(timer > 90 && poz < 10) {
  398.         timer = 0;
  399.         if(poz != 10) {
  400.             poz = poz + 0.5;
  401.         }
  402.     }
  403. }
  404. if(veloy == 0 && (mhm._currentframe == 6 || mhm._currentframe == 7)) {
  405.     mhm.gotoAndStop(1);
  406. }
  407. //frame 8
  408. if(timery < 40) {
  409.     timery++;
  410.     gotoAndStop("die");
  411.     play();
  412. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement