summaryrefslogtreecommitdiff
path: root/npc/021-4/main.txt
blob: 5b3e1c55dd202d21a79a5999738c3867ea020273 (plain) (blame)
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
// TMW2 scripts.
// Authors:
//    The Mana World Team
//    Jesusalva
// Description:
//    Cindy Cave core logic. You must flip 5 switches to free Cindy, and kill every
//    Yeti to leave the Yeti's King Throne Room. Each passing minute, a new Yeti will
//    spawn. Amount relies on how long this has been dragging on.
//    Flipping switches creates yetis on the other switches.
//    You must try flip all 5 switches at once. Once all switches are flipped, there'll
//    be various waves of Yetis. More time passing = more penalty Yetis, with a safety
//    check to abort script after a hour. If this happen, everyone inside the cave
//    will be banned for cheating. This should not be possible without @monsterignore anyway :<

// Switches
function	script	CindySwitch_Check_214	{
    .@st1=getvariableofnpc(.lifetime, "#CindySwitch_06")-gettimetick(2);
    .@st2=getvariableofnpc(.lifetime, "#CindySwitch_07")-gettimetick(2);
    .@st3=getvariableofnpc(.lifetime, "#CindySwitch_08")-gettimetick(2);
    .@st4=getvariableofnpc(.lifetime, "#CindySwitch_09")-gettimetick(2);
    .@st5=getvariableofnpc(.lifetime, "#CindySwitch_10")-gettimetick(2);
    .@i=0;
    if (.@st1 > 0) .@i++;
    if (.@st2 > 0) .@i++;
    if (.@st3 > 0) .@i++;
    if (.@st4 > 0) .@i++;
    if (.@st5 > 0) .@i++;
    return .@i;
}
021-4,77,25,0	duplicate(#CindySwitch_01)	#CindySwitch_06	NPC_SWITCH_OFFLINE
021-4,66,71,0	duplicate(#CindySwitch_01)	#CindySwitch_07	NPC_SWITCH_OFFLINE
021-4,25,57,0	duplicate(#CindySwitch_01)	#CindySwitch_08	NPC_SWITCH_OFFLINE
021-4,23,13,0	duplicate(#CindySwitch_01)	#CindySwitch_09	NPC_SWITCH_OFFLINE
021-4,56,41,0	duplicate(#CindySwitch_01)	#CindySwitch_10	NPC_SWITCH_OFFLINE

// Cindy
021-4,42,41,0	script	Cindy#Outside	NPC_CINDY_CAGE,{
    hello; end;
}