yuhsing

Untitled

Jan 30th, 2013
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.44 KB | None | 0 0
  1. prontera,152,212,4 script Find the Mushroom 1084,{
  2.  
  3. mes "[ Find The Mushroom ]";
  4. if(getgmlevel() < 39) {
  5. if(.Event==0) mes "We have 'Find the Mushroom' Event at random times of the day/night. We are giving away ^0000FF"+$mushroom_amount+" pcs. "+getitemname($item_id)+"s^000000 for every mushroom found! Just find the Mushrooms and whack 'em! Standby for my broadcasts!";
  6. else {
  7. mes "Hurry! There are still Mushrooms in the Map!";
  8. mes "Location: "+ .map_name$[.map_index];
  9. mes "Prize: " + getitemname($item_id);
  10. mes "Number of Mushrooms: " + .mushroom;
  11. }
  12. close;
  13. }
  14. mes "Hello "+strcharinfo(0)+"! Please customize this event:";
  15. Main:
  16. next;
  17. mes "[ Find The Mushroom ]";
  18. if(.Event==0) mes "^FF0000Event not running.^000000 You may start event if you wish. Prize: ^0000FF"+$mushroom_amount+" pcs. "+getitemname($item_id)+"s^000000. ^FF0000Remember that all transactions with this NPC is logged.^000000";
  19. else {
  20. mes "There are still Mushrooms in the Map! ^FF0000DO NOT START EVENT JUST YET!^000000";
  21. mes "Location: "+ .map_name$[.map_index];
  22. mes "Prize: " + getitemname($item_id);
  23. mes "Number of Mushrooms: " + .mushroom;
  24. }
  25.  
  26. switch(select("Item ["+$mushroom_amount+" x "+getitemname($item_id)+"]:Start Event:End Event")) {
  27. case 1:
  28. if(getgmlevel() == 99) {
  29. mes "Which item would you like the Mushroom to drop?";
  30. mes "Please input the item ID:";
  31. do{
  32. input $item_id;
  33. }while( getitemname($item_id) == "null" );
  34. mes "Enter amount.";
  35. input $mushroom_amount,1,30000;
  36. mes "Event Prize : "+$mushroom_amount+" x "+getitemname($item_id);
  37. goto Main; } else { logmes strcharinfo(0)+ " HAS TRIED TO EDIT THE FIND THE MUSHROOM PRIZEEEEEEEEEEEE"; mes "Sorry, "+strcharinfo(0)+" your GM level does not allow you to edit prizes."; close; }; end;
  38. case 2:
  39. mes "Starting the event now...";
  40. mes "^FF0000Remember that all transactions with this NPC is logged.^000000";
  41. set .Event,1;
  42. close2;
  43. logmes strcharinfo(0)+ " HAS STARTED THE FIND THE MUSHROOM EVENT";
  44. goto OnStart;
  45. case 3:
  46. mes "Ending the event now...";
  47. if(.Event) announce strcharinfo(0)+" ended Find the Mushroom Event!",bc_all;
  48. killmonster .map$[.map_index],"All";
  49. set .Event,0;
  50. logmes strcharinfo(0)+ " HAS ENDED THE FIND THE MUSHROOM EVENT";
  51. close;
  52. }
  53.  
  54. OnInit:
  55. //setarray .map$[0],"splendide","hugel","yuno","comodo","xmas","aldebaran","izlude","payon","geffen","morocc","prontera";
  56. //setarray .map_name$[0],"Splendide","Hugel Town","Yuno Town","Comodo Town","Christmas Town","Alde Baran","Izlude","Payon Town","Geffen Tower","Morocc Desert","Prontera";
  57.  
  58. setarray .map$[0],"morocc_mem","morocc_mem","payon_mem","morocc_mem";
  59. setarray .map_name$[0],"Morocc PvP","Morocc PvP","Transcendant PvP Payon","Morocc PvP";
  60.  
  61.  
  62. set .map_size,getarraysize( .map$ );
  63. end;
  64.  
  65. OnClock0800:
  66. OnClock1000:
  67. OnClock1200:
  68. OnClock1415:
  69. OnClock1601:
  70. OnClock1800:
  71. OnClock2030:
  72. OnClock2230:
  73. OnClock0100:
  74. OnClock0300:
  75. OnStart:
  76. announce "Mushroom NPC : It's time to play Find the Mushroom Event in PvP!!!",0;
  77. sleep2 10000;
  78.  
  79. set .map_index,rand( .map_size );
  80. set .@ran2, rand(1,8);
  81. if (.@ran2 == 8) set .mushroom,12;
  82. if (.@ran2 == 7) set .mushroom,11;
  83. if (.@ran2 == 6) set .mushroom,10;
  84. if (.@ran2 == 5) set .mushroom,9;
  85. if (.@ran2 == 4) set .mushroom,8;
  86. if (.@ran2 == 3) set .mushroom,8;
  87. if (.@ran2 == 2) set .mushroom,8;
  88. if (.@ran2 == 1) set .mushroom,7;
  89.  
  90. announce "Mushroom NPC : " + .mushroom + " Mushrooms have spawned in map [ "+ .map_name$[.map_index] +" ] with "+$mushroom_amount+" pcs. "+getitemname($item_id)+"s bounty for each! Gear up for battle now!",0;
  91. sleep2 10000;
  92. monster .map$[.map_index],0,0,"Don't kill me please!",1084,.mushroom,"Find the Mushroom::OnMobKilled";
  93. //i added
  94. sleep2 180000;
  95. if(.Event==1) { announce "Mushroom NPC : Find the Mushroom Event is still running in [ "+ .map_name$[.map_index] +" ] with "+$mushroom_amount+" pcs. "+getitemname($item_id)+"s bounty for each mushroom found! Charge to PvP now!",0; };
  96. sleep2 180000;
  97. if(.Event==1) { announce "Mushroom NPC : some Mushrooms left in [ "+ .map_name$[.map_index] +" ]. Hurry before it's too late!",0; };
  98. // end of added lines
  99. end;
  100.  
  101.  
  102. OnMobKilled:
  103. mapannounce .map$[.map_index],"Mushroom NPC: [ " + strcharinfo(0) + " ] has obtained "+$mushroom_amount+" pcs. "+getitemname($item_id)+"s for finding a mushroom!",0;
  104. getitem $item_id,$mushroom_amount;
  105. if( !mobcount( .map$[.map_index],"Find the Mushroom::OnMobKilled" ) ) set .Event,0;
  106. end;
  107.  
  108. }
Advertisement
Add Comment
Please, Sign In to add comment