summaryrefslogtreecommitdiff
path: root/npc/020-2-24/kylian.txt
blob: 0b1bce37cadcf05d81c13b5236aff8b462280410 (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
// The Mana World scripts.
// Author:
//    Jesusalva
// Description:
//    Rich merchant
// Variables:
//  TonoriQuest_Kylian
//      q1 - State of the Quest
//      q2 - "Know" mask
//      q3 - Timer to return

020-2-24,35,24,0	script	Kylian	NPC_KPG_MANAGER,{
    function kylianLuggage;
    function kylianGiveLuggage;
    function kylianLicense;
    .@q=getq(TonoriQuest_Kylian);
    switch (.@q) {
    case 0:
        kylianLuggage();
        break;
    case 1:
        mesn;
        mesq l("Please show Adrian the luggage ticket I gave you.");
        break;
    case 2:
        kylianGiveLuggage();
        break;
    case 3:
        kylianLicense();
        break;
    default:
        mesn;
        mesq l("I wish to take a nap now, so please do not disturb me.");
        break;
    }
    close;

function kylianLuggage {
    // Insert lore babbling here
    mesn;
    mesq l("Ah! Are you the room service? I have some requests.");
    next;
    select
        l("Sure... What can I do for you?"),
        l("No, I'm not!");
    mes "";
    if (@menu == 2) {
        mesn;
        mesq l("Too bad. Would you be interested in earning some quick money with some errands regardless?");
        next;
        select
            l("I'm a great adventurer! I don't do petty errands."),
            l("No. I'm busy."),
            l("Well... OK.");
        mes "";
        if (@menu != 3)
            return;
    }
    mesn;
    mesq l("I need you to get my luggage from the docks. Just show this paper to the sailor who's watching the luggage.");
    mesc l("%s gives you his ticket, which you promptly store in a safe pocket outside of your inventory.", .name$);
    setq1 TonoriQuest_Kylian, 1;
    next;
    mesn;
    mesq l("I'll be waiting your return.");
    return;
}

function kylianGiveLuggage {
    if (!countitem(Suitcase)) {
        mesn;
        mesq l("Please come back with my %s.", getitemlink(Suitcase));
        return;
    }
    mesn;
    mesq l("Did you get my luggage from the docks?");
    select
        l("Here it is."),
        l("Don't worry; I'm on my way.");
    mes "";
    if (@menu == 2)
        return;
    delitem Suitcase, 1;
    quest_gp(.maxLevel, 100);
    quest_item(.maxLevel, Acorn, 12);
    setq1 TonoriQuest_Kylian, 3;
    mesn;
    mesq l("Ah! Very good. I have some urgent paperwork that I've been needing to attend to.");
    next;
    mesn;
    mesq l("Before you go, I also happen to have some acorns left over from my trip. You can have them if you wish; they're rather tasty.");
    mesc l("He gives you some money and acorns.");
    next;
    mesn;
    mesq l("If, however, you don't like them, you could take them to the %s. I heard they use them to make a special kind of flour.", b(l("Tulimshar bakery")));
    next;
    kylianLicense();
    return;
}

function kylianLicense {
    mesn;
    mesq l("I'm a merchant and came to Tulimshar because I'm thinking about establishing a shop here.");
    next;
    mesn;
    mesq l("While I'm going through my papers, could you find out whom I have to talk to about opening up a shop in this city?");
    if (!(getq2(TonoriQuest_Kylian) & KYLIAN_YANIS))
        return;
    next;
    select
        l("You need to go and talk to Yanis in the government building."),
        l("I'll see what I can do.");
    mes "";
    if (@menu == 2)
        return;
    mesc l("You explain Kylian how to reach the Townhall.");
    next;
    quest_gp(.maxLevel, 50);
    setq1 TonoriQuest_Kylian, 4;
    setq3 TonoriQuest_Kylian, gettimetick(2)+900; // 15 minutes
    mesn;
    mesq l("Ah... excellent! That's very helpful. I need to prepare my papers now. I might have some more questions later on though.");
    return;
}

OnInit:
    .maxLevel = 35;
    .distance = 4;
    end;
}