summaryrefslogtreecommitdiff
path: root/npc/001-2-32/doors.txt
blob: 828366d201c66d320e303e605d0bbe3c039b9fe8 (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
// Evol scripts.
// Author:
//    Reid
//    Jesusalva
// Description:
//    Doors NPCs.

001-2-32,33,29,0	script	ToFightRoom#001-2-32	NPC_HIDDEN,0,0,{

OnTouch:
    if (getq(Artis_Legion_Progress) < 3)
    {
        narrator
        l("You hear some sound behind the door."),
        l("Somebody is probably training, better wait for them to finish.");
    }
    else
    {
        .@q2=getq2(Artis_Legion_Progress);
        .@mapn$="atl2@"+getcharid(0);
        // FIXME This code is extremely unreliable
        if (isinstance(.@q2) && .@q2 >= 0)
        {
		    instance_set_timeout(3600, 3600, .@q2);
            warp .@mapn$, 24, 29;
        } else {
		    .@inst = instance_create("ATL "+getcharid(0), getcharid(3), IOT_CHAR);
	        instance_attachmap("001-2-35", .@inst, false, .@mapn$);
	        // Instance lasts one hour
		    instance_set_timeout(3600, 3600, .@inst);
		    instance_init(.@inst);
	        setq2 Artis_Legion_Progress, .@inst;
        }

    }

    close;
}