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
|
// TMW-2 Script
// Author:
// Jesusalva
// Description:
// Legendary hero
// I started with 'Greetings, citzen' and then I thought on 4144.
// He would never do such formal, hero-ish introduction. So I decided for something
// more realistic, which sounded like a human hero (ie. a normal player).
012-1,75,58,0 script Andrei Sakar NPC_ANDREI,{
mesn l("Andrei Sakar, Legendary Hero");
if ($NLIB_DAY) goto L_Quizz;
L_Default:
if (strcharinfo(0) == $MOST_HEROIC$)
mesq l("Hi, @@.", strcharinfo(0));
else
mesq l("Hi.");
close;
L_Quizz:
.@q=getq3(Q_NivalisLibday);
if (.@q == 0) {
setq3 Q_NivalisLibday, 100;
.@q=100;
} else if (.@q > 100) {
goto L_Default;
}
mesq l("We are assembling forces to take Nivalis back.");
mesq l("I'll make you five questions about lore and general knowledge. You'll have 30 seconds to read and answer each.");
mesq l("If you finish everything, and answer everything right, you may get a reward.");
mesq l("If you take too long you'll be penalized.");
mesq l("Do you want to start?");
next;
if (askyesno() == ASK_NO)
close;
mes "";
addtimer(30000, "Andrei Sakar::OnTooLong");
.@q=getq3(Q_NivalisLibday);
setq3 Q_NivalisLibday, .@q-7;
mesn;
mesq l("Did you really thought I would allow you to read the question answers on the source code?");
select
l("Yes."),
l("You really should."),
l("Of course."),
l("It was worth the shot.");
mes "";
deltimer("Andrei Sakar::OnTooLong");
if (@menu == 4) {
.@q=getq3(Q_NivalisLibday);
setq3 Q_NivalisLibday, .@q+7;
mesn;
mesq l("That's right.");
next;
} else {
mesn;
mesq l("Sorry, but that's wrong.");
close;
}
mesn;
mesq l("Rewards still weren't defined, sorry.");
.@q=getq3(Q_NivalisLibday);
getexp .@q*BaseLevel, .@q*JobLevel;
setq3 Q_NivalisLibday, 9999;
close;
OnTooLong:
.@q=getq3(Q_NivalisLibday);
setq3 Q_NivalisLibday, .@q-21;
npctalk3 l("You took too long to answer.");
close;
OnInit:
.sex = G_MALE;
.distance = 5;
end;
}
|