summaryrefslogtreecommitdiff
path: root/npc/014-3/fountain.txt
blob: bfe9b650703ecf8e266910ef23c997b0e72ca385 (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
// TMW-2 Script
// Author:
//    Saulc
//    Jesusalva
// Description:
//    Hurnscald doesn't have a well

014-3,151,117,0	script	Fountain#Hurns	NPC_NO_SPRITE,{
    if (ST_TIER == 5 && gettimetick(2) < QUEST_ELEVARTEMPO) goto L_Tier2;

    mes col("There is fresh water here. I could use it to fill a bottle.", 9);
    mes col("But I probably should not do it. It might be poisoned!", 9);
    close;

    // TODO FIXME: We don't have a "Hurnscald" water, and we might add
    // Mahed or Mahad, another well master (Mehoud? Muhoud?)
    input .@count;

    if (.@count == 0)
        close;
    .@Cost = .@count * .COST_PER_BOTTLE;
    .@empty = countitem("EmptyBottle");

    if (.@empty < .@count)
        goto L_NotEnoughBottles;
    if (Zeny < .@Cost)
        goto L_NotEnoughMoney;
    getinventorylist;
    inventoryplace BottleOfTonoriWater, .@count;

    Zeny=Zeny-.@Cost;
    delitem "EmptyBottle", .@count;
    getitem "BottleOfTonoriWater", .@count;
    close;

L_NotEnoughBottles:
    mes "";
    mesn;
    mes l("You don't have that many empty bottles!");
    close;

L_NotEnoughMoney:
    mes "";
    mesn;
    mes l("You don't have enough gold! You need @@ gp.", .@Cost);
    close;


L_Tier2:
    mesn;
    mes col("WHAT ARE YOU GOING TO DO?", 9);
    next;
    select
        l("Do nothing"), // 1
        l("Drink the potion"), // 2
        l("Pour the potion"), // 3
        l("Wash yourself with the potion"), // 4
        l("Burn the potion"), // 5
        l("Drink the potion, and say magic words"), // 6
        l("Say magic words"), // 7
        l("Do a weird dance"), // 8
        l("Blame Saulc"); // 9

    mes "";
    if (@menu == 1)
        close;

    if (@menu == 3)
        goto L_Tier2Ok;

    if (@menu <= 6)
        goto L_Failed;

    if (@menu == 9)
        mes col("Whatever you're blaming Saulc about, this one time, he is innocent.", 9);
    mes col("Nothing happens.", 9);
    close;

L_Failed:
    mesn strcharinfo(0);
    mesq l("Ah no... That's not what I had to do... I wasted the potion...");
    QUEST_ELEVARTEMPO=gettimetick(2);
    close;

L_Tier2Ok:
    mes col("You pour the whole potion on the fountain.", 9);
    next;
    mes col("You hear birds singing! That is what you had to do!", 9);
    next;
    mes col("Your body starts to glow. You're not sure why, the fountain did that!", 9);
    next;
    mesn;
    mes l("I am the Magic Fountain of Hurnscald. You are qualified.");
    next;
    mesn;
    mes l("Your next step is to get the book of the Second Sage Of Fate.");
    next;
    mesn;
    mes l("I predict you're closer to find the Secret Of Mana, and therefore, be part on saving our world.");
    next;
    mesn;
    mes l("I will empower you with raw mana, and your time will start running out again.");
    next;
    // 4~6 minutes to finish in average. Each level grants 4~6 extra seconds.
    QUEST_ELEVARTEMPO=gettimetick(2)+rand((BaseLevel*4),(BaseLevel*6));
    ST_TIER=6;
    mesn;
    mesq l("Run like the wind, @@! For you shall have only @@ to finish the ritual!", strcharinfo(0), FuzzyTime(QUEST_ELEVARTEMPO,2,2));
    close;

OnInit:
    .COST_PER_BOTTLE = 0;
    .sex = G_MALE;
    .distance = 7;

    .@npcId = getnpcid(0, .name$);
    // Check items.xml for info about this
    setunitdata(.@npcId, UDT_HEADTOP, InfantryHelmet);
    setunitdata(.@npcId, UDT_HEADMIDDLE, SailorShirt);
    setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 7);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 17);

    end;
}