summaryrefslogtreecommitdiff
path: root/npc/024-1/erlan.txt
blob: b6cc4ddfdfc83ad754678fa0278c2fb86d14503d (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
// TMW2 scripts.
// Authors:
//    Jesusalva
// Description:
//    Questmaker Handbook 14.0 (F = Favorable)

024-1,73,48,0	script	Erlan	NPC_ELF,{
    .@q = getq(FrostiaQuest_Erlan);
    if (BaseLevel < 40) {
        mesc l("The elf seems busy. He ignores you.");
        close;
    }
    if (.@q == 0) {
        if (frally()) goto L_Start_F;
        else goto L_Start_U;
    }
    else if (.@q == 1) {
        if (frally()) goto L_Submit_F;
        else goto L_Submit_U;
    }
    else if (.@q == 2) {
        if (frally()) goto L_Done_F;
        else goto L_Done_U;
    }
    Exception("Invalid quest state - "+str(.@q));
    end;

L_Start_F:
    mesn;
    mesq lg("Hey gal, could you do me a little favor?", "Hey pal, could you do me a little favor?");
    next;
    mesn;
    mesq l("You see, I am Erlan, a researcher. I'm currently developing strong poison to rival with the legendary %s. For that end, I need raw, untreated sewerage, but there is no such thing here. Could you bring me %d %s? Thanks!", getitemlink(NymphPoison), 7, getitemlink(BottleOfSewerWater));
    setq FrostiaQuest_Erlan, 1;
    close;

L_Submit_F:
    mesn;
    mesq l("Did you got the %d %s I've asked?", 7, getitemlink(BottleOfSewerWater));
    next;
    if (askyesno() == ASK_YES) {
        if (countitem(BottleOfSewerWater) < 7) {
            mesn;
            mesq l("You've been spending too much time with humans. You are picking up bad habits from them like lying. Be careful.");
            close;
        }
        delitem BottleOfSewerWater, 7;
        getexp 10000, 0;
        Zeny+=5700;
        setq FrostiaQuest_Erlan, 2;
        mesn;
        mesq lg("Thanks, my friend. Here's some money.");
    }
    close;

L_Done_F:
    mesn;
    mesq l("Thanks for the help earlier. Unfortunately, I had no luck yet.");
    next;
    mesn;
    mesq l("There are rumors about a sacred elf land, where our antecessors lived in peacefully somewhere close to here, but the path was lost. That's why we now live with dwarves.");
    close;
/////////////////////////////////////////////////////////////////////////////////
L_Start_U:
    mesn;
    mesq l("Uh, a %s? How odd.", get_race());
    next;
    mesn;
    mesq l("You see, I am Erlan, a researcher. I'm currently developing strong poison to rival with the legendary %s. For that end, I need raw, untreated sewerage, but there is no such thing in a civilized town like ours.", getitemlink(NymphPoison));
    next;
    mesn;
    mesq l("But you seem to have come from more savage and barbaric towns, so if you could bring me %d %s, that would be truly helpful.", 7, getitemlink(BottleOfSewerWater));
    setq FrostiaQuest_Erlan, 1;
    close;

L_Submit_U:
    mesn;
    mesq l("Did you got the %d %s I've asked?", 7, getitemlink(BottleOfSewerWater));
    next;
    if (askyesno() == ASK_YES) {
        if (countitem(BottleOfSewerWater) < 7) {
            mesn;
            mesq l("You think you can fool me and lie? I'll teach you a lesson you won't forget!");
            mesc l("%s slaps you!", .name$);
            percentheal -30, 0;
            close;
        }
        delitem BottleOfSewerWater, 7;
        getexp 10000, 0;
        Zeny+=5700;
        setq FrostiaQuest_Erlan, 2;
        mesn;
        mesq l("Heh, thanks %s. Here's some money.", get_race());
    }
    close;

L_Done_U:
    mesn;
    mesq l("No, I don't have any poison for your sampling yet.");
    next;
    mesn;
    mesq l("Our antecessors used to live peacefully in a sanctuary somewhere close to here, but the path was lost. That's why we now live with dwarves.");
    close;

OnInit:
    .@npcId = getnpcid(.name$);
    setunitdata(.@npcId, UDT_HEADBOTTOM, CottonTrousers);
    setunitdata(.@npcId, UDT_HEADMIDDLE, LeatherShirt);
    setunitdata(.@npcId, UDT_HEADTOP, Beard);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 6);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 20);
    npcsit;

    .sex = G_MALE;
    .distance = 5;
    end;
}