summaryrefslogtreecommitdiff
path: root/npc/024-10/eldrin.txt
blob: bce65e06dfd0caaa651edbf13e3f62bccd02ecf2 (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
// TMW2 scripts.
// Authors:
//    Jesusalva
// Description:
//    Questmaker Handbook 14.0 - Frostia's Bounty House

024-10,33,30,0	script	Eldrin	NPC_ELF,{
    //.@q = getq(FrostiaQuest_Rydel);
    if (BaseLevel < 30) {
        mesc l("The elf seems busy. He ignores you.");
        close;
    }
    .@d=gettimeparam(GETTIME_DAYOFMONTH);
    mesn l("Eldrin, Taskmaster");
    mesq l("Hello, and welcome to Frostia bounty hunter guild.");
    next;
    mesn l("Eldrin, Taskmaster");
    mesq l("I have bounties for specific high level monsters as well for extermination. Do note mobs killed in Heroes Hold may not count.");
    next;
    mesn l("Eldrin, Taskmaster");
    mesq l("Be careful that they may be anywhere in the world, and the same rules as Tulimshar Guard House apply! So, are you here to apply or to report back?");
    mesc l("Protip: All quests expire at 00:00 server time, be sure to finish AND report back before that!");
    next;
    // Borrowed from Arkim Code
    mesc l("Time remaining to report completion: ")+FuzzyTime($@ARKIM_TIMER+86400), 1;

    select
        l("I want a MODERATE (Lv 50~70) task!"),
        l("I want a EXPERT (Lv 70~100) task!"),
        l("I want a MASTER (Lv 100+) task!"),
        l("I want a BOSS task!"),
        l("It was nice seeing you.");
    mes "";
    switch (@menu) {
        case 1:
            .@q1=getq(General_MobHunting5);
            .@q2=getq2(General_MobHunting5);
            .@q3=getq3(General_MobHunting5);
            .@q=General_MobHunting5;
            .@lv=9;
            goto L_QuestMaster;
        case 2:
            .@q1=getq(General_MobHunting6);
            .@q2=getq2(General_MobHunting6);
            .@q3=getq3(General_MobHunting6);
            .@q=General_MobHunting6;
            .@lv=15;
            goto L_QuestMaster;
        case 3:
            .@q1=getq(General_MobHunting7);
            .@q2=getq2(General_MobHunting7);
            .@q3=getq3(General_MobHunting7);
            .@q=General_MobHunting7;
            .@lv=24;
            goto L_QuestMaster;
        case 4:
            .@q1=getq(General_MobHunting8);
            .@q2=getq2(General_MobHunting8);
            .@q3=getq3(General_MobHunting8);
            .@q=General_MobHunting8;
            .@lv=50;
            goto L_QuestMaster;
    }
    closeclientdialog;
    goodbye();
    close;

L_QuestMaster:
    // It's a new day, so we must generate a new quest!
    if (.@q1 != .@d) {
        .@q1=.@d;
        if (.@lv == 9) {
            .@q2=any(EarthFairy, FireFairy, WaterFairy, WindFairy, PoisonFairy, BlackScorpion, MountainSnake, ForestMushroom, GoldenScorpion, Yeti, WickedMushroom, Archant, Scar, Crafty);
        } else if (.@lv == 15) {
            .@q2=any(Crafty, Forain, GreenDragon, Troll, Moonshroom, Terranite, JackO, BlackMamba, Centaur, GoboBear);
        } else if (.@lv == 24) {
            .@q2=any(TerraniteProtector, EliteDuck, Reaper, NightmareDragon, NightmareDragon, PinkieSuseran, PinkieMaximus);
        } else if (.@lv == 50) {
            .@q2=any(Tengu, Tipiu, EvilScythe, GiantCaveMaggot, SpiderQueen, TerraniteKing, PinkieEmperor, Yetifly, YetiKing);
        } else {
            Exception("Bad setting for GMH.LV: "+.@lv, RB_DEFAULT|RB_SPEECH|RB_ISFATAL);
        }
        setq .@q, .@q1, .@q2, 0;
    }

    // Maybe there is no monster to kill
    if (!.@q2) {
        mesn l("Eldrin, Taskmaster");
        mesq l("You've already completed this quest today. Try again tomorrow.");
        close;
    }

    // You only need to slay one boss
    if (.@q3 && .@lv == 50)
        .@q3 += 50;

    // Maybe you finished the quest?
    // Reuses everything from Kreist
    if (.@q3 >= 50) {
        mesn l("Eldrin, Taskmaster");
        mesq l("Good job, you've killed the @@ @@ and reported back in time!", 50, getmonsterlink(.@q2));
        next;
        inventoryplace MercBoxA, 1;
        if (MERCENARY_DAILYQUEST == 100) {
            inventoryplace BountyHunterHelmet, 1;
            getitem BountyHunterHelmet, 1;
        }
        mesn l("Eldrin, Taskmaster");
        mesq l("It's not much of a reward, but doesn't it feels great to help others in need?! HAHAHA!");
        .@overkill=.@q3-50;
        Zeny+=.@lv*(42+MERCENARY_DAILYQUEST);
        // Raise LV according to monster level
        .@lv+=getmonsterinfo(.@q2, MOB_LV)+MERCENARY_DAILYQUEST*11/10;
        getexp BaseLevel*.@lv, .@lv+.@overkill;
        setq2 .@q, 0;
        setq3 .@q, 0;
        MERCENARY_DAILYQUEST+=1;
        if (MERCENARY_DAILYQUEST % 5 == 0) {
            getitem MercBoxA, 1;
        }
        close;
    }

    mesn l("Eldrin, Taskmaster");
    if (.@lv != 50)
        mesq l("So, please kill @@/@@ @@ for us and make the world a safer place!", .@q3, 50, getmonsterlink(.@q2));
    else
        mesq l("So, please kill a %s for us and make the world a safer place!", getmonsterlink(.@q2));
    close;

OnInit:
    .@npcId = getnpcid(.name$);
    setunitdata(.@npcId, UDT_HEADBOTTOM, CottonTrousers);
    setunitdata(.@npcId, UDT_HEADMIDDLE, Chainmail);
    setunitdata(.@npcId, UDT_HEADTOP, VikingHelmet);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 7);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 11);

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