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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
|
// TMW2 Script
// Authors:
// Jesusalva
// Description:
// Tutorial
// TODO: Do not hardcode keyboard keys. The player may have changed the keyboard or even mouse bindings.
000-0-0,30,34,0 script Elmo#sailors NPC_ELMO,{
OnBegin:
.@q = getq(ShipQuests_Arpan);
if (.@q == 0) goto L_Step0;
if (.@q == 1) goto L_Step1;
if (.@q == 2) goto L_Step2;
if (.@q == 3) goto L_Step3;
if (.@q == 4) goto L_Step4;
if (.@q == 5) goto L_Step5;
goto L_Ready;
// Tutorial not accepted
L_Step0:
deltimer("Elmo#sailors::OnSlow");
deltimer("Elmo#sailors::OnSlow2");
setcamnpc;
showavatar NPC_ELMO;
mesn "Elmo";
mesq l("Hey. You. You were in need of medical attention earlier. Do you remember how to walk, talk, attack, etc?");
next;
select
l("Actually, a tutorial would be good!"),
l("Yes, I do.");
if (@menu == 2) {
if (!#TUTORIAL_DONE) {
mesn l("Magic Arpan");
mesq l("Yaya, are you sure?");
mesc l("This option will be remembered by other NPCs as well.");
next;
select
l("Yes, I am."),
l("Actually, a tutorial would be good!");
mes "";
if (@menu == 2)
goto L_Begin;
}
TUTORIAL=false;
mesn l("Magic Arpan");
mesq l("Yeye don't need to train here anymore! Let's head back to the ship before the sun sets, shall we?");
next;
goto L_Skip;
}
L_Begin:
TUTORIAL=true;
savepoint "000-0-0", 30, 37;
setq ShipQuests_Arpan, 1;
// Tutorial accepted
L_Step1:
showavatar NPC_MAGIC_ARPAN;
mesn l("Magic Arpan");
mesq l("Let's start with something simple, yeye.");
next;
mesn l("Magic Arpan");
mesq l("You can move using @@ or, at your choice, by clicking where you want to go.", b(l("arrow keys")));
next;
setcamnpc "Chest#002-1";
mesn l("Magic Arpan");
mesq l("On mobile, the DPAD is at your left. Do you see the chest to my right?");
next;
setcamnpc;
mesn l("Magic Arpan");
mesq l("Go and talk to it.");
close;
// Clothes taken
L_Step2:
showavatar NPC_MAGIC_ARPAN;
mesn l("Magic Arpan");
mesq l("Yeye, very good, you took the clothes.");
next;
L_Step2Skip:
mesn l("Magic Arpan");
mesq l("Equipping them is easy, you must open your inventory with @@ or clicking in @@, on the top right.", b(l("F3")), b(l("INV")));
next;
mesn l("Magic Arpan");
mesq l("Most of it should be pretty intuitive, but be sure to press @@ on the bottom-left of inventory screen.", b(l("Equip")));
next;
mesn l("Magic Arpan");
mesq l("Come talk to me once you manage to equip the shirt and the shorts!");
mesc l("PS. Due a bug, they won't be displayed when you equip unless you relog."), 1;
setq1 ShipQuests_Arpan, 3;
close;
// Clothes Check
L_Step3:
if (getequipid(equip_torso) < 0 || getequipid(equip_legs) < 0)
goto L_Step2Skip;
setcamnpc;
showavatar NPC_ELMO;
mesn "Elmo";
mesq l("You learn fast, good job. These clothes aren't mighty armor, but they'll help.");
next;
mesn "Elmo";
mesq l("Let's jump straight to action, shall we? I'll build a mighty @@ to fight you!", getmonsterlink(Dummy));
next;
mesn "Elmo";
mesq l("On a computer, you can press @@ to attack it. On mobile, that would be the big button with the number 1.", b(l("Ctrl")));
next;
mesn "Elmo";
mesq l("Another way to attack it is clicking on it. Now, there are some things you must know before fighting this truly dangerous foe!");
next;
showavatar NPC_MAGIC_ARPAN;
mesn l("Magic Arpan");
mesq l("Yayaya, by pressing @@ or clicking in @@, you'll open your character status window!", b(l("F2")), b(l("STA")));
next;
mesn l("Magic Arpan");
mesq l("You should allocate some attributes. You need @@, @@ and @@, on this order of importance.", b(l("Agility")), b(l("Dexterity")), b(l("Strength"))); // b(l("")),
next;
mesn l("Magic Arpan");
mesq l("Once you allocate status points, you can fight it! Good luck, @@!", strcharinfo(0));
mesc l("WARNING: NO EXPERIENCE WILL BE CARRIED OVER FROM THIS FIGHT."), 1;
percentheal 100,100;
// This is not really reliable, of course >.<
.@mct=mobcount("000-0-0", "Elmo#sailors::OnStep4");
.@x=38; .@y=43;
.@x+=.@mct;
freeloop(true);
while (.@x > 43) {
.@x-=5; .@y+=1;
}
freeloop(false);
if (.@y <= 47)
@mobTarget=monster("000-0-0", 43, 44, l("@@ Dummy", strcharinfo(0)), Dummy, 1, "Elmo#sailors::OnStep4");
setq1 ShipQuests_Arpan, 4;
close;
L_Step4:
percentheal 100,100;
mesn "Elmo";
mesq l("Did something happen?");
mesc l("This is a menu, click on the option and then on submit. You can use arrow keys if you prefer.");
mes "";
select
l(">.< \"The Dummy is a real killer!\""),
l("T.T \"Someone else killed my Dummy!\""),
l("'.' \"I forgot how to allocate points!\""),
l("-.- \"I forgot how to fight!\""),
l("._. \"What are these statuses useful for?\""),
l("^.^ \"Nothing is wrong, don't worry!\"");
mes "";
switch (@menu) {
case 1:
mesn "Elmo";
mesq l("Well, you don't have a weapon. So, let me explain quickly.");
next;
mesn "Elmo";
mesq l("Don't be afraid of death. Of course, in most places, dying will make you lose some Experience you gathered.");
next;
mesn "Elmo";
mesq l("But you don't have any experience at the moment, so what do you have to lose?");
next;
mesn "Elmo";
mesq l("Try killing it, and if it kills you, just come back from death to continue killing it.");
mes l("What I want to say is: Kill non-stop!");
next;
mesc l("Actually, the Dummy will not fight back. Are you afraid?");
break;
case 2:
.@mct=mobcount("000-0-0", "Elmo#sailors::OnStep4");
if (.@mct) {
mesn "Elmo";
mesq l("It was just south of the island. Try walking around a bit?");
} else {
npctalk l("Hey, this Dummy is to @@ kill.", strcharinfo(0));
monster "000-0-0", 43, 44, l("@@ Dummy", strcharinfo(0)), Dummy, 1, "Elmo#sailors::OnStep4";
}
break;
case 3:
showavatar NPC_MAGIC_ARPAN;
mesn l("Magic Arpan");
mesq l("Yayaya, by pressing @@ or clicking in @@, you'll open your char status window!", b(l("F2")), b(l("STA")));
next;
mesn l("Magic Arpan");
mesq l("You should allocate some attributes to it. You need @@, @@ and @@, on this order of importance.", b(l("Agility")), b(l("Dexterity")), b(l("Strength"))); // b(l("")),
break;
case 4:
mesn "Elmo";
mesq l("On a computer, you can press @@ to attack it. On mobile, that would be the big button with the number 1.", b(l("Ctrl")));
next;
mesn "Elmo";
mesq l("Another way to attack it is clicking on it.");
break;
case 5:
mesn "Elmo";
mes l("@@ helps you carry more items and also gives you a more forceful blow, but ends up not being very interesting if you focus on weapons that use projectiles, such as the bow.", b(l("Strength")));
next;
mesn "Elmo";
mes l("Greater @@ allows you to attack faster and has a greater chance of evading attacks.", b(l("agility")));
next;
mesn "Elmo";
mes l("@@ determines how many blows you can take before you die. It also affects status effects, like poison.", b(l("Vitality")));
next;
mesn "Elmo";
mes l("@@ is very useful for alchemy and magic, but nowadays there are few opportunities to use it.", b(l("Intelligence")));
next;
mesn "Elmo";
mes l("Your @@ determines your ability to hit monsters and is valuable to players who prefer weapons that use projectiles.", b(l("dexterity")));
next;
mesn "Elmo";
mes l("Your @@ determines several small things, including critical attacks and, limited to a certain extent, affect drop rates.", b(l("luck")));
next;
mesn "Elmo";
mes l("But to defeat this dummy, I would say that %s should do the trick.", b(l("assigning 5 points each to str, agi, dex and luck")));
break;
}
close;
OnStep4:
if (getunittype(@mobTarget) != -1 && is_staff())
dispbottom ("Hey hey, the monster seems to be alive. Mr. GM, do something about that!");
dispbottom l("You free the world from an evil Dummy.");
compareandsetq ShipQuests_Arpan, 4, 5;
end;
L_Step5:
showavatar NPC_MAGIC_ARPAN;
mesn l("Magic Arpan");
mesq l("Yayaya, good job! You can collect loot by pressing @@.", b("Z"));
next;
mesn l("Magic Arpan");
mes l("I like to talk! If yeye likes too, you can press @@ to open chat box!", b(l("Enter")));
mes l("On mobile, you would click on the @@ icon!", b(l("keyboard")));
next;
mesn l("Magic Arpan");
mesq l("The @@ tab allows yeye to talk on Discord, too! Yayaya, fancy, uh?", b("#world"));
next;
mesn l("Magic Arpan");
mesq l("Yeye can press @@ to sit, which will allow you to heal faster.", b("s"));
next;
showavatar NPC_ELMO;
mesn "Elmo";
mesq l("You're ready. Let's head back to the ship before the sun sets, shall we?");
next;
getitem PiouLegs, 3; // Tutorial Reward
goto L_Ready;
L_Skip:
setq ShipQuests_Arpan, 5;
getitem CreasedShirt, 1;
getitem CreasedShorts, 1;
equip(CreasedShirt);
equip(CreasedShorts);
L_Ready:
#TUTORIAL_DONE=true;
//clearitem(); // The dummy does not drop anything :>
resetlvl(2);
restorecam;
setq General_Narrator, 0;
adddefaultskills;
percentheal 100,100;
addtimer(45000,"Magic Arpan::OnSlow");
LOCATION$ = "Candor";
warp "002-1@Candor", 53, 38;
savepoint "000-1", 22, 22;
TUT_VAR=gettimetick(2);
closedialog;
close;
// Prevent players from forgetting what they were meant to do
// But if they logout, this will never trigger
OnSlow:
npctalk3 l("Hey @@! You haven't talked to me yet!", strcharinfo(0));
addtimer(30000,"Elmo#sailors::OnSlow2");
end;
OnSlow2:
npctalk3 l("@@, do you need help? Are you lost? Talk to me!", strcharinfo(0));
dispbottom l("Click on Elmo or Magic Arpan to continue and begin the game...");
addtimer(60000,"Elmo#sailors::OnSlow");
end;
OnInit:
.sex = G_MALE;
end;
}
000-0-0,29,34,0 script Magic Arpan#sailors NPC_MAGIC_ARPAN,{
doevent "Elmo#sailors::OnBegin";
close;
OnInit:
.sex = G_MALE;
end;
}
|