Thread: Item Slot

Results 1 to 3 of 3
  1. #1 Item Slot 
    Registered Member
    Join Date
    Feb 2014
    Posts
    77
    Thanks given
    21
    Thanks received
    30
    Rep Power
    22
    Spoiler for I'mdumb:
    I'm sure I am just missing something completely silly, but I have tried multiple things to make the items go within the correct slots. I'm having difficulty with weapon items and wanting to go into the helmet spot, but I have them hard coded to not.

    ItemAssistant.java within the boolean wearItem();
    Code:
    switch (wearID) {
    			case 13739: 
    			case 13741: 
    			case 13743:
    			case 13745:
    			case 13735:
    			case 13662:
    			 targetSlot = 5;
    				break;
    			}
    Item.java within the boolean playerShield();
    Code:
    public static boolean playerShield(int itemId) {
    		String[] data = { "kiteshield", "book", "Kiteshield", "shield",
    				"Shield", "Kite", "kite", "Arcane", "Elysian", "Divine",
    				"Spectral", "Spirit Shield"};
    		String item = getItemName(itemId);
    		if (item == null) {
    			return false;
    		}
    		boolean item1 = false;
    		for (int i = 0; i < data.length; i++) {
    			if (item.endsWith(data[i]) || item.contains(data[i])) {
    				item1 = true;
    			}
    		}
    		return item1;
    	}

    Fixed.
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Oct 2012
    Posts
    4,710
    Thanks given
    1,679
    Thanks received
    1,105
    Rep Power
    0
    Quote Originally Posted by Bobaphat View Post
    I'm sure I am just missing something completely silly, but I have tried multiple things to make the items go within the correct slots. I'm having difficulty with weapon items and wanting to go into the helmet spot, but I have them hard coded to not.

    ItemAssistant.java within the boolean wearItem();
    Code:
    switch (wearID) {
    			case 13739: 
    			case 13741: 
    			case 13743:
    			case 13745:
    			case 13735:
    			case 13662:
    			 targetSlot = 5;
    				break;
    			}
    Item.java within the boolean playerShield();
    Code:
    public static boolean playerShield(int itemId) {
    		String[] data = { "kiteshield", "book", "Kiteshield", "shield",
    				"Shield", "Kite", "kite", "Arcane", "Elysian", "Divine",
    				"Spectral", "Spirit Shield"};
    		String item = getItemName(itemId);
    		if (item == null) {
    			return false;
    		}
    		boolean item1 = false;
    		for (int i = 0; i < data.length; i++) {
    			if (item.endsWith(data[i]) || item.contains(data[i])) {
    				item1 = true;
    			}
    		}
    		return item1;
    	}

    Shield id?
    Reply With Quote  
     

  3. #3  
    "We don’t worry about warnings; we only worry about errors."
    Rozo's Avatar
    Join Date
    Dec 2013
    Posts
    573
    Thanks given
    53
    Thanks received
    70
    Rep Power
    49
    Have you tried declaring the ID as a shield?
    Reply With Quote  
     


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. Wrong item slot
    By MetalGear in forum Help
    Replies: 4
    Last Post: 05-31-2011, 04:11 PM
  2. Replies: 4
    Last Post: 06-25-2010, 05:11 AM
  3. Item slot help rep++ rewarded
    By xx k03d xx in forum Help
    Replies: 18
    Last Post: 07-13-2009, 03:11 PM
  4. different item slot
    By wildcard in forum Requests
    Replies: 2
    Last Post: 03-23-2009, 04:01 AM
  5. [RS2D] Item Slot Packet
    By CORBA in forum Tutorials
    Replies: 8
    Last Post: 06-12-2008, 06:01 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
  •