yuhsing

Untitled

Sep 12th, 2013
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.65 KB | None | 0 0
  1.  
  2. - script poring_event -1,{
  3. OnInit:
  4. .duration = 30;
  5. setarray .normal_poring,1002,100;
  6. setarray .special_poring,1002,100;
  7. setarray .map$,
  8. "xmas",
  9. "payon",
  10. "geffen";
  11. .map_size = getarraysize( .map$ );
  12. .npc_name$ = strnpcinfo(0);
  13. end;
  14.  
  15. OnClock0000:
  16. OnClock0400:
  17. OnClock0800:
  18. OnClock1200:
  19. OnClock1600:
  20. OnClock2000:
  21. OnStart:
  22. if( !.status ){
  23. .status = 1;
  24. .index = rand( .map_size );
  25. for( .@i = 3; .@i > 0; .@i-- ){
  26. announce "Poring Event start in "+.@i+" minutes. ... please gather at "+.map$[.index]+" ...",0;
  27. sleep 60000;
  28. }
  29.  
  30. killmonster .map$[.index],"All";
  31. setmapflag .map$[.index],mf_noskill;
  32. setmapflag .map$[.index],mf_nomobloot;
  33. setmapflag .map$[.index],mf_nomvploot;
  34.  
  35. .@user = getmapusers( .map$[.index] );
  36. if( .@user >= 20 ){
  37. .@total_poring += (( .@user / 20 ) * 100 );
  38. .@total_poring2 += (( .@user / 20 ) * 100 );
  39. }
  40. .@total_poring += .special_poring[1];
  41. .@total_poring2 += .normal_poring[1];
  42.  
  43. .random_amount = rand( .@total_poring );
  44. .special_amount = ( .@total_poring - .random_amount );
  45.  
  46. monster .map$[.index],0,0,"--ja--",.normal_poring[0],.@total_poring2,.npc_name$+"::OnNormalKill";
  47. monster .map$[.index],0,0,"--ja--",.special_poring[0],.random_amount,.npc_name$+"::OnRandomKill";
  48. monster .map$[.index],0,0,"--ja--",.special_poring[0],.special_amount,.npc_name$+"::OnSpecialKill";
  49. announce "Poring Event started at "+.map$[.index]+" , eliminate all "+.@total_poring+" Special Poring to gain price.",0;
  50. sleep ( .duration * 30000 );
  51. if( .special_poring ){
  52. mapannounce .map$[.index],"Time's up, all poring has been cleared. Please try again next time.",0;
  53. }
  54. killmonster .map$[.index],"All";
  55. removemapflag .map$[.index],mf_noskill;
  56. removemapflag .map$[.index],mf_nomobloot;
  57. removemapflag .map$[.index],mf_nomvploot;
  58. .status = 0;
  59. sleep 5000;
  60. mapwarp .map$[.index],"prontera",155,181;
  61. }
  62. end;
  63.  
  64. OnNormalKill:
  65. dispbottom "Wew...I'm not the Special Poring.";
  66. end;
  67.  
  68. OnRandomKill:
  69. .random_amount--;
  70. getitem 603,1;
  71. dispbottom "Gained a "+getitemname( 603 )+" by killing a Random Special Poring. Left "+.random_amount+" Random Special Poring";
  72. mapannounce .map$[.index],"Special Poring Left : "+.special_amount+" | Random Special Poring : "+.random_amount,0;
  73. end;
  74.  
  75. OnSpecialKill:
  76. .special_amount--;
  77. if( .special_amount ){
  78. getitem 675,1;
  79. dispbottom "Gained a "+getitemname( 675 )+" by killing a Special Poring.";
  80. mapannounce .map$[.index],"Special Poring Left : "+.special_amount+" | Random Special Poring : "+.random_amount,0;
  81. }else{
  82. getitem 671,1;
  83. dispbottom "Gained a "+getitemname( 671 )+" by killing the LAST Special Poring.";
  84. awake .npc_name$;
  85. }
  86. end;
  87. }
Advertisement
Add Comment
Please, Sign In to add comment