Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Represents different Familiar's.
- * @Author: Brandyn
- */
- public static enum Familiar {
- WOLPERTINGER(6870, 12089, FamiliarType.NORMAL, 0, 40, "Familiar Special", new FamiliarSpecial() {
- @Override
- public void execute(Object... arguments) {
- if(((Client) arguments[2]).getItems().playerHasItem(12089)) {
- ((Client) arguments[2]).startAnimation(7660);
- ((Client) arguments[2]).gfx0(1313);
- ((Client) arguments[2]).getItems().deleteItem(12089, 1);
- ((Client) arguments[2]).getPotions().enchanceStat(6, false);
- }
- }}), PACK_YAK(6873, 12093, FamiliarType.BOB, 30, 10, "Take BoB", new FamiliarSpecial() {
- @Override
- public void execute(Object... arguments) {
- if(((Client) arguments[2]).getItems().playerHasItem(12435)) {
- ((Client) arguments[2]).startAnimation(7660);
- ((Client) arguments[2]).gfx0(1316);
- ((Client) arguments[2]).getItems().bankItem((Integer) arguments[0], (Integer) arguments[1], 1);
- ((Client) arguments[2]).getItems().deleteItem(12435, 1);
- ((Client) arguments[2]).sendMessage("Your Pack Yak sends the item back to your bank.");
- }
- }});
- private Familiar(int npcId, int pouchId, FamiliarType familiarType, int storeCapacity, int specialEnergyConsumption, String clientTooltip, FamiliarSpecial familiarSpecial) {
- this.npcId = npcId;
- this.pouchId = pouchId;
- this.familiarType = familiarType;
- this.storeCapacity = storeCapacity;
- this.specialEnergyConsumption = specialEnergyConsumption;
- this.clientTooltip = "Dismiss Familiar;Renew Familiar;Call Familiar;" + clientTooltip;
- this.familiarSpecial = familiarSpecial;
- }
- public int npcId;
- public int pouchId;
- public FamiliarType familiarType;
- public int storeCapacity;
- public int specialEnergyConsumption;
- public String clientTooltip;
- public FamiliarSpecial familiarSpecial;
- public static HashMap <Integer, Familiar> familiars = new HashMap<Integer, Familiar>();
- public static Familiar forPouchId(int id) {
- return familiars.get(id);
- }
- static {
- for (Familiar f : Familiar.values())
- familiars.put(f.pouchId, f);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement