Jump to content

[Snippet] Item Patterns


Chovy

Recommended Posts

Ideally, you should be using a framework.

 

Here is a snippet of what it should look like...

 

package com.epicbot.framework.items;

import java.util.Arrays;
import java.util.List;
import java.util.regex.Pattern;

public class ItemPatterns {

    public static final Pattern IMBUED_HEART = Pattern.compile("(?:(?:Imbued)|(?:Saturated)) heart");
    public static final String INVIGORATE = "Invigorate";
    public static final Pattern AVARICE = Pattern.compile("Amulet of avarice");
    public static final Pattern EGG_POTATO = Pattern.compile("Egg potato");
    public static final Pattern SAPPHIRE_LANTERN = Pattern.compile("Sapphire lantern");
    public static final String AGA_PASTE = "Aga paste";
    public static final String LYE_PASTE = "Lye paste";
    public static final String MOX_PASTE = "Mox paste";
    public static final Pattern SEAWEED = Pattern.compile("Seaweed");
    public static final Pattern BUCKET_OF_SAND = Pattern.compile("Bucket of sand");
    public static final Pattern COINS_PATTERN = Pattern.compile("Coins");

    /**
     * Prayer
     */
    public static final Pattern PRAYER_POTION = Pattern.compile("Prayer potion");
    public static final Pattern SUPER_RESTORE = Pattern.compile("Super restore");
    public static final Pattern RESTORE_POTION = Pattern.compile("Restore potion");

    public static final Pattern BLIGHTED_SUPER_RESTORE = Pattern.compile("Blighted super restore");

    /**
     * 4 Dose Prayers
     */
    public static final Pattern PRAYER_POTION_4 = Pattern.compile("Prayer potion\\(4\\)");
    public static final Pattern SUPER_RESTORE_4 = Pattern.compile("Super restore\\(4\\)");
    public static final Pattern RESTORE_POTION_4 = Pattern.compile("Restore potion\\(4\\)");

    public static final Pattern BLIGHTED_SUPER_RESTORE_4 = Pattern.compile("Blighted super restore(4)");

    /**
     * Items
     */
    public static final Pattern RUNES = Pattern.compile(".* rune");
    public static final Pattern LOOTING_BAG = Pattern.compile("Looting bag");
    public static final Pattern DRAKANS_MEDALLION = Pattern.compile("Drakan's medallion");
    public static final Pattern DODGY_NECKLACE = Pattern.compile("Dodgy necklace");
    public static final Pattern WATERING_CAN = Pattern.compile("Watering can ?(\\d+)");
    public static final String ROPE = "Rope";
    public static final String SPADE_STRING = "Spade";
    public static final String WILD_PIE = "Wild pie";
    public static final String WILD_PIE_HALF = "Half a wild pie";
    public static final String ASH_SANCTIFIER_STRING = "Ash sanctifier";
    public static final Pattern SPADE = Pattern.compile("Spade");
    public static final Pattern DRAMEN_STAFF = Pattern.compile("(?:(?:Dramen)|(?:Lunar)) staff");
    public static final String LOCATOR_ORB = "Locator orb";
    public static final String DWARVEN_ROCKCACKE = "Dwarven rock cake";
    public static final Pattern RUNE_POUCH = Pattern.compile("(Divine )?Rune pouch( \\(l\\))?");
    public static final Pattern DIVINE_RUNE_POUCH = Pattern.compile("Divine rune pouch");
    public static final Pattern ASH_SANCTIFIER = Pattern.compile("Ash sanctifier");
    public static final Pattern LOCKPICK = Pattern.compile("Lockpick");
    public static final Pattern KNIFE = Pattern.compile("Knife");
    public static final String PHOENIX_NECKLACE = "Phoenix necklace";
    public static final String BLOOD_ESSENCE_ACTIVE = "Blood essence (active)";
    public static final String BLOOD_ESSENCE = "Blood essence";
    public static final String NINJA_MONKEY_GREEGREE = "Ninja monkey greegree";
    public static final String KRUK_MONKEY_GREEGREE = "Kruk monkey greegree";
    public static final String BONES_TO_BANANAS = "Bones to bananas";
    public static final String BANANA = "Banana";
    public static final String DAMAGED_MONKEY_TAIL = "Damaged monkey tail";
    public static final String BONES = "Bones";
    public static final String COINS = "Coins";
    public static final String CRYSTAL_SHARD = "Crystal shard";
    public static final String BIRD_NEST = "Bird nest";
    public static final String LAW_RUNE = "Law rune";
    public static final String ASTRAL_RUNE = "Astral rune";
    public static final String RING_OF_RECOIL = "Ring of recoil";

    /**
     * Combat potions
     */

    public static final Pattern COMBAT_POTION_4 = Pattern.compile("Combat potion(4)");
    public static final Pattern SUPER_STRENGTH_4 = Pattern.compile("Super strength\\(4\\)");
    public static final Pattern SUPER_COMBAT_POTION_4 = Pattern.compile("Super combat potion\\(4\\)");
    public static final Pattern DIVINE_SUPER_COMBAT_POTION_4 = Pattern.compile("Divine super combat potion\\(4\\)");
    public static final Pattern DIVINE_SUPER_STRENGTH_4 = Pattern.compile("Divine super strength potion\\(4\\)");
    public static final Pattern DIVINE_BATTLEMAGE_POTION_4 = Pattern.compile("Divine battlemage potion\\(4\\)");
    public static final Pattern BATTLEMAGE_POTION_4 = Pattern.compile("Battlemage potion\\(4\\)");
    public static final Pattern DIVINE_MAGE_POTION_4 = Pattern.compile("Divine magic potion\\(4\\)");
    public static final Pattern MAGIC_POTION_4 = Pattern.compile("Magic potion\\(4\\)");
    public static final Pattern RANGING_POTION_4 = Pattern.compile("Ranging potion\\(4\\)");
    public static final Pattern DIVINE_RANGING_POTION_4 = Pattern.compile("Divine ranging potion\\(4\\)");
    public static final Pattern DIVINE_BASTION_RANGING_4 = Pattern.compile("Divine bastion potion\\(4\\)");
    /**
     * Normal version of combat potions
     */
    public static final Pattern COMBAT_POTION = Pattern.compile("Combat potion");
    public static final Pattern SUPER_STRENGTH = Pattern.compile("Super strength");
    public static final Pattern SUPER_COMBAT_POTION = Pattern.compile("Super combat potion");
    public static final Pattern DIVINE_SUPER_STRENGTH = Pattern.compile("Divine super strength potion");
    public static final Pattern DIVINE_SUPER_COMBAT_POTION = Pattern.compile("Divine super combat potion");
    public static final Pattern DIVINE_BATTLEMAGE_POTION = Pattern.compile("Divine battlemage potion");
    public static final Pattern BATTLEMAGE_POTION = Pattern.compile("Battlemage potion");
    public static final Pattern DIVINE_MAGE_POTION = Pattern.compile("Divine magic potion");
    public static final Pattern MAGIC_POTION = Pattern.compile("Magic potion");
    public static final Pattern RANGING_POTION = Pattern.compile("Ranging potion");
    public static final Pattern DIVINE_RANGING_POTION = Pattern.compile("Divine ranging potion");
    public static final Pattern DIVINE_BASTION_RANGING = Pattern.compile("Divine bastion potion");


    /**
     * Other potions
     */

    public static final Pattern ANTIFIRE = Pattern.compile("Antifire potion");
    public static final Pattern SUPER_ANTIFIRE = Pattern.compile("Super antifire potion");
    public static final Pattern EXTENDED_ANTIFIRE = Pattern.compile("Extended antifire");
    public static final Pattern EXTENDED_SUPER_ANTIFIRE = Pattern.compile("Extended super antifire");
    public static final Pattern ANTIPOISON = Pattern.compile("Antipoison");
    public static final Pattern SUPER_ANTIPOISON = Pattern.compile("Superantipoison");
    public static final Pattern ANTIDOTE_PLUS = Pattern.compile("Antidote+");
    public static final Pattern ANTIDOTE_PLUS_PLUS = Pattern.compile("Antidote++");
    public static final Pattern ANTI_VENOM = Pattern.compile("Anti-venom");
    public static final Pattern ANTI_VENOM_PLUS = Pattern.compile("Anti-venom+");
    public static final Pattern STAMINA4DOSE = Pattern.compile("Stamina potion\\(4\\)");
    public static final Pattern PRAYER4DOSE = Pattern.compile("Prayer potion\\(4\\)");
    public static final Pattern prayerPotion = Pattern.compile("Prayer potion\\(4\\)");
    public static final Pattern STAMINA_POTION = Pattern.compile("Stamina potion.*");
    public static final Pattern ENERGY_POTION = Pattern.compile("Energy potion.*");
    public static final Pattern SUPER_ENERGY_POTION_4 = Pattern.compile("Super energy\\(4\\)");

    /**
     * Teleports
     */
    public static final Pattern BURNING_AMULET = Pattern.compile("Burning amulet.*");
    public static final Pattern GHORROCK_TAB = Pattern.compile("Ghorrock Teleport");
    public static final Pattern RING_OF_DUELING = Pattern.compile("Ring of dueling.*");
    public static final Pattern HOUSE_TAB_PATTERN = Pattern.compile("Teleport to house");
    public static final Pattern GAMES_NECK = Pattern.compile("Games necklace\\([1-8]\\)");
    public static final Pattern GUTHIX_TEMPLE_TELEPORT = Pattern.compile("Guthixian temple teleport");
    public static final String HOUSE_TAB = "Teleport to house";
    //public static final Pattern houseTabPattern = Pattern.compile("Teleport to house");
    public static final Pattern VARROCK_TAB = Pattern.compile("Varrock teleport");
    public static final Pattern FALADOR_TAB = Pattern.compile("Falador teleport");
    public static final String FALADOR_TAB_STRING = "Falador teleport";
    public static final Pattern BATTLEFRONT_TAB = Pattern.compile("Battlefront teleport");
    public static final Pattern REV_CAVE_SCROLL = Pattern.compile("Revenant cave teleport");
    public static final Pattern SEEDPOD = Pattern.compile("Royal seed pod");
    public static final Pattern GLORY = Pattern.compile("Amulet of glory\\([1-6]\\)");
    public static final String SPECTRAL_SPIRIT_SHIELD = "Spectral spirit shield";
    public static final String KEY_MASTER_TELEPORT = "Key master teleport";
    public static final String xerics_Talisman = "Xeric's talisman";
    public static final Pattern XERICS_TALISMAN = Pattern.compile("Xeric's talisman");
    public static final Pattern MEMOIRS = Pattern.compile("(Kharedst's memoirs|Book of the dead)");
    public static final Pattern BOOK_OF_DEAD = Pattern.compile("Book of the dead");
    public static final Pattern SOUL_RUNE = Pattern.compile("Soul rune");
    public static final Pattern WATSON_TELEPORT = Pattern.compile("Watson teleport");
    public static final Pattern WILDY_SWORD_4 = Pattern.compile("Wilderness sword 4");
    public static final Pattern ROW = Pattern.compile("Ring of wealth \\([2-5]\\)");
    public static final Pattern SLAYER_RING = Pattern.compile("Slayer ring.*");
    public static final Pattern NECKLACE_OF_PASSAGE = Pattern.compile("Necklace of passage\\([1-5]\\)");
    public static final Pattern SKILLS_NECKLACE = Pattern.compile("Skills necklace(.*)");
    public static final Pattern COMBAT_BRACELET = Pattern.compile("Combat bracelet.*");
    public static final String FREM_BOOTS = "Fremennik sea boots 4";
    public static final Pattern FREMBOOTS_PATTERN = Pattern.compile("Fremennik sea boots 4");
    public static final Pattern WILDERNESS_SWORD = Pattern.compile("Wilderness sword.*");
    public static final Pattern CONSTRUCTION_CAPE = Pattern.compile("Construct\\. cape.*");
    public static final Pattern CRAFTING_CAPE = Pattern.compile("Crafting cape.*");
    public static final Pattern BONE_CRUSHER = Pattern.compile("Bonecrusher");
    public static final Pattern HERB_SACK = Pattern.compile("(Open )?Herb sack", Pattern.CASE_INSENSITIVE);
    public static final Pattern SEED_BOX = Pattern.compile("(Open )?seed box", Pattern.CASE_INSENSITIVE);
    public static final Pattern FIRE_RUNE = Pattern.compile("Fire rune");
    public static final Pattern NATURE_RUNE = Pattern.compile("Nature rune");
    public static final Pattern RADAS_BLESSING = Pattern.compile("Rada.*");
    public static final Pattern ARDY_CLOAK = Pattern.compile("Ardougne cloak.*");
    public static final Pattern QUEST_CAPE = Pattern.compile("Quest point cape.*");
    public static final String CONSTRUCTION_CAPE_POH_ACTION = "Tele to POH";
    public static final String NUMULITE = "Numulite";
    public static final Pattern RING_OF_STONE = Pattern.compile("Ring of stone");
    public static final Pattern RING_OF_THE_ELEMENTS = Pattern.compile("Ring of the elements");
    /**
     * Essence Pouches
     */
    public static final String SMALL_POUCH = "Small pouch";
    public static final String MEDIUM_POUCH = "Medium pouch";
    public static final String LARGE_POUCH = "Large pouch";
    public static final String GIANT_POUCH = "Giant pouch";
    public static final String COLOSSAL_POUCH = "Colossal pouch";

    public static final List<Integer> rangedBoosts = Arrays.asList(
            23742, // divine
            23739,
            23736,
            23733,
            173, // ranged
            171,
            169,
            2444);
    public static final List<Integer> combatBoosts = Arrays.asList(
            23694, //1 dose divine
            23691, //2 dose divine
            23688, //3 dose divine
            23685,  //4 dose divine
            12701, //1 dose
            12699, //2 dose
            12697, //3 dose
            12695  //4 dose
    );
    public static final List<Integer> attackBoosts = Arrays.asList(
            23706, //1 dose divine
            23703, //2 dose divine
            23700, //3 dose divine
            23697,  //4 dose divine
            149, //1 dose
            147, //2 dose
            145, //3 dose
            2436 //4 dose
    );
    public static final List<Integer> strengthBoosts = Arrays.asList(
            23718, //1 dose divine
            23715, //2 dose divine
            23712, //3 dose divine
            23709,  //4 dose divine
            161, //1 dose
            159, //2 dose
            157, //3 dose
            2440 //4 dose
    );
    public static final List<Integer> defenceBoosts = Arrays.asList(
            23730, //1 dose divine
            23727, //2 dose divine
            23724, //3 dose divine
            23721,  //4 dose divine
            167, //1 dose
            165, //2 dose
            163, //3 dose
            2442 //4 dose
    );
    public static final List<Integer> prayerRestores = Arrays.asList(
            143,//1 dose prayer
            141,//2 dose prayer
            139,//3 dose prayer
            2434,//4 dose prayer
            3030,//1 dose super restore
            3028,//2 dose super restore
            3026,//3 dose super restore
            3024 //4 dose super restore
    );
    public static final List<Integer> antiPoisonPP = Arrays.asList(
            5958,
            5956,
            5954,
            5952
    );
    public static final List<Pattern> antiPoisonPPattern = Arrays.asList(
            Pattern.compile("Superantipoison.*"),
            Pattern.compile("Antipoison.*")
    );

}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...