summaryrefslogtreecommitdiff
path: root/npc/005-5/nylo.txt
blob: 701501304165d9f21db9abbd80994988df62c7be (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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
// Author:
//    Saulc
//    Jesusalva

005-5,27,38,0	script	Nylo	NPC_PLAYER,{

    function nylo_thanks {
    	speech S_LAST_BLANK_LINE,
        l("You are very welcome.");
        close;
    }

    function nylo_items2 {
    	speech S_LAST_BLANK_LINE,
        	l("Let Cynric open your storage. You might also want to open your inventory."),
        	l("Pick an item from either storage or inventory and choose what you want to do with it by clicking the right button."),
        	l("You can also pick and drag items from one window into the other but this will move all items of this kind.");
        next;
        speech S_LAST_BLANK_LINE,
        	l("Items in your storage are totally safe. Banking itself is totally safe.");
        do
    	{
    		select
    		   	l("Thanks!");

        	switch (@menu)
        	{
            	case 1:
                	nylo_thanks;
                	break;
        	}
    	} while (@menu != 1);
    }

    function nylo_money2 {
    	speech S_LAST_BLANK_LINE,
        	l("That's easy. Cynric will save your money when you ask him to deposit. Or you pick up your money by asking to withdraw."),
        	l("You only have to tell him how much you want to deposit or withdraw."),
        	l("Also you can ask how much he already save for you by checking your balance.");
        next;
        speech S_LAST_BLANK_LINE,
        	l("Money in your storage is totally safe. Banking itself is totally safe.");

        do
    	{
    		select
            	l("Thanks!");

        	switch (@menu)
        	{
            	case 1:
                	nylo_thanks;
                	break;
        	}
    	} while (@menu != 1);
    }

    function nylo_items {
    	speech S_LAST_BLANK_LINE,
        	l("Let Cynric open your storage. You might also want to open your inventory."),
        	l("Pick an item from either storage or inventory and choose what you want to do with it by clicking the right button."),
        	l("You can also pick and drag items from one window into the other but this will move all items of this kind.");
        next;
        speech S_LAST_BLANK_LINE,
        	l("Items in your storage are totally safe. Banking itself is totally safe.");
        do
    	{
    		select
            	l("And how do I save money?"),
            	l("Thanks!");

        	switch (@menu)
        	{
            	case 1:
                	nylo_money2;
                	break;
            	case 2:
                	nylo_thanks;
                	break;
        	}
    	} while (@menu != 2);
    }

    function nylo_money {
    	speech S_LAST_BLANK_LINE,
        	l("That's easy. Cynric will save your money when you ask him to deposit. Or you pick up your money by asking to withdraw."),
        	l("You only have to tell him how much you want to deposit or withdraw."),
        	l("Also you can ask how much he already save for you by checking your balance.");
        next;
        speech S_LAST_BLANK_LINE,
        	l("Money in your storage is totally safe. Banking itself is totally safe.");

        do
    	{
    		select
            	l("And how do I save items?"),
            	l("Thanks!");

        	switch (@menu)
        	{
            	case 1:
                	nylo_items2;
                	break;
            	case 2:
                	nylo_thanks;
                	break;
        	}
    	} while (@menu != 2);
    }

	function nylo_explain {
		speech S_LAST_BLANK_LINE,
        	l("There are banks all over the world. Usually every important village or city has one."),
        	l("You can save both items and money at a bank.");

        do
    	{
    		select
            	l("How do I save items?"),
            	l("How do I save money?"),
            	l("Thanks!");

        	switch (@menu)
        	{
            	case 1:
                	nylo_items;
                	break;
            	case 2:
                	nylo_money;
                	break;
                case 3:
                	nylo_thanks;
                	break;
        	}
    	} while (@menu != 3);
	}

	speech S_LAST_BLANK_LINE,
        l("Visiting the bank too right? We're only a small village but Cynric is the best bank guy I know.");

    .@q=getq(CandorQuest_Marggo);
    do
    {
    	select
            l("Yeah, you're right."),
            l("You store a large collection of goods. Could you perhaps sell me some?"),
            rif(!.@q,l("What do you for a living?")),
            l("What is banking?");
        switch (@menu)
        {
            case 1:
                break;
            case 2:
                openshop "Nylo#Beer";
                break;
            case 3:
                goto L_Main;
                break;
            case 4:
                nylo_explain;
                break;
        }
    } while (@menu != 1);

    closedialog;
    goodbye;
    close;

L_Main:
    mesn;
    mesq l("Well, for a living, I usually tend to the crops.");
    next;
    mesn;
    mes l("I raise them, water them, and then sell them.");
    mes l("I also brew some of the crops, making Beer. And then I sell to adventurers!");
    if (BaseLevel < 6)
        close;
    next;
    mesn;
    mes l("Well, you're an adventurer, and I guess tending to crops isn't your cup of tea.");
    mes l("But maybe you could help me killing a few maggots?");
    next;
    mesn;
    mes l("Eight Maggots will rinse from the ground and will start destroying the crops.");
    mes l("You must kill them before the crops are gone. I'll reward you, of course.");
    next;
    mesn;
    mesq l("Interested?");
    if (askyesno() == ASK_NO) {
        mes "";
        mesn;
        mesq l("Heh. Fair enough.");
        close;
    }

    .@ID=getcharid(0);
    .@MAP$="MRGO@"+str(.@ID);

    // Create the Marggo
    .@INSTID = instance_create("MRGX@"+(.@ID), 0, IOT_NONE);
    // Instance already exists
    if (.@INSTID < 0) {
        mesn;
        mesq l("Wait. I remember you. You ruined my crops a few seconds ago!!");
        next;
        mesn;
        mesq l("Shooo, shooo! Give my crops some time to recover, your noob.");
        close;
    }
    // It was just created, so begin Marggo Quest
    .@instanceMapName$ = instance_attachmap("005-1-1", .@INSTID, 0, .@MAP$);
    instance_set_timeout(300, 300, .@INSTID);
    instance_init(.@INSTID);
    warp .@MAP$, 29, 20;
    doevent("Nylo#Marggo::OnStart");
    closeclientdialog;
    close;

OnInit:
    .@npcId = getnpcid(.name$);
    //setunitdata(.@npcId, UDT_HEADMIDDLE, 1321); // Maybe Nylo could use the whole Candor set...
    setunitdata(.@npcId, UDT_HEADTOP, CreasedShirt);
    setunitdata(.@npcId, UDT_HEADMIDDLE, CreasedShorts);
    setunitdata(.@npcId, UDT_HEADBOTTOM, NPCEyes);
    setunitdata(.@npcId, UDT_WEAPON, CandorBoots);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 26);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 0);

    .sex = G_MALE;
    .distance = 4;
    end;
}
005-5,27,38,0	trader	Nylo#Beer	NPC_HIDDEN,{

OnInit:
    tradertype(NST_MARKET);

    sellitem Beer, 320, 100;

    .sex = G_OTHER;
    .distance = 4;
    end;

OnClock0600:
OnClock1200:
OnClock1800:
OnClock0000:
    restoreshopitem Beer, 320, 100;

}