summaryrefslogtreecommitdiff
path: root/world/map/npc/annuals/xmas/2021.txt
blob: 1924163874ccfbc89b17ceb8adb91a63046838a6 (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
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
// The Mana World Scripts
// Christmas 2021
// (C) HoraK 2021
// Licensed under the GPLv2 or later

/////////////////////////////////////////////////////////////////
009-1,57,38,0|script|#GrinchHurns|431
{
    close;

OnEvent:
    npctalk strnpcinfo(0), $@XMAS2021GrinchTalk$;
    end;
}

/////////////////////////////////////////////////////////////////
001-1,51,77,0|script|#GrinchTulim|431
{
    close;

OnEvent:
    npctalk strnpcinfo(0), $@XMAS2021GrinchTalk$;
    end;
}

/////////////////////////////////////////////////////////////////
020-1,76,84,0|script|#GrinchNivalis|431
{
    close;

OnEvent:
    npctalk strnpcinfo(0), $@XMAS2021GrinchTalk$;
    end;
}

/////////////////////////////////////////////////////////////////
029-1,52,93,0|script|#GrinchCandor|431
{
    close;

OnEvent:
    npctalk strnpcinfo(0), $@XMAS2021GrinchTalk$;
    end;
}

/////////////////////////////////////////////////////////////////
-|script|XMAS2021KillGrinch|32767
{
    close;

OnInit:
/*
    if you create an npc with invisible name (nothing in front of the #)
    you will get a broken nick detected message from M+ this can be
    avoided by formatting the npc string like this regex:
    ^.(4,).*[ ]:[ ].*$
    (replaced the curly brackets with normal brackets since a right curly bracket in a comment halts entire server startup!)
    the first space in front of the : will not be shown in the message like:
    Grinchboo: Grrr.... 
*/
    set $@XMAS2021GrinchTalk$, "Grinchboo : Grrr it's that annyoing chrismas time again but this time there is an event on testing.themanaworld.org starting at 12th december. Look [@@https://forums.themanaworld.org/viewtopic.php?p=162964#p162964|here@@]!";
    disablenpc "#GrinchHurns";
    disablenpc "#GrinchTulim";
    disablenpc "#GrinchNivalis";
    disablenpc "#GrinchCandor";

    initnpctimer;
    end;

OnTimer3000:
    // if npc is disabled right after npctalk there is no speech bubble visible so wait a bit
    if ($@GrinchTalkTime == 1) 
        goto L_XMAS2021GrinchTalkTime;
        end; 

L_XMAS2021GrinchTalkTime:
    set $@GrinchTalkTime, 0;

    donpcevent "XMAS2021Respawn::OnEvent";

    disablenpc "#GrinchHurns";
    disablenpc "#GrinchTulim";
    disablenpc "#GrinchNivalis";
    disablenpc "#GrinchCandor";
    end;

OnTimer12000:
    // wait a bit so that the dead Grinchboo can disapear, in some rare cases that does not work
    if ($@GrinchKilled == 1) 
        goto L_XMAS2021KilledGrinch;
        end;

L_XMAS2021KilledGrinch:
    enablenpc "#GrinchHurns";
    enablenpc "#GrinchTulim";
    enablenpc "#GrinchNivalis";
    enablenpc "#GrinchCandor";

    donpcevent "#GrinchHurns::OnEvent";
    donpcevent "#GrinchTulim::OnEvent";
    donpcevent "#GrinchNivalis::OnEvent";
    donpcevent "#GrinchCandor::OnEvent";

    set $@GrinchKilled, 0;
    set $@GrinchTalkTime, 1;

    setnpctimer 0;
    end;

OnTimer900000:
    killmonster "009-1","XMAS2021Respawn::OnGrinch";
    killmonster "001-1","XMAS2021Respawn::OnGrinch";
    killmonster "020-1","XMAS2021Respawn::OnGrinch";
    killmonster "029-1","XMAS2021Respawn::OnGrinch";

    set $@GrinchKilled, 1;
    setnpctimer 0;
    end;
}

/////////////////////////////////////////////////////////////////
-|script|XMAS2021Respawn|32767
{
    close;

OnInit:
    // the first Grinchboo says nothing since no one will see it,
    // because message is shown right after server start when no one is logged in
    monster "009-1", 57, 38, "", 1162, 1, "XMAS2021Respawn::OnGrinch";
    monster "001-1", 51, 77, "", 1162, 1, "XMAS2021Respawn::OnGrinch";
    monster "020-1", 76, 84, "", 1162, 1, "XMAS2021Respawn::OnGrinch";
    monster "029-1", 52, 93, "", 1162, 1, "XMAS2021Respawn::OnGrinch";
    end;

OnGrinch:
    end;

OnEvent:
    monster "009-1", 57, 38, "", 1162, 1, "XMAS2021Respawn::OnGrinch";
    monster "001-1", 51, 77, "", 1162, 1, "XMAS2021Respawn::OnGrinch";
    monster "020-1", 76, 84, "", 1162, 1, "XMAS2021Respawn::OnGrinch";
    monster "029-1", 52, 93, "", 1162, 1, "XMAS2021Respawn::OnGrinch";
    end;
}