yuhsing

Untitled

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