1 //===== rAthena Script =======================================
2 //= Uneasy Prontera Cemetery Quest
3 //===== By: ==================================================
5 //===== Current Version: =====================================
6 //= 1.2a (Tested and fully working!)
7 //===== Compatible With: =====================================
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 //============================================================
22 prontera,3,3,3 script Uneasy_Check -1,{
26 set $UNEASY_DL,$UNEASY_DL-1;
27 set $UNEASY_BL,$UNEASY_BL+30; //add need of HW for 30 bottles per day
28 if ($UNEASY_BL>666) set $UNEASY_BL,666; //keep needed bottles not <=666
29 if ($UNEASY_DL < 0) goto L_Start_Undead;
30 //The Cemetery is OK yet.
31 disablenpc "Mother Mathana";
34 if ($UNEASY_DL >= 0) disablenpc "Mother Mathana";
38 killmonsterall "prontera"; //The Sun kills undead in the morning
42 if ($@UNEASY_MOB > 0) mapannounce "prontera","[Mother Mathana]: In the name of Odin, please finish these roaming undead leftovers!",0;
46 set $@UNEASY_MOB,$@UNEASY_MOB-1;
47 if ($@UNEASY_MOB>0) end;
49 set $UNEASY_H$,strcharinfo(0);
50 if (Sex==SEX_MALE) mapannounce "prontera","[Mother Mathana]: Brave "+$UNEASY_H$+" has just killed the last undead in Prontera!",0;
51 else mapannounce "prontera","[Mother Mathana]: Lady "+$UNEASY_H$+" has just killed the last undead in Prontera!",0;
52 set JobExp,JobExp+100;
53 set BaseExp,BaseExp+50;
57 killmonsterall "prontera"; //kills any left monsters
58 enablenpc "Mother Mathana";
59 //call some monsters in the city
61 areamonster "prontera",0,0,0,0,"Zombie",1015,30,"Uneasy_Check::OnZombieDead";
63 monster "prontera",268,349,"Zombie",1015,30,"Uneasy_Check::OnZombieDead";
64 monster "prontera",269,350,"Ghoul",1036,5,"Uneasy_Check::OnZombieDead";
66 mapannounce "prontera","[Mother Mathana]: The cememtery has become restless! In the name of Odin, hurry to the Sanctuary! Save the city of Prontera!",0;
69 prontera,257,313,5 script Mother Mathana 79,{
70 mes "[Mother Mathana]";
71 if ($UNEASY_DL <= 0) goto L_Undead_Walk;
72 mes "I'm afraid there's something wrong with our old cemetery...";
73 if ($UNEASY_H$==strcharinfo(0)) mes "But thanks to you, "+$UNEASY_H$+", we'll be able to sleep " + $UNEASY_DL + " nights!";
74 if ($UNEASY_H$!=strcharinfo(0)) mes "But thanks to "+$UNEASY_H$+"'s support, we've got " + $UNEASY_DL + " easy nights!";
79 if ($UNEASY_DL == 0) mes "THEY could return tomorrow's night again!";
80 if ($UNEASY_DL == 0 && $UNEASY_H$==strcharinfo(0)) mes "Thank you, "+$UNEASY_H$+"! Now we'll manage to rest till the next midnight!";
81 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!";
82 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.";
83 mes "Could you supply us with Holy Water?";
85 menu "Yes, have all my Holy Water!",-, "Nope, I need it.",M_NO, "I don't have any.",M_DONT_HAVE;
87 if ( countitem(523)<1 ) goto M_DONT_HAVE;
88 set $UNEASY_BL,$UNEASY_BL-countitem(523);
89 delitem 523,countitem(523);
91 if ( $UNEASY_BL > 0 ) goto L_NEED_MORE;
92 //set quiet days!!! no more undead for this period!
93 set $UNEASY_DL,5+((0-$UNEASY_BL)/30);
94 set $UNEASY_H$,strcharinfo(0);
95 mes "[Mother Mathana]";
96 mes "Thank you, "+$UNEASY_H$+"! Now we've got enough Holy Water!";
98 mes "[Mother Mathana]";
99 mes "Upon pouring the cemetery with that water we'll get " + $UNEASY_DL + " safe nights!";
101 killmonsterall "prontera"; //kills any left monsters
102 mes "[Mother Mathana]";
103 mes "See, "+ $UNEASY_H$ +"? They all are gone now!";
105 mes "[Mother Mathana]";
106 mes "Our Church is going to thank you personally...";
108 if (Sex==SEX_MALE) mapannounce "prontera","[Mother Mathana]: In the name of Odin we declare handsom "+$UNEASY_H$+" as a Prontera savior!",0;
109 else mapannounce "prontera","[Mother Mathana]: In the name of Odin we declare beautiful "+$UNEASY_H$+" as a Prontera savior!",0;
110 mes "[Mother Mathana]";
111 mes "In the name of Odin we bless you and decently present a modest gift just from Mareusis' wine-cellar.";
112 getitem 505,1; //Blue_Potion
113 set JobExp,JobExp+100;
114 set BaseExp,BaseExp+50;
118 mes "[Mother Mathana]";
119 mes "Thank you, good "+strcharinfo(0)+", but we still need " + $UNEASY_BL + " more Holy Water bottles.";
123 mes "[Mother Mathana]";
124 mes "I'm afraid the old cemetery is going out of control soon... Please, get us all the Holy Water you can get.";
128 mes "[Mother Mathana]";
129 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?";
130 mes "The old cemetery is going out of control soon...";
131 mes "Please, in the name of Odin, help Prontera city.";