summaryrefslogtreecommitdiff
path: root/npc/024-16/king.txt
blob: 29dd9d5659ccbf42018ed2cab156a0a93f6629e9 (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
// TMW2 scripts.
// Authors:
//    Jesusalva
// Description:
//    Ruler of Frostia (maybe we should instance this map so the king can walk)

024-16,30,23,0	script	King Gelid	NPC_ELF,{
    .@q=getq(General_Narrator);
    if (.@q < 12) {
        nude();
        atcommand("#dropall "+strcharinfo(0)); // Evil
        Exception("FATAL ERROR, PLAYER "+strcharinfo(0)+" NOT ALLOWED TO BE WITHIN FROSTIA'S CASTLE - REASON: SAULC IS A NOOB");
        slide 30, 52;
        end;
    }
    if (countitem(RentCart)) {
        mesc l("You cannot met the King while using a %s.", getitemlink(RentCart)), 1;
        close;
    }
    setcart 0;
    if (.@q >= 17)
        goto L_Complete;
    if (.@q == 16)
        goto L_Report;
    if (.@q == 15)
        goto L_Campaign;
    if (.@q >= 13)
        goto L_MainQuest;

    mesn l("King Gelid Frozenheart");
    mesq l("Hello.");
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("Yes. Frostia is a city-state, and ruled by me, King Gelid Frozenheart II.");
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("Is this letter yours? Very well, let me read.");
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("Hm hm. This sounds pretty concerning. Aiming at Sages is also a smart move, as they compose the Alliance Council.");
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("As about if I have any idea why they said they were from here? ...Actually, I do.");
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("That aside, I see you've helped Hurnscald Mayor, Nivalis Mayor, Halinarzo Librarian and even the Alliance Representative in Tulimshar!");
    next;
    mesn l("King Gelid Frozenheart");
    mesq lg("I'm quite interested in you, mah' girl!", "I'm quite interested in you, mah' boy!");
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("So, only citzens, elves and dwarves are normally welcome here and I'm NOT going to make an exception.");
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("In the ")+b(l("southwest part of the town"))+l(" is the Inn, and you can rent an apartment there for 30 days.");
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("If you rent an apartment, you'll become a \"citzen\" and be allowed here. Besides, you can buy stuff in your apartment to, for example, craft supplies.");
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("Did I said the best craftspeople in the world are here? %s, the legendary bow, was proudly crafted by the first king of Frostia!", getitemlink(Tyranny));
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("He died many moons ago and his masterwork, Tyranny, will remain one of a kind forever... That is why we call it a ")+b(l("legendary weapon")+".");
    next;
    mesc l("Legendary weapons can not be duplicated in any form, so only a single person in the world can own it at a time.");
    mesc l("Should the owner go missing for over a month, the legendary weapon returns to its original place and can be claimed by someone else.");
    next;
    // Finish the quest
    setq General_Narrator, 13;
	REAL_ESTATE_CREDITS+=5000;

L_MainQuest:
    mesn l("King Gelid Frozenheart");
    mesq l("Anyway, I'll give you @@ Real Estate Credits in advance. Go book yourself a room in the Inn. And then come back to me so we may discuss details.", 5000);
    next;

    mesc b(l(".:: Main Quest 6-1 ::.")), 3;
    msObjective(BaseLevel >= 40, l("* @@/@@ Base Level", BaseLevel, 40));
    msObjective(true, l("* Deliver Nikolai's Letter to Frostia Mayor"));
    msObjective(ESTATE_RENTTIME >= gettimetick(2), l("* Rent a room in Frostia's Inn"));
    if (ESTATE_RENTTIME >= gettimetick(2))
        goto L_Continue;
    close;

L_Continue:
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("Great, I see you've already made yourself comfortable!");
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("Do not hesitate to purchase furniture, it will help you tremendously in preparing for your ardous journey.");
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("Keep in mind that unlike houses, furniture acquired by previous owners will not be present.");
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("Bah, sorry my manners! I love to chat! Anyway, talk to any General of mine, just behind me. See if they need help.");
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("There's somewhere I want you to go, but you're not strong enough yet, so be patient and help them first.");
    if (getq(General_Narrator) == 13) {
        setq General_Narrator, 14, 0;
        getexp 0, 40;
    }
    close;

L_Campaign:
    .@q=getq(FrostiaQuest_Homunculus);
    // We probably should apply you a penalty should you flee... no?
    setq3 FrostiaQuest_Homunculus, 0;

    // Long intro until you defeat the Yeti.
    if (!.@q) {
        mesn l("King Gelid Frozenheart");
        mesq l("Listen. North of here, are the ruins of an old village. Said village is cursed, and nobody wants to go there.");
        next;
        mesn l("King Gelid Frozenheart");
        mesq l("But if you're looking to go to the World Edge, the place where THE FATE OF THE WORLD WILL BE DECIDED...");
        select
            l("Really?!"),
            l("[Say nothing]");
        mes "";
        switch (@menu) {
        case 1:
            mesc l("He laughs.");
            mesq lg("I'm just joking, mah' girl!", "I'm just joking, mah' boy!");
        case 2:
            mesq l("I guess you are immune to rumors and scary stories.");
        }
        next;
        mesn l("King Gelid Frozenheart");
        mesq l("I would bring some %s, just in case. Anyway, the place where you're going to is the village where %s was born.", getitemlink(Coffee), b(l("the Monster King")));
        next;
        mesn l("King Gelid Frozenheart");
        mesq l("I've sent a scout ahead, and he reported traps in the caves you'll be needing to traverse to get there.");
        next;
        mesn l("King Gelid Frozenheart");
        mesq l("As you can guess, the village was abandoned. However, people are claiming to have seen people walking there, maybe shadows or zombies.");
        next;
        mesn l("King Gelid Frozenheart");
        mesq l("As a King, I cannot simply ignore it. Of course, I really doubt it is zombies, but nobody wants to go. That's why I'm resorting to an adventurer like you.");
        next;
    }
    // This is a do{} loop
    do {
    mesn l("King Gelid Frozenheart");
    mesq l("So, will you go?");
    mesc l("WARNING: Difficult quest, bringing plenty of healing items strongly advised!"), 1;
    select
        l("Not right now."),
        l("Why not Andrei Sakar?"),
        l("What will be my reward?"),
        l("Yes, I'll go.");
    mes "";

    switch (@menu) {
    case 1:
        close;
    case 2:
        mesn l("King Gelid Frozenheart");
        if ($FIRESOFSTEAM < 10)
            mesq l("I tried. He asked for too much money.");
        else
            mesq l("Where have you been, pal? He perished.");
        next;
        break;
    case 3:
        mesn l("King Gelid Frozenheart");
        mesq l("Whatever you find there is yours to keep.");
        next;
        mesn l("King Gelid Frozenheart");
        mesq l("I'll also try to bring you to the world's edge, as you've asked.");
        next;
        break;
    case 4:
        cwarp "023-3", 63, 219; break;
    }
    } while (true);
    end; // fallback

L_Report:
    mesn strcharinfo(0);
    mesc l("You report to the King about everything you've found and learned there.");
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("What?! This changes the whole history. Not only that, but this is a serious issue!");
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("I thought I was going to send you into a nest of Yetis, but instead, I've sent you straight to the birthplace of Bandits and Assassins.");
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("The Blue Sage will want to know this, I'll write him a letter.");
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("Now, listen to me. I know I promised to bring you to the World's Edge.");
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("Truth is - I cannot do that. Obviously. But I know who can.");
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("Do you know the Land Of Fire Village? It is west of Hurnscald and a major town.");
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("It only loses to Tulimshar, as far as political and economical importance goes.");
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("Go to the townhall there and show the mayor this other letter.");
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("You need to prove your worth once again, though. So be ready.");
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("Good luck on your journey!");
    // Ref. level 52/24 (almost 100% of exp table)
    getexp 142750, 3950;
    getvaultexp(10);
    setq General_Narrator, 17, 0, 0;
    close;

L_Complete:
    mesn l("King Gelid Frozenheart");
    mesq l("Welcome back. Please enjoy your stay here.");
    next;
    select
        l("Could I go back to that cave? It's a good farm spot."),
        rif($TYRAN_HOLDER$ == "", l("What do you know about the Tyranny Bow?")),
        l("Thanks, my liege.");
    mes "";
    if (@menu == 1)
        cwarp "023-3", 63, 219;
    if (@menu == 2) {
        mesn l("King Gelid Frozenheart");
        mesq l("It is one of the five legendary weapons. Legend says it was hidden in a tree on Aethyr, and will be given to the one who proves to be an excellent archer.");
        next;
        if ($GAME_STORYLINE < 4) {
            mesn l("King Gelid Frozenheart");
            mesq l("But this is not a time of need, so it is unlikely to appear even if all other conditions were to be met.");
            close;
        }
        mesn l("King Gelid Frozenheart");
        mesq l("If it was easy, someone would already have claimed it, so good luck if you plan in obtaining it.");
    }
    close;

OnInit:
    /*
        <sprite>equipment/legs/assassinpants-male.xml</sprite>
        <sprite>equipment/feet/boots-male.xml</sprite>
        <sprite>equipment/hands/armbands-male.xml</sprite>
        <sprite>hairstyles/hairstyle15.xml|#585858,A4A4A4,C0C0C0,ffffff</sprite>
        <sprite>equipment/head/crown.xml</sprite>
        <sprite>equipment/weapons/knife.xml</sprite>
        <sprite>equipment/chest/warlordplate-male.xml</sprite>
        <!--sprite>equipment/charm/manta-imperial-male.xml</sprite-->
        <sound event="hit">weapons/piouslayer/hit1.ogg</sound>
    */
    .@npcId = getnpcid(.name$);
    setunitdata(.@npcId, UDT_HEADTOP, ImperialCrown);
    setunitdata(.@npcId, UDT_HEADMIDDLE, WarlordPlate);
    setunitdata(.@npcId, UDT_HEADBOTTOM, AssassinPants);
    setunitdata(.@npcId, UDT_WEAPON, FurBoots); // Boots
    // TODO: Armbands, imperial robe, etc.
    setunitdata(.@npcId, UDT_HAIRSTYLE, 15);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 8);

    .distance=4;
    npcsit;
    end;
}