summaryrefslogtreecommitdiff
path: root/npc/005-7/nurse.txt
blob: 9f9847c3ed728734378dd0b501e8ba56d57e4a2b (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
// TMW-2 Script
// Author:
//    Jesusalva
//    Crazyfefe

005-7,41,30,0	script	Candor's Nurse	NPC_FEMALE,{

    //if (sc_check(SC_POISON)) goto L_CurePoison;

    mesn;
    mesq lg("Hello, dear! I love @@, could you bring me some? They're sooooo sweet and delicious!","Hello, dear! I love @@, could you bring me some? They're sooooo sweet and delicious!", getitemlink(Candy) );
    mesq l("Ah, I can also cure you, if you need.");

    do
        {
        select
            l("Please heal me!"),
            rif(countitem(Candy) > 0, l("Here, I have a candy!")),
            l("I'm fine, no worries...");

        switch (@menu)
        {
            case 1:
                goto L_Heal;
                break;
            case 2:
                goto L_Help;
                break;
            case 3:
                goto L_Close;
                break;
        }
        } while (@menu != 3);

L_Help:
    mes "";
    mesn;

    if (countitem(Candy) == 0)
    {
        mesq l("You don't seem to have any @@ with you!", getitemlink(.Item));
        close;
    }
    delitem .Item, 1;
    mesq l("Thanks a lot!");
    if (getq(CandorQuest_Nurse) == 0)
    {
        getexp 20,0;
        Zeny = Zeny + 200;
        setq CandorQuest_Nurse, 1;
        close;
    }
    if (getq(CandorQuest_Nurse) == 1)
    {
        getexp 10,0;
        Zeny = Zeny + 100;
        setq CandorQuest_Nurse, 2;
        close;
    }
    if (getq(CandorQuest_Nurse) == 2)
    {
        getexp 5,0;
        Zeny = Zeny + 50;
        setq CandorQuest_Nurse, 3;
        close;
    }
    getexp 5,0;
    Zeny = Zeny + 25;
    close;

L_Heal:
    mes "";
    mesn;
    .@temp = rand(4);
    if(.@temp == 1) goto L_Heal2;
    if(.@temp == 2) goto L_Heal3;
    if(.@temp == 3) goto L_Heal4;
    goto L_Heal1;


L_Heal1:
    mesq l("You don't look too well; let me treat your wounds.");
    mes "";
    goto L_Menu;

L_Heal2:
    mesq l("I will make quick work of your wounds.");
    mes "";
    goto L_Menu;

L_Heal3:
    mesq l("Need a healing?");
    mes "";
    goto L_Menu;

L_Heal4:
    mesq l("Sometimes you just need to run from battle.");
    mes "";
    goto L_Menu;

L_Menu:
    .@price=(MaxHp-Hp)/5;
    .@price=.@price+10;
    if (BaseLevel <= 15) .@price=(.@price/10);
    else if (BaseLevel <= 20) .@price=(.@price/5);
    else .@price=(.@price/2);
    mesq l("For you, it'll be @@ GP.", .@price);
    mes "";
    menu
        rif(Zeny >= .@price, l("Please heal me!")), L_Heal_L,
        l("Another time, maybe."), L_Close;


L_Heal_L:
    mes "";
    set Zeny, Zeny - .@price;
    sc_end(SC_POISON);
    sc_end(SC_SLOWPOISON);
    percentheal 100,100; // We can also use "recovery(<account id>)"
    mesn;
    @temp = rand(1,4);
    if(@temp == 1)    mesq l("Here you go!");
    if(@temp == 2)    mesq l("Painless, wasn't it?");
    if(@temp == 3)    mesq l("You should be more careful.");
    if(@temp == 4)    mesq l("Much better, right?!");
    goto L_Close;


L_Close:
    close;

OnInit:
    .@npcId = getnpcid(0, .name$);
    // I got lazy and NPC is behind a desk, so only a "shirt"...
    setunitdata(.@npcId, UDT_HEADMIDDLE, 1313);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 12);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 14);

    // quest setup
    .Item = Candy;

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

}