summaryrefslogtreecommitdiff
path: root/world/map/npc/048-2/helperMReed.txt
blob: 50ac45c0cd68ca7568229696471e576c227ba88e (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
// Part of Blue Sage quests
// author: Jenalya
// see bluesageConfig for detailed quest description
// Kullervo asks for Reed Bundles to create paper for repairing the books
// can give second hint about both Peetu and visitor in investigation subquest

048-2,104,78,0|script|Kullervo|366
{
    set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT);
    set @reed_amount, 20;
    set @reed_exp, 10000;

    if (QUEST_BlueSage & $@Q_BlueSageMaterialReed) goto L_Done;

    mes "[Kullervo]";
    mes "\"Oh no! What should we do now?\"";
    menu
        "What's wrong?",L_Foo;
L_Foo:
    mes "[Kullervo]";
    mes "\"We're nearly out of paper. The new books require so much material... And it's not easy to get Reed Bundles to create new paper.\"";
    if (BaseLevel < $@Q_BlueSageMinimumLevel)
        goto L_Close;
    menu
        "I have some.",L_TurnIn,
        "I'll try to get some.",L_Close,
        "Too bad.",L_Investigate;

L_TurnIn:
    if(countitem("ReedBundle") < @reed_amount)
        goto L_NoItem;
    delitem "ReedBundle", @reed_amount;
    getexp @reed_exp, 0;
    set QUEST_BlueSage, (QUEST_BlueSage | $@Q_BlueSageMaterialReed);
    mes "[Kullervo]";
    mes "\"Thank you! That's very generous of you.\"";
    goto L_Investigate;

L_Done:
    mes "[Kullervo]";
    mes "\"Very well, now I can create more paper.\"";
    goto L_Investigate;

L_NoItem:
    mes "[Kullervo]";
    mes "\"Oh, really? Ah, it's not enough. I need " + @reed_amount + " Reed Bundles.\"";
    goto L_Close;

L_Investigate:
    if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor;
    if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper;
    if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both;
    goto L_Close;

L_Ask_Visitor:
    menu
        "Can you tell me anything about the visitor with the mask?",L_Visitor,
        "I need to leave.",L_Close;

L_Ask_Helper:
    menu
        "What's your opinion of Peetu and how he does his work?",L_Helper,
        "See you later.",L_Close;

L_Ask_Both:
    menu
        "Can you tell me anything about the visitor with the mask?",L_Visitor,
        "What's your opinion of Peetu and how he does his work?",L_Helper,
        "Bye.",L_Close;

L_Visitor:
    mes "[Kullervo]";
    mes "\"Oh, yes. There was such a guy, shortly before the accident I think. He sneaked into the workshop several times, sticking his nose into stuff that shouldn't be his business. We had to send him back to the library area at least three times.\"";
    next;
    mes "\"Maybe he was confused, not sure. He talked very strangely.\"";
    if ((@investigate != 3) && (@investigate != 6) && (@investigate != 9))
        goto L_Close;
    set @investigate, @investigate + 1;
    callfunc "updateBlueSageInvestigate";
    goto L_Close;

L_Helper:
    mes "[Kullervo]";
    mes "\"Are you asking because people say it's his fault? Listen, I've known him for many years now. We started our service here about the same time. We share our room and are really close friends.";
    mes "And in all these years, I've never seen him messing up anything important. He's a perfectionist. He isn't satisfied with anything less than the best possible result when doing his work.\"";
    next;
    mes "\"I don't understand what went wrong with that spell, but it just has to have another cause than Peetu. I'm worried about him. He must feel very miserable. But I can't leave my duty here.\"";
    if ((@investigate != 5) && (@investigate != 6) && (@investigate != 7))
        goto L_Close;
    set @investigate, @investigate + 3;
    callfunc "updateBlueSageInvestigate";
    goto L_Close;

L_Close:
    set @investigate, 0;
    set @reed_amount, 0;
    set @reed_exp, 0;
    close;
}