summaryrefslogtreecommitdiff
path: root/npc/001-2/government_building.txt
blob: cf5c551ffe1526f9612f4943263287d83801525e (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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
001-2,25,21,0	script	Estard	NPC107,{
    mes "[Estard]";
    mes "\"Hello. What can I do for you?\"";
    next;
    if (PARTNER)
        goto L_Main_married;

    menu
        "I'd like to get married.", L_marry,
        "Never mind.", L_close;

L_Main_married:
    menu
        "I'd like to file for divorce.", L_divorce,
        "Never mind.", L_close;

L_marry:
    if (BaseLevel < WEDDING_MIN_LEVEL)
        goto L_marry_too_young;
    if (Zeny < WEDDING_FEE)
        goto L_marry_too_poor;

    mes "";
    mes "[Estard]";
    mes "\"Are you sure that you want to get married? It'll cost you ##B" + WEDDING_FEE + " GP##b.\"";
    menu
        "Yes!", L_marry_do,
        "I'm having second thoughts...", L_close;

L_marry_do:
    callsub S_give_rings;
    mes "";
    mes "[Estard]";
    mes "\"Here are your rings. In order to marry each other, you both must stand within one of the designated areas (like that small rug over there in the corner), wear your rings, and say '#marry (your partner's name).'\"";
    close;

L_marry_too_young:
    mes "";
    mes "[Estard]";
    mes "\"I'm sorry, but you are too young to get married. You must be at least " + WEDDING_MIN_LEVEL + " levels old.\"";
    next;

    menu
        "Can I at least get the wedding rings now?", L_Get_rings,
        "Thanks anyways.", L_close;

L_marry_too_poor:
    mes "";
    mes "[Estard]";
    mes "\"It costs ##B" + WEDDING_FEE + " GP##b to get married. That covers all the processing fees for the marriage and provides you with two wedding rings.\"";
    close;

L_Get_rings:
    mes "";
    mes "[Estard]";
    mes "\"Yes! You certainly can. They're ##B" + WEDDING_FEE + " GP##b. That covers all the processing fees for the marriage and provides you with two wedding rings.\"";

    if (Zeny < WEDDING_FEE)
        menu
            "Thanks, but I don't have enough with me right now.", L_close;
    if (Zeny >= WEDDING_FEE)
        menu
            "Sounds great!", L_Get_rings_pay,
            "No thanks.", L_close;
    goto L_Get_rings_pay;

L_Get_rings_pay:
    callsub S_give_rings;

    mes "";
    mes "[Estard]";
    mes "\"There you go! %%1\"";
    close;

L_divorce:
    @divorce_cost = DIVORCE_FEE_PER_LEVEL * BaseLevel;

    if (Zeny < @divorce_cost)
        goto L_divorce_not_enough;

    mes "[Estard]";
    mes "\"I'm sorry to hear that. If you're sure you want a divorce, it'll cost you %%B" + @divorce_cost + " GP%%b.\"";
    next;
    menu
        "I'm sure.", L_do_divorce,
        "I'm having second thoughts...", L_close;

L_do_divorce:
    if (Zeny < @divorce_cost)
        goto L_Not_enough_money;

    set PARTNER, 0, PARTNER; // divorce the partner first, which will also divorce the rid if succesful
    if (PARTNER < 1) goto L_divorce_done;

    mes "";
    mes "[Estard]";
    mes "\"I'm having trouble finding your documents. Please come back later.\"";
    mes "";
    mes "[Server]";
    mes "There was an unexpected error when processing your divorce. Please report this to the developers.";
    close;

L_divorce_done:
    Zeny = Zeny - @divorce_cost;

    mes "";
    mes "[Estard]";
    mes "\"You have now officially divorced your spouse.\"";
    close;

L_divorce_not_enough:
    mes "";
    mes "[Estard]";
    mes "\"I'm sorry, but you don't have enough money to get a divorce. You need ##B" + @divorce_cost + " GP##b.\"";
    close;

L_Not_enough_money:
    mes "";
    mes "[Estard]";
    mes "\"I'm sorry, but it seems as though you don't have enough money.\"";
    close;

L_No_Room_For_Rings:
    mes "";
    mes "[Estard]";
    mes "\"Hm... it doesn't look like you have enough room to carry these rings.";
    mes "Free up some space, and then I'd be happy to give them to you.\"";
    close;

L_close:
    mes "";
    mes "[Estard]";
    mes "\"OK. Just come back whenever you're ready.\"";
    close;

S_give_rings:
    if (Zeny < WEDDING_FEE)
        goto L_Not_enough_money;
    getinventorylist;
    if (@inventorylist_count > 98)
        goto L_No_Room_For_Rings;

    Zeny = Zeny - WEDDING_FEE;
    getitem "WeddingRing", 1;
    getitem "WeddingRing", 1;
    return;
}

001-2,22,21,0	script	Guard#govt_in	NPC123,{
    mes "[Guard]";
    mes "\"You're not allowed back here.\"";
    close;
}