Thread: Worn Equip Stats won't equip certain items

Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1 Worn Equip Stats won't equip certain items 
    Registered Member
    Join Date
    Mar 2014
    Age
    32
    Posts
    38
    Thanks given
    4
    Thanks received
    1
    Rep Power
    11
    Running Entrinthy source/client.

    When I bring up the worn equipment stats, then try to equip drygores it won't equip. I can equip them normally, but only not when the Equip stats page is up.

    Why is this? and how would I fix this?

    Also a side note, where and how do I change item bonuses?


    Reply With Quote  
     

  2. #2  
    Extreme Donator


    Join Date
    Mar 2009
    Posts
    1,461
    Thanks given
    111
    Thanks received
    184
    Rep Power
    79
    ButtonHandler class > search for "You cannot use this."

    See what comes up.
    Attached image
    Quote Originally Posted by MaxXi View Post
    Your combat is so awsome that i almost forgot its the combat matrix coded.
    Quote Originally Posted by twobrosplay View Post
    Try allowing the batch file through your firewall?
    Quote Originally Posted by SS_Alophonse View Post
    i have no life u say ha anything u say kid.i doubt u can even get a girlfriend
    i bet u cant even code anything.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Mar 2014
    Age
    32
    Posts
    38
    Thanks given
    4
    Thanks received
    1
    Rep Power
    11
    This is the only four things that match the search in that file. it's all regarding to the comp cape

    Code:
    		boolean hasRequiriments = true;
    		if (requiriments != null) {
    			for (int skillId : requiriments.keySet()) {
    				if (skillId > 24 || skillId < 0)
    					continue;
    				int level = requiriments.get(skillId);
    				if (level < 0 || level > 120)
    					continue;
    				if (itemId == 20748 && player.isCompletionist == 1) {
    				
    				}
    				else {
    					hasRequiriments = false;
    					player.sm("You cannot use this.");
    				}
    				if (itemId == 20749 && player.isCompletionist == 1) {
    					
    					}
    					else {
    						hasRequiriments = false;
    						player.sm("You cannot use this.");
    					}
    				if (itemId == 20752 && itemId == 20753 &&
    						itemId == 20769 && itemId == 20770 &&
    						itemId == 20771 && itemId == 20772 &&
    						player.isMaxed == 1 &&
    						player.isCompletionist == 1) {
    					
    				}
    				else {
    					player.isCompletionist = 0; //<-- Makes Sure hes not maxed. 
    					hasRequiriments = false;
    					player.sm("You cannot use this.");
    				}
    				if (itemId == 20767 && itemId == 20768 &&
    						player.isMaxed == 1) {
    					
    				}
    				else {
    					player.isMaxed = 0; //<-- Makes Sure hes not maxed. 
    					hasRequiriments = false;
    					player.sm("You cannot use this.");
    				}
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Feb 2013
    Posts
    4,409
    Thanks given
    59
    Thanks received
    478
    Rep Power
    138
    Compare sendWear(Inventory?) & sendWear2. (Equipment screen?)
    See what's different between the methods.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Mar 2014
    Age
    32
    Posts
    38
    Thanks given
    4
    Thanks received
    1
    Rep Power
    11
    Quote Originally Posted by Mayne View Post
    Compare sendWear(Inventory?) & sendWear2. (Equipment screen?)
    See what's different between the methods.
    I'm sorry but you might have to spoon feed me on that one... I don't know what you mean
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Oct 2013
    Posts
    95
    Thanks given
    3
    Thanks received
    7
    Rep Power
    11
    Go to equipment.java You should see a bunch of arrays, Put it in the weapon/main hand array. Complile, then you should be good. Also, you need to go to your bonuses folder, if you don't have a bonuses folder, then unpack your bonuses. Once in your bonuses folder, look up the itemId. If it doesn't exist, create a txt file following all of the other files structure.
    Reply With Quote  
     

  7. #7  
    Registered Member

    Join Date
    Feb 2013
    Posts
    4,409
    Thanks given
    59
    Thanks received
    478
    Rep Power
    138
    Quote Originally Posted by El_Rey View Post
    I'm sorry but you might have to spoon feed me on that one... I don't know what you mean
    You have two sendWear methods in your Inventory options file.
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Mar 2014
    Age
    32
    Posts
    38
    Thanks given
    4
    Thanks received
    1
    Rep Power
    11
    Quote Originally Posted by ItsX View Post
    Go to equipment.java You should see a bunch of arrays, Put it in the weapon/main hand array. Complile, then you should be good. Also, you need to go to your bonuses folder, if you don't have a bonuses folder, then unpack your bonuses. Once in your bonuses folder, look up the itemId. If it doesn't exist, create a txt file following all of the other files structure.
    I already added the wep ids to the bonuses folder as I knew i had to do that much. Thank you
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Mar 2014
    Age
    32
    Posts
    38
    Thanks given
    4
    Thanks received
    1
    Rep Power
    11
    Quote Originally Posted by ItsX View Post
    Go to equipment.java You should see a bunch of arrays, Put it in the weapon/main hand array. Complile, then you should be good. .
    Where?

    Code:
    package com.rs.game.player;
    
    import java.io.Serializable;
    
    import com.rs.cache.loaders.ItemDefinitions;
    import com.rs.game.item.Item;
    import com.rs.game.item.ItemsContainer;
    import com.rs.game.player.actions.Bonfire;
    import com.rs.utils.ItemExamines;
    
    public final class Equipment implements Serializable {
    
    	private static final long serialVersionUID = -4147163237095647617L;
    
    	public static final byte SLOT_HAT = 0, SLOT_CAPE = 1, SLOT_AMULET = 2,
    			SLOT_WEAPON = 3, SLOT_CHEST = 4, SLOT_SHIELD = 5, SLOT_LEGS = 7,
    			SLOT_HANDS = 9, SLOT_FEET = 10, SLOT_RING = 12, SLOT_ARROWS = 13,
    			SLOT_AURA = 14;
    
    	private ItemsContainer<Item> items;
    
    	private transient Player player;
    	private transient int equipmentHpIncrease;
    
    	static final int[] DISABLED_SLOTS = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0,
    			0, 0, 0, 1, 1, 0 };
    
    	public Equipment() {
    		items = new ItemsContainer<Item>(15, false);
    	}
    
    	public void setPlayer(Player player) {
    		this.player = player;
    	}
    
    	public void init() {
    		player.getPackets().sendItems(94, items);
    		refresh(null);
    	}
    
    	public void refresh(int... slots) {
    		if (slots != null) {
    			player.getPackets().sendUpdateItems(94, items, slots);
    			player.getCombatDefinitions().checkAttackStyle();
    		}
    		player.getCombatDefinitions().refreshBonuses();
    		refreshConfigs(slots == null);
    	}
    
    	public void reset() {
    		items.reset();
    		init();
    	}
    
    	public Item getItem(int slot) {
    		return items.get(slot);
    	}
    
    	public void sendExamine(int slotId) {
    		Item item = items.get(slotId);
    		if (item == null)
    			return;
    		player.getPackets().sendGameMessage(ItemExamines.getExamine(item));
    	}
    
    	public void refreshConfigs(boolean init) {
    		double hpIncrease = 0;
    		for (int index = 0; index < items.getSize(); index++) {
    			Item item = items.get(index);
    			if (item == null)
    				continue;
    			int id = item.getId();
    			if (index == Equipment.SLOT_HAT) {
    				if (id == 20135 || id == 20137 // torva
    						|| id == 20147 || id == 20149 // pernix
    						|| id == 20159 || id == 20161 // virtus
    				)
    					hpIncrease += 66;
    
    			} else if (index == Equipment.SLOT_CHEST) {
    				if (id == 20139 || id == 20141 // torva
    						|| id == 20151 || id == 20153 // pernix
    						|| id == 20163 || id == 20165 // virtus
    				)
    					hpIncrease += 200;
    			} else if (index == Equipment.SLOT_LEGS) {
    				if (id == 20143 || id == 20145 // torva
    						|| id == 20155 || id == 20157 // pernix
    						|| id == 20167 || id == 20169 // virtus
    				)
    					hpIncrease += 134;
    			}
    
    		}
    		if (player.getLastBonfire() > 0) {
    			int maxhp = player.getSkills().getLevel(Skills.HITPOINTS) * 10;
    			hpIncrease += (maxhp * Bonfire.getBonfireBoostMultiplier(player))
    					- maxhp;
    		}
    		if (player.getHpBoostMultiplier() != 0) {
    			int maxhp = player.getSkills().getLevel(Skills.HITPOINTS) * 10;
    			hpIncrease += maxhp * player.getHpBoostMultiplier();
    		}
    		if (hpIncrease != equipmentHpIncrease) {
    			equipmentHpIncrease = (int) hpIncrease;
    			if (!init)
    				player.refreshHitPoints();
    		}
    	}
    
    	public static boolean hideArms(Item item) {
    		String name = item.getName().toLowerCase();
    		if
    		// temp old graphics fix, but bugs alil new ones
    		(name.contains("d'hide body")
    				|| name.contains("dragonhide body")
    				|| name.equals("stripy pirate shirt")
    				|| (name.contains("chainbody") && (name.contains("iron")
    						|| name.contains("bronze") || name.contains("steel")
    						|| name.contains("black") || name.contains("mithril")
    						|| name.contains("adamant") || name.contains("rune") || name
    							.contains("white"))) || name.equals("leather body")
    				|| name.equals("hardleather body")
    				|| name.contains("studded body"))
    			return false;
    		return item.getDefinitions().getEquipType() == 6;
    	}
    
    	public static boolean hideHair(Item item) {
    		return item.getDefinitions().getEquipType() == 8;
    	}
    
    	public static boolean showBear(Item item) {
    		String name = item.getName().toLowerCase();
    		return !hideHair(item) || name.contains("horns")
    				|| name.contains("hat") || name.contains("afro")
    				|| name.contains("cowl") || name.contains("tattoo")
    				|| name.contains("headdress") || name.contains("hood")
    				|| (name.contains("mask") && !name.contains("h'ween"))
    				|| (name.contains("helm") && !name.contains("full"));
    	}
    
    	public static int getItemSlot(int itemId) {
    		return ItemDefinitions.getItemDefinitions(itemId).getEquipSlot();
    	}
    
    	public static boolean isTwoHandedWeapon(Item item) {
    		return item.getDefinitions().getEquipType() == 5;
    	}
    
    	public int getWeaponRenderEmote() {
    		Item weapon = items.get(3);
    		if (weapon == null)
    			return 1426;
    		return weapon.getDefinitions().getRenderAnimId();
    	}
    
    	public boolean hasShield() {
    		return items.get(5) != null;
    	}
    
    	public int getWeaponId() {
    		Item item = items.get(SLOT_WEAPON);
    		if (item == null)
    			return -1;
    		return item.getId();
    	}
    
    	public int getChestId() {
    		Item item = items.get(SLOT_CHEST);
    		if (item == null)
    			return -1;
    		return item.getId();
    	}
    
    	public int getHatId() {
    		Item item = items.get(SLOT_HAT);
    		if (item == null)
    			return -1;
    		return item.getId();
    	}
    
    	public int getShieldId() {
    		Item item = items.get(SLOT_SHIELD);
    		if (item == null)
    			return -1;
    		return item.getId();
    	}
    
    	public int getLegsId() {
    		Item item = items.get(SLOT_LEGS);
    		if (item == null)
    			return -1;
    		return item.getId();
    	}
    
    	public void removeAmmo(int ammoId, int ammount) {
    		if (ammount == -1) {
    			items.remove(SLOT_WEAPON, new Item(ammoId, 1));
    			refresh(SLOT_WEAPON);
    		} else {
    			items.remove(SLOT_ARROWS, new Item(ammoId, ammount));
    			refresh(SLOT_ARROWS);
    		}
    	}
    
    	public int getAuraId() {
    		Item item = items.get(SLOT_AURA);
    		if (item == null)
    			return -1;
    		return item.getId();
    	}
    
    	public int getCapeId() {
    		Item item = items.get(SLOT_CAPE);
    		if (item == null)
    			return -1;
    		return item.getId();
    	}
    
    	public int getRingId() {
    		Item item = items.get(SLOT_RING);
    		if (item == null)
    			return -1;
    		return item.getId();
    	}
    
    	public int getAmmoId() {
    		Item item = items.get(SLOT_ARROWS);
    		if (item == null)
    			return -1;
    		return item.getId();
    	}
    
    	public void deleteItem(int itemId, int amount) {
    		Item[] itemsBefore = items.getItemsCopy();
    		items.remove(new Item(itemId, amount));
    		refreshItems(itemsBefore);
    	}
    
    	public void refreshItems(Item[] itemsBefore) {
    		int[] changedSlots = new int[itemsBefore.length];
    		int count = 0;
    		for (int index = 0; index < itemsBefore.length; index++) {
    			if (itemsBefore[index] != items.getItems()[index])
    				changedSlots[count++] = index;
    		}
    		int[] finalChangedSlots = new int[count];
    		System.arraycopy(changedSlots, 0, finalChangedSlots, 0, count);
    		refresh(finalChangedSlots);
    	}
    
    	public int getBootsId() {
    		Item item = items.get(SLOT_FEET);
    		if (item == null)
    			return -1;
    		return item.getId();
    	}
    
    	public int getGlovesId() {
    		Item item = items.get(SLOT_HANDS);
    		if (item == null)
    			return -1;
    		return item.getId();
    	}
    
    	public ItemsContainer<Item> getItems() {
    		return items;
    	}
    
    	public int getEquipmentHpIncrease() {
    		return equipmentHpIncrease;
    	}
    
    	public void setEquipmentHpIncrease(int hp) {
    		this.equipmentHpIncrease = hp;
    	}
    
    	public boolean wearingArmour() {
    		return getItem(SLOT_HAT) != null || getItem(SLOT_CAPE) != null
    				|| getItem(SLOT_AMULET) != null || getItem(SLOT_WEAPON) != null
    				|| getItem(SLOT_CHEST) != null || getItem(SLOT_SHIELD) != null
    				|| getItem(SLOT_LEGS) != null || getItem(SLOT_HANDS) != null
    				|| getItem(SLOT_FEET) != null;
    	}
    
    	public int getAmuletId() {
    		Item item = items.get(SLOT_AMULET);
    		if (item == null)
    			return -1;
    		return item.getId();
    	}
    
    	public boolean hasTwoHandedWeapon() {
    		Item weapon = items.get(SLOT_WEAPON);
    		return weapon != null && isTwoHandedWeapon(weapon);
    	}
    }
    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Mar 2014
    Age
    32
    Posts
    38
    Thanks given
    4
    Thanks received
    1
    Rep Power
    11
    Quote Originally Posted by Mayne View Post
    You have two sendWear methods in your Inventory options file.
    Yes, I do not know how to do that...
    Reply With Quote  
     

Page 1 of 2 12 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. [PI] Pk points to equip certain items
    By Bells in forum Snippets
    Replies: 9
    Last Post: 12-12-2012, 05:42 AM
  2. Replies: 13
    Last Post: 11-25-2012, 04:55 AM
  3. Replies: 8
    Last Post: 04-20-2012, 12:00 PM
  4. Replies: 11
    Last Post: 06-27-2011, 05:37 PM
  5. Replies: 1
    Last Post: 03-08-2010, 12:55 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •