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