summaryrefslogtreecommitdiff
path: root/npc/001-2-12/oscar.txt
blob: 5248a5a2cd62e6b057f1356d78da9cd04488f701 (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
// Evol scripts.
// Authors:
//    Reid
// Description:
//    Old man living in the rich hill, can bleach clothes.

001-2-12,38,30,0	script	Oscar#001-2-12	NPC_OSCAR,{

    function live_here_alone
    {
        speech 5,
            l("Meh!"),
            l("This is a harsh word to use, you are never alone in the beautiful place of Artis."),
            l("Mob is doing its daily noise, nature is singing its sumptuous melody, none is alone.");

        return;
    }

    function item_is_bleachable
    {
        getinventorylist;

        if (@inventorylist_card1[@item_index] != 0)
        {
            if ((@inventorylist_card1[@item_index] > 5021) ||
                (@inventorylist_card1[@item_index] < 5000))
            {
                return 0;
            }
            .@is_bleachable = 1;
        }
        if (@inventorylist_card2[@item_index] != 0)
        {
            if ((@inventorylist_card2[@item_index] > 5021) ||
                (@inventorylist_card2[@item_index] < 5000))
            {
                return 0;
            }
            .@is_bleachable = 1;
        }
        if (@inventorylist_card3[@item_index] != 0)
        {
            if ((@inventorylist_card3[@item_index] > 5021) ||
                (@inventorylist_card3[@item_index] < 5000))
            {
                return 0;
            }
            .@is_bleachable = 1;
        }
        if (@inventorylist_card4[@item_index] != 0)
        {
            if ((@inventorylist_card4[@item_index] > 5021) ||
                (@inventorylist_card4[@item_index] < 5000))
            {
                return 0;
            }
            .@is_bleachable = 1;
        }

        return .@is_bleachable;
    }

    function remove_cards_from_item
    {
        .@item_index = -1;

        speech 4,
            l("What item would you like to bleach?");

        narrator 5,
            l("You can drag and drop an item to the NPC window or select an item through your inventory.");

        @item_index = requestitemindex();
        if (!item_is_bleachable())
        {
            speech 4,
                l("You should know this, an item like this can't be bleached.");

            return;
        }

        speech 4,
            l("Your mind is set? You will loose the color dye during this process.");

        switch (askyesno())
        {
            case 1:
                speech 5,
                    l("Ok, let me see..."),
                    l("...");

                failedremovecardsindex @item_index, 1;

                speech 12,
                    l("..."),
                    l("Here it is, clean like a whistle!");
                break;
            case 2:
                speech 5,
                    l("Is it truly a hard choice to make?");
                break;
        }

        return;
    }

    .@hour = gettime(GETTIME_HOUR);
    speech 4, (.@hour > 6 && .@hour < 18) ? l("Good day to you.") : lg("Good night milady.", "Good evening sir.");

    do
    {
        menuint
            l("Could you bleach my clothes?"), 1,
            l("Do you live here alone?"), 2,
            l(menuaction(l("Quit"))), 3;

        switch (@menuret)
        {
            case 1:
                remove_cards_from_item();
                break;
            case 2:
                live_here_alone();
                break;
            case 3:
                speech 5, l("I wish you a good time in town.");
                break;
        }

    } while (@menuret != 3);

    closedialog;
    goodbye;
    close;

OnInit:
    .sex = G_MALE;
    .distance = 3;
    end;
}