summaryrefslogtreecommitdiff
path: root/world/map/npc/functions/ferry.txt
blob: 1b03011a6b409dc564727f264f33a81fdcb382cb (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// The ferry system

function|script|Ferry|{
    if (BaseLevel < 20)
        goto L_LowerCost;
    set @cost_tulimshar, 500;
    set @cost_hurnscald, 500;
    set @cost_nivalis, 500;

L_Start:
    set @cost_candor, 1500;
    mes "Where would you like to go?";
    next;
    if (BaseLevel < 40)
        goto L_PlainMenu;
    goto L_MenuWithCandor;


L_PlainMenu:
    menu
        "Tulimshar (" + @cost_tulimshar + "GP)", L_Tulimshar,
        "Hurnscald (" + @cost_hurnscald + "GP)", L_Hurnscald,
        "Nivalis (" + @cost_nivalis + "GP)", L_Nivalis,
        "Nevermind", -;
    goto L_Close;

L_MenuWithCandor:
    menu
        "Tulimshar (" + @cost_tulimshar + "GP)", L_Tulimshar,
        "Hurnscald (" + @cost_hurnscald + "GP)", L_Hurnscald,
        "Nivalis (" + @cost_nivalis + "GP)", L_Nivalis,
        "Candor (" + @cost_candor + "GP)", L_Candor,
        "Nevermind", -;
    goto L_Close;

L_Tulimshar:
    if (@loc == DOCK_tulimshar)
        goto L_AlreadyThere;
    if (Zeny < @cost_tulimshar)
        goto L_NotEnoughGP;

    set Zeny, Zeny - @cost_tulimshar;
    warp "022-1.gat", 76, 72;
    goto L_Close;

L_Hurnscald:
    if (@loc == DOCK_hurnscald)
        goto L_AlreadyThere;
    if (Zeny < @cost_hurnscald)
        goto L_NotEnoughGP;

    set Zeny, Zeny - @cost_hurnscald;
    warp "008-1.gat", 137, 64;
    goto L_Close;

L_Nivalis:
    if (@loc == DOCK_nivalis)
        goto L_AlreadyThere;
    if (Zeny < @cost_nivalis)
        goto L_NotEnoughGP;

    set Zeny, Zeny - @cost_nivalis;
    warp "031-1.gat", 95, 118;
    goto L_Close;

L_Candor:
    if (@loc == DOCK_candor)
        goto L_AlreadyThere;
    if (Zeny < @cost_candor)
        goto L_NotEnoughGP;

    set Zeny, Zeny - @cost_candor;
    warp "029-1.gat", 25, 37;
    goto L_Close;

L_AlreadyThere:
    mes "You're already here!";
    goto L_Close;

L_NotEnoughGP:
    mes "You don't have enough money to go there!";
    goto L_Close;

L_LowerCost:
    set @cost_tulimshar, 250;
    set @cost_hurnscald, 250;
    set @cost_nivalis, 250;
    goto L_Start;

L_Close:
    set @cost_tulimshar, 0;
    set @cost_hurnscald, 0;
    set @cost_candor, 0;
    set @cost_nivalis, 0;
    set @loc, 0;
    close;
}