summaryrefslogtreecommitdiff
path: root/npc/008-2-2/melinda.txt
blob: 2013c32678f61f505fe569335eab7ede7361482e (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
// 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;
        }
    }
 
mes "";
mesn;
mesq l("Hi, sweetie! Want a fresh beer for 170 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 < 170)
            goto L_NoMoney;
        getinventorylist;
        if (@inventorylist_count == 100 && countitem("Beer") == 0)
            goto L_TooMany;
        set Zeny, Zeny - 170;
        getitem Beer, 1;
        mes "";
        mesn;
        mesq l("Pff... Nickel nurser!");
        goto L_Close;
    case 2:
        if (Zeny < 175)
            goto L_NoMoney;
        getinventorylist;
        if (@inventorylist_count == 100 && countitem("Beer") == 0)
            goto L_TooMany;
        set Zeny, Zeny - 175;
        getitem "Beer", 1;
        mes "";
        mesn;
        mesq l("Thanks for the tip!");
        goto L_Close;
    case 3:
        if (Zeny < 180)
            goto L_NoMoney;
        getinventorylist;
        if (@inventorylist_count == 100 && countitem("Beer") == 0)
            goto L_TooMany;
        set Zeny, Zeny - 180;
        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;
    close;
   
L_TooMany:
    mes "";
    mesn;
    mesq l("You don't have room for a beer!");
    goto L_Close;
   
OnTimer1000:
    dographmovestep;
   
OnTouch:
    StartConversation;
    end;
 
OnInit:
    .sex = G_FEMALE;
    .distance = 5;
    .speed = 300;
    initmovegraph "barkeeper",  43, 30,
                  "kfahr",      45, 36,
                  "l_table_b",  36, 36,
                  "l_table_r",  38, 33,
                  "m_table_l",  39, 33,
                  "m_table_b",  41, 36,
                  "r_table_r",  46, 32,
                  "bucket",     46, 30;
                 
                 
                 
     setmovegraphcmd "barkeeper",  "kfahr",      1,  "dir 4; wait 1",
                     "barkeeper",  "r_table_r",  1,  "dir 2; wait 1",
                     "kfahr",      "barkeeper",  1,  "dir 4; wait 1; say Another round for kfahr's table.;"
                                                     "wait 1; say They sure are thirsty today;"
                                                     "wait 1; moveon",
                     "kfahr",      "bucket",     1,  "dir 4; wait 1; emote 1;"// todo: find angry emote
                                                     "wait 15; moveon",
                     "kfahr",      "r_table_r",  1,  "dir 2; wait 1",
                     "bucket",     "l_table_b",  1,  "dir 4; wait 1",
                     "bucket",     "l_table_r",  1,  "dir 2; wait 1",
                     "bucket",     "m_table_l",  1,  "dir 3; wait 1",
                     "bucket",     "m_table_b",  1,  "dir 4; wait 1",
                     "bucket",     "r_table_r",  1,  "dir 2; wait 1",
                     "bucket",     "kfahr",      1,  "dir 4; wait 1",
                     "l_table_b",  "barkeeper",  1,  "dir 4; wait 1",
                     "l_table_b",  "bucket",     1,  "dir 4; wait 1; emote 1;" // todo: find angry emote
                                                     "wait 15; moveon",
                     "l_table_b",  "m_table_l",  1,  "dir 1; wait 1",
                     "m_table_b",  "l_table_b",  1,  "dir 4; wait 1",
                     "r_table_r",  "kfahr",      1,  "dir 4; wait 1",
                     "m_table_l",  "bucket",     1,  "dir 4; wait 1",
                     "l_table_r",  "kfahr",      1,  "dir 4; wait 1";
                     
   
    firstmove "wait 8";    
    initnpctimer;
}