summaryrefslogtreecommitdiff
path: root/npc/004-1/miner
blob: 5233cc1c57e38367e7ba1705348940d6520908c1 (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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
// TMW2 scripts.
// Authors:
//    Saulc, jesusava
// Objective:        Farm miner cave monster
// License:          GPL v3
// https://www.idleminertycoon.com/ reference of npc name
// TulimQuest_Tycoon
//  0:  Not started

//  1:  Took ratto Quest 10 kills 
//  2:  Completed ratto Quest - 50 EXP 50 GP
//  3:  Awaiting next quest

//  4:  Took Cave Maggot Quest 25 kills
//  5:  Completed Cave Maggot Quest - 200 EXP 150 GP
//  6:  Awaiting next quest

//  7:  Took Cave Snake Quest 50 kills
//  8:  Completed Cave Snake Quest - 1000 EXP 350 GP
//  9:  Awaiting next quest

// 10:  Took Red Scorpion Quest 100 kills
// 11:  Completed  Red Scorpion Quest - Miner Hat
// 12:  Awaiting next quest

// 13:  Took  Black Scorpion Quest 200 kills
// 14:  Completed Black Scorpion Quest - 12 000 EXP 5 000 GP
// 15:  Finished all trainment

004-,25,29,0	script	Tycoon	NPC_PLAYER,{
    .@q=getq(TulimQuest_Tycoon);

    mesn;
    mesq lg(Hello my friend!");
    next;
    mesn;
    mesq lg("Some of my miners friends died in this mine, cause it's plenty of dangerous monsters");
    next;
    mesn;
    mesq l("Would you like to help us for a reward ? or maybe you just want some information");
    next;
    goto L_Menu;
    
L_PreMenu:
    mesn;
    mesq l("I need your help dude!");
    next;
    goto L_Menu;

L_Menu:
    mesn strcharinfo(0);
    menu
        rif(getq(TulimQuest_Tycoon) < 15, l("I am a brave adventurer! how can i help you ?")),           L_Purge,
        l("What does miners do in cave ?"),              L_ExplicaGrama,
        l("can you give me a tip?"),            L_ExplicaBagagem,
        l("Are you a terrenite?"),  L_ExplicaTrade,
        l("I dont care about dirty miners problem."), L_Close,
        l("No, thanks, its not my job!"),           L_Close;

L_Purge:
    .@q=getq(TulimQuest_Tycoon);
    mes "";
    if (BaseLevel < 15) goto L_NoLevel;
    .@k=getq2(TulimQuest_Tycoon); // Get number of kills (via getq2)

    mesn;
    if (.@q == 0) {
        mesq l("Ok, you look strong enough. Now, let me think on an easy task for you...");
        next;
        mesq l("Ah! I know. Kill 10 @@. They usually are near the refectory.", getmonsterlink(Ratto));
        setq TulimQuest_Tycoon, 1, 0;
    } else if (.@q == 1) {
        mesq l("You are killing @@. They usually are near the refectory.", getmonsterlink(Ratto));
    } else if (.@q == 2) {
        mesq l("Good job! Here is your reward! (50 xp 50 gp)");
        getexp 50, 0;
        set Zeny, Zeny + 50;
        setq TulimQuest_Tycoon, 3, 0;
    } else if (.@q == 3 && BaseLevel >= 19) {
        mesq l("Less rattos means more food. So, this time the monsters will be a little stronger.");
        next;
        mesq l("Ok now i want you to purge cave of Maggot, kill 25 @@. They keep respawning and annoy miners team.", getmonsterlink(CaveMaggot));
        setq TulimQuest_Tycoon, 4, 0;
    } else if (.@q == 3 && BaseLevel < 19) {
        mesq l("You are already too weak for my last task, please come back later with some levels.");
    } else if (.@q == 4) {
        mesq l("You are killing @@ at the cave. Good progress", getmonsterlink(CaveMaggot));
    } else if (.@q == 5) {
        mesq l("Perfect! Here is your reward! (200 xp 150 gp)");
        getexp 200, 0;
        set Zeny, Zeny + 150;
        setq TulimQuest_Tycoon, 6, 0;
    } else if (.@q == 6 && BaseLevel >= 24) {
        mesq l("As you see, That was fast. You can also sell monster parts to inn keeper for some extra money.");
        next;
        mesq l("So, please kill 50 @@, Try to collect some lamps in the same time, that could be useful later.", getmonsterlink(CaveSnake));
        setq TulimQuest_Tycoon, 7, 0;
    } else if (.@q == 6 && BaseLevel < 24) {
        mesq l("You are already too weak for my last task, please come back later with some levels.");
    } else if (.@q == 7) {
        mesq l("You are killing @@ at the cave.", getmonsterlink(CaveSnake));
    } else if (.@q == 8) {
        mesq l("I hope you get some lamps or maybe a short if you re lucky. By the way here is your reward. (1000 xp 350 gp)");
        getexp 1000, 0;
        set Zeny, Zeny + 350;
        setq TulimQuest_Tycoon, 9, 0;
    } else if (.@q == 9 && BaseLevel >= 29) {
        mesq l("Ok now you are near to be a real miner if you succes this hard part i will reward you as a @@.", getitemlink(MinerHat));
        next;
        mesq l("I'll ask you to kill 100 @@. This will prove your worth. Good luck.", getmonsterlink(RedScorpion));
        setq TulimQuest_Tycoon, 10, 0;
    } else if (.@q == 9 && BaseLevel < 29) {
        mesq l("You are already too weak for my last task, please come back later with some levels.");
    } else if (.@q == 10) {
        mesq l("You are killing @@ it's still in progress.", getmonsterlink(RedScorpion));
    } else if (.@q == 11) {
        mesq l("Congratulations! Here is your reward a @@.", getitemlink(MinerHat));
        mesq l("We done nice progress thank a lot my friend you re nwo part of the Tulimshar miner crew!");
        inventoryplace MinerHat, 1;
        getitem MinerHat, 1;
        setq TulimQuest_Tycoon, 12, 0;
    } else if (.@q == 12 && BaseLevel >= 34) {
        mesq l("Last task i can give you it's to exterminate @@ They actually lock miners progress in the mine.", getmonsterlink(BlackScorpion));
        setq TulimQuest_Tycoon, 13, 0;
    } else if (.@q == 12 && BaseLevel < 34) {
        mesq l("You are already too weak for my last task, please come back later with some levels.");
    } else if (.@q == 13) {
        mesq l("You are killing @@ at the cave.", getmonsterlink(BlackScorpion));
    } else if (.@q == 14) {
        mesq l("Wow! You did it! I do not think anyone else could have done that.");
        mesq l("Here, take this @@ - you deserve it! And here is 5000 GP and 12.000 XP", getitemlink(Ruby));
        inventoryplace Ruby, 1;
        getitem CandorHeadBand, 1;
        getexp 12000, 0;
        set Zeny, Zeny + 5000;
        setq TulimQuest_Tycoon, 15, 0;
    }
    next;
    goto L_PreMenu;

L_NoLevel:
    mesn;
    mesq l("Ah, yes... You see, there is just no task I can give to you right now. ##BYou are too weak to fight these monsters.##b");
    next;
    mesn;
    mesq l("come back stronger and i will give you tast");
    next;
    goto L_Close;


// Anything below this line is copy-pasted from SG:ManaBird, a TMW-BR clone
// Do not attention to it, unless you need to. Translated by Google.


L_ExplicaGrama:
    mes "";
    mesn;
    mesq l("Merchants like to buy body parts of killed monsters and animals because they can make items and equipment.");
    next;
    mesq l("Some others also like to buy them to keep as trophies. Either way, you can make some money with that.");
    next;
    goto L_PreMenu;

L_ExplicaBagagem:
    mes "";
    mesn;
    mesq l("If you fight Black scorpion .");
    next;
    mesn;
    mesq l("To equip or unequip an item, select it and press the 'Equip' or 'Unequip' button. You can not 'Equip' or 'Unequip' when talking to someone.");
    next;
    mesn;
    mesq l("Dress up! Do not walk without clothes! Always wear your items! They leave you less vulnerable to attacks and stronger to defeat your opponents.");
    next;
    mesn;
    mesq l("To discard an item you no longer want, select it and press the 'Discard' button. Generic items can be discarded or sold. But equipment can only be sold.");
    next;
    goto L_PreMenu;

L_ExplicaTrade:
    mes "";
    mesn;
    mesq l("Press the 'R' key to ignore or accept business proposals. You and the other citizen who want to negotiate need to be in the configuration that accepts negotiations. if your configuration is 'Ignoring business proposals', then you will not receive the warning from any citizen wanting to negotiate with you, and you will not be able to initiate negotiations.");
    next;
    mesn;
    mesq l("To negotiate with other citizens, you should click the second mouse button on some other citizen who is accepting negotiations, and select the 'Negotiation' option from the menu that will appear.");
    next;
    mesn;
    mesq l("After you have confirmed the negotiation, a window with a vertical split will appear. The left side are the items you intend to offer in trading. The right side are the items that the other citizen intends to offer in trading.");
    next;
    mesn;
    mesq l("Open your inventory window (F3 key) next to the trading window. Select an item you want to offer, and then press the Add button. To add money to the negotiation, enter the amount you will offer and press the Change button.");
    next;
    mesn;
    mesq l("When you have added all the items and money you want, press the 'Propose Business' button. The other citizen must also press the 'Propose Business' button.");
    next;
    mesn;
    mesq l("if the proposal is not convenient for you, just close the trading window to cancel the exchange of items and money. But if both press the 'Accept Negotiation' button, then the marketing will be finished.");
    next;
    mesn;
    mesq l("Remember! You're trading things, not lending/borrowing them. You are solely responsible for everything you own.");
    next;
    goto L_PreMenu;


L_Close:
    close;


    function tycoon_add_kills
    {
        .@qp=getq(TulimQuest_Tycoon);
        .@kp=getq2(TulimQuest_Tycoon); // Get number of kills (via getq2)
        setq TulimQuest_Tycoon, .@qp, .@kp+1;
        //message strcharinfo(0), l("Set status @@ with @@ kills", .@qp, .@kp);
    }

    function tycoon_max_kills
    {
        .@qp=getq(TulimQuest_Tycoon);
        setq TulimQuest_Tycoon, .@qp+1, 0;
        //message strcharinfo(0), l("End status @@", .@qp);
    }

OnKillRatto:
    .@q=getq(TulimQuest_Tycoon);
    .@k=getq2(TulimQuest_Tycoon); // Get number of kills (via getq2)
    if (.@q == 1) {
        if (.@k+1 >= 10) {
            tycoon_max_kills();
            message strcharinfo(0), l("All rattos are dead! Go back to Tycoon");
        } else {
            tycoon_add_kills();
            message strcharinfo(0), l("@@/10 Rattos", .@k+1);
        }
    }
    end;
OnKillCaveMaggot:
    .@q=getq(TulimQuest_Tycoon);
    .@k=getq2(TulimQuest_Tycoon); // Get number of kills (via getq2)
    if (.@q == 4) {
        if (.@k+1 >= 25) {
            tycoon_max_kills();
            message strcharinfo(0), l("All cave maggots are dead! Go back to Tycoon");
        } else {
            tycoon_add_kills();
            message strcharinfo(0), l("@@/25 Cave Maggots", .@k+1);
        }
    } else {
        if (is_staff()) 
            dispbottom "It's working. (T:OKHM)";
    }
    end;
OnKillCaveSnake:
    .@q=getq(TulimQuest_Tycoon);
    .@k=getq2(TulimQuest_Tycoon); // Get number of kills (via getq2)
    if (.@q == 7) {
        if (.@k+1 >= 50) {
            tycoon_max_kills();
            message strcharinfo(0), l("All cave snakes are dead! Go back to Tycoon");
        } else {
            tycoon_add_kills();
            message strcharinfo(0), l("@@/50 Cave Snakes", .@k+1);
        }
    }
    end;
OnKillRedScorpion:
    .@q=getq(TulimQuest_Tycoon);
    .@k=getq2(TulimQuest_Tycoon); // Get number of kills (via getq2)
    if (.@q == 10) {
        if (.@k+1 >= 100) {
            tycoon_max_kills();
            message strcharinfo(0), l("All red scorpions are dead! Go back to Tycoon");
        } else {
            tycoon_add_kills();
            message strcharinfo(0), l("@@/100 Red Scorpions", .@k+1);
        }
    }
    end;
OnKillBlackScorpion:
    .@q=getq(TulimQuest_Tycoon);
    .@k=getq2(TulimQuest_Tycoon); // Get number of kills (via getq2)
    if (.@q == 13) {
        if (.@k+1 >= 200) {
            tycoon_max_kills();
            message strcharinfo(0), l("All black scorpions are dead! Go back to Tycoon");
        } else {
            tycoon_add_kills();
            message strcharinfo(0), l("@@/1 Black Scorpions", .@k+1);
        }
    }
    end;

OnInit:
    .@npcId = getnpcid(0, .name$);
    setunitdata(.@npcId, UDT_HEADTOP, ArtisTankTop);
    setunitdata(.@npcId, UDT_HEADMIDDLE, BromenalPants);
    setunitdata(.@npcId, UDT_HEADBOTTOM, MinerHat);
    setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 19);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 8);

    .sex = G_MALE;
    .distance = 4;
    end;
}