summaryrefslogtreecommitdiff
path: root/world/map/npc/020-1/well.txt
blob: 85a75edbe2aa8a2ee4f07fdd32e0ec30681d3529 (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
//############################################
//#    NPC Well & Miler
//# Authors: Lien, PjotrOrial
//# Review:
//#
//# There is someone in the well. This can be found out by throwing some stuff
//# in there.
//#
//# When the npc in the well is detected they can be rescued by asking Miler
//# for help.
//#
//# The experience reward given by Miler is 111 * BaseLevel
//#
//# used variables: QUEST_Nivalis_state Nibble4
//############################################

020-1,99,83,0|script|#Well|400
{
    if(QL_WELL == 2) goto L_Finished;
    
    mes "...";
    menu
        "Throw something in the well.", L_Throw,
        "Leave it alone.", L_Close;

L_Throw:
    mes "What do you want to throw?";
    
    setarray @response_list$, "Yuck! Who threw that on me?", "Ouch! Who's hurting me?", "White powder!? What's going on up there?", "It's raining in Nivalis?!";
    setarray @item_list$, "MaggotSlime", "RawLog", "PileOfAsh", "BottleOfWater";
    menu
        "Maggot slime", L_CheckItem,
        "A raw log", L_CheckItem,
        "Pile of ash", L_CheckItem,
        "Bottle of water", L_CheckItem,
        "Leave it alone", L_Close;

L_CheckItem:
    set @index, @menu - 1;
    set @response$, @response_list$[@index];
    set @item$, @item_list$[@index];
    
    mes @item$;
    
    if(countitem(@item$) == 0)
        goto L_MissingItem;
    delitem @item$, 1;
    
    if(@item$ == "BottleOfWater")
        getitem "EmptyBottle", 1;
    
    mes "[Mysterious voice inside the well]";
    mes "\"" + @response$ + "\"";
    next;
    menu
        "Who are you?", L_Who,
        "How did you get down there?", L_How,
        "Do you need help?", L_Help;

L_Who:
    set @response$, "I'll talk about who I am after leaving the well. ";
    goto L_GetHelp;

L_How:
    set @response$, "Well, someone pushed me into the well, I'm not sure who. ";
    goto L_GetHelp;

L_Help:
    set @response$, "I certainly can't get out on my own. ";
    goto L_GetHelp;

L_GetHelp:
    mes "[Mysterious voice inside the well]";
    mes "\"" + @response$ + "So if you can get some help for me... please do so!\"";
    set @QL_WELL, 1;
    
    cleararray @response_list$, "", 4;
    cleararray @item_list$, "", 4;
    set @index, 0;
    set @response$, "";
    
    goto L_Close;

L_MissingItem:
    mes "You can't throw something you don't have.";
    goto L_Close;

L_Finished:
    mes "This is a well.";
    goto L_Close;

L_Close:
    close;
}

020-2,100,28,0|script|Miler|100
{
    mes "[Miler]";
    mes "\"Hello!\"";
    
    if(QL_WELL != 1) goto L_Close;
    menu
        "Hello.", L_Close,
        "Hello, Can you help me?", L_Help;

L_Help:
    mes "[Miler]";
    mes "\"What's the problem?\"";
    menu "Someone fell into the well.", L_Next;

L_Next:
    mes "[Miler]";
    mes "\"Ho! I'll help him!\"";
    getexp (BaseLevel * 111), 0;
    set QL_WELL, 2;
    close;
}