summaryrefslogtreecommitdiff
path: root/world/map/npc/017-4/waric.txt
blob: 663d6c073d0434a653f435641a7d52a571a97b71 (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
// Author: Jenalya
// Current state: only dialog, magic teaching not finished
// Waric is intended to teach the player some dark magic spells
// in case the player is not a follower of Sagatha and can't become
// one anymore (killed the wounded mouboo or cut the druid tree).
// Waric would teach the spells based on the progress in the pentagram
// creation, but save which spells were taught in a different variable.

017-4.gat,216,36,0|script|Waric|153,
{
    set @mouboo_status, ((QUEST_MAGIC & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT) & 3;
    set @killed_mouboo, 0;
    if ((@mouboo_status == 1) || (@mouboo_status == 2))
        set @killed_mouboo, 1;
    set @mouboo_status, 0;

    if (MAGIC_FLAGS & MFLAG_DID_CUTTREE)
        set @cut_tree, 1;

    set @sagatha_follower, (QUEST_MAGIC & (NIBBLE_4_MASK | NIBBLE_5_MASK)) >> NIBBLE_4_SHIFT;

    if (OrumQuest > 30) goto L_Flower5;
    if (OrumQuest > 26) goto L_Flower4;
    if (OrumQuest > 23) goto L_Flower3;
    if (OrumQuest > 20) goto L_Flower2;
    if (OrumQuest > 17) goto L_Flower1;
    if (OrumQuest > 15) goto L_Mistrust;

    mes "[Waric]";
    mes "\"You! You really are far too persistent to know what is good for you!\"";
    mes "He turns towards Orum.";
    next;
    mes "[Waric]";
    mes "\"It seems your ridiculous Guarding Spirit has failed at his task.";
    mes "Deal with this. We cannot afford any more of these distractions.\"";
    goto L_Close;

L_Mistrust:
    mes "[Waric]";
    mes "\"So, you say you want to help us? You do not look very competent.";
    mes "Also, I do not see what motivation you have to help.\"";
    next;
    mes "\"Demonstrate your worth and I might take you seriously.\"";
    goto L_Close;

L_Flower1:
    mes "[Waric]";
    mes "\"You placed the first flower. Why, I am surprised! I did not expect you to actually stay and become useful.\"";
    goto L_Close;
    // TODO: enable this when adding the spells
    // also add logic to the other label's dialogs/eventually change their dialog to fit better
    if (!getskilllv(SKILL_MAGIC))
        goto L_Close;
    menu
        "Can you teach me some magic?", -,
        "Of course!", L_Close;

    if (@sagatha_follower)
        goto L_Sagatha;
    if (!@killed_mouboo && !@cut_tree)
        goto L_Undecided;
    mes "[Waric]";
    mes "\"Hmm. I suppose I could do that. You seem to have some potential.";
    mes "First, proceed with the next summoning artifact.\"";
    goto L_Close;

L_Flower2:
    mes "[Waric]";
    mes "\"You placed the second flower? It seems Orum's choice of tools is better than expected.\"";
    goto L_Close;

L_Flower3:
    mes "[Waric]";
    mes "\"I saw that you helped to create and place the third flower. Good.\"";
    goto L_Close;

L_Flower4:
    mes "[Waric]";
    mes "\"Now that you have placed the fourth flower, we are very close to reaching our goal. Keep it up.\"";
    goto L_Close;

L_Flower5:
    mes "[Waric]";
    mes "\"Hahaha, excellent. You handled the creation of our pentagram very well. I will be keeping that in mind.";
    mes "I have advised Orum to give you a reward. Go now and speak with him.\"";
    goto L_Close;

L_Spells:
    mes "TODO";
    // teach spells
    // doesn't trust the player at all if player is follower of sagatha
    goto L_Close;

L_Undecided:
    mes "[Waric]";
    mes "\"Well, I could. However, I am not sure you are all that trustworthy.\"";
    next;
    mes "\"How do I know you will not run off to Sagatha with what I would be teaching you?\"";
    goto L_Close;

L_Sagatha:
    mes "[Waric]";
    mes "\"You are already a student of Sagatha. I will not teach you anything!\"";
    goto L_Close;

L_Close:
    set @killed_mouboo, 0;
    set @cut_tree, 0;
    set @sagatha_follower, 0;
    close;
}

017-1.gat,74,32,0|script|DebugFlowerP|153,
{
    mes "Debug options for Orum's quest:";
    menu
        "Candle Helmet done.", L_CandleHelmet,
        "Input quest variable.", L_Var,
        "Show current quest state.", L_CurrentState,
        "Reset quest.", L_Reset,
        "Nevermind.", L_Close;

L_CandleHelmet:
    set OrumQuest, 14;
    goto L_Close;

L_Var:
    input OrumQuest;
    goto L_Close;

L_CurrentState:
    mes "The value of the quest variable OrumQuest is currently " + OrumQuest + ".";
    goto L_Close;

L_Reset:
    set OrumQuest, 0;
    goto L_Close;

L_Close:
    close;

OnInit:
    if (!debug)
        disablenpc "DebugFlowerP";
}