Guest User

Untitled

a guest
Feb 17th, 2015
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 28.85 KB | None | 0 0
  1. //needs proper change in phases
  2. //needs movement
  3. //lacks background, bgm loop, sprites, sfx
  4.  
  5. script_enemy_main {
  6.    
  7.     let csd = GetCurrentScriptDirectory;
  8.     let imgboss = csd ~ "img\fam.png";
  9.     let spin1 = 0;
  10.     let spin2 = 0;
  11.    
  12.     @Initialize {
  13.         SetLife(16000);
  14.         SetTimer(360);
  15.         SetMovePosition01(GetCenterX, 120, 5);
  16.         SetDamageRate(100, 50);
  17.         SetInvincibility(100);
  18.         LoadGraphic(imgboss);
  19.        
  20.         mainTask;
  21.     }
  22.    
  23.     @MainLoop {
  24.         if(GetCommonDataDefault("kill", 0) == 1) {
  25.             AddLife(-750);
  26.             SetCommonData("kill", 0);
  27.         }
  28.         if(GetCommonDataDefault("phase", 0) == 1 && GetEnemyLife <= 5000) {
  29.             SetCommonData("phase", GetCommonDataDefault("phase", 0) +1)
  30.         }
  31.         if(GetCommonDataDefault("phase", 0) == 2 && GetEnemyLife <= 3000) {
  32.             SetCommonData("phase", GetCommonDataDefault("phase", 0) + 1);
  33.         }
  34.         SetCollisionA(GetX, GetY, 50);
  35.         SetCollisionB(GetX, GetY, 50);
  36.         yield;
  37.     }
  38.    
  39.     @DrawLoop {
  40.         SetTexture(imgboss);
  41.         SetRenderState(ADD);
  42.         SetGraphicScale(0.15, 0.15);
  43.         SetGraphicAngle(0, 0, spin1);
  44.         SetGraphicRect(1, 1, 735, 735);
  45.         DrawGraphic(GetX, GetY);
  46.         spin1-=5;
  47.        
  48.         SetTexture(imgboss);
  49.         SetRenderState(ADD);
  50.         SetGraphicScale(0.15, 0.15);
  51.         SetGraphicAngle(0, 0, spin2);
  52.         SetGraphicRect(1, 1, 735, 735);
  53.         DrawGraphic(GetX, GetY);
  54.         spin2+=5;
  55.     }
  56.    
  57.     @BackGround {
  58.     }
  59.    
  60.     @Finalize {
  61.         DeleteGraphic(imgboss);
  62.         CreateItem(ITEM_1UP, GetCenterX, GetCenterY);
  63.     }
  64.    
  65.     task mainTask {
  66.         yield;
  67.         wait(60);
  68.         spawn;
  69.         wait(60);
  70.         loop {
  71.             if(GetCommonDataDefault("rng", 0) == 1) {
  72.                 wait(547);
  73.                 flower1;
  74.                 wait(366);
  75.                 flower2;
  76.                 wait(344);
  77.             } else if(GetCommonDataDefault("rng", 0) == 2 && GetCommonDataDefault("rngl", 0) == 0 && GetCommonDataDefault("rngr", 0) == 0) {
  78.                 wait(605);
  79.                 flower1;
  80.                 wait(366);
  81.                 flower2;
  82.                 wait(344);
  83.             } else if(GetCommonDataDefault("rng", 0) == 3 || (GetCommonDataDefault("rng", 0) == 2 && (GetCommonDataDefault("rngl", 0) == 1 || GetCommonDataDefault("rngr", 0) == 1))) {
  84.                 wait(663);
  85.                 flower1;
  86.                 wait(366);
  87.                 flower2;
  88.                 wait(344);
  89.             } else if(GetCommonDataDefault("rng", 0) == 4 && GetCommonDataDefault("rngl", 0) == 1 && GetCommonDataDefault("rngr", 0) == 1 && GetCommonDataDefault("phase", 0) == 0) {
  90.                 wait(721);
  91.                 flower1;
  92.                 wait(366);
  93.                 flower2;
  94.                 wait(344);
  95.             } else if(GetCommonDataDefault("phase", 0) == 1) {
  96.                 wait(13);
  97.                 clock;
  98.                 wait(256);
  99.                 ring1;
  100.                 wait(239);
  101.                 counterclock;
  102.                 wait(256);
  103.                 ring1;
  104.                 wait(226);
  105.             } else if(GetCommonDataDefault("phase", 0) == 2) {
  106.                 wait(13);
  107.                 clock;
  108.                 wait(244);
  109.                 ring2;
  110.                 wait(261);
  111.                 counterclock;
  112.                 wait(244);
  113.                 ring2;
  114.                 wait(248);
  115.             } else if(GetCommonDataDefault("phase", 0) == 3) {
  116.                 wait(13);
  117.                 clock;
  118.                 wait(232);
  119.                 ring3;
  120.                 wait(279);
  121.                 counterclock;
  122.                 wait(232);
  123.                 ring3;
  124.                 wait(266);
  125.             } else {
  126.                 wait(489);
  127.                 flower1;
  128.                 wait(366);
  129.                 flower2;
  130.                 wait(344);
  131.             }
  132.             yield;
  133.         }
  134.     }
  135.    
  136.     task clock {
  137.         let dir = 46;
  138.    
  139.         loop(20) {
  140.             let x = GetEnemyX+50*cos(dir);
  141.             let y = GetEnemyY+50*sin(dir);
  142.            
  143.             CreateShot01(x, y, 3, atan2(GetPlayerY - y, GetPlayerX - x), BLUE01, 0);
  144.             dir+=90/20;
  145.             wait(5);
  146.         }
  147.         dir = 46;
  148.         wait(127);
  149.         yield;
  150.     }
  151.    
  152.     task counterclock {
  153.         let dir = 134;
  154.    
  155.         loop(20) {
  156.             let x = GetEnemyX+50*cos(dir);
  157.             let y = GetEnemyY+50*sin(dir);
  158.  
  159.             CreateShot01(x, y, 3, atan2(GetPlayerY - y, GetPlayerX - x), BLUE01, 0);
  160.             dir-=90/20;
  161.             wait(5);
  162.         }
  163.         dir = 134;
  164.         wait(127);
  165.     }
  166.    
  167.     task ring1 {
  168.         let dir = 90;
  169.         let x = 0;
  170.        
  171.         loop(6) {
  172.             while(x < 36) {
  173.                 CreateShot01(GetEnemyX+50*cos(dir), GetEnemyY+50*sin(dir), 3, dir, BLUE01, 0);
  174.                 dir+=360/36;
  175.                 x++
  176.             }
  177.             dir = rand(0, 359);
  178.             x = 0;
  179.             wait(13);
  180.         }
  181.     }
  182.    
  183.     task ring2 {
  184.         let dir = 90;
  185.         let x = 0;
  186.        
  187.         loop(10) {
  188.             while(x < 36) {
  189.                 CreateShot01(GetEnemyX+50*cos(dir), GetEnemyY+50*sin(dir), 3, dir, BLUE01, 0);
  190.                 dir+=360/36;
  191.                 x++
  192.             }
  193.             dir = rand(0, 359);
  194.             x = 0;
  195.             wait(13);
  196.         }
  197.     }
  198.    
  199.     task ring3 {
  200.         let dir = 90;
  201.         let x = 0;
  202.        
  203.         loop(14) {
  204.             while(x < 36) {
  205.                 CreateShot01(GetEnemyX+50*cos(dir), GetEnemyY+50*sin(dir), 3, dir, BLUE01, 0);
  206.                 dir+=360/36;
  207.                 x++
  208.             }
  209.             dir = rand(0, 359);
  210.             x = 0;
  211.             wait(13);
  212.         }
  213.     }
  214.    
  215.     task flower1 {
  216.         let dir11 = 90;
  217.         let dir12 = 96;
  218.         let dir13 = 101;
  219.         let dir21 = 90;
  220.         let dir22 = 84;
  221.         let dir23 = 78;
  222.         let x = 0;
  223.        
  224.         loop(10) {
  225.             while(x<6) {
  226.                 CreateShotA(11, GetEnemyX+50*cos(dir11), GetEnemyY+50*sin(dir11), 0);
  227.                 CreateShotA(12, GetEnemyX+35*cos(dir12), GetEnemyY+35*sin(dir12), 0);
  228.                 CreateShotA(13, GetEnemyX+20*cos(dir13), GetEnemyY+20*sin(dir13), 0);
  229.                 CreateShotA(21, GetEnemyX+32*cos(dir21), GetEnemyY+32*sin(dir21), 0);
  230.                 CreateShotA(22, GetEnemyX+17*cos(dir22), GetEnemyY+17*sin(dir22), 0);
  231.                 CreateShotA(23, GetEnemyX+2*cos(dir23), GetEnemyY+2*sin(dir23), 0);
  232.                 SetShotDataA(11, 0, 8, dir11, 0, -0.75, 4, PURPLE22);
  233.                 SetShotDataA(12, 0, 8, dir12, 0, -0.75, 3.5, PURPLE22);
  234.                 SetShotDataA(13, 0, 8, dir13, 0, -0.75, 3, PURPLE22);
  235.                 SetShotDataA(21, 0, 5, dir21, 0, -0.5, 2.5, PURPLE22);
  236.                 SetShotDataA(22, 0, 5, dir22, 0, -0.5, 2.25, PURPLE22);
  237.                 SetShotDataA(23, 0, 5, dir23, 0, -0.5, 2, PURPLE22);
  238.                 FireShot(11);
  239.                 FireShot(12);
  240.                 FireShot(13);
  241.                 FireShot(21);
  242.                 FireShot(22);
  243.                 FireShot(23);
  244.                 dir11+=360/6;
  245.                 dir12+=360/6;
  246.                 dir13+=360/6;
  247.                 dir21+=360/6;
  248.                 dir22+=360/6;
  249.                 dir23+=360/6;
  250.                 x++;
  251.             }
  252.             dir11+=19;
  253.             dir12+=19;
  254.             dir13+=19;
  255.             dir21+=19;
  256.             dir22+=19;
  257.             dir23+=19;
  258.             x = 0;
  259.             wait(25);
  260.         }
  261.     }
  262.    
  263.     task flower2 {
  264.         let dir11 = 90;
  265.         let dir12 = 96;
  266.         let dir13 = 101;
  267.         let dir21 = 90;
  268.         let dir22 = 84;
  269.         let dir23 = 78;
  270.         let x = 0;
  271.        
  272.         loop(10) {
  273.             while(x<6) {
  274.                 CreateShotA(11, GetEnemyX+32*cos(dir11), GetEnemyY+32*sin(dir11), 0);
  275.                 CreateShotA(12, GetEnemyX+17*cos(dir12), GetEnemyY+17*sin(dir12), 0);
  276.                 CreateShotA(13, GetEnemyX+2*cos(dir13), GetEnemyY+2*sin(dir13), 0);
  277.                 CreateShotA(21, GetEnemyX+50*cos(dir21), GetEnemyY+50*sin(dir21), 0);
  278.                 CreateShotA(22, GetEnemyX+35*cos(dir22), GetEnemyY+35*sin(dir22), 0);
  279.                 CreateShotA(23, GetEnemyX+20*cos(dir23), GetEnemyY+20*sin(dir23), 0);
  280.                 SetShotDataA(11, 0, 5, dir11, 0, -0.5, 2.5, PURPLE22);
  281.                 SetShotDataA(12, 0, 5, dir12, 0, -0.5, 2.25, PURPLE22);
  282.                 SetShotDataA(13, 0, 5, dir13, 0, -0.5, 2, PURPLE22);
  283.                 SetShotDataA(21, 0, 8, dir21, 0, -0.75, 4, PURPLE22);
  284.                 SetShotDataA(22, 0, 8, dir22, 0, -0.75, 3.5, PURPLE22);
  285.                 SetShotDataA(23, 0, 8, dir23, 0, -0.75, 3, PURPLE22);
  286.                 FireShot(11);
  287.                 FireShot(12);
  288.                 FireShot(13);
  289.                 FireShot(21);
  290.                 FireShot(22);
  291.                 FireShot(23);
  292.                 dir11+=360/6;
  293.                 dir12+=360/6;
  294.                 dir13+=360/6;
  295.                 dir21+=360/6;
  296.                 dir22+=360/6;
  297.                 dir23+=360/6;
  298.                 x++;
  299.             }
  300.             dir11+=19;
  301.             dir12+=19;
  302.             dir13+=19;
  303.             dir21+=19;
  304.             dir22+=19;
  305.             dir23+=19;
  306.             x = 0;
  307.             wait(25);
  308.         }
  309.     }
  310.    
  311.     sub spawn {
  312.         CreateEnemyFromScript("rotor", GetEnemyX, GetEnemyY, 0, 0, 0);
  313.         CreateEnemyFromScript("rotor", GetEnemyX, GetEnemyY, 0, 0, 180);
  314.         CreateEnemyFromScript("beak", GetEnemyX, GetEnemyY, 0, 0, 90);
  315.         CreateEnemyFromScript("cannon", GetEnemyX, GetEnemyY, 0, 0, 62);
  316.         CreateEnemyFromScript("cannon", GetEnemyX, GetEnemyY, 0, 0, 118);
  317.         CreateEnemyFromScript("lowturret", GetEnemyX, GetEnemyY, 0, 0, 130);
  318.         CreateEnemyFromScript("lowturret", GetEnemyX, GetEnemyY, 0, 0, 50);
  319.         CreateEnemyFromScript("highturret", GetEnemyX, GetEnemyY, 0, 0, 330);
  320.         CreateEnemyFromScript("highturret", GetEnemyX, GetEnemyY, 0, 0, 210);
  321.         CreateEnemyFromScript("turret", GetEnemyX, GetEnemyY, 0, 0, 0);
  322.         CreateEnemyFromScript("turret", GetEnemyX, GetEnemyY, 0, 0, 180);
  323.         CreateEnemyFromScript("sidecannon", GetEnemyX, GetEnemyY, 0, 0, 150);
  324.         CreateEnemyFromScript("sidecannon", GetEnemyX, GetEnemyY, 0, 0, 30);
  325.     }
  326.    
  327.     function wait(w) {
  328.         loop(w) {
  329.             yield;
  330.         }
  331.     }
  332. }
  333.  
  334. script_enemy rotor {
  335.  
  336.     let csd = GetCurrentScriptDirectory;
  337.     let rotor = csd ~ "img\fam.png";
  338.    
  339.     let dir = 0;
  340.     let r = 130;
  341.     let spin = 0;
  342.    
  343.     let famangle = GetArgument;
  344.    
  345.     @Initialize {
  346.         SetLife(1);
  347.         SetDamageRateEx(0, 0, 50, 25);
  348.         LoadGraphic(rotor);
  349.        
  350.         mainTask;
  351.     }
  352.    
  353.     @MainLoop {
  354.         SetCollisionA(GetX, GetY, 50);
  355.         SetCollisionB(GetX, GetY, 50);
  356.         yield;
  357.     }
  358.    
  359.     @DrawLoop {
  360.         SetTexture(rotor);
  361.         SetRenderState(ADD);
  362.         SetGraphicScale(0.15, 0.15);
  363.         SetGraphicAngle(0, 0, spin);
  364.         SetGraphicRect(1, 1, 735, 735);
  365.         DrawGraphic(GetX, GetY);
  366.         if(GetX < GetCenterX) {
  367.             spin+=5;
  368.         } else {
  369.             spin-=5;
  370.         }
  371.     }
  372.    
  373.     @Finalize {
  374.     }
  375.    
  376.     task mainTask {
  377.         yield;
  378.         movement;
  379.         wait(60);
  380.     }
  381.    
  382.     task movement {
  383.         loop {
  384.             SetMovePosition03(GetEnemyX+r*cos(famangle), GetEnemyY+r*sin(famangle), 20, 10);
  385.             yield;
  386.         }
  387.     }
  388.    
  389.     function wait(w) {
  390.         loop(w) {
  391.             yield;
  392.         }
  393.     }
  394. }
  395.  
  396. script_enemy beak {
  397.    
  398.     let csd = GetCurrentScriptDirectory;
  399.     let beak = csd ~ "img\fam.png";
  400.    
  401.     let dir = 0;
  402.     let r = 100;
  403.    
  404.     let famangle = GetArgument;
  405.    
  406.     @Initialize {
  407.         SetLife(5000);
  408.         SetDamageRateEx(100, 50, 0, 0);
  409.         LoadGraphic(beak);
  410.        
  411.         mainTask;
  412.     }
  413.    
  414.     @MainLoop {
  415.         if(GetEnemyLife<=7000) {
  416.             AddLife(-5000);
  417.         }
  418.         SetCollisionA(GetX, GetY, 30);
  419.         SetCollisionB(GetX, GetY, 30);
  420.         yield;
  421.     }
  422.    
  423.     @DrawLoop {
  424.         SetTexture(beak);
  425.         SetRenderState(ADD);
  426.         SetGraphicScale(0.075, 0.075);
  427.         SetGraphicAngle(0, 0, 0);
  428.         SetGraphicRect(1, 1, 735, 735);
  429.         DrawGraphic(GetX, GetY);
  430.     }
  431.    
  432.     @Finalize {
  433.         SetCommonData("kill", GetCommonDataDefault("kill", 0) +1);
  434.         SetCommonData("phase", GetCommonDataDefault("phase", 0) +1);
  435.     }
  436.    
  437.     task mainTask {
  438.         yield;
  439.         movement;
  440.         wait(60);
  441.     }
  442.    
  443.     task movement {
  444.         loop {
  445.             SetMovePosition03(GetEnemyX+r*cos(famangle), GetEnemyY+r*sin(famangle), 20, 10);
  446.             yield;
  447.         }
  448.     }
  449.    
  450.     function wait(w) {
  451.         loop(w) {
  452.             yield;
  453.         }
  454.     }
  455. }
  456.  
  457. script_enemy cannon {
  458.    
  459.     let csd = GetCurrentScriptDirectory;
  460.     let cannon = csd ~ "img\fam.png";
  461.    
  462.     let dir = 0;
  463.     let r = 110;
  464.     let spin = 0;
  465.    
  466.     let famangle = GetArgument;
  467.    
  468.     @Initialize {
  469.         SetLife(1250);
  470.         SetDamageRateEx(100, 50, 0, 0);
  471.         LoadGraphic(cannon);
  472.        
  473.         mainTask;
  474.     }
  475.    
  476.     @MainLoop {
  477.         if(GetCommonDataDefault("phase", 0) == 1) {
  478.             AddLife(-2000);
  479.         }
  480.         SetCollisionA(GetX, GetY, 15);
  481.         SetCollisionB(GetX, GetY, 15);
  482.         yield;
  483.     }
  484.    
  485.     @DrawLoop {
  486.         SetTexture(cannon);
  487.         SetRenderState(ADD);
  488.         SetGraphicScale(0.05, 0.05);
  489.         SetGraphicAngle(0, 0, spin);
  490.         SetGraphicRect(1, 1, 735, 735);
  491.         DrawGraphic(GetX, GetY);
  492.         if(GetX < GetCenterX) {
  493.             spin+=5;
  494.         } else {
  495.             spin-=5;
  496.         }
  497.     }
  498.    
  499.     @Finalize {
  500.         SetCommonData("kill", GetCommonDataDefault("kill", 0) +1);
  501.         SetCommonData("rng", GetCommonDataDefault("rng", 0) +1);
  502.     }
  503.    
  504.     task mainTask {
  505.         yield;
  506.         movement;
  507.         wait(60);
  508.         redtwin;
  509.     }
  510.    
  511.     task redtwin {
  512.         loop {
  513.             if(GetCommonDataDefault("rng", 0) == 1) {
  514.                 loop(17) {
  515.                     CreateShot01(GetX+5, GetY, 3, 90, RED32, 0);
  516.                     CreateShot01(GetX-5, GetY, 3, 90, RED32, 0);
  517.                     wait(25);
  518.                 }
  519.                 wait(832);
  520.             } else if(GetCommonDataDefault("rng", 0) == 2) {
  521.                 loop(21) {
  522.                     CreateShot01(GetX+5, GetY, 3, 90, RED32, 0);
  523.                     CreateShot01(GetX-5, GetY, 3, 90, RED32, 0);
  524.                     wait(25);
  525.                 }
  526.                 wait(848);
  527.             } else {
  528.                 loop(14) {
  529.                     CreateShot01(GetX+5, GetY, 3, 90, RED32, 0);
  530.                     CreateShot01(GetX-5, GetY, 3, 90, RED32, 0);
  531.                     wait(25);
  532.                 }
  533.                 wait(849);
  534.             }
  535.             yield;
  536.         }
  537.     }
  538.    
  539.     task movement {
  540.         loop {
  541.             SetMovePosition03(GetEnemyX+r*cos(famangle), GetEnemyY+r*sin(famangle), 20, 10);
  542.             yield;
  543.         }
  544.     }
  545.    
  546.     function wait(w) {
  547.         loop(w) {
  548.             yield;
  549.         }
  550.     }
  551. }
  552.  
  553. script_enemy lowturret {
  554.    
  555.     let csd = GetCurrentScriptDirectory;
  556.     let lowturret = csd ~ "img\fam.png";
  557.    
  558.     let dir = 0;
  559.     let r = 80;
  560.     let spin = 0;
  561.    
  562.     let famangle = GetArgument;
  563.    
  564.     @Initialize {
  565.         SetLife(2500);
  566.         SetDamageRateEx(100, 50, 0, 0);
  567.         LoadGraphic(lowturret);
  568.        
  569.         mainTask;
  570.     }
  571.    
  572.     @MainLoop {
  573.         if(GetCommonDataDefault("phase", 0) == 1) {
  574.             AddLife(-2500);
  575.         }
  576.         SetCollisionA(GetX, GetY, 15);
  577.         SetCollisionB(GetX, GetY, 15);
  578.         yield;
  579.     }
  580.    
  581.     @DrawLoop {
  582.         SetTexture(lowturret);
  583.         SetRenderState(ADD);
  584.         SetGraphicScale(0.05, 0.05);
  585.         SetGraphicAngle(0, 0, spin);
  586.         SetGraphicRect(1, 1, 735, 735);
  587.         DrawGraphic(GetX, GetY);
  588.         if(GetX < GetCenterX) {
  589.             spin+=5;
  590.         } else {
  591.             spin-=5;
  592.         }
  593.     }
  594.    
  595.     @Finalize {
  596.         SetCommonData("kill", GetCommonDataDefault("kill", 0) +1);
  597.         SetCommonData("rng", GetCommonDataDefault("rng", 0) +1);
  598.         if(GetX > GetCenterX) {
  599.             SetCommonData("rngr", GetCommonDataDefault("rngr", 0) +1);
  600.         } else {
  601.             SetCommonData("rngl", GetCommonDataDefault("rngl", 0) +1);
  602.         }
  603.     }
  604.    
  605.     task mainTask {
  606.         yield;
  607.         movement;
  608.         wait(60);
  609.         laser;
  610.     }
  611.    
  612.     task laser {
  613.         loop {
  614.             if(GetCommonDataDefault("rng", 0) == 1) {
  615.                 wait(25);
  616.                 mlaser2;
  617.                 wait(228);
  618.                 mlaser2;
  619.                 wait(1004);
  620.             } else if(GetCommonDataDefault("rng", 0) == 2 && GetCommonDataDefault("rngl", 0) == 0 && GetCommonDataDefault("rngr", 0) == 0) {
  621.                 wait(25);
  622.                 mlaser3;
  623.                 wait(257);
  624.                 mlaser3;
  625.                 wait(1033);
  626.             } else if(GetCommonDataDefault("rngl", 0) == 1 || GetCommonDataDefault("rngr", 0) == 1) {
  627.                 wait(25);
  628.                 mlaser4;
  629.                 wait(286);
  630.                 mlaser4;
  631.                 wait(1062);
  632.             } else {
  633.                 wait(25);
  634.                 mlaser1;
  635.                 wait(199);
  636.                 mlaser1;
  637.                 wait(975);
  638.             }
  639.             yield;
  640.         }
  641.     }
  642.    
  643.     task mlaser1 {
  644.         loop(3) {
  645.             laser1;
  646.             wait(29);
  647.         }
  648.     }
  649.    
  650.     task mlaser2 {
  651.         loop(4) {
  652.             laser1;
  653.             wait(29);
  654.         }
  655.     }
  656.    
  657.     task mlaser3 {
  658.         loop(5) {
  659.             laser1;
  660.             wait(29);
  661.         }
  662.     }
  663.    
  664.     task mlaser4 {
  665.         loop(6) {
  666.             laser1;
  667.             wait(29);
  668.         }
  669.     }
  670.    
  671.     task laser1 {
  672.         let player = GetAngleToPlayer;
  673.        
  674.         loop(4) {
  675.             CreateShot01(GetX, GetY, 4, player, PURPLE32, 0);
  676.             wait(4);
  677.         }
  678.     }
  679.    
  680.     task movement {
  681.         loop {
  682.             SetMovePosition03(GetEnemyX+r*cos(famangle), GetEnemyY+r*sin(famangle), 20, 10);
  683.             yield;
  684.         }
  685.     }
  686.    
  687.     function wait(w) {
  688.         loop(w) {
  689.             yield;
  690.         }
  691.     }
  692. }
  693.  
  694. script_enemy highturret {
  695.    
  696.     let csd = GetCurrentScriptDirectory;
  697.     let highturret = csd ~ "img\fam.png";
  698.    
  699.     let dir = 0;
  700.     let r = 80;
  701.     let spin = 0;
  702.    
  703.     let famangle = GetArgument;
  704.    
  705.     @Initialize {
  706.         SetLife(1);
  707.         SetDamageRateEx(0, 0, 0, 0);
  708.         LoadGraphic(highturret);
  709.        
  710.         mainTask;
  711.     }
  712.    
  713.     @MainLoop {
  714.         SetCollisionA(GetX, GetY, 0);
  715.         SetCollisionB(GetX, GetY, 0);
  716.         yield;
  717.     }
  718.    
  719.     @DrawLoop {
  720.         SetTexture(highturret);
  721.         SetRenderState(ADD);
  722.         SetGraphicScale(0.05, 0.05);
  723.         SetGraphicAngle(0, 0, spin);
  724.         SetGraphicRect(1, 1, 735, 735);
  725.         DrawGraphic(GetX, GetY);
  726.         if(GetX < GetCenterX) {
  727.             spin+=5;
  728.         } else {
  729.             spin-=5;
  730.         }
  731.     }
  732.    
  733.     @Finalize {
  734.     }
  735.    
  736.     task mainTask {
  737.         yield;
  738.         movement;
  739.         wait(60);
  740.         laser;
  741.     }
  742.    
  743.     task laser {
  744.         loop {
  745.             if(GetCommonDataDefault("rng", 0) == 1) {
  746.                 wait(25);
  747.                 mlaser2;
  748.                 wait(228);
  749.                 mlaser2;
  750.                 wait(1004);
  751.             } else if(GetCommonDataDefault("rng", 0) == 2 && GetCommonDataDefault("rngl", 0) == 0 && GetCommonDataDefault("rngr", 0) == 0) {
  752.                 wait(25);
  753.                 mlaser3;
  754.                 wait(257);
  755.                 mlaser3;
  756.                 wait(1033);
  757.             } else if(GetCommonDataDefault("rng", 0) == 3 || (GetCommonDataDefault("rng", 0) == 2 && (GetCommonDataDefault("rngl", 0) == 1 || GetCommonDataDefault("rngr", 0) == 1))) {
  758.                 wait(25);
  759.                 if((GetCommonDataDefault("rngl", 0) == 1 && GetX > GetCenterX) || (GetCommonDataDefault("rngr", 0) == 1 && GetX < GetCenterX)) {
  760.                     mlaser4;
  761.                 } else if((GetCommonDataDefault("rngl", 0) == 1 && GetX < GetCenterX) || (GetCommonDataDefault("rngr", 0) == 1 && GetX > GetCenterX)) {
  762.                     mlaser4rng;
  763.                 }
  764.                 wait(286);
  765.                 if((GetCommonDataDefault("rngl", 0) == 1 && GetX > GetCenterX) || (GetCommonDataDefault("rngr", 0) == 1 && GetX < GetCenterX)) {
  766.                     mlaser4;
  767.                 } else if((GetCommonDataDefault("rngl", 0) == 1 && GetX < GetCenterX) || (GetCommonDataDefault("rngr", 0) == 1 && GetX > GetCenterX)) {
  768.                     mlaser4rng;
  769.                 }
  770.                 wait(1062);
  771.             } else if(GetCommonDataDefault("rng", 0) == 4 && GetCommonDataDefault("rngl", 0) == 1 && GetCommonDataDefault("rngr", 0) == 1 && GetCommonDataDefault("phase", 0) == 0) {
  772.                 wait(25);
  773.                 mlaser5;
  774.                 wait(315);
  775.                 mlaser5;
  776.                 wait(1091);
  777.             } else if(GetCommonDataDefault("phase", 0) == 1) {
  778.                 if(GetX < GetCenterX) {
  779.                     spirall1;
  780.                     wait(86);
  781.                 } else if(GetX > GetCenterX) {
  782.                     spiralr1;
  783.                     wait(86);
  784.                 }
  785.             } else if(GetCommonDataDefault("phase", 0) == 2) {
  786.                 if(GetX < GetCenterX) {
  787.                     spirall1;
  788.                     wait(86);
  789.                 } else if(GetX > GetCenterX) {
  790.                     spiralr2;
  791.                     wait(43);
  792.                 }
  793.             } else if(GetCommonDataDefault("phase", 0) == 3) {
  794.                 if(GetX < GetCenterX) {
  795.                     spirall2;
  796.                     wait(43);
  797.                 } else if(GetX > GetCenterX) {
  798.                     spiralr2;
  799.                     wait(43);
  800.                 }
  801.             } else {
  802.                 wait(25);
  803.                 mlaser1;
  804.                 wait(199);
  805.                 mlaser1;
  806.                 wait(975);
  807.             }
  808.             yield;
  809.         }
  810.     }
  811.    
  812.     task spiralr1 {
  813.         let dir = 90;
  814.        
  815.         loop(43) {
  816.             CreateShot01(GetX, GetY, 3, dir, PURPLE32, 0);
  817.             dir+=360/43*2;
  818.             wait(1);
  819.             yield;
  820.         }
  821.     }
  822.    
  823.     task spiralr2 {
  824.         let dir = 90;
  825.        
  826.         loop(43) {
  827.             CreateShot01(GetX, GetY, 3, dir, PURPLE32, 0);
  828.             dir+=360/43*2;
  829.             yield;
  830.         }
  831.     }
  832.    
  833.     task spirall1 {
  834.         let dir = 90;
  835.        
  836.         loop(43) {
  837.             CreateShot01(GetX, GetY, 3, dir, PURPLE32, 0);
  838.             dir-=360/43*2;
  839.             wait(1);
  840.             yield;
  841.         }
  842.     }
  843.    
  844.     task spirall2 {
  845.         let dir = 90;
  846.        
  847.         loop(43) {
  848.             CreateShot01(GetX, GetY, 3, dir, PURPLE32, 0);
  849.             dir-=360/43*2;
  850.             yield;
  851.         }
  852.     }
  853.    
  854.     task mlaser1 {
  855.         loop(3) {
  856.             laser1;
  857.             wait(29);
  858.         }
  859.     }
  860.    
  861.     task mlaser2 {
  862.         loop(4) {
  863.             laser1;
  864.             wait(29);
  865.         }
  866.     }
  867.    
  868.     task mlaser3 {
  869.         loop(5) {
  870.             laser1;
  871.             wait(29);
  872.         }
  873.     }
  874.    
  875.     task mlaser4rng {
  876.         loop(6) {
  877.             laser3;
  878.             wait(29);
  879.         }
  880.     }
  881.    
  882.     task mlaser4 {
  883.         loop(6) {
  884.             laser1;
  885.             wait(29);
  886.         }
  887.     }
  888.    
  889.     task mlaser5 {
  890.         loop(7) {
  891.             laser3;
  892.             wait(29);
  893.         }
  894.     }
  895.    
  896.     task laser1 {
  897.         let player = GetAngleToPlayer;
  898.        
  899.         loop(4) {
  900.             CreateShot01(GetX, GetY, 4, player, PURPLE32, 0);
  901.             wait(4);
  902.         }
  903.     }
  904.    
  905.     task laser3 {
  906.         let player = GetAngleToPlayer;
  907.        
  908.         loop(4) {
  909.             CreateShot01(GetX, GetY, 4, player, PURPLE32, 0);
  910.             CreateShot01(GetX, GetY, 4, player+3, PURPLE32, 0);
  911.             CreateShot01(GetX, GetY, 4, player-3, PURPLE32, 0);
  912.             wait(4);
  913.         }
  914.     }
  915.    
  916.     task movement {
  917.         loop {
  918.             SetMovePosition03(GetEnemyX+r*cos(famangle), GetEnemyY+r*sin(famangle), 20, 10);
  919.             yield;
  920.         }
  921.     }
  922.    
  923.     function wait(w) {
  924.         loop(w) {
  925.             yield;
  926.         }
  927.     }
  928. }
  929.  
  930. script_enemy turret {
  931.    
  932.     let csd = GetCurrentScriptDirectory;
  933.     let turret = csd ~ "img\fam.png";
  934.    
  935.     let dir = 0;
  936.     let r = 66;
  937.     let spin = 0;
  938.    
  939.     let famangle = GetArgument;
  940.    
  941.     @Initialize {
  942.         SetLife(1);
  943.         SetDamageRateEx(0, 0, 0, 0);
  944.         LoadGraphic(turret);
  945.        
  946.         mainTask;
  947.     }
  948.    
  949.     @MainLoop {
  950.         SetCollisionA(GetX, GetY, 0);
  951.         SetCollisionB(GetX, GetY, 0);
  952.         yield;
  953.     }
  954.    
  955.     @DrawLoop {
  956.         SetTexture(turret);
  957.         SetRenderState(ADD);
  958.         SetGraphicScale(0.025, 0.025);
  959.         SetGraphicAngle(0, 0, spin);
  960.         SetGraphicRect(1, 1, 735, 735);
  961.         DrawGraphic(GetX, GetY);
  962.         if(GetX < GetCenterX) {
  963.             spin+=5;
  964.         } else {
  965.             spin-=5;
  966.         }
  967.     }
  968.    
  969.     @Finalize {
  970.     }
  971.    
  972.     task mainTask {
  973.         yield;
  974.         movement;
  975.         wait(60);
  976.         wide;
  977.     }
  978.    
  979.     task wide {
  980.         loop {
  981.             if(GetCommonDataDefault("rng", 0) == 1) {
  982.                 wait(429);
  983.                 loop(8) {
  984.                     wide5;
  985.                     wait(97);
  986.                 }
  987.                 wait(52);
  988.             } else if(GetCommonDataDefault("rng", 0) == 2 && GetCommonDataDefault("rngl", 0) == 0 && GetCommonDataDefault("rngr", 0) == 0) {
  989.                 wait(487);
  990.                 loop(8) {
  991.                     wide7;
  992.                     wait(97);
  993.                 }
  994.                 wait(52);
  995.             } else if(GetCommonDataDefault("rng", 0) == 3 || (GetCommonDataDefault("rng", 0) == 2 && (GetCommonDataDefault("rngl", 0) == 1 || GetCommonDataDefault("rngr", 0) == 1))) {
  996.                 wait(545);
  997.                 loop(8) {
  998.                     wide7;
  999.                     wait(97);
  1000.                 }
  1001.                 wait(52);
  1002.             } else if(GetCommonDataDefault("rng", 0) == 4 && GetCommonDataDefault("phase", 0) == 0) {
  1003.                 wait(603);
  1004.                 loop(8) {
  1005.                     wide7;
  1006.                     wait(97);
  1007.                 }
  1008.                 wait(52);
  1009.             } else if(GetCommonDataDefault("phase", 0) == 1) {
  1010.                 loop(2) {
  1011.                     wide9;
  1012.                     wait(97);
  1013.                 }
  1014.                 wait(301);
  1015.             } else if(GetCommonDataDefault("phase", 0) == 2) {
  1016.                 wide9;
  1017.                 wait(97);
  1018.             } else if(GetCommonDataDefault("phase", 0) == 3) {
  1019.                 wide9;
  1020.                 wait(97);
  1021.             } else {
  1022.                 wait(371);
  1023.                 loop(8) {
  1024.                     wide3;
  1025.                     wait(97);
  1026.                 }
  1027.                 wait(52);
  1028.             }
  1029.             yield;
  1030.         }
  1031.     }
  1032.    
  1033.     task wide3 {
  1034.         let player = GetAngleToPlayer;
  1035.        
  1036.         CreateShot01(GetX, GetY, 2, player, BLUE05, 0);
  1037.         CreateShot01(GetX, GetY, 2, player+2, BLUE05, 0);
  1038.         CreateShot01(GetX, GetY, 2, player-2, BLUE05, 0);
  1039.     }
  1040.    
  1041.     task wide5 {
  1042.         let player = GetAngleToPlayer;
  1043.        
  1044.         CreateShot01(GetX, GetY, 2, player, BLUE05, 0);
  1045.         CreateShot01(GetX, GetY, 2, player+2, BLUE05, 0);
  1046.         CreateShot01(GetX, GetY, 2, player+4, BLUE05, 0);
  1047.         CreateShot01(GetX, GetY, 2, player-2, BLUE05, 0);
  1048.         CreateShot01(GetX, GetY, 2, player-4, BLUE05, 0);
  1049.     }
  1050.    
  1051.     task wide7 {
  1052.         let player = GetAngleToPlayer;
  1053.        
  1054.         CreateShot01(GetX, GetY, 2, player, BLUE05, 0);
  1055.         CreateShot01(GetX, GetY, 2, player+2, BLUE05, 0);
  1056.         CreateShot01(GetX, GetY, 2, player+4, BLUE05, 0);
  1057.         CreateShot01(GetX, GetY, 2, player+6, BLUE05, 0);
  1058.         CreateShot01(GetX, GetY, 2, player-2, BLUE05, 0);
  1059.         CreateShot01(GetX, GetY, 2, player-4, BLUE05, 0);
  1060.         CreateShot01(GetX, GetY, 2, player-6, BLUE05, 0);
  1061.     }
  1062.    
  1063.     task wide9 {
  1064.         let player = GetAngleToPlayer;
  1065.        
  1066.         CreateShot01(GetX, GetY, 3, player, BLUE05, 0);
  1067.         CreateShot01(GetX, GetY, 3, player+2, BLUE05, 0);
  1068.         CreateShot01(GetX, GetY, 3, player+4, BLUE05, 0);
  1069.         CreateShot01(GetX, GetY, 3, player+6, BLUE05, 0);
  1070.         CreateShot01(GetX, GetY, 3, player+8, BLUE05, 0);
  1071.         CreateShot01(GetX, GetY, 3, player-2, BLUE05, 0);
  1072.         CreateShot01(GetX, GetY, 3, player-4, BLUE05, 0);
  1073.         CreateShot01(GetX, GetY, 3, player-6, BLUE05, 0);
  1074.         CreateShot01(GetX, GetY, 3, player-8, BLUE05, 0);
  1075.     }
  1076.    
  1077.     task movement {
  1078.         loop {
  1079.             SetMovePosition03(GetEnemyX+r*cos(famangle), GetEnemyY+r*sin(famangle), 20, 10);
  1080.             yield;
  1081.         }
  1082.     }
  1083.    
  1084.     function wait(w) {
  1085.         loop(w) {
  1086.             yield;
  1087.         }
  1088.     }
  1089. }
  1090.  
  1091. script_enemy sidecannon {
  1092.    
  1093.     let csd = GetCurrentScriptDirectory;
  1094.     let sidecannon = csd ~ "img\fam.png";
  1095.    
  1096.     let dir = 0;
  1097.     let r = 80;
  1098.     let spin = 0;
  1099.    
  1100.     let famangle = GetArgument;
  1101.    
  1102.     @Initialize {
  1103.         SetLife(1);
  1104.         SetDamageRateEx(0, 0, 0, 0);
  1105.         LoadGraphic(sidecannon);
  1106.        
  1107.         mainTask;
  1108.     }
  1109.    
  1110.     @MainLoop {
  1111.         SetCollisionA(GetX, GetY, 0);
  1112.         SetCollisionB(GetX, GetY, 0);
  1113.         yield;
  1114.     }
  1115.    
  1116.     @DrawLoop {
  1117.         SetTexture(sidecannon);
  1118.         SetRenderState(ADD);
  1119.         SetGraphicScale(0.05, 0.05);
  1120.         SetGraphicAngle(0, 0, spin);
  1121.         SetGraphicRect(1, 1, 735, 735);
  1122.         DrawGraphic(GetX, GetY);
  1123.         if(GetX < GetCenterX) {
  1124.             spin+=5;
  1125.         } else {
  1126.             spin-=5;
  1127.         }
  1128.     }
  1129.    
  1130.     @Finalize {
  1131.     }
  1132.    
  1133.     task mainTask {
  1134.         yield;
  1135.         movement;
  1136.         wait(60);
  1137.         spread;
  1138.     }
  1139.    
  1140.     task spread {
  1141.         loop {
  1142.             if(GetCommonDataDefault("rng", 0) == 1) {
  1143.                 wait(156);
  1144.                 spread7;
  1145.                 wait(228);
  1146.                 spread9;
  1147.                 wait(873);
  1148.             } else if(GetCommonDataDefault("rng", 0) == 2 && GetCommonDataDefault("rngl", 0) == 0 && GetCommonDataDefault("rngr", 0) == 0) {
  1149.                 wait(185);
  1150.                 spread9;
  1151.                 wait(257);
  1152.                 spread11;
  1153.                 wait(873);
  1154.             } else if(GetCommonDataDefault("rng", 0) == 3 || (GetCommonDataDefault("rng", 0) == 2 && (GetCommonDataDefault("rngl", 0) == 1 || GetCommonDataDefault("rngr", 0) == 1))) {
  1155.                 wait(214);
  1156.                 spread11;
  1157.                 wait(286);
  1158.                 spread13;
  1159.                 wait(873);
  1160.             } else if(GetCommonDataDefault("rng", 0) == 4 && GetCommonDataDefault("rngl", 0) == 1 && GetCommonDataDefault("rngr", 0) == 1 && GetCommonDataDefault("phase", 0) == 0) {
  1161.                 wait(243);
  1162.                 spread13;
  1163.                 wait(315);
  1164.                 spread15;
  1165.                 wait(873);
  1166.             } else if(GetCommonDataDefault("phase", 0) == 1) {
  1167.                 wait(140);
  1168.                 spread17;
  1169.                 wait(355);
  1170.             } else if(GetCommonDataDefault("phase", 0) == 2) {
  1171.                
  1172.             } else if(GetCommonDataDefault("phase", 0) == 3) {
  1173.                
  1174.             } else {
  1175.                 wait(127);
  1176.                 spread5;
  1177.                 wait(199);
  1178.                 spread7;
  1179.                 wait(873);
  1180.             }
  1181.             yield;
  1182.         }
  1183.     }
  1184.    
  1185.     task spread5 {
  1186.         let player = GetAngleToPlayer;
  1187.        
  1188.         loop(8) {
  1189.             CreateShot01(GetX, GetY, 4, player, BLUE01, 0);
  1190.             CreateShot01(GetX, GetY, 4, player+22.5, BLUE01, 0);
  1191.             CreateShot01(GetX, GetY, 4, player+45, BLUE01, 0);
  1192.             CreateShot01(GetX, GetY, 4, player-22.5, BLUE01, 0);
  1193.             CreateShot01(GetX, GetY, 4, player-45, BLUE01, 0);
  1194.             wait(4);
  1195.         }
  1196.     }
  1197.    
  1198.     task spread7 {
  1199.         let player = GetAngleToPlayer;
  1200.        
  1201.         loop(8) {
  1202.             CreateShot01(GetX, GetY, 4, player, BLUE01, 0);
  1203.             CreateShot01(GetX, GetY, 4, player+22.5, BLUE01, 0);
  1204.             CreateShot01(GetX, GetY, 4, player+45, BLUE01, 0);
  1205.             CreateShot01(GetX, GetY, 4, player+67.5, BLUE01, 0);
  1206.             CreateShot01(GetX, GetY, 4, player-22.5, BLUE01, 0);
  1207.             CreateShot01(GetX, GetY, 4, player-45, BLUE01, 0);
  1208.             CreateShot01(GetX, GetY, 4, player-67.5, BLUE01, 0);
  1209.             wait(4);
  1210.         }
  1211.     }
  1212.    
  1213.     task spread9 {
  1214.         let player = GetAngleToPlayer;
  1215.        
  1216.         loop(8) {
  1217.             CreateShot01(GetX, GetY, 4, player, BLUE01, 0);
  1218.             CreateShot01(GetX, GetY, 4, player+22.5, BLUE01, 0);
  1219.             CreateShot01(GetX, GetY, 4, player+45, BLUE01, 0);
  1220.             CreateShot01(GetX, GetY, 4, player+67.5, BLUE01, 0);
  1221.             CreateShot01(GetX, GetY, 4, player+90, BLUE01, 0);
  1222.             CreateShot01(GetX, GetY, 4, player-22.5, BLUE01, 0);
  1223.             CreateShot01(GetX, GetY, 4, player-45, BLUE01, 0);
  1224.             CreateShot01(GetX, GetY, 4, player-67.5, BLUE01, 0);
  1225.             CreateShot01(GetX, GetY, 4, player-90, BLUE01, 0);
  1226.             wait(4);
  1227.         }
  1228.     }
  1229.    
  1230.     task spread11 {
  1231.         let player = GetAngleToPlayer;
  1232.        
  1233.         loop(8) {
  1234.             CreateShot01(GetX, GetY, 4, player, BLUE01, 0);
  1235.             CreateShot01(GetX, GetY, 4, player+13.5, BLUE01, 0);
  1236.             CreateShot01(GetX, GetY, 4, player+27, BLUE01, 0);
  1237.             CreateShot01(GetX, GetY, 4, player+40.5, BLUE01, 0);
  1238.             CreateShot01(GetX, GetY, 4, player+54, BLUE01, 0);
  1239.             CreateShot01(GetX, GetY, 4, player+67.5, BLUE01, 0);
  1240.             CreateShot01(GetX, GetY, 4, player-13.5, BLUE01, 0);
  1241.             CreateShot01(GetX, GetY, 4, player-27, BLUE01, 0);
  1242.             CreateShot01(GetX, GetY, 4, player-40.5, BLUE01, 0);
  1243.             CreateShot01(GetX, GetY, 4, player-54, BLUE01, 0);
  1244.             CreateShot01(GetX, GetY, 4, player-67.5, BLUE01, 0);
  1245.             wait(4);
  1246.         }
  1247.     }
  1248.    
  1249.     task spread13 {
  1250.         let player = GetAngleToPlayer;
  1251.        
  1252.         loop(8) {
  1253.             CreateShot01(GetX, GetY, 4, player, BLUE01, 0);
  1254.             CreateShot01(GetX, GetY, 4, player+11.25, BLUE01, 0);
  1255.             CreateShot01(GetX, GetY, 4, player+22.5, BLUE01, 0);
  1256.             CreateShot01(GetX, GetY, 4, player+33.75, BLUE01, 0);
  1257.             CreateShot01(GetX, GetY, 4, player+45, BLUE01, 0);
  1258.             CreateShot01(GetX, GetY, 4, player+56.25, BLUE01, 0);
  1259.             CreateShot01(GetX, GetY, 4, player+67.5, BLUE01, 0);
  1260.             CreateShot01(GetX, GetY, 4, player-11.25, BLUE01, 0);
  1261.             CreateShot01(GetX, GetY, 4, player-22.5, BLUE01, 0);
  1262.             CreateShot01(GetX, GetY, 4, player-33.75, BLUE01, 0);
  1263.             CreateShot01(GetX, GetY, 4, player-45, BLUE01, 0);
  1264.             CreateShot01(GetX, GetY, 4, player-56.25, BLUE01, 0);
  1265.             CreateShot01(GetX, GetY, 4, player-67.5, BLUE01, 0);
  1266.             wait(4);
  1267.         }
  1268.     }
  1269.    
  1270.     task spread15 {
  1271.         let player = GetAngleToPlayer;
  1272.        
  1273.         loop(8) {
  1274.             CreateShot01(GetX, GetY, 4, player, BLUE01, 0);
  1275.             CreateShot01(GetX, GetY, 4, player+9, BLUE01, 0);
  1276.             CreateShot01(GetX, GetY, 4, player+18, BLUE01, 0);
  1277.             CreateShot01(GetX, GetY, 4, player+27, BLUE01, 0);
  1278.             CreateShot01(GetX, GetY, 4, player+36, BLUE01, 0);
  1279.             CreateShot01(GetX, GetY, 4, player+45, BLUE01, 0);
  1280.             CreateShot01(GetX, GetY, 4, player+54, BLUE01, 0);
  1281.             CreateShot01(GetX, GetY, 4, player+63, BLUE01, 0);
  1282.             CreateShot01(GetX, GetY, 4, player-9, BLUE01, 0);
  1283.             CreateShot01(GetX, GetY, 4, player-18, BLUE01, 0);
  1284.             CreateShot01(GetX, GetY, 4, player-27, BLUE01, 0);
  1285.             CreateShot01(GetX, GetY, 4, player-36, BLUE01, 0);
  1286.             CreateShot01(GetX, GetY, 4, player-45, BLUE01, 0);
  1287.             CreateShot01(GetX, GetY, 4, player-54, BLUE01, 0);
  1288.             CreateShot01(GetX, GetY, 4, player-63, BLUE01, 0);
  1289.             wait(4);
  1290.         }
  1291.     }
  1292.    
  1293.     task spread17 {
  1294.         let player = GetAngleToPlayer;
  1295.        
  1296.         loop(3) {
  1297.             CreateShot01(GetX, GetY, 4, player, BLUE01, 0);
  1298.             CreateShot01(GetX, GetY, 4, player+5.625, BLUE01, 0);
  1299.             CreateShot01(GetX, GetY, 4, player+11.25, BLUE01, 0);
  1300.             CreateShot01(GetX, GetY, 4, player+16.875, BLUE01, 0);
  1301.             CreateShot01(GetX, GetY, 4, player+22.5, BLUE01, 0);
  1302.             CreateShot01(GetX, GetY, 4, player+28.125, BLUE01, 0);
  1303.             CreateShot01(GetX, GetY, 4, player+33.75, BLUE01, 0);
  1304.             CreateShot01(GetX, GetY, 4, player+39.375, BLUE01, 0);
  1305.             CreateShot01(GetX, GetY, 4, player+45, BLUE01, 0);
  1306.             CreateShot01(GetX, GetY, 4, player-5.625, BLUE01, 0);
  1307.             CreateShot01(GetX, GetY, 4, player-11.25, BLUE01, 0);
  1308.             CreateShot01(GetX, GetY, 4, player-16.875, BLUE01, 0);
  1309.             CreateShot01(GetX, GetY, 4, player-22.5, BLUE01, 0);
  1310.             CreateShot01(GetX, GetY, 4, player-28.125, BLUE01, 0);
  1311.             CreateShot01(GetX, GetY, 4, player-33.75, BLUE01, 0);
  1312.             CreateShot01(GetX, GetY, 4, player-39.375, BLUE01, 0);
  1313.             CreateShot01(GetX, GetY, 4, player-45, BLUE01, 0);
  1314.             wait(4);
  1315.         }
  1316.     }
  1317.    
  1318.     task movement {
  1319.         loop {
  1320.             SetMovePosition03(GetEnemyX+r*cos(famangle), GetEnemyY+r*sin(famangle), 20, 10);
  1321.             yield;
  1322.         }
  1323.     }
  1324.    
  1325.     function wait(w) {
  1326.         loop(w) {
  1327.             yield;
  1328.         }
  1329.     }
  1330. }
Advertisement
Add Comment
Please, Sign In to add comment