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
|
// TMW2 scripts.
// Authors:
// Jesusalva
// Description:
// Sagratha
// SaggyScoreUpdate( amount )
function script SaggyScoreUpdate {
.@val=getarg(0);
SAGRATHA_SCORE=max(-50, min(50, SAGRATHA_SCORE+.@val));
return;
}
function script SaggyMobCount {
switch (killedrid) {
// She gets angry
case Mouboo:
case AlphaMouboo:
SaggyScoreUpdate(-5);
break;
case Pollet:
case Fluffy:
case IcedFluffy:
SaggyScoreUpdate(-3);
break;
case PoisonSpikyMushroom:
case LogHead:
case ForestMushroom:
SaggyScoreUpdate(-2);
break;
case Squirrel:
case SpringSquirrel:
case LofSquirrel:
case FrozenSquirrel:
case FairysSquirrel:
SaggyScoreUpdate(-1);
break;
// She may get happy. Who knows.
case ViciousSquirrel:
case WickedMushroom:
case Bluepar:
case BlackScorpion:
case AngryScorpion:
case AngryRedScorpion:
SaggyScoreUpdate(any(0,0,1));
break;
}
return;
}
014-5-1,33,37,0 script Sagratha NPC_SAGRATHA,{
if (array_find(.SaggyHats, getequipid(EQI_HEAD_TOP)) >= 0)
goto L_HatAttack;
if (SAGRATHA_SCORE < 0)
goto L_Unhappy;
.@q=getq(HurnscaldQuest_Sagratha);
mesn;
if (.@good >= 2)
mesc l("@@ nods as she notices you.", .name$);
if (.@good == 1)
mesc l("@@ raises an eyebrow as you address her.", .name$);
if (.@good == 0)
mesc l("@@ glances at you, suspicion evident in her eyes.", .name$);
mesq l("Hello.");
next;
if (.@q == 6)
goto L_Reward;
// TODO: What's your name etc etc - Maybe before the dialog, in the dungeon
// TODO: Handle the curse (menu option)
// TODO: Collect reward (set quest status to 7)
// TODO: Allow to return to the Sealed Shrine
// TODO: Learn Magic
// TODO: Request help with stuff (eg. protecting mouboos?)
// TODO: Get Mouboo Milk :>
// TODO: Maybe never update her score with kills and make her more pacifist?
close;
L_Reward:
select
l("Hi! My name is @@.", strcharinfo(0)),
l("Are you Sagratha?"),
l("Good bye.");
mes "";
if (@menu == 3)
close;
if (@menu == 1) {
mesn;
mesq l("Ah.");
next;
select
l("Are you Sagratha?"),
l("Erm... Good bye.");
mes "";
if (@menu == 2)
close;
}
mesn;
mesq l("Yes.");
next;
mesn;
mesq l("Do you need something from me?");
next;
// A check is not needed, because quest pre-requisites
// If you don't have the quest in clearable state... CHEAT!
select
l("Yep. There was a cursed mouboo on the road."),
l("Not really.");
mes "";
if (@menu == 2) {
mesn;
mesq l("Okay then.");
close;
}
mesn;
mesq l("Yes, the cursed Mouboo you told me earlier, on the way out.");
next;
mesn;
mesq l("The curse was done by nobody less than... the Moubootaur.");
next;
mesn;
mesq l("");
close;
L_HatAttack:
mesn;
mesc l("@@ seems to be trembling with disgust as she stares at your headgear.", .name$);
mes l("\"Do you think that is funny?\" she snarls.");
next;
mesn;
mesq l("You have no idea what that poor creature felt!");
next;
mesn;
mesc l("She snaps her fingers.");
mesq l("Let me show you...");
specialeffect 312, SELF, getcharid(3);
heal -300, 0;
close;
L_Unhappy:
mesn;
mesc l("@@ glares at you in anger.", .name$);
mesq l("I wonder if you can still sleep after killing those innocent forest creatures!");
next;
mesn;
mesq l("I am sure that they will come back to haunt you in your dreams!");
close;
OnInit:
setarray .SaggyHats, FluffyHat, MoubooHat, AlphaMoubooHat;
.distance=5;
npcsit;
end;
OnInstanceInit:
disablenpc instance_npcname(.name$);
end;
}
|