summaryrefslogtreecommitdiff
path: root/npc/004-1/elanore.txt
blob: 8f690bed2b326fa72d9cee6999babf976a0611b1 (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
// TMW-2 Script
// Author:
//    Jesusalva

004-1,80,62,0	script	Elanore the Healer	NPC_FEMALE,{
    .@price=Nurse(.name$, 10, 5, 1);
    mesq l("For you, it'll be @@ GP.", .@price);
    mes "";
    menu
        rif(Zeny >= .@price, l("Please heal me!")), L_Healing,
        l("Do you make Lifestones?"), L_Lifestones,
        l("Another time, maybe."), -;
    close;


L_Healing:
    Nurse(.name$, 10, 5, 2);
    close;

L_Lifestones:
    mes "";
    mesn;
    mesq l("Lifestones have the potential to heal the user, and thus are used for potions.");
    next;
    mesq l("I will need 3 @@, 5 @@ and 100 GP to craft a single stone.", getitemlink(BugLeg), getitemlink(MaggotSlime));
    next;
    mes "";
    menu
        l("OK, I will get them."), -,
        l("No way!"), -,
        l("Here you are!"), L_Trade,
        l("I want more than one!"), L_Trade_Input;
    close;

L_Trade:
    if (countitem(BugLeg) < 3) goto L_Trade_Missing;
    if (countitem(MaggotSlime) < 5) goto L_Trade_Missing;
    if (Zeny < 100) goto L_Trade_Missing;

    inventoryplace Lifestone, 1;

    delitem BugLeg, 3;
    delitem MaggotSlime, 5;
    set Zeny, Zeny - 100;

    getitem Lifestone, 1;
    goto L_TradeOK;

L_Trade_Input:
    mesc l("How many?");
    input .@am;
    if (.@am <= 0)
        close;

    if (countitem(BugLeg) < 3*.@am) goto L_Trade_Missing;
    if (countitem(MaggotSlime) < 5*.@am) goto L_Trade_Missing;
    if (Zeny < 100*.@am) goto L_Trade_Missing;

    inventoryplace Lifestone, 1*.@am;

    delitem BugLeg, 3*.@am;
    delitem MaggotSlime, 5*.@am;
    set Zeny, Zeny - 100*.@am;

    getitem Lifestone, 1*.@am;
    goto L_TradeOK;

L_TradeOK:
    mes "";

    // Only grant Experience on first craft
    if (getq(TulimsharQuest_Lifestone) == 0) {
        setq TulimsharQuest_Lifestone, 1;
        getexp 84, 10;
    }

    // Second tier stuff
    if (ST_TIER == 8) {
        if (gettimetick(2) > QUEST_ELEVARTEMPO) {
            mesc l(".:: Second Tier Quest - Timed Out ::."), 1;
        } else {
            getexp 44, 0;
            ST_TIER=9;
            mes l("##9.:: Second Tier Quest - Time Remaining: @@ ::.", FuzzyTime(QUEST_ELEVARTEMPO,2,2));
        }
    }

    mesn;
    mesq l("These will do just fine.");
    next;
    mesn;
    mes l("Elanore casts a chant over the items, closes her hands, and vóila! A lifestone.");
    next;
    mesq l("I guess that you could use these lifestones to gain a regeneration effect, too, but I do not know how.");
    next;
    mes l("She smiles.");
    close;

L_Trade_Missing:
    mesn;
    mesq l("This is not what I asked for.");
    close;

OnInit:
    .@npcId = getnpcid(.name$);
    //setunitdata(.@npcId, UDT_HEADTOP, 2929);
    setunitdata(.@npcId, UDT_HEADMIDDLE, SorcererRobe);
    setunitdata(.@npcId, UDT_HEADBOTTOM, NPCEyes);
    setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots); // Boots
    setunitdata(.@npcId, UDT_HAIRSTYLE, 8);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 17);
    npcsit;

    .sex = G_FEMALE;
    .distance = 5;
    end;

}