From b09fe19c69b23bae07ff264dcbe120095977ff8d Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 3 Jan 2023 17:35:57 -0300 Subject: Bracco workaround --- npc/020-5/bracco.txt | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/npc/020-5/bracco.txt b/npc/020-5/bracco.txt index 240197798..a6e91f7da 100644 --- a/npc/020-5/bracco.txt +++ b/npc/020-5/bracco.txt @@ -80,7 +80,7 @@ if (.@ammo < 1) { .@ammo = 1; - consolewarn("AMOUNT ERROR at NewMeltdown: %s", getitemname(.@recipe_item)); + consolebug("AMOUNT ERROR at NewMeltdown: %s", getitemname(.@recipe_item)); } getitem .@recipe_item, .@ammo; @@ -126,6 +126,7 @@ function MassMeltdown { .@id=getarg(0); .@price=getarg(1); + .@overid=getarg(2, 0); .@total=countitem(.@id); if (!.@total) { mesc l("You don't have any %s.", getitemlink(.@id)), 1; @@ -157,7 +158,24 @@ mesc l("@@ melt down your @@...", .name$, getitemlink(.@x)), 2; // Really melt it down - NewMeltdown(getarg(0)); + if (!.@overid) { + NewMeltdown(getarg(0)); + } else { + // Override system (no recipe) + .@elv = getiteminfo(.@overid, ITEMINFO_ELV); + .@ammo = any( + (.@elv < 12 ? 0 : 1), + (.@elv < 7 ? 0 : 1), + (.@elv < 5 ? 0 : 1), + (.@elv < 3 ? 0 : 1), + (.@elv < 12 ? 1 : 2), + (.@elv < 15 ? 1 : 2) + ); + if (.@ammo) { + getitem .@overid, .@ammo; + mesc l("* Acquired @@ @@!", .@ammo, getitemlink(.@overid)); + } + } } } freeloop(false); @@ -289,19 +307,19 @@ L_Irreversible: switch (@menuret) { // Copy Paste from normal Meltdown case RustyKnife: - MassMeltdown(.@it, 15, IronOre, any(0, 0, 0, 1, 1)); + MassMeltdown(.@it, 15, IronOre); break; case SmallKnife: - MassMeltdown(.@it, 15, IronOre, any(0, 0, 1, 1, 1)); + MassMeltdown(.@it, 15, IronOre); break; case Knife: - MassMeltdown(.@it, 25, IronOre, any(0, 1, 1, 2)); + MassMeltdown(.@it, 25, IronOre); break; case SharpKnife: - MassMeltdown(.@it, 50, IronOre, any(1, 2, 2, 3)); + MassMeltdown(.@it, 50, IronOre); break; case Dagger: - MassMeltdown(.@it, 100, IronOre, any(2, 2, 3, 3, 4)); + MassMeltdown(.@it, 100, IronOre); break; // MISSING } -- cgit v1.2.3-60-g2f50