summaryrefslogtreecommitdiff
path: root/npc/008-2-2/melinda.txt
blob: 964332ca902c9cc5f36f9f7cfe0c3b5a2748d8e0 (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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
// Evol scripts.
// Authors:
//    Toams
// Description:
//    Melinda, Rusty Pick's waitress

008-2-2,40,29,0	script	Melinda#008-2-2	NPC_MELINDA,1,1,{

function StartConversation {

        .@tick = gettimetick(1);
        if (.@tick > @Hurns_Rusty_Pick_WaitressTick + 10)
        {
            setarray .messages$[0], l("Welcome to our inn!"),
                                    l("Welcome to the Rusty Pick."),
                                    l("Please, have a seat."),
                                    l("Lovely day, isn't it?");

            .@r = rand(getarraysize(.messages$));
            .@msg$ = .messages$[.@r];
            npctalk3 .@msg$;
            @Hurns_Rusty_Pick_WaitressTick = .@tick;
        }
    }

function face_to_PC {
        getmapxy(.@map$, .@cx, .@cy, 0);
        @Melinda_ols_dir = .dir;
        npc_turntoxy(.@cx, .@cy);

        return;
    }

npc_pausemove;
face_to_PC;
mes "";
mesn;
mesq l("Hi, sweetie! Want a fresh beer for 90 Florin?");
switch (select(l("Sure! [Don't tip]"),
               l("Sure! [Tip 5 Florin]"),
               l("Sure! [Tip 10 Florin]"),
               l("Nah, maybe later.")))
{
    case 1:
        if (Zeny < 90)
            goto L_NoMoney;
        getinventorylist;
        if (@inventorylist_count == 100 && countitem("Beer") == 0)
            goto L_TooMany;
        Zeny -= 90;
        getitem Beer, 1;
        mes "";
        mesn;
        mesq l("Pff... Nickel nurser!");
        goto L_Close;
    case 2:
        if (Zeny < 95)
            goto L_NoMoney;
        getinventorylist;
        if (@inventorylist_count == 100 && countitem("Beer") == 0)
            goto L_TooMany;
        Zeny -= 95;
        getitem "Beer", 1;
        mes "";
        mesn;
        mesq l("Thanks for the tip!");
        goto L_Close;
    case 3:
        if (Zeny < 100)
            goto L_NoMoney;
        getinventorylist;
        if (@inventorylist_count == 100 && countitem("Beer") == 0)
            goto L_TooMany;
        Zeny -= 100;
        getitem "Beer", 1;
        mes "";
        mesn;
        mesq l("Thank you, sweetie! Want to hear a secret?");
        switch (select(l("What is it, darling?"),
                       l("Nah, I don't feel like chatting.")))
        {
            case 1:
                mes "";
                mesn;
                mesq l("The master bowyer in this village used to construct exceptional bows. When you want one you should go and ask him.");
                goto L_Close;
            case 2:
                goto L_No;
        }
        goto L_Close;
    case 4:
        goto L_No;
}

L_NoMoney:
    mes "";
    mesn;
    mesq l("You look broke. Don't think that you can dine and dash here!");
    goto L_Close;

L_No:
    mes "";
    mesn;
    mesq l("Just call me when you changed your mind.");
    goto L_Close;

L_Close:
    initnpctimer;
    npc_resumemove;
    close;

L_TooMany:
    mes "";
    mesn;
    mesq l("You don't have room for a beer!");
    goto L_Close;

OnTimer1000:
    dographmovestep;

OnTouch:
    StartConversation;
    end;

OnInit:
    .distance = 5;
    .speed = 300;
    initmovegraph "startspot",  40, 29,
                  "barkeeper",  43, 30,
                  "kfahr_r",    45, 36,
                  "kfahr_l",    43, 35,
                  "l_table_b",  36, 36,
                  "l_table_r",  38, 33,
                  "m_table_l",  39, 33,
                  "m_table_b",  41, 36,
                  "r_table_r",  46, 33,
                  "fireplace",  36, 28,
                  "firewood",   33, 28,
                  "to_basement",   52, 32,
                  "basement_entrance", 24, 25,
                  "basement_cabinet",  30,31,
                  "cabinet",    42, 28,
                  "bucket",     46, 30;



     setmovegraphcmd "startspot",  "firewood",   1,  "dir 4; wait 5",
                     "firewood",   "fireplace",  1,  "dir 4; wait 3",
                     "fireplace",  "startspot",  1,  "dir 0; wait 10",

                     "startspot",  "l_table_b",  1,   "dir 4; wait 3",
                     "l_table_b",  "l_table_r",  1,  "dir 2; wait 3",
                     "l_table_r",  "m_table_l",  1,  "dir 6; wait 3",
                     "m_table_l",  "m_table_b",  1,  "dir 4; wait 3",
                     "m_table_b",  "r_table_r",  1,  "dir 2; wait 3",
                     "r_table_r",  "bucket",     1,  "dir 4; wait 1; emote 1;"
                                                     "wait 15; moveon",
                     "bucket",     "startspot",  1,  "dir 0; wait 5",

                     "startspot",  "kfahr_r",    2,  "dir 4; wait 5",
                     "kfahr_r",    "barkeeper",  1,  "dir 4; wait 1;"
                                                     "say Another round for kfahr's table.;"
                                                     "wait 1; say They sure are thirsty today;"
                                                     "wait 5; moveon",
                     "barkeeper",  "kfahr_l",    1,  "dir 6; wait 3;"
                                                     "say Cheers!;"
                                                     "wait 3; moveon",
                     "kfahr_l",    "startspot",  1,  "dir 0; wait 10",

                     "startspot",         "to_basement",   1,  "dir 4; warp 008-2-5 basement_entrance",
                     "basement_entrance", "basement_cabinet", 1, "dir 4; wait 5",
                     "basement_cabinet",  "basement_entrance", 1, "dir 4; warp 008-2-2 to_basement",
                     "to_basement",       "cabinet",   1,  "dir 4; wait 5",
                     "cabinet",           "startspot",  1,  "dir 0; wait 15";




    firstmove "wait 8";
    initnpctimer;
}