Advertisement
Guest User

it's something

a guest
Oct 20th, 2012
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.41 KB | None | 0 0
  1. #“Ś•ű’e–‹•—[Single]
  2. #ScriptVersion[3]
  3. #Title["10"]
  4. #Text["10"]
  5. #Background["script/default_system/Default_Background_IceMountain.txt"]
  6.  
  7. #include"script/default_system/Default_ShotConst.txt"
  8.  
  9. let objEnemy;
  10. let objPlayer;
  11. let frame = 0;
  12.  
  13. @Event{
  14. alternative(GetEventType())
  15. case(EV_REQUEST_LIFE){
  16. SetScriptResult(1500);
  17. }
  18. }
  19.  
  20. @Initialize{
  21. objPlayer = GetPlayerObjectID();
  22.  
  23. objEnemy = ObjEnemy_Create(OBJ_ENEMY_BOSS);
  24. ObjEnemy_Regist(objEnemy);
  25.  
  26. let imgExRumia = GetCurrentScriptDirectory ~ "ExRumia.png";
  27. ObjPrim_SetTexture(objEnemy, imgExRumia);
  28. ObjSprite2D_SetSourceRect(objEnemy, 64, 1, 127, 64);
  29. ObjSprite2D_SetDestCenter(objEnemy);
  30.  
  31. let cx = GetStgFrameWidth() / 2;
  32. ObjMove_SetDestAtFrame(objEnemy, cx, 120, 60);
  33.  
  34. let difficult=2;
  35.  
  36. PatternX();
  37. PatternY();
  38. Shield();
  39. }
  40.  
  41. @MainLoop{
  42. let ex = ObjMove_GetX(objEnemy);
  43. let ey = ObjMove_GetY(objEnemy);
  44. ObjEnemy_SetIntersectionCircleToShot(objEnemy, ex, ey, 32);
  45. ObjEnemy_SetIntersectionCircleToPlayer(objEnemy, ex, ey, 24);
  46.  
  47. frame++;
  48.  
  49. if(ObjEnemy_GetInfo(objEnemy, INFO_LIFE) <= 0){
  50. Obj_Delete(objEnemy);
  51. CloseScript(GetOwnScriptID());
  52. return;
  53. }
  54. yield;
  55. }
  56.  
  57. function wait(n){
  58. loop(n){yield;}
  59. }
  60.  
  61. task PatternX(){
  62. wait(60);
  63. loop{
  64. let random1=rand(70, 110);
  65. let random2=rand(81, 88);
  66. let random3=rand(80, 100);
  67. let random4=rand(85, 95);
  68. let wallx=0;
  69. while(wallx<=GetStgFrameWidth){
  70. let obj=CreateShotA1(wallx, 0, 2, random1, random2, 15);
  71. ObjMove_AddPatternA2(obj, 60, NO_CHANGE, NO_CHANGE, 0.02, 0, 5);
  72. ObjMove_AddPatternA2(obj, 120, NO_CHANGE, random3, 0.02, 0, 5);
  73. ObjMove_AddPatternA2(obj, 180, NO_CHANGE, random4, 0.02, 0, 5);
  74. wallx+=GetStgFrameWidth/Meiling;
  75. if(difficult==1){Meiling==2;}
  76. if(difficult==2){Meiling==4;}
  77. if(difficult==3){Meiling==6;}
  78. if(difficult==4){Meiling==9;}
  79. }
  80. wait(10);
  81. }
  82. }
  83.  
  84. task PatternY(){
  85. wait(60);
  86. loop{
  87. let ex = ObjMove_GetX(objEnemy);
  88. let ey = ObjMove_GetY(objEnemy);
  89.  
  90. let random=rand(-30, +30);
  91. let angle=0+random;
  92. while(angle<=360+random){
  93. CreateShotA1(ex, ey, 2, angle, rand(9, 16), 15);
  94. angle+=60
  95. }
  96. wait(Patchy);
  97. if(difficult==1){Patchy==60;}
  98. if(difficult==2){Patchy==30;}
  99. if(difficult==3){Patchy==25;}
  100. if(difficult==4){Patchy==20;}
  101. }
  102. }
  103.  
  104. task Shield(){
  105. ObjEnemy_SetDamageRate(objEnemy, 0, 0);
  106. wait(60);
  107. ObjEnemy_SetDamageRate(objEnemy, 100, 100);
  108. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement