summaryrefslogtreecommitdiff
path: root/npc/027-2/colin.txt
blob: ce4ad4b4c5976da629fc0502004d6e4da81b54c6 (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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
// TMW2 script.
// Author:
//    Saulc
//    Jesusalva
// Description:
//    Colin, of Destructive Magic Class.

027-2,28,23,0	script	Colin	NPC_PLAYER,{
    function basicMagic;
    function standardMagic;
    function advancedMagic;
    if (!MAGIC_LVL) goto L_NoMagic;
    mes l(".:: Destructive Magic Class ::.");
    mesc l("Specialized in destructive, magical skills.");
    next;
    mesn;
    mesc l("You have @@ magic skill points available.", sk_points());
    mesc l("Note: You can exchange 1 @@ for 3 @@", getitemlink(GemPowder), getitemlink(Quill)), 1;
    mes "";
    select
        l("Basic Magic"),
        l("Standard Magic"),
        l("Advanced Magic"),
        //l("Mastery Magic"),
        rif(countitem(GemPowder), l("Exchange Gempowder for Quill"));
    mes "";
    .@lv=@menu;
    do
    {
        switch (.@lv) {
            case 1:
                basicMagic();
                break;
            case 2:
                standardMagic();
                break;
            case 3:
                advancedMagic();
                break;
            case 4:
                inventoryplace Quill, 3;
                delitem GemPowder, 1;
                getitem Quill, 3;
                @menuret=0;
                break;
        }

        // Handle result
        mes "";
        if (@menuret) {
            if (!learn_magic(@menuret)) {
                mesc l("You do not meet all requisites for this skill."), 1;
                next;
            }
        } else {
            closeclientdialog;
        }

    } while (@menuret);
    close;

L_NoMagic:
    next;
    mesn;
    mesq l("You do not have enough magic power for these classes.");
    next;
    mesn;
    mesq l("Besides the Magic Council, Andrei Sakar have his own Mana Stone, but I doubt he would train the likes of you, or share his Mana Stone.");
    next;
    mesn;
    mesq l("Perhaps, in the city, someone knows rumors about Mana Stones and can teach you. Other than that, you're on your own.");
    close;

function basicMagic {
    if (MAGIC_LVL < 1) goto L_NoMagic;
    mes l(".:: Fire Arrow ::.");
    mesc l("Basic fire single target attack. May burn targets.");
    mes "";
    mes l(".:: Napalm Beat ::.");
    mesc l("Basic multi-target holy attack. Is actually weak.");
    mes "";
    mes l(".:: Magic Strike ::.");
    mesc l("Basic wind single target attack. Strong in overall.");
    mes "";
    mes l(".:: Frost Diver ::.");
    mesc l("Basic ice single target attack. May freeze targets.");
    mes "";
    mes l(".:: Meteor Strike ::.");
    mesc l("Basic earth single target attack. May stun targets.");
    mes "";
    menuint
        l("Fire Arrow"), TMW2_FIREARROW,
        l("Napalm Beat"), TMW2_NAPALMBEAT,
        l("Magic Strike"), TMW2_MAGICSTRIKE,
        l("Frost Diver"), TMW2_FROSTDIVER,
        l("Meteor Strike"), TMW2_METEORSTRIKE,
        l("Cancel"), 0;
    return;
}

function standardMagic {
    if (MAGIC_LVL < 2) goto L_NoMagic;
    mes l(".:: Fireball ::.");
    mesc l("Area of effect fire damage. May burn targets.");
    mes "";
    mes l(".:: Holy Light ::.");
    mesc l("Basic single target holy attack. Splashes in the nearby tiles.");
    mes "";
    mes l(".:: Lightning Bolt ::.");
    mesc l("Strong wind single target attack.");
    mes "";
    mes l(".:: Frost Nova ::.");
    mesc l("Basic ice area attack. May freeze targets.");
    mes "";
    mes l(".:: Meteor Shower ::.");
    mesc l("Basic earth area attack. May stun targets.");
    mes "";
    mes l(".:: Firewalk ::.");
    mesc l("Superior damage on enemies who walk over the fire.");
    mes "";
    menuint
        l("Fireball"), TMW2_FIREBALL,
        l("Holy Light"), TMW2_HOLYLIGHT,
        l("Lightning Bolt"), TMW2_LIGHTNINGBOLT,
        l("Frost Nova"), TMW2_FROSTNOVA,
        l("Meteor Shower"), TMW2_METEORSHOWER,
        l("Firewalk"), SO_FIREWALK,
        l("Cancel"), 0;
    return;
}

function advancedMagic {
    if (MAGIC_LVL < 4) goto L_NoMagic;
    mes l(".:: Armageddon ::.");
    mesc l("Huge area of effect fire damage. May burn targets.");
    mes "";
    mes l(".:: Judgment ::.");
    mesc l("Superior single target damage which splashes in area.");
    mes "";
    mes l(".:: Tempest ::.");
    mesc l("Strong wind area of effect attack.");
    mes "";
    mes l(".:: Nilfheim ::.");
    mesc l("Basic ice area attack. Freeze targets in a big area.");
    mes "";
    mes l(".:: Gaia Break ::.");
    mesc l("Destroys everything in a line (earth). Boosts allied forces DEF.");
    mes "";
    menuint
        l("Armageddon"), TMW2_ARMAGEDDON,
        l("Judgment"), TMW2_JUDGMENT,
        l("Tempest"), TMW2_TEMPEST,
        l("Nilfheim"), TMW2_NILFHEIM,
        l("Gaia Break"), TMW2_GAIABREAK,
        l("Cancel"), 0;
    return;
}


OnInit:
    .@npcId = getnpcid(.name$);
    setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
    setunitdata(.@npcId, UDT_HEADMIDDLE, SorcererRobe);
    setunitdata(.@npcId, UDT_HEADBOTTOM, JeansShorts);
    setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 21);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 20);

    .sex = G_MALE;
    .distance = 5;
    end;
}