summaryrefslogtreecommitdiff
path: root/npc/000-1/chest.txt
blob: a8266163ae374ed3e2ce0d471088c9fa0c56ba4a (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
// Evol scripts.
// Authors:
//    4144
//    Hal9000
//    Reid
// Description:
//    A treasure chest, with... Treasures inside!
// Variable:
//    x   ShipQuests_Darlin
// Values: 
//    0   Never talked with Darlin.
//    1   Spoke, and received quest.
//    2   Opened the treasure chest.
//    3   Get back to Darlin.

000-1.gat,83,70,0	script	#chest	316;2,{

    set @q, getq(ShipQuests_Darlin);
    if (getnpcdir ("") == 4) goto l_Give;

    setnpcdir 2;
    initnpctimer;
    startnpctimer;
    close;

l_Give:
    if (@q > 1) goto l_Close;

    set @item, 515;
    set @count, 3;
    callfunc "InventoryPlace", @item, @count;

    setq ShipQuests_Darlin, 2;

    set zeny, zeny + 100;
    getitem "SeaDrops", 1;
    getitem "Aquada", 1;
    getitem "OldBook", 1;
    message strcharinfo(0), l("You open the treasure chest.");

l_Close:
    setnpcdir 6;
    initnpctimer;
    startnpctimer;
    close;

OnTimer160:
    stopnpctimer;
    if (getnpcdir ("") == 2) setnpcdir 4;
    if (getnpcdir ("") == 6) setnpcdir 0;
    end;

}