summaryrefslogtreecommitdiff
path: root/npc/008-1/mikhail.txt
blob: 74f11cf5b89bfe22357f9d1682fed8f79e9ca63d (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
// Evol scripts.
// Author:
//    gumi
// Quest states:
//    [1] 0 - cannot do the quest
//    [1] 1 - can do the quest
//    [1] 2 - bernard wants roasted maggot
//    [1] 3 - brought maggot
//    [1] 4 - bernard wants maggot slime
//    [1] 5 - brought maggot slime
//    [1] 6 - mikhail needs maggot slime
//    [1] 7 - brought maggot slime
//    [2] unused
//    [3] unused
//    [t] unused
// Description:
//    takes part in the slime soup quest (Bernard)

008-1,298,95,0	script	Mikhail	NPC_MIKHAIL,{

    function soup_scared {
        speech 4,
            l("Hello..."),
            l("I'm supposed to be helping Bernard from the Inn but...");

        narrator 4,
            l("His eyes grow wide");

        speech 4,
            l("Eeekkk another one.");

        narrator
            l("It seems that the boy would like to say more, but seems too terrified at the moment."),
            l("Maybe you should help someone else first, so that he sees your intentions are good.");

        close;
    }

    function soup_intro2 {
        speech 4,
            l("Bernard sent me to get %d %s from the %s in the fields, but they scare me so bad!",
                .third_item_qty, getitemlink(.third_item), getmonsterlink(.third_item_mob)),
            l("You look like a nice person."),
            l("Would you go get them for me?");

        selectd
            l("Of course, I'll go get them for you.");

        speech
            l("Thank you so much!"),
            l("I'll wait for you here.");

        setq .quest, 6;
        close;
    }

    function soup_reminder_slime2 {
        speech
            l("Did you bring me the %d %s I need?",
                .third_item_qty, getitemlink(.third_item)),
            l("It doesn't look like you have them all...");
        close;
    }

    function soup_reward_slime2 {
        speech
            l("Did you bring me the %d %s I need?",
                .third_item_qty, getitemlink(.third_item)),
            l("Ooh!"),
            l("Thank you so much!"),
            l("I can get back to Bernard now!");

        if (countitem(.third_item) < .third_item_qty)
            close; // double-check

        delitem .third_item, .third_item_qty;
        setq .quest, 7;
        quest_xp(.maxLevel, .third_reward_exp);
        close;
    }

    function soup_thanks_slime2 {
        speech
            l("Thanks again for helping me!") + " %%Q";

        close;
    }

    switch(getq(.quest))
    {

        case 0:
        case 1:
        case 2:
        case 3:
        case 4: soup_scared; break;
        case 5: soup_intro2; break;
        case 6:
            if (countitem(.third_item) < .third_item_qty)
                soup_reminder_slime2;
            else
                soup_reward_slime2;
            break;
        default: soup_thanks_slime2;
    }

    closeclientdialog();
    close;

OnInit:
    .third_item = MaggotSlime;
    .third_item_qty = 5;
    .third_item_mob = Maggot;

    .maxLevel = 30;
    .third_reward_exp = 100;

    .quest = HurnscaldQuests_Soup;
    .quest_debug = .quest;
    .bodytype = BODYTYPE_3;
    .distance = 3;

    end;
}