summaryrefslogtreecommitdiff
path: root/npc/commands/event.txt
blob: a78be0f8374f15da33c07b8750f77f0e301ace38 (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
function	script	GlobalEventMenu	{

    function rateManagement {
        clear;
        mes l("To get the current rate:");
        mes col("    @exprate", 7);
        next;
        mes l("To set the exp rate:");
        mes col("    @exprate ##Brate##b hours", 7);
        next;
        mes l("To reset back to normal:");
        mes col("    @exprate default", 7); // note to translators: any non-numerical value will reset so "default" is safe to translate
        next;
        return;
    }

    do
    {
        clear;
        setnpcdialogtitle l("Event Management");
        mes l("This menu allows you to manage events and gives access to event-related tools.");
        mes "";
        mes l("What do you want to access?");

        select
            l("Rate management"),
            rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu")));

        //.@c = getarg(0,0) ? 2 : 1; // 1 = back to event menu, 2 = back to super menu

        switch (@menu)
        {
            case 1: rateManagement; break;
            default: return;
        }

    } while (true);
}



-	script	@event	32767,{
    end;

OnCall:
    if (!is_evtc())
    {
        end;
    }

    GlobalEventMenu;
    closedialog;
    end;

OnInit:
    bindatcmd "event", "@event::OnCall", 99, 99, 0;
}