summaryrefslogtreecommitdiff
path: root/npc/functions/stat_reset.txt
blob: 4201865a8086c904073375a964c7b31d2adf3ded (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
function	script	StatReset	{


    @Cost = BaseLevel * 100;

    mes "[" + @npcname$ + "]";
    mes "\"I have come across a spell that will";
    mes "reset your status points.";
    mes "Normally this spell is expensive, but";
    mes "due to an unusual constellation of the";
    mes "stars I can cast it very cheaply!";
    mes "For you it will cost only "+@Cost+" gp.\"";
    next;
    menu
        "Reset my stats",L_Next,
        "Forget about it",L_Pass;

L_Next:
    if (Zeny<@Cost) goto L_NoMoney;
    goto L_Reset;


L_Reset:
    Zeny = Zeny-@Cost;
    resetstatus;

    mes "[" + @npcname$ + "]";
    mes "\"There you are.";
    mes "";
    mes "Good as new!\"";
    goto L_Return;

L_Pass:
    mes "[" + @npcname$ + "]";
    mes "\"Very well then, see you.\"";
    goto L_Return;

L_NoMoney:
    mes "[" + @npcname$ + "]";
    mes "\"Oh dear, the price cannot be bargained.";
    mes "";
    mes "Perhaps you can borrow from a friend?\"";
    goto L_Return;

L_Return:
    @Cost = 0;
    return;
}