summaryrefslogtreecommitdiff
path: root/npc/functions/doors.txt
blob: 1fc4163d8135eecc2bb0e1652d673c09e9d39877 (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
// Evol functions.
// Authors:
//    4144
// Description:
//    Doors utility functions
// Variables:
//    none

function	script	doorTouch	{
    if (getareausers() <= 1)
    {
        setnpcdir 2;
        stopnpctimer;
        initnpctimer;
    }
    close;
}

function	script	doorUnTouch	{
    if (getareausers() == 0)
    {
        setnpcdir 4;
        initnpctimer;
        startnpctimer;
    }
    close;
}

function	script	doorTimer	{
    stopnpctimer;
    if (getnpcdir() == 2) setnpcdir 6;
    if (getnpcdir() == 4) setnpcdir 8;
    end;
}