summaryrefslogtreecommitdiff
path: root/npc/024-16/king.txt
blob: ec8e21c593f428cececc31207f0645460a0d10cb (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
// 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 (.@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-estate, and is 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 you 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 stuff.");
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("Did I said the best craftsman and craftswoman in the world are here? @@, the legendary bow, was proudly crafted by the first king of Frostia!", getitemlink(Tyranny));
    next;
    mesn l("King Gelid Frozenheart");
    mesq l("He is not alive anymore, so only a single bow of those exist in the whole world... That is why we call it a ")+b(l("legendary weapon"));
    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 4-2 ::.")), 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;
    mesq l("Great, I see you've already made yourself comfortable!");
    next;
    mesn;
    mesq l("Do not hesit to purchase furniture. The furniture belongs to the house, so if you lose the house, you'll lose it, too. But apartments are never rent to someone else!");
    next;
    mesn;
    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;
    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?
    // FIXME: If you die at Isbamuth's Challenge, YOU CANNOT TRY AGAIN!!

    // Debug functionality
    if (is_staff()) {
        mesc l("This quest wasn't released yet, continue anyway?"),1;
        if (askyesno() == ASK_YES)
            cwarp "023-3", 63, 219;
    }

    // Endtrail
    mes "";
    mesc l("@@ You need to wait further releases to continue this quest!", b(l("WARNING:"))), 1;
    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=3;
    npcsit;
    end;
}