mushroom_event.txt 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //===== rAthena Script =======================================
  2. //= Find the Mushroom
  3. //===== By: ==================================================
  4. //= Mysterious
  5. //===== Current Version: =====================================
  6. //= 3.6a
  7. //===== Compatible With: =====================================
  8. //= rAthena Project
  9. //===== Description: =========================================
  10. //= Find the Mushroom - random amount of Mushrooms spawns in random maps.
  11. //= Players need to find these mushrooms and kill them to gain prizes!
  12. //===== Additional Comments: =================================
  13. //= 3.0 Fully Functional with Rewritten script. [Mysterious]
  14. //= 3.6a Slightly edited. [Euphy]
  15. //============================================================
  16. prontera,142,228,6 script Find the Mushroom 1084,{
  17. mes "[ Find The Mushroom ]";
  18. if (!.Status)
  19. mes "There is no event at the moment!";
  20. else {
  21. mes "There are "+.Spawn+" Mushrooms left in "+.Map$+"!";
  22. mes "Find and kill the mushrooms to gain "+getitemname(.Prize)+"!";
  23. }
  24. if (.Status || getgmlevel() < .GM) close;
  25. mes "Start the event?";
  26. next;
  27. if(select("- No:- Yes") == 1) close;
  28. donpcevent strnpcinfo(0)+"::OnMinute10";
  29. mes "[ Find The Mushroom ]";
  30. mes "Event started!";
  31. close;
  32. OnInit:
  33. set .Prize,512; // Reward item ID
  34. set .Amount,10; // Reward item amount
  35. set .GM,60; // GM level required to access NPC
  36. setarray .Maps$[0],"izlude","geffen","morocc","prontera"; // Possible maps
  37. end;
  38. OnMinute10: // Start time (every hour)
  39. if (.Status) end;
  40. set .Status,1;
  41. set .Spawn,rand(1,10); // How many Mushrooms should spawn?
  42. set .Map$,.Maps$[rand(getarraysize(.Maps$))];
  43. killmonster .Map$,"All";
  44. monster .Map$,0,0,"Please don't kill me!",1084,.Spawn,strnpcinfo(0)+"::OnMobKilled";
  45. announce "Find the Mushroom : Total of "+.Spawn+" Mushrooms have been spawned in "+.Map$+"!",0;
  46. sleep 2500;
  47. announce "Find the Mushroom : Every Mushroom you kill will give you "+getitemname(.Prize)+"!",0;
  48. end;
  49. OnMobKilled:
  50. set .Spawn, .Spawn - 1;
  51. getitem .Prize, .Amount;
  52. if (.Spawn) announce "[ "+strcharinfo(0)+" ] has killed a Mushroom. There are now "+.Spawn+" Mushroom(s) left.",bc_map;
  53. else {
  54. announce "The Find the Mushroom Event has ended. All the Mushrooms have been killed.",0;
  55. set .Status,0;
  56. }
  57. end;
  58. }