Consumables¶
This file contains types and arrays of consumable items that can be used as is or by the consumable handlers in wasplib.
type EConsumable¶
EConsumable = (
FOOD,
PRAYER,
POISON,
ANTI_FIRE,
STRENGTH_BOOST,
ATTACK_BOOST,
DEFENCE_BOOST,
RANGING_BOOST,
MAGIC_BOOST,
BOOST,
ENERGY
);
EConsumable is a enumerator that contains all types of consumable.
var CONSUMABLE_ARRAYS¶
var
FOOD_ARRAY: TItemArray = ['Shrimps', 'Cooked chicken', 'Cooked meat', 'Sardine', 'Bread', 'Herring', 'Mackerel', 'Choc-ice', 'Trout', 'Cod', 'Pike', 'Roast beast meat', 'Pineapple punch', 'Salmon', 'Tuna', 'Jug of wine', 'Rainbow fish', 'Stew', 'Banana stew', 'Cake(1..3)', 'Meat pie(1..2)', 'Bass', 'Plain pizza(1..2)', 'Lobster', 'Swordfish', 'Potato with butter', 'Apple pie(1..2)', 'Chocolate cake(1..3)', 'Tangled toad' 's legs', 'Chocolate bomb', 'Potato with cheese', 'Meat pizza(1..2)', 'Admiral pie(1..2)', 'Monkfish', 'Anchovy pizza(1..2)', 'Cooked karambwan', 'Curry', 'Ugthanki kebab', 'Guthix rest(1..4)', 'Dragonfruit pie(1..2)', 'Mushroom potato', 'Shark', 'Sea turtle', 'Pineapple pizza(1..2)', 'Summer pie(1..2)', 'Wild pie(1..2)', 'Manta ray', 'Tuna potato', 'Dark crab', 'Anglerfish', 'Saradomin brew(1..4)'];
PRAYER_ARRAY: TItemArray = ['Zamorak brew(1..4)', 'Sanfew serum(1..4)', 'Super restore(1..4)', 'Prayer potion(1..4)', 'Jangerberries'];
ENERGY_ARRAY: TItemArray = ['White tree fruit', 'Winter sq' 'irkjuice', 'Spring sq' 'irkjuice', 'Autumn sq' 'irkjuice', 'Summer sq' 'irkjuice', 'Bandages', 'Guthix rest(1..4)', 'Papaya fruit', 'Energy potion(1..4)', 'Purple sweets', 'Summer pie(1..2)', 'Super energy(1..4)', 'Stamina potion(1..4)', 'Strange fruit', 'Mint cake', 'Gout tuber'];
ANTI_POISON_ARRAY: TItemArray = ['Sanfew serum(1..4)', 'Anti-venom+(1..4)', 'Anti-venom(1..4)', 'Antidote++(1..4)', 'Antidote+(1..4)', 'Superantipoison(1..4)', 'Antipoison(1..4)', 'Extended anti-venom+(1..4)'];
ANTI_FIRE_ARRAY: TItemArray = ['Antifire potion(1..4)', 'Super antifire potion(1..4)', 'Extended antifire(1..4)', 'Extended super antifire(1..4)'];
BOOST_ARRAY: TItemArray = ['Divine super combat potion(1..4)', 'Super combat potion(1..4)', 'Divine bastion potion(1..4)', 'Bastion potion(1..4)', 'Divine battlemage potion(1..4)', 'Battlemage potion(1..4)'];
STRENGTH_BOOST_ARRAY: TItemArray = ['Divine super strength potion(1..4)', 'Super strength(1..4)', 'Strength potion(1..4)'];
ATTACK_BOOST_ARRAY: TItemArray = ['Divine super attack potion(1..4)', 'Super attack(1..4)', 'Attack potion(1..4)'];
DEFENCE_BOOST_ARRAY: TItemArray = ['Divine super defence potion(1..4)', 'Super defence(1..4)', 'Defence potion(1..4)'];
RANGING_BOOST_ARRAY: TItemArray = ['Divine ranging potion(1..4)', 'Ranging potion(1..4)'];
MAGIC_BOOST_ARRAY: TItemArray = ['Divine magic potion(1..4)', 'Magic potion(1..4)'];
TRASH_ARRAY: TItemArray = ['Cocktail glass', 'Jug', 'Bowl', 'Pie dish', 'Vial', 'Beer glass', 'Empty cup'];
CONSUMABLE_ARRAYS: array [EConsumable] of TItemArray = [FOOD_ARRAY, PRAYER_ARRAY, ENERGY_ARRAY, ANTI_POISON_ARRAY, ANTI_VENOM_ARRAY, ANTI_FIRE_ARRAY, BOOST_ARRAY, STRENGTH_BOOST_ARRAY, ATTACK_BOOST_ARRAY, DEFENCE_BOOST_ARRAY, RANGING_BOOST_ARRAY, MAGIC_BOOST_ARRAY];
Global consumable arrays variables. These arrays holds all types of consumable for each respective purpose with the exception of TRASH_ARRAY which are possible left over items from consumables. They are in UPPERCASE because they are intended to be treated as constants but are variables in case the user whishes to modify them.
CONSUMABLE_ARRAYS is an array of all consumables. One can access a consumable array type easiely like so:
WriteLn CONSUMABLE_ARRAYS[EConsumable.ENERGY];
type TConsumable¶
TConsumable = record
Item: TItem;
Points: UInt32;
Timer: UInt32;
BankTab: Int32;
Cost: Int32;
IsSetup: Boolean;
end;
TConsumableArray = array of TConsumable;
TConsumable is the record used in all consumables. It contains base properties all consumables have.
type TConsumableType¶
type
TFood = type TConsumable;
TFoodArray = array of TFood;
TPrayerPotion = type TConsumable;
TPrayerPotionArray = array of TPrayerPotion;
TEnergyBoost = type TConsumable;
TEnergyBoostArray = array of TEnergyBoost;
TBoost = record(TConsumable)
Skills: array of ESkill;
LevelsBoost: TIntegerArray;
Countdown: TCountdown;
end;
TBoosArray = array of TBoost;
Types used in all consumables for each respective purpose. This includes food and certain potions. TBoost type of consumable has a timer to keep track when it lost it’s effect after being eaten/drank.
Consumable._Setup¶
procedure TConsumable._Setup();
Used internally by consumable handlers/managers to setup common things among all consumable records.
Consumable.Setup¶
procedure TConsumable.SetupFood();
procedure TConsumable.SetupPrayer();
procedure TConsumable.SetupEnergy();
procedure TConsumable.SetupAntiPoison();
procedure TConsumable.SetupAntiFire();
procedure TConsumable.SetupBoost();
Used internally by consumable handlers/managers to setup the consumable records.
ConsumableArray.Contains()¶
function TConsumableArray.Contains(Value: TItem): Boolean;
Wrapper method to check if a TConsumableArray has the specified TItem in one of it’s TConsumables.
ConsumableArray.Reversed()¶
function TConsumableArray.Reversed(): TConsumableArray;
Reverses the order of the TConsumableArray.
var TotalConsumableCost¶
Global TotalConsumableCost variable used to track the amount of money spent in by consuming consumables.