Advertisement
Guest User

Untitled

a guest
May 30th, 2015
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.78 KB | None | 0 0
  1.  
  2.  
  3. pay_arche,83,71,4 script Poring Summoner Event 871,{
  4. function summon_monster;
  5.  
  6. if ( .status ) {
  7. mes "The Poring Event has begun!";
  8. mes "Location: " + .map$;
  9. .@mob_special = mobcount( .map$,.npc_name$+"::OnSpecial" );
  10. .@mob_normal = mobcount( .map$,.npc_name$+"::OnNormal" );
  11. mes "Special Monsters: " + .@mob_special;
  12. mes "Normal Monsters: " + .@mob_normal;
  13. mes " ";
  14. if ( select( "Warp me there.","Cancel" ) == 1 ) {
  15. warp .map$,0,0;
  16. close;
  17. }
  18. }
  19.  
  20. if ( getgmlevel() >= .gm_level && .gm_level ) {
  21. do {
  22. mes "^FF0000You accessing GM Menu!^000000";
  23. switch ( select(
  24. ( .status )?"Stop Event":"Start Event",
  25. ( .status )?"":"Reward ^777777["+getitemname( .item_id )+" x "+.item_amount+"]^000000",
  26. ( .status )?"":"Duration ^777777["+.minute+" minutes]^000000",
  27. "Cancel"
  28. )) {
  29. case 1:
  30. setarray .@label$,"OnEventStart","OnEventEnd";
  31. mes "Applying changes ... ";
  32. close2;
  33. donpcevent .npc_name$+"::"+.@label$[.status];
  34. end;
  35. case 2:
  36. mes "Enter Item ID:";
  37. do {
  38. input .@item_id,0,32767;
  39. if ( !.@item_id ) break;
  40. } while ( getitemname( .@item_id ) == "null" );
  41. mes "Enter amount: ( "+getitemname( .@item_id )+" )";
  42. input .@amount,0,30000;
  43. if ( .@amount ) {
  44. mes " ";
  45. mes "New Reward: "+.@amount+" x "+getitemname( .@item_id );
  46. if ( select( "Confirm","Cancel" ) == 1 ) {
  47. .item_id = .@item_id;
  48. .item_amount = .@amount;
  49. }
  50. }
  51. break;
  52. case 3:
  53. mes "Enter duration (minute):";
  54. input .minute,0,120;
  55. break;
  56. default: break;
  57. }
  58. next;
  59. } while ( @menu != 4 );
  60. }
  61. else {
  62. mes "No event right now.";
  63. }
  64. close;
  65.  
  66. OnInit:
  67. // gm level
  68. .gm_level = 99;
  69. // default setting
  70. .item_id = 512;
  71. .item_amount = 1;
  72. .minute = 45;
  73. .npc_name$ = strnpcinfo(0);
  74. end;
  75.  
  76. // OnMinute00:
  77. OnEventStart:
  78. if ( !.status ) {
  79. if ( summon_monster() ) {
  80. .status = 1;
  81. .current_time = ( .minute * 60 );
  82. // sleep 5000;
  83. announce "The Poring Event has begun!",bc_all;
  84. announce "Location: " + .map$,bc_all;
  85. .@mob_special = mobcount( .map$,.npc_name$+"::OnSpecial" );
  86. .@mob_normal = mobcount( .map$,.npc_name$+"::OnNormal" );
  87. announce "Special Monsters: " + .@mob_normal,bc_all;
  88. announce "Normal Monsters: " + .@mob_special,bc_all;
  89. initnpctimer;
  90. }
  91. }
  92. end;
  93.  
  94. OnTimer1000:
  95. .current_time--;
  96. .@hour = ( .current_time / 3600 );
  97. .@minute = ( .current_time % 3600 / 60 );
  98. .@second = ( .current_time % 3600 % 60 );
  99. mapannounce .map$,"Time left: "+.current_time+" - "+sprintf( "%02d:%02d:%02d",.@hour,.@minute,.@second ),bc_map;
  100. if ( .current_time >= 1 ) {
  101. initnpctimer;
  102. }
  103. else {
  104. donpcevent .npc_name$+"::OnEventEnd";
  105. }
  106. end;
  107.  
  108. OnSpecial:
  109. getitem .item_id,.item_amount;
  110.  
  111. OnNormal:
  112. .@mob_special = mobcount( .map$,.npc_name$+"::OnSpecial" );
  113. .@mob_normal = mobcount( .map$,.npc_name$+"::OnNormal" );
  114. mapannounce .map$,"Special - "+.@mob_special+" , Normal - "+.@mob_normal+" !!",bc_map;
  115.  
  116. if ( .@mob_special ) end;
  117.  
  118. OnEventEnd:
  119. .status = 0;
  120. killmonster .map$,"All";
  121. sleep 5000;
  122. mapannounce .map$,"Event End.",bc_all;
  123. stopnpctimer;
  124. end;
  125.  
  126.  
  127. function summon_monster {
  128. .@weekday = gettime(4);
  129. switch( .@weekday ) {
  130. case 0: // Sunday
  131. .map$ = "que_dance";
  132. setarray .@mob_list,
  133. 1002,10, // special mob x 10
  134. 1002,100; // normal mob x 100
  135. break;
  136. case 1: // Monday
  137. .map$ = "que_dance";
  138. setarray .@mob_list,
  139. 1002,10, // special mob x 10
  140. 1002,100; // normal mob x 100
  141. break;
  142. case 2: // Tuesday
  143. .map$ = "que_dance";
  144. setarray .@mob_list,
  145. 1002,10, // special mob x 10
  146. 1002,100; // normal mob x 100
  147. break;
  148. case 3: // Wednesday
  149. .map$ = "que_dance";
  150. setarray .@mob_list,
  151. 1002,10, // special mob x 10
  152. 1002,100; // normal mob x 100
  153. break;
  154. case 4: // Thursday
  155. .map$ = "que_dance";
  156. setarray .@mob_list,
  157. 1002,10, // special mob x 10
  158. 1002,100; // normal mob x 100
  159. break;
  160. case 5: // Friday
  161. .map$ = "que_dance";
  162. setarray .@mob_list,
  163. 1002,10, // special mob x 10
  164. 1002,100; // normal mob x 100
  165. break;
  166. case 6: // Saturday
  167. .map$ = "que_dance";
  168. setarray .@mob_list,
  169. 1002,10, // special mob x 10
  170. 1002,100; // normal mob x 100
  171. break;
  172. }
  173. .@mob_list_size = getarraysize( .@mob_list ) - 1;
  174. if ( .@mob_list_size < 1 ) return 0;
  175.  
  176. monster .map$,0,0,"--ja--",.@mob_list[0],.@mob_list[1],.npc_name$+"::OnSpecial";
  177. .@i = 2;
  178. while ( .@i < .@mob_list_size ) {
  179. monster .map$,0,0,"--ja--",.@mob_list[.@i],.@mob_list[.@i+1],.npc_name$+"::OnNormal";
  180. .@i += 2;
  181. }
  182. return 1;
  183. }
  184. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement