summaryrefslogtreecommitdiff
path: root/npc/004-2/mirio.txt
blob: 672919f45ac4cc98187d1a558a2eecf107cf36de (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
// TMW2 scripts.
// Authors:
//    Jesusalva
// Description:
//    Part of Speed Run Quest
// Structure:
//    HalinarzoQuest_Speed( state, time, bonus )

004-2,146,115,0	script	Mirio	NPC_INDIGENOUS_YOUNG,{
    function neutral;
    function naked;
    function disarmed;
    function hungry;
    function speed;
    function slow;
    .@q = getq(HalinarzoQuest_Speed);
    .@t = getq2(HalinarzoQuest_Speed);
    .@b = getq3(HalinarzoQuest_Speed);
    if (BaseLevel < 40) neutral();
    if (getequipid(EQI_HEAD_MID) < 1) naked();
    if (getequipid(EQI_HEAD_TOP) < 1) naked();
    if (getequipid(EQI_HAND_R) < 1) disarmed();
    if (getequipid(EQI_HAND_L) < 1) disarmed();
    if (.@q <= 0) hungry();
    if (.@q == 1) speed();
    neutral();
    close;

function neutral {
    mesn;
    mesq l("Howdy! Pachua and I scout this canyon to protect our clan. I acknowledge only those whom are fast like the wind! I would love to challenge you for a race... But not today.");
    close;
}

function naked {
    mesn;
    mesq l("...I know it is hot in this desert, but if you don't wear some armor and a hat, monsters will get to you. Really harsh, nowadays.");
    close;
}

function disarmed {
    .@pn$ = lg("girl", "dude");
    mesn;
    mesq l("...%s, as far as you should be concerned, this is an hostile land and I'm not your friend. You should use a weapon and a shield if possible. Never trust strangers, specially if they look like an assassin... exactly like me.", .@pn$);
    close;
}

function slow {
    mesn;
    mesq l("...Try allocating some points in agility before we continue. I think %d should be suffice.", 40);
    close;
}

function hungry {
    .@pn$ = lg("gal", "pal");
    mesn;
    mesq l("Howdy, partner! Man, you have no idea how I'm hungry. Been scouting this canyon for weeks, under the scorching sun, and there's only snake meat to eat... I'm get tired of this repulsive stuff.");
    next;
    mesn;
    mesq l("So let's strike a deal, bring me %d %s, %d %s, %d %s, and a %s. I'll reward you, promise.",
           10, getitemlink(LettuceLeaf),
            5, getitemlink(Cheese),
            2, getitemlink(TonoriDelight),
            getitemlink(HalfCroconut));
    next;
    select
        l("Sure, I'll be back."),
        l("I have everything you asked me.");
    mes "";
    if (@menu == 1) closeclientdialog;
    if (@menu == 2) {
        if (countitem(LettuceLeaf)   < 10 ||
            countitem(Cheese)        < 5 ||
            countitem(TonoriDelight) < 2 ||
            countitem(HalfCroconut)  < 1) {
            mesc l("A dagger is stuck to your heart."), 1;
            mesn;
            mesq l("Told ya, %s, should know better than to mess with an... assassin!", .@pn$);
            percentheal -100, 0;
            close;
        }
        inventoryplace CaveSnakeSkin, 1, SnakeSkin, 1;
        delitem LettuceLeaf, 10;
        delitem Cheese, 5;
        delitem TonoriDelight, 2;
        delitem HalfCroconut, 1;
        getitem SnakeSkin, 1;
        getitem CaveSnakeSkin, 1;
        setq HalinarzoQuest_Speed, 1;
        mesn;
        mesq l("Ah, good. You didn't even bother poisoning it? Hahah, that's great, %s! Here is a couple skins I had lying around, may be useful.", .@pn$);
        next;
        mesn;
        mesq l("How about this, I can teach you how to be a tiny bit faster, so you can use heavier armor. I'll even give you a discount. Give it some thought, come back to me after you make up your mind.");
    }
    close;
}

function speed {
    if (readparam2(bAgi) < 40) speed();
    mesn;
    mesq l("Have you thought on my proposal? I'll only charge you %d GP or a %s for each attempt made.", .price, getitemlink(.alt));
    close;
}

OnInit:
    .distance = 4;
    .sex = G_MALE;
    .price = 320;
    .alt = TonoriDelight;
    end;
}