Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include"./Drugs_Skeleton.txt"
- let Declare = false;
- let Type = "PURE";
- let CLICK = 0;
- let Value = 6;
- let GRAPHIC = DS_BALL_BS_RED;
- let M = -1;
- let A2 = 12;
- let TURNER = 61;
- let angle3 = 45;
- @Event
- {
- alternative(GetEventType())
- case(EV_REQUEST_LIFE){
- SetScriptResult(5200*1.7)
- }
- case(EV_REQUEST_TIMER) { SetScriptResult(50); }
- }
- @MainLoop{
- if(ObjMove_GetSpeed(objBoss)<=0){
- ObjSprite2D_SetSourceRect(objBoss, 0, 0, 128, 128);
- }
- if(animation==0){
- ObjMove_SetPosition(objBoss, GetStgFrameWidth+90, GetStgFrameHeight/2);
- ObjMove_SetDestAtFrame(objBoss, GetStgFrameWidth/2, 110, 100);
- ObjSprite2D_SetSourceRect(objBoss, 128*2, 128*1, 128*3, 128*2);
- }
- animation++;
- if(animation>=120){
- frame++;
- shot++;
- if(FreuMove==false){
- ObjEnemy_SetIntersectionCircleToShot(objBoss, ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 32);
- }
- if(ObjEnemy_GetInfo(objBoss, INFO_LIFE)<=0){
- Die(objBoss);
- }
- if(shot==15){
- Concentration_True(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), rand(0, 360), 5, 60, 3, 5, -4, 30, objBoss);
- Concentration_True(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), rand(0, 360), 5, 120, 5, 6, 4, 30, objBoss);
- PlaySoundA1(4, 100, 1);
- }
- if(frame==40){
- angle = GetAngleToPlayer(objBoss)-50*s;
- allow=0;
- }
- if(frame==50){
- if(s==1){
- SnowFaller1(ObjMove_GetX(objBoss)+20*cos(angle), ObjMove_GetY(objBoss)+20*sin(angle), 3, angle, DS_BALL_L_RED, DS_BALL_BS_BLUE, DS_BALL_BS_RED, 70);
- }
- if(s==-1){
- SnowFaller2(ObjMove_GetX(objBoss)+20*cos(angle), ObjMove_GetY(objBoss)+20*sin(angle), 3, angle, DS_BALL_L_BLUE, DS_BALL_BS_RED, DS_BALL_BS_BLUE, 70);
- }
- angle+=140/5*s;
- allow++;
- if(allow<5){
- frame-=9;
- }
- else{
- s*=-1;
- frame=0;
- }
- }
- }
- yield;
- }
- task Die1(tobj){
- loop(1){
- DeleteShotAll(TYPE_ALL, TYPE_FADE);
- }
- Obj_Delete(tobj);
- loop(100){
- yield;
- }
- CloseScript(GetOwnScriptID());
- }
- task MoveBoss(tobj, mod, time){
- let posX = GetPlayerX+rand(-20, 20);
- let posY = rand(80, 120);
- if(posX<=GetStgFrameWidth/6){
- posX=(GetStgFrameWidth/6)+20;
- }
- if(posX>=GetStgFrameWidth/6*5){
- posX=(GetStgFrameWidth/6*5)-20;
- }
- if(posY>=110){
- posY-=mod*2.1;
- }
- if(posY<=80){
- posY+=mod*2.1;
- }
- if(posX>ObjMove_GetX(objBoss)){
- ObjSprite2D_SetSourceRect(objBoss, 128*2, 128*3, 128*3, 128*4);
- //AuraMoveRight=true;
- }
- if(posX<ObjMove_GetX(objBoss)){
- ObjSprite2D_SetSourceRect(objBoss, 128*2, 128, 128*3, 128*2);
- //AuraMoveLeft=true;
- }
- ObjMove_SetDestAtFrame(tobj, posX, posY, time);
- }
- task Hermit(x, y, x2, y2, angle, angle2, time, graphic, color){
- let vx=(x2-x)/time;
- let vy=(y2-y)/time;
- let r=0;
- let a=0;
- loop(time){
- angle+=2; angle2+=2;
- x+=vx; y+=vy;
- a+=360/time; r=120-120*cos(a);
- ShrinkShot(x+r*cos(angle), y+r*sin(angle2),graphic, color);
- yield;
- }
- }
- task ShrinkShot(x, y, graphic,color){
- let obj=ObjShot_Create(OBJ_SHOT);
- ObjShot_Regist(obj);
- let sca=1;
- ObjShot_SetIntersectionEnable(obj, false);
- ObjShot_SetSpellResist(obj,true);
- ObjShot_SetGraphic(obj, graphic);
- ObjRender_SetBlendType(obj, BLEND_ADD_ARGB);
- if(color=="BLUE"){ObjRender_SetColor(obj,155,155,255);}
- if(color=="GREEN"){ObjRender_SetColor(obj, 155, 255, 155);}
- if(color=="RED"){ObjRender_SetColor(obj, 255, 155, 155);}
- if(color=="PURPLE"){ObjRender_SetColor(obj, 255, 155, 255);}
- if(color=="WHITE"){ObjRender_SetColor(obj, 255, 255, 255);}
- ObjRender_SetAlpha(obj, 60);
- ObjMove_SetPosition(obj, x, y);
- loop(10){
- sca-=1/15;
- ///ObjRender_SetScaleXYZ(obj, sca, sca, 1);
- yield;
- }
- Obj_Delete(obj);
- }
- task SnowFaller1(X, Y, Speed, Angle, Graphic1, Graphic2, Graphic3, Time){
- let obj = CreateShotA1(X, Y, Speed, Angle, Graphic1, 0);
- Obj_SetValue(obj, "RedBullet", 1);
- frame=0;
- while(!Obj_IsDeleted(obj)){
- frame++;
- if(frame==5){
- Faller(ObjMove_GetX(obj), ObjMove_GetY(obj), 4, Angle+180, Graphic2, Graphic3, Time);
- Faller(ObjMove_GetX(obj), ObjMove_GetY(obj), 4, Angle+180-30, Graphic2, Graphic3, Time);
- Faller(ObjMove_GetX(obj), ObjMove_GetY(obj), 4, Angle+180+30, Graphic2, Graphic3, Time);
- frame=0;
- }
- yield;
- }
- task Faller(X, Y, Speed, Angle, Graphic1, Graphic2, Time){
- let obj = CreateShotA1(X, Y, Speed, Angle, Graphic1, 0);
- ObjMove_SetAcceleration(obj, -Speed/Time);
- ObjMove_SetMaxSpeed(obj, 0);
- Obj_SetValue(obj, "BlueBullet", 1);
- ObjShot_SetAutoDelete(obj, false);
- let C = 0;
- while(!Obj_IsDeleted(obj)){
- if(ObjMove_GetSpeed(obj)<=0){
- C++;
- }
- if(C==15){
- let obj1 = CreateShotA1(ObjMove_GetX(obj), ObjMove_GetY(obj), 0, 90+rand(-6, 6), Graphic2, 10);
- ObjMove_SetAcceleration(obj1, 3/45);
- ObjMove_SetMaxSpeed(obj1, 3);
- Obj_SetValue(obj1, "RedBullet", 1);
- Obj_Delete(obj);
- }
- yield;
- }
- }
- }
- task SnowFaller2(X, Y, Speed, Angle, Graphic1, Graphic2, Graphic3, Time){
- let obj = CreateShotA1(X, Y, Speed, Angle, Graphic1, 0);
- Obj_SetValue(obj, "BlueBullet", 1);
- frame=0;
- while(!Obj_IsDeleted(obj)){
- frame++;
- if(frame==5){
- Faller(ObjMove_GetX(obj), ObjMove_GetY(obj), 4, Angle+180, Graphic2, Graphic3, Time);
- Faller(ObjMove_GetX(obj), ObjMove_GetY(obj), 4, Angle+180+30, Graphic2, Graphic3, Time);
- Faller(ObjMove_GetX(obj), ObjMove_GetY(obj), 4, Angle+180-30, Graphic2, Graphic3, Time);
- frame=0;
- }
- yield;
- }
- task Faller(X, Y, Speed, Angle, Graphic1, Graphic2, Time){
- let obj = CreateShotA1(X, Y, Speed, Angle, Graphic1, 0);
- ObjMove_SetAcceleration(obj, -Speed/Time);
- ObjMove_SetMaxSpeed(obj, 0);
- Obj_SetValue(obj, "RedBullet", 1);
- ObjShot_SetAutoDelete(obj, false);
- let C = 0;
- while(!Obj_IsDeleted(obj)){
- if(ObjMove_GetSpeed(obj)<=0){
- C++;
- }
- if(C==15){
- let obj1 = CreateShotA1(ObjMove_GetX(obj), ObjMove_GetY(obj), 0, 90+rand(-6, 6), Graphic2, 10);
- ObjMove_SetAcceleration(obj1, 3/45);
- ObjMove_SetMaxSpeed(obj1, 3);
- Obj_SetValue(obj1, "BlueBullet", 1);
- Obj_Delete(obj);
- }
- yield;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement