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
|
function script ClearVariables {
if (@login_event != 1) goto L_Deprecated;
// Some temporary bugfix
GM = getgroupid();
// Remove old variables to new quest system
if (QL_VALON) {
setq CandorQuest_Valon, QL_VALON;
QL_VALON = 0;
}
if (QL_HIDENSEEK) {
setq CandorQuest_HideNSeek, (QL_HIDENSEEK >= 64 ? 2 : 1), (QL_HIDENSEEK-1);
QL_HIDENSEEK = 0;
}
if (#CRYPT_PASSWORD && !getq(Quest_Reapercry)) {
learnskill SKILL_REAPERCRY, 1;
setq Quest_Reapercry, 1;
}
if (#DD5_TALLY) {
setq Quest_Doomsday, 2;
#DD5_TALLY = 0; // Whatever, one is enough
}
if (#BankAccount) {
BankVault += #BankAccount;
#BankAccount = 0;
}
if (QL_CINDY) {
if (QL_CINDY == 5) QL_CINDY = 0;
else if (QL_CINDY == 6) QL_CINDY = 1;
else if (QL_CINDY == 1) QL_CINDY = 2;
else if (QL_CINDY == 2) QL_CINDY = 3;
else if (QL_CINDY == 3) QL_CINDY = 4;
else if (QL_CINDY == 4) QL_CINDY = 5;
setq KaizeiQuest_Cindy, QL_CINDY;
QL_CINDY = 0;
}
if (MAGIC_EXPERIENCE) {
setq2(MagicQuest_Healing, abs(MAGIC_EXPERIENCE >> 24));
MAGIC_EXP = abs(MAGIC_EXPERIENCE & 65535);
MAGIC_EXPERIENCE = 0;
/* Convert the old magic system to new magic system */
setq1(MagicQuest_DarkMage,
OrumQuest);
setq1(MagicQuest_Healing,
(QUEST_MAGIC2 & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT);
//setq1(MagicQuest_Wyara,
// (QUEST_MAGIC2 & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT);
//setq1(MagicQuest_Kadiya,
// (QUEST_MAGIC2 & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
setq1(MagicQuest_Pauline,
(QUEST_MAGIC2 & NIBBLE_4_MASK) >> NIBBLE_4_SHIFT);
//setq1(MagicQuest_BrotherSword,
// (QUEST_MAGIC2 & NIBBLE_6_MASK) >> NIBBLE_6_SHIFT);
//setq1(MagicQuest_SisterSword,
// (QUEST_MAGIC2 & (NIBBLE_6_MASK | NIBBLE_7_MASK)) >> NIBBLE_6_SHIFT); // Twobits, overlap w/ brothersword o.o
//setq1(MagicQuest_Auldsbel,
// (QUEST_MAGIC & (NIBBLE_0_MASK | NIBBLE_1_MASK)) >> NIBBLE_0_SHIFT); // Twobits
//setq1(MagicQuest_WhiteMage,
// (QUEST_MAGIC & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT); // Boo + Druid
//SAGATHA_ST = (QUEST_MAGIC & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT; // Unhappy
//Saggy - 4+5
//Alchemist - 6+7 (War Quest - Swords again?)
/* Update skill list */
// Morgan & Orum
if (QL_MORGAN >= 2)
learnskill SKILL_CONFRINGO;
if (OrumQuest >= 37)
learnskill SKILL_HELORP;
if (OrumQuest >= 38)
learnskill SKILL_PHLEX;
if (OrumQuest >= 41)
learnskill SKILL_HALHISS;
// Pauline
if (getq(MagicQuest_Pauline) >= 3)
learnskill SKILL_KALBOO;
if (getq(MagicQuest_Pauline) >= 4)
learnskill SKILL_KALGINA;
// Auldsbel
.@i=((QUEST_MAGIC & (NIBBLE_0_MASK | NIBBLE_1_MASK)) >> NIBBLE_0_SHIFT);
if ((.@i >> 5) >= 5)
learnskill SKILL_GOLE;
.@i = .@i & 31;
if (.@i >= 2)
learnskill SKILL_PARUM;
if (.@i >= 4)
learnskill SKILL_PATVILOREE;
if (.@i >= 5)
learnskill SKILL_PATLOREE;
if (.@i >= 6)
learnskill SKILL_PATMUPLOO;
if (.@i >= 7)
learnskill SKILL_KULARZUFRILL;
// War Mage
.@i = (QUEST_MAGIC & NIBBLE_6_MASK) >> NIBBLE_6_SHIFT;
if (.@i >= 1)
learnskill SKILL_FLAR;
if (.@i >= 2)
learnskill SKILL_CHIZA;
if (.@i == 4)
learnskill SKILL_FRILLYAR;
if (.@i == 5)
learnskill SKILL_UPMARMU;
if (.@i >= 6) {
learnskill SKILL_FRILLYAR;
learnskill SKILL_UPMARMU;
}
if (.@i >= 7)
learnskill SKILL_INGRAV;
// Healing magic
if (getq(MagicQuest_Healing) >= 1)
learnskill SKILL_LUM;
if (getq(MagicQuest_Healing) >= 3)
learnskill SKILL_INMA;
// Light Mage
.@i=((QUEST_MAGIC & (NIBBLE_4_MASK | NIBBLE_5_MASK)) >> NIBBLE_4_SHIFT);
if (.@i >= 2)
learnskill SKILL_CHIPCHIP;
if (.@i >= 3)
learnskill ALL_INCCARRY;
if (.@i >= 4)
learnskill SKILL_ASORM;
if (.@i >= 5)
learnskill SKILL_KALRENK;
if (.@i >= 6)
learnskill SKILL_KALAKARENK;
if (.@i >= 7)
learnskill SKILL_BETSANC;
//QUEST_MAGIC = 0;
//QUEST_MAGIC2 = 0;
OrumQuest = 0;
}
return;
}
function script ServerUpdate {
if ($@STARTUP) {
debugmes "Cowardly refusing to update server outside startup";
return;
}
// Correct Mana Pearl ID
// qui jul 29 11:21:38 BRT 2021
if ($VERSION < 1627568498) {
ReplaceItemFromEveryPlayer(5270, 5272);
ReplaceItemFromEveryPlayer(5267, 5273);
ReplaceItemFromEveryPlayer(5268, 5274);
ReplaceItemFromEveryPlayer(5269, 5275);
$VERSION = 1627568498;
}
$@STARTUP = true;
return;
}
|