Thread: [Elvarg/ANY OSRS] Pets - Full Release - UPDATE #3

Page 1 of 5 123 ... LastLast
Results 1 to 10 of 43
  1. #1 [Elvarg/ANY OSRS] Pets - Full Release - UPDATE #3 
    What's a sundial in the shade?

    Lumiere's Avatar
    Join Date
    May 2013
    Age
    24
    Posts
    538
    Thanks given
    216
    Thanks received
    98
    Rep Power
    113
    Could probably be improved even further, but this is what I have for now.
    Upon adding the boss/slayer pets, I noticed the system itself wasn't handled very well, so I've re-wrote it.
    This isn't 100% complete as not every pet has been added, but EVERY boss/slayer/skill pet is included, as-well as metamorphosis.

    Credits to [Only registered and activated users can see links. ] as the pets and everything were already in the OSRS PK source,
    I've simply written the definitions, and re-written how it is handled, so they can be properly utilized.

    • Current Pet Count: 32 (51 including Morphs!) - All Slayer/Boss Pets & Skill Pets
    • Original Pet Count: 24 (28 including Morphs!)

    • NOTE: This may seem like a lot for simple pets, but it's really not.
    • I've simply broken it down into multiple Spoilers, so it appears to be a lot.

    • UPDATES:
    • EVERYTHING has been updated! Please check everything and update yourself accordingly.
    • Every slayer/boss pet dialogue is complete, should be about 99% exact to OSRS, (1% being FEW minor changes.)
    • Replaced the Map with an Optional, helped clean everything up, and fix a few errors!
    • If you use this, check back! This thread is frequently updated.

    POSSIBLY more to be added! So far every slayer/boss pet, and every skill pet!
    Morphing works 100%! Dialogues possibly soon to come as-well!



    CLIENT-SIDE, ONE THING...


    In NpcDefinition class;
    Spoiler for NpcDefinition:
    Declare this somewhere.
    Code:
    	private static final String PETS [][] = {
    		{"318", "Dark Core"}, {"495", "Venenatis Spiderling"},
    		{"497", "Callisto Cub"}, {"964", "Hellpuppy"},
    		{"2055", "Chaos Elemental Jr."}, {"2130", "Snakeling"},
    		{"2131", "Magma Snakeling"}, {"2132", "Tanzanite Snakeling"},
    		{"5536", "Vet'ion"}, {"5537", "Vet'ion Reborn"},
    		{"5561", "Scorpias' Offspring"}, {"5884", "Abyssal Orphan"},
    		{"5892", "TzRek-Jad"}, {"6628", "Dagganoth Supreme Jr."},
    		{"6629", "Dagganoth Prime Jr."}, {"6630", "Dagganoth Rex Jr."},
    		{"6631", "Chick'arra"}, {"6632", "General Awwdor"},
    		{"6633", "Commander Miniana"}, {"6634", "K'ril Tinyroth"},
    		{"6635", "Baby Mole"}, {"6636", "Prince Black Dragon"},
    		{"6637", "Kalphite Princess"}, {"6638", "Kalphite Princess"},
    		{"6639", "Smoke Devil"}, {"6640", "Baby Kraken"},
    		{"6642", "Penance Princess"}, {"7520", "Olmlet"},
    		
    		{"6715", "Heron"}, {"6717", "Beaver"}, {"6718", "Red Chinchompa"},
    		{"6719", "Grey Chinchompa"}, {"6720", "Black Chimchompa"}, {"6723", "Rock Golem"},
    		{"7334", "Giant Squirrel"}, {"7335", "Tangleroot"}, {"7336", "Rocky"},
    		
    		{"7337", "Fire Rift Guardian"}, {"7338", "Air Rift Guardian"},
    		{"7339", "Mind Rift Guardian"}, {"7340", "Water Rift Guardian"},
    		{"7341", "Earth Rift Guardian"}, {"7342", "Body Rift Guardian"},
    		{"7343", "Cosmic Rift Guardian"}, {"7344", "Chaos Rift Guardian"},
    		{"7345", "Nature Rift Guardian"}, {"7346", "Law Rift Guardian"},
    		{"7347", "Death Rift Guardian"}, {"7348", "Soul Rift Guardian"},
    		{"7349", "Astral Rift Guardian"}, {"7350", "Blood Rift Guardian"}
    	};
    then, add this where you handle NPCs definitions (usually by id), and above any switch statement if you have one.
    Code:
    		for (int i = 0; i < PETS.length; i++) {
    			if (id == Integer.parseInt(PETS[i][0])) {
    				definition.fixSlide();
    				definition.name = PETS[i][1];
    			}
    		}
    		if (id == Integer.parseInt(PETS[22][0]) || id == Integer.parseInt(PETS[23][0])) {
    			definition.actions[2] = "Pick-up";
    			definition.actions[3] = "Metamorphosis";
    		}
    		if (id == Integer.parseInt(PETS[8][0]) || id == Integer.parseInt(PETS[9][0]) 
    		|| id >= Integer.parseInt(PETS[37][0]) && id <= Integer.parseInt(PETS[50][0]) 
    		|| id >= Integer.parseInt(PETS[30][0]) && id <= Integer.parseInt(PETS[32][0])) {
    			definition.actions[3] = "Metamorphosis";
    		}
    In the client OSRS PK uses the method you'll add this in is;
    Code:
    	public static NpcDefinition lookup(int id) {



    The rest is SERVER SIDED!

    Add this to npc_definitions.json
    Spoiler for npc_definitions:
    Code:
    	{
    		"npcId": 318,
            "name": "Dark Core",
    		"examine": "Isn't so annoying now.."
        },
    	{
    		"npcId": 495,
            "name": "Venenatis spiderling",
    		"examine": "Vacuum proof."
        },
    	{
    		"npcId": 497,
            "name": "Callisto cub",
    		"examine": "I wouldn't want to eat his Porridge."
        },
    	{
    		"npcId": 964,
            "name": "Hellpuppy",
    		"examine": "A fiery little pup!"
        },
    	{
    		"npcId": 2055,
            "name": "Chaos Elemental Jr.",
    		"examine": "D'aw look at the liddle..."
        },
    	{
    		"npcId": 2130,
            "name": "Snakeling",
    		"examine": "A slithering serpent spawn of Zulrah. "
        },
    	{
    		"npcId": 2131,
            "name": "(Magma) Snakeling",
    		"examine": "A slithering serpent spawn of Zulrah. "
        },
    	{
    		"npcId": 2132,
            "name": "(Tanzanite) Snakeling",
    		"examine": "A slithering serpent spawn of Zulrah. "
        },
    	{
    		"npcId": 5536,
            "name": "Vet'ion Jr.",
    		"examine": "Only the true lord & king of the lands can lift his burden."
        },
    	{
    		"npcId": 5537,
            "name": "Vet'ion Jr. (Reborn)",
    		"examine": "Only the true lord & king of the lands can lift his burden."
        },
    	{
    		"npcId": 5561,
            "name": "Scorpia's offspring",
    		"examine": "A scuttling little scorpion with an incredibly vicious tail."
        },
    	{
    		"npcId": 5884,
            "name": "Abyssal Orphan",
    		"examine": "Born in the death throes of an Abyssal Sire."
        },
    	{
    		"npcId": 5892,
            "name": "TzRek-Jad",
    		"examine": "This is not going to hurt... but it might tickle."
        },
    	{
    		"npcId": 6628,
            "name": "Supreme hatchling",
    		"examine": "Wouldn't want that sleeping at the end of my bed."
        },
    	{
    		"npcId": 6629,
            "name": "Prime hatchling",
    		"examine": "Has the same temper as it's father."
        },
    	{
    		"npcId": 6630,
            "name": "Rex hatchling",
    		"examine": "They do say if you like it you should put a ring on it."
        },
    	{
    		"npcId": 6631,
            "name": "Chick'arra",
    		"examine": "Is it a bird, is it... no it's a bird."
        },
    	{
    		"npcId": 6632,
            "name": "General Awwdor",
    		"examine": "Totally unintelligible."
        },
    	{
    		"npcId": 6633,
            "name": "Commander Miniana",
    		"examine": "Commander of Saradomin's forces' pets."
        },
    	{
    		"npcId": 6634,
            "name": "K'ril Tinyroth",
    		"examine": "Where did he even come from?"
        },
    	{
    		"npcId": 6635,
            "name": "Baby Mole",
    		"examine": "Keep Molin', molin', molin', molin'!"
        },
    	{
    		"npcId": 6636,
            "name": "Prince Black Dragon",
    		"examine": "Not quite the full royalty yet."
        },
    	{
    		"npcId": 6637,
            "name": "Kalphite Princess",
    		"examine": "Suggests there's a king nearby."
        },
    	{
    		"npcId": 6638,
            "name": "(Morphed) Kalphite Princess",
    		"examine": "Suggests there's a king nearby."
        },
    	{
    		"npcId": 6639,
            "name": "Smoke Devil",
    		"examine": "*cough*"
        },
    	{
    		"npcId": 6640,
            "name": "Kraken",
    		"examine": "How.... is it walking?"
        },
    	{
    		"npcId": 6642,
            "name": "Penance Princess",
    		"examine": "Run away! Run aw... wait, it's tiny..."
        },
    	{
    		"npcId": 6715,
            "name": "Heron",
    		"examine": "A long-legged bird that likes to fish."
        },
    	{
    		"npcId": 6717,
            "name": "Beaver",
    		"examine": "Looks like it's gotten through a lot of wood."
        },
    	{
    		"npcId": 6718,
            "name": "Baby Chinchompa",
    		"examine": "Fluffy and cute, keep away from fire!"
        },
    	{
    		"npcId": 6719,
            "name": "Baby Chinchompa",
    		"examine": "Fluffy and cute, keep away from fire!"
        },
    	{
    		"npcId": 6720,
            "name": "Baby Chinchompa",
    		"examine": "Fluffy and cute, keep away from fire!"
        },
    	{
    		"npcId": 6723,
            "name": "Rock Golem",
    		"examine": "Found somewhere between a rock and a hard place."
        },
    	{
    		"npcId": 7334,
            "name": "Giant Squirrel",
    		"examine": "A giant squirrel with beautiful markings."
        },
    	{
    		"npcId": 7335,
            "name": "Tangleroot",
    		"examine": "Don't be hasty."
        },
    	{
    		"npcId": 7336,
            "name": "Rocky",
    		"examine": "Raccoons, like pandas but worse."
        },
    	{
    		"npcId": 7337,
            "name": "Rift Guardian",
    		"examine": "An abyssal rift guardian."
        },
    	{
    		"npcId": 7338,
            "name": "Rift Guardian",
    		"examine": "An abyssal rift guardian."
        },
    	{
    		"npcId": 7339,
            "name": "Rift Guardian",
    		"examine": "An abyssal rift guardian."
        },
    	{
    		"npcId": 7340,
            "name": "Rift Guardian",
    		"examine": "An abyssal rift guardian."
        },
    	{
    		"npcId": 7341,
            "name": "Rift Guardian",
    		"examine": "An abyssal rift guardian."
        },
    	{
    		"npcId": 7342,
            "name": "Rift Guardian",
    		"examine": "An abyssal rift guardian."
        },
    	{
    		"npcId": 7343,
            "name": "Rift Guardian",
    		"examine": "An abyssal rift guardian."
        },
    	{
    		"npcId": 7344,
            "name": "Rift Guardian",
    		"examine": "An abyssal rift guardian."
        },
    	{
    		"npcId": 7345,
            "name": "Rift Guardian",
    		"examine": "An abyssal rift guardian."
        },
    	{
    		"npcId": 7346,
            "name": "Rift Guardian",
    		"examine": "An abyssal rift guardian."
        },
    	{
    		"npcId": 7347,
            "name": "Rift Guardian",
    		"examine": "An abyssal rift guardian."
        },
    	{
    		"npcId": 7348,
            "name": "Rift Guardian",
    		"examine": "An abyssal rift guardian."
        },
    	{
    		"npcId": 7349,
            "name": "Rift Guardian",
    		"examine": "An abyssal rift guardian."
        },
    	{
    		"npcId": 7350,
            "name": "Rift Guardian",
    		"examine": "An abyssal rift guardian."
        },
    	{
    		"npcId": 7520,
            "name": "Olmlet",
    		"examine": "The cuddly Spawn of the Guardian in the Deep."
        },


    Replace your BossPet class with this;
    Spoiler for Pets class:
    Code:
    package com.elvarg.world.model;
    /**
     * @author Lumiere
     */
    import java.util.Arrays;
    import java.util.Optional;
    
    import com.elvarg.util.Misc;
    import com.elvarg.world.entity.impl.player.Player;
    
    public enum Pets {
    
    	//BOSS & SLAYER PETS
    	DARK_CORE(318, 0, 12816, 123),
    	VENENATIS_SPIDERLING(495, 0, 13177, 126),
    	CALLISTO_CUB(497, 0, 13178, 130),
    	HELLPUPPY(964, 0, 13247, 138) {
    		@Override
    		public int getDialogue(Player player) {
    			return Misc.getRandomIndex(new int [] {138, 143, 145, 150, 154});
    		}
    	},
    	CHAOS_ELEMENTAL_JR(2055, 0, 11995, 158),
    	SNAKELING(2130, 2131, 12921, 162),
    	MAGMA_SNAKELING(2131, 2132, 12921, 169),
    	TANZANITE_SNAKELING(2132, 2130, 12921, 176),
    	VETION_JR(5536, 5537, 13179, 183),
    	VETION_JR_REBORN(5537, 5536, 13179, 189),
    	SCORPIAS_OFFSPRING(5561, 0, 13181, 195),
    	ABYSSAL_ORPHAN(5884, 0, 13262, 202) {
    		@Override
    		public int getDialogue(Player player) {
    			if (!player.getAppearance().isMale()) {
    				return 206;
    			} else 
    				return Misc.getRandomIndex(new int [] {202, 209});
    		}
    	},
    	TZREK_JAD(5892, 0, 13225, 212) {
    		@Override
    		public int getDialogue(Player player) {
    			return Misc.getRandomIndex(new int [] {212, 217});
    		}
    	},
    	SUPREME_HATCHLING(6628, 0, 12643, 220),
    	PRIME_HATCHLING(6629, 0, 12644, 223),
    	REX_HATCHLING(6630, 0, 12645, 231),
    	CHICK_ARRA(6631, 0, 12649, 239),
    	GENERAL_AWWDOR(6632, 0, 12650, 247),
    	COMMANDER_MINIANA(6633, 0, 12651, 250) {
    		@Override
    		public int getDialogue(Player player) {
    			if (player.getEquipment().contains(11806)) {
    				return 252;
    			} else 
    				return 250;
    		}
    	},
    	KRIL_TINYROTH(6634, 0, 12652, 254),
    	BABY_MOLE(6635, 0, 12646, 261),
    	PRINCE_BLACK_DRAGON(6636, 0, 12653, 267),
    	KALPHITE_PRINCESS(6637, 6638, 12654, 271),
    	MORPHED_KALPHITE_PRINCESS(6638, 6637, 12654, 279),
    	SMOKE_DEVIL(6639, 0, 12648, 288),
    	KRAKEN(6640, 0, 12655, 291),
    	PENANCE_PRINCESS(6642, 0, 12703, 296),
    	OLMLET(7520, 0, 20851, 298),
    	
    	//SKILL PETS
    	HERON(6715, 0, 13320, -1),
    	BEAVER(6717, 0, 13322, -1),
    	RED_CHINCHOMPA(6718, 6719, 13323, -1),
    	GREY_CHINCHOMPA(6719, 6720, 13324, -1),
    	BLACK_CHINCHOMPA(6720, 6718, 13325, -1),
    	ROCK_GOLEM(6723, 0, 13321, -1),
    	GIANT_SQUIRREL(7334, 0, 20659, -1),
    	TANGLEROOT(7335, 0, 0, -1),
    	ROCKY(7336, 0, 0, -1),
    	
    	//RIFT GUARDIANS (SKILL PETS)
    	FIRE_RIFT_GAURDIAN(7337, 7338, 20665, -1),
    	AIR_RIFT_GUARDIAN(7338, 7339, 20667, -1),
    	MIND_RIFT_GUARDIAN(7339, 7340, 20669, -1),
    	WATER_RIFT_GUARDIAN(7340, 7341, 20671, -1),
    	EARTH_RIFT_GUARDIAN(7341, 7342, 20673, -1),
    	BODY_RIFT_GUARDIAN(7342, 7343, 20675, -1),
    	COSMIC_RIFT_GUARDIAN(7343, 7344, 20677, -1),
    	CHAOS_RIFT_GUARDIAN(7344, 7345, 20679, -1),
    	NATURE_RIFT_GUARDIAN(7345, 7346, 20681, -1),
    	LAW_RIFT_GUARDIAN(7346, 7347, 20683, -1),
    	DEATH_RIFT_GUARDIAN(7347, 7348, 20685, -1),
    	SOUL_RIFT_GUARDIAN(7348, 7349, 20687, -1),
    	ASTRAL_RIFT_GUARDIAN(7349, 7350, 20689, -1),
    	BLOOD_RIFT_GUARDIAN(7350, 7337, 20691, -1);
    	
    	private final int petId, morphId, itemId, dialogue;
    	
    	private Pets(int petNpcId, int morphId, int itemId, int dialogue) {
    		this.petId = petNpcId;
    		this.morphId = morphId;
    		this.itemId = itemId;
    		this.dialogue = dialogue;
    	}
    	public int getId() {
    		return petId;
    	}
    	public int getMorphId() {
    		return morphId;
    	}
    	public boolean canMorph() {
    		return (morphId != 0);
    	}
    	public int getItemId() {
    		return itemId;
    	}
    	public int getDialogue(Player player) {
    		return dialogue;
    	}
    	public String getName() {
    		String name = name().toLowerCase().replaceAll("_", " ");
    		return Misc.capitalizeWords(name);
    	}
    	public static Optional<Pets> getPet(int identifier) {
    		return Arrays.stream(values()).filter(s -> s.petId == identifier).findFirst();
    	}
    	public static Optional<Pets> getPetForItem(int identifier) {
    		return Arrays.stream(values()).filter(s -> s.itemId == identifier).findFirst();
    	}
    }

    Replace your BossPets class with this;
    Spoiler for PetHandler class:
    Code:
    package com.elvarg.world.content;
    /**
     * @author Lumiere
     */
    import java.util.Optional;
    
    import com.elvarg.Elvarg;
    import com.elvarg.world.World;
    import com.elvarg.world.entity.impl.npc.NPC;
    import com.elvarg.world.entity.impl.player.Player;
    import com.elvarg.world.model.container.impl.Bank;
    import com.elvarg.world.model.dialogue.DialogueManager;
    import com.elvarg.world.model.dialogue.DialogueOptions;
    import com.elvarg.world.model.Animation;
    import com.elvarg.world.model.Pets;
    import com.elvarg.world.model.Position;
    
    public class PetHandler {
    	
    	Player player;
    	
    	public PetHandler(Player player) {
    		this.player = player;
    	}
    	
    	private static final Animation PET_INTERACTION = new Animation(827);
    	
    	private boolean morphed = false;
    	
    	private boolean obtained [] = new boolean[32];
    	
    	public boolean hasMorphed() {
    		return morphed;
    	}
    	public void setMorphed(boolean input) {
    		morphed = input;
    	}
    	public boolean hasObtained(int id) {
    		return obtained[id];
    	}
    	public void setObtained(boolean input, int id) {
    		obtained[id] = input;
    	}
    	public boolean canDrop(int id) {
    		Optional<Pets> pet = Pets.getPet(id);
    		if (!pet.isPresent() || pet == null || player.getCurrentPet() != null)
    			return false;
    		
    		return true;
    	}
    	public boolean canPickup(NPC npc) {
    		if(npc == null || !player.getCurrentPet().equals(npc)|| player.getCurrentPet() == null) {
    			return false;
    		}
    		if(!player.getCurrentPet().equals(npc) && !npc.getOwner().equals(player)) {
    			return false;
    		}
    		return true;
    	}
    	public void startPetDialogue(NPC npc) {
    		Optional<Pets> pet = Pets.getPet(npc.getId());
    		
    		if (!pet.isPresent())
    			return;
    		if (npc.getId() == pet.get().getId() && pet.get().getDialogue(player) != -1) {
    			if (player.getCurrentPet().getId() == Pets.OLMLET.getId()) {
    				DialogueManager.start(player, 298);
    				player.setDialogueOptions(new DialogueOptions() {
    					@Override
    					public void handleOption(Player player, int option) {
    						switch(option) {
    							case 1:
    								DialogueManager.start(player, 300);
    								break;
    							case 2:
    								DialogueManager.start(player, 303);
    								break;
    							case 3:
    								DialogueManager.start(player, 308);
    								break;
    							case 4:
    								player.getPacketSender().sendInterfaceRemoval();
    								break;
    						}
    					}
    				});
    			} else {
    				DialogueManager.start(player, pet.get().getDialogue(player));
    			}
    		}
    	}
    	public void drop(int id, Position position) {
    		NPC npc = new NPC(id, position);
    		
    		npc.setOwner(player);
    		npc.getMovementQueue().setFollowCharacter(player);
    		npc.setEntityInteraction(player);
    		
    		World.getNpcAddQueue().add(npc);
    		player.setCurrentPet(npc);
    		
    		String message = (!hasMorphed() ? "You place your pet on the ground." : "Your pet endures metamorphosis and transforms.");
    		
    		player.performAnimation(PET_INTERACTION);
    		player.getPacketSender().sendMessage(message);
    		player.setPositionToFace(npc.getPosition());
    	}
    	public void pickUp(NPC npc) {
    		if(npc == null || player.getCurrentPet() == null) {
    			return;
    		}
    		if (!npc.getOwner().equals(player)) {
    			player.getPacketSender().sendMessage("That isn't your pet to take!");
    			return;
    		}
    		if(player.getCurrentPet().equals(npc)) {
    			World.getNpcRemoveQueue().add(player.getCurrentPet());
    			
    			Optional<Pets> pet = Pets.getPet(npc.getId());
    			
    			if(!pet.isPresent())
    				return;
    			
    			player.performAnimation(PET_INTERACTION);
    			player.getPacketSender().sendMessage("You pick up your pet.");
    			player.setCurrentPet(null);
    			setMorphed(false);
    			
    			if(player.getInventory().isFull()) {
    				player.getBank(Bank.getTabForItem(player, pet.get().getItemId())).add(pet.get().getItemId(), 1);
    				return;
    			}
    			player.getInventory().add(pet.get().getItemId(), 1);
    		}
    	}
    	public void morph(NPC npc) {
    		if(npc == null || player.getCurrentPet() == null)
    			return;
    		if(player.getCurrentPet().equals(npc)) {
    			Optional<Pets> pet = Pets.getPet(npc.getId());
    			
    			if(!pet.isPresent())
    				return;
    			
    			if (!pet.get().canMorph()) {
    				String petInfo = pet.get().getId()+":"+pet.get().getName();
    				Elvarg.getLogger().info("The Pet ("+petInfo+") should not have definition actions to morph, OR does not yet have a morphId.");
    				return;
    			}
    			setMorphed(true);
    			World.getNpcRemoveQueue().add(player.getCurrentPet());
    			drop(pet.get().getMorphId(), new Position(npc.getPosition().getX(), npc.getPosition().getY(), npc.getPosition().getZ()));
    		}
    	}
    	public void rewardPet(int id) {
    		Optional<Pets> pet = Pets.getPet(id);
    		
    		if (!pet.isPresent())
    			return;
    		
    		World.sendMessage("<col=000bff>[NEWS]: </col>"+player.getUsername()+" has recieved a @[email protected]"+pet.get().getName()+"@[email protected] pet drop!");
    		String rewardLocation = (!player.getInventory().isFull() ? "It has been added to your inventory!" : "It has been sent to your bank!");
    		player.getPacketSender().sendMessage("You've received a @[email protected]"+pet.get().getName()+"@[email protected] pet drop!");
    		player.getPacketSender().sendMessage(rewardLocation);
    		
    		if(player.getInventory().isFull()) {
    			player.getBank(Bank.getTabForItem(player, pet.get().getItemId())).add(pet.get().getItemId(), 1);
    			return;
    		}
    		player.getInventory().add(pet.get().getItemId(), 1);
    	}
    }

    Replace and add the following as instructed;
    Spoiler for REPLACEMENTS:

    In NpcDropDefinitions, find this if statement
    Spoiler for NpcDropDefinitions:
    Code:
    					//Drop our random item if it is present..
    					if(toDrop.isPresent()) {
    then, make it look like this
    Code:
    					//Drop our random item if it is present..
    					if(toDrop.isPresent()) {
    						//Drop the item we received as long as it isn't a pet..
    						//Otherwise spawn it for the player.
    						Optional<Pets> pet = Pets.getPetForItem(toDrop.get().getId());
    						
    						if (pet.isPresent()) {
    							if (player.getPets().hasObtained(pet.get().ordinal()))
    								return;
    							if(pet != null && toDrop.get().getId() == pet.get().getItemId()) {
    								player.getPets().rewardPet(pet.get().getId());
    								player.getPets().setObtained(true, pet.get().ordinal());
    								return;
    							}
    						} else {
    							GroundItemManager.spawnGroundItem(player, new GroundItem(toDrop.get(), npc.getPosition(), player.getUsername(), false, 150, true, 120));
    							//Add the drop table chance..
    							parsedTables.add(chance.get());
    						}
    					}


    In DropItemPacketListener, replace this;
    Spoiler for DropItemPacketListener:
    Code:
    		if(BossPets.spawnFor(player, id, false)) {
    			return;
    		}
    With this;
    Code:
    		Optional<Pets> pet = Pets.getPetForItem(id);
    		if (pet != null && pet.isPresent() && pet.get().getItemId() == id) {
    			if (!player.getPets().canDrop(pet.get().getId())) {
    				player.getPacketSender().sendMessage("You already have a pet following you.");
    				return;
    			}
    			player.getInventory().delete(pet.get().getItemId(), 1);
    			player.getPets().drop(pet.get().getId(), player.getPosition().copy().add(0, 1));
    			return;
    		}


    In NPCOptionPacketListener, under execute in the handleSecondClick method, add this;
    Spoiler for NPCOptionPacketListener:
    Code:
    				Optional<Pets> pet = Pets.getPet(npc.getId());
    				
    				if (pet.isPresent()) {
    					if (npc.getOwner() != player) {
    						player.getPacketSender().sendMessage("That isn't your pet to take!");
    						return;
    					} else if (player.getCurrentPet() == npc && npc.getOwner().equals(player)) {
    						player.getPets().pickUp(npc);
    					}
    				}

    Then, under execute again, this time in the handleThirdClick method, add this;
    Spoiler for NPCOptionPacketListener:
    Code:
    				Optional<Pets> pet = Pets.getPet(npc.getId());
    				
    				if (pet.isPresent()) {
    					if (npc.getOwner() != player) {
    						player.getPacketSender().sendMessage("That isn't your pet to interact with!");
    						return;
    					} else if (player.getCurrentPet() == npc && npc.getOwner().equals(player)) {
    						player.getPets().morph(npc);
    					}
    				}


    In the player class;
    Spoiler for Player:
    Code:
    	private final PetHandler pets = new PetHandler(this);
    Code:
    	public PetHandler getPets() {
    		return pets;
    	}
    Make sure you pick-up the pet on logout!
    In 'onLogout' or 'destruct' method;
    Code:
    		getPets().pickUp(getCurrentPet());
    If you don't already have these declared in the Player class as-well;
    Code:
    	private NPC currentPet;
    Code:
    	public NPC getCurrentPet() {
    		return currentPet;
    	}
    
    	public void setCurrentPet(NPC currentPet) {
    		this.currentPet = currentPet;
    	}

    Finally, in the Misc class(I'm sure there's a better way of doing this?)
    Spoiler for Misc:
    Code:
    	public static int getRandomIndex(int ids[]) {
    		return ids[getRandom(ids.length)];
    	}

    That should be everything. Comment with issues ofc.




    If you want them, every slayer/boss pet dialogue thus far. Skilling pets soon to come.
    Fair warning, there is a lot, I think 188 dialogues total thus far..
    Spoiler for dialogues.json:
    Code:
    	{
            "id": 123,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Got any sigils for me?",
            "next": 124,
            "npcId": 318
        },
    	{
            "id": 124,
            "type": "STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "The Core shakes its head.",
            "next": 125,
            "npcId": 318
        },
    	{
            "id": 125,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "Damnit Core-al!",
            "line2": "Let's bounce.",
            "next": -1,
            "npcId": 318
        },
    	{
            "id": 126,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "It's a damn good thing I don't have arachnophobia.",
            "next": 127,
            "npcId": 495
        },
    	{
            "id": 127,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "We're misunderstood. Without us in your house,",
            "line2": "you'd be infested with flies and other REAL nasties.",
            "next": 128,
            "npcId": 495
        },
    	{
            "id": 128,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Thanks for that enlightening fact.",
            "next": 129,
            "npcId": 495
        },
    	{
            "id": 129,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Everybody gets one.",
            "next": -1,
            "npcId": 495
        },
    	{
            "id": 130,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Why the grizzly face?",
            "next": 131,
            "npcId": 497
        },
    	{
            "id": 131,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "You're not funny...",
            "next": 132,
            "npcId": 497
        },
    	{
            "id": 132,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "You should get in the.... sun more.",
            "next": 133,
            "npcId": 497
        },
    	{
            "id": 133,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "You're really not funny...",
            "next": 134,
            "npcId": 497
        },
    	{
            "id": 134,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "One second, let me take a picture of you",
            "line2": "with my.... Kodiak camera.",
            "next": 135,
            "npcId": 497
        },
    	{
            "id": 135,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": ".....",
            "next": 136,
            "npcId": 497
        },
    	{
            "id": 136,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Feeling.... blue.",
            "next": 137,
            "npcId": 497
        },
    	{
            "id": 137,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "If you don't stop, I'm going to",
            "line2": "leave some... brown... at your feet, human.",
            "next": -1,
            "npcId": 497
        },
    	{
            "id": 138,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "How many souls have you devoured?",
            "next": 139,
            "npcId": 964
        },
    	{
            "id": 139,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "None.",
            "next": 140,
            "npcId": 964
        },
    	{
            "id": 140,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Awww p-",
            "next": 141,
            "npcId": 964
        },
    	{
            "id": 141,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Yet.",
            "next": 142,
            "npcId": 964
        },
    	{
            "id": 142,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Oh..",
            "next": -1,
            "npcId": 964
        },
    	{
            "id": 143,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "I wonder if I need to invest in a",
            "line2": "trowel when I take you out for a walk..",
            "next": 144,
            "npcId": 964
        },
    	{
            "id": 144,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "More like a shovel.",
            "next": -1,
            "npcId": 964
        },
    	{
            "id": 145,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Why were the hot dogs shivering?",
            "next": 146,
            "npcId": 964
        },
    	{
            "id": 146,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Grrrrr...",
            "next": 147,
            "npcId": 964
        },
    	{
            "id": 147,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Because they were served-",
            "next": 148,
            "npcId": 964
        },
    	{
            "id": 148,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "GRRRRRR...",
            "next": 149,
            "npcId": 964
        },
    	{
            "id": 149,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "-with... chilli?",
            "next": -1,
            "npcId": 964
        },
    	{
            "id": 150,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Hell yeah! Such a cute puppy!",
            "next": 151,
            "npcId": 964
        },
    	{
            "id": 151,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Silence mortal! Or I'll eat your soul.",
            "next": 152,
            "npcId": 964
        },
    	{
            "id": 152,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Would that go well with lemon?",
            "next": 153,
            "npcId": 964
        },
    	{
            "id": 153,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Grrr...",
            "next": -1,
            "npcId": 964
        },
    	{
            "id": 154,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "What a cute puppy, how nice to meet you.",
            "next": 155,
            "npcId": 964
        },
    	{
            "id": 155,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "It'd be nice to meat you too...",
            "next": 156,
            "npcId": 964
        },
    	{
            "id": 156,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Urk... nice doggy.",
            "next": 157,
            "npcId": 964
        },
    	{
            "id": 157,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Grrr....",
            "next": -1,
            "npcId": 964
        },
    	{
            "id": 158,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Is it true a level 3 skiller caught one of your siblings?",
            "next": 159,
            "npcId": 2055
        },
    	{
            "id": 159,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "Yes, they killed my mummy, kidnapped my brother,",
            "line2": "smiled about it and went to sleep.",
            "next": 160,
            "npcId": 2055
        },
    	{
            "id": 160,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "Aww, well you have me now! I shall call you Squishy",
            "line2": "and you shall be mine and you shall be my Squishy!",
            "next": 161,
            "npcId": 2055
        },
    	{
            "id": 161,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Come on, Squishy come on, little Squishy!",
            "next": -1,
            "npcId": 2055
        },
    	{
            "id": 162,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Hey little snake!",
            "next": 163,
            "npcId": 2130
        },
    	{
            "id": 163,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Soon, Zulrah shall establish dominion over this plane.",
            "next": 164,
            "npcId": 2130
        },
    	{
            "id": 164,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Wanna play fetch?",
            "next": 165,
            "npcId": 2130
        },
    	{
            "id": 165,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Submit to the almighty Zulrah.",
            "next": 166,
            "npcId": 2130
        },
    	{
            "id": 166,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Walkies? Or slidies...?",
            "next": 167,
            "npcId": 2130
        },
    	{
            "id": 167,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Zulrah's wilderness as a God will soon be demonstrated.",
            "next": 168,
            "npcId": 2130
        },
    	{
            "id": 168,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "I give up...",
            "next": -1,
            "npcId": 2130
        },
    	{
            "id": 169,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Hey little snake!",
            "next": 170,
            "npcId": 2131
        },
    	{
            "id": 170,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Soon, Zulrah shall establish dominion over this plane.",
            "next": 171,
            "npcId": 2131
        },
    	{
            "id": 171,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Wanna play fetch?",
            "next": 172,
            "npcId": 2131
        },
    	{
            "id": 172,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Submit to the almighty Zulrah.",
            "next": 173,
            "npcId": 2131
        },
    	{
            "id": 173,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Walkies? Or slidies...?",
            "next": 174,
            "npcId": 2131
        },
    	{
            "id": 174,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Zulrah's wilderness as a God will soon be demonstrated.",
            "next": 175,
            "npcId": 2131
        },
    	{
            "id": 175,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "I give up...",
            "next": -1,
            "npcId": 2131
        }, 
    	{
            "id": 176,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Hey little snake!",
            "next": 177,
            "npcId": 2132
        },
    	{
            "id": 177,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Soon, Zulrah shall establish dominion over this plane.",
            "next": 178,
            "npcId": 2132
        },
    	{
            "id": 178,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Wanna play fetch?",
            "next": 179,
            "npcId": 2132
        },
    	{
            "id": 179,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Submit to the almighty Zulrah.",
            "next": 180,
            "npcId": 2132
        },
    	{
            "id": 180,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Walkies? Or slidies...?",
            "next": 181,
            "npcId": 2132
        },
    	{
            "id": 181,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Zulrah's wilderness as a God will soon be demonstrated.",
            "next": 182,
            "npcId": 2132
        },
    	{
            "id": 182,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "I give up...",
            "next": -1,
            "npcId": 2132
        },
    	{
            "id": 183,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Who is the true lord and king of the lands?",
            "next": 184,
            "npcId": 5536
        },
    	{
            "id": 184,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "The mighty heir and lord of the Wilderness.",
            "next": 185,
            "npcId": 5536
        },
    	{
            "id": 185,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Where is he? Why hasn't he lifted your burden?",
            "next": 186,
            "npcId": 5536
        },
    	{
            "id": 186,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "I have not fulfilled my purpose.",
            "next": 187,
            "npcId": 5536
        },
    	{
            "id": 187,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "What is your purpose?",
            "next": 188,
            "npcId": 5536
        },
    	{
            "id": 188,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 3,
            "line1": "Not what is, what was.",
            "line2": "A great war tore this land apart, for my failings in",
            "line3": "protecting this land, I carry the burden of its waste.",
            "next": -1,
            "npcId": 5536
        },
    	{
            "id": 189,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Who is the true lord and king of the lands?",
            "next": 190,
            "npcId": 5537
        },
    	{
            "id": 190,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "The mighty heir and lord of the Wilderness.",
            "next": 191,
            "npcId": 5537
        },
    	{
            "id": 191,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Where is he? Why hasn't he lifted your burden?",
            "next": 192,
            "npcId": 5537
        },
    	{
            "id": 192,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "I have not fulfilled my purpose.",
            "next": 193,
            "npcId": 5537
        },
    	{
            "id": 193,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "What is your purpose?",
            "next": 194,
            "npcId": 5537
        },
    	{
            "id": 194,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 3,
            "line1": "Not what is, what was.",
            "line2": "A great war tore this land apart, for my failings in",
            "line3": "protecting this land, I carry the burden of its waste.",
            "next": -1,
            "npcId": 5537
        },
    	{
            "id": 195,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "At night time, if I were to hold an",
            "line2": "ultraviolet light over you, would you glow?",
            "next": 196,
            "npcId": 5561
        },
    	{
            "id": 196,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Two things wrong there, human.",
            "next": 197,
            "npcId": 5561
        },
    	{
            "id": 197,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Oh?",
            "next": 198,
            "npcId": 5561
        },
    	{
            "id": 198,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "One, When has it ever been night time here?",
            "next": 99,
            "npcId": 5561
        },
    	{
            "id": 199,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Two, have you ever seen ultraviolet light around here?",
            "next": 200,
            "npcId": 5561
        },
    	{
            "id": 200,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Oh-hmm..",
            "next": 201,
            "npcId": 5561
        },
    	{
            "id": 201,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "In answer to your question though.. Yes.",
            "line2": "I, like every scorpion, would glow.",
            "next": -1,
            "npcId": 5561
        },
    	{
            "id": 202,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "You killed my father.",
            "next": 203,
            "npcId": 5884
        },
    	{
            "id": 203,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Yeah, don't take it personally.",
            "next": 204,
            "npcId": 5884
        },
    	{
            "id": 204,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 3,
            "line1": "In his dying moment, my father poured",
            "line2": "his last ounce of strength into my creation.",
            "line3": "My being is formed from his remains.",
            "next": 205,
            "npcId": 5884
        },
    	{
            "id": 205,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 3,
            "line1": "When your own body is consumed to nourish the",
            "line2": "Nexus, and an army of scions arise from your corpse,",
            "line3": "I trust you will not take it personally either.",
            "next": -1,
            "npcId": 5884
        },
    	{
            "id": 206,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "You killed my father.",
            "next": 207,
            "npcId": 5884
        },
    	{
            "id": 207,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "No, I am your father.",
            "next": 208,
            "npcId": 5884
        },
    	{
            "id": 208,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "Human biology may be unfamiliar to me,",
            "line2": "but nevertheless I doubt that very much.",
            "next": -1,
            "npcId": 5884
        },
    	{
            "id": 209,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "You killed my father.",
            "next": 210,
            "npcId": 5884
        },
    	{
            "id": 210,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "No, I am your father.",
            "next": 211,
            "npcId": 5884
        },
    	{
            "id": 211,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "No you're not.",
            "next": -1,
            "npcId": 5884
        },
    	{
            "id": 212,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Do you miss your people?",
            "next": 213,
            "npcId": 5892
        },
    	{
            "id": 213,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "Mej-TzTok-Jad Kot-Kl!",
            "line2": "(TzTok-Jad will protect us!)",
            "next": 214,
            "npcId": 5892
        },
    	{
            "id": 214,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "No.. I don't think so.",
            "next": 215,
            "npcId": 5892
        },
    	{
            "id": 215,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "Jal-Zek Kl?",
            "line2": "(Foreigner hurt us?)",
            "next": 216,
            "npcId": 5892
        },
    	{
            "id": 216,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "No, no, I wouldn't hurt you.",
            "next": -1,
            "npcId": 5892
        },
    	{
            "id": 217,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Are you hungry?",
            "next": 218,
            "npcId": 5892
        },
    	{
            "id": 218,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Kl-Kra!",
            "next": 219,
            "npcId": 5892
        },
    	{
            "id": 219,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Ooookay...",
            "next": -1,
            "npcId": 5892
        },
    	{
            "id": 220,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Hey, so err... I kind-of own you now.",
            "next": 221,
            "npcId": 6628
        },
    	{
            "id": 221,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "Tsssk. Next time you enter those caves,",
            "line2": "human, my father will be having words.",
            "next": 222,
            "npcId": 6628
        },
    	{
            "id": 222,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Maybe next time I'll add your brothers to my collection.",
            "next": -1,
            "npcId": 6628
        },
    	{
            "id": 223,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "So despite there being three kings,",
            "line2": "you're clearly the leader, right?",
            "next": 224,
            "npcId": 6629
        },
    	{
            "id": 224,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Definitely.",
            "next": 225,
            "npcId": 6629
        },
    	{
            "id": 225,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "I'm glad I got you as a pet.",
            "next": 226,
            "npcId": 6629
        },
    	{
            "id": 226,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Ugh. Human, I'm not a pet.",
            "next": 227,
            "npcId": 6629
        },
    	{
            "id": 227,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Stop following me then.",
            "next": 228,
            "npcId": 6629
        },
    	{
            "id": 229,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "I can't seem to stop.",
            "next": 230,
            "npcId": 6629
        },
    	{
            "id": 230,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Pet.",
            "next": -1,
            "npcId": 6629
        },
    	{
            "id": 231,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Do you have any berserker rings?",
            "next": 232,
            "npcId": 6630
        },
    	{
            "id": 232,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Nope.",
            "next": 233,
            "npcId": 6630
        },
    	{
            "id": 233,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "You sure?",
            "next": 234,
            "npcId": 6630
        },
    	{
            "id": 234,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Yes.",
            "next": 235,
            "npcId": 6630
        },
    	{
            "id": 235,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "So, if I tipped you upside down and shook you,",
            "line2": "you'd not drop any berserker rings?",
            "next": 236,
            "npcId": 6630
        },
    	{
            "id": 236,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Nope.",
            "next": 237,
            "npcId": 6630
        },
    	{
            "id": 237,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "What if I endlessly killed your father",
            "line2": "for weeks on end, would I get one then?",
            "next": 238,
            "npcId": 6630
        },
    	{
            "id": 238,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Been done by someone, nope.",
            "next": -1,
            "npcId": 6630
        },
    	{
            "id": 239,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "Huh... that's odd.",
            "line2": "I thought that would be big news.",
            "next": 240,
            "npcId": 6631
        },
    	{
            "id": 240,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "You thought what would be big news?",
            "next": 241,
            "npcId": 6631
        },
    	{
            "id": 241,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 3,
            "line1": "Well there seems to be an absence of a certain",
            "line2": "ornithological piece: a headline regarding",
            "line3": "mass awareness of a certain avian variety.",
            "next": 242,
            "npcId": 6631
        },
    	{
            "id": 242,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "What are you talking about?",
            "next": 243,
            "npcId": 6631
        },
    	{
            "id": 243,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "Oh have you not heard? It was my",
            "line2": "understanding that everyone had heard...",
            "next": 244,
            "npcId": 6631
        },
    	{
            "id": 244,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Heard wha...... OH NO!!!!?!?!!?!",
            "next": 245,
            "npcId": 6631
        },
    	{
            "id": 245,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 3,
            "line1": "OH WELL THE BIRD, BIRD, BIRD, BIRD,",
            "line2": "BIRD IS THE WORD. OH WELL THE BIRD,",
            "line3": "BIRD, BIRD, BIRD BIRD IS THE WORD.",
            "next": 246,
            "npcId": 6631
        },
    	{
            "id": 246,
            "type": "STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "There's a slight pause as Kree'Arra Jr. goes stiff.",
            "next": -1,
            "npcId": 6631
        },
    	{
            "id": 247,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "Not sure this is going to be worth",
            "line2": "my time but.. Hello. How are you?",
            "next": 248,
            "npcId": 6632
        },
    	{
            "id": 248,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "SFudghoigdfpDSOPGnbSOBNfdbd-",
            "line2": "nopbdnopbddfnopdfpofhdARRRGGGGH!",
            "next": 249,
            "npcId": 6632
        },
    	{
            "id": 249,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Nope. Not worth it.",
            "next": -1,
            "npcId": 6632
        },
    	{
            "id": 250,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "FIND THE GODSWORD!",
            "next": 251,
            "npcId": 6633
        },
    	{
            "id": 251,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "FIND THE GODSWORD!",
            "next": -1,
            "npcId": 6633
        },
    	{
            "id": 252,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "I FOUND THE GODSWORD!",
            "next": 253,
            "npcId": 6633
        },
    	{
            "id": 253,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "GOOD!!!!!",
            "next": -1,
            "npcId": 6633
        },
    	{
            "id": 254,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "How's life in the light?",
            "next": 255,
            "npcId": 6634
        },
    	{
            "id": 255,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Burns slightly.",
            "next": 256,
            "npcId": 6634
        },
    	{
            "id": 256,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "You seem much nicer than your father.",
            "line2": "He's mean.",
            "next": 257,
            "npcId": 6634
        },
    	{
            "id": 257,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "If you were stuck in a very dark cave for",
            "line2": "centuries you'd be pretty annoyed too.",
            "next": 258,
            "npcId": 6634
        },
    	{
            "id": 258,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "I guess.",
            "next": 259,
            "npcId": 6634
        },
    	{
            "id": 259,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "He's actually quite mellow really.",
            "next": 260,
            "npcId": 6634
        },
    	{
            "id": 260,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Uh... Yeah.",
            "next": -1,
            "npcId": 6634
        },
    	{
            "id": 261,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Hey, Mole. How is life above ground?",
            "next": 262,
            "npcId": 6635
        },
    	{
            "id": 262,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 3,
            "line1": "Well, last time I was above ground,",
            "line2": "I was having to contend with people throwing",
            "line3": "snow at some weird yellow duck in my park.",
            "next": 263,
            "npcId": 6635
        },
    	{
            "id": 263,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Why were they doing that?",
            "next": 264,
            "npcId": 6635
        },
    	{
            "id": 264,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "No idea, I didn't stop to ask as an angry mob",
            "line2": "was closing in on them pretty quickly.",
            "next": 265,
            "npcId": 6635
        },
    	{
            "id": 265,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Sounds awful.",
            "next": 266,
            "npcId": 6635
        },
    	{
            "id": 266,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Anyway, keep Molin'!",
            "next": -1,
            "npcId": 6635
        },
    	{
            "id": 267,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Shouldn't a prince only have two heads?",
            "next": 268,
            "npcId": 6636
        },
    	{
            "id": 268,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Why is that?",
            "next": 269,
            "npcId": 6636
        },
    	{
            "id": 269,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "Well, a standard Black dragon has one,",
            "line2": "the King has three, so inbetween must have two?",
            "next": 270,
            "npcId": 6636
        },
    	{
            "id": 270,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "You're overthinking this.",
            "next": -1,
            "npcId": 6636
        },
    	{
            "id": 271,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "What is it with your kind and potato cactus?",
            "next": 272,
            "npcId": 6637
        },
    	{
            "id": 272,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Truthfully?",
            "next": 273,
            "npcId": 6637
        },
    	{
            "id": 273,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Yeah, please.",
            "next": 274,
            "npcId": 6637
        },
    	{
            "id": 274,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Soup. We make a fine soup with it.",
            "next": 275,
            "npcId": 6637
        },
    	{
            "id": 275,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Kalphites can cook?",
            "next": 276,
            "npcId": 6637
        },
    	{
            "id": 276,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 3,
            "line1": "Nah, we just collect it and put it there because",
            "line2": "we know fools like yourself will come down looking",
            "line3": "for it then inevitably be killed by my mother.",
            "next": 277,
            "npcId": 6637
        },
    	{
            "id": 277,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Evidently not, that's how I got you!",
            "next": 278,
            "npcId": 6637
        },
    	{
            "id": 278,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Touché.",
            "next": -1,
            "npcId": 6637
        },
    	{
            "id": 279,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "What is it with your kind and potato cactus?",
            "next": 280,
            "npcId": 6638
        },
    	{
            "id": 281,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Truthfully?",
            "next": 282,
            "npcId": 6638
        },
    	{
            "id": 282,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Yeah, please.",
            "next": 283,
            "npcId": 6638
        },
    	{
            "id": 283,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Soup. We make a fine soup with it.",
            "next": 284,
            "npcId": 6638
        },
    	{
            "id": 284,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Kalphites can cook?",
            "next": 285,
            "npcId": 6638
        },
    	{
            "id": 285,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 3,
            "line1": "Nah, we just collect it and put it there because",
            "line2": "we know fools like yourself will come down looking",
            "line3": "for it then inevitably be killed by my mother.",
            "next": 286,
            "npcId": 6638
        },
    	{
            "id": 286,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Evidently not, that's how I got you!",
            "next": 287,
            "npcId": 6638
        },
    	{
            "id": 287,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Touché.",
            "next": -1,
            "npcId": 6638
        },
    	{
            "id": 288,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Your kind comes in three different sizes?",
            "next": 289,
            "npcId": 6639
        },
    	{
            "id": 289,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Four, actually.",
            "next": 290,
            "npcId": 6639
        },
    	{
            "id": 290,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "Wow. Whoever created you wasn't very creative.",
            "line2": "You're just resized versions of one another!",
            "next": -1,
            "npcId": 6639
        },
    	{
            "id": 291,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "What's Kraken?",
            "next": 292,
            "npcId": 6640
        },
    	{
            "id": 292,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Not heard that one before.",
            "next": 293,
            "npcId": 6640
        },
    	{
            "id": 293,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "How are you actually walking on land?",
            "next": 294,
            "npcId": 6640
        },
    	{
            "id": 294,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "We have another leg, just below the center of our",
            "line2": "body that we use to move across solid surfaces.",
            "next": 295,
            "npcId": 6640
        },
    	{
            "id": 295,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "That's... interesting.",
            "next": -1,
            "npcId": 6640
        },
    	{
            "id": 296,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "Of all the high gamble rewards I could have won,",
            "line2": " I won you...",
            "next": 267,
            "npcId": 6642
        },
    	{
            "id": 297,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "Keep trying, human.",
            "line2": "You'll never win that Dragon Chainbody.",
            "next": -1,
            "npcId": 6642
        },
    	{
            "id": 298,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Hee hee! What shall we talk about, human?",
            "next": 299,
            "npcId": 7520
        },
        {
            "id": 299,
            "type": "OPTION",
            "lines": 4,
            "line1": "Where do creatures like you come from?",
            "line2": "You look like a dragon.",
            "line3": "Can you tell me secrets about your home?",
            "line4": "Maybe another time.",
            "next": -1,
            "npcId": 7520
        },
    	{
            "id": 300,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "From eggs, of course!",
            "line2": "You can't make an olmlet without breaking an egg.",
            "next": 301,
            "npcId": 7520
        },
    	{
            "id": 301,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "That's... informative. Thank you.",
            "next": 302,
            "npcId": 7520
        },
    	{
            "id": 302,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Hee hee! What's next, human?",
            "next": 299,
            "npcId": 7520
        },
    	{
            "id": 303,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 3,
            "line1": "And humans look like monkeys.",
            "line2": "Badly shaven monkeys.",
            "line3": "What's your point, human?",
            "next": 304,
            "npcId": 7520
        },
    	{
            "id": 304,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "Are you related to dragons?",
            "next": 305,
            "npcId": 7520
        },
    	{
            "id": 305,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 3,
            "line1": "My sire was an olm. I'm an olm.",
            "line2": "I don't go around asking you about",
            "line3": "your parents' species, do I?",
            "next": 306,
            "npcId": 7520
        },
    	{
            "id": 306,
            "type": "PLAYER_STATEMENT",
            "anim": "DEFAULT",
            "lines": 1,
            "line1": "... no, I suppose you don't.",
            "next": 307,
            "npcId": 7520
        },
    	{
            "id": 307,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 3,
            "line1": "Hee hee! Let's change the subject,",
            "line2": "before someone gets insulted.",
            "line3": "What shall we talk about instead, human?",
            "next": 299,
            "npcId": 7520
        },
    	{
            "id": 308,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 3,
            "line1": "Ooh, it was lovely. I lived in an eggshell.",
            "line2": "I was safe in there, dreaming of the life I would",
            "line3": "lead when I hatched, and the caverns I could rule.",
            "next": 309,
            "npcId": 7520
        },
    	{
            "id": 309,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "Then suddenly I felt a trembling of the ground,",
            "line2": "and my shell shattered.",
            "next": 310,
            "npcId": 7520
        },
    	{
            "id": 310,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 2,
            "line1": "Through its cracks I saw the world for the first time,",
            "line2": "just in time to watch my sire die.",
            "next": 311,
            "npcId": 7520
        },
    	{
            "id": 311,
            "type": "NPC_STATEMENT",
            "anim": "DEFAULT",
            "lines": 3,
            "line1": "It was a terrible shock for a newly hatched olmlet,",
            "line2": "but I try not to let it affect my mood.",
            "line3": "So what else shall we talk about, human?",
            "next": 299,
            "npcId": 7520
        }
    In NPCOptionPacketListener, in the firstClick method, under execute
    Code:
    				Optional<Pets> pet = Pets.getPet(npc.getId());
    				
    				if (pet.isPresent()) {
    					if (npc.getOwner() != player) {
    						player.getPacketSender().sendMessage("That isn't your pet to interact with!");
    						return;
    					} else if (player.getCurrentPet() == npc && npc.getOwner().equals(player)) {
    						player.getPets().startPetDialogue(npc);
    					}
    				}


    Spoiler for MEDIA:

    Spoiler for Revy is perfect:
    Reply With Quote  
     


  2. #2  
    Registered Member
    Zivik's Avatar
    Join Date
    Oct 2007
    Age
    25
    Posts
    4,432
    Thanks given
    892
    Thanks received
    1,525
    Rep Power
    3228
    Thanks for the share
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  3. #3  
    Extreme Donator


    Join Date
    Oct 2010
    Posts
    2,858
    Thanks given
    1,206
    Thanks received
    1,614
    Rep Power
    5000
    Looks okay but the old system was also fine, should just have built on it instead of making everything from scratch

    Also, removing this:
    Code:
    GroundItemManager.spawnGroundItem(player, new GroundItem(toDrop.get(), npc.getPosition(), player.getUsername(), false, 150, true, 120));
    Will cause drops to not appear.
    [Today 01:29 AM] RSTrials: Nice 0.97 Win/Loss Ratio luke. That's pretty bad.
    [Today 01:30 AM] Luke132: Ok u fucking moron i forgot i could influence misc.random
    Reply With Quote  
     

  4. Thankful user:


  5. #4  
    Banned

    Join Date
    Jun 2015
    Posts
    1,519
    Thanks given
    31
    Thanks received
    143
    Rep Power
    0
    Easier thing found on Elvarg base,

    anyways thanks for sharing, i added all pets, but been searching for Zulrah pet and something more.

    Thanks again
    Reply With Quote  
     

  6. #5  
    What's a sundial in the shade?

    Lumiere's Avatar
    Join Date
    May 2013
    Age
    24
    Posts
    538
    Thanks given
    216
    Thanks received
    98
    Rep Power
    113
    Quote Originally Posted by Professor Oak View Post
    Looks okay but the old system was also fine, should just have built on it instead of making everything from scratch

    Also, removing this:
    Code:
    GroundItemManager.spawnGroundItem(player, new GroundItem(toDrop.get(), npc.getPosition(), player.getUsername(), false, 150, true, 120));
    Will cause drops to not appear.
    I figured it needed an update, I also didn't like that the methods were booleans, but yeah, the original system works fine for this as-well

    As for the drops, I guess I should update the post, but I have it like this;
    Code:
    Pets pet = Pets.getForId(toDrop.get().getId());
    boolean obtained = pet.obtained() && toDrop.get().getId() == pet.getItemId();
    if(!obtained && toDrop.get().getId() == pet.getItemId()) {
    	player.getPets().rewardPet(pet);
    } else return;
    GroundItemManager.spawnGroundItem(player, new GroundItem(toDrop.get(), npc.getPosition(), player.getUsername(), false, 150, true, 120));
    Reply With Quote  
     

  7. #6  
    Extreme Donator


    Join Date
    Oct 2010
    Posts
    2,858
    Thanks given
    1,206
    Thanks received
    1,614
    Rep Power
    5000
    Quote Originally Posted by Lumiere View Post
    I figured it needed an update, I also didn't like that the methods were booleans, but yeah, the original system works fine for this as-well

    As for the drops, I guess I should update the post, but I have it like this;
    Code:
    						Pets pet = Pets.getForId(toDrop.get().getId());
    						boolean obtained = pet.obtained() && toDrop.get().getId() == pet.getItemId();
    						if(!obtained) {
    							player.getPets().rewardPet(pet);
    						} else return;
    						GroundItemManager.spawnGroundItem(player, new GroundItem(toDrop.get(), npc.getPosition(), player.getUsername(), false, 150, true, 120));
    Checked it out one more time quickly before heading to school, but shouldn't it be

    Code:
    Pets pet = Pets.getForId(toDrop.get().getId());
    if(pet != null) {
    	boolean obtained = pet.obtained() && toDrop.get().getId() == pet.getItemId();
    	if(!obtained) {
    		player.getPets().rewardPet(pet);
    	}
    	continue;
    }
    
    GroundItemManager.spawnGroundItem(player, new GroundItem(toDrop.get(), npc.getPosition(), player.getUsername(), false, 150, true, 120));
    Cause what you're doing is returning a Pet instance of every item that's about to be dropped as loot for a player.
    This will probably return null in many cases (since I doubt e.g "bones" are in the pets map), so you need a null check.
    Then instead of using return (which will break the npc drops loop, resulting in players receiving no further drops) use continue, which will make it continue and drop further items as usual.

    I might be wrong, haven't taken a look at the full code properly yet
    [Today 01:29 AM] RSTrials: Nice 0.97 Win/Loss Ratio luke. That's pretty bad.
    [Today 01:30 AM] Luke132: Ok u fucking moron i forgot i could influence misc.random
    Reply With Quote  
     

  8. Thankful user:


  9. #7  
    What's a sundial in the shade?

    Lumiere's Avatar
    Join Date
    May 2013
    Age
    24
    Posts
    538
    Thanks given
    216
    Thanks received
    98
    Rep Power
    113
    Quote Originally Posted by Professor Oak View Post
    Checked it out one more time quickly before heading to school, but shouldn't it be

    Cause what you're doing is returning a Pet instance of every item that's about to be dropped as loot for a player.
    This will probably return null in many cases (since I doubt e.g "bones" are in the pets map), so you need a null check.
    Then instead of using return (which will break the npc drops loop, resulting in players receiving no further drops) use continue, which will make it continue and drop further items as usual.

    I might be wrong, haven't taken a look at the full code properly yet
    Thanks for catching that! I actually wasn't making this check in the DropItemPacketListener class either, sure did come in handy!
    Reply With Quote  
     

  10. #8  
    Registered Member
    Join Date
    Apr 2017
    Posts
    303
    Thanks given
    34
    Thanks received
    59
    Rep Power
    65
    Code:
    java.lang.NullPointerException
    	at com.elvarg.world.entity.impl.npc.NPC.<init>(NPC.java:95)
    	at com.elvarg.net.packet.impl.CommandPacketListener.devCommands(CommandPacketListener.java:487)
    	at com.elvarg.net.packet.impl.CommandPacketListener.handleMessage(CommandPacketListener.java:93)
    I get that error when droppin the item. I added both your drop item and oaks version.
    Reply With Quote  
     

  11. #9  
    What's a sundial in the shade?

    Lumiere's Avatar
    Join Date
    May 2013
    Age
    24
    Posts
    538
    Thanks given
    216
    Thanks received
    98
    Rep Power
    113
    Quote Originally Posted by VenomRS View Post
    Code:
    java.lang.NullPointerException
    	at com.elvarg.world.entity.impl.npc.NPC.<init>(NPC.java:95)
    	at com.elvarg.net.packet.impl.CommandPacketListener.devCommands(CommandPacketListener.java:487)
    	at com.elvarg.net.packet.impl.CommandPacketListener.handleMessage(CommandPacketListener.java:93)
    I get that error when droppin the item. I added both your drop item and oaks version.
    OLD.
    That happens when you drop an item, or a boss pet item, or what?
    Not much to tell what's going on.

    If it happens when dropping an item, make sure this is correct;
    In the DropItemPacketListener

    If that doesn't work, maybe post line 95 of NPC.java or 487 of CommandPacketListener, not sure.
    Are you using a command or something with this? I'm not too sure why you'd have exceptions in the CommandPacketListener


    [UPDATE-BUMP] 32 pets and counting! More definitions & constants added, keep an eye out.
    Reply With Quote  
     

  12. #10  
    Registered Member
    Join Date
    Apr 2017
    Posts
    30
    Thanks given
    7
    Thanks received
    0
    Rep Power
    11
    where do ya add this part in NPCDefinitions Client Side

    Code:
    	for (int i = 0; i < PETS.length; i++) {
    		if (id == PETS[i]) {
    			definition.fixSlide();
    		}
    	}
    	if (id == PETS[22] || id == PETS[23]) {
    		definition.actions[2] = "Pick-up";
    		definition.actions[3] = "Metamorphosis";
    	}
    	if (id == PETS[8] || id == PETS[9] 
    	|| id >= PETS[37] && id <= PETS[50] 
    	|| id >= PETS[30] && id <= PETS[32]) {
    		
    		definition.actions[3] = "Metamorphosis";
    	}
    Reply With Quote  
     

Page 1 of 5 123 ... LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. fully osrs pet dialogues and custom made pet swapper
    By legitmoonga in forum Show-off
    Replies: 4
    Last Post: 03-12-2016, 10:52 AM
  2. Replies: 34
    Last Post: 02-16-2016, 05:36 AM
  3. Looking for server with OSRS & Pet system.
    By Xlrators in forum Requests
    Replies: 0
    Last Post: 01-07-2016, 08:38 PM
  4. Pi osrs pets
    By GloGod in forum Buying
    Replies: 3
    Last Post: 10-29-2014, 04:39 AM
  5. [REQ] OSRS Pet model
    By satucre in forum Models
    Replies: 7
    Last Post: 10-02-2014, 08:04 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •