summaryrefslogtreecommitdiff
path: root/npc/012-2/rakinorf.txt
blob: dc4a29c573d7845294f729492af17d7336ce84d3 (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
// TMW2/LoF scripts.
// Authors:
//    Jesusalva
// Description:
//    Current Hurnscald Mayor
// Variable:
//      SQuest_Sponsor
//      Quest ID: 4

012-2,34,79,0	script	Rakinorf, Hurnscald Mayor	NPC_ANSELMO_BR,{
    function resetSQS {
        setq SQuest_Sponsor, 0, gettime(GETTIME_MONTH);
    }
    // Check monthly quest
    .@d=getq2(SQuest_Sponsor);
    if (.@d != gettime(GETTIME_MONTH)) resetSQS();

    .@n=getq(General_Narrator);
    .@q=getq(SQuest_Sponsor);
    mesn;
    mesq l("Ah... I need more beer to keep going... This is so awful...");
    // Handle main storyline
    if (.@n >= 5 && .@n < 6)
        goto L_MainStory;
    // Handle main storyline

    // Core
    .@q=getq(SQuest_Sponsor);
    if (!(.@q & .questID) && getgmlevel()) goto L_Menu;
    close;

L_Menu:
    mesq l("I will reward you for 7 @@.", getitemlink(.itemID));
    mes "";
    menu
        rif(countitem(.itemID) >= 7, l("Here they are!")), L_Finish,
        l("Where can I find them?"),L_Where,
        l("No, thanks."),L_Close;

L_Finish:
    delitem .itemID, 7;
    getitem StrangeCoin, rand(2,4);
    .@q=getq(SQuest_Sponsor);
    setq1 SQuest_Sponsor, .@q | .questID;
    mes "";
    mesn;
    mesq l("Many thanks! Come back later to bring me extra @@!", getitemlink(.itemID));
    close;

L_Where:
    mes "";
    mesq l("Ah, there are lots with Melina, downstairs.");
    next;

L_Close:
    closedialog;
    goodbye;
    close;

// Main Storyline
L_MainStory:
    next;
    // 5 - First time speaking
    // setq2
    //      0 - Not Assigned
    //      1 - Need to bring Beer
    //      2 - Need to find out how Arkim is doing
    //      3 - Complete, Reluctancy node
    //      4 - Told about Hurnscald Liberation Day, but didn't told where previous mayor is
    //      5 - Told you to tell Airlia about.
    //      6 - Airlia told you what she knew, must talk to Rakinorf
    //      7 - Need to get levels (standard quest)
    // 6 - Must visit Halinarzo Library

    // 8 - TODO

    .@n2=getq2(General_Narrator);

    select
        rif(getgmlevel(), l("Maybe I could give you more beer?")),
        rif(.@n2 == 0, l("I know it may sound silly, but I need your help to find out who I am.")),
        rif(.@n2 == 1, l("I have brought you the beer.")),
        rif(.@n2 == 2, l("I know how many bat teeth and wings Arkim collected.")),
        rif(.@n2 == 3, l("I know it may sound silly, but I need your help to find out who I am.")),
        rif(.@n2 == 4, l("Where can I find the previous mayor?")),
        rif(.@n2 == 6, l("Airlia told me XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")),
        rif(.@n2 == 7, l("I think I'm ready.")),
        l("Ok, thanks.");

    mes "";
    switch (@menu) {
        case 1:
            goto L_Menu; break;
        case 2:
            mesn;
            mesq l("Not now... *hic* I need @@... *hic* Bring me seven if you *hic* can...", getitemlink(Beer));
            setq2 General_Narrator, 1;
            break;
        case 3:
            if (countitem(Beer) < 7) {
                mesn;
                mesq l("That's not *hic*... That's not what I asked you for...");
                next;
                mesn;
                mesq l("Please bring me *hic*... Bring me 7 @@!", getitemlink(Beer));
                close;
            }
            delitem Beer, 7;
            getexp BaseLevel*10, JobLevel*3;
            setq2 General_Narrator, 2;
            mesn;
            mesq l("Aaaaaaaahhhhh.... Much better now *hic*.");
            next;
            mesn;
            mesq l("Could you *hic* do me a favor? Arkim, on a cave southeast of *hic* here, is collecting some stuff.");
            next;
            mesn;
            mesq l("He's an *hic* hermit, and collects *hic* Bat teeth and wings... Tell me how many he collected!");
            break;
        case 4:
            mesn;
            mesq l("So? How many *hic* he collect?");
            mesc l("Protip: Arkim is in a cave southeast of here and is an hermit.");
            input .@am;
            mes "";
            // If players give up to 10 wings/teeths since you check, I don't mind
            if (.@am < ($ARKIM_ST-10) || .@am > $ARKIM_ST)
                goto L_Fail;
            mesn;
            mesq l("Thanks. You can go, now.");
            getexp BaseLevel*2, JobLevel;
            setq2 General_Narrator, 3;
            break;
        case 5:
            mesn;
            mesq l("Maybe later.");
            break;

    }
    close;

L_Fail:
    mesn;
    mes l("Eh? You sure?");
    if (.@am > $ARKIM_ST)
        mes l("I don't think he could have collected that many!");
    else
        mes l("Last time they told me he collected more than that...");
    next;
    mesn;
    mesq l("Could you try again, please?");
    // No penalty? Really??
    close;

OnInit:
    .questID=4;
    .itemID=Beer;
    .sex=G_MALE;
    .distance=5;
    end;
}