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
|
// TMW Script.
// Author:
// Jesusalva
// Notes:
// Christmas 2021 - Mysterious Glade (Final fights, cutscene & final shops)
// CANON:
// From now and hence forth, by the power vested to me due to mapmakers being
// lazy and all that, I declare that it is canon that:
// - Gak and Alissa used to live on this glade
// - Back in 2010, Gak went to Asphodel. First event.
// - Between 2011 and 2015, Gak found out someone built a house here
// - aka. The Pink Boots mage. Gak also got mad at how they got
// Zealite and were using it for petty reasons.
// - Gak took the mask as an offense to Alissa, and the manor as well.
// - As I forgot who is the Pink Boots mage... I can't say any further.
// - Oh, and in 2016, Gak went to visit Asphodel again.
080-1,98,41,0 script Alissa#ED2 NPC106,{
end;
OnInstanceInit:
disablenpc .name$;
end;
OnInit:
.distance=4;
/* I thought in making a shop here */
/* Valentine Dress, Love Potions, Pinkie Crystal... */
/* Would be confusing and bad, so removed. */
end;
}
080-1,97,41,0 script Gak#X21 NPC183,{
// FIXME: Cutscene
// FIXME: Enablenpc Alissa#ED2
// FIXME: Do not repeat cutscene if quest once completed
// FIXME: Do not repeat cutscene if Alissa is enabled?
openshop;
closedialog;
end;
OnInit:
.distance=4;
setarray .prizes, BlinkingEvil, BlinkingEvilRed, BlinkingEvilBlue,
BlinkingEvilPink, BlinkingEvilYellow, GuyFawkesMask,
OperaMask, JesterMask, GoblinMask, WitchHat;
setarray .prices, 1500, 1500, 1500,
1500, 1500, 250,
900, 700, 250, 450;
tradertype(NST_CUSTOM);
freeloop(true);
for (.@i = 0; .@i < getarraysize(.prizes); .@i++) {
sellitem(.prizes[.@i], .prices[.@i]);
}
freeloop(false);
end;
OnCountFunds:
setcurrency(countitem(AquaTicket));
end;
/* @price is total cost. @points is if we accept two items as currency. */
OnPayFunds:
//dispbottom "Hi: price="+@price+" and points="+@points;
if( countitem(AquaTicket) < @price )
end;
/* Verify if you're not purchasing a dupe */
/* This requires servercode@712c09c2c6d848243c3426aeb3dbdf730c1e0b08 to work */
for (.@i=0;.@i < getarraysize(@bought_nameid); .@i++) {
if (debug || $@XMAS21_OVERRIDE)
debugmes("%dx %s", @bought_quantity[.@i], getitemname(@bought_nameid[.@i]));
.@arr = array_find(.prizes, @bought_nameid[.@i]);
if (.@arr < 0) { dispbottom "REPORT ME: Array Error (Gak)"; end;}
.@bit = (2 ** .@arr);
if (#X21PRIZES_GAK & .@bit) {
dispbottom l("You already purchased a(n) %s during the event.", getitemlink(@bought_nameid[.@i]));
dispbottom l("Therefore, the operation was cancelled.");
end;
}
}
delitem AquaTicket, @price;
/* Record the items on the bitmask (far more important) */
/* This requires servercode@712c09c2c6d848243c3426aeb3dbdf730c1e0b08 to work */
for (.@i=0;.@i < getarraysize(@bought_nameid); .@i++) {
.@arr = array_find(.prizes, @bought_nameid[.@i]);
if (.@arr < 0) { dispbottom "REPORT ME: Fatal Array Error (Gak)"; end;}
.@bit = (2 ** .@arr);
#X21PRIZES_GAK = #X21PRIZES_GAK | .@bit;
}
purchaseok();
end;
}
// But then, Gak *did* "kidnap" a zealite specialist, right?
080-1,83,136,0 script #X21BarrierF NPC_HIDDEN,3,0,{
if ('XMAS21FINAL)
end;
if (mobcount(getmap(), "#X21BarrierF::OnKil")) {
dispbottom strcharinfo(0) + " : " + l("This clearly is not a real gate; Most likely an illusion to prevent access. I should be able to dispel it by killing the guardians.");
end;
}
delcells("X21LF@"+X21ID());
specialeffect(FX_MAGIC_WICKED_SPAWN, AREA, getcharid(3));
getitem AquaTicket, X21_TICKET_BOSS;
'XMAS21FINAL = true;
maptimer2(getmap(), 10, "#X21BarrierF::OnSesame");
end;
OnInit:
.distance=1;
end;
OnSesame:
dispbottom l("Without the guardians, the illusion is just that: An illusion. The path is clear.");
getitem AquaTicket, X21_TICKET_SUPPORT;
getexp X21_EXP_PUZZLE, 0;
end;
OnKil:
mapannounce getmap(), "One of the guardians has been eliminated by "+strcharinfo(0), 0;
getitem AquaTicket, X21_TICKET_SUPPORT + 1;
X21INIT();
end;
}
|