forked from cdrock/TourGuide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
iotm2022unbrella
36 lines (35 loc) · 1.68 KB
/
iotm2022unbrella
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
//Unbreakable Umbrella
RegisterResourceGenerationFunction("IOTMUnbreakableUmbrellaGenerateResource");
void IOTMUnbreakableUmbrellaGenerateResource(ChecklistEntry [int] resource_entries)
{
item unbrella = lookupItem("unbreakable umbrella");
if (!unbrella.have()) return;
if (!__misc_state["in run"] && $item[unbreakable umbrella].equipped_amount() == 0) return;
string url;
string unbrellaMode = get_property("umbrellaState");
string unbrellaEnchant;
string [int] description;
url = invSearch("unbreakable umbrella");
// Title
string main_title = "Umbrella machine " + HTMLGenerateSpanFont("B", "red") + "roke";
description.listAppend("Understanda" + HTMLGenerateSpanFont("B", "red") + "le have a nice day.");
switch (get_property("umbrellaState"))
{
case "broken":
int modifiedML = round(numeric_modifier("monster level") * 1.25,0);
unbrellaEnchant = "+25% ML. Unbrella-boosted ML will be " + modifiedML + "."; break;
case "forward-facing":
unbrellaEnchant = "+25 DR shield"; break;
case "bucket style":
unbrellaEnchant = "+25% item drops"; break;
case "pitchfork style":
unbrellaEnchant = "+25 Weapon Damage"; break;
case "constantly twirling":
unbrellaEnchant = "+25 Spell Damage"; break;
case "cocoon":
unbrellaEnchant = "-10% Combat Frequency"; break;
}
description.listAppend(HTMLGenerateSpanOfClass("Current enchantment: ", "r_bold") + unbrellaMode);
description.listAppend(HTMLGenerateSpanFont(unbrellaEnchant, "blue") + "");
resource_entries.listAppend(ChecklistEntryMake("__item unbreakable umbrella", "inventory.php?action=useumbrella&pwd=" + my_hash(), ChecklistSubentryMake(main_title, "", description)));
}