uneasy_cemetery.txt 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. //===== rAthena Script =======================================
  2. //= Uneasy Prontera Cemetery Quest
  3. //===== By: ==================================================
  4. //= Lupus
  5. //===== Current Version: =====================================
  6. //= 1.2a (Tested and fully working!)
  7. //===== Compatible With: =====================================
  8. //= rAthena Project
  9. //===== Description: =========================================
  10. //= A periodical quest of the Uneasy Cemetery (Kill undead / Prevent their appearance)
  11. //= Every day, at the midnight Prontera receive a wave of Undeads.
  12. //= They come from Uneasy Cemetery of Prontera. To protect the players
  13. //= from the undeads terror you may either kill the enemy. Or supply Mother Mathana
  14. //= with needed amount of Holy Water. Every citizen can take his part in the
  15. //= saving of Prontera city. After some days of quiet life... the Cemetery strikes back.
  16. //===== Additional Comments: =================================
  17. //= 1.1 More advanced ver. Added some bonus the the one who'd kill the last walking undead
  18. //= 1.2 Added coords to the script to make label OmMobDead working
  19. //= 1.2a Changed item names to item IDs. [Samuray22]
  20. //============================================================
  21. prontera,3,3,3 script Uneasy_Check -1,{
  22. end;
  23. OnHour00:
  24. set $UNEASY_DL,$UNEASY_DL-1;
  25. set $UNEASY_BL,$UNEASY_BL+30; //add need of HW for 30 bottles per day
  26. if ($UNEASY_BL>666) set $UNEASY_BL,666; //keep needed bottles not <=666
  27. if ($UNEASY_DL < 0) goto L_Start_Undead;
  28. //The Cemetery is OK yet.
  29. disablenpc "Mother Mathana";
  30. end;
  31. OnInit:
  32. if ($UNEASY_DL >= 0) disablenpc "Mother Mathana";
  33. end;
  34. OnHour06:
  35. killmonsterall "prontera"; //The Sun kills undead in the morning
  36. end;
  37. OnHour01:
  38. if ($@UNEASY_MOB > 0) mapannounce "prontera","[Mother Mathana]: In the name of Odin, please finish these roaming undead leftovers!",0;
  39. end;
  40. OnZombieDead:
  41. set $@UNEASY_MOB,$@UNEASY_MOB-1;
  42. if ($@UNEASY_MOB>0) end;
  43. set $UNEASY_DL,0;
  44. set $UNEASY_H$,strcharinfo(0);
  45. if (Sex==1) mapannounce "prontera","[Mother Mathana]: Brave "+$UNEASY_H$+" has just killed the last undead in Prontera!",0;
  46. if (Sex==0) mapannounce "prontera","[Mother Mathana]: Lady "+$UNEASY_H$+" has just killed the last undead in Prontera!",0;
  47. set JobExp,JobExp+100;
  48. set BaseExp,BaseExp+50;
  49. end;
  50. L_Start_Undead:
  51. killmonsterall "prontera"; //kills any left monsters
  52. enablenpc "Mother Mathana";
  53. //call some monsters in the city
  54. set $@UNEASY_MOB, 65;
  55. areamonster "prontera",0,0,0,0,"Zombie",1015,30,"Uneasy_Check::OnZombieDead";
  56. //in the Cemetery
  57. monster "prontera",268,349,"Zombie",1015,30,"Uneasy_Check::OnZombieDead";
  58. monster "prontera",269,350,"Ghoul",1036,5,"Uneasy_Check::OnZombieDead";
  59. //announce
  60. mapannounce "prontera","[Mother Mathana]: The cememtery has become restless! In the name of Odin, hurry to the Sanctuary! Save the city of Prontera!",0;
  61. }
  62. prontera,257,313,5 script Mother Mathana 79,{
  63. mes "[Mother Mathana]";
  64. if ($UNEASY_DL <= 0) goto L_Undead_Walk;
  65. mes "I'm afraid there's something wrong with our old cemetery...";
  66. if ($UNEASY_H$==strcharinfo(0)) mes "But thanks to you, "+$UNEASY_H$+", we'll be able to sleep " + $UNEASY_DL + " nights!";
  67. if ($UNEASY_H$!=strcharinfo(0)) mes "But thanks to "+$UNEASY_H$+"'s support, we've got " + $UNEASY_DL + " easy nights!";
  68. emotion e_gasp;
  69. close;
  70. L_Undead_Walk:
  71. if ($UNEASY_DL == 0) mes "THEY could return tomorrow's night again!";
  72. if ($UNEASY_DL == 0 && $UNEASY_H$==strcharinfo(0)) mes "Thank you, "+$UNEASY_H$+"! Now we'll manage to rest till the next midnight!";
  73. if ($UNEASY_DL == 0 && $UNEASY_H$!=strcharinfo(0)) mes "But due to "+$UNEASY_H$+"'s help we'll manage to rest till the next midnight!";
  74. mes "To calm down the restless cemetery, we should pour all these graves with the Holy Water. But our sisters and broters have run out of it.";
  75. mes "Could you supply us with Holy Water?";
  76. next;
  77. menu "Yes, have all my Holy Water!",-, "Nope, I need it.",M_NO, "I don't have any.",M_DONT_HAVE;
  78. if ( countitem(523)<1 ) goto M_DONT_HAVE;
  79. set $UNEASY_BL,$UNEASY_BL-countitem(523);
  80. delitem 523,countitem(523);
  81. if ( $UNEASY_BL > 0 ) goto L_NEED_MORE;
  82. //set quiet days!!! no more undead for this period!
  83. set $UNEASY_DL,5+((0-$UNEASY_BL)/30);
  84. set $UNEASY_H$,strcharinfo(0);
  85. mes "[Mother Mathana]";
  86. mes "Thank you, "+$UNEASY_H$+"! Now we've got enough Holy Water!";
  87. next;
  88. mes "[Mother Mathana]";
  89. mes "Upon pouring the cemetery with that water we'll get " + $UNEASY_DL + " safe nights!";
  90. next;
  91. killmonsterall "prontera"; //kills any left monsters
  92. mes "[Mother Mathana]";
  93. mes "See, "+ $UNEASY_H$ +"? They all are gone now!";
  94. next;
  95. mes "[Mother Mathana]";
  96. mes "Our Church is going to thank you personally...";
  97. next;
  98. if (Sex==1) mapannounce "prontera","[Mother Mathana]: In the name of Odin we declare handsom "+$UNEASY_H$+" as a Prontera savior!",0;
  99. if (Sex==0) mapannounce "prontera","[Mother Mathana]: In the name of Odin we declare beautiful "+$UNEASY_H$+" as a Prontera savior!",0;
  100. mes "[Mother Mathana]";
  101. mes "In the name of Odin we bless you and decently present a modest gift just from Mareusis' wine-cellar.";
  102. getitem 505,1; //Blue_Potion
  103. set JobExp,JobExp+100;
  104. set BaseExp,BaseExp+50;
  105. close;
  106. L_NEED_MORE:
  107. mes "[Mother Mathana]";
  108. mes "Thank you, good "+strcharinfo(0)+", but we still need " + $UNEASY_BL + " more Holy Water bottles.";
  109. close;
  110. M_NO:
  111. mes "[Mother Mathana]";
  112. mes "I'm afraid the old cemetery is going out of control soon... Please, get us all the Holy Water you can get.";
  113. close;
  114. M_DONT_HAVE:
  115. mes "[Mother Mathana]";
  116. mes "Alas! We still need " + $UNEASY_BL + " more bottles of Holy Water... Why don't you go and ask other people for some extra Holy Water?";
  117. mes "The old cemetery is going out of control soon...";
  118. mes "Please, in the name of Odin, help Prontera city.";
  119. close;
  120. }