Advertisement
Emistry

Stage Game v3

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