Advertisement
johnlol

Stage Game

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