1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
|
// TMW2 Script
// Author:
// Pookie
// Saulc
// Jesusalva
// Description:
// Alvasus is a believer, he is from Halinarzo and he collects Roasted Maggot
// for Church Party.
// Quest for level 19 - 5 roasted maggot for Alvasus Pendant
// Notes:
// There is no church on Tulimshar. If he wanted to spread faith or whatever
// he would fit, but as he wants a party, I had to move him to Halinarzo.
// I turned him on a weekly quest. Sorry, I got excited u.u
//
// First time: Alvasus Pendant
// Later times: GP and EXP
//
// Q1: Current State
// Q2: Current Reward
// Q3: Current Week Number (for repeat)
009-5,29,39,0 script Alvasus NPC_PLAYER,{
.@q3 = getq3(HalinarzoQuest_Alvasus);
.@q2 = getq2(HalinarzoQuest_Alvasus);
if (.@q3 != atoi(gettimestr("%U", 2)))
setq HalinarzoQuest_Alvasus, 0, .@q2, atoi(gettimestr("%U", 2));
if (gettime(GETTIME_WEEKDAY) == SUNDAY) goto L_Sunday;
.@q = getq(HalinarzoQuest_Alvasus);
if (BaseLevel < 19) goto L_TooWeak;
if (.@q == 0) goto L_GiveTask;
if (.@q == 1) goto L_Check;
if (.@q == 2) goto L_Complete;
closedialog;
goodbye;
close;
L_TooWeak:
mesn;
mesq l("Go away, kid! Let me pray in peace!");
close;
L_Sunday:
mesn;
mesq l("Ah, Sunday. What better time to go to church?");
next;
if (!@alvasus && .@q == 2) goto L_Party;
mesn;
mesq l("We will have a party today, but only believers are allowed in!");
close;
L_Quit:
mes "";
mesn;
mesq l("Alright.");
close;
L_Party:
mesn;
mesq l("Please pray a bit with us!");
if (askyesno() != ASK_YES)
close;
mes "";
mesc "...";
next;
mesc "...";
next;
mesc "...";
next;
mesc "...";
next;
mesc "...";
next;
mesn;
mesq l("Alright, PARTY TIME!");
@alvasus=any(1,1,1,1,2,3,4,5);
@min = 65*@alvasus;
@max = 175*@alvasus;
@delay = 3*@alvasus;
@type = 1;
doevent "rand_sc_heal::OnUse";
close;
L_GiveTask:
mesn;
mesq lg("Hello Adventurer!");
next;
mesn;
mesq l("Would you like to help me with organizing a Church Party?");
next;
menu
l("Sure, why not?"), L_Quest,
l("I don't have time for that."), L_Quit;
L_Quest:
mes "";
mesn;
mesq l("Sunday I am having a Church Party but I forgot to prepare food!");
next;
mesn;
mesq l("Can you help me find some @@?", getitemlink(RoastedMaggot));
next;
menu
l("Okay!"), L_Start,
l("I don't have the time!"), L_Quit;
L_Start:
setq1 HalinarzoQuest_Alvasus, 1;
mes "";
mesn;
mesq l("Ok, let's see how many you have and how many I need:");
goto L_List;
L_List:
mes "";
mesn;
mes l("I will need:");
mes l("@@/5 @@", countitem(RoastedMaggot), getitemlink(RoastedMaggot));
next;
goto L_Check;
L_Check:
mesn;
mesq l("Do you have my @@?", getitemlink(RoastedMaggot));
next;
menu
l("Yes!"), L_Give,
l("How many did you need again?"), L_List,
l("No!"), L_Quit;
L_Give:
if (
countitem(RoastedMaggot) < 5
) goto L_NoItem;
// First time you get the Pendant
.@q2 = getq2(HalinarzoQuest_Alvasus);
if (.@q2 == 0) {
inventoryplace AlvasusPendant, 1;
getitem(AlvasusPendant, 1);
}
delitem(RoastedMaggot, 5);
getexp(700+.@q2, 1+.@q2);
Zeny=Zeny+(.@q2*5);
setq1(HalinarzoQuest_Alvasus, 2);
setq2 HalinarzoQuest_Alvasus, .@q2+1;
setq3 HalinarzoQuest_Alvasus, atoi(gettimestr("%U", 2));
mes "";
mesn;
mesq l("Thanks for all of your help!");
close;
L_Complete:
mesn;
mesq l("Now, to wait for Sunday is the most boring part... Alas, I wonder if I'll remember next week, too.");
//mesq l("Do you know where the party is? It's at Halin, to get there you need to pass through the Desert Canyon.");
close;
L_NoItem:
mesn;
mesq l("Thanks for the kindness, but you don't have enough. I need 5!");
close;
OnInit:
.@npcId = getnpcid(.name$);
setunitdata(.@npcId, UDT_HEADTOP, DesertHat);
setunitdata(.@npcId, UDT_HEADMIDDLE, SilkRobe);
setunitdata(.@npcId, UDT_WEAPON, CreasedBoots);
setunitdata(.@npcId, UDT_HAIRSTYLE, 6);
setunitdata(.@npcId, UDT_HAIRCOLOR, 7);
.sex = G_MALE;
.distance = 4;
end;
}
|