summaryrefslogtreecommitdiff
path: root/npc/019-2/guards.txt
blob: 127686cb435882999b75b2d28ee1efbcec2785a8 (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
// TMW2 scripts.
// Authors:
//    Jesusalva
// Description:
//    Protect Nivalis
//    Q_NivalisLibday
//    Day, Score, Temporary Time;

019-2,44,54,0	script	Guard#019-2.1	NPC_GUARD1,{
    .@q=getq(Q_NivalisLibday);

    if ($NIVALIS_LIBDATE) {
        mesn;
        mesq l("Nivalis was liberated @@ ago.", FuzzyTime($NIVALIS_LIBDATE));
        // TODO
        mesc l("Due town state, you cannot visit it. Do you want to cross to the other side?"), 1;
        next;
        if (askyesno() == ASK_YES)
            warp "019-1", 70, 30;
        close;
    } else if ($NLIB_DAY > 0) {
        if (.@q == $NLIB_DAY) goto L_Delay;
        if (BaseLevel < 40) goto L_Noob;
        if (BaseLevel >= 40) goto L_Veteran;
        close;
    } else if (is_admin()) {
        mesc "Initiate Nivalis Liberation Day?", 1;
        mesc "Event will last 7 days.", 1;
        select
            "Not yet.",
            "Yes",
            "No";
        if (@menu == 2) {
            addmapmask "019-3", MASK_MATTACK;
            $NLIB_DAY=1;
            $NLIB_HIGHTIME=0;
            $NLIB_HIGHNAME$="";
            channelmes("#world", "Nivalis Liberation Day has started.");
            announce "Nivalis Liberation Day has started.", bc_all|bc_npc;
        }
        close;
    } else {
        legiontalk; end;
    }
    end;
// Event Selectors
L_Noob:
    mesn;
    mesq l("Hey, you! We need help to get rid from some remaining monsters at Nivalis City.");
    next;
    mesn;
    mesq l("Are you up for the challenge?");

    close;

L_Veteran:
    if ($NLIB_DAY >= 7) goto L_MK;
    mesn;
    mesq l("Hey, you! We need help to find the Monster King.");
    close;

L_MK:
    mesn;
    mesq l("Today at 16:30 UTC we are going to attack the Monster King by surprise. There will be no delays, so be there.");
    close;
// Misc
L_Delay:
    mesn;
    mesq l("You already helped us today. Come back tomorrow.");
    close;

OnInit:
    if ($NLIB_DAY)
            addmapmask "019-3", MASK_MATTACK;

    .sex = G_MALE;
    .distance = 5;
    end;

OnHour00:
    if ($NLIB_DAY)
        $NLIB_DAY+=1;
    end;

OnClock1830:
    if (!$NLIB_DAY)
        end;

    end;
}