summaryrefslogtreecommitdiff
path: root/npc/011-1/manastone.txt
blob: 9dd19feea2656c322f5de006d036ee70200255d3 (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
// TMW2 Script
// Author:
//  Jesusalva
// Description:
//  The last Mana Stone in the whole world, which is not owned by the Magic Council
//  or the Monster King.
//  It actually hates (or rather, fears) everybody, and is not always willing to
//  talk with people. May hide itself within the walls during these occasions.
//  It may not hate some very specific things which are lore-related.
//
//  Notes: During sieges, Monster King and Human Council apparitions, it may hide
//  itself.

011-1,0,0,0	script	Mana Stone	NPC_MANA_STONE,{

    if (BaseLevel < 40) goto L_NotWorthy;
    mesn;
    mes l("The mighty Mana Stone does not reacts against you.");
    mes l("Although this particular one seems to hate everyone and everything, it recognizes your strength.");
    mes l("If you fell ready, perhaps you should touch it?");
    mes "";
    menu
        l("Touch it!"), L_Level,
        l("Take it!"), L_NotWorthy2,
        l("Break it!"), L_NotWorthy2,
        l("Leave it alone!"), -;
    close;


L_NotWorthy:
    percentheal -70+BaseLevel, -100+BaseLevel;
    npctalk3 l("You are not worthy!");
    if (readparam(Sp) != readparam(MaxSp))
        dispbottom l("I must have full MP to touch it... Which I don't.");
    else
        dispbottom l("I should train my intelligence, and level up, both my base as my Job Level.");
    end;

L_Level:
    if (MAGIC_LVL == 0 && readparam(bInt) >= 30 && BaseLevel >= 40 && JobLevel >= 10 && readparam(Sp) == readparam(MaxSp)) goto L_LevelUp;
    if (MAGIC_LVL == 1 && readparam(bInt) >= 45 && BaseLevel >= 60 && JobLevel >= 25 && readparam(Sp) == readparam(MaxSp)) goto L_LevelUp;
    if (MAGIC_LVL == 2 && readparam(bInt) >= 60 && BaseLevel >= 80 && JobLevel >= 40 && readparam(Sp) == readparam(MaxSp)) goto L_LevelUp;

    // Everything below this line is garbage
    if (MAGIC_LVL == 3 && readparam(bInt) >= 75 && BaseLevel >= 100 && JobLevel >= 55 && readparam(Sp) == readparam(MaxSp)) goto L_LevelUp;
    if (MAGIC_LVL == 4 && readparam(bInt) >= 90 && BaseLevel >= 120 && JobLevel >= 70 && readparam(Sp) == readparam(MaxSp)) goto L_LevelUp;
    if (MAGIC_LVL == 5 && readparam(bInt) >= 105 && BaseLevel >= 140 && JobLevel >= 85 && readparam(Sp) == readparam(MaxSp)) goto L_LevelUp;
    if (MAGIC_LVL == 6 && readparam(bInt) >= 120 && BaseLevel >= 160 && JobLevel >= 100 && readparam(Sp) == readparam(MaxSp)) goto L_LevelUp;
    if (MAGIC_LVL >= 7) npctalk3 l("You already got all power I could grant you!");
    if (is_gm()) percentheal -20, -50;
    if (MAGIC_LVL >= 7 || is_gm()) close;

L_NotWorthy2:
    if (is_gm()) movenpc(.name$, rand(200), rand(200));
    if (is_gm()) close;
    percentheal -20, -50;
    npctalk3 l("You are not worthy!");
    if (MAGIC_LVL == 0)
        dispbottom l("I should train my intelligence, have full MP, and don't neglect even Job Level.");
    end;

L_LevelUp:
    mes "";
    mes l("A great rush of mana flows though you.");
    if (!MAGIC_LVL) mes l("Magic Power is granted to you, but you die from it.");
    if (MAGIC_LVL) mes l("More Magic Power is granted to you, but you die from it.");
    MAGIC_LVL = MAGIC_LVL+1;
    // Magic Numbers work better
    getexp readparam(NextBaseExp)*771/1000, readparam(NextJobExp)*400/1000;
    // Non-magic numbers work bad
    //getexp readparam(NextBaseExp)*getbattleflag(death_penalty_base)/1000, readparam(NextJobExp)*getbattleflag(death_penalty_job)/1000;
    percentheal -100, -100;
    close;

OnInit:
    movenpc .name$, rand(200), rand(200);
    .sex = G_OTHER;
    .distance = 6;
    end;

OnClock0030:
OnClock0120:
OnClock0210:
OnClock0300:
OnClock0450:
OnClock0540:
OnClock0630:
OnClock0720:
OnClock0810:
OnClock0900:
OnClock1050:
OnClock1140:
OnClock1230:
OnClock1320:
OnClock1410:
OnClock1500:
OnClock1650:
OnClock1740:
OnClock1830:
OnClock1920:
OnClock2010:
OnClock2100:
OnClock2250:
OnClock2340:
    npctalk "Those who are worthy, may get my magic. For the others, death awaits!";
    movenpc .name$, rand(200), rand(200);
    end;

}