summaryrefslogtreecommitdiff
path: root/npc/003-1/eistein.txt
blob: 2b90de81cd3a2f7e0764acd00d1844455eaa933b (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
// TMW2 scripts.
// Author:
//    Saulc
// Variables:
//    0    CandorQuest_Eistein
// Values:
//    Eistein reward for free player over level 50 by a graduation cap, 




003-1,91,144,0	script	Eistein	NPC_FEMALE,{

    .reward = GraduationCap;
    
    function quest_completed{
        speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
            l("I hope you are proud of your @@ ",getitemlink(.reward));
            close;
    }

    function quest_open {
        if(BaseLevel >= 50)
        {
            speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
                l("Congrats you passed the cap of the level 50! Here is your @@, you deserve it.",getitemlink(.reward));
            getitem .reward,1;
            setq TulimsharQuest_Eistein, 1;
            close;
        }
        else 
        {
            speech S_FIRST_BLANK_LINE,
                l("i can't reward a weak adventurer like you, Come back later.");
            close;
        }
    }

    function quest_started {
        speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
            l("Oh, Welcome then.");
        speech S_LAST_NEXT,
            l("I'm Eistein, I reward brave adventurers who kill monsters who plague our lands.");
        do
        {
        select
            l("Interessing can I be rewarded for my help?"),
            menuaction(l("Quit"));

        switch (@menu)
        {
            case 1:
                quest_open;
                break;
        }
    } while (@menu != 2);
    }
   
    do
    {
        .@chest = getq(TulimsharQuest_Eistein);
        if (.@chest == 1)
            goto quest_completed;
        select
            rif(.@chest == 0,
            l("Hello, can I be rewarded for my help?")),
            menuaction(l("Quit"));

        switch (@menu)
        {
            case 1:
                quest_started;
                break;
        }
    } while (@menu != 2);

    closedialog;
    goodbye;
    close;

OnInit:
    .@npcId = getnpcid(0, .name$);
    setunitdata(.@npcId, UDT_HEADTOP, TerraniteArmor);
    setunitdata(.@npcId, UDT_HEADMIDDLE, RaidTrousers);
    setunitdata(.@npcId, UDT_HEADBOTTOM, NPCEyes);
    setunitdata(.@npcId, UDT_WEAPON, CandorBoots); // Boots
    setunitdata(.@npcId, UDT_HAIRSTYLE, 19);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 16);

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