-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelay_slime.ash
633 lines (577 loc) · 23.9 KB
/
relay_slime.ash
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
## Slime Speed Run Script by Alhifar/zeroblah
## Modifications added in from Bale, Veracity, Zen00 and Thok
## Many thanks to everyone who has contributed and tested!
## Currently supported skills for damage calculations:
## Attack with weapon, Thrust-Smack, Lunging Thrust-Smack, Sauceror spells, Weapon of the Pastalord, Shieldbutt,
## Fearful Fetuccini, Moxious Maneuver and divines, both single and funkslung
## Any requests for other skills to be added in should be sent to Alhifar.
script "slime.ash";
import <htmlform.ash>
import <zlib.ash>
setvar("SlimeTube_max_ml_outfit", "maxml");
setvar("SlimeTube_max_ml_familiar", "purse rat");
setvar("SlimeTube_min_ml_outfit", "minml");
setvar("SlimeTube_min_ml_familiar", "levitating potato");
string run_type = vars["SlimeTube_run_type"];
string max_ml_outfit = vars["SlimeTube_max_ml_outfit"];
string max_ml_familiar = vars["SlimeTube_max_ml_familiar"];
string min_ml_outfit = vars["SlimeTube_min_ml_outfit"];
string min_ml_familiar = vars["SlimeTube_min_ml_familiar"];
## Set use_tatter_like to true to use a tatter to escape from combat, or to false to simply kill the slime and use an adventure.
## Set which_tatter to which tatter-like item to use to escape from combats
setvar("SlimeTube_use_tatter_like", "false");
boolean use_tatter_like = vars["SlimeTube_use_tatter_like"].to_boolean();
setvar("SlimeTube_which_tatter", "green smoke bomb");
item which_tatter = vars["SlimeTube_which_tatter"].to_item();
## This CCS is ONLY used if use_tatter_like is set to false, and it is not blank
setvar("SlimeTube_max_ml_ccs", "");
setvar("SlimeTube_min_ml_ccs", "");
## This mood is only used if not blank
setvar("SlimeTube_max_ml_mood", "");
setvar("SlimeTube_min_ml_mood", "");
string max_ml_ccs = vars["SlimeTube_max_ml_ccs"];
string min_ml_ccs = vars["SlimeTube_min_ml_ccs"];
string max_ml_mood = vars["SlimeTube_max_ml_mood"];
string min_ml_mood = vars["SlimeTube_min_ml_mood"];
## Set this to the amount of rounds you want to add to the number of rounds expected to account for fumbles
setvar("SlimeTube_fumble_buffer", "0");
int fumble_buffer = vars["SlimeTube_fumble_buffer"].to_int();
setvar("SlimeTube_use_hottub", "true");
boolean use_hottub = vars["SlimeTube_use_hottub"].to_boolean();
setvar("SlimeTube_verbose", "true");
boolean verbose = vars["SlimeTube_verbose"].to_boolean();
## End Options
## Do not modify anything below this line unless you know what you are doing!
###################################################
boolean write_rcheck(boolean ov, string name, string label) {
if(label != "" )
write("<label>");
if(fields contains name) {
ov = true;
} else if (count(fields) > 0)
ov = false;
write("<input type=\"checkbox\" name=\"" + name + "\"");
if(ov)
write(" checked");
_writeattr();
if(label != "" ) {
write(" "+label);
writeln("</label>");
}
return ov;
}
float[11] slime_percent;
slime_percent[0] = 0;
slime_percent[1] = 5.33335;
slime_percent[2] = 4.00147;
slime_percent[3] = 2.90220;
slime_percent[4] = 2.01643;
slime_percent[5] = 1.32440;
slime_percent[6] = .80555;
slime_percent[7] = .43835;
slime_percent[8] = .20004;
slime_percent[9] = .06621;
slime_percent[10] = .01000;
set_property("choiceAdventure326","0");
int get_bladders()
{
string log = visit_url( "clan_raidlogs.php" );
int bladders;
matcher m_bladders = create_matcher( "squeezed a Slime gall bladder" , log );
while( m_bladders.find() ) bladders = bladders + 1;
return bladders;
}
int expected_rounds_needed()
{
int slime_hp = monster_hp( $monster[slime1] );
int weapon_damage = max( 1 , floor( .1 * get_power( equipped_item( $slot[weapon] ) ).to_float() ) );
int offhand_damage = 0;
if( weapon_type( equipped_item( $slot[off-hand] ) ) != $stat[none] )
offhand_damage = max( 1 , floor( .1 * get_power( equipped_item( $slot[off-hand] ) ).to_float() ) );
int elem_damage = 0;
foreach elem in $elements[]
{
elem_damage += numeric_modifier( elem + " Damage" );
}
int bonus_damage = numeric_modifier( "Weapon Damage" ) + elem_damage;
int lts_factor = 1;
int damage;
float spell_per;
boolean funk = false;
boolean shieldbutt = false;
boolean noisemaker = false;
boolean blowout = false;
boolean sillystring = false;
boolean shurikens = false;
boolean cannon = false;
boolean mortar = false;
boolean stringozzi = false;
boolean wotpl = false;
boolean ff = false;
boolean stream = false;
boolean storm = false;
boolean wave = false;
boolean saucegeyser = false;
boolean mm = false;
boolean vts = false;
int stun = 0;
for i from 0 upto 30
{
switch ( get_ccs_action( i ) )
{
case "skill entangling noodles":
case "item brick of sand":
case "item banana peel":
case "item jar of swamp gas":
case "item floorboard cruft":
case "item sausage bomb":
case "item clingfilm tangle":
case "item black bricko brick":
case "item finger cuffs":
case "item d6":
case "item rain-doh blue balls":
stun += 2;
break;
case "skill noodles of fire":
case "item soggy used band-aid":
case "item the lost comb":
case "item chinese curse words":
stun += 3;
break;
case "item very large caltrop":
stun += 5;
break;
case "skill lunging thrust-smack":
lts_factor = 3;
break;
case "skill thrust-smack":
lts_factor = 2;
break;
case "skill shieldbutt":
shieldbutt = true;
break;
case "item divine noisemaker, divine noisemaker":
funk = true;
case "item divine noisemaker":
noisemaker = true;
break;
case "item divine blowout, divine blowout":
funk = true;
case "item divine blowout":
blowout = true;
break;
case "item divine can of silly string, divine can of silly string":
funk = true;
case "item divine can of silly string":
sillystring = true;
break;
case "skill ravioli shurikens":
shurikens = true;
break;
case "skill cannelloni cannon":
cannon = true;
break;
case "skill stuffed mortar shell":
mortar = true;
break;
case "skill stringozzi serpent":
stringozzi = true;
break;
case "skill stream of sauce":
stream = true;
break;
case "skill saucestorm":
storm = true;
break;
case "skill saucegeyser":
saucegeyser = true;
break;
case "skill wave of sauce":
wave = true;
break;
case "skill weapon of the pastalord":
wotpl = true;
break;
case "skill fearful fettucini":
ff = true;
break;
case "skill vicious talon slash":
vts = true;
break;
}
}
int musc_dam = max( 0 , my_buffedstat( $stat[muscle] ) - monster_defense( $monster[slime1] ) );
if( current_hit_stat() == $stat[Moxie] ) musc_dam = max( 0 , my_buffedstat( $stat[moxie] ) - monster_defense( $monster[slime1] ) );
if( lts_factor == 3 )
{
if( my_class() == $class[Seal Clubber] )
musc_dam = max( 0 , ( my_buffedstat( $stat[muscle] ) * 1.3 ) - monster_defense( $monster[slime1] ) );
else musc_dam = max( 0 , ( my_buffedstat( $stat[muscle] ) * 1.25 ) - monster_defense( $monster[slime1] ) );
}
if( weapon_type( equipped_item( $slot[weapon] ) ) == $stat[none] ) musc_dam = musc_dam * .25;
if( shieldbutt ) offhand_damage = get_power( equipped_item( $slot[off-hand] ) ) * .1;
spell_per = ( 100 + numeric_modifier( "Spell Damage Percent" ) ) / 100;
// Old elem spell damage calc was misinformed. Needs redone
float elem_spell_damage = 0;
/*
[5:13:10 PM] Cannonfire40: Stringozzi is now 16-32+.25*myst, with poison = initial damage
[5:13:20 PM] Cannonfire40: Before it was 16-40+.25*myst, with poison = initial damage/2
[5:13:34 PM] Cannonfire40: Cannon now has double base damage and scales to .25*myst instead of .15*myst
[5:13:51 PM] Cannonfire40: WotP has identical base damage and scales to .5*myst instead of .35
[5:14:03 PM] Cannonfire40: And saucegeyser is now 60-70 + .4*myst
*/
/*
[8:18:53 PM] Cannonfire40: Mortar isn't *bad*
[8:18:56 PM] Cannonfire40: but it's bad for slime tube
[8:19:03 PM] Cannonfire40: it deals the same damage as WotP now
[8:19:05 PM] Cannonfire40: BUT
[8:19:11 PM] Cannonfire40: it fires the round AFTER you cast it.
[8:19:18 PM] Cannonfire40: and it's once per combat
*/
switch
{
case noisemaker:
damage = my_buffedstat( $stat[muscle] ) * ( 1 + funk.to_int() );
break;
case blowout:
damage = my_buffedstat( $stat[moxie] ) * ( 1 + funk.to_int() );
break;
case sillystring:
damage = my_buffedstat( $stat[mysticality] ) * ( 1 + funk.to_int() );
break;
// Shurikens needs spaded
case shurikens:
damage = floor( spell_per * ( 3 + max( .07 * my_buffedstat( $stat[mysticality] ) , 15 ) + min( numeric_modifier( "Spell Damage" ) , 25 ) + elem_spell_damage ) );
break;
case cannon:
damage = floor( spell_per * ( 16 + max( .25 * my_buffedstat( $stat[mysticality] ) , 20 ) + min( numeric_modifier( "Spell Damage" ) , 40 ) + elem_spell_damage ) );
break;
case stringozzi:
damage = floor( spell_per * ( 16 + max( .25 * my_buffedstat( $stat[mysticality] ) , 20 ) + min( numeric_modifier( "Spell Damage" ) , 40 ) + elem_spell_damage ) ) * 2;
// Stream needs spaded
case stream:
damage = floor( spell_per * ( 3 + max( .1 * my_buffedstat( $stat[mysticality] ) , 10 ) + min( numeric_modifier( "Spell Damage" ) , 10 ) ) );
break;
// Storm needs spaded
case storm:
damage = floor( spell_per * ( 14 + max( .2 * my_buffedstat( $stat[mysticality] ) , 25 ) + min( numeric_modifier( "Spell Damage" ) , 15 ) ) );
break;
// Wave needs spaded
case wave:
damage = floor( spell_per * ( 20 + max( .3 * my_buffedstat( $stat[mysticality] ) , 30 ) + min( numeric_modifier( "Spell Damage" ) , 25 ) ) );
break;
case saucegeyser:
damage = floor( spell_per * ( 60 + ( .4 * my_buffedstat( $stat[mysticality] ) ) + numeric_modifier( "Spell Damage" ) ) );
break;
case wotpl:
case ff:
damage = floor( spell_per * ( 32 + ( .5 * my_buffedstat( $stat[mysticality] ) ) + numeric_modifier( "Spell Damage" ) ) );
break;
case vts:
damage = floor( .75 * my_buffedstat( $stat[muscle] ) );
break;
default:
damage = musc_dam + bonus_damage + ( weapon_damage * lts_factor ) + offhand_damage;
}
int rounds = ceil( slime_hp.to_float() / damage.to_float() );
return max( 1 , rounds + stun );
}
int max_possible_damage()
{
int def_stat = my_buffedstat( $stat[moxie] );
if( have_skill( $skill[Hero of the Half-Shell] ) && item_type( equipped_item( $slot[off-hand] ) ) == "shield" && my_buffedstat( $stat[muscle] ) > my_buffedstat( $stat[moxie] ) )
def_stat = my_buffedstat( $stat[muscle] );
int slime_attack = 100 + ( numeric_modifier( "Monster Level" ) * ( my_familiar() != $familiar[O.A.F.] ).to_int() );
int diff = max( 0 , slime_attack - def_stat );
float absorb_frac = min( .9 , ( square_root( numeric_modifier( "Damage Absorption" ) / 10.0 ) - 1.0 ) / 10.0 );
int damage = ceil( diff + ( .25 * slime_attack ) - numeric_modifier( "Damage Reduction" ) );
damage = ceil( damage * ( 1 - absorb_frac ) );
int lowest_elem = min( min( min( min( elemental_resistance( $element[hot] ), elemental_resistance( $element[cold] ) ) , elemental_resistance( $element[stench] ) ) , elemental_resistance( $element[sleaze] ) ) , elemental_resistance( $element[slime] ) );
float elem_resist = ( 100 - lowest_elem ).to_float() / 100.0;
damage = ceil( damage * elem_resist );
return max( 1 , damage );
}
int slime_damage( int turns )
{
int noodle_turns = 0;
for i from 0 upto 30
{
if( get_ccs_action( i ) == "skill entangling noodles" ) noodle_turns = 2;
}
if( noodle_turns > 0 && my_familiar() == $familiar[Frumious Bandersnatch] ) noodle_turns = noodle_turns + 1;
int damage = my_maxhp() * slime_percent[min( 10 , turns )];
return ceil( damage * ( ( 100 - elemental_resistance( $element[slime] ) ) / 100 ) ) + ( ( expected_rounds_needed() + fumble_buffer - noodle_turns ) * max_possible_damage() );
}
int slime_damage()
{
return slime_damage( min( have_effect( $effect[Coated in Slime] ) , 10 ) );
}
boolean chamois()
{
if ( have_effect( $effect[Coated in Slime] ) > 0 && use_hottub && get_property( "_hotTubSoaks" ).to_int() < 5 )
{
if( verbose ) print ( "Using VIP bath..." );
cli_execute( "soak 1" );
refresh_status();
if ( have_effect( $effect[Coated in Slime] ) > 0 )
{
if( verbose ) print( "We're too pruny to hot tub now. Or something else went wrong. Trying a chamois.", "red" );
} else
{
if( verbose ) print( "Hot tub successfully used." );
return true;
}
} else if ( have_effect( $effect[Coated in Slime] ) > 0 )
{
if( verbose ) print( "Using a chamois." );
visit_url( "clan_slimetube.php?action=chamois" );
refresh_status();
buy(1, $item[hair spray]);
use(1, $item[hair spray]);
if ( have_effect( $effect[Coated in Slime] ) > 0 )
{
if( verbose ) print( "Something went wrong, we're still coated in slime!", "red" );
return false;
} else
{
if( verbose ) print( "Chamois successfully used." );
return true;
}
}
return true;
}
int max_mcd()
{
int max_mcd = 10 + ( canadia_available().to_int() );
int mcd = 1000 - numeric_modifier( "Monster Level" ) + current_mcd();
if( run_type == "larva" || mcd < 0 || mcd > max_mcd ) return max_mcd;
return mcd;
}
void run_tube( int adv_to_use )
{
if( get_property( "customCombatScript" ) != min_ml_ccs )
{
for i from 0 upto 30
{
if( get_ccs_action( i ) == "try to run away" || get_ccs_action( i ).contains_text( which_tatter.to_string() ) ) abort( "Reset your battle action to something sane!" );
}
}
boolean ml_outfit_on;
string old_action;
string page_text;
boolean combat;
if( adv_to_use < 1 ) adv_to_use = my_adventures();
else if( adv_to_use > my_adventures() ) adv_to_use = my_adventures();
int total_adv = adv_to_use;
int bladders = get_bladders();
cli_execute( "autoattack disabled" );
while( my_adventures() > 0 && adv_to_use > 0 )
{
if( slime_damage() >= my_maxhp() )
{
if( verbose ) print( "The slimes in the tube or that slime covering you will kill you if you don't do something! Hitting up your clan." , "blue" );
if( !chamois() ) abort( "Slime removal failed! You won't survive another turn!" );
if( !restore_hp( slime_damage() + 1 ) ) abort( "Unable to restore HP!" );
if( slime_damage() >= my_maxhp() ) abort( "You can't survive after removing the coating of slime, you need more HP!" );
}
else if( slime_damage() >= my_hp() )
{
if( !restore_hp( slime_damage() + 1 ) ) abort( "Couldn't restore enough HP!" );
}
else if( have_effect( $effect[Coated in Slime] ) == 0 )
{
if( verbose ) print( "I'm feeling rather... dry. Let's go get slimy!" , "blue" );
outfit( min_ml_outfit );
// Spleener getting code "borrowed" from bleary
use_familiar( min_ml_familiar.to_familiar() );
if( !use_tatter_like && min_ml_ccs != "" )
{
set_property( "customCombatScript" , min_ml_ccs );
set_property( "battleAction" , "custom combat script" );
}
if( min_ml_mood != "" )
{
set_property( "currentMood" , min_ml_mood );
}
ml_outfit_on = false;
int extra_ml = ( bladders * 20 + numeric_modifier( "Monster Level" ) ) % 100;
if( extra_ml < 0 ) extra_ml += 100;
switch
{
case my_familiar() == $familiar[O.A.F.]:
break;
case extra_ml <= current_mcd() && !in_bad_moon():
change_mcd( 0 );
break;
case extra_ml <= numeric_modifier( "ur-kel's aria of annoyance" , "Monster Level" ) && have_skill( $skill[Ur-Kel\'s Aria of Annoyance] ):
cli_execute( "uneffect Ur-kels" );
break;
case !in_bad_moon() && extra_ml <= current_mcd() + numeric_modifier( "ur-kel's aria of annoyance" , "Monster Level" ) && have_skill( $skill[Ur-Kel's Aria of Annoyance] ):
cli_execute( "uneffect Ur-kels" );
change_mcd( 0 );
}
old_action = get_property( "battleAction" );
boolean gazing = false;
if( have_effect( $effect[Ur-Kel's Aria of Annoyance] ) > 0 && have_skill($skill[Ur-Kel's Aria of Annoyance] ) ) cli_execute("uneffect Ur-kels");
if( my_familiar() == $familiar[Frumious Bandersnatch] && get_property( "_banderRunaways" ).to_int() < floor( numeric_modifier( "Familiar Weight" ) + familiar_weight( $familiar[Frumious Bandersnatch] ) ) / 5 )
{
## TODO: Fix breakage when you don't have Aria available, have ode available,
## and have 3 AT buffs already. Temp fixed by changing abort to print, possibly needs handled better
if( have_effect( $effect[Ode to Booze]) < 1 && have_skill( $skill[The Ode to Booze] ) )
{
use_skill( 1 , $skill[The Ode to Booze]);
}
if( have_effect( $effect[Ode to Booze] ) > 0 )
{
set_property( "battleAction" , "try to run away" );
}
else print( "Problem casting \"Ode to Booze\" to help your Bandersnatch run away. Probably too many AT Buffs." , "red" );
}
else if( my_familiar() == $familiar[Pair of stomping boots] && get_property( "_banderRunaways" ).to_int() < floor( numeric_modifier( "Familiar Weight" ) + familiar_weight( $familiar[Pair of stomping boots] ) ) / 5 )
{
set_property( "battleAction" , "try to run away" );
}
else if( ( equipped_amount( $item[Navel Ring of Navel Gazing] ) > 0 || equipped_amount( $item[Greatest American Pants] ) > 0 ) && get_property( "_navelRunaways" ).to_int() < 3 )
{
gazing = true;
set_property( "battleAction" , "try to run away" );
}
else if( use_tatter_like )
{
if( item_amount( which_tatter ) == 0 ) abort( "Out of " + which_tatter.to_plural() + "!" );
if( have_skill( $skill[Ambidextrous Funkslinging] ) )
{
set_property( "battleAction" , "item " + which_tatter.to_string() + ", " + which_tatter.to_string() );
}
else set_property( "battleAction" , "item " + which_tatter.to_string() );
}
int ml = numeric_modifier( "Monster Level" );
int coated_turns = max( 1 , floor( ( 1000 - ml ) / 100 ) + 1 );
if( slime_damage( coated_turns ) >= my_maxhp() ) abort( "Your low ML outfit doesn't bring your ML low enough to survive the first turn of Coated in Slime!" );
if( slime_damage( coated_turns ) >= my_hp() )
{
if( !restore_hp( slime_damage() + 1 ) ) abort( "Can't restore enough HP!" );
}
if( verbose ) print( "Adventure " + ( total_adv - adv_to_use + 1 ) + " out of " + total_adv , "blue" );
cli_execute("mcd 0");
if (min_ml_mood != "")
cli_execute("mood " + min_ml_mood);
adv1($location[The Slime Tube], -1, "");
if( get_property( "lastEncounter" ).contains_text( "Showdown" ) ) abort( "You've reached Mother Slime!" );
boolean combat = !( get_property("lastEncounter").contains_text("Engulfed") || get_property("lastEncounter").contains_text("Showdown") ) ;
if( !use_tatter_like )
{
if( combat ) adv_to_use = adv_to_use - 1;
}
if( verbose && use_tatter_like ) print( item_amount( which_tatter ) + " " + to_plural( which_tatter ) + " left!" );
if( use_tatter_like || my_familiar() == $familiar[Frumious Bandersnatch] || gazing )
{
set_property( "battleAction" , old_action );
}
if( ( have_effect( $effect[Ode to Booze] ) > 0 && have_skill( $skill[The Ode to Booze] ) ) || ( get_property( "_banderRunaways" ).to_int() >= floor( numeric_modifier( "Familiar Weight" ) + familiar_weight( $familiar[Frumious Bandersnatch] ) ) / 5 ) )
{
cli_execute( "uneffect Ode to Booze" );
}
}
else
{
cli_execute("mcd 10");
if (max_ml_mood != "")
cli_execute("mood " + max_ml_mood);
if( verbose ) print( "Covered in slime, adventuring normally in the tube!" , "blue" );
if( verbose ) print( "Adventure " + ( total_adv - adv_to_use + 1 ) + " out of " + total_adv , "blue" );
if( !ml_outfit_on )
{
outfit( max_ml_outfit );
use_familiar( max_ml_familiar.to_familiar() );
if( !use_tatter_like && max_ml_ccs != "" )
{
set_property( "customCombatScript" , max_ml_ccs );
set_property( "battleAction" , "custom combat script" );
}
ml_outfit_on = true;
if( !in_bad_moon() ) change_mcd( max_mcd() );
}
if( have_skill( $skill[Ur-Kel's Aria of Annoyance] ) && have_effect( $effect[Ur-Kel's Aria of Annoyance] ) == 0 )
{
use_skill( 1 , $skill[Ur-Kel's Aria of Annoyance] );
}
adventure( 1 , $location[The Slime Tube] );
if( get_property( "lastEncounter" ).contains_text( "Showdown" ) ) abort( "You've reached Mother Slime!" );
adv_to_use = adv_to_use - 1;
}
}
}
string familiar_select(string ov, string name, string label) {
ov = write_select(ov, name, label);
write_option("(no familiar)","");
foreach fam in $familiars[]
if(have_familiar(fam)) write_option(fam.to_string());
finish_select();
return ov;
}
void main() {
write_page();
writeln( "<center><b><font size=5 color=\"blue\">Slime.ash Relay Version</font></b></center><br>" );
writeln( "<center><font size=4><b>Clan:</b> " + get_clan_name() + "</font></center><br>" );
writeln("<center><table border=0 cellpadding=2>");
writeln("<tr><th></th><th align=left>Minimum ML Settings</th><th align=left>Maximal ML Settings</th></tr>");
write("<tr><th align=right>Outfit name:</th><td>");
vars["SlimeTube_min_ml_outfit"] = write_field(vars["SlimeTube_min_ml_outfit"], "min_ml_outfit", "");
write("</td><td>");
vars["SlimeTube_max_ml_outfit"] = write_field(vars["SlimeTube_max_ml_outfit"], "max_ml_outfit", "");
write("</td></tr>");
write("<tr><th align=right>Familiar:</th><td>");
vars["SlimeTube_min_ml_familiar"] = familiar_select(vars["SlimeTube_min_ml_familiar"], "min_ml_familiar", "");
write("</td><td>");
vars["SlimeTube_max_ml_familiar"] = familiar_select(vars["SlimeTube_max_ml_familiar"], "max_ml_familiar", "");
write("</td></tr>");
## This CCS is ONLY used if use_tatter_like is set to false, and it is not blank
write("<tr><th align=right>CCS:</th><td>");
vars["SlimeTube_min_ml_ccs"] = write_field(vars["SlimeTube_min_ml_ccs"], "min_ml_ccs", "");
write("</td><td>");
vars["SlimeTube_max_ml_ccs"] = write_field(vars["SlimeTube_max_ml_ccs"], "max_ml_ccs", "");
write("</td></tr>");
## This mood is only used if not blank
write("<tr><th align=right>Mood:</th><td>");
vars["SlimeTube_min_ml_mood"] = write_field(vars["SlimeTube_min_ml_mood"], "min_ml_mood", "");
write("</td><td>");
vars["SlimeTube_max_ml_mood"] = write_field(vars["SlimeTube_max_ml_mood"], "max_ml_mood", "");
write("</td></tr>");
writeln("</table></center>");
## Set use_tatter_like to true to use a tatter to escape from combat, or to false to simply kill the slime and use an adventure.
## Set which_tatter to which tatter-like item to use to escape from combats
writeln("<center><p style=\"margin-right:50px; margin-left:50px;\">If tatter-likes are not used and no CCS is listed in the box above, then Slimes will be killed according to basic combat settings.</p></center>");
write("<p style=\"margin-right:50px; margin-left:50px;\">");
use_tatter_like = write_rcheck(use_tatter_like, "use_tatter_like", "Use tatter-like item to escape combat");
vars["SlimeTube_use_tatter_like"] = use_tatter_like.to_string();
write("<br \>");
vars["SlimeTube_which_tatter"] = write_select(vars["SlimeTube_which_tatter"], "which_tatter", "If tatter-like is chosen, use: ");
foreach tatter in $strings[divine champagne popper, Fish-oil smoke bomb, green smoke bomb, tattered scrap of paper, wumpus-hair bolo, T.U.R.D.S. Key, glob of Blank-Out, GOTO, Louder Than Bomb]
write_option(tatter);
finish_select();
writeln("</p>");
## Set this to the amount of rounds you want to add to the number of rounds expected to account for fumbles
write("<p style=\"margin-right:50px; margin-left:50px;\">");
vars["SlimeTube_fumble_buffer"] = write_field(vars["SlimeTube_fumble_buffer"].to_int(), "fumble_buffer", "How many rounds allowed to fumble: ").to_string();
write("<br \>");
int adv_to_use = write_field(my_adventures(), "adv_to_use", "Maximum rounds in the tube: ");
write("<br \>");
vars["SlimeTube_use_hottub"] = write_rcheck(vars["SlimeTube_use_hottub"].to_boolean(), "use_hottub", "Use Hot Tub ");
write("<br \>");
verbose = write_rcheck(verbose, "verbose", "Verbose ");
vars["SlimeTube_verbose"] = verbose.to_string();
write( "<br \>" );
## Run Slime Tube!
writeln("<center><table border=0 cellpadding=2 width=\"100%\">");
write("<tr><td align=center>");
if(write_button("slime", "Run Slime Tube NOW")) {
updatevars();
run_tube(adv_to_use);
}
write("</td><td align=center>");
if(write_button("upd", "Save Settings without running tube"))
updatevars();
writeln("</td></tr></table></center>");
finish_page();
}