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
|
// TMW-2 Script.
// Author:
// Jesusalva
// Description:
// Leather Trousers quest (lv 48)
// Variable:
// LilitQuest_Shaabty
// 0 - Not enough level
// 1 - Quest assigned
// 2 - Requested the material
// 3 - Craft is in progress
// 4 - Quest Complete
// Var2:
// Controls how many snakes you killed down there.
// It counts regardless of quest state.
// Var3:
// Timer for state 3
018-5-3,29,38,0 script Shaabty NPC_FAIRY_A,{
function LTask;
.@q=getq(LilitQuest_Shaabty);
switch (.@q) {
case 0:
goto L_Start; break;
case 1:
goto L_Return; break;
case 2:
goto L_Craft; break;
case 3:
goto L_Craft2; break;
case 4:
goto L_Start; break;
}
Exception(l("Invalid quest state: @@", .@q), RB_DEFAULT|RB_SPEECH|RB_ISFATAL^RB_DISPBOTTOM);
close;
L_Start:
mesn l("Shaabty the Fairy");
mesq l("I always wanted to live in this town. I'm glad I managed to move from LoF Village to here.");
next;
mesn l("Shaabty the Fairy");
mesq l("A shame there are snakes below the ground. I really, really hate snakes, like every fairy.");
if (BaseLevel < 45 || .@q >= 3)
close;
next;
mesn l("Shaabty the Fairy");
mesq l("Maybe you could do me a favour, though?");
setq1 LilitQuest_Shaabty, 1;
LTask();
close;
function LTask {
mesn l("Shaabty the Fairy");
mesq l("I would love to see the skin of two @@.", getmonsterlink(MountainSnake));
next;
mesn l("Shaabty the Fairy");
mesq l("They live below this town. Can you do this for me?");
next;
return;
}
L_Return:
LTask();
.@q2=getq2(LilitQuest_Shaabty);
// 0.98% DR (skin) - Reference is 0.32%
// 2 snake skins should take ~200 kills
if (countitem(MountainSnakeSkin) >= 2) {
if (.@q2 < 150) {
mesn l("Shaabty the Fairy");
mesq l("I see two snake skins, but you didn't killed them down there. That defeats the whole purpose.");
} else {
goto L_Finish;
}
} else {
mesn l("Shaabty the Fairy");
mesq l("That's not a couple of skins.");
}
close;
L_Finish:
mesc l("Deliver @@ @@ to @@?", 2, getitemlink(MountainSnakeSkin), .name$), 1;
next;
if (askyesno() == ASK_YES) {
delitem MountainSnakeSkin, 2;
setq1 LilitQuest_Shaabty, 2;
getexp 20000, 200;
mesn l("Shaabty the Fairy");
mesq l("Thanks. Please come back later, there is something I want to do for you.");
}
close;
L_Craft:
mesn l("Shaabty the Fairy");
mesq l("So, I was thinking in crafting a @@ for you.", getitemlink(LeatherTrousers));
next;
mesn l("Shaabty the Fairy");
mes l("For that, I'll need @@/@@ @@.", countitem(LeatherPatch), 10, getitemlink(LeatherPatch));
mes l("And a commission of @@/@@ GP.", format_number(Zeny), format_number(8000));
if (countitem(LeatherPatch) < 10 ||
Zeny < 8000)
close;
next;
mesc l("Pay for her handi-work?");
if (askyesno() == ASK_YES) {
delitem LeatherPatch, 10;
Zeny-=8000;
setq1 LilitQuest_Shaabty, 3;
//setq3 LilitQuest_Shaabty, gettimeparam(GETTIME_HOUR)+2;
setq3 LilitQuest_Shaabty, gettimetick(2)+7200;
mesn l("Shaabty the Fairy");
mesq l("Thanks! Please come back in two hours, then I'll have the trousers ready.");
}
close;
// Each time you bother her, she loses the line;
L_Craft2:
.@q3=getq3(LilitQuest_Shaabty);
if (gettimetick(2) < .@q3) {
mesn l("Shaabty the Fairy");
.@mg$=any(l("stop interrupting me while I make your trousers."), l("stop making me lose the line by talking to me."));
mesq l("Please be patient and "+.@mg$);
mesc l("Remaining time: @@", FuzzyTime(.@q3));
setq3 LilitQuest_Shaabty, .@q3+rand2(1,3);
} else {
inventoryplace LeatherTrousers, 1;
getitem LeatherTrousers, 1;
getexp 0, 1000;
setq3 LilitQuest_Shaabty, 0;
setq1 LilitQuest_Shaabty, 4;
mesn l("Shaabty the Fairy");
mesq l("Here you go. Please enjoy and thanks for making this town better to live. Maybe one day the snakes leave ^.^");
}
close;
/////////////////////////////////////////////////////////
OnKillSnake:
.@q1=getq(LilitQuest_Shaabty);
.@q2=getq2(LilitQuest_Shaabty);
setq2 LilitQuest_Shaabty, .@q2+1;
if (.@q1 == 1) {
if (! (.@q2+1) % 10)
dispbottom l("@@ @@ killed.", .@q2+1, getmonsterlink(MountainSnake));
}
fix_mobkill(MountainSnake);
end;
OnInit:
.sex = G_OTHER;
.distance = 5;
end;
}
|