Thread: 718/742 Client - 742 Client Opcodes

Page 1 of 14 12311 ... LastLast
Results 1 to 10 of 139
  1. #1 718/742 Client - 742 Client Opcodes 
    Registered Member
    Join Date
    Aug 2011
    Posts
    396
    Thanks given
    29
    Thanks received
    57
    Rep Power
    9
    Some people need this so here's a download:
    Download Client.zip @ UppIT



    Credits:
    Runescape - Client itself
    Matrix - Renamed Classes
    Ternary Operator - Renamed Classes
    TheAJ - Server Sided opcodes.

    Fixes:
    Quote Originally Posted by ArcaneStream View Post
    FOR THE PEOPLE THAT DONT KNOW...

    1. This is a 718 Client made for 742 cache. (Other Caches Work)

    2. This has fixed NPC Nulls.

    3. This has fixed BlackScreening.

    4. The cache doesnt delete itself when using this client.

    5. In my opinion, the client is better then the Matrix Release (Not because of the cache fixes but because of improvements)

    6. You do have to do edits to get it to work.

    On topic: Thanks, Love It! ^.^
    Server sided opcodes:
    Spoiler for Item definitions:
    Code:
    package com.rs.cache.loaders;
    
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.HashMap;
    import java.util.List;
    
    import com.alex.utils.Constants;
    import com.rs.cache.Cache;
    import com.rs.game.item.Item;
    import com.rs.game.player.Equipment;
    import com.rs.game.player.Skills;
    import com.rs.io.InputStream;
    import com.rs.utils.Utils;
    
    @SuppressWarnings("unused")
    public final class ItemDefinitions {
    
    	public static final ItemDefinitions[] itemsDefinitions;
    
    	static { // that's why this is here
    		itemsDefinitions = new ItemDefinitions[Utils.getItemDefinitionsSize()];
    	}
    
    	public int id;
    	public boolean loaded;
    
    	public int modelId;
    	public String name;
    
    	// model size information
    	public int modelZoom;
    	public int modelRotation1;
    	public int modelRotation2;
    	public int modelOffset1;
    	public int modelOffset2;
    
    	// extra information
    	public int stackable;
    	public int value;
    	public boolean membersOnly;
    
    	// wearing model information
    	public int maleEquip1;
    	public int femaleEquip1;
    	public int maleEquip2;
    	public int femaleEquip2;
    
    	// options
    	public String[] groundOptions;
    	public String[] inventoryOptions;
    
    	// model information
    	public int[] originalModelColors;
    	public int[] modifiedModelColors;
    	public short[] originalTextureColors;
    	public short[] modifiedTextureColors;
    	public byte[] unknownArray1;
    	public byte[] unknownArray3;
    	public int[] unknownArray2;
    	// extra information, not used for newer items
    	public boolean unnoted;
    
    	public int maleEquipModelId3;
    	public int femaleEquipModelId3;
    	public int unknownInt1;
    	public int unknownInt2;
    	public int unknownInt3;
    	public int unknownInt4;
    	public int unknownInt5;
    	public int unknownInt6;
    	public int certId;
    	public int certTemplateId;
    	public int[] stackIds;
    	public int[] stackAmounts;
    	public int unknownInt7;
    	public int unknownInt8;
    	public int unknownInt9;
    	public int unknownInt10;
    	public int unknownInt11;
    	public int teamId;
    	public int lendId;
    	public int lendTemplateId;
    	public int unknownInt12;
    	public int unknownInt13;
    	public int unknownInt14;
    	public int unknownInt15;
    	public int unknownInt16;
    	public int unknownInt17;
    	public int unknownInt18;
    	public int unknownInt19;
    	public int unknownInt20;
    	public int unknownInt21;
    	public int unknownInt22;
    	public int unknownInt23;
    	public int equipSlot;
    	public int equipType;
    
    	// extra added
    	public boolean noted;
    	public boolean lended;
    
    	public HashMap<Integer, Object> clientScriptData;
    	public HashMap<Integer, Integer> itemRequiriments;
    	public int[] unknownArray5;
    	public int[] unknownArray4;
    	public byte[] unknownArray6;
    
    	public static final ItemDefinitions getItemDefinitions(int itemId) {
    		if (itemId < 0 || itemId >= itemsDefinitions.length)
    			itemId = 0;
    		ItemDefinitions def = itemsDefinitions[itemId];
    		if (def == null)
    			itemsDefinitions[itemId] = def = new ItemDefinitions(itemId);
    		return def;
    	}
    
    	public static final void clearItemsDefinitions() {
    		for (int i = 0; i < itemsDefinitions.length; i++)
    			itemsDefinitions[i] = null;
    	}
    
    	public ItemDefinitions(int id) {
    		this.id = id;
    		setDefaultsVariableValues();
    		setDefaultOptions();
    		loadItemDefinitions();
    	}
    
    	public boolean isLoaded() {
    		return loaded;
    	}
    
    	public final void loadItemDefinitions() {
    		byte[] data = Cache.STORE.getIndexes()[Constants.ITEM_DEFINITIONS_INDEX].getFile(getArchiveId(), getFileId());
    		if (data == null) {
    			// System.out.println("Failed loading Item " + id+".");
    			return;
    		}
    		readOpcodeValues(new InputStream(data));
    		if (certTemplateId != -1)
    			toNote();
    		if (lendTemplateId != -1)
    			toLend();
    		if (unknownValue1 != -1)
    			toBind();
    		loaded = true;
    	}
    	
    	
    	
    	public void toNote() {
    		// ItemDefinitions noteItem; //certTemplateId
    		ItemDefinitions realItem = getItemDefinitions(certId);
    		membersOnly = realItem.membersOnly;
    		value = realItem.value;
    		name = realItem.name;
    		stackable = 1;
    		noted = true;
    	}
    
    	public void toBind() {
    		// ItemDefinitions lendItem; //lendTemplateId
    		ItemDefinitions realItem = getItemDefinitions(unknownValue2);
    		originalModelColors = realItem.originalModelColors;
    		maleEquipModelId3 = realItem.maleEquipModelId3;
    		femaleEquipModelId3 = realItem.femaleEquipModelId3;
    		teamId = realItem.teamId;
    		value = 0;
    		membersOnly = realItem.membersOnly;
    		name = realItem.name;
    		inventoryOptions = new String[5];
    		groundOptions = realItem.groundOptions;
    		if (realItem.inventoryOptions != null)
    			for (int optionIndex = 0; optionIndex < 4; optionIndex++)
    				inventoryOptions[optionIndex] = realItem.inventoryOptions[optionIndex];
    		inventoryOptions[4] = "Discard";
    		maleEquip1 = realItem.maleEquip1;
    		maleEquip2 = realItem.maleEquip2;
    		femaleEquip1 = realItem.femaleEquip1;
    		femaleEquip2 = realItem.femaleEquip2;
    		clientScriptData = realItem.clientScriptData;
    		equipSlot = realItem.equipSlot;
    		equipType = realItem.equipType;
    	}
    
    	public void toLend() {
    		// ItemDefinitions lendItem; //lendTemplateId
    		ItemDefinitions realItem = getItemDefinitions(lendId);
    		originalModelColors = realItem.originalModelColors;
    		maleEquipModelId3 = realItem.maleEquipModelId3;
    		femaleEquipModelId3 = realItem.femaleEquipModelId3;
    		teamId = realItem.teamId;
    		value = 0;
    		membersOnly = realItem.membersOnly;
    		name = realItem.name;
    		inventoryOptions = new String[5];
    		groundOptions = realItem.groundOptions;
    		if (realItem.inventoryOptions != null)
    			for (int optionIndex = 0; optionIndex < 4; optionIndex++)
    				inventoryOptions[optionIndex] = realItem.inventoryOptions[optionIndex];
    		inventoryOptions[4] = "Discard";
    		maleEquip1 = realItem.maleEquip1;
    		maleEquip2 = realItem.maleEquip2;
    		femaleEquip1 = realItem.femaleEquip1;
    		femaleEquip2 = realItem.femaleEquip2;
    		clientScriptData = realItem.clientScriptData;
    		equipSlot = realItem.equipSlot;
    		equipType = realItem.equipType;
    		lended = true;
    	}
    
    	public int getArchiveId() {
    		return getId() >>> 8;
    	}
    
    	public int getFileId() {
    		return 0xff & getId();
    	}
    
    	public boolean isDestroyItem() {
    		if (inventoryOptions == null)
    			return false;
    		for (String option : inventoryOptions) {
    			if (option == null)
    				continue;
    			if (option.equalsIgnoreCase("destroy"))
    				return true;
    		}
    		return false;
    	}
    
    	public boolean containsOption(int i, String option) {
    		if (inventoryOptions == null || inventoryOptions[i] == null
    				|| inventoryOptions.length <= i)
    			return false;
    		return inventoryOptions[i].equals(option);
    	}
    
    	public boolean containsOption(String option) {
    		if (inventoryOptions == null)
    			return false;
    		for (String o : inventoryOptions) {
    			if (o == null || !o.equals(option))
    				continue;
    			return true;
    		}
    		return false;
    	}
    
    	public boolean isWearItem() {
    		return equipSlot != -1;
    	}
    
    	public boolean isWearItem(boolean male) {
    		if (equipSlot < Equipment.SLOT_RING
    				&& (male ? getMaleWornModelId1() == -1
    				: getFemaleWornModelId1() == -1))
    			return false;
    		return equipSlot != -1;
    	}
    
    	public boolean hasSpecialBar() {
    		if (clientScriptData == null)
    			return false;
    		Object specialBar = clientScriptData.get(686);
    		if (specialBar != null && specialBar instanceof Integer)
    			return (Integer) specialBar == 1;
    		return false;
    	}
    	
    	public int getAttackSpeed() {
    		if (clientScriptData == null)
    			return 4;
    		Object attackSpeed = clientScriptData.get(14);
    		if (attackSpeed != null && attackSpeed instanceof Integer)
    			return (int) attackSpeed;
    		return 4;
    	}
    	
    	public int getStabAttack() {
    		if (clientScriptData == null)
    			return 0;
    		Object value = clientScriptData.get(0);
    		if (value != null && value instanceof Integer)
    			return (int) value;
    		return 0;
    	}
    	
    	public int getSlashAttack() {
    		if (clientScriptData == null)
    			return 0;
    		Object value = clientScriptData.get(1);
    		if (value != null && value instanceof Integer)
    			return (int) value;
    		return 0;
    	}
    	
    	public int getCrushAttack() {
    		if (clientScriptData == null)
    			return 0;
    		Object value = clientScriptData.get(2);
    		if (value != null && value instanceof Integer)
    			return (int) value;
    		return 0;
    	}
    	
    	public int getMagicAttack() {
    		if (clientScriptData == null)
    			return 0;
    		Object value = clientScriptData.get(3);
    		if (value != null && value instanceof Integer)
    			return (int) value;
    		return 0;
    	}
    	
    	public int getRangeAttack() {
    		if (clientScriptData == null)
    			return 0;
    		Object value = clientScriptData.get(4);
    		if (value != null && value instanceof Integer)
    			return (int) value;
    		return 0;
    	}
    	
    	public int getStabDef() {
    		if (clientScriptData == null)
    			return 0;
    		Object value = clientScriptData.get(5);
    		if (value != null && value instanceof Integer)
    			return (int) value;
    		return 0;
    	}
    	
    	public int getSlashDef() {
    		if (clientScriptData == null)
    			return 0;
    		Object value = clientScriptData.get(6);
    		if (value != null && value instanceof Integer)
    			return (int) value;
    		return 0;
    	}
    	
    	public int getCrushDef() {
    		if (clientScriptData == null)
    			return 0;
    		Object value = clientScriptData.get(7);
    		if (value != null && value instanceof Integer)
    			return (int) value;
    		return 0;
    	}
    	
    	public int getMagicDef() {
    		if (clientScriptData == null)
    			return 0;
    		Object value = clientScriptData.get(8);
    		if (value != null && value instanceof Integer)
    			return (int) value;
    		return 0;
    	}
    	
    	public int getRangeDef() {
    		if (clientScriptData == null)
    			return 0;
    		Object value = clientScriptData.get(9);
    		if (value != null && value instanceof Integer)
    			return (int) value;
    		return 0;
    	}
    	
    	public int getSummoningDef() {
    		if (clientScriptData == null)
    			return 0;
    		Object value = clientScriptData.get(417);
    		if (value != null && value instanceof Integer)
    			return (int) value;
    		return 0;
    	}
    	
    	public int getAbsorveMeleeBonus() {
    		if (clientScriptData == null)
    			return 0;
    		Object value = clientScriptData.get(967);
    		if (value != null && value instanceof Integer)
    			return (int) value;
    		return 0;
    	}
    	
    	public int getAbsorveMageBonus() {
    		if (clientScriptData == null)
    			return 0;
    		Object value = clientScriptData.get(969);
    		if (value != null && value instanceof Integer)
    			return (int) value;
    		return 0;
    	}
    	
    	public int getAbsorveRangeBonus() {
    		if (clientScriptData == null)
    			return 0;
    		Object value = clientScriptData.get(968);
    		if (value != null && value instanceof Integer)
    			return (int) value;
    		return 0;
    	}
    	
    	public int getStrengthBonus() {
    		if (clientScriptData == null)
    			return 0;
    		Object value = clientScriptData.get(641);
    		if (value != null && value instanceof Integer)
    			return (int) value / 10;
    		return 0;
    	}
    	
    	public int getRangedStrBonus() {
    		if (clientScriptData == null)
    			return 0;
    		Object value = clientScriptData.get(643);
    		if (value != null && value instanceof Integer)
    			return (int) value / 10;
    		return 0;
    	}
    	
    	public int getMagicDamage() {
    		if (clientScriptData == null)
    			return 0;
    		Object value = clientScriptData.get(685);
    		if (value != null && value instanceof Integer)
    			return (int) value;
    		return 0;
    	}
    	
    	public int getPrayerBonus() {
    		if (clientScriptData == null)
    			return 0;
    		Object value = clientScriptData.get(11);
    		if (value != null && value instanceof Integer)
    			return (int) value;
    		return 0;
    	}
    
    
    	public int getRenderAnimId() {
    		if (clientScriptData == null)
    			return 1426;
    		Object animId = clientScriptData.get(644);
    		if (animId != null && animId instanceof Integer)
    			return (Integer) animId;
    		return 1426;
    	}
    
    	public int getModelZoom() {
    		return modelZoom;
    	}
    
    	public int getModelOffset1() {
    		return modelOffset1;
    	}
    
    	public int getModelOffset2() {
    		return modelOffset2;
    	}
    
    	public int getQuestId() {
    		if (clientScriptData == null)
    			return -1;
    		Object questId = clientScriptData.get(861);
    		if (questId != null && questId instanceof Integer)
    			return (Integer) questId;
    		return -1;
    	}
    
    	public List<Item> getCreateItemRequirements() {
    		if (clientScriptData == null)
    			return null;
    		List<Item> items = new ArrayList<Item>();
    		int requiredId = -1;
    		int requiredAmount = -1;
    		for (int key : clientScriptData.keySet()) {
    			Object value = clientScriptData.get(key);
    			if (value instanceof String)
    				continue;
    			if (key >= 538 && key <= 770) {
    				if (key % 2 == 0)
    					requiredId = (Integer) value;
    				else
    					requiredAmount = (Integer) value;
    				if (requiredId != -1 && requiredAmount != -1) {
    					items.add(new Item(requiredId, requiredAmount));
    					requiredId = -1;
    					requiredAmount = -1;
    				}
    			}
    		}
    		return items;
    	}
    
    	public HashMap<Integer, Object> getClientScriptData() {
    		return clientScriptData;
    	}
    
    	public HashMap<Integer, Integer> getWearingSkillRequiriments() {
    		if (clientScriptData == null)
    			return null;
    		if (itemRequiriments == null) {
    			HashMap<Integer, Integer> skills = new HashMap<Integer, Integer>();
    			for (int i = 0; i < 10; i++) {
    				Integer skill = (Integer) clientScriptData.get(749 + (i * 2));
    				if (skill != null) {
    					Integer level = (Integer) clientScriptData.get(750 + (i * 2));
    					if (level != null)
    						skills.put(skill, level);
    				}
    			}
    			Integer maxedSkill = (Integer) clientScriptData.get(277);
    			if (maxedSkill != null)
    				skills.put(maxedSkill, getId() == 19709 ? 120 : 99);
    			itemRequiriments = skills;
    			if (getId() == 7462)
    				itemRequiriments.put(Skills.DEFENCE, 40);
    			else if (getId() == 19784 || getId() == 22401 || getId() == 19780) { // Korasi
    				itemRequiriments.put(Skills.ATTACK, 78);
    				itemRequiriments.put(Skills.STRENGTH, 78);
    			} else if (getId() == 20822 || getId() == 20823 || getId() == 20824
    					|| getId() == 20825 || getId() == 20826)
    				itemRequiriments.put(Skills.DEFENCE, 99);
    			else if (name.equals("Dragon defender")) {
    				itemRequiriments.put(Skills.ATTACK, 60);
    				itemRequiriments.put(Skills.DEFENCE, 60);
    			}
    		}
    		return itemRequiriments;
    	}
    
    	public void setDefaultOptions() {
    		groundOptions = new String[] { null, null, "take", null, null };
    		inventoryOptions = new String[] { null, null, null, null, "drop" };
    	}
    
    	public void setDefaultsVariableValues() {
    		name = "null";
    		maleEquip1 = -1;
    		maleEquip2 = -1;
    		femaleEquip1 = -1;
    		femaleEquip2 = -1;
    		modelZoom = 2000;
    		lendId = -1;
    		lendTemplateId = -1;
    		certId = -1;
    		certTemplateId = -1;
    		unknownInt9 = 128;
    		value = 1;
    		maleEquipModelId3 = -1;
    		femaleEquipModelId3 = -1;
    		unknownValue1 = -1;
    		unknownValue2 = -1;
    		teamId = -1;
    		equipSlot = -1;
    		equipType = -1;
    	}
    
    	public final void readValues(InputStream stream, int opcode) {
    		if (opcode == 1)
    			modelId = stream.readBigSmart();
    		else if (opcode == 2)
    			name = stream.readString();
    		else if (opcode == 4)
    			modelZoom = stream.readUnsignedShort();
    		else if (opcode == 5)
    			modelRotation1 = stream.readUnsignedShort();
    		else if (opcode == 6)
    			modelRotation2 = stream.readUnsignedShort();
    		else if (opcode == 7) {
    			modelOffset1 = stream.readUnsignedShort();
    			if (modelOffset1 > 32767)
    				modelOffset1 -= 65536;
    			modelOffset1 <<= 0;
    		} else if (opcode == 8) {
    			modelOffset2 = stream.readUnsignedShort();
    			if (modelOffset2 > 32767)
    				modelOffset2 -= 65536;
    			modelOffset2 <<= 0;
    		} else if (opcode == 11)
    			stackable = 1;
    		else if (opcode == 12)
    			value = stream.readInt();
    		else if (opcode == 13) {
    			equipSlot = stream.readUnsignedByte();
    		} else if (opcode == 14) {
    			equipType = stream.readUnsignedByte();
    		} else if (opcode == 16)
    			membersOnly = true;
    		else if (opcode == 18) { // added
    			stream.readUnsignedShort();
    		} else if (opcode == 23)
    			maleEquip1 = stream.readBigSmart();
    		else if (opcode == 24)
    			maleEquip2 = stream.readBigSmart();
    		else if (opcode == 25)
    			femaleEquip1 = stream.readBigSmart();
    		else if (opcode == 26)
    			femaleEquip2 = stream.readBigSmart();
    		else if (opcode == 27)
    			stream.readUnsignedByte();
    		else if (opcode >= 30 && opcode < 35)
    			groundOptions[opcode - 30] = stream.readString();
    		else if (opcode >= 35 && opcode < 40)
    			inventoryOptions[opcode - 35] = stream.readString();
    		else if (opcode == 40) {
    			int length = stream.readUnsignedByte();
    			originalModelColors = new int[length];
    			modifiedModelColors = new int[length];
    			for (int index = 0; index < length; index++) {
    				originalModelColors[index] = stream.readUnsignedShort();
    				modifiedModelColors[index] = stream.readUnsignedShort();
    			}
    		} else if (opcode == 41) {
    			int length = stream.readUnsignedByte();
    			originalTextureColors = new short[length];
    			modifiedTextureColors = new short[length];
    			for (int index = 0; index < length; index++) {
    				originalTextureColors[index] = (short) stream
    						.readUnsignedShort();
    				modifiedTextureColors[index] = (short) stream
    						.readUnsignedShort();
    			}
    		} else if (opcode == 42) {
    			int length = stream.readUnsignedByte();
    			unknownArray1 = new byte[length];
    			for (int index = 0; index < length; index++)
    				unknownArray1[index] = (byte) stream.readByte();
    		} else if (opcode == 44) {
    			int length = stream.readUnsignedShort();
    			int arraySize = 0;
    			for (int modifier = 0; modifier > 0; modifier++) {
    				arraySize++;
    				unknownArray3 = new byte[arraySize];
    				byte offset = 0;
    				for (int index = 0; index < arraySize; index++) {
    					if ((length & 1 << index) > 0) {
    						unknownArray3[index] = offset;
    					} else {
    						unknownArray3[index] = -1;
    					}
    				}
    			}
    		} else if (45 == opcode) {
    			int i_97_ =(short) stream.readUnsignedShort();
    			int i_98_ = 0;
    			for (int i_99_ = i_97_; i_99_ > 0; i_99_ >>= 1)
    				i_98_++;
    			unknownArray6 = new byte[i_98_];
    			byte i_100_ = 0;
    			for (int i_101_ = 0; i_101_ < i_98_; i_101_++) {
    				if ((i_97_ & 1 << i_101_) > 0) {
    					unknownArray6[i_101_] = i_100_;
    					i_100_++;
    				} else
    					unknownArray6[i_101_] = (byte) -1;
    			}
    		} else if (opcode == 65)
    			unnoted = true;
    		else if (opcode == 78)
    			maleEquipModelId3 = stream.readBigSmart();
    		else if (opcode == 79)
    			femaleEquipModelId3 = stream.readBigSmart();
    		else if (opcode == 90)
    			unknownInt1 = stream.readBigSmart();
    		else if (opcode == 91)
    			unknownInt2 = stream.readBigSmart();
    		else if (opcode == 92)
    			unknownInt3 = stream.readBigSmart();
    		else if (opcode == 93)
    			unknownInt4 = stream.readBigSmart();
    		else if (opcode == 95)
    			unknownInt5 = stream.readUnsignedShort();
    		else if (opcode == 96)
    			unknownInt6 = stream.readUnsignedByte();
    		else if (opcode == 97)
    			certId = stream.readUnsignedShort();
    		else if (opcode == 98)
    			certTemplateId = stream.readUnsignedShort();
    		else if (opcode >= 100 && opcode < 110) {
    			if (stackIds == null) {
    				stackIds = new int[10];
    				stackAmounts = new int[10];
    			}
    			stackIds[opcode - 100] = stream.readUnsignedShort();
    			stackAmounts[opcode - 100] = stream.readUnsignedShort();
    		} else if (opcode == 110)
    			unknownInt7 = stream.readUnsignedShort();
    		else if (opcode == 111)
    			unknownInt8 = stream.readUnsignedShort();
    		else if (opcode == 112)
    			unknownInt9 = stream.readUnsignedShort();
    		else if (opcode == 113)
    			unknownInt10 = stream.readByte();
    		else if (opcode == 114)
    			unknownInt11 = stream.readByte() * 5;
    		else if (opcode == 115)
    			teamId = stream.readUnsignedByte();
    		else if (opcode == 121)
    			lendId = stream.readUnsignedShort();
    		else if (opcode == 122)
    			lendTemplateId = stream.readUnsignedShort();
    		else if (opcode == 125) {
    			unknownInt12 = stream.readByte() << 0;
    			unknownInt13 = stream.readByte() << 0;
    			unknownInt14 = stream.readByte() << 0;
    		} else if (opcode == 126) {
    			unknownInt15 = stream.readByte() << 0;
    			unknownInt16 = stream.readByte() << 0;
    			unknownInt17 = stream.readByte() << 0;
    		} else if (opcode == 127) {
    			unknownInt18 = stream.readUnsignedByte();
    			unknownInt19 = stream.readUnsignedShort();
    		} else if (opcode == 128) {
    			unknownInt20 = stream.readUnsignedByte();
    			unknownInt21 = stream.readUnsignedShort();
    		} else if (opcode == 129) {
    			unknownInt20 = stream.readUnsignedByte();
    			unknownInt21 = stream.readUnsignedShort();
    		} else if (opcode == 130) {
    			unknownInt22 = stream.readUnsignedByte();
    			unknownInt23 = stream.readUnsignedShort();
    		} else if (opcode == 132) {
    			int length = stream.readUnsignedByte();
    			unknownArray2 = new int[length];
    			for (int index = 0; index < length; index++)
    				unknownArray2[index] = stream.readUnsignedShort();
    		} else if (opcode == 134) {
    			int unknownValue = stream.readUnsignedByte();
    		} else if (opcode == 139) {
    			unknownValue2 = stream.readUnsignedShort();
    		} else if (opcode == 140) {
    			unknownValue1 = stream.readUnsignedShort();
    		} else if (opcode >= 142 && opcode < 147) {
    			if (unknownArray4 == null) {
    				unknownArray4 = new int[6];
    				Arrays.fill(unknownArray4, -1);
    			}
    			unknownArray4[opcode - 142] = stream.readUnsignedShort();
    		} else if (opcode >= 150 && opcode < 155) {
    			if (null == unknownArray5) {
    				unknownArray5 = new int[5];
    				Arrays.fill(unknownArray5, -1);
    			}
    			unknownArray5[opcode - 150] = stream.readUnsignedShort();
    		} else if (opcode == 142) {
    			stream.readByte();
    			stream.readByte();
    		} else if (opcode == 144) {
    			stream.readByte();
    			stream.readByte();
    			stream.readByte();
    		} else if (opcode == 151) {
    			stream.readByte();
    			stream.readByte();
    		} else if (opcode == 249) {
    			int length = stream.readUnsignedByte();
    			if (clientScriptData == null)
    				clientScriptData = new HashMap<Integer, Object>(length);
    			for (int index = 0; index < length; index++) {
    				boolean stringInstance = stream.readUnsignedByte() == 1;
    				int key = stream.read24BitInt();
    				Object value = stringInstance ? stream.readString() : stream
    						.readInt();
    				clientScriptData.put(key, value);
    			}
    		} else
    			throw new RuntimeException("MISSING OPCODE " + opcode
    					+ " FOR ITEM " + getId());
    	}
    
    	public int unknownValue1;
    	public int unknownValue2;
    
    	public final void readOpcodeValues(InputStream stream) {
    		while (true) {
    			int opcode = stream.readUnsignedByte();
    			if (opcode == 0)
    				break;
    			readValues(stream, opcode);
    		}
    	}
    
    	public String getName() {
    		return name;
    	}
    
    	public int getFemaleWornModelId1() {
    		return femaleEquip1;
    	}
    
    	public int getFemaleWornModelId2() {
    		return femaleEquip2;
    	}
    
    	public int getMaleWornModelId1() {
    		return maleEquip1;
    	}
    
    	public int getMaleWornModelId2() {
    		return maleEquip2;
    	}
    
    	public boolean isOverSized() {
    		return modelZoom > 5000;
    	}
    
    	public boolean isLended() {
    		return lended;
    	}
    
    	public boolean isMembersOnly() {
    		return membersOnly;
    	}
    
    	public boolean isStackable() {
    		return stackable == 1;
    	}
    
    	public boolean isNoted() {
    		return noted;
    	}
    
    	public int getLendId() {
    		return lendId;
    	}
    
    	public int getCertId() {
    		return certId;
    	}
    
    	public int getValue() {
    		return value;
    	}
    
    	public int getId() {
    		return id;
    	}
    
    	public int getEquipSlot() {
    		return equipSlot;
    	}
    
    	public int getEquipType() {
    		return equipType;
    	}
    }


    Spoiler for NPC definitions:
    Code:
    package com.rs.cache.loaders;
    
    import java.io.IOException;
    import java.util.Arrays;
    import java.util.HashMap;
    import java.util.concurrent.ConcurrentHashMap;
    
    import com.rs.cache.Cache;
    import com.rs.io.InputStream;
    
    @SuppressWarnings("unused")
    public final class NPCDefinitions {
    
    	private static final ConcurrentHashMap<Integer, NPCDefinitions> npcDefinitions = new ConcurrentHashMap<Integer, NPCDefinitions>();
    
    	private int id;
    	public HashMap<Integer, Object> clientScriptData;
    	public int anInt833;
    	public int anInt836;
    	public int anInt837;
    	public byte respawnDirection;
    	public int size = 1;
    	public int[][] anIntArrayArray840;
    	public boolean aBoolean841;
    	public int anInt842;
    	public int bConfig;
    	public int[] transformTo;
    	public int anInt846;
    	public int renderEmote;
    	public boolean aBoolean849 = false;
    	public int anInt850;
    	public byte aByte851;
    	public boolean aBoolean852;
    	public int anInt853;
    	public byte aByte854;
    	public boolean aBoolean856;
    	public boolean aBoolean857;
    	public short[] aShortArray859;
    	public int combatLevel;
    	public byte[] aByteArray861;
    	public short aShort862;
    	public boolean aBoolean863;
    	public int anInt864;
    	public String name;
    	public short[] aShortArray866;
    	public byte walkMask;
    	public int[] modelIds;
    	public int anInt869;
    	public int anInt870;
    	public int anInt871;
    	public int anInt872;
    	public int anInt874;
    	public int anInt875;
    	public int anInt876;
    	public int headIcons;
    	public int anInt879;
    	public short[] aShortArray880;
    	public int[][] anIntArrayArray882;
    	public int anInt884;
    	public int[] anIntArray885;
    	public int config;
    	public int anInt889;
    	public boolean isVisibleOnMap;
    	public int[] anIntArray892;
    	public short aShort894;
    	public String[] options;
    	public short[] aShortArray896;
    	public int anInt897;
    	public int anInt899;
    	public int npcId;
    	public int anInt901;
    
    	public static final NPCDefinitions getNPCDefinitions(int id) {
    		NPCDefinitions def = npcDefinitions.get(id);
    		if (def == null) {
    			def = new NPCDefinitions(id);
    			def.method694();
    			byte[] data = Cache.STORE.getIndexes()[18].getFile(
    					id >>> 134238215, id & 0x7f);
    			if (data == null) {
    				//System.out.println("Failed loading NPC " + id + ".");
    			} else
    				def.readValueLoop(new InputStream(data));
    			npcDefinitions.put(id, def);
    		}
    		return def;
    	}
    
    	public void method694() {
    		if (modelIds == null)
    			modelIds = new int[0];
    	}
    
    	private void readValueLoop(InputStream stream) {
    		while (true) {
    			int opcode = stream.readUnsignedByte();
    			if (opcode == 0)
    				break;
    			readValues(stream, opcode);
    		}
    	}
    
    	public boolean aBoolean3190;
    
    	private byte[] aByteArray1293;
    
    	private byte[] aByteArray12930;
    
    	private int[] anIntArray2930;
    
    	private void readValues(InputStream stream, int opcode) {
    		if (opcode != 1) {
    			if (opcode == 2)
    				name = stream.readString();
    			else if ((opcode ^ 0xffffffff) != -13) {
    				if (opcode >= 30 && (opcode ^ 0xffffffff) > -36) {
    					options[opcode - 30] = stream.readString();
    					if (options[-30 + opcode].equalsIgnoreCase("Hidden"))
    						options[-30 + opcode] = null;
    				} else if ((opcode ^ 0xffffffff) != -41) {
    					if (opcode == 41) {
    						int i = stream.readUnsignedByte();
    						aShortArray880 = new short[i];
    						aShortArray866 = new short[i];
    						for (int i_54_ = 0; (i_54_ ^ 0xffffffff) > (i ^ 0xffffffff); i_54_++) {
    							aShortArray880[i_54_] = (short) stream
    									.readUnsignedShort();
    							aShortArray866[i_54_] = (short) stream
    									.readUnsignedShort();
    						}
    					} else if (opcode == 44) {
    						int i_24_ = (short) stream.readUnsignedShort();
    						int i_25_ = 0;
    						for (int i_26_ = i_24_; i_26_ > 0; i_26_ >>= 1)
    							i_25_++;
    						aByteArray12930 = new byte[i_25_];
    						byte i_27_ = 0;
    						for (int i_28_ = 0; i_28_ < i_25_; i_28_++) {
    							if ((i_24_ & 1 << i_28_) > 0) {
    								aByteArray12930[i_28_] = i_27_;
    								i_27_++;
    							} else
    								aByteArray12930[i_28_] = (byte) -1;
    						}
    					} else if (45 == opcode) {
    						int i_29_ = (short) stream.readUnsignedShort();
    						int i_30_ = 0;
    						for (int i_31_ = i_29_; i_31_ > 0; i_31_ >>= 1)
    							i_30_++;
    						aByteArray1293 = new byte[i_30_];
    						byte i_32_ = 0;
    						for (int i_33_ = 0; i_33_ < i_30_; i_33_++) {
    							if ((i_29_ & 1 << i_33_) > 0) {
    								aByteArray1293[i_33_] = i_32_;
    								i_32_++;
    							} else
    								aByteArray1293[i_33_] = (byte) -1;
    						}
    					} else if ((opcode ^ 0xffffffff) == -43) {
    						int i = stream.readUnsignedByte();
    						aByteArray861 = new byte[i];
    						for (int i_55_ = 0; i > i_55_; i_55_++)
    							aByteArray861[i_55_] = (byte) stream.readByte();
    					} else if ((opcode ^ 0xffffffff) != -61) {
    						if (opcode == 93)
    							isVisibleOnMap = false;
    						else if ((opcode ^ 0xffffffff) == -96)
    							combatLevel = stream.readUnsignedShort();
    						else if (opcode != 97) {
    							if ((opcode ^ 0xffffffff) == -99)
    								anInt899 = stream.readUnsignedShort();
    							else if ((opcode ^ 0xffffffff) == -100)
    								aBoolean863 = true;
    							else if (opcode == 100)
    								anInt869 = stream.readByte();
    							else if ((opcode ^ 0xffffffff) == -102)
    								anInt897 = stream.readByte() * 5;
    							else if ((opcode ^ 0xffffffff) == -103)
    								headIcons = stream.readUnsignedShort();
    							else if (opcode != 103) {
    								if (opcode == 106 || opcode == 118) {
    									bConfig = stream.readUnsignedShort();
    									if (bConfig == 65535)
    										bConfig = -1;
    									config = stream.readUnsignedShort();
    									if (config == 65535)
    										config = -1;
    									int i = -1;
    									if ((opcode ^ 0xffffffff) == -119) {
    										i = stream.readUnsignedShort();
    										if ((i ^ 0xffffffff) == -65536)
    											i = -1;
    									}
    									int i_56_ = stream.readUnsignedByte();
    									transformTo = new int[2 + i_56_];
    									for (int i_57_ = 0; i_56_ >= i_57_; i_57_++) {
    										transformTo[i_57_] = stream
    												.readUnsignedShort();
    										if (transformTo[i_57_] == 65535)
    											transformTo[i_57_] = -1;
    									}
    									transformTo[i_56_ - -1] = i;
    								} else if ((opcode ^ 0xffffffff) != -108) {
    									if ((opcode ^ 0xffffffff) == -110)
    										aBoolean852 = false;
    									else if ((opcode ^ 0xffffffff) != -112) {
    										if (opcode != 113) {
    											if (opcode == 114) {
    												aByte851 = (byte) (stream
    														.readByte());
    												aByte854 = (byte) (stream
    														.readByte());
    											} else if (opcode == 115) {
    												stream.readUnsignedByte();
    												stream.readUnsignedByte();
    											} else if ((opcode ^ 0xffffffff) != -120) {
    												if (opcode != 121) {
    													if ((opcode ^ 0xffffffff) != -123) {
    														if (opcode == 123)
    															anInt846 = (stream
    																	.readUnsignedShort());
    														else if (opcode != 125) {
    															if (opcode == 127)
    																renderEmote = (stream
    																		.readUnsignedShort());
    															else if ((opcode ^ 0xffffffff) == -129)
    																stream.readUnsignedByte();
    															else if (opcode != 134) {
    																if (opcode == 135) {
    																	anInt833 = stream
    																			.readUnsignedByte();
    																	anInt874 = stream
    																			.readUnsignedShort();
    																} else if (opcode != 136) {
    																	if (opcode != 137) {
    																		if (opcode != 138) {
    																			if ((opcode ^ 0xffffffff) != -140) {
    																				if (opcode == 140)
    																					anInt850 = stream
    																					.readUnsignedByte();
    																				else if (opcode == 141)
    																					aBoolean849 = true;
    																				else if ((opcode ^ 0xffffffff) != -143) {
    																					if (opcode == 143)
    																						aBoolean856 = true;
    																					else if ((opcode ^ 0xffffffff) <= -151
    																							&& opcode < 155) {
    																						options[opcode - 150] = stream
    																								.readString();
    																						if (options[opcode - 150]
    																								.equalsIgnoreCase("Hidden"))
    																							options[opcode
    																							        + -150] = null;
    																					} else if ((opcode ^ 0xffffffff) == -161) {
    																						int i = stream
    																								.readUnsignedByte();
    																						anIntArray885 = new int[i];
    																						for (int i_58_ = 0; i > i_58_; i_58_++)
    																							anIntArray885[i_58_] = stream
    																							.readUnsignedShort();
    
    																						// all
    																						// added
    																						// after
    																						// here
    																					} else if (opcode == 155) {
    																						int aByte821 = stream
    																								.readByte();
    																						int aByte824 = stream
    																								.readByte();
    																						int aByte843 = stream
    																								.readByte();
    																						int aByte855 = stream
    																								.readByte();
    																					} else if (opcode == 158) {
    																						byte aByte833 = (byte) 1;
    																					} else if (opcode == 159) {
    																						byte aByte833 = (byte) 0;
    																					} else if (opcode == 162) { // added
    																						// opcode
    																						aBoolean3190 = true;
    																					} else if (opcode == 163) { // added
    																						// opcode
    																						int anInt864 = stream
    																								.readUnsignedByte();
    																					} else if (opcode == 164) {
    																						int anInt848 = stream
    																								.readUnsignedShort();
    																						int anInt837 = stream
    																								.readUnsignedShort();
    																					} else if (opcode == 165) {
    																						int anInt847 = stream
    																								.readUnsignedByte();
    																					} else if (opcode == 168) {
    																						int anInt828 = stream
    																								.readUnsignedByte();
    																					} else if (opcode >= 170 && opcode < 176) {
    																						if (null == anIntArray2930) {
    																							anIntArray2930 = new int[6];
    																							Arrays.fill(anIntArray2930, -1);
    																						}
    																						int i_44_ = (short) stream.readUnsignedShort();
    																						if (i_44_ == 65535)
    																							i_44_ = -1;
    																						anIntArray2930[opcode - 170] = i_44_;
    																					} else if (opcode == 249) {
    																						int i = stream
    																								.readUnsignedByte();
    																						if (clientScriptData == null) {
    																							clientScriptData = new HashMap<Integer, Object>(
    																									i);
    																						}
    																						for (int i_60_ = 0; i > i_60_; i_60_++) {
    																							boolean stringInstance = stream
    																									.readUnsignedByte() == 1;
    																							int key = stream.read24BitInt();
    																							Object value;
    																							if (stringInstance)
    																								value = stream.readString();
    																							else
    																								value = stream.readInt();
    																							clientScriptData.put(key, value);
    																						}
    																					}
    																				} else
    																					anInt870 = stream
    																					.readUnsignedShort();
    																			} else
    																				anInt879 = stream
    																				.readBigSmart();
    																		} else
    																			anInt901 = stream
    																			.readBigSmart();
    																	} else
    																		anInt872 = stream
    																		.readUnsignedShort();
    																} else {
    																	anInt837 = stream
    																			.readUnsignedByte();
    																	anInt889 = stream
    																			.readUnsignedShort();
    																}
    															} else {
    																anInt876 = (stream
    																		.readUnsignedShort());
    																if (anInt876 == 65535)
    																	anInt876 = -1;
    																anInt842 = (stream
    																		.readUnsignedShort());
    																if (anInt842 == 65535)
    																	anInt842 = -1;
    																anInt884 = (stream
    																		.readUnsignedShort());
    																if ((anInt884 ^ 0xffffffff) == -65536)
    																	anInt884 = -1;
    																anInt871 = (stream
    																		.readUnsignedShort());
    																if ((anInt871 ^ 0xffffffff) == -65536)
    																	anInt871 = -1;
    																anInt875 = (stream
    																		.readUnsignedByte());
    															}
    														} else
    															respawnDirection = (byte) (stream
    																	.readByte());
    													} else
    														anInt836 = (stream
    																.readBigSmart());
    												} else {
    													anIntArrayArray840 = (new int[modelIds.length][]);
    													int i = (stream
    															.readUnsignedByte());
    													for (int i_62_ = 0; ((i_62_ ^ 0xffffffff) > (i ^ 0xffffffff)); i_62_++) {
    														int i_63_ = (stream
    																.readUnsignedByte());
    														int[] is = (anIntArrayArray840[i_63_] = (new int[3]));
    														is[0] = (stream
    																.readByte());
    														is[1] = (stream
    																.readByte());
    														is[2] = (stream
    																.readByte());
    													}
    												}
    											} else
    												walkMask = (byte) (stream
    														.readByte());
    										} else {
    											aShort862 = (short) (stream
    													.readUnsignedShort());
    											aShort894 = (short) (stream
    													.readUnsignedShort());
    										}
    									} else
    										aBoolean857 = false;
    								} else
    									aBoolean841 = false;
    							} else
    								anInt853 = stream.readUnsignedShort();
    						} else
    							anInt864 = stream.readUnsignedShort();
    					} else {
    						int i = stream.readUnsignedByte();
    						anIntArray892 = new int[i];
    						for (int i_64_ = 0; (i_64_ ^ 0xffffffff) > (i ^ 0xffffffff); i_64_++)
    							anIntArray892[i_64_] = stream.readBigSmart();
    					}
    				} else {
    					int i = stream.readUnsignedByte();
    					aShortArray859 = new short[i];
    					aShortArray896 = new short[i];
    					for (int i_65_ = 0; (i ^ 0xffffffff) < (i_65_ ^ 0xffffffff); i_65_++) {
    						aShortArray896[i_65_] = (short) stream
    								.readUnsignedShort();
    						aShortArray859[i_65_] = (short) stream
    								.readUnsignedShort();
    					}
    				}
    			} else
    				size = stream.readUnsignedByte();
    		} else {
    			int i = stream.readUnsignedByte();
    			modelIds = new int[i];
    			for (int i_66_ = 0; i_66_ < i; i_66_++) {
    				modelIds[i_66_] = stream.readBigSmart();
    				if ((modelIds[i_66_] ^ 0xffffffff) == -65536)
    					modelIds[i_66_] = -1;
    			}
    		}
    	}
    
    	public static final void clearNPCDefinitions() {
    		npcDefinitions.clear();
    	}
    
    	public NPCDefinitions(int id) {
    		this.id = id;
    		anInt842 = -1;
    		bConfig = -1;
    		anInt837 = -1;
    		anInt846 = -1;
    		anInt853 = 32;
    		combatLevel = -1;
    		anInt836 = -1;
    		name = "null";
    		anInt869 = 0;
    		walkMask = (byte) 0;
    		anInt850 = 255;
    		anInt871 = -1;
    		aBoolean852 = true;
    		aShort862 = (short) 0;
    		anInt876 = -1;
    		aByte851 = (byte) -96;
    		anInt875 = 0;
    		anInt872 = -1;
    		renderEmote = -1;
    		respawnDirection = (byte) 7;
    		aBoolean857 = true;
    		anInt870 = -1;
    		anInt874 = -1;
    		anInt833 = -1;
    		anInt864 = 128;
    		headIcons = -1;
    		aBoolean856 = false;
    		config = -1;
    		aByte854 = (byte) -16;
    		aBoolean863 = false;
    		isVisibleOnMap = true;
    		anInt889 = -1;
    		anInt884 = -1;
    		aBoolean841 = true;
    		anInt879 = -1;
    		anInt899 = 128;
    		aShort894 = (short) 0;
    		options = new String[5];
    		anInt897 = 0;
    		anInt901 = -1;
    	}
    
    	public boolean hasMarkOption() {
    		for (String option : options) {
    			if (option != null && option.equalsIgnoreCase("mark"))
    				return true;
    		}
    		return false;
    	}
    
    	public boolean hasOption(String op) {
    		for (String option : options) {
    			if (option != null && option.equalsIgnoreCase(op))
    				return true;
    		}
    		return false;
    	}
    
    	public boolean hasAttackOption() {
    		if(id == 14899)
    			return true;
    		for (String option : options) {
    			if (option != null && option.equalsIgnoreCase("attack"))
    				return true;
    		}
    		return false;
    	}
    	
    	public String getName() {
    		return name;
    	}
    }



    Spoiler for Object definitions:
    Code:
    package com.rs.cache.loaders;
    
    import java.io.IOException;
    import java.lang.reflect.Field;
    import java.util.Arrays;
    import java.util.HashMap;
    import java.util.concurrent.ConcurrentHashMap;
    
    import com.rs.cache.Cache;
    import com.rs.game.player.content.dungeoneering.DungeonUtils;
    import com.rs.io.InputStream;
    
    @SuppressWarnings("unused")
    public class ObjectDefinitions {
    
    	private static final ConcurrentHashMap<Integer, ObjectDefinitions> objectDefinitions = new ConcurrentHashMap<Integer, ObjectDefinitions>();
    
    	private short[] originalColors;
    	int[] toObjectIds;
    	static int anInt3832;
    	int[] anIntArray3833 = null;
    	private int anInt3834;
    	int anInt3835;
    	static int anInt3836;
    	private byte aByte3837;
    	int anInt3838 = -1;
    	boolean aBoolean3839;
    	private int anInt3840;
    	private int anInt3841;
    	static int anInt3842;
    	static int anInt3843;
    	int anInt3844;
    	boolean aBoolean3845;
    	static int anInt3846;
    	private byte aByte3847;
    	private byte aByte3849;
    	int anInt3850;
    	int anInt3851;
    	public boolean secondBool;
    	public boolean aBoolean3853;
    	int anInt3855;
    	public boolean notCliped;
    	int anInt3857;
    	private byte[] aByteArray3858;
    	int[] anIntArray3859;
    	int anInt3860;
    	String[] options;
    	int configFileId;
    	private short[] modifiedColors;
    	int anInt3865;
    	boolean aBoolean3866;
    	boolean aBoolean3867;
    	public boolean projectileCliped;
    	private int[] anIntArray3869;
    	boolean aBoolean3870;
    	public int sizeY;
    	boolean aBoolean3872;
    	boolean aBoolean3873;
    	public int thirdInt;
    	private int anInt3875;
    	public int objectAnimation;
    	private int anInt3877;
    	private int anInt3878;
    	public int clipType;
    	private int anInt3881;
    	private int anInt3882;
    	private int anInt3883;
    	Object loader;
    	private int anInt3889;
    	public int sizeX;
    	public boolean aBoolean3891;
    	int anInt3892;
    	public int secondInt;
    	boolean aBoolean3894;
    	boolean aBoolean3895;
    	int anInt3896;
    	int configId;
    	private byte[] aByteArray3899;
    	int anInt3900;
    	public String name;
    	private int anInt3902;
    	int anInt3904;
    	int anInt3905;
    	boolean aBoolean3906;
    	int[] anIntArray3908;
    	private byte aByte3912;
    	int anInt3913;
    	private byte aByte3914;
    	private int anInt3915;
    	public int[][] modelIds;
    	private int anInt3917;
    	/**
    	 * Object anim shit 1
    	 */
    	private short[] aShortArray3919;
    	/**
    	 * Object anim shit 2
    	 */
    	private short[] aShortArray3920;
    	int anInt3921;
    	private HashMap<Integer, Object> parameters;
    	boolean aBoolean3923;
    	boolean aBoolean3924;
    	int anInt3925;
    	public int id;
    
    	private int[] anIntArray4534;
    
    	private byte[] unknownArray4;
    
    	private byte[] unknownArray3;
    
    
    	public String getFirstOption() {
    		if (options == null || options.length < 1)
    			return "";
    		return options[0];
    	}
    
    	public String getSecondOption() {
    		if (options == null || options.length < 2)
    			return "";
    		return options[1];
    	}
    
    	public String getOption(int option) {
    		if (options == null || options.length < option || option == 0)
    			return "";
    		return options[option - 1];
    	}
    
    	public String getThirdOption() {
    		if (options == null || options.length < 3)
    			return "";
    		return options[2];
    	}
    
    	public boolean containsOption(int i, String option) {
    		if (options == null || options[i] == null || options.length <= i)
    			return false;
    		return options[i].equals(option);
    	}
    
    	public boolean containsOption(String o) {
    		if (options == null)
    			return false;
    		for (String option : options) {
    			if (option == null)
    				continue;
    			if (option.equalsIgnoreCase(o))
    				return true;
    		}
    		return false;
    	}
    
    	private void readValues(InputStream stream, int opcode) {
    		// System.out.println(opcode);
    		if (opcode != 1 && opcode != 5) {
    			if (opcode != 2) {
    				if (opcode != 14) {
    					if (opcode != 15) {
    						if (opcode == 17) { // nocliped
    							projectileCliped = false;
    							clipType = 0;
    						} else if (opcode != 18) {
    							if (opcode == 19)
    								secondInt = stream.readUnsignedByte();
    							else if (opcode == 21)
    								aByte3912 = (byte) 1;
    							else if (opcode != 22) {
    								if (opcode != 23) {
    									if (opcode != 24) {
    										if (opcode == 27) // cliped, no idea
    											// diff between 2
    											// and 1
    											clipType = 1;
    										else if (opcode == 28)
    											anInt3892 = (stream
    													.readUnsignedByte() << 2);
    										else if (opcode != 29) {
    											if (opcode != 39) {
    												if (opcode < 30 || opcode >= 35) {
    													if (opcode == 40) {
    														int i_53_ = (stream
    																.readUnsignedByte());
    														originalColors = new short[i_53_];
    														modifiedColors = new short[i_53_];
    														for (int i_54_ = 0; i_53_ > i_54_; i_54_++) {
    															originalColors[i_54_] = (short) (stream
    																	.readUnsignedShort());
    															modifiedColors[i_54_] = (short) (stream
    																	.readUnsignedShort());
    														}
    													}  else if (44 == opcode) {
    														int i_86_ = (short) stream.readUnsignedShort();
    														int i_87_ = 0;
    														for (int i_88_ = i_86_; i_88_ > 0; i_88_ >>= 1)
    															i_87_++;
    														unknownArray3 = new byte[i_87_];
    														byte i_89_ = 0;
    														for (int i_90_ = 0; i_90_ < i_87_; i_90_++) {
    															if ((i_86_ & 1 << i_90_) > 0) {
    																unknownArray3[i_90_] = i_89_;
    																i_89_++;
    															} else
    																unknownArray3[i_90_] = (byte) -1;
    														} 
    													} else if (opcode == 45) {
    														int i_91_ = (short) stream.readUnsignedShort();
    														int i_92_ = 0;
    														for (int i_93_ = i_91_; i_93_ > 0; i_93_ >>= 1)
    															i_92_++;
    														unknownArray4 = new byte[i_92_];
    														byte i_94_ = 0;
    														for (int i_95_ = 0; i_95_ < i_92_; i_95_++) {
    															if ((i_91_ & 1 << i_95_) > 0) {
    																unknownArray4[i_95_] = i_94_;
    																i_94_++;
    															} else
    																unknownArray4[i_95_] = (byte) -1;
    														}
    													} else if (opcode != 41) { // object
    														// anim
    														if (opcode != 42) {
    															if (opcode != 62) {
    																if (opcode != 64) {
    																	if (opcode == 65)
    																		anInt3902 = stream
    																		.readUnsignedShort();
    																	else if (opcode != 66) {
    																		if (opcode != 67) {
    																			if (opcode == 69)
    																				anInt3925 = stream
    																				.readUnsignedByte();
    																			else if (opcode != 70) {
    																				if (opcode == 71)
    																					anInt3889 = stream
    																					.readShort() << 2;
    																				else if (opcode != 72) {
    																					if (opcode == 73)
    																						secondBool = true;
    																					else if (opcode == 74)
    																						notCliped = true;
    																					else if (opcode != 75) {
    																						if (opcode != 77
    																								&& opcode != 92) {
    																							if (opcode == 78) {
    																								anInt3860 = stream
    																										.readUnsignedShort();
    																								anInt3904 = stream
    																										.readUnsignedByte();
    																							} else if (opcode != 79) {
    																								if (opcode == 81) {
    																									aByte3912 = (byte) 2;
    																									anInt3882 = 256 * stream
    																											.readUnsignedByte();
    																								} else if (opcode != 82) {
    																									if (opcode == 88)
    																										aBoolean3853 = false;
    																									else if (opcode != 89) {
    																										if (opcode == 90)
    																											aBoolean3870 = true;
    																										else if (opcode != 91) {
    																											if (opcode != 93) {
    																												if (opcode == 94)
    																													aByte3912 = (byte) 4;
    																												else if (opcode != 95) {
    																													if (opcode != 96) {
    																														if (opcode == 97)
    																															aBoolean3866 = true;
    																														else if (opcode == 98)
    																															aBoolean3923 = true;
    																														else if (opcode == 99) {
    																															anInt3857 = stream
    																																	.readUnsignedByte();
    																															anInt3835 = stream
    																																	.readUnsignedShort();
    																														} else if (opcode == 100) {
    																															anInt3844 = stream
    																																	.readUnsignedByte();
    																															anInt3913 = stream
    																																	.readUnsignedShort();
    																														} else if (opcode != 101) {
    																															if (opcode == 102)
    																																anInt3838 = stream
    																																.readUnsignedShort();
    																															else if (opcode == 103)
    																																thirdInt = 0;
    																															else if (opcode != 104) {
    																																if (opcode == 105)
    																																	aBoolean3906 = true;
    																																else if (opcode == 106) {
    																																	int i_55_ = stream
    																																			.readUnsignedByte();
    																																	anIntArray3869 = new int[i_55_];
    																																	anIntArray3833 = new int[i_55_];
    																																	for (int i_56_ = 0; i_56_ < i_55_; i_56_++) {
    																																		anIntArray3833[i_56_] = stream
    																																				.readBigSmart();
    																																		int i_57_ = stream
    																																				.readUnsignedByte();
    																																		anIntArray3869[i_56_] = i_57_;
    																																		anInt3881 += i_57_;
    																																	}
    																																} else if (opcode == 107)
    																																	anInt3851 = stream
    																																	.readUnsignedShort();
    																																else if (opcode >= 150
    																																		&& opcode < 155) {
    																																	options[opcode
    																																	        + -150] = stream
    																																	        .readString();
    																																} else if (opcode != 160) {
    																																	if (opcode == 162) {
    																																		aByte3912 = (byte) 3;
    																																		anInt3882 = stream
    																																				.readInt();
    																																	} else if (opcode == 163) {
    																																		aByte3847 = (byte) stream
    																																				.readByte();
    																																		aByte3849 = (byte) stream
    																																				.readByte();
    																																		aByte3837 = (byte) stream
    																																				.readByte();
    																																		aByte3914 = (byte) stream
    																																				.readByte();
    																																	} else if (opcode != 164) {
    																																		if (opcode != 165) {
    																																			if (opcode != 166) {
    																																				if (opcode == 167)
    																																					anInt3921 = stream
    																																					.readUnsignedShort();
    																																				else if (opcode != 168) {
    																																					if (opcode == 169) {
    																																						aBoolean3845 = true;
    																																						// added
    																																						// opcode
    																																					} else if (opcode == 170) {
    																																						int anInt3383 = stream
    																																								.readUnsignedSmart();
    																																						// added
    																																						// opcode
    																																					} else if (opcode == 171) {
    																																						int anInt3362 = stream
    																																								.readUnsignedSmart();
    																																						// added
    																																						// opcode
    																																					} else if (opcode == 173) {
    																																						int anInt3302 = stream
    																																								.readUnsignedShort();
    																																						int anInt3336 = stream
    																																								.readUnsignedShort();
    																																						// added
    																																						// opcode
    																																					} else if (opcode == 177) {
    																																						boolean ub = true;
    																																						// added
    																																						// opcode
    																																					} else if (opcode == 178) {
    																																						int db = stream
    																																								.readUnsignedByte();
    																																					} else if (opcode == 189) {
    																																						boolean bloom = true;
    																																					} else if (opcode >= 190 && opcode < 196) {
    																																							if (anIntArray4534 == null) {
    																																								anIntArray4534 = new int[6];
    																																								Arrays.fill(anIntArray4534, -1);
    																																							}
    																																							anIntArray4534[opcode - 190] = stream.readUnsignedShort();
    																																					} else if (opcode == 249) {
    																																						int length = stream
    																																								.readUnsignedByte();
    																																						if (parameters == null)
    																																							parameters = new HashMap<Integer, Object>(
    																																									length);
    																																						for (int i_60_ = 0; i_60_ < length; i_60_++) {
    																																							boolean bool = stream
    																																									.readUnsignedByte() == 1;
    																																							int i_61_ = stream
    																																									.read24BitInt();
    																																							if (!bool)
    																																								parameters
    																																								.put(i_61_,
    																																										stream.readInt());
    																																							else
    																																								parameters
    																																								.put(i_61_,
    																																										stream.readString());
    
    																																						}
    																																					}
    																																				} else
    																																					aBoolean3894 = true;
    																																			} else
    																																				anInt3877 = stream
    																																				.readShort();
    																																		} else
    																																			anInt3875 = stream
    																																			.readShort();
    																																	} else
    																																		anInt3834 = stream
    																																		.readShort();
    																																} else {
    																																	int i_62_ = stream
    																																			.readUnsignedByte();
    																																	anIntArray3908 = new int[i_62_];
    																																	for (int i_63_ = 0; i_62_ > i_63_; i_63_++)
    																																		anIntArray3908[i_63_] = stream
    																																		.readUnsignedShort();
    																																}
    																															} else
    																																anInt3865 = stream
    																																.readUnsignedByte();
    																														} else
    																															anInt3850 = stream
    																															.readUnsignedByte();
    																													} else
    																														aBoolean3924 = true;
    																												} else {
    																													aByte3912 = (byte) 5;
    																													anInt3882 = stream
    																															.readShort();
    																												}
    																											} else {
    																												aByte3912 = (byte) 3;
    																												anInt3882 = stream
    																														.readUnsignedShort();
    																											}
    																										} else
    																											aBoolean3873 = true;
    																									} else
    																										aBoolean3895 = false;
    																								} else
    																									aBoolean3891 = true;
    																							} else {
    																								anInt3900 = stream
    																										.readUnsignedShort();
    																								anInt3905 = stream
    																										.readUnsignedShort();
    																								anInt3904 = stream
    																										.readUnsignedByte();
    																								int i_64_ = stream
    																										.readUnsignedByte();
    																								anIntArray3859 = new int[i_64_];
    																								for (int i_65_ = 0; i_65_ < i_64_; i_65_++)
    																									anIntArray3859[i_65_] = stream
    																									.readUnsignedShort();
    																							}
    																						} else {
    																							configFileId = stream
    																									.readUnsignedShort();
    																							if (configFileId == 65535)
    																								configFileId = -1;
    																							configId = stream
    																									.readUnsignedShort();
    																							if (configId == 65535)
    																								configId = -1;
    																							int i_66_ = -1;
    																							if (opcode == 92) {
    																								i_66_ = stream
    																										.readBigSmart();
    																							}
    																							int i_67_ = stream
    																									.readUnsignedByte();
    																							toObjectIds = new int[i_67_
    																							                      - -2];
    																							for (int i_68_ = 0; i_67_ >= i_68_; i_68_++) {
    																								toObjectIds[i_68_] = stream
    																										.readBigSmart();
    																							}
    																							toObjectIds[i_67_ + 1] = i_66_;
    																						}
    																					} else
    																						anInt3855 = stream
    																						.readUnsignedByte();
    																				} else
    																					anInt3915 = stream
    																					.readShort() << 2;
    																			} else
    																				anInt3883 = stream
    																				.readShort() << 2;
    																		} else
    																			anInt3917 = stream
    																			.readUnsignedShort();
    																	} else
    																		anInt3841 = stream
    																		.readUnsignedShort();
    																} else
    																	// 64
    																	aBoolean3872 = false;
    															} else
    																aBoolean3839 = true;
    														} else {
    															int i_69_ = (stream
    																	.readUnsignedByte());
    															aByteArray3858 = (new byte[i_69_]);
    															for (int i_70_ = 0; i_70_ < i_69_; i_70_++)
    																aByteArray3858[i_70_] = (byte) (stream
    																		.readByte());
    														}
    													} else { // object anim?
    														int i_71_ = (stream
    																.readUnsignedByte());
    														aShortArray3920 = new short[i_71_];
    														aShortArray3919 = new short[i_71_];
    														for (int i_72_ = 0; i_71_ > i_72_; i_72_++) {
    															aShortArray3920[i_72_] = (short) (stream
    																	.readUnsignedShort());
    															aShortArray3919[i_72_] = (short) (stream
    																	.readUnsignedShort());
    														}
    													}
    												} else {
    													options[-30 + opcode] = (stream
    															.readString());
    												}
    											} else
    												// 39
    												anInt3840 = (stream.readByte() * 5);
    										} else {// 29
    											anInt3878 = stream.readByte();
    										}
    									} else {
    										objectAnimation = stream.readBigSmart();
    									}
    								} else
    									thirdInt = 1;
    							} else
    								aBoolean3867 = true;
    						} else
    							projectileCliped = false;
    					} else
    						// 15
    						sizeY = stream.readUnsignedByte();
    				} else
    					// 14
    					sizeX = stream.readUnsignedByte();
    			} else {
    				name = stream.readString();
    			}
    		} else {
    			boolean aBoolean1162 = false;
    			if (opcode == 5 && aBoolean1162)
    				skipReadModelIds(stream);
    			int i_73_ = stream.readUnsignedByte();
    			modelIds = new int[i_73_][];
    			aByteArray3899 = new byte[i_73_];
    			for (int i_74_ = 0; i_74_ < i_73_; i_74_++) {
    				aByteArray3899[i_74_] = (byte) stream.readByte();
    				int i_75_ = stream.readUnsignedByte();
    				modelIds[i_74_] = new int[i_75_];
    				for (int i_76_ = 0; i_75_ > i_76_; i_76_++)
    					modelIds[i_74_][i_76_] = stream.readBigSmart();
    			}
    			if (opcode == 5 && !aBoolean1162)
    				skipReadModelIds(stream);
    		}
    	}
    
    	private void skipReadModelIds(InputStream stream) {
    		int length = stream.readUnsignedByte();
    		for (int index = 0; index < length; index++) {
    			stream.skip(1);
    			int length2 = stream.readUnsignedByte();
    			for (int i = 0; i < length2; i++)
    				stream.readBigSmart();
    		}
    	}
    
    	private void readValueLoop(InputStream stream) {
    		for (;;) {
    			int opcode = stream.readUnsignedByte();
    			if (opcode == 0) {
    				// System.out.println("Remaining: "+stream.getRemaining());
    				break;
    			}
    			readValues(stream, opcode);
    		}
    	}
    
    	private ObjectDefinitions() {
    		anInt3835 = -1;
    		anInt3860 = -1;
    		configFileId = -1;
    		aBoolean3866 = false;
    		anInt3851 = -1;
    		anInt3865 = 255;
    		aBoolean3845 = false;
    		aBoolean3867 = false;
    		anInt3850 = 0;
    		anInt3844 = -1;
    		anInt3881 = 0;
    		anInt3857 = -1;
    		aBoolean3872 = true;
    		anInt3882 = -1;
    		anInt3834 = 0;
    		options = new String[5];
    		anInt3875 = 0;
    		aBoolean3839 = false;
    		anIntArray3869 = null;
    		sizeY = 1;
    		thirdInt = -1;
    		anInt3883 = 0;
    		aBoolean3895 = true;
    		anInt3840 = 0;
    		aBoolean3870 = false;
    		anInt3889 = 0;
    		aBoolean3853 = true;
    		secondBool = false;
    		clipType = 2;
    		projectileCliped = true;
    		notCliped = false;
    		anInt3855 = -1;
    		anInt3878 = 0;
    		anInt3904 = 0;
    		sizeX = 1;
    		objectAnimation = -1;
    		aBoolean3891 = false;
    		anInt3905 = 0;
    		name = "null";
    		anInt3913 = -1;
    		aBoolean3906 = false;
    		aBoolean3873 = false;
    		aByte3914 = (byte) 0;
    		anInt3915 = 0;
    		anInt3900 = 0;
    		secondInt = -1;
    		aBoolean3894 = false;
    		aByte3912 = (byte) 0;
    		anInt3921 = 0;
    		anInt3902 = 128;
    		configId = -1;
    		anInt3877 = 0;
    		anInt3925 = 0;
    		anInt3892 = 64;
    		aBoolean3923 = false;
    		aBoolean3924 = false;
    		anInt3841 = 128;
    		anInt3917 = 128;
    	}
    
    	final void method3287() {
    		if (secondInt == -1) {
    			secondInt = 0;
    			if (aByteArray3899 != null && aByteArray3899.length == 1
    					&& aByteArray3899[0] == 10)
    				secondInt = 1;
    			for (int i_13_ = 0; i_13_ < 5; i_13_++) {
    				if (options[i_13_] != null) {
    					secondInt = 1;
    					break;
    				}
    			}
    		}
    		if (anInt3855 == -1)
    			anInt3855 = clipType != 0 ? 1 : 0;
    	}
    
    	private static int getArchiveId(int i_0_) {
    		return i_0_ >>> -1135990488;
    	}
    
    	public static ObjectDefinitions getObjectDefinitions(int id) {
    		ObjectDefinitions def = objectDefinitions.get(id);
    		if (def == null) {
    			def = new ObjectDefinitions();
    			def.id = id;
    			byte[] data = Cache.STORE.getIndexes()[16].getFile(getArchiveId(id), id & 0xff);
    			if (data == null) {
    				// System.out.println("Failed loading Object " + id + ".");
    			} else
    				def.readValueLoop(new InputStream(data));
    			def.method3287();
    			if (def.name.equalsIgnoreCase("bank booth") || def.name.equalsIgnoreCase("counter")) {
    				def.notCliped = false;
    				def.projectileCliped = true;
    				if (def.clipType == 0)
    					def.clipType = 1;
    			} else if (DungeonUtils.isDoor(id)) {
    				def.notCliped = false;
    				def.projectileCliped = true;
    				if (def.clipType == 0)
    					def.clipType = 1;
    			}
    			if (def.notCliped) {
    				def.projectileCliped = false;
    				def.clipType = 0;
    			}
    			objectDefinitions.put(id, def);
    		}
    		return def;
    	}
    
    	public int getClipType() {
    		return clipType;
    	}
    
    	public boolean isProjectileCliped() {
    		return projectileCliped;
    	}
    
    	public int getSizeX() {
    		return sizeX;
    	}
    
    	public int getSizeY() {
    		return sizeY;
    	}
    
    	public static void clearObjectDefinitions() {
    		objectDefinitions.clear();
    	}
    
    	/**
    	 * Prints all fields in this class.
    	 */
    	public void printFields() {
    		for (Field field : getClass().getDeclaredFields()) {
    			if ((field.getModifiers() & 8) != 0) {
    				continue;
    			}
    			try {
    				System.out.println(field.getName() + ": " + getValue(field));
    			} catch (Throwable e) {
    				e.printStackTrace();
    			}
    		}
    		System.out.println("-- end of " + getClass().getSimpleName()
    				+ " fields --");
    	}
    
    	private Object getValue(Field field) throws Throwable {
    		field.setAccessible(true);
    		Class<?> type = field.getType();
    		if (type == int[][].class) {
    			return Arrays.toString((int[][]) field.get(this));
    		} else if (type == int[].class) {
    			return Arrays.toString((int[]) field.get(this));
    		} else if (type == byte[].class) {
    			return Arrays.toString((byte[]) field.get(this));
    		} else if (type == short[].class) {
    			return Arrays.toString((short[]) field.get(this));
    		} else if (type == double[].class) {
    			return Arrays.toString((double[]) field.get(this));
    		} else if (type == float[].class) {
    			return Arrays.toString((float[]) field.get(this));
    		} else if (type == Object[].class) {
    			return Arrays.toString((Object[]) field.get(this));
    		}
    		return field.get(this);
    	}
    
    }
    Reply With Quote  
     


  2. #2  
    Aganoth Developer

    Aust1n's Avatar
    Join Date
    Aug 2012
    Posts
    1,857
    Thanks given
    280
    Thanks received
    406
    Rep Power
    60
    Thanks ! no more black screen? and nulls?




    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Aug 2011
    Posts
    396
    Thanks given
    29
    Thanks received
    57
    Rep Power
    9
    Quote Originally Posted by Aust1n View Post
    Thanks ! no more black screen? and nulls?
    Yes, fixes nulls. Not sure about black screen.
    Reply With Quote  
     

  4. #4  
    Aganoth Developer

    Aust1n's Avatar
    Join Date
    Aug 2012
    Posts
    1,857
    Thanks given
    280
    Thanks received
    406
    Rep Power
    60
    How do i compile? theres no compiler

    Edit: Client doesnt work for me i can log on but client crashes




    Reply With Quote  
     

  5. #5  
    Super Donator
    Kova+'s Avatar
    Join Date
    Jan 2012
    Posts
    937
    Thanks given
    124
    Thanks received
    249
    Rep Power
    13
    Use a compiler from another client, the client is missing somethings, it'll give you 4 errors. If you're not stupid you'll be able to figure it out. Client works perfect for me thanks Cheater.
    Reply With Quote  
     

  6. #6  
    Aganoth Developer

    Aust1n's Avatar
    Join Date
    Aug 2012
    Posts
    1,857
    Thanks given
    280
    Thanks received
    406
    Rep Power
    60
    Release a fixed version?
    Edit: Fixed it




    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Aug 2011
    Posts
    396
    Thanks given
    29
    Thanks received
    57
    Rep Power
    9
    This client works perfectly fine, please try again. Maybe use a IDE
    Reply With Quote  
     

  8. #8  
    Server up and coming!
    Sheep's Avatar
    Join Date
    Nov 2012
    Posts
    268
    Thanks given
    4
    Thanks received
    9
    Rep Power
    11
    Quote Originally Posted by Aust1n View Post
    Release a fixed version?
    Edit: Fixed it
    How did you fix it?
    Reply With Quote  
     

  9. #9  
    Server up and coming!
    Sheep's Avatar
    Join Date
    Nov 2012
    Posts
    268
    Thanks given
    4
    Thanks received
    9
    Rep Power
    11
    I just get js5_connect error or whatever its called. Will this work with a 718 source?
    Reply With Quote  
     

  10. #10  
    Registered Member
    maffia-rpg's Avatar
    Join Date
    Jul 2011
    Posts
    2,775
    Thanks given
    587
    Thanks received
    759
    Rep Power
    120
    From which defs did you changed the opcodes?
    Quote Originally Posted by Nando View Post
    why would I care about trying to get you to care about me homosexual?
    back to coding shit revisions
    1080% lost.
    Reply With Quote  
     

Page 1 of 14 12311 ... 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. 742 Client Opcodes
    By CheaterXman in forum Configuration
    Replies: 11
    Last Post: 07-08-2013, 12:00 PM
  2. 647 opcodes
    By gf son in forum Configuration
    Replies: 2
    Last Post: 01-02-2013, 06:34 AM
  3. 718/742 opcodes client sided.
    By Ultimategodz in forum Help
    Replies: 0
    Last Post: 12-28-2012, 08:29 PM
  4. 718 opcodes maybe?
    By javaeffort in forum Help
    Replies: 1
    Last Post: 12-21-2012, 12:21 PM
  5. Client Opcodes
    By Zonchord in forum Help
    Replies: 7
    Last Post: 07-05-2010, 12:51 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
  •