summaryrefslogtreecommitdiff
path: root/npc/015-1/lexi.txt
blob: f6a9f6fa143a424cc7687cfe49477b29718c368a (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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
// TMW-2 Script.
// Author:
//    Povo
// Description:
//    Lexi - Silver Dye Quest (lvl 60)

015-1,30,157,0	script	Lexi	NPC_FEMALE,{
    mesn;
    mesq l("Hi there stranger!");
    goto L_Menu;

L_Menu:
    .@m$ =  (getq(HurnscaldQuest_Lexi) ? "Can you make me dye?" : "Do you sell anything?");
    next;
    mesn;   
    mesq l("It is always a pleasant surprise to meet people out here.");
    select
        l("Who are you?"),
        l("What is it that you are doing here?"),
        l("Aren't you afraid of all these monsters?"),
        l(.@m$),
        l("Ignore.");

    mes "";
    switch (@menu)
    {
        case 1:
            mesn;
            mesq l("I am Lexi. I used to be an adventurer like yourself until I discovered the joy of alchemy.");
            next;
            goto L_Menu;
        case 2:
            mesn;
            mesq l("I am currently working on developing a monster repellent in hopes of establishing myself as a world renowned alchemist!");
            next;
            mesq l("While I haven't had much luck as of yet, I have certainly learned a few things along the way.");
            goto L_Menu;
        case 3:
            mesn;
            mesq l("Not Really. Despite my appearance, I am actually pretty high level from my journeys.");
            next;
            mesn;
            mesq l("You see, I have travelled the world fighting monsters and improving my skills over many years.");
            next;
            mesn;
            mesq l("Nowadays, I use my life experience to master my alchemy by immersing myself in the field so I can study the effects of my work on monster activity.");
            goto L_Menu;
        case 4:
            mesn;
            mesq l("I don't sell anything but I do exchange items and GP for %s.", getitemlink(SilverDye));
            next;
            mesn;
            mesq l("It really helps me fund my research but I only ask those who appear to be strong enough."); 
            next;
            if (BaseLevel < 60) { 
                mesq l("When you are a bit stronger I will be willing to make that trade with you");
                next;
                mesn;
                mesq l("I have seen too many overly ambitious adventurers perish in my travels, and I do not want to see that happen to anyone else.");
                goto L_Menu;
            }
            mesq l("You seem like you can handle yourself out there.");
            next;
            goto L_Offer;
        case 5:
            close;
    }

L_Offer:
    .@q = getq(HurnscaldQuest_Lexi);
    mesn;
    mesq l("This is what I need to make you one %s:", getitemlink(SilverDye));
    mesq l("");
    mesq l("%s/%s GP",fnum(Zeny), fnum(7500));
    mesq l("%d/%d %s",countitem(BottleOfSewerWater), 1, getitemlink(BottleOfSewerWater));
    mesq l("%d/%d %s",countitem(ShadowHerb), 150, getitemlink(ShadowHerb));
    mesq l("%d/%d %s",countitem(IronPowder), 40, getitemlink(IronPowder));
    mesq l("%d/%d %s",countitem(DiamondPowder), 10, getitemlink(DiamondPowder));
    mesq l("%d/%d %s",countitem(SilverIngot), 1, getitemlink(SilverIngot)); 
    mesn;
    mesq l("So what do you think? Want one?");
    compareandsetq HurnscaldQuest_Lexi, 0, 1;
    goto L_Dye;

L_Dye:
    if (askyesno() == ASK_NO)
        goto L_Quit;
    
    if (countitem(BottleOfSewerWater) >= 1 &&
          countitem(ShadowHerb) >= 150 &&
          countitem(IronPowder) >= 40 &&
          countitem(DiamondPowder) >= 10 &&
          countitem(SilverIngot) >= 1 &&
          Zeny >= 7500) {
        inventoryplace SilverDye, 1, EmptyBottle, 1;
        delitem BottleOfSewerWater, 1;
        delitem ShadowHerb, 150;
        delitem IronPowder, 40;
        delitem DiamondPowder, 10;
        delitem SilverIngot, 1;
        Zeny=Zeny-7500;
        getitem SilverDye, 1;
        getitem EmptyBottle, 1;
        if (getq(HurnscaldQuest_Lexi) < 2) {
            setq HurnscaldQuest_Lexi, 2;
            getexp 30000, 0;
        }   
        mesn;
        mesq l("Thanks you for funding my research! Was that all or did you need more?");
        next;
        goto L_Dye;
    } else {
        mesn;
        mesq l("Hmm...you should double check your inventory because it seems you are missing some things.");
        goto L_Menu;
    }
    close;

L_Quit:
    closedialog;
    goodbye;
    close;

/// Core code
OnTimer1000:
    domovestep;

OnInit:
OnInstanceInit:
    .@npcId = getnpcid(.name$);

    // Small movement
    initpath "move", 30, 157,
             "dir", DOWN, 0,
             "wait", 11, 0,
             "move", 32, 159,
             "dir", LEFT, 0,
             "wait", 1, 0,
             "move", 34, 159,
             "dir", RIGHT, 0,
             "wait", 2, 0,
             "move", 32, 159,
             "dir", LEFT, 0,
             "wait", 3, 0,
             "move", 31, 157,
             "dir", UP, 0,
             "wait", 1, 0,
             "move", 30, 157,
             "dir", UP, 0,
             "wait",1, 0,
             "move", 31, 157,
             "dir", UP, 0,
             "wait", 4, 0;
             
    initialmove;
    initnpctimer;

    .@npcId = getnpcid(.name$);
    setunitdata(.@npcId, UDT_HEADTOP, BrimmedFeatherHat);
    setunitdata(.@npcId, UDT_HEADMIDDLE, SailorShirt); 
    setunitdata(.@npcId, UDT_HEADBOTTOM, MiniSkirt);
    setunitdata(.@npcId, UDT_WEAPON, CandorBoots ); 
    setunitdata(.@npcId, UDT_HAIRSTYLE, 16);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 11);
    .sex = G_FEMALE;
    .distance = 5;
    end;
}