Post: [PI] Adding Full Edibles
03-05-2015, 09:36 PM #1
Stunz
Former Staff
(adsbygoogle = window.adsbygoogle || []).push({});
Guide on how to add full Edible food

Contains ALL Fruits, Fishes, Meats, Pies, Pizza's, Cakes, Sandwiches etc. AND ALSO the not-edibles such as Seaweed sandwiches which give a message when tried to eat. Also supports slices/pieces and formulas for food which give a range of x to x amount of HP, the only thing this is really missing is the effects like when eating Summer Pie your stats increase.


    package com.nardah.game.content.consumables;

/**
* @author Stan: 07/11/2014
*/
public enum EdibleData {
/** BREAD/SANDWICH */
BREAD(2309, 1),
SEAWEED_SANDWICH("You really, really do not want to eat that."),
/** FISHES */
CRAYFISH(13433, 2),
SHRIMP(315, 2),
KARAMBWANJI(3151, 2),
SARDINE(325, 2),
ANCHOVIES(319, 2),
HERRING(347, 2),
MACKEREL(355, 2),
TROUT(333, 3),
COD(339, 4),
PIKE(351, 4),
SALMON(329, 5),
COOKED_SLIMY_EEL(3381, 6 + Misc.random(4)),
TUNA(361, 6),
COOKED_KARAMBWAN(3144, 6),
RAINBOW_FISH(10136, 7),
CAVE_EEL(5003, 10),
LOBSTER(379, Cool Man (aka Tustin),
BASS(365, 9),
SWORDFISH(373, 9),
LAVA_EEL(2149, 11),
MONKFISH(7946, 13),
SHARK(385, 16),
SEA_TURTLE(397, 17),
CAVEFISH(15266, 16),
MANTA_RAY(391, 1Cool Man (aka Tustin),
ROCKTAIL(15272, 19),
/** CAKES */
FULL_CAKE(1891, 1893, 3, true),
TWO_THIRD_CAKE(1893, 1895, 3, true),
SLICE_OF_CAKE(1895, 3),
FULL_CHOCOLATE_CAKE(1897, 1899, 4, true),
TWO_THIRD_CHOCOLATE_CAKE(1899, 1901, 4, true),
SLICE_OF_CHOCOLATE_CAKE(1901, 4),
/** FRUIT */
BANANA(1963, 2),
ORANGE(2108, 2),
PAPAYA(5972, 5),
PINEAPPLE_RING(2118, 2),
PINEAPPLE_CHUNKS(2116, 2),
DWELLBERRIES(2126, 2),
JANGERBERRIES(247, 2),
//STRAWBERRIES(5504, player.playerLevel[Player.playerHitpoints] / 100 * 3);
TOMATO(1982, 2),
//WATERMELON_SLICE(5984, player.playerLevel[Player.playerHitpoints] / 100 * 5);
LEMON(2102, 2),
LIME(2120, 2),
LIME_CHUNK(2122, 2),
LIME_SLICE(2124, 2),
PEACH(6883, 4),
/** MEAT */
COOKED_MEAT(2142, 2),
COOKED_CHICKEN(2140, 2),
UGTHANKI_MEAT(1861, 3),
COOKED_RABBIT(3228, 5),
ROAST_BIRD_MEAT(9980, 6),
SPIDER_ON_STICK(6293, 7 + Misc.random(3)),
SPIDER_ON_SHAFT(6295, 7 + Misc.random(3)),
CRAB_MEAT(7521, 10),
ROAST_BEAST_MEAT(9988, Cool Man (aka Tustin),
COOKED_CHOMPY(2878, 10),
COOKED_JUBBLY(7568, 15),
OOMLIE_WRAP(2343, 14),
/** PIES */
FULL_REDBERRY_PIE(2325, 2333, 5, true),
HALF_REDBERRY_PIE(2333, 5),
FULL_MEAT_PIE(2327, 2331, 6, true),
HALF_MEAT_PIE(2331, 6),
APPLE_PIE(2323, 2335, 15, true),
HALF_APPLE_PIE(2335, 15),
GARDEN_PIE(7178, 7180, 6, true),
HALF_GARDEN_PIE(7180, 6),
FISH_PIE(7188, 7190, 24, true),
HALF_FISH_PIE(7190, 24),
ADMIRAL_PIE(7198, 7200, 8, true),
HALF_ADMIRAL_PIE(7200, Cool Man (aka Tustin),
WILD_PIE(7208, 7210, 11, true),
HALF_WILD_PIE(7210, 11),
SUMMER_PIE(7218, 7220, 11, true),
HALF_SUMMER_PIE(7220, 11),
/** PIZZAS */
PLAIN_PIZZA(2289, 2291, 7, true),
HALF_PLAIN_PIZZA(2291, 7),
MEAT_PIZZA(2293, 2295, 8, true),
HALF_MEAT_PIZZA(2295, Cool Man (aka Tustin),
ANCHOVY_PIZZA(2297, 2299, 9, true),
HALF_ANCHOVY_PIZZA(2299, 9),
PINEAPPLE_PIZZA(2301, 2303, 11, true),
HALF_PINEAPPLE_PIZZA(2303, 11),
/** POTATOES */
SPICY_SAUCE(7072, 2),
CHILLI_CON_CARNE(7062, 5),
SCRAMBLED_EGG(7078, 5),
EGG_AND_TOMATO(7064, Cool Man (aka Tustin),
FRIED_ONIONS(7084, 5),
FRIED_MUSHROOMS(7082, 5),
MUSHROOM_AND_ONION(7066, 11),
TUNA_AND_CORN(7068, 13),
BAKED_POTATO(6701, 4),
POTATO_WITH_BUTTER(6703, 14),
CHILLI_POTATO(7054, 14),
POTATO_WITH_CHEESE(6705, 16),
EGG_POTATO(7056, 16),
MUSHROOM_POTATO(7058, 20),
TUNA_POTATO(7060, 22);

private final int itemId, newItemId, healAmount;

private final boolean splittable;

private final String inedible;

private EdibleData(String inedible) {
this.inedible = inedible;
}
private EdibleData(int itemId, int healAmount) {
this.itemId = itemId;
this.healAmount = healAmount;
}
private EdibleData(int itemId, int newItemId, int healAmount, boolean splittable) {
this.itemId = itemId;
this.newItemId = newItemId;
this.healAmount = healAmount;
this.splittable = splittable;
}

public static boolean isEdible(int id) {
return EdibleData.edible.containsKey(id);
}

}

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo