summaryrefslogtreecommitdiff
path: root/npc/001-2-28/plush.txt
blob: f9d0960f6a9c8ebe8c3060ee72b8096ecd7af126 (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
// Evol scripts.
// Authors:
//    Reid
// Description:
//    Red, the Innkeeper.
// Variable:
//    INN_REGISTER

001-2-28,28,28,0	script	Plush#001-2-28	NPC_RED,{

    function narrator_explication {
        narrator 4,
            l("You will respawn at this place if defeated in combat."),
            l("All you have to do is to select a bed in the upper level anytime after your reservation."),
            l("Unlike other respawn points, an inn can fully restore your HP."),
            l("Of course, you can select a bed somewhere else after your reservation, but you won't get your HP recovery until you choose to get some rest in the inn."),
            l("You can also use your room to get some rest after a long battle. That will consume your reservation but your HP will be fully restored.");
        return;
    }

    function accepted_room {
        .@price = getarg (0);
        if (Zeny < .@price)
        {
            speech 5, l("You don't have enough money, bring @@ E.", .@price);
        }
        else
        {
            emotion E_HAPPY;
            Zeny = Zeny - .@price;
            INN_REGISTER = REDPLUSH_INN;
            PC_IS_DEAD = false;

            speech 5,
                l("I registered you on the @@ room of the upper level.",
                    (Sex == G_FEMALE) ? "4th" : "2nd"),
                l("You can go upstairs and choose a different room if you want.");
            savepoint "001-2-29.gat", 29, (Sex == G_FEMALE) ? 49 : 35;
        }
    }

    function register_room {
        .@price = lognbaselvl(100, 10);

        speech 5,
            l("That will be @@ E to set your respawn point", .@price),
            l("This will remain your respawn point until set elsewhere."),
            l("Is that okay?");

        if (askyesno() == ASK_YES)
        {
            accepted_room (.@price);
        }
        else
        {
            speech 5,
                l("Come back later if you changed your mind!");
        }

        return;
    }

    function lodge_check {
        if (INN_REGISTER == NO_INN)
        {
            register_room;
        }
        else if (INN_REGISTER == REDPLUSH_INN)
        {
            speech 5,
                l("You are already registered here."),
                l("Go on the upper level if you want to change your room or to use it.");
        }
        else
        {
            speech 5,
                l("If you are registered somewhere else you will loose that reservation."),
                l("Do you still want to lodge here?");

            if (askyesno() == ASK_YES)
            {
                register_room; 
            }
        }
        return;
    }

    speech 4,
        l("Welcome to the RedPlush INN!"),
        l("What do you need?");

    do
    {
        .@q = select (
            l("Could I lodge here for a while?"),
            l("What service do you offer?"),
            l("What is your tipiou trying to do?"),
            l("Nothing."));

        switch (.@q)
        {
            case 1:
                lodge_check;
                break;
            case 2:
                emotion E_WINK;
                speech 5,
                    l("We offer a room for travelers passing by Artis, our beds are comfy and you can be guaranted to be right as rain after a night here!"),
                    l("If you wake up at the inn after a harsh battle, you will find yourself revitalized in an instant unlike other places where you can rest.");

                narrator_explication;
                break;
            case 3:
                speech 5,
                    l("That poor one is doing his best to fly... But his last meal and the gravity is not helping him so far!");
                break;
            case 4:
                break;
        }
    } while (.@q != 1 && .@q != 4);

    closedialog;
    goodbye;
    close;

OnInit:
    .sex = G_FEMALE;
    .distance = 5;
}