Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //needs proper change in phases
- //needs movement
- //lacks background, bgm loop, sprites, sfx
- script_enemy_main {
- let csd = GetCurrentScriptDirectory;
- let imgboss = csd ~ "img\fam.png";
- let spin1 = 0;
- let spin2 = 0;
- @Initialize {
- SetLife(16000);
- SetTimer(360);
- SetMovePosition01(GetCenterX, 120, 5);
- SetDamageRate(100, 50);
- SetInvincibility(100);
- LoadGraphic(imgboss);
- mainTask;
- }
- @MainLoop {
- if(GetCommonDataDefault("kill", 0) == 1) {
- AddLife(-750);
- SetCommonData("kill", 0);
- }
- if(GetCommonDataDefault("phase", 0) == 1 && GetEnemyLife <= 5000) {
- SetCommonData("phase", GetCommonDataDefault("phase", 0) +1)
- }
- if(GetCommonDataDefault("phase", 0) == 2 && GetEnemyLife <= 3000) {
- SetCommonData("phase", GetCommonDataDefault("phase", 0) + 1);
- }
- SetCollisionA(GetX, GetY, 50);
- SetCollisionB(GetX, GetY, 50);
- yield;
- }
- @DrawLoop {
- SetTexture(imgboss);
- SetRenderState(ADD);
- SetGraphicScale(0.15, 0.15);
- SetGraphicAngle(0, 0, spin1);
- SetGraphicRect(1, 1, 735, 735);
- DrawGraphic(GetX, GetY);
- spin1-=5;
- SetTexture(imgboss);
- SetRenderState(ADD);
- SetGraphicScale(0.15, 0.15);
- SetGraphicAngle(0, 0, spin2);
- SetGraphicRect(1, 1, 735, 735);
- DrawGraphic(GetX, GetY);
- spin2+=5;
- }
- @BackGround {
- }
- @Finalize {
- DeleteGraphic(imgboss);
- CreateItem(ITEM_1UP, GetCenterX, GetCenterY);
- }
- task mainTask {
- yield;
- wait(60);
- spawn;
- wait(60);
- loop {
- if(GetCommonDataDefault("rng", 0) == 1) {
- wait(547);
- flower1;
- wait(366);
- flower2;
- wait(344);
- } else if(GetCommonDataDefault("rng", 0) == 2 && GetCommonDataDefault("rngl", 0) == 0 && GetCommonDataDefault("rngr", 0) == 0) {
- wait(605);
- flower1;
- wait(366);
- flower2;
- wait(344);
- } else if(GetCommonDataDefault("rng", 0) == 3 || (GetCommonDataDefault("rng", 0) == 2 && (GetCommonDataDefault("rngl", 0) == 1 || GetCommonDataDefault("rngr", 0) == 1))) {
- wait(663);
- flower1;
- wait(366);
- flower2;
- wait(344);
- } else if(GetCommonDataDefault("rng", 0) == 4 && GetCommonDataDefault("rngl", 0) == 1 && GetCommonDataDefault("rngr", 0) == 1 && GetCommonDataDefault("phase", 0) == 0) {
- wait(721);
- flower1;
- wait(366);
- flower2;
- wait(344);
- } else if(GetCommonDataDefault("phase", 0) == 1) {
- wait(13);
- clock;
- wait(256);
- ring1;
- wait(239);
- counterclock;
- wait(256);
- ring1;
- wait(226);
- } else if(GetCommonDataDefault("phase", 0) == 2) {
- wait(13);
- clock;
- wait(244);
- ring2;
- wait(261);
- counterclock;
- wait(244);
- ring2;
- wait(248);
- } else if(GetCommonDataDefault("phase", 0) == 3) {
- wait(13);
- clock;
- wait(232);
- ring3;
- wait(279);
- counterclock;
- wait(232);
- ring3;
- wait(266);
- } else {
- wait(489);
- flower1;
- wait(366);
- flower2;
- wait(344);
- }
- yield;
- }
- }
- task clock {
- let dir = 46;
- loop(20) {
- let x = GetEnemyX+50*cos(dir);
- let y = GetEnemyY+50*sin(dir);
- CreateShot01(x, y, 3, atan2(GetPlayerY - y, GetPlayerX - x), BLUE01, 0);
- dir+=90/20;
- wait(5);
- }
- dir = 46;
- wait(127);
- yield;
- }
- task counterclock {
- let dir = 134;
- loop(20) {
- let x = GetEnemyX+50*cos(dir);
- let y = GetEnemyY+50*sin(dir);
- CreateShot01(x, y, 3, atan2(GetPlayerY - y, GetPlayerX - x), BLUE01, 0);
- dir-=90/20;
- wait(5);
- }
- dir = 134;
- wait(127);
- }
- task ring1 {
- let dir = 90;
- let x = 0;
- loop(6) {
- while(x < 36) {
- CreateShot01(GetEnemyX+50*cos(dir), GetEnemyY+50*sin(dir), 3, dir, BLUE01, 0);
- dir+=360/36;
- x++
- }
- dir = rand(0, 359);
- x = 0;
- wait(13);
- }
- }
- task ring2 {
- let dir = 90;
- let x = 0;
- loop(10) {
- while(x < 36) {
- CreateShot01(GetEnemyX+50*cos(dir), GetEnemyY+50*sin(dir), 3, dir, BLUE01, 0);
- dir+=360/36;
- x++
- }
- dir = rand(0, 359);
- x = 0;
- wait(13);
- }
- }
- task ring3 {
- let dir = 90;
- let x = 0;
- loop(14) {
- while(x < 36) {
- CreateShot01(GetEnemyX+50*cos(dir), GetEnemyY+50*sin(dir), 3, dir, BLUE01, 0);
- dir+=360/36;
- x++
- }
- dir = rand(0, 359);
- x = 0;
- wait(13);
- }
- }
- task flower1 {
- let dir11 = 90;
- let dir12 = 96;
- let dir13 = 101;
- let dir21 = 90;
- let dir22 = 84;
- let dir23 = 78;
- let x = 0;
- loop(10) {
- while(x<6) {
- CreateShotA(11, GetEnemyX+50*cos(dir11), GetEnemyY+50*sin(dir11), 0);
- CreateShotA(12, GetEnemyX+35*cos(dir12), GetEnemyY+35*sin(dir12), 0);
- CreateShotA(13, GetEnemyX+20*cos(dir13), GetEnemyY+20*sin(dir13), 0);
- CreateShotA(21, GetEnemyX+32*cos(dir21), GetEnemyY+32*sin(dir21), 0);
- CreateShotA(22, GetEnemyX+17*cos(dir22), GetEnemyY+17*sin(dir22), 0);
- CreateShotA(23, GetEnemyX+2*cos(dir23), GetEnemyY+2*sin(dir23), 0);
- SetShotDataA(11, 0, 8, dir11, 0, -0.75, 4, PURPLE22);
- SetShotDataA(12, 0, 8, dir12, 0, -0.75, 3.5, PURPLE22);
- SetShotDataA(13, 0, 8, dir13, 0, -0.75, 3, PURPLE22);
- SetShotDataA(21, 0, 5, dir21, 0, -0.5, 2.5, PURPLE22);
- SetShotDataA(22, 0, 5, dir22, 0, -0.5, 2.25, PURPLE22);
- SetShotDataA(23, 0, 5, dir23, 0, -0.5, 2, PURPLE22);
- FireShot(11);
- FireShot(12);
- FireShot(13);
- FireShot(21);
- FireShot(22);
- FireShot(23);
- dir11+=360/6;
- dir12+=360/6;
- dir13+=360/6;
- dir21+=360/6;
- dir22+=360/6;
- dir23+=360/6;
- x++;
- }
- dir11+=19;
- dir12+=19;
- dir13+=19;
- dir21+=19;
- dir22+=19;
- dir23+=19;
- x = 0;
- wait(25);
- }
- }
- task flower2 {
- let dir11 = 90;
- let dir12 = 96;
- let dir13 = 101;
- let dir21 = 90;
- let dir22 = 84;
- let dir23 = 78;
- let x = 0;
- loop(10) {
- while(x<6) {
- CreateShotA(11, GetEnemyX+32*cos(dir11), GetEnemyY+32*sin(dir11), 0);
- CreateShotA(12, GetEnemyX+17*cos(dir12), GetEnemyY+17*sin(dir12), 0);
- CreateShotA(13, GetEnemyX+2*cos(dir13), GetEnemyY+2*sin(dir13), 0);
- CreateShotA(21, GetEnemyX+50*cos(dir21), GetEnemyY+50*sin(dir21), 0);
- CreateShotA(22, GetEnemyX+35*cos(dir22), GetEnemyY+35*sin(dir22), 0);
- CreateShotA(23, GetEnemyX+20*cos(dir23), GetEnemyY+20*sin(dir23), 0);
- SetShotDataA(11, 0, 5, dir11, 0, -0.5, 2.5, PURPLE22);
- SetShotDataA(12, 0, 5, dir12, 0, -0.5, 2.25, PURPLE22);
- SetShotDataA(13, 0, 5, dir13, 0, -0.5, 2, PURPLE22);
- SetShotDataA(21, 0, 8, dir21, 0, -0.75, 4, PURPLE22);
- SetShotDataA(22, 0, 8, dir22, 0, -0.75, 3.5, PURPLE22);
- SetShotDataA(23, 0, 8, dir23, 0, -0.75, 3, PURPLE22);
- FireShot(11);
- FireShot(12);
- FireShot(13);
- FireShot(21);
- FireShot(22);
- FireShot(23);
- dir11+=360/6;
- dir12+=360/6;
- dir13+=360/6;
- dir21+=360/6;
- dir22+=360/6;
- dir23+=360/6;
- x++;
- }
- dir11+=19;
- dir12+=19;
- dir13+=19;
- dir21+=19;
- dir22+=19;
- dir23+=19;
- x = 0;
- wait(25);
- }
- }
- sub spawn {
- CreateEnemyFromScript("rotor", GetEnemyX, GetEnemyY, 0, 0, 0);
- CreateEnemyFromScript("rotor", GetEnemyX, GetEnemyY, 0, 0, 180);
- CreateEnemyFromScript("beak", GetEnemyX, GetEnemyY, 0, 0, 90);
- CreateEnemyFromScript("cannon", GetEnemyX, GetEnemyY, 0, 0, 62);
- CreateEnemyFromScript("cannon", GetEnemyX, GetEnemyY, 0, 0, 118);
- CreateEnemyFromScript("lowturret", GetEnemyX, GetEnemyY, 0, 0, 130);
- CreateEnemyFromScript("lowturret", GetEnemyX, GetEnemyY, 0, 0, 50);
- CreateEnemyFromScript("highturret", GetEnemyX, GetEnemyY, 0, 0, 330);
- CreateEnemyFromScript("highturret", GetEnemyX, GetEnemyY, 0, 0, 210);
- CreateEnemyFromScript("turret", GetEnemyX, GetEnemyY, 0, 0, 0);
- CreateEnemyFromScript("turret", GetEnemyX, GetEnemyY, 0, 0, 180);
- CreateEnemyFromScript("sidecannon", GetEnemyX, GetEnemyY, 0, 0, 150);
- CreateEnemyFromScript("sidecannon", GetEnemyX, GetEnemyY, 0, 0, 30);
- }
- function wait(w) {
- loop(w) {
- yield;
- }
- }
- }
- script_enemy rotor {
- let csd = GetCurrentScriptDirectory;
- let rotor = csd ~ "img\fam.png";
- let dir = 0;
- let r = 130;
- let spin = 0;
- let famangle = GetArgument;
- @Initialize {
- SetLife(1);
- SetDamageRateEx(0, 0, 50, 25);
- LoadGraphic(rotor);
- mainTask;
- }
- @MainLoop {
- SetCollisionA(GetX, GetY, 50);
- SetCollisionB(GetX, GetY, 50);
- yield;
- }
- @DrawLoop {
- SetTexture(rotor);
- SetRenderState(ADD);
- SetGraphicScale(0.15, 0.15);
- SetGraphicAngle(0, 0, spin);
- SetGraphicRect(1, 1, 735, 735);
- DrawGraphic(GetX, GetY);
- if(GetX < GetCenterX) {
- spin+=5;
- } else {
- spin-=5;
- }
- }
- @Finalize {
- }
- task mainTask {
- yield;
- movement;
- wait(60);
- }
- task movement {
- loop {
- SetMovePosition03(GetEnemyX+r*cos(famangle), GetEnemyY+r*sin(famangle), 20, 10);
- yield;
- }
- }
- function wait(w) {
- loop(w) {
- yield;
- }
- }
- }
- script_enemy beak {
- let csd = GetCurrentScriptDirectory;
- let beak = csd ~ "img\fam.png";
- let dir = 0;
- let r = 100;
- let famangle = GetArgument;
- @Initialize {
- SetLife(5000);
- SetDamageRateEx(100, 50, 0, 0);
- LoadGraphic(beak);
- mainTask;
- }
- @MainLoop {
- if(GetEnemyLife<=7000) {
- AddLife(-5000);
- }
- SetCollisionA(GetX, GetY, 30);
- SetCollisionB(GetX, GetY, 30);
- yield;
- }
- @DrawLoop {
- SetTexture(beak);
- SetRenderState(ADD);
- SetGraphicScale(0.075, 0.075);
- SetGraphicAngle(0, 0, 0);
- SetGraphicRect(1, 1, 735, 735);
- DrawGraphic(GetX, GetY);
- }
- @Finalize {
- SetCommonData("kill", GetCommonDataDefault("kill", 0) +1);
- SetCommonData("phase", GetCommonDataDefault("phase", 0) +1);
- }
- task mainTask {
- yield;
- movement;
- wait(60);
- }
- task movement {
- loop {
- SetMovePosition03(GetEnemyX+r*cos(famangle), GetEnemyY+r*sin(famangle), 20, 10);
- yield;
- }
- }
- function wait(w) {
- loop(w) {
- yield;
- }
- }
- }
- script_enemy cannon {
- let csd = GetCurrentScriptDirectory;
- let cannon = csd ~ "img\fam.png";
- let dir = 0;
- let r = 110;
- let spin = 0;
- let famangle = GetArgument;
- @Initialize {
- SetLife(1250);
- SetDamageRateEx(100, 50, 0, 0);
- LoadGraphic(cannon);
- mainTask;
- }
- @MainLoop {
- if(GetCommonDataDefault("phase", 0) == 1) {
- AddLife(-2000);
- }
- SetCollisionA(GetX, GetY, 15);
- SetCollisionB(GetX, GetY, 15);
- yield;
- }
- @DrawLoop {
- SetTexture(cannon);
- SetRenderState(ADD);
- SetGraphicScale(0.05, 0.05);
- SetGraphicAngle(0, 0, spin);
- SetGraphicRect(1, 1, 735, 735);
- DrawGraphic(GetX, GetY);
- if(GetX < GetCenterX) {
- spin+=5;
- } else {
- spin-=5;
- }
- }
- @Finalize {
- SetCommonData("kill", GetCommonDataDefault("kill", 0) +1);
- SetCommonData("rng", GetCommonDataDefault("rng", 0) +1);
- }
- task mainTask {
- yield;
- movement;
- wait(60);
- redtwin;
- }
- task redtwin {
- loop {
- if(GetCommonDataDefault("rng", 0) == 1) {
- loop(17) {
- CreateShot01(GetX+5, GetY, 3, 90, RED32, 0);
- CreateShot01(GetX-5, GetY, 3, 90, RED32, 0);
- wait(25);
- }
- wait(832);
- } else if(GetCommonDataDefault("rng", 0) == 2) {
- loop(21) {
- CreateShot01(GetX+5, GetY, 3, 90, RED32, 0);
- CreateShot01(GetX-5, GetY, 3, 90, RED32, 0);
- wait(25);
- }
- wait(848);
- } else {
- loop(14) {
- CreateShot01(GetX+5, GetY, 3, 90, RED32, 0);
- CreateShot01(GetX-5, GetY, 3, 90, RED32, 0);
- wait(25);
- }
- wait(849);
- }
- yield;
- }
- }
- task movement {
- loop {
- SetMovePosition03(GetEnemyX+r*cos(famangle), GetEnemyY+r*sin(famangle), 20, 10);
- yield;
- }
- }
- function wait(w) {
- loop(w) {
- yield;
- }
- }
- }
- script_enemy lowturret {
- let csd = GetCurrentScriptDirectory;
- let lowturret = csd ~ "img\fam.png";
- let dir = 0;
- let r = 80;
- let spin = 0;
- let famangle = GetArgument;
- @Initialize {
- SetLife(2500);
- SetDamageRateEx(100, 50, 0, 0);
- LoadGraphic(lowturret);
- mainTask;
- }
- @MainLoop {
- if(GetCommonDataDefault("phase", 0) == 1) {
- AddLife(-2500);
- }
- SetCollisionA(GetX, GetY, 15);
- SetCollisionB(GetX, GetY, 15);
- yield;
- }
- @DrawLoop {
- SetTexture(lowturret);
- SetRenderState(ADD);
- SetGraphicScale(0.05, 0.05);
- SetGraphicAngle(0, 0, spin);
- SetGraphicRect(1, 1, 735, 735);
- DrawGraphic(GetX, GetY);
- if(GetX < GetCenterX) {
- spin+=5;
- } else {
- spin-=5;
- }
- }
- @Finalize {
- SetCommonData("kill", GetCommonDataDefault("kill", 0) +1);
- SetCommonData("rng", GetCommonDataDefault("rng", 0) +1);
- if(GetX > GetCenterX) {
- SetCommonData("rngr", GetCommonDataDefault("rngr", 0) +1);
- } else {
- SetCommonData("rngl", GetCommonDataDefault("rngl", 0) +1);
- }
- }
- task mainTask {
- yield;
- movement;
- wait(60);
- laser;
- }
- task laser {
- loop {
- if(GetCommonDataDefault("rng", 0) == 1) {
- wait(25);
- mlaser2;
- wait(228);
- mlaser2;
- wait(1004);
- } else if(GetCommonDataDefault("rng", 0) == 2 && GetCommonDataDefault("rngl", 0) == 0 && GetCommonDataDefault("rngr", 0) == 0) {
- wait(25);
- mlaser3;
- wait(257);
- mlaser3;
- wait(1033);
- } else if(GetCommonDataDefault("rngl", 0) == 1 || GetCommonDataDefault("rngr", 0) == 1) {
- wait(25);
- mlaser4;
- wait(286);
- mlaser4;
- wait(1062);
- } else {
- wait(25);
- mlaser1;
- wait(199);
- mlaser1;
- wait(975);
- }
- yield;
- }
- }
- task mlaser1 {
- loop(3) {
- laser1;
- wait(29);
- }
- }
- task mlaser2 {
- loop(4) {
- laser1;
- wait(29);
- }
- }
- task mlaser3 {
- loop(5) {
- laser1;
- wait(29);
- }
- }
- task mlaser4 {
- loop(6) {
- laser1;
- wait(29);
- }
- }
- task laser1 {
- let player = GetAngleToPlayer;
- loop(4) {
- CreateShot01(GetX, GetY, 4, player, PURPLE32, 0);
- wait(4);
- }
- }
- task movement {
- loop {
- SetMovePosition03(GetEnemyX+r*cos(famangle), GetEnemyY+r*sin(famangle), 20, 10);
- yield;
- }
- }
- function wait(w) {
- loop(w) {
- yield;
- }
- }
- }
- script_enemy highturret {
- let csd = GetCurrentScriptDirectory;
- let highturret = csd ~ "img\fam.png";
- let dir = 0;
- let r = 80;
- let spin = 0;
- let famangle = GetArgument;
- @Initialize {
- SetLife(1);
- SetDamageRateEx(0, 0, 0, 0);
- LoadGraphic(highturret);
- mainTask;
- }
- @MainLoop {
- SetCollisionA(GetX, GetY, 0);
- SetCollisionB(GetX, GetY, 0);
- yield;
- }
- @DrawLoop {
- SetTexture(highturret);
- SetRenderState(ADD);
- SetGraphicScale(0.05, 0.05);
- SetGraphicAngle(0, 0, spin);
- SetGraphicRect(1, 1, 735, 735);
- DrawGraphic(GetX, GetY);
- if(GetX < GetCenterX) {
- spin+=5;
- } else {
- spin-=5;
- }
- }
- @Finalize {
- }
- task mainTask {
- yield;
- movement;
- wait(60);
- laser;
- }
- task laser {
- loop {
- if(GetCommonDataDefault("rng", 0) == 1) {
- wait(25);
- mlaser2;
- wait(228);
- mlaser2;
- wait(1004);
- } else if(GetCommonDataDefault("rng", 0) == 2 && GetCommonDataDefault("rngl", 0) == 0 && GetCommonDataDefault("rngr", 0) == 0) {
- wait(25);
- mlaser3;
- wait(257);
- mlaser3;
- wait(1033);
- } else if(GetCommonDataDefault("rng", 0) == 3 || (GetCommonDataDefault("rng", 0) == 2 && (GetCommonDataDefault("rngl", 0) == 1 || GetCommonDataDefault("rngr", 0) == 1))) {
- wait(25);
- if((GetCommonDataDefault("rngl", 0) == 1 && GetX > GetCenterX) || (GetCommonDataDefault("rngr", 0) == 1 && GetX < GetCenterX)) {
- mlaser4;
- } else if((GetCommonDataDefault("rngl", 0) == 1 && GetX < GetCenterX) || (GetCommonDataDefault("rngr", 0) == 1 && GetX > GetCenterX)) {
- mlaser4rng;
- }
- wait(286);
- if((GetCommonDataDefault("rngl", 0) == 1 && GetX > GetCenterX) || (GetCommonDataDefault("rngr", 0) == 1 && GetX < GetCenterX)) {
- mlaser4;
- } else if((GetCommonDataDefault("rngl", 0) == 1 && GetX < GetCenterX) || (GetCommonDataDefault("rngr", 0) == 1 && GetX > GetCenterX)) {
- mlaser4rng;
- }
- wait(1062);
- } else if(GetCommonDataDefault("rng", 0) == 4 && GetCommonDataDefault("rngl", 0) == 1 && GetCommonDataDefault("rngr", 0) == 1 && GetCommonDataDefault("phase", 0) == 0) {
- wait(25);
- mlaser5;
- wait(315);
- mlaser5;
- wait(1091);
- } else if(GetCommonDataDefault("phase", 0) == 1) {
- if(GetX < GetCenterX) {
- spirall1;
- wait(86);
- } else if(GetX > GetCenterX) {
- spiralr1;
- wait(86);
- }
- } else if(GetCommonDataDefault("phase", 0) == 2) {
- if(GetX < GetCenterX) {
- spirall1;
- wait(86);
- } else if(GetX > GetCenterX) {
- spiralr2;
- wait(43);
- }
- } else if(GetCommonDataDefault("phase", 0) == 3) {
- if(GetX < GetCenterX) {
- spirall2;
- wait(43);
- } else if(GetX > GetCenterX) {
- spiralr2;
- wait(43);
- }
- } else {
- wait(25);
- mlaser1;
- wait(199);
- mlaser1;
- wait(975);
- }
- yield;
- }
- }
- task spiralr1 {
- let dir = 90;
- loop(43) {
- CreateShot01(GetX, GetY, 3, dir, PURPLE32, 0);
- dir+=360/43*2;
- wait(1);
- yield;
- }
- }
- task spiralr2 {
- let dir = 90;
- loop(43) {
- CreateShot01(GetX, GetY, 3, dir, PURPLE32, 0);
- dir+=360/43*2;
- yield;
- }
- }
- task spirall1 {
- let dir = 90;
- loop(43) {
- CreateShot01(GetX, GetY, 3, dir, PURPLE32, 0);
- dir-=360/43*2;
- wait(1);
- yield;
- }
- }
- task spirall2 {
- let dir = 90;
- loop(43) {
- CreateShot01(GetX, GetY, 3, dir, PURPLE32, 0);
- dir-=360/43*2;
- yield;
- }
- }
- task mlaser1 {
- loop(3) {
- laser1;
- wait(29);
- }
- }
- task mlaser2 {
- loop(4) {
- laser1;
- wait(29);
- }
- }
- task mlaser3 {
- loop(5) {
- laser1;
- wait(29);
- }
- }
- task mlaser4rng {
- loop(6) {
- laser3;
- wait(29);
- }
- }
- task mlaser4 {
- loop(6) {
- laser1;
- wait(29);
- }
- }
- task mlaser5 {
- loop(7) {
- laser3;
- wait(29);
- }
- }
- task laser1 {
- let player = GetAngleToPlayer;
- loop(4) {
- CreateShot01(GetX, GetY, 4, player, PURPLE32, 0);
- wait(4);
- }
- }
- task laser3 {
- let player = GetAngleToPlayer;
- loop(4) {
- CreateShot01(GetX, GetY, 4, player, PURPLE32, 0);
- CreateShot01(GetX, GetY, 4, player+3, PURPLE32, 0);
- CreateShot01(GetX, GetY, 4, player-3, PURPLE32, 0);
- wait(4);
- }
- }
- task movement {
- loop {
- SetMovePosition03(GetEnemyX+r*cos(famangle), GetEnemyY+r*sin(famangle), 20, 10);
- yield;
- }
- }
- function wait(w) {
- loop(w) {
- yield;
- }
- }
- }
- script_enemy turret {
- let csd = GetCurrentScriptDirectory;
- let turret = csd ~ "img\fam.png";
- let dir = 0;
- let r = 66;
- let spin = 0;
- let famangle = GetArgument;
- @Initialize {
- SetLife(1);
- SetDamageRateEx(0, 0, 0, 0);
- LoadGraphic(turret);
- mainTask;
- }
- @MainLoop {
- SetCollisionA(GetX, GetY, 0);
- SetCollisionB(GetX, GetY, 0);
- yield;
- }
- @DrawLoop {
- SetTexture(turret);
- SetRenderState(ADD);
- SetGraphicScale(0.025, 0.025);
- SetGraphicAngle(0, 0, spin);
- SetGraphicRect(1, 1, 735, 735);
- DrawGraphic(GetX, GetY);
- if(GetX < GetCenterX) {
- spin+=5;
- } else {
- spin-=5;
- }
- }
- @Finalize {
- }
- task mainTask {
- yield;
- movement;
- wait(60);
- wide;
- }
- task wide {
- loop {
- if(GetCommonDataDefault("rng", 0) == 1) {
- wait(429);
- loop(8) {
- wide5;
- wait(97);
- }
- wait(52);
- } else if(GetCommonDataDefault("rng", 0) == 2 && GetCommonDataDefault("rngl", 0) == 0 && GetCommonDataDefault("rngr", 0) == 0) {
- wait(487);
- loop(8) {
- wide7;
- wait(97);
- }
- wait(52);
- } else if(GetCommonDataDefault("rng", 0) == 3 || (GetCommonDataDefault("rng", 0) == 2 && (GetCommonDataDefault("rngl", 0) == 1 || GetCommonDataDefault("rngr", 0) == 1))) {
- wait(545);
- loop(8) {
- wide7;
- wait(97);
- }
- wait(52);
- } else if(GetCommonDataDefault("rng", 0) == 4 && GetCommonDataDefault("phase", 0) == 0) {
- wait(603);
- loop(8) {
- wide7;
- wait(97);
- }
- wait(52);
- } else if(GetCommonDataDefault("phase", 0) == 1) {
- loop(2) {
- wide9;
- wait(97);
- }
- wait(301);
- } else if(GetCommonDataDefault("phase", 0) == 2) {
- wide9;
- wait(97);
- } else if(GetCommonDataDefault("phase", 0) == 3) {
- wide9;
- wait(97);
- } else {
- wait(371);
- loop(8) {
- wide3;
- wait(97);
- }
- wait(52);
- }
- yield;
- }
- }
- task wide3 {
- let player = GetAngleToPlayer;
- CreateShot01(GetX, GetY, 2, player, BLUE05, 0);
- CreateShot01(GetX, GetY, 2, player+2, BLUE05, 0);
- CreateShot01(GetX, GetY, 2, player-2, BLUE05, 0);
- }
- task wide5 {
- let player = GetAngleToPlayer;
- CreateShot01(GetX, GetY, 2, player, BLUE05, 0);
- CreateShot01(GetX, GetY, 2, player+2, BLUE05, 0);
- CreateShot01(GetX, GetY, 2, player+4, BLUE05, 0);
- CreateShot01(GetX, GetY, 2, player-2, BLUE05, 0);
- CreateShot01(GetX, GetY, 2, player-4, BLUE05, 0);
- }
- task wide7 {
- let player = GetAngleToPlayer;
- CreateShot01(GetX, GetY, 2, player, BLUE05, 0);
- CreateShot01(GetX, GetY, 2, player+2, BLUE05, 0);
- CreateShot01(GetX, GetY, 2, player+4, BLUE05, 0);
- CreateShot01(GetX, GetY, 2, player+6, BLUE05, 0);
- CreateShot01(GetX, GetY, 2, player-2, BLUE05, 0);
- CreateShot01(GetX, GetY, 2, player-4, BLUE05, 0);
- CreateShot01(GetX, GetY, 2, player-6, BLUE05, 0);
- }
- task wide9 {
- let player = GetAngleToPlayer;
- CreateShot01(GetX, GetY, 3, player, BLUE05, 0);
- CreateShot01(GetX, GetY, 3, player+2, BLUE05, 0);
- CreateShot01(GetX, GetY, 3, player+4, BLUE05, 0);
- CreateShot01(GetX, GetY, 3, player+6, BLUE05, 0);
- CreateShot01(GetX, GetY, 3, player+8, BLUE05, 0);
- CreateShot01(GetX, GetY, 3, player-2, BLUE05, 0);
- CreateShot01(GetX, GetY, 3, player-4, BLUE05, 0);
- CreateShot01(GetX, GetY, 3, player-6, BLUE05, 0);
- CreateShot01(GetX, GetY, 3, player-8, BLUE05, 0);
- }
- task movement {
- loop {
- SetMovePosition03(GetEnemyX+r*cos(famangle), GetEnemyY+r*sin(famangle), 20, 10);
- yield;
- }
- }
- function wait(w) {
- loop(w) {
- yield;
- }
- }
- }
- script_enemy sidecannon {
- let csd = GetCurrentScriptDirectory;
- let sidecannon = csd ~ "img\fam.png";
- let dir = 0;
- let r = 80;
- let spin = 0;
- let famangle = GetArgument;
- @Initialize {
- SetLife(1);
- SetDamageRateEx(0, 0, 0, 0);
- LoadGraphic(sidecannon);
- mainTask;
- }
- @MainLoop {
- SetCollisionA(GetX, GetY, 0);
- SetCollisionB(GetX, GetY, 0);
- yield;
- }
- @DrawLoop {
- SetTexture(sidecannon);
- SetRenderState(ADD);
- SetGraphicScale(0.05, 0.05);
- SetGraphicAngle(0, 0, spin);
- SetGraphicRect(1, 1, 735, 735);
- DrawGraphic(GetX, GetY);
- if(GetX < GetCenterX) {
- spin+=5;
- } else {
- spin-=5;
- }
- }
- @Finalize {
- }
- task mainTask {
- yield;
- movement;
- wait(60);
- spread;
- }
- task spread {
- loop {
- if(GetCommonDataDefault("rng", 0) == 1) {
- wait(156);
- spread7;
- wait(228);
- spread9;
- wait(873);
- } else if(GetCommonDataDefault("rng", 0) == 2 && GetCommonDataDefault("rngl", 0) == 0 && GetCommonDataDefault("rngr", 0) == 0) {
- wait(185);
- spread9;
- wait(257);
- spread11;
- wait(873);
- } else if(GetCommonDataDefault("rng", 0) == 3 || (GetCommonDataDefault("rng", 0) == 2 && (GetCommonDataDefault("rngl", 0) == 1 || GetCommonDataDefault("rngr", 0) == 1))) {
- wait(214);
- spread11;
- wait(286);
- spread13;
- wait(873);
- } else if(GetCommonDataDefault("rng", 0) == 4 && GetCommonDataDefault("rngl", 0) == 1 && GetCommonDataDefault("rngr", 0) == 1 && GetCommonDataDefault("phase", 0) == 0) {
- wait(243);
- spread13;
- wait(315);
- spread15;
- wait(873);
- } else if(GetCommonDataDefault("phase", 0) == 1) {
- wait(140);
- spread17;
- wait(355);
- } else if(GetCommonDataDefault("phase", 0) == 2) {
- } else if(GetCommonDataDefault("phase", 0) == 3) {
- } else {
- wait(127);
- spread5;
- wait(199);
- spread7;
- wait(873);
- }
- yield;
- }
- }
- task spread5 {
- let player = GetAngleToPlayer;
- loop(8) {
- CreateShot01(GetX, GetY, 4, player, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+22.5, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+45, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-22.5, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-45, BLUE01, 0);
- wait(4);
- }
- }
- task spread7 {
- let player = GetAngleToPlayer;
- loop(8) {
- CreateShot01(GetX, GetY, 4, player, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+22.5, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+45, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+67.5, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-22.5, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-45, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-67.5, BLUE01, 0);
- wait(4);
- }
- }
- task spread9 {
- let player = GetAngleToPlayer;
- loop(8) {
- CreateShot01(GetX, GetY, 4, player, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+22.5, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+45, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+67.5, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+90, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-22.5, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-45, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-67.5, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-90, BLUE01, 0);
- wait(4);
- }
- }
- task spread11 {
- let player = GetAngleToPlayer;
- loop(8) {
- CreateShot01(GetX, GetY, 4, player, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+13.5, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+27, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+40.5, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+54, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+67.5, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-13.5, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-27, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-40.5, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-54, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-67.5, BLUE01, 0);
- wait(4);
- }
- }
- task spread13 {
- let player = GetAngleToPlayer;
- loop(8) {
- CreateShot01(GetX, GetY, 4, player, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+11.25, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+22.5, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+33.75, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+45, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+56.25, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+67.5, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-11.25, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-22.5, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-33.75, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-45, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-56.25, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-67.5, BLUE01, 0);
- wait(4);
- }
- }
- task spread15 {
- let player = GetAngleToPlayer;
- loop(8) {
- CreateShot01(GetX, GetY, 4, player, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+9, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+18, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+27, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+36, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+45, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+54, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+63, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-9, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-18, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-27, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-36, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-45, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-54, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-63, BLUE01, 0);
- wait(4);
- }
- }
- task spread17 {
- let player = GetAngleToPlayer;
- loop(3) {
- CreateShot01(GetX, GetY, 4, player, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+5.625, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+11.25, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+16.875, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+22.5, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+28.125, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+33.75, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+39.375, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player+45, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-5.625, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-11.25, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-16.875, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-22.5, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-28.125, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-33.75, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-39.375, BLUE01, 0);
- CreateShot01(GetX, GetY, 4, player-45, BLUE01, 0);
- wait(4);
- }
- }
- task movement {
- loop {
- SetMovePosition03(GetEnemyX+r*cos(famangle), GetEnemyY+r*sin(famangle), 20, 10);
- yield;
- }
- }
- function wait(w) {
- loop(w) {
- yield;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment