Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potion Storage Implementation #299

Open
zmanowar opened this issue Oct 18, 2024 · 1 comment
Open

Potion Storage Implementation #299

zmanowar opened this issue Oct 18, 2024 · 1 comment

Comments

@zmanowar
Copy link

Heya',

I'm slowly working my way through implementing (World) potion storage, but wasn't sure if someone else had already started.

Either way starting this issue to track the implementation.

@zmanowar
Copy link
Author

zmanowar commented Oct 18, 2024

Here's the list of supported potions (by ItemID) according to the wiki:

Supported Item IDs
private static final Set<Integer> SUPPORTED_POTION =
      ImmutableSet.of(
          ItemID.AGILITY_POTION4,
          ItemID.AGILITY_POTION3,
          ItemID.AGILITY_POTION2,
          ItemID.AGILITY_POTION1,
          ItemID.ANCIENT_BREW4,
          ItemID.ANCIENT_BREW3,
          ItemID.ANCIENT_BREW2,
          ItemID.ANCIENT_BREW1,
          ItemID.ANTIVENOM4,
          ItemID.ANTIVENOM3,
          ItemID.ANTIVENOM2,
          ItemID.ANTIVENOM1,
          ItemID.ANTIVENOM4_12913,
          ItemID.ANTIVENOM3_12915,
          ItemID.ANTIVENOM2_12917,
          ItemID.ANTIVENOM1_12919,
          ItemID.ANTIDOTE4,
          ItemID.ANTIDOTE3,
          ItemID.ANTIDOTE2,
          ItemID.ANTIDOTE1,
          ItemID.ANTIDOTE4_5952,
          ItemID.ANTIDOTE3_5954,
          ItemID.ANTIDOTE2_5956,
          ItemID.ANTIDOTE1_5958,
          ItemID.ANTIFIRE_POTION4,
          ItemID.ANTIFIRE_POTION3,
          ItemID.ANTIFIRE_POTION2,
          ItemID.ANTIFIRE_POTION1,
          ItemID.ANTIPOISON4,
          ItemID.ANTIPOISON3,
          ItemID.ANTIPOISON2,
          ItemID.ANTIPOISON1,
          ItemID.ATTACK_POTION4,
          ItemID.ATTACK_POTION3,
          ItemID.ATTACK_POTION2,
          ItemID.ATTACK_POTION1,
          ItemID.BASTION_POTION4,
          ItemID.BASTION_POTION3,
          ItemID.BASTION_POTION2,
          ItemID.BASTION_POTION1,
          ItemID.BATTLEMAGE_POTION4,
          ItemID.BATTLEMAGE_POTION3,
          ItemID.BATTLEMAGE_POTION2,
          ItemID.BATTLEMAGE_POTION1,
          ItemID.BLIGHTED_SUPER_RESTORE4,
          ItemID.BLIGHTED_SUPER_RESTORE3,
          ItemID.BLIGHTED_SUPER_RESTORE2,
          ItemID.BLIGHTED_SUPER_RESTORE1,
          ItemID.COMBAT_POTION4,
          ItemID.COMBAT_POTION3,
          ItemID.COMBAT_POTION2,
          ItemID.COMBAT_POTION1,
          ItemID.COMPOST_POTION4,
          ItemID.COMPOST_POTION3,
          ItemID.COMPOST_POTION2,
          ItemID.COMPOST_POTION1,
          ItemID.DEFENCE_POTION4,
          ItemID.DEFENCE_POTION3,
          ItemID.DEFENCE_POTION2,
          ItemID.DEFENCE_POTION1,
          ItemID.DIVINE_BASTION_POTION4,
          ItemID.DIVINE_BASTION_POTION3,
          ItemID.DIVINE_BASTION_POTION2,
          ItemID.DIVINE_BASTION_POTION1,
          ItemID.DIVINE_BATTLEMAGE_POTION4,
          ItemID.DIVINE_BATTLEMAGE_POTION3,
          ItemID.DIVINE_BATTLEMAGE_POTION2,
          ItemID.DIVINE_BATTLEMAGE_POTION1,
          ItemID.DIVINE_MAGIC_POTION4,
          ItemID.DIVINE_MAGIC_POTION3,
          ItemID.DIVINE_MAGIC_POTION2,
          ItemID.DIVINE_MAGIC_POTION1,
          ItemID.DIVINE_RANGING_POTION4,
          ItemID.DIVINE_RANGING_POTION3,
          ItemID.DIVINE_RANGING_POTION2,
          ItemID.DIVINE_RANGING_POTION1,
          ItemID.DIVINE_SUPER_ATTACK_POTION4,
          ItemID.DIVINE_SUPER_ATTACK_POTION3,
          ItemID.DIVINE_SUPER_ATTACK_POTION2,
          ItemID.DIVINE_SUPER_ATTACK_POTION1,
          ItemID.DIVINE_SUPER_COMBAT_POTION4,
          ItemID.DIVINE_SUPER_COMBAT_POTION3,
          ItemID.DIVINE_SUPER_COMBAT_POTION2,
          ItemID.DIVINE_SUPER_COMBAT_POTION1,
          ItemID.DIVINE_SUPER_DEFENCE_POTION4,
          ItemID.DIVINE_SUPER_DEFENCE_POTION3,
          ItemID.DIVINE_SUPER_DEFENCE_POTION2,
          ItemID.DIVINE_SUPER_DEFENCE_POTION1,
          ItemID.DIVINE_SUPER_STRENGTH_POTION4,
          ItemID.DIVINE_SUPER_STRENGTH_POTION3,
          ItemID.DIVINE_SUPER_STRENGTH_POTION2,
          ItemID.DIVINE_SUPER_STRENGTH_POTION1,
          ItemID.ENERGY_POTION4,
          ItemID.ENERGY_POTION3,
          ItemID.ENERGY_POTION2,
          ItemID.ENERGY_POTION1,
          ItemID.EXTENDED_ANTIVENOM4,
          ItemID.EXTENDED_ANTIVENOM3,
          ItemID.EXTENDED_ANTIVENOM2,
          ItemID.EXTENDED_ANTIVENOM1,
          ItemID.EXTENDED_ANTIFIRE4,
          ItemID.EXTENDED_ANTIFIRE3,
          ItemID.EXTENDED_ANTIFIRE2,
          ItemID.EXTENDED_ANTIFIRE1,
          ItemID.EXTENDED_SUPER_ANTIFIRE4,
          ItemID.EXTENDED_SUPER_ANTIFIRE3,
          ItemID.EXTENDED_SUPER_ANTIFIRE2,
          ItemID.EXTENDED_SUPER_ANTIFIRE1,
          ItemID.FISHING_POTION4,
          ItemID.FISHING_POTION3,
          ItemID.FISHING_POTION2,
          ItemID.FISHING_POTION1,
          ItemID.FORGOTTEN_BREW4,
          ItemID.FORGOTTEN_BREW3,
          ItemID.FORGOTTEN_BREW2,
          ItemID.FORGOTTEN_BREW1,
          ItemID.GOADING_POTION4,
          ItemID.GOADING_POTION3,
          ItemID.GOADING_POTION2,
          ItemID.GOADING_POTION1,
          ItemID.GUTHIX_BALANCE4,
          ItemID.GUTHIX_BALANCE3,
          ItemID.GUTHIX_BALANCE2,
          ItemID.GUTHIX_BALANCE1,
          ItemID.HUNTER_POTION4,
          ItemID.HUNTER_POTION3,
          ItemID.HUNTER_POTION2,
          ItemID.HUNTER_POTION1,
          ItemID.MAGIC_ESSENCE4,
          ItemID.MAGIC_ESSENCE3,
          ItemID.MAGIC_ESSENCE2,
          ItemID.MAGIC_ESSENCE1,
          ItemID.MAGIC_POTION4,
          ItemID.MAGIC_POTION3,
          ItemID.MAGIC_POTION2,
          ItemID.MAGIC_POTION1,
          ItemID.MENAPHITE_REMEDY4,
          ItemID.MENAPHITE_REMEDY3,
          ItemID.MENAPHITE_REMEDY2,
          ItemID.MENAPHITE_REMEDY1,
          ItemID.PRAYER_POTION4,
          ItemID.PRAYER_POTION3,
          ItemID.PRAYER_POTION2,
          ItemID.PRAYER_POTION1,
          ItemID.PRAYER_REGENERATION_POTION4,
          ItemID.PRAYER_REGENERATION_POTION3,
          ItemID.PRAYER_REGENERATION_POTION2,
          ItemID.PRAYER_REGENERATION_POTION1,
          ItemID.RANGING_POTION4,
          ItemID.RANGING_POTION3,
          ItemID.RANGING_POTION2,
          ItemID.RANGING_POTION1,
          ItemID.RELICYMS_BALM4,
          ItemID.RELICYMS_BALM3,
          ItemID.RELICYMS_BALM2,
          ItemID.RELICYMS_BALM1,
          ItemID.RESTORE_POTION4,
          ItemID.RESTORE_POTION3,
          ItemID.RESTORE_POTION2,
          ItemID.RESTORE_POTION1,
          ItemID.SANFEW_SERUM4,
          ItemID.SANFEW_SERUM3,
          ItemID.SANFEW_SERUM2,
          ItemID.SANFEW_SERUM1,
          ItemID.SARADOMIN_BREW4,
          ItemID.SARADOMIN_BREW3,
          ItemID.SARADOMIN_BREW2,
          ItemID.SARADOMIN_BREW1,
          ItemID.SERUM_207_4,
          ItemID.SERUM_207_3,
          ItemID.SERUM_207_2,
          ItemID.SERUM_207_1,
          ItemID.STAMINA_POTION4,
          ItemID.STAMINA_POTION3,
          ItemID.STAMINA_POTION2,
          ItemID.STAMINA_POTION1,
          ItemID.STRENGTH_POTION4,
          ItemID.STRENGTH_POTION3,
          ItemID.STRENGTH_POTION2,
          ItemID.STRENGTH_POTION1,
          ItemID.SUPER_ANTIFIRE_POTION4,
          ItemID.SUPER_ANTIFIRE_POTION3,
          ItemID.SUPER_ANTIFIRE_POTION2,
          ItemID.SUPER_ANTIFIRE_POTION1,
          ItemID.SUPER_ATTACK4,
          ItemID.SUPER_ATTACK3,
          ItemID.SUPER_ATTACK2,
          ItemID.SUPER_ATTACK1,
          ItemID.SUPER_COMBAT_POTION4,
          ItemID.SUPER_COMBAT_POTION3,
          ItemID.SUPER_COMBAT_POTION2,
          ItemID.SUPER_COMBAT_POTION1,
          ItemID.SUPER_DEFENCE4,
          ItemID.SUPER_DEFENCE3,
          ItemID.SUPER_DEFENCE2,
          ItemID.SUPER_DEFENCE1,
          ItemID.SUPER_ENERGY4,
          ItemID.SUPER_ENERGY3,
          ItemID.SUPER_ENERGY2,
          ItemID.SUPER_ENERGY1,
          ItemID.SUPER_RESTORE4,
          ItemID.SUPER_RESTORE3,
          ItemID.SUPER_RESTORE2,
          ItemID.SUPER_RESTORE1,
          ItemID.SUPER_STRENGTH4,
          ItemID.SUPER_STRENGTH3,
          ItemID.SUPER_STRENGTH2,
          ItemID.SUPER_STRENGTH1,
          ItemID.SUPERANTIPOISON4,
          ItemID.SUPERANTIPOISON3,
          ItemID.SUPERANTIPOISON2,
          ItemID.SUPERANTIPOISON1,
          ItemID.WEAPON_POISON,
          ItemID.WEAPON_POISON_5937, // +
          ItemID.WEAPON_POISON_5940, // ++
          ItemID.ZAMORAK_BREW4,
          ItemID.ZAMORAK_BREW3,
          ItemID.ZAMORAK_BREW2,
          ItemID.ZAMORAK_BREW1,

          // Mixes
          ItemID.AGILITY_MIX2,
          ItemID.AGILITY_MIX1,
          ItemID.ANCIENT_MIX2,
          ItemID.ANCIENT_MIX1,
          ItemID.ANTIPOISON_SUPERMIX2,
          ItemID.ANTIPOISON_SUPERMIX1,
          ItemID.ANTIDOTE_MIX2,
          ItemID.ANTIDOTE_MIX1,
          ItemID.ANTIFIRE_MIX2,
          ItemID.ANTIFIRE_MIX1,
          ItemID.ANTIPOISON_MIX2,
          ItemID.ANTIPOISON_MIX1,
          ItemID.ATTACK_MIX2,
          ItemID.ATTACK_MIX1,
          ItemID.COMBAT_MIX2,
          ItemID.COMBAT_MIX1,
          ItemID.DEFENCE_MIX2,
          ItemID.DEFENCE_MIX1,
          ItemID.ENERGY_MIX2,
          ItemID.ENERGY_MIX1,
          ItemID.EXTENDED_ANTIFIRE_MIX2,
          ItemID.EXTENDED_ANTIFIRE_MIX1,
          ItemID.EXTENDED_SUPER_ANTIFIRE_MIX2,
          ItemID.EXTENDED_SUPER_ANTIFIRE_MIX1,
          ItemID.FISHING_MIX2,
          ItemID.FISHING_MIX1,
          ItemID.HUNTING_MIX2,
          ItemID.HUNTING_MIX1,
          ItemID.MAGIC_ESSENCE_MIX2,
          ItemID.MAGIC_ESSENCE_MIX1,
          ItemID.MAGIC_MIX2,
          ItemID.MAGIC_MIX1,
          ItemID.PRAYER_MIX2,
          ItemID.PRAYER_MIX1,
          ItemID.RANGING_MIX2,
          ItemID.RANGING_MIX1,
          ItemID.RELICYMS_MIX2,
          ItemID.RELICYMS_MIX1,
          ItemID.RESTORE_MIX2,
          ItemID.RESTORE_MIX1,
          ItemID.STAMINA_MIX2,
          ItemID.STAMINA_MIX1,
          ItemID.STRENGTH_MIX2,
          ItemID.STRENGTH_MIX1,
          ItemID.SUPER_ANTIFIRE_MIX2,
          ItemID.SUPER_ANTIFIRE_MIX1,
          ItemID.SUPER_DEF_MIX2,
          ItemID.SUPER_DEF_MIX1,
          ItemID.SUPER_ENERGY_MIX2,
          ItemID.SUPER_ENERGY_MIX1,
          ItemID.SUPER_RESTORE_MIX2,
          ItemID.SUPER_RESTORE_MIX1,
          ItemID.SUPER_STR_MIX2,
          ItemID.SUPER_STR_MIX1,
          ItemID.SUPERATTACK_MIX2,
          ItemID.SUPERATTACK_MIX1,
          ItemID.ZAMORAK_MIX2,
          ItemID.ZAMORAK_MIX1,

          // Unfinished
          ItemID.AVANTOE_POTION_UNF,
          ItemID.CADANTINE_BLOOD_POTION_UNF,
          ItemID.CADANTINE_POTION_UNF,
          ItemID.DWARF_WEED_POTION_UNF,
          ItemID.GUAM_POTION_UNF,
          ItemID.HARRALANDER_POTION_UNF,
          ItemID.HUASCA_POTION_UNF,
          ItemID.IRIT_POTION_UNF,
          ItemID.KWUARM_POTION_UNF,
          ItemID.LANTADYME_POTION_UNF,
          ItemID.MARRENTILL_POTION_UNF,
          ItemID.RANARR_POTION_UNF,
          ItemID.SNAPDRAGON_POTION_UNF,
          ItemID.TARROMIN_POTION_UNF,
          ItemID.TOADFLAX_POTION_UNF,
          ItemID.TORSTOL_POTION_UNF
      );

Technically ItemID.VIAL are supported as well, but they're tracked differently.

The native Runelite Bank plugin has a method to parse potions for pricing purposes that's a decent starting point.

The varbit ID for "Always deposit to potion store" is 11437, which is important when using InventoryWatcher with either the bank or deposit box open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant