Thread: 508/525 Items Wont Equip

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 508/525 Items Wont Equip 
    Registered Member Mr Steve's Avatar
    Join Date
    May 2010
    Age
    26
    Posts
    77
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    The title says the problem, I've added them to equipment.java, and itemdefinitions.xml. Any ideas? Heres a thread I made on it a while ago. Mostly look at the pic.

    [Only registered and activated users can see links. ]

    Help please, I've looked through the source files but can't find anything relating to max equip id or anything.


    FIXED IT The issue was that itemDefinitions.XML wasn't being packed into itemDefinitions.DAT, so I added this to GameEngine.java

    Code:
    File itemDefs = new File("data/itemDefinitions.dat");
                    if(!itemDefs.exists()) {
                        System.out.println("Loading...");
    		List<ItemDefinition> defs = (List<ItemDefinition>) XStreamUtil.getXStream().fromXML(new FileInputStream("data/itemDefinitions.xml"));
    		System.out.println("Done.");
    		System.gc();
    		System.out.println("Saving...");
    		RandomAccessFile raf = new RandomAccessFile(new File("data/itemDefinitions.dat"), "rw");
    		raf.writeInt(defs.size());
    		for(ItemDefinition def : defs) {
    			raf.writeShort(def.getId());
    			raf.writeShort(def.getEquipId());
    			raf.writeBoolean(def.isNoted());
    			raf.writeBoolean(def.isStackable());
    			raf.writeInt(def.getPrice().getNormalPrice());
    			raf.writeInt(def.getPrice().getMinimumPrice());
    			raf.writeInt(def.getPrice().getMaximumPrice());
    			for(int i = 0; i < 13; i++) {
    				raf.writeShort(def.getBonus(i));
    			}
    			raf.writeBytes(def.getName());
    			raf.writeByte(0);
    			raf.writeBytes(def.getExamine());
    			raf.writeByte(0);
    			if(def.getId() % 100 == 0) {
    				System.out.println(def.getId() + "/" + defs.size());
    			}
    		}
    		raf.close();
    		System.out.println("Done.");
                    }
    All taken from itemxmltobinary.java, and then deleted the itemdef.dat file I already had and presto it worked. Just need the equip id for dragon claws now, atm they equip as a d plate
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  2. #2  
    Registered Member Mr Steve's Avatar
    Join Date
    May 2010
    Age
    26
    Posts
    77
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Bump > New Thread
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  3. #3  
    Registered Member Mr Steve's Avatar
    Join Date
    May 2010
    Age
    26
    Posts
    77
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    2x Bump > 2x new post
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Apr 2010
    Posts
    47
    Thanks given
    0
    Thanks received
    2
    Rep Power
    11
    Item.java equipment.java add the ids
    Reply With Quote  
     

  5. #5  
    Registered Member Mr Steve's Avatar
    Join Date
    May 2010
    Age
    26
    Posts
    77
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Quote Originally Posted by WTF got damn wtfux? View Post
    Item.java equipment.java add the ids
    Like I said the ids are in equipment.java. And where do I add them in here?

    package com.rs2hd.model;

    /**
    * Represents a single item.
    *
    * Immutable.
    * @author Graham
    *
    */
    public class Item {

    private int id;
    private transient ItemDefinition itemDefinition;
    private int amount;

    public int getId() {
    return id;
    }

    public Item clone() {
    return new Item(id, amount);
    }

    public Item(int id) {
    this.id = id;
    this.itemDefinition = ItemDefinition.forId(id);
    this.amount = 1;
    }

    public Item(int id, int amount) {
    this.id = id;
    this.itemDefinition = ItemDefinition.forId(id);
    this.amount = amount;
    if(this.amount <= 0) {
    this.amount = 1;
    }
    }

    public ItemDefinition getDefinition() {
    return itemDefinition;
    }

    public int getAmount() {
    return amount;
    }

    public Object readResolve() {
    this.itemDefinition = ItemDefinition.forId(id);
    return this;
    }

    /**
    * ONLY CALL THIS FROM THE SHOPITEM CLASS.
    * @param amount
    */
    protected void setAmount(int amount) {
    this.amount = amount;
    }

    }
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  6. #6  
    Registered Member Mr Steve's Avatar
    Join Date
    May 2010
    Age
    26
    Posts
    77
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    And once more, a bump. Remember three bumps are better than three new threads.
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  7. #7  
    Registered Member No Mercy's Avatar
    Join Date
    Jun 2010
    Posts
    291
    Thanks given
    0
    Thanks received
    7
    Rep Power
    22
    Code:
    public class Equipment implements Packet {
    
        private String[] capes = {};
        private String[] hats = {};
        private String[] boots = {};
        private String[] gloves = { };
        private String[] shields = {};
        private String[] amulets = {};
        private String[] arrows = {};
        private String[] rings = {};
        private String[] body = {};
        private String[] legs = {};
        private String[] weapons = {};
        private String[] fullbody = {};
        private String[] fullhat = { };
        private String[] fullmask = { };
    Add into these for example in
    Code:
    private String[] weapons = {"scimitar"};
    Then everything thing with scimtar in its name will be equiped to the weapon slot, Make sure to use comma's aswell.

    Hope this helped .
    Formerly Known As Ix Hybrid Xi




    Reply With Quote  
     

  8. #8  
    Registered Member Mr Steve's Avatar
    Join Date
    May 2010
    Age
    26
    Posts
    77
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Nope it didn't I have all that in my equipment.java, what I posted is item.java
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  9. #9  
    Registered Member No Mercy's Avatar
    Join Date
    Jun 2010
    Posts
    291
    Thanks given
    0
    Thanks received
    7
    Rep Power
    22
    What is your problem exactly?
    Formerly Known As Ix Hybrid Xi




    Reply With Quote  
     

  10. #10  
    Registered Member Mr Steve's Avatar
    Join Date
    May 2010
    Age
    26
    Posts
    77
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    I can spawn 525 items like claws, but can't equip them. I spawn them, then click wear and nothing happens. I can equip them by messing around with my characters file, but the don't appear. thats what the problem is, hope that helps you help me.
    [Only registered and activated users can see links. ]
    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. Replies: 8
    Last Post: 07-22-2010, 11:47 PM
  2. Replies: 10
    Last Post: 05-19-2010, 06:22 PM
  3. hi i need help when i equip items
    By pklord in forum Help
    Replies: 5
    Last Post: 02-27-2010, 10:12 PM
  4. RS2HD with equip id fix and spawn fix
    By Simon in forum Downloads
    Replies: 31
    Last Post: 03-06-2009, 06:06 PM
  5. Claws wont equip?
    By Rancid in forum Help
    Replies: 9
    Last Post: 02-25-2009, 02:20 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
  •