Jump to content

Search the Community

Showing results for tags 'replacing'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • RuneLocus
    • News & Announcements
    • Information Booth
    • Website Support
    • Introductions
    • Chat
    • Forum Games
  • RuneScape Development
    • RSPS General
    • RuneScape Private Server (RS2)
    • RuneScape Private Server (503+)
    • RuneScape Private Server (EoC 742+)
  • Other
    • Digital Art
    • Gaming
    • Webdevelopment
    • Computers
  • Marketplace
    • RuneScape Market
    • RSPS Market
    • Others Market
    • Freelance Middleman Services
  • Super Secret Club's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 7 results

  1. I got an opcode error(s) after replacing my cache: [code][Launcher] Initing Cache... Exception in thread "main" java.lang.RuntimeException: MISSING OPCODE 94 FOR ITE M 6 at com.rs.cache.loaders.ItemDefinitions.readValues(ItemDefinitions.java: 840) at com.rs.cache.loaders.ItemDefinitions.readOpcodeValues(ItemDefinitions .java:855) at com.rs.cache.loaders.ItemDefinitions.loadItemDefinitions(ItemDefiniti ons.java:353) at com.rs.cache.loaders.ItemDefinitions.<init>(ItemDefinitions.java:340) at com.rs.cache.loaders.ItemDefinitions.getItemDefinitions(ItemDefinitio ns.java:318) at com.rs.cache.loaders.ItemsEquipIds.init(ItemsEquipIds.java:14) at com.rs.Launcher.main(Launcher.java:74) Press any key to continue . . .[/code] Does anyone possibly know how to fix it? Itemdefinitions.java: [code]package com.rs.cache.loaders; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.FileReader; import java.io.IOException; import java.nio.ByteBuffer; import java.util.HashMap; import java.util.LinkedList; import com.alex.utils.Constants; import com.rs.cache.Cache; import com.rs.game.player.Equipment; import com.rs.utils.GrandExchangePrices; import com.rs.game.player.Skills; import com.rs.io.InputStream; import com.rs.utils.Utils; @SuppressWarnings("unused") public final class ItemDefinitions { private static final ItemDefinitions[] itemsDefinitions; static { // that's why this is here itemsDefinitions = new ItemDefinitions[Utils.getItemDefinitionsSize()]; } private int id; private boolean loaded; public void setValue(int value) { this.value = value; } public int modelId; private String name; // model size information private int modelZoom; private int modelRotation1; private int modelRotation2; private int modelOffset1; private int modelOffset2; // extra information private int stackable; private int value; private boolean membersOnly; // wearing model information private int maleEquip1; private int femaleEquip1; private int maleEquip2; private int femaleEquip2; // 718/735 Opcodes private int opcode44; private int opcode144; private int opcode145; private int opcode150; private int opcode151; private int opcode152; private int opcode153; private int opcode146; private int opcode142; private int opcode154; private int opcode9; private int opcode117; private int opcode17; private int opcode99; private int opcode87; private int opcode55; private int opcode62; private int opcode118; private int opcode56; private int opcode46; private int opcode47; private int opcode83; // options private String[] groundOptions; public String[] inventoryOptions; // model information public int[] originalModelColors; public int[] modifiedModelColors; public short[] originalTextureColors; private short[] modifiedTextureColors; private byte[] unknownArray1; private int[] unknownArray2; // extra information, not used for newer items private boolean unnoted; private int maleEquipModelId3; private int femaleEquipModelId3; private int unknownInt1; private int unknownInt2; private int unknownInt3; private int unknownInt4; private int unknownInt5; private int unknownInt6; private int certId; private int certTemplateId; private int[] stackIds; private int[] stackAmounts; private int unknownInt7; private int unknownInt8; private int unknownInt9; private int unknownInt10; private int unknownInt11; public int teamId; private int lendId; private int lendTemplateId; private int unknownInt12; private int unknownInt13; private int unknownInt14; private int unknownInt15; private int unknownInt16; private int unknownInt17; private int unknownInt18; private int unknownInt19; private int unknownInt20; private int unknownInt21; private int unknownInt22; private int unknownInt23; private int equipSlot; private int equipType; private int unknownInt25; private int unknownInt26; private int unknownInt27; private int unknownInt28; private int unknownInt29; private int unknownInt30; private int unknownInt31; private int unknownInt32; private int opcode13; private int opcode52; private int opcode53; private int opcode82; private int opcode66; private int opcode116; private int opcode157; private int opcode68; private int opcode244; private int opcode170; private int opcode75; private int opcode14; private int opcode27; private int opcode232; private int opcode211; //more opcodes private int opcode254; private int opcode228; private int opcode226; private int opcode255; private int opcode253; private int opcode252; private int opcode156; private int opcode215; private int opcode171; private int opcode3; private int opcode199; private int opcode223; private int opcode198; private int opcode186; private int opcode29; private int opcode238; private int opcode155; private int opcode251; private int opcode22; private int opcode192; private int opcode245; private int opcode45; private int opcode248; private int opcode237; private int opcode243; private int opcode185; private int opcode221; private int opcode240; private int opcode158; private int opcode137; private int opcode143; private int opcode61; private int opcode80; private int opcode196; private int opcode85; private int opcode239; private int opcode177; private int opcode163; private int opcode135; private int opcode120; private int opcode204; private int opcode81; private int opcode208; private int opcode242; private int opcode15; private int opcode233; private int opcode213; private int opcode207; private int opcode216; private int opcode206; private int opcode50; private int opcode193; private int opcode71; private int opcode10; private int opcode235; private int opcode188; private int opcode241; private int opcode236; private int opcode182; private int opcode169; private int opcode190; private int opcode178; private int opcode88; private int opcode200; private int opcode184; private int opcode176; private int opcode197; private int opcode247; private int opcode218; private int opcode250; private int opcode174; private int opcode210; private int opcode164; private int opcode148; private int opcode133; private int opcode222; private int opcode138; private int opcode194; private int opcode119; private int opcode202; private int opcode149; private int opcode64; private int opcode147; private int opcode214; private int opcode74; private int opcode86; private int opcode167; private int opcode161; private int opcode58; private int opcode59; private int opcode187; private int opcode77; private int opcode229; private int opcode230; private int opcode67; private int opcode131; private int opcode225; private int opcode203; private int opcode19; private int opcode43; private int opcode168; private int opcode209; private int opcode166; private int opcode54; private int opcode21; private int opcode73; private int opcode159; private int opcode123; private int opcode180; private int opcode20; private int opcode165; private int opcode84; private int opcode28; private int opcode175; private int opcode141; private int opcode205; private int opcode220; private int opcode136; private int opcode212; private int opcode49; private int opcode69; private int opcode72; private int opcode60; private int opcode219; private int opcode227; private int opcode76; private int opcode234; private int opcode57; private int opcode51; private int opcode124; private int opcode70; private int opcode231; private int opcode162; private int opcode160; private int opcode181; private int opcode183; private int opcode191; private int opcode189; private int opcode179; private int opcode173; private int opcode48; private int opcode172; private int opcode42; private int opcode246; private int opcode89; private int opcode195; private int opcode224; private int opcode63; private int opcode94; private int opcode201; private int opcode217; // extra added private boolean noted; private boolean lended; private HashMap<Integer, Object> clientScriptData; private HashMap<Integer, Integer> itemRequiriments; private int unknownInt24; 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 static ItemDefinitions forName(String name) { for (ItemDefinitions definition : itemsDefinitions) { if (definition.name.equalsIgnoreCase(name)) { return definition; } } return null; } public ItemDefinitions(int id) { this.id = id; setDefaultsVariableValues(); setDefaultOptions(); loadItemDefinitions(); } public boolean isLoaded() { return loaded; } private 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; } private void toNote() { // ItemDefinitions noteItem; //certTemplateId ItemDefinitions realItem = getItemDefinitions(certId); membersOnly = realItem.membersOnly; value = realItem.value; name = realItem.name; stackable = 1; noted = true; } private 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; } private 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 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 HashMap<Integer, Integer> getCreateItemRequirements() { if (clientScriptData == null) return null; HashMap<Integer, Integer> items = new HashMap<Integer, Integer>(); 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.put(requiredAmount, requiredId); 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 (name.equals("Dragon defender")) { itemRequiriments.put(Skills.ATTACK, 60); itemRequiriments.put(Skills.DEFENCE, 60); }else if (getId() == 19784 || getId() == 22401 || getId() == 19780) { // Korasi itemRequiriments.put(Skills.ATTACK, 78); itemRequiriments.put(Skills.STRENGTH, 78); }else if (getId() == 1127 || getId() == 1079 || getId() == 1147 || getId() == 1163 || getId() == 4131 || getId() == 1185 || getId() == 1201) { // rune itemRequiriments.put(Skills.DEFENCE, 40); }else if (getId() == 1067 || getId() == 1115 || getId() == 1175 || getId() == 1153 || getId() == 1137 || getId() == 1191) { // iron itemRequiriments.put(Skills.DEFENCE, 1); }else if (getId() == 1303 || getId() == 1333 || getId() == 1289 || getId() == 1319) { // rune weapons itemRequiriments.put(Skills.ATTACK, 40); }else if (getId() == 1323 || getId() == 1309 || getId() == 1293 || getId() == 1279) { // iron weapons itemRequiriments.put(Skills.ATTACK, 1); }else if (getId() == 2497) { // black dhide chaps itemRequiriments.put(Skills.RANGE, 70); itemRequiriments.put(Skills.DEFENCE, 1); 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); }else if (name.equals("rune arrow")) { itemRequiriments.put(Skills.RANGE, 40); }else if (name.equals("iron arrow")) { itemRequiriments.put(Skills.RANGE, 1); } } return itemRequiriments; } /* * public HashMap<Integer, Integer> getWearingSkillRequiriments() { if * (clientScriptData == null) return null; HashMap<Integer, Integer> skills * = new HashMap<Integer, Integer>(); int nextLevel = -1; int nextSkill = * -1; for (int key : clientScriptData.keySet()) { Object value = * clientScriptData.get(key); if (value instanceof String) continue; if(key * == 277) { skills.put((Integer) value, id == 19709 ? 120 : 99); }else if * (key == 23 && id == 15241) { skills.put(4, (Integer) value); * skills.put(11, 61); } else if (key >= 749 && key < 797) { if (key % 2 == * 0) nextLevel = (Integer) value; else nextSkill = (Integer) value; if * (nextLevel != -1 && nextSkill != -1) { skills.put(nextSkill, nextLevel); * nextLevel = -1; nextSkill = -1; } } * * } return skills; } */ private void setDefaultOptions() { groundOptions = new String[] { null, null, "take", null, null }; inventoryOptions = new String[] { null, null, null, null, "drop" }; } private 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; } private 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) stream.readUnsignedShortLE(); 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 == 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 == 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 if (opcode == 44) opcode44 = stream.readUnsignedShort(); else if (opcode == 55) opcode55 = stream.readUnsignedShort(); else if (opcode == 62) opcode62 = stream.readUnsignedShort(); else if (opcode == 144) opcode144 = stream.readUnsignedShort(); else if (opcode == 118) opcode118 = stream.readUnsignedShort(); else if (opcode == 46) opcode46 = stream.readUnsignedShort(); else if (opcode == 56) opcode56 = stream.readUnsignedShort(); else if (opcode == 47) opcode47 = stream.readUnsignedShort(); else if (opcode == 83) opcode83 = stream.readUnsignedShort(); else if (opcode == 146) opcode146 = stream.readUnsignedShort(); else if (opcode == 87) opcode87 = stream.readUnsignedShort(); else if (opcode == 99) opcode99 = stream.readUnsignedShort(); else if (opcode == 94) opcode94 = stream.readUnsignedShort(); else if (opcode == 17) opcode17 = stream.readUnsignedShort(); else if (opcode == 117) opcode117 = stream.readUnsignedShort(); else if (opcode == 9) opcode9 = stream.readUnsignedShort(); else if (opcode == 142) opcode142 = stream.readUnsignedShort(); else if (opcode == 145) opcode145 = stream.readUnsignedShort(); else if (opcode == 150) opcode150 = stream.readUnsignedShort(); else if (opcode == 151) opcode151 = stream.readUnsignedShort(); else if (opcode == 152) opcode152 = stream.readUnsignedShort(); else if (opcode == 153) opcode153 = stream.readUnsignedShort(); else if (opcode == 154) opcode154 = stream.readUnsignedShort(); else throw new RuntimeException("MISSING OPCODE " + opcode + " FOR ITEM " + getId()); } private int unknownValue1; private int unknownValue2; private final void readOpcodeValues(InputStream stream) { while (true) { int opcode = stream.readUnsignedByte(); if (id == 9977) { stackable = 1; } 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 > 25000; } 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; } public static ItemDefinitions forId(int id2) { return ItemDefinitions.getItemDefinitions(id2); } public int getGEPrice() { return GrandExchangePrices.getPrice(id); } public static class FileUtilities { public static final int BUFFER = 1024; public static boolean exists(String name) { File file = new File(name); return file.exists(); } public static ByteBuffer fileBuffer(String name) throws IOException { File file = new File(name); if(!file.exists()) return null; FileInputStream in = new FileInputStream(name); byte[] data = new byte[BUFFER]; int read; try { ByteBuffer buffer = ByteBuffer.allocate(in.available() + 1); while ((read = in.read(data, 0, BUFFER)) != -1) { buffer.put(data, 0, read); } buffer.flip(); return buffer; } finally { if (in != null) in.close(); in = null; } } public static void writeBufferToFile(String name, ByteBuffer buffer) throws IOException { File file = new File(name); if(!file.exists()) file.createNewFile(); FileOutputStream out = new FileOutputStream(name); out.write(buffer.array(), 0, buffer.remaining()); out.flush(); out.close(); } public static LinkedList<String> readFile(String directory) throws IOException { LinkedList<String> fileLines = new LinkedList<String>(); BufferedReader reader = null; try { reader = new BufferedReader(new FileReader(directory)); String string; while ((string = reader.readLine()) != null) { fileLines.add(string); } } finally { if (reader != null) { reader.close(); reader = null; } } return fileLines; } } }[/code]
  2. I changed my background to my source cache ... I run source it works great but then I run client and it write me this error: [CODE]Error: jn.a() fb.d() lk.a() client.er() | Class225.method2094:57 Class125.method 1401:283 Class275.method2573:59 client.method2806:3711 client.method2773:641 Cla ss291.method2764:641 Class291.method2759:457 Class291.run:384 java.lang.Thread.r un | java.lang.RuntimeException | null 0,0,0,0 0,0,0, 2 0 2 765,503 1 2 2 1 0 0 908 12 -1 hAJWGrsaETglRjuwxMwnlA/d5W6EgYWx java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at sun.net.NetworkClient.doConnect(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.<init>(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Sour ce) at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown So urce) at java.net.URL.openStream(Unknown Source) at IPAddress.method6062(IPAddress.java:171) at client.method2773(client.java:645) at Class291.method2764(Class291.java:641) at Class291.method2759(Class291.java:457) at Class291.run(Class291.java:384) at java.lang.Thread.run(Unknown Source) Error: nk.a() wr.fe() pk.fk() pj.fw() client.ae() mc.m() mc.e() | Class322.metho d3931:46 Class365_Sub1_Sub5_Sub2.method4533:488 Class371.method4584:201 Class370 .method4578:92 client.method2773:650 Class291.method2764:641 Class291.method2759 :457 Class291.run:384 java.lang.Thread.run | java.lang.NullPointerException | 0 ,0,0,0 0,0,0, 2 0 2 765,503 1 2 2 1 0 0 908 12 -1 hAJWGrsaETglRjuwxMwnlA/d5W6EgY Wx java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at sun.net.NetworkClient.doConnect(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.<init>(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Sour ce) at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown So urce) at java.net.URL.openStream(Unknown Source) at IPAddress.method6062(IPAddress.java:171) at Class291.run(Class291.java:388) at java.lang.Thread.run(Unknown Source) error_game_crash [/CODE] please help me :/
  3. In this quick little tutorial I will be showing you how you can change any text that currently says 'Runescape' into your server name. So to do what we stated above, simple follow the below steps: 1. Open up Rsinterface.java and search for "[I][B]if(rsInterface.type == 3)[/B][/I]" and you should see a bunch of if statements similar to that, but simple just add the below code underneath what we searched for. [CODE] if (rsInterface.type == 4) { rsInterface.message = stream.readString().replaceAll( "RuneScape", "Server Name"); rsInterface.aString228 = stream.readString(); } [/CODE] 2. Change the "Server Name" to whatever you want! I hope this helped you out, thanks for reading! - Raw Envy
  4. ok so i believe it was Beta that released this on runeserver although i saw the same post on here from da monster i dont know if there the same people, but i need help with a little bit i tried to add, ok so ive added everything in that tutorial, it works fine, now i want to click on another tab other than the player ranks for another interface to pop up and for this interface to show the commands for the server, so this is the player ranks code in buttonhandler.java [CODE] } else if (interfaceId == 506) { switch (componentId) { case 2://player rankings player.getInterfaceManager().sendInterface(275); player.getPackets().sendIComponentText(275, 2, "Player Rankings"); player.getPackets().sendIComponentText(275, 16, "Owner - Spec"); player.getPackets().sendIComponentText(275, 17, "Admin - "); player.getPackets().sendIComponentText(275, 18, "Admin - "); player.getPackets().sendIComponentText(275, 19, "Admin - "); player.getPackets().sendIComponentText(275, 20, "Mod -"); player.getPackets().sendIComponentText(275, 21, "Mod -"); player.getPackets().sendIComponentText(275, 22, "Mod -"); player.getPackets().sendIComponentText(275, 23, "Mod -"); player.getPackets().sendIComponentText(275, 24, "9"); player.getPackets().sendIComponentText(275, 25, "10"); player.getPackets().sendIComponentText(275, 26, "11"); break; }[/CODE] ok so that works fine when i click on the tab in game this is for the command tab [CODE] } else if (interfaceId == 506) { switch (componentId) { case 8://Commands player.getInterfaceManager().sendInterface(220); player.getPackets().sendIComponentText(220, 2, "Commands"); player.getPackets().sendIComponentText(220, 16, "::home"); player.getPackets().sendIComponentText(220, 17, "::Train"); player.getPackets().sendIComponentText(220, 18, "::bandos"); player.getPackets().sendIComponentText(220, 19, "::sara"); player.getPackets().sendIComponentText(220, 20, "::thieve"); player.getPackets().sendIComponentText(220, 21, "::Altars"); player.getPackets().sendIComponentText(220, 22, "::KBD"); player.getPackets().sendIComponentText(220, 23, "::Fish"); player.getPackets().sendIComponentText(220, 24, "::Smith"); player.getPackets().sendIComponentText(220, 25, "::Mine"); player.getPackets().sendIComponentText(220, 26, "::WC"); break; }[/CODE] [SIZE=4][B]I dont get any errors but when i click the Command button in game it doesnt do anything, any one have any ideas for another interface to pop up and display the commands?[/B][/SIZE]
  5. [CENTER][B][SIZE="5"]Overall product will look some what like this with out the text but i will show you how to add it :)[/SIZE][/B] [IMG]http://i.imgur.com/o7Y8A.jpg[/IMG][/CENTER] [COLOR="Red"][SIZE="5"][B][U]open InterfaceManager.java [MyScape\src\com\rs\game\player\InterfaceManager.java][/U][/B][/SIZE][/COLOR] [COLOR="lime"]Search:[/COLOR] [CODE]public void sendEquipment() { sendTab(resizableScreen ? 95 : 209, 387); }[/CODE] [COLOR="Lime"]Under add:[/COLOR][CODE]public void sendMsPortal() { sendTab(resizableScreen ? 93 : 207, 506); player.getPackets().sendIComponentText(506, 0, "MyScape Portal"); player.getPackets().sendIComponentText(506, 4, "addtext"); player.getPackets().sendIComponentText(506, 6, "addtext"); player.getPackets().sendIComponentText(506, 8, "addtext"); player.getPackets().sendIComponentText(506, 10, "addtext"); player.getPackets().sendIComponentText(506, 12, "addtext"); player.getPackets().sendIComponentText(506, 14, "addtext"); if (player.getRights() == 2) { player.getPackets().sendIComponentText(506, 2, " In-Game Ranks Rank: <img=1><shad=FFFF00>Admin</shad>"); } else if (player.getRights() == 1) { player.getPackets().sendIComponentText(506, 2, " In-Game Ranks Rank: <img=0><shad=D8D8D8>Mod</shad>"); } else if (player.getRights() == 3) { player.getPackets().sendIComponentText(506, 2, " In-Game Ranks Rank: <img=13><col=ff0000>Owner</col>"); } else { player.getPackets().sendIComponentText(506, 2, " In-Game Ranks Rank: <col=ffffff>Player"); } }[/CODE] [COLOR="Blue"]Info:[/COLOR] "506" is the interface and "2, 4, 6 , 8 ect" is the child id's that we will be rewriting. [COLOR="Lime"]Search:[/COLOR] [CODE]sendTab(93, 190);[/CODE] [COLOR="Blue"]Info:[/COLOR] 190 is the quest tab so to do a different tab, Do ::inter 190 or whatever the interface in the code is to see which is which if you want to replace [COLOR="lime"]Replace with:[/COLOR][CODE]sendMsPortal();[/CODE] [COLOR="Blue"]Info:[/COLOR] This is sending the new tab that you added the text to. [COLOR="lime"]Search:[/COLOR] [CODE]sendTab(207, 190);[/CODE] [COLOR="Lime"]Replace with:[/COLOR] [CODE]sendMsPortal();[/CODE] [COLOR="Blue"]Info:[/COLOR] This is replacing the tab for fixed mode Save! [COLOR="red"][SIZE="5"][B][U]open ButtonHandler.java [MyScape\src\com\rs\net\decoders\handlers][/U][/B][/SIZE][/COLOR] [COLOR="Lime"]Search:[/COLOR][CODE] } else if (interfaceId == 671) {[/CODE] [COLOR="lime"]Above that add:[/COLOR][CODE] } else if (interfaceId == 506) { switch (componentId) { case 2://player rankings player.getInterfaceManager().sendInterface(275); player.getPackets().sendIComponentText(275, 2, "Player Rankings"); player.getPackets().sendIComponentText(275, 16, "1"); player.getPackets().sendIComponentText(275, 17, "2"); player.getPackets().sendIComponentText(275, 18, "3"); player.getPackets().sendIComponentText(275, 19, "4"); player.getPackets().sendIComponentText(275, 20, "5"); player.getPackets().sendIComponentText(275, 21, "6"); player.getPackets().sendIComponentText(275, 22, "7"); player.getPackets().sendIComponentText(275, 23, "8"); player.getPackets().sendIComponentText(275, 24, "9"); player.getPackets().sendIComponentText(275, 25, "10"); player.getPackets().sendIComponentText(275, 26, "11"); break;[/CODE] [COLOR="Blue"]Info:[/COLOR] This is the response to me clicking 506 child id 2. It will send a new interface with text but you can change it to a teleport if you want SAVE && COMPILE && ENJOY :)
  6. I've been wondering if it's possible to replace the current item you're wielding, with another one. Example: if you kill KBD with a bronze dagger, if changes the bronze dagger into a dragon dagger. (That's just to show what I mean, that's not what I really want this for) If anyone know's how, I would appreciate it if you could post it. Thank you for your time.
  7. if(n.isIsFamiliar()) { p.turnTemporarilyTo(n); n.turnTemporarilyTo(p); p.getActionSender().sendChatboxInterface(241); p.getActionSender().animateInterface(9827, 241, 2); p.getActionSender().sendNPCOnInterface(6954, 241, 2); p.getActionSender().sendString("Zamorak hawk", 241, 3); p.getActionSender().sendString("Hey, im a sexy zamorak hawk", 241, 4); p.ProjectDungeonFestTutor = 214; } its jsut idk what i would change in ther to make it be a racoon instead of a hawk racoon id is 9236 can anyone help... bcuz the npc id is 6954 but when i change it nuthing happens its still a hawk
×