summaryrefslogtreecommitdiff
path: root/npc/functions/hammocks.txt
blob: 8e1c2fec463d369dd30d6a2ff35d0c21aad7de73 (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
// Evol functions.
// Authors:
//    4144
//    Reid
// Description:
//    Hammocks utility functions
// Variables:
//    none

function	script	hamTouchLeft	{
    if (getareausers() <= 1)
    {
        .dir = 0;
        stopnpctimer;
        initnpctimer;
    }
    close;
}

function	script	hamUnTouch	{
    if (getareausers() == 0)
    {
        .dir = 2;
        initnpctimer;
        startnpctimer;
    }
    close;
}

function	script	hamTimerLeft	{
    stopnpctimer;
    if (.dir == 2) .dir = 0;
    end;
}

function	script	hamTouchRight	{
    if (getareausers() <= 1)
    {
        .dir = 0;
        stopnpctimer;
        initnpctimer;
    }
    close;
}

function	script	hamTimerRight	{
    stopnpctimer;
    if (.dir == 2) .dir = 0;
    end;
}