summaryrefslogtreecommitdiff
path: root/npc/025-1/commander.txt
blob: 2b9b93b09b98e40e43e05cce9269c0899875a486 (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
// TMW2 scripts.
// Author:
//    Jesusalva
// Description:
//   Leads the Alliance in the Fortress Town

025-1,96,26,0	script	Commander Povo	NPC_BRGUARD_SPEAR,{
    mesn;
    mesq l("Greetings %s, I am %s, the man in charge for the Alliance ocupation of Fortress Town.", (strcharinfo(0) == $MOST_HEROIC$ ? lg("Hero") : lg("Adventurer")), .name$);
    next;

    // Endtrail
    mes "";
    mesc l("@@ You need to wait further releases to continue this quest!", b(l("WARNING:"))), 1;
    close;

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

/////////////////////////////////////////////////////////////////////////////////
025-1,59,86,0	script	Commander Cadis	NPC_BRGUARD_SWORD,{
    function cadisReward;
    mesn;
    mesq l("Greetings %s, I am %s, I am in charge of monster extermination.", (strcharinfo(0) == $MOST_HEROIC$ ? lg("Hero") : lg("Adventurer")), .name$);
    next;
    // Check for ongoing quests
    if (getq(FortressQuest_SlimeHunter) == 1)
        goto L_SlimeHunter;
    mesn;
    mesq l("I have extremely difficult quests for you; They are more painful than a Grand Hunter Quest, because I don't admit wimps fighting with me.");
    next;
    mesn;
    mesq l("You will be rewarded by me shall you succeed in any of the tasks.");
    mesc l("%s: Once accepted, you must complete them before taking another one.", b(l("WARNING")));
    // Well, we *could* make it more GHQ-like but lazy devs are lazy.
    next;
    do
    {
        select
            l("I'm not interested."),
            rif(!getq(FortressQuest_SlimeHunter), l("The Great Slime Hunt"));
        mes "";
        switch (@menu) {
        case 1:
            close;
        case 2:
            mesn;
            mesq l("You'll have to slay %s slimes for me! I don't care which ones, just SLAY THEM!", fnum(.million));
            next;
            select
                l("Accept"),
                l("Reject");
            mes "";
            if (@menu == 1) {
                setq1 FortressQuest_SlimeHunter, 1;
                mesn;
                mesq l("Then get to work already!");
                close;
            }
            break;
        }
    }
    close;

L_SlimeHunter:
    cadisReward(FortressQuest_SlimeHunter);
    close;

function cadisReward {
    .@kill=getq2(getarg(0));
    .@rewa=getq3(getarg(0));
    mesn;
    mesq l("Thus far you've slain %s/%s %s for me!", fnum(.@kill), fnum(.million), b(l("Slimes")));
    inventoryplace NPCEyes, 4, Iten, 2;

    // ***** ***** *****   Rewards   ***** ***** *****
    if (.@kill >= .tier1 && .@rewa < 1) {
        mesc l("Milestone reached: %s kills", fnum(.tier1));
        setq3 getarg(0), 1;
        getitem MercenaryBoxsetDD, 3;
        getitem SacredImmortalityPotion, 2;
        getitem MercenaryBoxsetE, 1;
    }

    if (.@kill >= .tier2 && .@rewa < 2) {
        mesc l("Milestone reached: %s kills", fnum(.tier2));
        setq3 getarg(0), 2;
        getitem MercenaryBoxsetEE, 1;
        getitem MagicApple, 1;
        getitem EquipmentBlueprintE, 1;
        getitem IridiumOre, 2;
    }

    if (.@kill >= .tier3 && .@rewa < 3) {
        mesc l("Milestone reached: %s kills", fnum(.tier3));
        setq3 getarg(0), 3;
        getitem MercenaryBoxsetEE, 2;
        getitem StrangeCoin, 50;
        getitem EarthPowder, 2;
        getitem PlatinumOre, 1;
    }

    if (.@kill >= .tier4 && .@rewa < 4) {
        mesc l("Milestone reached: %s kills", fnum(.tier4));
        setq3 getarg(0), 4;
        getitem MercenaryBoxsetEE, 3;
        getitem ElixirOfLife, 5;
        getitem EarthPowder, 2;
        getitem PlatinumOre, 1;
    }


    // Quest complete
    if (.@kill >= .million) {
        mesc b(l("Quest complete: Congratulations!")), 3;
        setq1 getarg(0), 2;
        setq3 getarg(0), 5;
        getitem MercenaryBoxsetEE, 5;
        getitem StrangeCoin, 100;
        getitem EarthPowder, 3;
        getitem any(LuckFruit, DexterityFruit, IntelligenceFruit, VitalityFruit, AgilityFruit, StrengthFruit), 1;
        getitem MysteriousFruit, 1;
        //getitem PrismGift, 1;
    }
    return;
}

OnInit:
    .sex = G_MALE;
    .distance = 5;
    .million = 1000000;

    .tier1 =  10000;
    .tier2 =  50000;
    .tier3 = 250000;
    .tier4 = 500000;
    end;
}

// Commander Cadis Questcheck
function	script	CadisQuestCheck	{
    if (!playerattached())
        return;

    .@mobId=getarg(0, killedrid);

    if (getq(FortressQuest_SlimeHunter) == 1) {
        // Register the kill
        if (compare("slime", strtolower(strmobinfo(1, .@mobId))))
            setq2 FortressQuest_SlimeHunter, getq2(FortressQuest_SlimeHunter)+1;
        // Report every 1000 kills
        if (getq2(FortressQuest_SlimeHunter) % 1000 == 0)
            dispbottom l("Cadis : You have slain %s slimes out of a million.", fnum(getq2(FortressQuest_SlimeHunter)));
    }

    return;
}