summaryrefslogtreecommitdiff
path: root/npc/017-1/drowned_man.txt
blob: 96046123e1d29e466ffde9db4cb05c85659b92ea (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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
// TMW2/TMWBR Script
// Author:
//  Jesusalva
// Description:
//  Access to Lilit - He aids you in jumping off the bridge and reaching Lilit
//  Of course, to swim such large distance, you need to have plenty vit and str...
// Right spot: Between the crack (shallow) and the plant (shallow).

// .@q = LilitQuest_Access
// 0 - Access not granted
// 1 - Access granted
// 2 - Tree Minigame complete.

// TODO: Only allow "I want to swim" if the game knows you know about Lilit
// That is what Saulc wants, after all

017-1,160,227,0	script	#DrownedMan	NPC_NO_SPRITE,{
    if (!isin("017-1", 158, 222, 1))
        end;
    mesc l("Someone seems to be drowned in the water.");
    select
        l("Hello! Do you need help?"),
        l("Why shouldn't I jump here?"),
        l("But I want to swim!");
    mes "";
    switch (@menu)
    {
        case 1:
            mesn l("Drowned Man");
            mesq l("I'm afraid you can't help me... I still have one HP left.");
            next;
            mesn l("Drowned Man");
            mesq l("I also broke my bones, and I was equipping a weapon which prevents HP regen...");
            next;
            mesn l("Drowned Man");
            mesq l("I did some tritan friends, though. They teached me how to breath underwater. It's not so bad.");
            next;
            mesn l("Drowned Man");
            mesq l("In the first eight months I wanted to go back, but now I'm pretty used to living here. Please don't rescue me.");
            break;
        case 2:
            mesn l("Drowned Man");
            mesq l("Because it may be a fatal fall!");
            next;
            mesn l("Drowned Man");
            mesq l("Look the height of this bridge! Worse, the water around here is pretty shallow.");
            next;
            mesn l("Drowned Man");
            mesq l("Well, there might be a deep water spot, but it would still be dangerous.");
            next;
            mesn l("Drowned Man");
            mesq l("Unless you're looking forward a death penalty, DO NOT JUMP!");
            // We're in town, are you stupid >.>
            break;
        case 3:
            mesn l("Drowned Man");
            mesq l("Well, you see, you can't jump very far. And the water near land is shallow.");
            next;
            mesn l("Drowned Man");
            mesq l("I guess, there might be a single spot where water is a bit deeper, but I wasn't lucky.");
            next;
            mesn l("Drowned Man");
            mes l("Remember to store somewhere any heavy stuff you might be carrying.");
            mes l("I guess you cannot bring more than 1kg with full health. Less, if you're hurt.");
            next;
            mesn l("Drowned Man");
            mesq l("Also, you need vitality and strength to survive the swimming trip. The closest island is very far away.");
            mesc l("You need at least 35 str and 35 vit to do the trip safely - bonuses not counted - or you will lose HP."); // Can be safely mixed
            break;
    }
    close;

OnWarn:
    @lofcanjump=true;
    npctalkonce l("@@, don't jump there! It may be fatal!", strcharinfo(0));
    end;

// DO NOT LOWER
OnInit:
    .distance=7;
    end;
}

// Warning Event
017-1,158,222,0	script	#DrownedManArea	NPC_NO_SPRITE,0,0,{
    end;
OnTouch:
    doevent("#DrownedMan::OnWarn");
    end;
OnInit:
    .distance=1;
    end;
}


// Any Jump. Code is obfuscated to inhibit cheaters :<
// Of course, I could use a blackbox too, but this is not the purpose.
// You don't want to solve the map hint, then you'll solve my formula!! /tableflip
017-1,162,226,0	script	#JumpArea01	NPC_NO_SPRITE,0,0,{
    // Do you want to jump?
    if (!@lofcanjump) {
        dispbottom l("What interesting water. Just don't ask me why.");
        end;
    }

    // Are you in the bridge?
    if (!isin("017-1", 158, 222, 1)) {
        dispbottom l("I'm too far to jump there.");
        end;
    }

    mesc l("Are you really going to jump here?");
    next;
    if (askyesno() == ASK_YES) {
        // Do the jump!
        closeclientdialog;
        slide .x, .y;
        if (is_between(5220, 5270, .x*32) && is_between(7330, 7390, .y*32))
            goto L_GoodJump;
        dispbottom l("The water was too shallow...");
        die();
        end;
    }
    closeclientdialog;
    end;

L_GoodJump:
    dispbottom l("You jump in deep waters.");
    // You can only carry exact 2kg with full health.
    // Weight will be 2000g - so penalty will be 100% HP.
    .@penalty=max(0, (Weight/20)-1);
    percentheal -.@penalty, 0;
    @finalhp = Hp;

    // vit/str counts on swimming minigame
    mesn l("Drowned Man");
    mesq l("Good job! I wish you luck, because now you need to SWIM!");
    next;
    closeclientdialog;
    setparam(Hp, @finalhp);
    @finalhp=0;
    addtimer(3000, "#01850SwimmingCtrl::OnLoop");
    warp "018-5-0", 20, 25;
    end;

OnInit:
    .alwaysVisible=true;
    end;
}

017-1,162,227,0	duplicate(#JumpArea01)	#JumpArea02	NPC_NO_SPRITE
017-1,162,228,0	duplicate(#JumpArea01)	#JumpArea03	NPC_NO_SPRITE
017-1,162,229,0	duplicate(#JumpArea01)	#JumpArea04	NPC_NO_SPRITE
017-1,162,230,0	duplicate(#JumpArea01)	#JumpArea05	NPC_NO_SPRITE
017-1,162,231,0	duplicate(#JumpArea01)	#JumpArea06	NPC_NO_SPRITE

017-1,163,226,0	duplicate(#JumpArea01)	#JumpArea07	NPC_NO_SPRITE
017-1,163,227,0	duplicate(#JumpArea01)	#JumpArea08	NPC_NO_SPRITE
017-1,163,228,0	duplicate(#JumpArea01)	#JumpArea09	NPC_NO_SPRITE
017-1,163,229,0	duplicate(#JumpArea01)	#JumpArea10	NPC_NO_SPRITE
017-1,163,230,0	duplicate(#JumpArea01)	#JumpArea11	NPC_NO_SPRITE
017-1,163,231,0	duplicate(#JumpArea01)	#JumpArea12	NPC_NO_SPRITE

017-1,164,226,0	duplicate(#JumpArea01)	#JumpArea13	NPC_NO_SPRITE
017-1,164,227,0	duplicate(#JumpArea01)	#JumpArea14	NPC_NO_SPRITE
017-1,164,228,0	duplicate(#JumpArea01)	#JumpArea15	NPC_NO_SPRITE
017-1,164,229,0	duplicate(#JumpArea01)	#JumpArea16	NPC_NO_SPRITE
017-1,164,230,0	duplicate(#JumpArea01)	#JumpArea17	NPC_NO_SPRITE
017-1,164,231,0	duplicate(#JumpArea01)	#JumpArea18	NPC_NO_SPRITE

017-1,165,226,0	duplicate(#JumpArea01)	#JumpArea19	NPC_NO_SPRITE
017-1,165,227,0	duplicate(#JumpArea01)	#JumpArea20	NPC_NO_SPRITE
017-1,165,228,0	duplicate(#JumpArea01)	#JumpArea21	NPC_NO_SPRITE
017-1,165,229,0	duplicate(#JumpArea01)	#JumpArea22	NPC_NO_SPRITE
017-1,165,230,0	duplicate(#JumpArea01)	#JumpArea23	NPC_NO_SPRITE
017-1,165,231,0	duplicate(#JumpArea01)	#JumpArea24	NPC_NO_SPRITE