summaryrefslogtreecommitdiff
path: root/npc/001-2-34/doors.txt
blob: e2ffee1f34eec61d5a3bb22450a10c804d74c00b (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
// Evol scripts.
// Author:
//    Reid
//    Omatt
//    Toams
//    Jesus
// Description:
//    Doors NPCs.

001-2-34,23,29,0	script	ToTrainingRoom#001-2-34	NPC_HIDDEN,0,0,{
OnTouch:

        .@q2=getq2(ArtisQuests_TrainingLegion);
    // Map name limit: 4 chars (atl1)
    .@mapn$="atl1@"+getcharid(0);
    if (isinstance(.@q2) && .@q2 > 0) {
        warp .@mapn$, 36, 30;
    } else {
        .@inst = instance_create("Training Room "+getcharid(0), getcharid(3), IOT_CHAR);
        instance_attachmap("001-2-36", .@inst, false, .@mapn$);
        // 30 minutes (1800s) inside, or 5 minutes (300s) outside
        instance_set_timeout(1800, 300, .@inst);
        instance_init(.@inst);
        setq2 ArtisQuests_TrainingLegion, .@inst;
        warp .@mapn$, 36, 30;
    }

    end;
}