yuhsing

Untitled

Jun 21st, 2013
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.17 KB | None | 0 0
  1.  
  2.  
  3.  
  4. prontera,146,165,6 script Lucky Drop Event 732,{
  5. mes "Event Information ";
  6. mes "Status : ^"+( ( .status )?"0055FFON":"FF0000OFF" )+"^000000";
  7. if( .status ){
  8. mes "Monster Left : ^FF0000"+.poring_count+" / ^777777"+$poring_max+"^000000";
  9. if( .status == 1 )
  10. if( select( "ENTER EVENT","Close" ) == 1 )
  11. warp .map$,100,100;
  12. }
  13. if( getgmlevel() >= .gm_level ){
  14. do{
  15. next;
  16. switch( select( "Monster Per Round [ ^777777"+$poring_max+"^000000 ]",
  17. "Monster who drop reward [ ^777777"+$poring_count+"^000000 ]",
  18. "Reward - ^777777"+$poring_reward_amount+" x "+getitemname( $poring_reward_id )+"^000000",
  19. ( .status )?"":"START EVENT",
  20. ( !.status )?"":"END EVENT" )){
  21. Case 1:
  22. mes "How many Monster per Round ?";
  23. mes "^7777771 ~ 200^000000";
  24. input $poring_max,1,200;
  25. mes "Updated to : "+$poring_max+" per round.";
  26. break;
  27. Case 2:
  28. mes "How many Monster drop ^777777"+$poring_reward_amount+" x "+getitemname( $poring_reward_id )+"^000000 per round ?";
  29. mes "^7777771 ~ "+$poring_max+"^000000";
  30. input $poring_count,1,$poring_max;
  31. mes "Updated to : "+$poring_count+" per round.";
  32. break;
  33. Case 3:
  34. mes "Enter Item ID";
  35. do{
  36. input .@item,0,32767;
  37. if( !.@item ) break;
  38. }while( getitemname( .@item ) == "null" );
  39. if( .@item ){
  40. mes "Enter amount";
  41. input .@amount,0,30000;
  42. if( .@amount ){
  43. mes "Reward : ^777777"+.@amount+" x "+getitemname( .@item )+"^000000";
  44. if( select( "Confirm","Close" ) ){
  45. mes "Updated reward.";
  46. set $poring_reward_id,.@item;
  47. set $poring_reward_amount,.@amount;
  48. }
  49. }
  50. }
  51. break;
  52. Case 4:
  53. if( .status == 2 ){
  54. mes "Event already running...";
  55. }else{
  56. mes "Event will start now.";
  57. donpcevent strnpcinfo(0)+"::OnEventStart";
  58. }
  59. break;
  60. Case 5:
  61. if( .status != 2 ){
  62. mes "Event isnt running yet...";
  63. }else{
  64. mes "Event will end now.";
  65. donpcevent strnpcinfo(0)+"::OnEventEnd";
  66. }
  67. default: break;
  68. }
  69. }while( select( "Continue","Close" ) == 1 );
  70. }
  71. close;
  72.  
  73. OnInit:
  74. set .gm_level,90;
  75. set .map$,"poring_w01";
  76. set .max_duration,60;
  77.  
  78. // poring family list
  79. setarray .poring_list,1002,1031,1113,1242,1613,1894;
  80. set .poring_list_size,getarraysize( .poring_list );
  81.  
  82. setarray .poring_rules$,
  83. "This is Poring Game.",
  84. "Find the Correct Poring and kill it.",
  85. "Who killed correct poring can get reward.",
  86. "Thank and good luck.";
  87. set .poring_rules_size,getarraysize( .poring_rules$ );
  88.  
  89. setarray .mapflag,
  90. mf_noteleport,
  91. mf_nosave,
  92. mf_nobranch,
  93. mf_noskill,
  94. mf_nowarp,
  95. mf_noicewall,
  96. mf_nomobloot,
  97. mf_nomvploot,
  98. mf_noreturn,
  99. mf_nowarpto;
  100. set .mapflag_size,getarraysize( .mapflag );
  101. for( set .@i,0; .@i < .mapflag_size; set .@i,.@i + 1 )
  102. setmapflag .map$,.mapflag[.@i];
  103.  
  104. end;
  105.  
  106. // OnMinute00: // start every hour.
  107. OnEventStart:
  108. if( !$poring_max || !$poring_count ) end;
  109. set .status,1;
  110. killmonster .map$,"All";
  111. for( set .@i,3; .@i > 0; set .@i,.@i - 1 ){
  112. announce "Poring Event start within "+.@i+" minutes.",0;
  113. sleep 6000;
  114. }
  115.  
  116. for( set .@i,0; .@i < .poring_rules_size; set .@i,.@i + 1 ){
  117. mapannounce .map$,"Poring Event : "+.poring_rules$[.@i],0;
  118. sleep 3000;
  119. }
  120.  
  121. mapannounce .map$,"Poring Event STARTED",0;
  122. set .status,2;
  123. set .poring_count,$poring_count;
  124.  
  125. for( set .@i,0; .@i < $poring_max; set .@i,.@i + 1 )
  126. monster .map$,0,0,"PORING",.poring_list[ rand(.poring_list_size) ],1,strnpcinfo(0)+ ( ( .@i > $poring_count )?"::OnWrongKill":"::OnCorrectKill" );
  127.  
  128. sleep ( .max_duration * 60000 );
  129.  
  130. mapannounce .map$,"Poring Event END",0;
  131. killmonster .map$,"All";
  132. sleep 3000;
  133. mapwarp .map$,"prontera",155,181;
  134. set .status,0;
  135. end;
  136.  
  137. OnEventEnd:
  138. awake strnpcinfo(0);
  139. end;
  140.  
  141. OnWrongKill:
  142. monster .map$,0,0,"PORING",.poring_list[ rand(.poring_list_size) ],1,strnpcinfo(0)+"::OnWrongKill";
  143. end;
  144.  
  145. OnCorrectKill:
  146. if( $poring_reward_amount )
  147. getitem $poring_reward_id,$poring_reward_amount;
  148. set .poring_count,.poring_count - 1;
  149. if( .poring_count < 1 ){
  150. awake strnpcinfo(0);
  151. }else{
  152. mapannounce .map$,strcharinfo(0)+" found 1....left "+.poring_count+" Poring.",0;
  153. }
  154. end;
  155.  
  156. }
Advertisement
Add Comment
Please, Sign In to add comment