Advertisement
Guest User

Untitled

a guest
Dec 5th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.19 KB | None | 0 0
  1. #include"./Drugs_Skeleton.txt"
  2. let Declare = false;
  3. let Type = "PURE";
  4.  
  5. let CLICK = 0;
  6. let Value = 6;
  7. let GRAPHIC = DS_BALL_BS_RED;
  8. let M = -1;
  9. let A2 = 12;
  10. let TURNER = 61;
  11. let angle3 = 45;
  12. @Event
  13. {
  14. alternative(GetEventType())
  15. case(EV_REQUEST_LIFE){
  16. SetScriptResult(5200*1.7)
  17. }
  18.  
  19. case(EV_REQUEST_TIMER) { SetScriptResult(50); }
  20. }
  21.  
  22. @MainLoop{
  23.  
  24. if(ObjMove_GetSpeed(objBoss)<=0){
  25. ObjSprite2D_SetSourceRect(objBoss, 0, 0, 128, 128);
  26. }
  27.  
  28. if(animation==0){
  29. ObjMove_SetPosition(objBoss, GetStgFrameWidth+90, GetStgFrameHeight/2);
  30. ObjMove_SetDestAtFrame(objBoss, GetStgFrameWidth/2, 110, 100);
  31. ObjSprite2D_SetSourceRect(objBoss, 128*2, 128*1, 128*3, 128*2);
  32. }
  33. animation++;
  34.  
  35.  
  36. if(animation>=120){
  37. frame++;
  38. shot++;
  39.  
  40. if(FreuMove==false){
  41. ObjEnemy_SetIntersectionCircleToShot(objBoss, ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 32);
  42. }
  43.  
  44. if(ObjEnemy_GetInfo(objBoss, INFO_LIFE)<=0){
  45. Die(objBoss);
  46. }
  47.  
  48. if(shot==15){
  49. Concentration_True(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), rand(0, 360), 5, 60, 3, 5, -4, 30, objBoss);
  50. Concentration_True(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), rand(0, 360), 5, 120, 5, 6, 4, 30, objBoss);
  51. PlaySoundA1(4, 100, 1);
  52.  
  53. }
  54.  
  55. if(frame==40){
  56. angle = GetAngleToPlayer(objBoss)-50*s;
  57. allow=0;
  58. }
  59.  
  60. if(frame==50){
  61.  
  62. if(s==1){
  63. 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);
  64. }
  65.  
  66. if(s==-1){
  67. 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);
  68. }
  69.  
  70.  
  71. angle+=140/5*s;
  72.  
  73. allow++;
  74.  
  75. if(allow<5){
  76. frame-=9;
  77. }
  78.  
  79. else{
  80. s*=-1;
  81. frame=0;
  82. }
  83.  
  84. }
  85.  
  86.  
  87.  
  88. }
  89. yield;
  90. }
  91.  
  92. task Die1(tobj){
  93. loop(1){
  94. DeleteShotAll(TYPE_ALL, TYPE_FADE);
  95. }
  96. Obj_Delete(tobj);
  97.  
  98. loop(100){
  99. yield;
  100. }
  101.  
  102. CloseScript(GetOwnScriptID());
  103. }
  104.  
  105.  
  106. task MoveBoss(tobj, mod, time){
  107. let posX = GetPlayerX+rand(-20, 20);
  108. let posY = rand(80, 120);
  109.  
  110. if(posX<=GetStgFrameWidth/6){
  111. posX=(GetStgFrameWidth/6)+20;
  112. }
  113.  
  114. if(posX>=GetStgFrameWidth/6*5){
  115. posX=(GetStgFrameWidth/6*5)-20;
  116. }
  117.  
  118. if(posY>=110){
  119. posY-=mod*2.1;
  120. }
  121.  
  122. if(posY<=80){
  123. posY+=mod*2.1;
  124. }
  125.  
  126. if(posX>ObjMove_GetX(objBoss)){
  127. ObjSprite2D_SetSourceRect(objBoss, 128*2, 128*3, 128*3, 128*4);
  128. //AuraMoveRight=true;
  129. }
  130.  
  131. if(posX<ObjMove_GetX(objBoss)){
  132. ObjSprite2D_SetSourceRect(objBoss, 128*2, 128, 128*3, 128*2);
  133. //AuraMoveLeft=true;
  134. }
  135.  
  136. ObjMove_SetDestAtFrame(tobj, posX, posY, time);
  137.  
  138. }
  139.  
  140.  
  141. task Hermit(x, y, x2, y2, angle, angle2, time, graphic, color){
  142. let vx=(x2-x)/time;
  143. let vy=(y2-y)/time;
  144. let r=0;
  145. let a=0;
  146. loop(time){
  147. angle+=2; angle2+=2;
  148. x+=vx; y+=vy;
  149. a+=360/time; r=120-120*cos(a);
  150. ShrinkShot(x+r*cos(angle), y+r*sin(angle2),graphic, color);
  151. yield;
  152. }
  153.  
  154. }
  155. task ShrinkShot(x, y, graphic,color){
  156. let obj=ObjShot_Create(OBJ_SHOT);
  157. ObjShot_Regist(obj);
  158. let sca=1;
  159. ObjShot_SetIntersectionEnable(obj, false);
  160. ObjShot_SetSpellResist(obj,true);
  161. ObjShot_SetGraphic(obj, graphic);
  162. ObjRender_SetBlendType(obj, BLEND_ADD_ARGB);
  163. if(color=="BLUE"){ObjRender_SetColor(obj,155,155,255);}
  164. if(color=="GREEN"){ObjRender_SetColor(obj, 155, 255, 155);}
  165. if(color=="RED"){ObjRender_SetColor(obj, 255, 155, 155);}
  166. if(color=="PURPLE"){ObjRender_SetColor(obj, 255, 155, 255);}
  167. if(color=="WHITE"){ObjRender_SetColor(obj, 255, 255, 255);}
  168. ObjRender_SetAlpha(obj, 60);
  169. ObjMove_SetPosition(obj, x, y);
  170. loop(10){
  171. sca-=1/15;
  172. ///ObjRender_SetScaleXYZ(obj, sca, sca, 1);
  173. yield;
  174. }
  175. Obj_Delete(obj);
  176. }
  177.  
  178. task SnowFaller1(X, Y, Speed, Angle, Graphic1, Graphic2, Graphic3, Time){
  179. let obj = CreateShotA1(X, Y, Speed, Angle, Graphic1, 0);
  180. Obj_SetValue(obj, "RedBullet", 1);
  181.  
  182. frame=0;
  183. while(!Obj_IsDeleted(obj)){
  184. frame++;
  185.  
  186. if(frame==5){
  187. Faller(ObjMove_GetX(obj), ObjMove_GetY(obj), 4, Angle+180, Graphic2, Graphic3, Time);
  188. Faller(ObjMove_GetX(obj), ObjMove_GetY(obj), 4, Angle+180-30, Graphic2, Graphic3, Time);
  189. Faller(ObjMove_GetX(obj), ObjMove_GetY(obj), 4, Angle+180+30, Graphic2, Graphic3, Time);
  190. frame=0;
  191. }
  192. yield;
  193. }
  194.  
  195. task Faller(X, Y, Speed, Angle, Graphic1, Graphic2, Time){
  196. let obj = CreateShotA1(X, Y, Speed, Angle, Graphic1, 0);
  197. ObjMove_SetAcceleration(obj, -Speed/Time);
  198. ObjMove_SetMaxSpeed(obj, 0);
  199. Obj_SetValue(obj, "BlueBullet", 1);
  200. ObjShot_SetAutoDelete(obj, false);
  201.  
  202. let C = 0;
  203. while(!Obj_IsDeleted(obj)){
  204.  
  205. if(ObjMove_GetSpeed(obj)<=0){
  206. C++;
  207. }
  208.  
  209. if(C==15){
  210. let obj1 = CreateShotA1(ObjMove_GetX(obj), ObjMove_GetY(obj), 0, 90+rand(-6, 6), Graphic2, 10);
  211. ObjMove_SetAcceleration(obj1, 3/45);
  212. ObjMove_SetMaxSpeed(obj1, 3);
  213. Obj_SetValue(obj1, "RedBullet", 1);
  214. Obj_Delete(obj);
  215. }
  216.  
  217. yield;
  218. }
  219.  
  220. }
  221.  
  222. }
  223.  
  224. task SnowFaller2(X, Y, Speed, Angle, Graphic1, Graphic2, Graphic3, Time){
  225. let obj = CreateShotA1(X, Y, Speed, Angle, Graphic1, 0);
  226. Obj_SetValue(obj, "BlueBullet", 1);
  227.  
  228. frame=0;
  229. while(!Obj_IsDeleted(obj)){
  230. frame++;
  231.  
  232. if(frame==5){
  233. Faller(ObjMove_GetX(obj), ObjMove_GetY(obj), 4, Angle+180, Graphic2, Graphic3, Time);
  234. Faller(ObjMove_GetX(obj), ObjMove_GetY(obj), 4, Angle+180+30, Graphic2, Graphic3, Time);
  235. Faller(ObjMove_GetX(obj), ObjMove_GetY(obj), 4, Angle+180-30, Graphic2, Graphic3, Time);
  236. frame=0;
  237. }
  238. yield;
  239. }
  240.  
  241. task Faller(X, Y, Speed, Angle, Graphic1, Graphic2, Time){
  242. let obj = CreateShotA1(X, Y, Speed, Angle, Graphic1, 0);
  243. ObjMove_SetAcceleration(obj, -Speed/Time);
  244. ObjMove_SetMaxSpeed(obj, 0);
  245. Obj_SetValue(obj, "RedBullet", 1);
  246. ObjShot_SetAutoDelete(obj, false);
  247.  
  248. let C = 0;
  249. while(!Obj_IsDeleted(obj)){
  250.  
  251. if(ObjMove_GetSpeed(obj)<=0){
  252. C++;
  253. }
  254.  
  255. if(C==15){
  256. let obj1 = CreateShotA1(ObjMove_GetX(obj), ObjMove_GetY(obj), 0, 90+rand(-6, 6), Graphic2, 10);
  257. ObjMove_SetAcceleration(obj1, 3/45);
  258. ObjMove_SetMaxSpeed(obj1, 3);
  259. Obj_SetValue(obj1, "BlueBullet", 1);
  260. Obj_Delete(obj);
  261. }
  262.  
  263. yield;
  264. }
  265.  
  266. }
  267.  
  268. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement