summaryrefslogtreecommitdiff
path: root/npc/015-3/hermit.txt
blob: 912185fbc6161cf91fc5e6d4f4cfd2abd8a87d73 (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
// TMW2 scripts.
// Authors:
//    Jesusalva
// Description:
//    Heremit
// Variables:
//    $ARKIM_ST
//      How many Bat Teeth/Wings were given
//    q1
//      Controls your own progress helping Arkim - Unused, might give place to some real quest later.
//    q2
//      Controls your own progress helping Arkim - Items today
//    q3
//      Controls your own progress helping Arkim - Your timer

015-3,170,169,0	script	Arkim	NPC_TERRY,{
    mesn;
    mesq lg("Hello, young girl...", "Hello, young boy...");
    next;

L_Loop:
    .@q1=getq(HurnscaldQuest_Arkim);
    .@q2=getq2(HurnscaldQuest_Arkim);
    .@q3=getq3(HurnscaldQuest_Arkim);
    mesn;
    mesq l("I am doing a great research with Bats, and thus far I collected @@ Bat Wings and Teeths.", $ARKIM_ST);
    next;    
    if (.@q3 > $@ARKIM_TIMER) goto L_Timer;
    if (.@q3 < $@ARKIM_TIMER-(60*60*24)) setq3 HurnscaldQuest_Arkim, $@ARKIM_TIMER-(60*60*24); // Globally-bound timed quest
    if (.@q2 >= 12) goto L_Timer;
    select
        rif(countitem(BatWing) >= 1, l("Donate a Bat Wing")),
        rif(countitem(BatTeeth) >= 1, l("Donate a Bat Teeth")),
        l("I better leave this crazy man to his ordeals..."),
        l("Had you any breakthrough?");
    mes "";

    switch (@menu) {
        case 1:
            delitem BatWing, 1;
            getexp 25, 0;
            Zeny=Zeny+50;
            break;
        case 2:
            delitem BatTeeth, 1;
            getexp 35, 0;
            Zeny=Zeny+75;
            break;
        case 3:
            close;
            break;
        case 4:
            goto L_Research;
            break;
    }
    $ARKIM_ST=$ARKIM_ST+1;
    setq2 HurnscaldQuest_Arkim, .@q2+1;
    goto L_Loop;

L_Timer:
    mesn;
    mesq l("You've helped me plenty. Please come back in @@", FuzzyTime($@ARKIM_TIMER+(60*60*24),2,2));
    close;

// TODO
L_Research:
    mesn;
    mesq l("Let me see... The more Wings and Teethes I collect, the more my research shall advance.");
    next;
    select
        l("Thanks."),
        rif($ARKIM_ST >= 1400, l("Cursed Arrows")),
        rif($ARKIM_ST >= 1800, l("Poison Arrows")),
        rif($ARKIM_ST >= 1200, l("Piberries Infusion")),
        rif($ARKIM_ST >= 1600, l("Fate's Potion")),
        rif($ARKIM_ST >= 2000, l("Clotho Liquor")),
        rif($ARKIM_ST >= 2700, l("Lachesis Brew")),
        rif($ARKIM_ST >= 3600, l("Atropos Mixture")),
        rif($ARKIM_ST >= 4500, l("Dark Desert Mushroom"));
    mes "";
    mesn;

    switch (@menu) {
    case 1:
        mesq l("Good bye!");
        close;
        break;
    case 2:
        mesq l("The @@ are specially dangerous, and archers love them.", getitemlink(CursedArrow));
        next;
        mesn;
        mesq l("These are being crafted by Alan.");
        break;
    case 3:
        mesq l("The @@ are specially dangerous, and archers love them.", getitemlink(PoisonArrow));
        next;
        mesn;
        mesq l("These are being crafted by Alan.");
        break;
    case 4:
    case 5:
    case 6:
    case 7:
    case 8:
        mesq l("The @@ is a powerful healing drink.", getitemlink(PiberriesInfusion-4+@menu));
        next;
        mesn;

        switch (@menu) {
            case 4:
               mesq l("@@ is developing these potions.", "Wyara"); break;
            default:
               mesq l("@@ is developing these potions.", "Jesusalva"); // TODO: Fate, Clotho, Lachesis and Atropos
               break;
        }

        break;
    case 9:
        mesq l("Ah! @@. A very rare drop!", getitemlink(DarkDesertMushrooom));
        next;
        mesn;
        mesq l("You can find it in the bandit market for just 50,000 GP.");
        break;

    }
    next;
    goto L_Research;

OnInit:
    .sex=G_MALE;
    .distance=5;
    // No end; on purpose

OnHour00:
    $@ARKIM_TIMER=gettimetick(2);
    end;

}