yuhsing

Untitled

May 31st, 2013
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.18 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$,100,100;
  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. ( .status )?"":"START EVENT",
  19. ( !.status )?"":"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,1002,1031,1113,1242,1613,1894;
  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.  
  88. setarray .mapflag,
  89. mf_noteleport,
  90. mf_nosave,
  91. mf_nobranch,
  92. mf_noskill,
  93. mf_nowarp,
  94. mf_noicewall,
  95. mf_nogo,
  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