summaryrefslogtreecommitdiff
path: root/npc/001-2-11/mona.txt
blob: abec0cee42dbea4ab22e8dcedc41ea599393e3c6 (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
// Evol scripts.
// Author:
//    Reid
//    Jesusalva
// Description:
//    A rich girl holding a candle. Her father went to examine weird noises on
//    sewers and still haven't come back. Her mother is gone, but it is not clear
//    if she died, abandoned them, or something else.
// Variable:
//    ArtisQuests_MonaDad
// Quest states:
//    0  - Quest not started
//    1  - Mona explained that her dad was missing
//    2  - Player is bringing Mundane out of Sewers
//    3  - Quest is complete
// Note:
//    Any misformatted code is Jesusalva's fault.

001-2-11,39,30,0	script	Mona	NPC_MONA,{

    function find_daddy_quest
    {
        speech S_LAST_NEXT,
            l("Hey you!");

        switch (select(l("Yes?"), l("Sorry, I have to go.")))
        {
            case 1:
                mes "";
                break;
            case 2:
                speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
                    l("No you don't have to go. I need your help, so you have to stay.");
                break;
        }

        speech S_LAST_NEXT | S_NO_NPC_NAME,
            l("Daddy did not come back home... He said that he would be back for lunch but it has already been a week!"),
            l("You have to find him, or else I will tell him that you did not help me.");

        switch (select(l("You do not give me much options."), l("The elder ran away from you.")))
        {
            case 1:
                speech S_FIRST_BLANK_LINE,
                    l("He said that he would check why the manhole next to the house was doing weird sounds."),
                    l("But he never returned."),
                    l("Please find my daddy...");

                setq ArtisQuests_MonaDad, 1;
                break;
            case 2:
                speech S_FIRST_BLANK_LINE,
                    l("I will tell my dad!");
                break;
        }
        emotion E_SAD;
        close;
    }

    // You're here to report that Mundane is out of the sewers.
    // Forcing you to enter an instanced map would require more work.
    // This means adding a warp NPC and a global instance.
    // Global Instances get reset every 10 days or so, it would need a patch
    // only to support Global Instances and in general is not a smart thing to do.
    function check_daddy_quest
    {
        // Did you really brought Mundane to sewer exit (152, 56)?
        // We need to add 1 tile in each direction of tolerance because addtimer()
        // is not exactly what I would call “a reliable way to do stuff”
        // Note that @variables sometimes get erasen AT RANDOM.
        // If this problem happens, move it char variables.
        // (that might cause problems with logout though.)
        // Temporary variables give you a time limit to report back...
        if (@MUNDANE_OLDX >= 151 && @MUNDANE_OLDX <= 153 &&
            @MUNDANE_OLDY >= 55 && @MUNDANE_OLDY <= 57) {
            // There's no need to check if instance still exists, because
            // when the instance expires, you get warped to *somewhere*.
            // This means the timer will die and MUNDANE_OLD* variables will stop
            // being updated.
            inventoryplace WoodenBow, 1;
            speech 0x0,
                l("Daddy finally came back home! He grabbed a snack and said he would be returning to the sewers."),
                lg("He did said to you take this @@ as a gift. He says you are very skilled and will make a good use of his old weapon.",
                   "He did said to you take this @@ as a gift. He says you are very skilled and will make a good use of his old weapon.",
                    getitemlink(WoodenBow)),
                l("He was never the same since mommy vanished...");
            getitem WoodenBow, 1;
            setq(ArtisQuests_MonaDad, 3);
            close;
        }
    }

    // Here the script really starts
    if (getq(ArtisQuests_MonaDad) == 0)
    {
        find_daddy_quest();
    }
    else if (getq(ArtisQuests_MonaDad) == 3)
    {
        npctalkonce any(
            l("Thanks for finding daddy... I wish he spent more time with me..."),
            l("Sagratha is great. Why the strange woman near the Legion building always say that to daddy...")); // TODO: Polish
    }
    else if (getq(ArtisQuests_MonaDad) == 2)
    {
        check_daddy_quest();
    }
    else
    {
        npctalkonce l("Please find daddy...");
    }

    emotion E_SAD;
    close;

OnInit:
    .sex = G_FEMALE;
    .distance = 3;
    end;
}