yuhsing

Untitled

Nov 15th, 2012
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.76 KB | None | 0 0
  1. guild_vs4,50,50,5 script Stage Game 437,{
  2.  
  3. // Monster ID / Amount Initiating ( Check db/Mob_db.txt || db/Mob_db2.txt )
  4. setarray .Stage[0],
  5. 1001,1, // Stage 1 + Amount
  6. 1002,1; // Final Stage ( Max. ~64 Rounds )
  7.  
  8. // Reward ID / Amount Initiating ( Check db/Item_db.txt || db/Item_db2.txt )
  9. setarray .ItemID[0],607,608,512;
  10. setarray .Amount[0],1,2,3;
  11.  
  12.  
  13.  
  14. // MapFlags Initiating ( Check db/Cont.txt )
  15. setarray .MapFlags[0],0,1,2,3,4,5,11,13,14,15,22,29,30,31,32,33,34,35,38,41,43,44,47,49;
  16.  
  17. for( set .@mf,0; .@mf < getarraysize( .MapFlags ); set .@mf,.@mf + 1 ){
  18. setmapflag strcharinfo(3),.MapFlags[.@mf];
  19. }
  20.  
  21. if( getmapmobs( strcharinfo(3) ) > 0 || .Level > 0){
  22. dispbottom "Just Kill All the Monster to Win the Game...";
  23. end;
  24. }
  25. set .Level,0;
  26. announce "[Level "+( (.Level/2)+1 )+"] : [ "+.Stage[.Level+1]+" x "+getmonsterinfo( .Stage[.Level],0)+" ]",bc_all,0x37FDFC;
  27. monster strcharinfo(3),0,0,"[Slave] "+getmonsterinfo( .Stage[.Level],0)+"",.Stage[.Level],.Stage[.Level+1],strnpcinfo(0)+"::OnMobKill";
  28. delwaitingroom;
  29. waitingroom "Left ["+mobcount( strcharinfo(3),strnpcinfo(0)+"::OnMobKill" )+"] Monster",0;
  30. end;
  31.  
  32. OnMobKill:
  33. delwaitingroom;
  34. if( mobcount( strcharinfo(3),strnpcinfo(0)+"::OnMobKill" ) == 0 && .Level < ( getarraysize( .Stage ) - 5 ) ){
  35. set .Level,.Level + 2;
  36. waitingroom "["+((( getarraysize( .Stage )/2 ) - .Level/2) - 1)+"] Rounds to Go.",0;
  37. for( set .@t,5; .@t > 0; set .@t,.@t - 1 ){
  38. announce "[Level "+( (.Level/2)+1 )+"] in "+.@t+" Seconds",bc_map,0x4EEE94,0,35;
  39. sleep2 1000;
  40. }
  41. announce "[Level "+( (.Level/2)+1 )+"] : [ "+.Stage[.Level+1]+" x "+getmonsterinfo( .Stage[.Level],0)+" ]",bc_all,0x37FDFC;
  42. monster strcharinfo(3),0,0,"[Slave] "+getmonsterinfo( .Stage[.Level],0)+"",.Stage[.Level],.Stage[.Level+1],strnpcinfo(0)+"::OnMobKill";
  43. }else if( mobcount( strcharinfo(3),strnpcinfo(0)+"::OnMobKill" ) == 0 && .Level >= ( getarraysize( .Stage ) - 5 ) ){
  44. set .Level,.Level + 2;
  45. announce "BOSS Stage",bc_map,0xFF0000,0,90;
  46. specialeffect 563;
  47. sleep2 2000;
  48. for( set .@t,5; .@t > 0; set .@t,.@t - 1 ){
  49. specialeffect 563;
  50. announce "BOSS STAGE in "+.@t+" Seconds",bc_map,0xFF0000,0,60;
  51. sleep2 1000;
  52. }
  53. announce "[Level "+( (.Level/2)+1 )+"] : [ "+.Stage[.Level+1]+" x "+getmonsterinfo( .Stage[.Level],0)+" ]",bc_all,0x37FDFC;
  54. monster strcharinfo(3),0,0,"[BOSS] "+getmonsterinfo( .Stage[.Level],0)+"",.Stage[.Level],.Stage[.Level+1],strnpcinfo(0)+"::OnBossKill";
  55. }
  56. delwaitingroom;
  57. waitingroom "Left ["+mobcount( strcharinfo(3),strnpcinfo(0)+"::On"+( ( .Level-2 ) > ( getarraysize( .Stage ) - 5 ) ? "BossKill":"MobKill") )+"] Monster",0;
  58. end;
  59.  
  60. OnBossKill:
  61. delwaitingroom;
  62. if( mobcount( strcharinfo(3),strnpcinfo(0)+"::OnBossKill" ) > 0 ){
  63. waitingroom "Left ["+mobcount( strcharinfo(3),strnpcinfo(0)+"::OnBossKill")+"] Monster",0;
  64. end;
  65. }else{
  66. delwaitingroom;
  67. waitingroom "REWARD TIME",0;
  68. specialeffect 709;
  69. announce "Congratulation to Team [ "+getpartyname( getcharid(1) )+" ] who had just finished the Stage Game. ",0;
  70. getpartymember getcharid(1),1;
  71. getpartymember getcharid(1),2;
  72. set @Location$,strcharinfo(3);
  73. for ( set .@i, 0; .@i < $@partymembercount; set .@i, .@i +1 ){
  74. if ( isloggedin($@partymemberaid[.@i]) ){
  75. attachrid $@partymemberaid[.@i];
  76. if( strcharinfo(3) == @Location$ ){
  77. unittalk getcharid(3),"Yeehaaa !! We Beat ALL the Monster !!!";
  78. unitemote getcharid(3),e_heh;
  79. specialeffect2 709;
  80. set .@Random,rand( getarraysize( .ItemID ) );
  81. getitem .ItemID[.@Random],.Amount[.@Random], $@partymemberaid[.@i];
  82. dispbottom "Gained those items as Reward for Finishing Stage Game";
  83. }
  84. }
  85. }
  86. sleep2 5000;
  87. mapwarp strcharinfo(3),"amatsu",109,155;
  88. set .Level,0;
  89. delwaitingroom;
  90. }
  91. OnInit:
  92. waitingroom " Click Me",0;
  93. end;
  94.  
  95. }
  96.  
  97.  
  98. amatsu,78,164,5 script Stage Game#Register 794,{
  99.  
  100. while(1){
  101. mes "Hello, i am ^FF0000Stage Game Manager^000000. How can i help you ?";
  102. mes "^0000FFRegistration Status^000000 : "+( getmapusers(.Map$) > 0 ?"^FF0000OFF":"^00FF00ON")+"^000000";
  103. mes "(^FF0000Only Leader can Register^000000)";
  104. mes "";
  105. mes "It is In ^FF0000BETA Test^000000.";
  106. next;
  107. switch(select("^00FF00Stage Game Information^000000",
  108. ( getmapusers(.Map$) > 0 || getcharid(0) != getpartyleader( getcharid(1),2 ) )?"":"^0000FFRegister for Stage Game^000000",
  109. ( getmapusers(.Map$) < 1 || getgmlevel() < 60 )?"":"^FF0000Reset Stage Game^000000")) {
  110.  
  111. Case 1:
  112. mes "^FF0000Stage Game^000000 is a small game that have alot of monster to be kill from round to round.";
  113. mes "With every increase or round you manage to reach, the monster could be stronger than before.";
  114. next;
  115. mes "You could win up some ^0000FFUnique^000000 prize upon you finished the whole ^FF0000Stage Game^000000";
  116. next;
  117. mes "In order to ^0000FFRegister^000000 for ^FF0000Stage Game^000000, all your party member must meet the ^0000FFRequirements^000000";
  118. next;
  119. mes "[ ^00FF00Requirements^000000 ]";
  120. mes "^0000FFBase Level^000000 : "+.Level+" Level";
  121. mes "^0000FFZeny^000000 : "+.Zeny+" Zeny ";
  122. mes "^0000FFParty Members^000000 : "+.PartyMember+" Members";
  123. mes "(^FF0000Level / Zeny only Applied on Leader ^000000 )";
  124. next;
  125. break;
  126. Case 2:
  127. // if( getgmlevel() < 80 ){
  128. // mes "Stage Game is under Debugging Development. Simple Game but Hard ";
  129. // close;
  130. // }
  131. getpartymember getcharid(1),1;
  132. getpartymember getcharid(1),2;
  133. set @Count,0;
  134. for ( set .@i, 0; .@i < $@partymembercount; set .@i, .@i +1 ){
  135. if ( isloggedin($@partymemberaid[.@i]) ){
  136. set @Count,@Count+1;
  137. }
  138. }
  139. if( @Count < .PartyMember || BaseLevel < .Level || Zeny < .Zeny ){
  140. mes "[ ^00FF00Requirements^000000 ]";
  141. mes "^0000FFBase Level^000000 : "+.Level+" Level";
  142. mes "^0000FFZeny^000000 : "+.Zeny+" Zeny ";
  143. mes "^0000FFParty Members^000000 : "+.PartyMember+" Members";
  144. mes "(^FF0000Level / Zeny only Applied on Leader ^000000 )";
  145. close;
  146. }else{
  147. set Zeny, Zeny - .Zeny;
  148. mes "Your party will now be warped into the Destination to start the Game.";
  149. dispbottom "Click on the NPC inside to start the game.";
  150. delwaitingroom "Stage Game";
  151. close2;
  152. announce "Team [ "+getpartyname( getcharid(1) )+"] has joined STAGE GAME.",0;
  153. warpparty .Map$,0,0,getcharid(1);
  154. killmonster .Map$,"All";
  155. set getvariableofnpc(.Level,"Stage Game"),0;
  156. end;
  157. }
  158. Case 3:
  159. mes "The Game has been Reset.";
  160. killmonster .Map$,"All";
  161. mapwarp .Map$,"amatsu",112,156;
  162. announce "A GM has RESET the Stage Game, Sorry for the Incovenience.",0;
  163. set getvariableofnpc(.Level,"Stage Game"),0;
  164. delwaitingroom "Stage Game";
  165. next;
  166. break;
  167. }
  168. }
  169. close;
  170.  
  171. OnInit:
  172. OnWhisperGlobal:
  173. set .Level,150;
  174. set .Zeny,1000000;
  175. set .PartyMember,1;
  176. set .Map$,"guild_vs4";
  177.  
  178. while( 1 ){
  179. delwaitingroom;
  180. waitingroom ( getmapusers(.Map$) > 0 ? " NOT":" " )+" Available",0;
  181. sleep 1000;
  182. }
  183. end;
  184. }
Advertisement
Add Comment
Please, Sign In to add comment