summaryrefslogtreecommitdiff
path: root/npc/000-2-1/chest.txt
blob: ff5a32321b55e4e8dc28e0d09c2684834c36a8e6 (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
// Evol scripts.
// Authors:
//    4144
//    Reid
// Description:
//    A box with clothes for new players.
// Variable:
//    ShipQuests_Arpan
// Values:
//    1   Talked to Arpan and needs to get clothes.
//    2   Has the clothes.

000-2-1,51,37,0	script	Chest#000-2-1	NPC_CHEST_BIG,{
    .@q = getq(ShipQuests_Arpan);

    if (.@q == 0) goto L_Talk;
    if (.dir == 4) goto L_Give;

    .dir = 2;
    initnpctimer;
    startnpctimer;
    misceffect 24;
    close;

L_Give:
    if (.@q > 1) goto L_Quit;
    inventoryplace CreasedShirt, 2;

    setq ShipQuests_Arpan, 2;
    getitem CreasedShirt, 1;
    getitem CreasedShorts, 1;
    npctalk3 l("You take the clothes from the chest.");
    goto L_Quit;

OnTimer360:
    stopnpctimer;
    if (.dir == 2) .dir = 4;
    if (.dir == 6) .dir = 0;
    end;

L_Talk:
    npctalk3 l("You should talk to Magic Arpan first.");

    close;

L_Quit:
    .dir = 6;
    initnpctimer;
    startnpctimer;
    misceffect 25;
    close;

OnInit:
    .distance = 2;
    end;
}