summaryrefslogtreecommitdiff
path: root/npc/003-2/eistein.txt
blob: d8af9e3840a83a1c083bd20cafb966d29b9b477d (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
// TMW2 scripts.
// Author:
//    Saulc
//    Jesusalva
// Description:
//    Eistein rewards players for getting level landmarks.

003-2,35,34,0	script	Eistein	NPC_UKAR,{

    // Level, Reward{, Reward2}
    function is_level {
        if (BaseLevel >= getarg(0)) {
            getitem getarg(1),1;
            if (getarg(2, 0))
                getitem getarg(2),1;
            setq TulimsharQuest_Eistein, getq(TulimsharQuest_Eistein)+1;
            mes "";
            mesn;
            mesq l("Congrats you passed the level cap of @@! Here is a(n) @@, you deserve it.",getarg(0), getitemlink(getarg(1)));
            if (getarg(2,0))
                mesc l("Item obtained: @@", getitemlink(getarg(2)));
        } else {
            speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
                l("You are level @@/@@. Keep building levels, you need them!", BaseLevel, getarg(0));
        }
    }


    function quest_open {
        .@q = getq(TulimsharQuest_Eistein);
        switch (.@q) {
            case 0:
                is_level(25, BronzeGift); break;
            case 1:
                is_level(50, SilverGift, GraduationCap); break;
            case 2:
                is_level(75, GoldenGift, GraduationRobe); break;
            case 3:
                is_level(100, PrismGift, GraduationAlbum); break;
            case 4:
                is_level(125, SupremeGift); break;
            case 5:
                is_level(150, MysteriousFruit); break;
            default:
                mesn;
                mesq l("Waw, you are level @@! Many congratulations. If there were people like you, ukarania wouldn't have been destroyed...", BaseLevel);
                break;
        }
    }

    speech S_LAST_NEXT,
        l("Ah, welcome. Please, don't be afraid of my look, Saulc GM assigned me to here."),
        l("I'm Eistein, survivor from Ukarania. I reward brave adventurers who kill monsters, which plague our lands."),
        l("I'll give you a reward, in the name of Saulc, once you reach the following levels: 25, 50, 75, 100, 125 and 150.");
        do
        {
            select
                l("Interesting! can I be rewarded for my help?"),
                l("What about job levels and job experience?"),
                l("Quit");

            switch (@menu) {
                case 1:
                    quest_open;
                    break;
                case 2:
                    mesn; mesq l("Job levels already boosts all your status. It gives +1 on each status every 10 job levels."); next;
                    break;
            }
        } while (@menu != 3);

    closedialog;
    goodbye;
    close;

OnInit:
    .@npcId = getnpcid(.name$);
    setunitdata(.@npcId, UDT_HEADTOP, GraduationCap);
    setunitdata(.@npcId, UDT_HEADMIDDLE, SilkRobe);
    setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 26);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 0);
    npcsit;

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