summaryrefslogtreecommitdiff
path: root/npc/027-0/emma.txt
blob: a44aa570e5d921f3ad3c61c1608950d48578ba01 (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
// TMW2 Script
// Author:
//  Jesusalva
// Description:
//  Emma is Enrique's wife

027-0,88,26,2	script	Emma	NPC_DARK_SORCERER_F,{
    mesn;
    mesq l("Hello. I am Emma, Enrique's wife.");
    mesc l("Your current scholar rank: %s (%s Research Points)",
            academicrank(), fnum(MAGIC_RP));
    if (!MAGIC_LVL)
        close;
    next;
    mesn;
    mesq l("I'm currently doing tutorship for students who are... falling behind %%p");
    next;
    mesn;
    mesq l("Do you need the extra credit?");
    mesc l("Tutorship will give you Research Points."), 1;
    mesc l("You should not leave this room."), 1;
    mesc l("Tutorship is NOT the most effective way."), 1;
    next;
    mesq l("Do you need the extra credit?");
    mesc l("Cost: %d GP/min", .cost);
    mesc l("Gain: %d RP/min", .gain);
    if (@emmapro)
        mesc l("Warning: If you are taking an advanced class, it will canceled."), 1;
    menuint
        l("I'm fine, thanks"), 0,
        l("5 minutes"), 5,
        l("10 minutes"), 10,
        l("15 minutes"), 15,
        l("30 minutes"), 30,
        l("1 hour"), 60,
        l("2 hours"), 120,
        rif(abizit() == 5 && MAGIC_LVL > 3, l("Show me something more advanced!")), -1;
    mes "";
    if (@menuret < 0) {
        goto L_Advanced;
    }
    if (!@menuret) {
        mesn;
        mesq l("Then I hope you can keep your grades high, hmm hmm!");
        close;
    }
    if (Zeny < .cost*@menuret) {
        mesn;
        mesq l("Ara ara? You do not have enough money with you!");
        close;
    }
    Zeny-=.cost*@menuret;
    addtimer2(60000, .name$+"::OnTick");
    @emmatick=max(@emmatick, gettimetick(2)) + @menuret*60;
    @emmapro=false;
    mesn;
    mesq l("Hmm hmm! Then, let's begin.");
    mesc l("Note: You can increase the time by talking to Emma again.");
    close;

L_Advanced:
    mesn;
    mesq l("I actually have a special class for those with perfect magical control like you.");
    next;
    mesq l("Do you need the extra credit?");
    mesc l("Cost: %d GP/min", .cost*15);
    mesc l("Gain: %d RP/min", .gain*10);
    menuint
        l("I've changed my mind."), 0,
        l("5 minutes"), 5,
        l("10 minutes"), 10,
        l("15 minutes"), 15,
        l("30 minutes"), 30,
        l("1 hour"), 60,
        l("2 hours"), 120;
    mes "";
    if (!@menuret) {
        mesn;
        mesq l("Then I hope you can keep your grades high, hmm hmm!");
        close;
    }
    if (Zeny < .cost*@menuret*15) {
        mesn;
        mesq l("Ara ara? You do not have enough money with you!");
        close;
    }
    Zeny-=.cost*@menuret*15;
    addtimer2(60000, .name$+"::OnTick");
    if (!@emmapro)
        @emmatick=0;
    @emmatick=max(@emmatick, gettimetick(2)) + @menuret*60;
    @emmapro=true;
    mesn;
    mesq l("Hmm hmm! Then, let's begin.");
    close;

OnTick:
    // Time out
    if (@emmatick < gettimetick(2)) {
        npctalk3 l("Enough for now. Let's rest, shall we?");
        @emmapro = 0;
        end;
    }
    // Changed maps
    if (getmap() != "027-0")
        end;

    .@up=.gain*(@emmapro ? 10 : 1);
    MAGIC_RP+=.@up;
    dispbottom l("Research Points +%d", .@up);
    addtimer2(60000, .name$+"::OnTick");
    end;

OnInit:
    .distance = 4;
    .sex = G_FEMALE;
    .cost = 4500;
    .gain = 15;
    end;
}