summaryrefslogtreecommitdiff
path: root/npc/003-0-1/researcher.txt
blob: a923cdfcf03902efb735ffaec01577a9e1fa0b5a (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
// TMW2 Script
// Author:
//  Jesusalva
// Description:
//  Researcher - allows you to decrypt Ancient Blueprints (Ancient Lang. skill)

003-0-1,58,29,0	script	Researcher	NPC_BLACKALCHEMIST,{
    mesn;
    mesq l("I've mastered the art of reading ancient languages.");
    next;
    mesn;
    mesq l("For only @@ GP, I'll decrypt any ancient text file you have. Or you can learn how to read that yourself, for @@ GP.", .price, .learn);
    next;
    select
        l("I want you to decrypt something"),
        rif(!getskilllv(TMW2_ANCIENTLANGUAGES) && !ANCIENTLANGUAGEBOUNCER, l("I want to learn reading ancient languages")),
        l("Nothing, sorry.");
    switch (@menu) {
        case 1:
            if (Zeny < .price) {
                mesc l("You don't have enough GP."), 1;
                close;
            }

            mes b(l("Drag and drop an item from your inventory."));
            .@id = requestitem();

            // If ID is invalid
            if (.@id < 1) {
                mesc l("You give up.");
                close;
            }
            // No item, or bound item
            if (countitem(.@id) < 1 || checkbound(.@id)) {
                if (checkbound(.@id))
                    mesc l("You cannot part with this item!");
                else
                    mesc l("You give up.");
                close;
            }

            switch (.@id) {
                case AncientBlueprint:
                    Zeny-=.price;
                    delitem AncientBlueprint, 1;
                    MakeRandomBlueprint();
                    break;
                case DesertTablet:
                    mesn;
                    mesq l("Sorry, it looks like Saulc wrote on this stone. It is entirely illegible... for now.");
                    break;
                default:
                    mesn;
                    mesq l("Uhm, I don't think this item needs my skills.");
                    break;
            }
            break;
        case 2:
            if (Zeny < .learn) {
                mesc l("You don't have enough GP."), 1;
                close;
            }

            mesn;
            mesq l("Wait, it is not so simple as giving me money.");
            next;
            mesn;
            mesq l("What do you think learning is, magic?!");
            next;
            mesn;
            mesq l("What do you need to learn something besides money for tuitions fee? Time and Dedication.");
            next;
            Zeny-=.learn;
            ANCIENTLANGUAGEBOUNCER=61;
            mesn;
            mesq l("Do you see the professor on the next room? Learn to his boring speech for A WHOLE MINUTE. There are the materials for the class.");
            next;
            mesn;
            mesq l("If you pay attention, you'll learn the skill.");
            break;
    }
    close;

OnInit:
    .sex=G_MALE;
    .distance=5;
    .price=350;
    .learn=5000;
    end;
}