summaryrefslogtreecommitdiff
path: root/npc/005-5/cynric.txt
blob: edb8beff71c55a297b6481371bfbe13962e99c08 (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
// TMW-2 Script.
// Author:
//    Saulc
//    Jesusalva

005-5,30,37,0	script	Cynric	NPC_LLOYD,{

// Evol scripts.
// Authors:
//    gumi
//    Reid
// Description:
//    Banker NPC.


    function explain_guild {
        speech S_LAST_NEXT,
            l("The guild is in charge of the commerce regularization throughout Artis and its surroundings."),
            l("With the help of the town hall and the Legion of Aemil we organize some auction and we help local merchants to launch their businesses."),
            l("We also feature some services like a storage and a bank for members."),
            l("Registration is open to everybody, but newcomers need to pay a fee for all of the paperwork.");

        narrator S_FIRST_BLANK_LINE,
            l("The bank and item storage is shared between all characters within a same account."),
            l("With it, you can safely move items and funds between your characters."),
            l("To move between characters that are on different accounts, you have to use the Trade function.");
        return;
    }

    function first_visit {
        speech S_LAST_NEXT,
            l("Welcome!"),
            l("My name is Cynric, I am a representative of the Merchant Guild.");

        selectd(l("My name is @@...", strcharinfo(0)));

        speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
            l("\"@@\", I like this name!", strcharinfo(0)),
            l("Oh, wait a second...");
        narrator S_LAST_NEXT,
            l("@@ is searching something in his book.", .name$);
        speech S_LAST_NEXT,
            l("I see."),
            lg("You are new around here, right?");

        if (selectd(l("How do you know?"), l("Yes I am.")) == 1)
        {
            speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
                l("Oh, it is simple. I have on this book the names of every citizen of Candor and its surroundings."),
                l("And I have no mention of a so called \"@@\" on it!", strcharinfo(0));
        }
        else
        {
            speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
                l("I knew it!");
        }

        speech S_LAST_NEXT,
            l("Let me explain to you what the Merchant Guild is for.");

        explain_guild;
        next;

        .@price = 7700;
        speech S_LAST_NEXT,
            l("The fee is of @@ E. So, do you want to register?", .@price);

        switch (selectd(l("Yes."),
                        l("I don't have the time now.")))
        {
            case 1:
                if (Zeny < .@price)
                {
                    speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
                        l("You do not seem to have enough money, come back later!");
                }
                else
                {
                    Zeny = Zeny - .@price;
                    setq ArtisQuests_Lloyd, 1;
                    speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
                        l("Perfect!"),
                        l("I wrote your name on the book, you are now free to use the storage and bank services.");
                }
                break;
            case 2:
                break;
        }

        return;
    }

    if (getq(ArtisQuests_Lloyd) == 0)
    {
        first_visit;

        closedialog;
        goodbye;
        close;
    }

    speech S_LAST_NEXT,
        l("Welcome to the Merchant Guild!"),
        l("What do you want today?");

    do
    {
        .@enora = getq(ArtisQuests_Enora);

        selectd
            rif(.@enora == 2, l("I'm looking for some black iron ingots.")),
            l("I would like to store some items."),
            l("I would like to perform money transactions."),
            l("What is this guild for?"),
            l("Does the guild has any work for me right now?"),
            l("Bye.");

        switch (@menu)
        {
            case 1:
                //enora_quest;
                mes "";
                mesn;
                mesq l("We have none.");
                break;
            case 2:
                openstorage;
                closedialog;
                close;
                break;
            case 3:
                MerchantGuild_Bank;
                break;
            case 4:
                mes "";
                explain_guild;
                break;
            case 5:
                speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
                    l("There are no tasks for you right now.");
                continue;
        }
        if (@menu != 6)
        {
            speech S_FIRST_BLANK_LINE | S_LAST_NEXT | S_NO_NPC_NAME,
                l("Something else?");
        }
    } while (@menu != 6);

    closedialog;
    goodbye;
    close;

OnInit:
    .sex = G_MALE;
    .distance = 4;
    end;

OnPCLoginEvent:
    if (#MerchantBank)
    {
        BankVault += max(0, #MerchantBank);
        #MerchantBank = 0;
    }
    end;
}