Thread: 667 Client

Results 1 to 6 of 6
  1. #1 667 Client 
    Registered Member
    Join Date
    Oct 2014
    Posts
    39
    Thanks given
    7
    Thanks received
    1
    Rep Power
    11
    Hello

    Can't figure out if this is a cache issue, or a client/server handshake type issue.

    Can get past login and once the game world loads, it crashes with this error. I've checked the xteas and I'm using the client released with the server.

    Code:
    TemporaryItemDefinition.<init>:37 Node_Sub38_Sub27.method2882:287 Player.decodeAppearence:424 Class91.decodePlayerMasks:163 CacheNode_Sub14_Sub2.decodePlayerMasks:110 OutputStream_Sub1.decodeGlobalPlayerUpdate:22 PacketParser.method2249:1676 Class194_Sub3_Sub1.method1980:31 Node_Sub38_Sub38.method2916:143 Client.method120:1756 Client.method97:1637 GameStub.method98:520 GameStub.run:370 java.lang.Thread.run | java.lang.NullPointerException | T2 - 69,28,46 - 60,3086,3502 - -16,0,0,127,-12,-119,2,-127,78,0,-1,-1,-1,0,0,0,0,0,1,24,0,1,26,3,113,1,4,1,34,1,42,1,98,0,0,0,1,-105,-50,0,0,0,0,0,0,0,5,-110,74,111,

    Client resets to main login screen, relogging loops error. I get a brief view of edgeville but nothing more. No characters or NPC's, but objects are visible.
    Reply With Quote  
     

  2. #2  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,788
    Thanks given
    706
    Thanks received
    702
    Rep Power
    570
    Quote Originally Posted by xCryptic13 View Post
    Hello

    Can't figure out if this is a cache issue, or a client/server handshake type issue.

    Can get past login and once the game world loads, it crashes with this error. I've checked the xteas and I'm using the client released with the server.

    Code:
    TemporaryItemDefinition.<init>:37 Node_Sub38_Sub27.method2882:287 Player.decodeAppearence:424 Class91.decodePlayerMasks:163 CacheNode_Sub14_Sub2.decodePlayerMasks:110 OutputStream_Sub1.decodeGlobalPlayerUpdate:22 PacketParser.method2249:1676 Class194_Sub3_Sub1.method1980:31 Node_Sub38_Sub38.method2916:143 Client.method120:1756 Client.method97:1637 GameStub.method98:520 GameStub.run:370 java.lang.Thread.run | java.lang.NullPointerException | T2 - 69,28,46 - 60,3086,3502 - -16,0,0,127,-12,-119,2,-127,78,0,-1,-1,-1,0,0,0,0,0,1,24,0,1,26,3,113,1,4,1,34,1,42,1,98,0,0,0,1,-105,-50,0,0,0,0,0,0,0,5,-110,74,111,

    Client resets to main login screen, relogging loops error. I get a brief view of edgeville but nothing more. No characters or NPC's, but objects are visible.
    It's an error while decoding your player's appearance. Post the 3 first classes of the error. Also your player appearance code server side if you can find it. It could be caused by how you encode the data or the order you encode it in. You might be missing some new fields if your server revision does not exactly match the client. I also had a crash a while back because it was trying to read the block's data backwards for some reason...
    Project thread
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Oct 2014
    Posts
    39
    Thanks given
    7
    Thanks received
    1
    Rep Power
    11
    Quote Originally Posted by clem585 View Post
    It's an error while decoding your player's appearance. Post the 3 first classes of the error. Also your player appearance code server side if you can find it. It could be caused by how you encode the data or the order you encode it in. You might be missing some new fields if your server revision does not exactly match the client. I also had a crash a while back because it was trying to read the block's data backwards for some reason...
    Which classes specifically do you need? I'll post what I think you're talking about to save time in between replies lol.

    Player Appearance (Server sided) Appearance.java
    Code:
    package com.runescape.game.world.entity.player;
    
    import com.runescape.cache.loaders.ItemDefinitions;
    import com.runescape.cache.loaders.ItemsEquipIds;
    import com.runescape.cache.loaders.NPCDefinitions;
    import com.runescape.game.interaction.controllers.impl.Wilderness;
    import com.runescape.game.world.item.Item;
    import com.runescape.network.stream.OutputStream;
    import com.runescape.utility.Utils;
    
    import java.io.Serializable;
    import java.util.Arrays;
    
    public class Appearence implements Serializable {
    
    	private static final long serialVersionUID = 7655608569741626586L;
    
    	private int title;
    
    	private int[] look;
    
    	private byte[] colour;
    
    	private boolean male;
    
    	private transient int renderEmote;
    
    	private transient boolean glowRed;
    
    	private transient byte[] appeareanceData;
    
    	private transient byte[] md5AppeareanceDataHash;
    
    	private transient short transformedNpcId;
    
    	private boolean hidePlayer;
    
    	private transient Player player;
    
    	public Appearence() { }
    
    	public Appearence setAppearance() {
    		male = true;
    		renderEmote = -1;
    		title = -1;
    		resetAppearence();
    		return this;
    	}
    
    	public void resetAppearence() {
    		look = new int[7];
    		colour = new byte[10];
    		male();
    	}
    
    	public void male() {
    		look[0] = 3; // Hair
    		look[1] = 14; // Beard
    		look[2] = 18; // Torso
    		look[3] = 26; // Arms
    		look[4] = 34; // Bracelets
    		look[5] = 38; // Legs
    		look[6] = 42; // Shoes~
    		colour[2] = 16;
    		colour[1] = 16;
    		colour[0] = 3;
    		male = true;
    	}
    
    	public Appearence setDefaultAppearance() {
    		getLook()[0] = 4;
    		getLook()[1] = 98;
    		getLook()[2] = 24;
    		getLook()[3] = 26;
    		getLook()[4] = 34;
    		getLook()[5] = 625;
    		getLook()[6] = 42;
    
    		getColour()[0] = 1;
    		getColour()[1] = -105;
    		getColour()[2] = -50;
    
    		male = true;
    		return this;
    	}
    
    	public void setGlowRed(boolean glowRed) {
    		this.glowRed = glowRed;
    		generateAppearenceData();
    	}
    
    	public void generateAppearenceData() {
    		OutputStream stream = new OutputStream();
    		int flag = 0;
    		if (!male) {
    			flag |= 0x1;
    		}
    		if (transformedNpcId >= 0 && NPCDefinitions.getNPCDefinitions(transformedNpcId).aBoolean3190) {
    			flag |= 0x2;
    		}
    		stream.writeByte(flag);
    		stream.writeByte(title); // mobi arms titles
    		stream.writeByte(player.hasSkull() ? player.getSkullId() : -1);
    		stream.writeByte(player.getPrayer().getPrayerHeadIcon()); // prayer icon
    		stream.writeByte(hidePlayer ? 1 : 0);
    		if (transformedNpcId >= 0) {
    			stream.writeShort(-1); // 65535 tells it a npc
    			stream.writeShort(transformedNpcId);
    			stream.writeByte(0);
    		} else {
    			for (int index = 0; index < 4; index++) {
    				Item item = player.getEquipment().getItems().get(index);
    				if (glowRed) {
    					if (index == 0) {
    						stream.writeShort(32768 + ItemsEquipIds.getEquipId(2910));
    						continue;
    					}
    					if (index == 1) {
    						stream.writeShort(32768 + ItemsEquipIds.getEquipId(14641));
    						continue;
    					}
    				}
    				if (item == null) {
    					stream.writeByte(0);
    				} else {
    					stream.writeShort(32768 + item.getEquipId());
    				}
    			}
    			Item item = player.getEquipment().getItems().get(Equipment.SLOT_CHEST);
    			stream.writeShort(item == null ? 0x100 + look[2] : 32768 + item.getEquipId());
    			item = player.getEquipment().getItems().get(Equipment.SLOT_SHIELD);
    			if (item == null) {
    				stream.writeByte(0);
    			} else {
    				stream.writeShort(32768 + item.getEquipId());
    			}
    			item = player.getEquipment().getItems().get(Equipment.SLOT_CHEST);
    			if (item == null || !Equipment.hideArms(item)) {
    				stream.writeShort(0x100 + look[3]);
    			} else {
    				stream.writeByte(0);
    			}
    			item = player.getEquipment().getItems().get(Equipment.SLOT_LEGS);
    			stream.writeShort(glowRed ? 32768 + ItemsEquipIds.getEquipId(2908) : item == null ? 0x100 + look[5] : 32768 + item.getEquipId());
    			item = player.getEquipment().getItems().get(Equipment.SLOT_HAT);
    			if (!glowRed && (item == null || !Equipment.hideHair(item))) {
    				stream.writeShort(0x100 + look[0]);
    			} else {
    				stream.writeByte(0);
    			}
    			item = player.getEquipment().getItems().get(Equipment.SLOT_HANDS);
    			stream.writeShort(glowRed ? 32768 + ItemsEquipIds.getEquipId(2912) : item == null ? 0x100 + look[4] : 32768 + item.getEquipId());
    			item = player.getEquipment().getItems().get(Equipment.SLOT_FEET);
    			stream.writeShort(glowRed ? 32768 + ItemsEquipIds.getEquipId(2904) : item == null ? 0x100 + look[6] : 32768 + item.getEquipId());
    			item = player.getEquipment().getItems().get(male ? Equipment.SLOT_HAT : Equipment.SLOT_CHEST);
    			if (item == null || (male && Equipment.showBeard(item))) {
    				stream.writeShort(0x100 + look[1]);
    			} else {
    				stream.writeByte(0);
    			}
    			item = player.getEquipment().getItems().get(Equipment.SLOT_AURA);
    			if (item == null) {
    				stream.writeByte(0);
    			} else {
    				stream.writeShort(32768 + item.getEquipId());
    			}
    			int pos = stream.getOffset();
    			stream.writeShort(0);
    			int hash = 0;
    			int slotFlag = -1;
    			for (int slotId = 0; slotId < player.getEquipment().getItems().getSize(); slotId++) {
    				if (Equipment.DISABLED_SLOTS[slotId] != 0) {
    					continue;
    				}
    				slotFlag++;
    				if (slotId == Equipment.SLOT_HAT) {
    					int hatId = player.getEquipment().getHatId();
    					if (hatId == 20768 || hatId == 20770 || hatId == 20772) {
    						ItemDefinitions defs = ItemDefinitions.getItemDefinitions(hatId - 1);
    						if ((hatId == 20768 && Arrays.equals(player.getMaxedCapeCustomized(), defs.originalModelColors) || ((hatId == 20770 || hatId == 20772) && Arrays.equals(player.getCompletionistCapeCustomized(), defs.originalModelColors)))) {
    							continue;
    						}
    						hash |= 1 << slotFlag;
    						stream.writeByte(0x4); // modify 4 model colors
    						int[] hat = hatId == 20768 ? player.getMaxedCapeCustomized() : player.getCompletionistCapeCustomized();
    						int slots = 0 | 1 << 4 | 2 << 8 | 3 << 12;
    						stream.writeShort(slots);
    						for (int i = 0; i < 4; i++) {
    							stream.writeShort(hat[i]);
    						}
    					}
    				} else if (slotId == Equipment.SLOT_CAPE) {
    					int capeId = player.getEquipment().getCapeId();
    					if (capeId == 20767 || capeId == 20769 || capeId == 20771) {
    						ItemDefinitions defs = ItemDefinitions.getItemDefinitions(capeId);
    						if ((capeId == 20767 && Arrays.equals(player.getMaxedCapeCustomized(), defs.originalModelColors) || ((capeId == 20769 || capeId == 20771) && Arrays.equals(player.getCompletionistCapeCustomized(), defs.originalModelColors)))) {
    							continue;
    						}
    						hash |= 1 << slotFlag;
    						stream.writeByte(0x4); // modify 4 model colors
    						int[] cape = capeId == 20767 ? player.getMaxedCapeCustomized() : player.getCompletionistCapeCustomized();
    						int slots = 0 | 1 << 4 | 2 << 8 | 3 << 12;
    						stream.writeShort(slots);
    						for (int i = 0; i < 4; i++) {
    							if (cape[i] == -1) {
    								continue;
    							}
    							stream.writeShort(cape[i]);
    						}
    					}
    				} else if (slotId == Equipment.SLOT_AURA) {
    					int auraId = player.getEquipment().getAuraId();
    					if (auraId == -1 || !player.getAuraManager().isActivated()) {
    						continue;
    					}
    					ItemDefinitions auraDefs = ItemDefinitions.getItemDefinitions(auraId);
    					if (auraDefs.getMaleWornModelId1() == -1 || auraDefs.getFemaleWornModelId1() == -1) {
    						continue;
    					}
    					hash |= 1 << slotFlag;
    					stream.writeByte(0x1); // modify model ids
    					int modelId = player.getAuraManager().getAuraModelId();
    					stream.writeBigSmart(modelId); // male modelid1
    					stream.writeBigSmart(modelId); // female modelid1
    					if (auraDefs.getMaleWornModelId2() != -1 || auraDefs.getFemaleWornModelId2() != -1) {
    						int modelId2 = player.getAuraManager().getAuraModelId();
    						stream.writeBigSmart(modelId2);
    						stream.writeBigSmart(modelId2);
    					}
    				}
    			}
    			int pos2 = stream.getOffset();
    			stream.setOffset(pos);
    			stream.writeShort(hash);
    			stream.setOffset(pos2);
    		}
    
    		for (byte element : colour) {
    			stream.writeByte(element);
    		}
    		stream.writeShort(getRenderEmote());
    		stream.writeString(player.getDisplayName());
    		boolean pvpArea = player.isCanPvp() && player.getControllerManager().getController() instanceof Wilderness && player.getFamiliar() == null;
    		stream.writeByte(pvpArea ? player.getSkills().getCombatLevel() : player.getSkills().getCombatLevelWithSummoning());
    		stream.writeByte(pvpArea ? player.getSkills().getCombatLevelWithSummoning() : 0);
    		stream.writeByte(-1); // higher level acc name appears in front :P
    		stream.writeByte(transformedNpcId >= 0 ? 1 : 0); // to end here else id
    		// need to send more
    		// data
    		if (transformedNpcId >= 0) {
    			NPCDefinitions defs = NPCDefinitions.getNPCDefinitions(transformedNpcId);
    			stream.writeShort(defs.anInt876);
    			stream.writeShort(defs.anInt842);
    			stream.writeShort(defs.anInt884);
    			stream.writeShort(defs.anInt875);
    			stream.writeByte(defs.anInt875);
    		}
    		byte[] appeareanceData = new byte[stream.getOffset()];
    		System.arraycopy(stream.getBuffer(), 0, appeareanceData, 0, appeareanceData.length);
    		byte[] md5Hash = Utils.encryptUsingMD5(appeareanceData);
    		this.appeareanceData = appeareanceData;
    		md5AppeareanceDataHash = md5Hash;
    	}
    
    	public int getRenderEmote() {
    		if (renderEmote >= 0) {
    			return renderEmote;
    		}
    		if (transformedNpcId >= 0) {
    			return NPCDefinitions.getNPCDefinitions(transformedNpcId).renderEmote;
    		}
    		return player.getEquipment().getWeaponRenderEmote();
    	}
    
    	public void setRenderEmote(int id) {
    		this.renderEmote = id;
    		generateAppearenceData();
    	}
    
    	public void setPlayer(Player player) {
    		this.player = player;
    		transformedNpcId = -1;
    		renderEmote = -1;
    		if (look == null) {
    			resetAppearence();
    		}
    	}
    
    	public void transformIntoNPC(int id) {
    		transformedNpcId = (short) id;
    		generateAppearenceData();
    	}
    
    	public void switchHidden() {
    		hidePlayer = !hidePlayer;
    		generateAppearenceData();
    	}
    
    	public boolean isHidden() {
    		return hidePlayer;
    	}
    
    	public void setHidden(boolean hide) {
    		hidePlayer = hide;
    		generateAppearenceData();
    	}
    
    	public int getSize() {
    		if (transformedNpcId >= 0) {
    			return NPCDefinitions.getNPCDefinitions(transformedNpcId).size;
    		}
    		return 1;
    	}
    
    	public void female() {
    		look[0] = 48; // Hair
    		look[1] = 57; // Beard
    		look[2] = 57; // Torso
    		look[3] = 65; // Arms
    		look[4] = 68; // Bracelets
    		look[5] = 77; // Legs
    		look[6] = 80; // Shoes
    
    		colour[2] = 16;
    		colour[1] = 16;
    		colour[0] = 3;
    		male = false;
    	}
    
    	public byte[] getAppeareanceData() {
    		return appeareanceData;
    	}
    
    	public byte[] getMD5AppeareanceDataHash() {
    		return md5AppeareanceDataHash;
    	}
    
    	public boolean isMale() {
    		return male;
    	}
    
    	public void setMale(boolean male) {
    		this.male = male;
    	}
    
    	public void setLook(int i, int i2) {
    		look[i] = i2;
    	}
    
    	public void setColor(int i, int i2) {
    		colour[i] = (byte) i2;
    	}
    
    	public int getTopStyle() {
    		return look[2];
    	}
    
    	public void setTopStyle(int i) {
    		look[2] = i;
    	}
    
    	public void setArmsStyle(int i) {
    		look[3] = i;
    	}
    
    	public void setWristsStyle(int i) {
    		look[4] = i;
    	}
    
    	public void setLegsStyle(int i) {
    		look[5] = i;
    	}
    
    	public void setBootsStyle(int i) {
    		look[6] = i;
    	}
    
    	public int getHairStyle() {
    		return look[0];
    	}
    
    	public void setHairStyle(int i) {
    		look[0] = i;
    	}
    
    	public int getBeardStyle() {
    		return look[1];
    	}
    
    	public void setBeardStyle(int i) {
    		look[1] = i;
    	}
    
    	public int getFacialHair() {
    		return look[1];
    	}
    
    	public void setFacialHair(int i) {
    		look[1] = i;
    	}
    
    	public void setBootsColor(int color) {
    		colour[3] = (byte) color;
    	}
    
    	public int getSkinColor() {
    		return colour[4];
    	}
    
    	public void setSkinColor(int color) {
    		colour[4] = (byte) color;
    	}
    
    	public void setTopColor(int color) {
    		colour[1] = (byte) color;
    	}
    
    	public void setLegsColor(int color) {
    		colour[2] = (byte) color;
    	}
    
    	public int getHairColor() {
    		return colour[0];
    	}
    
    	public void setHairColor(int color) {
    		colour[0] = (byte) color;
    	}
    
    	public void setTitle(int title) {
    		this.title = title;
    		generateAppearenceData();
    	}
    
    	public boolean isNPC() {
    		return transformedNpcId != -1;
    	}
    
    	public void setLooks(short[] look) {
    		for (byte i = 0; i < this.look.length; i = (byte) (i + 1)) {
    			if (look[i] != -1) {
    				this.look[i] = look[i];
    			}
    		}
    	}
    
    	public void copyColors(short[] colors) {
    		for (byte i = 0; i < this.colour.length; i = (byte) (i + 1)) {
    			if (colors[i] != -1) {
    				this.colour[i] = (byte) colors[i];
    			}
    		}
    	}
    
        public int[] getLook() {
            return this.look;
        }
    
        public byte[] getColour() {
            return this.colour;
        }
    
        public short getTransformedNpcId() {
            return this.transformedNpcId;
        }
    }
    ---------- Client Side ------------

    TemporaryItemDefinition.java (Referenced error is at Line 37, I put an arrow here in java comments)
    Code:
    /* Class38 - Decompiled by JODE
     * 
     */
    
    public class TemporaryItemDefinition
    {
    	protected int[] maleWornModelIds;
    	static long aLong562 = -1L;
    	protected short[] modifiedTextureColors;
    	protected int[] anIntArray564;
    	static d aD565;
    	protected int[] femaleWornModelIds;
    	protected short[] modifiedModelColors;
    	protected int[] anIntArray568 = new int[2];
    	static int anInt569;
    	
    	public static void method402(int i) {
    		aD565 = null;
    		if (i != 0) {
    			aLong562 = 8L;
    		}
    	}
    	
    	static final void method403(int i) {
    		anInt569++;
    		if (Node_Sub38_Sub8.anInt10163 != i) {
    			Class320_Sub23.aClass123_8432.method1513(i ^ ~0x6e0f);
    			Class375.method4115((byte) -97);
    			Class297.method3479((byte) -119);
    		}
    	}
    	
    	TemporaryItemDefinition(ItemDefinitions itemdefinition) {
    		anIntArray564 = new int[2];
    		maleWornModelIds = new int[3];
    		femaleWornModelIds = new int[3];
    		maleWornModelIds[0] = itemdefinition.maleEquip1; // <--- This is where the error is flagged
    		maleWornModelIds[1] = itemdefinition.maleEquip2;
    		maleWornModelIds[2] = itemdefinition.maleEquipModelId3;
    		femaleWornModelIds[0] = itemdefinition.femaleEquip1;
    		femaleWornModelIds[1] = itemdefinition.femaleEquip2;
    		femaleWornModelIds[2] = itemdefinition.femaleEquipModelId3;
    		anIntArray564[0] = itemdefinition.maleDialogueModel;
    		anIntArray564[1] = itemdefinition.maleDialogueHat;
    		anIntArray568[0] = itemdefinition.femaleDialogueModel;
    		anIntArray568[1] = itemdefinition.femaleDialogueHat;
    		if (itemdefinition.modifiedModelColors != null) {
    			modifiedModelColors = new short[itemdefinition.modifiedModelColors.length];
    			Class311.method3606(itemdefinition.modifiedModelColors, 0, modifiedModelColors, 0, modifiedModelColors.length);
    		}
    		if (itemdefinition.modifiedTextureColors != null) {
    			modifiedTextureColors = new short[itemdefinition.modifiedTextureColors.length];
    			Class311.method3606(itemdefinition.modifiedTextureColors, 0, modifiedTextureColors, 0, modifiedTextureColors.length);
    		}
    	}
    }
    Node38_Sub27.java (Error is at method:2882 line 287)
    Code:
    /* Node_Sub38_Sub27 - Decompiled by JODE
     * 
     */
    
    public class Node_Sub38_Sub27 extends Node_Sub38
    {
    	private byte[] aByteArray10371 = new byte[512];
    	static int[] anIntArray10372 = new int[1];
    	static int anInt10373;
    	private short[] aShortArray10374;
    	static int anInt10375;
    	static int anInt10376;
    	protected boolean aBoolean10377 = true;
    	protected int anInt10378;
    	static int anInt10379;
    	static int anInt10380;
    	static int anInt10381;
    	protected int anInt10382 = 4;
    	static int anInt10383;
    	protected int anInt10384 = 4;
    	static int anInt10385;
    	private short[] aShortArray10386;
    	static int anInt10387;
    	static int anInt10388;
    	protected int anInt10389;
    	protected int anInt10390;
    	
    	static final void method2878(int i, String string, boolean bool, int i_0_) {
    		Class94.method1065(-81);
    		anInt10379++;
    		if ((i_0_ ^ 0xffffffff) == -1) {
    			Class93.aGraphicsToolkit1241 = Class262_Sub9.method3171(Class262_Sub2.index31, (byte) 55, TemporaryItemDefinition.aD565, 0, Node_Sub38_Sub20.aCanvas10309, 2 * Class213.aNode_Sub27_2512.aClass320_Sub13_7283.method3734(false));
    			if (string != null) {
    				Class93.aGraphicsToolkit1241.GA(0);
    				Class357 class357 = Class44.method461(0, 125, Class285.anInt3600, AnimableAnimator_Sub1.aClass302_9091);
    				Class52 class52 = Class93.aGraphicsToolkit1241.a(class357, Class383.method4187(Node_Sub38_Sub39.aClass302_10500, Class285.anInt3600, 0), true);
    				Node_Sub36_Sub1.method2758(-80);
    				Class169_Sub3.method1779(Class93.aGraphicsToolkit1241, string, true, class357, class52, -16777216);
    			}
    		} else {
    			GraphicsToolkit graphicstoolkit = null;
    			if (string != null) {
    				graphicstoolkit = Class262_Sub9.method3171(Class262_Sub2.index31, (byte) -82, TemporaryItemDefinition.aD565, 0, Node_Sub38_Sub20.aCanvas10309, 0);
    				graphicstoolkit.GA(0);
    				Class357 class357 = Class44.method461(0, -30, Class285.anInt3600, AnimableAnimator_Sub1.aClass302_9091);
    				Class52 class52 = graphicstoolkit.a(class357, Class383.method4187(Node_Sub38_Sub39.aClass302_10500, Class285.anInt3600, 0), true);
    				Node_Sub36_Sub1.method2758(109);
    				Class169_Sub3.method1779(graphicstoolkit, string, true, class357, class52, -16777216);
    			}
    			try {
    				Class93.aGraphicsToolkit1241 = Class262_Sub9.method3171(Class262_Sub2.index31, (byte) -113, TemporaryItemDefinition.aD565, i_0_, Node_Sub38_Sub20.aCanvas10309, 2 * Class213.aNode_Sub27_2512.aClass320_Sub13_7283.method3734(false));
    				if (string != null) {
    					graphicstoolkit.GA(0);
    					Class357 class357 = Class44.method461(0, -5, Class285.anInt3600, AnimableAnimator_Sub1.aClass302_9091);
    					Class52 class52 = graphicstoolkit.a(class357, Class383.method4187(Node_Sub38_Sub39.aClass302_10500, Class285.anInt3600, 0), true);
    					Node_Sub36_Sub1.method2758(-50);
    					Class169_Sub3.method1779(graphicstoolkit, string, true, class357, class52, -16777216);
    				}
    				if (Class93.aGraphicsToolkit1241.k()) {
    					boolean bool_1_ = true;
    					try {
    						bool_1_ = Node_Sub23.aNode_Sub39_7201.anInt7484 > 256;
    					} catch (Throwable throwable) {
    						/* empty */
    					}
    					za var_za;
    					if (bool_1_) {
    						var_za = Class93.aGraphicsToolkit1241.a(146800640);
    					} else {
    						var_za = Class93.aGraphicsToolkit1241.a(104857600);
    					}
    					Class93.aGraphicsToolkit1241.a(var_za);
    				}
    			} catch (Throwable throwable) {
    				int i_2_ = Class213.aNode_Sub27_2512.aClass320_Sub29_7270.method3791(false);
    				if ((i_2_ ^ 0xffffffff) == -3) {
    					Node_Sub12.aBoolean5456 = true;
    				}
    				Class213.aNode_Sub27_2512.method2690(75, 0, Class213.aNode_Sub27_2512.aClass320_Sub29_7270);
    				method2878(60, string, bool, i_2_);
    				return;
    			} finally {
    				if (graphicstoolkit != null) {
    					try {
    						graphicstoolkit.method1233(-7751);
    					} catch (Throwable throwable) {
    						/* empty */
    					}
    				}
    			}
    		}
    		Class213.aNode_Sub27_2512.aClass320_Sub29_7270.method3794(!bool, (byte) 99);
    		Class213.aNode_Sub27_2512.method2690(32, i_0_, Class213.aNode_Sub27_2512.aClass320_Sub29_7270);
    		Class59.method591(-6194);
    		Class93.aGraphicsToolkit1241.b(10000);
    		Class93.aGraphicsToolkit1241.X(32);
    		Class290_Sub6.aClass336_8114 = Class93.aGraphicsToolkit1241.y();
    		Node_Sub5.aClass336_7032 = Class93.aGraphicsToolkit1241.y();
    		Class116.method1163(2);
    		Class93.aGraphicsToolkit1241.a(Class213.aNode_Sub27_2512.aClass320_Sub9_7315.method3715(false) == 1);
    		if (Class93.aGraphicsToolkit1241.o()) {
    			Node_Sub19.method2610((byte) -58, (Class213.aNode_Sub27_2512.aClass320_Sub20_7306.method3758(false) ^ 0xffffffff) == -2);
    		}
    		if (i <= 54) {
    			anIntArray10372 = null;
    		}
    		Class325.method3814(Class93.aGraphicsToolkit1241, 18521, Class377_Sub1.GAME_SCENE_HEIGHT >> 3, Node_Sub54.GAME_SCENE_WDITH >> 3);
    		Class120.method1228(-127);
    		Class152.aBoolean1942 = true;
    		Node_Sub52.aClass244Array7654 = null;
    		Class269.aBoolean3472 = false;
    		Class34_Sub1.method378(-4);
    	}
    	
    	public static void method2879(boolean bool) {
    		if (bool == false) {
    			anIntArray10372 = null;
    		}
    	}
    	
    	final void method2880(int i, int[] is, int i_3_) {
    		if (i_3_ <= -32) {
    			anInt10387++;
    			int i_4_ = anInt10384 * Node_Sub25_Sub1.anIntArray9941[i];
    			if (anInt10382 == 1) {
    				int i_5_ = aShortArray10386[0];
    				int i_6_ = aShortArray10374[0] << 12;
    				int i_7_ = i_4_ * i_6_ >> 12;
    				int i_8_ = anInt10384 * i_6_ >> 12;
    				int i_9_ = anInt10390 * i_6_ >> 12;
    				int i_10_ = i_7_ >> 12;
    				int i_11_ = i_10_ + 1;
    				i_7_ &= 0xfff;
    				if (i_8_ <= i_11_) {
    					i_11_ = 0;
    				}
    				int i_12_ = 0xff & aByteArray10371[0xff & i_10_];
    				int i_13_ = CacheNode_Sub17.anIntArray8840[i_7_];
    				int i_14_ = 0xff & aByteArray10371[0xff & i_11_];
    				if (aBoolean10377) {
    					for (int i_15_ = 0; i_15_ < Class339_Sub7.anInt8728; i_15_++) {
    						int i_16_ = anInt10390 * CacheNode_Sub3.anIntArray9442[i_15_];
    						int i_17_ = method2883(i_9_, i_12_, -28740, i_6_ * i_16_ >> 12, i_7_, i_13_, i_14_);
    						i_17_ = i_17_ * i_5_ >> 12;
    						is[i_15_] = 2048 - -(i_17_ >> 1);
    					}
    				} else {
    					for (int i_18_ = 0; (i_18_ ^ 0xffffffff) > (Class339_Sub7.anInt8728 ^ 0xffffffff); i_18_++) {
    						int i_19_ = CacheNode_Sub3.anIntArray9442[i_18_] * anInt10390;
    						int i_20_ = method2883(i_9_, i_12_, -28740, i_6_ * i_19_ >> 12, i_7_, i_13_, i_14_);
    						is[i_18_] = i_20_ * i_5_ >> 12;
    					}
    				}
    			} else {
    				int i_21_ = aShortArray10386[0];
    				if ((i_21_ ^ 0xffffffff) < -9 || (i_21_ ^ 0xffffffff) > 7) {
    					int i_22_ = aShortArray10374[0] << 12;
    					int i_23_ = i_22_ * anInt10390 >> 12;
    					int i_24_ = i_22_ * i_4_ >> 12;
    					int i_25_ = anInt10384 * i_22_ >> 12;
    					int i_26_ = i_24_ >> 12;
    					int i_27_ = i_26_ + 1;
    					if (i_25_ <= i_27_) {
    						i_27_ = 0;
    					}
    					i_24_ &= 0xfff;
    					int i_28_ = 0xff & aByteArray10371[i_26_ & 0xff];
    					int i_29_ = CacheNode_Sub17.anIntArray8840[i_24_];
    					int i_30_ = 0xff & aByteArray10371[0xff & i_27_];
    					for (int i_31_ = 0; Class339_Sub7.anInt8728 > i_31_; i_31_++) {
    						int i_32_ = anInt10390 * CacheNode_Sub3.anIntArray9442[i_31_];
    						int i_33_ = method2883(i_23_, i_28_, -28740, i_32_ * i_22_ >> 12, i_24_, i_29_, i_30_);
    						is[i_31_] = i_33_ * i_21_ >> 12;
    					}
    				}
    				for (int i_34_ = 1; i_34_ < anInt10382; i_34_++) {
    					i_21_ = aShortArray10386[i_34_];
    					if ((i_21_ ^ 0xffffffff) < -9 || (i_21_ ^ 0xffffffff) > 7) {
    						int i_35_ = aShortArray10374[i_34_] << 12;
    						int i_36_ = i_35_ * anInt10390 >> 12;
    						int i_37_ = i_35_ * anInt10384 >> 12;
    						int i_38_ = i_35_ * i_4_ >> 12;
    						int i_39_ = i_38_ >> 12;
    						int i_40_ = i_39_ - -1;
    						i_38_ &= 0xfff;
    						if ((i_37_ ^ 0xffffffff) >= (i_40_ ^ 0xffffffff)) {
    							i_40_ = 0;
    						}
    						int i_41_ = 0xff & aByteArray10371[0xff & i_40_];
    						int i_42_ = CacheNode_Sub17.anIntArray8840[i_38_];
    						int i_43_ = 0xff & aByteArray10371[0xff & i_39_];
    						if (!aBoolean10377 || -1 + anInt10382 != i_34_) {
    							for (int i_44_ = 0; (i_44_ ^ 0xffffffff) > (Class339_Sub7.anInt8728 ^ 0xffffffff); i_44_++) {
    								int i_45_ = CacheNode_Sub3.anIntArray9442[i_44_] * anInt10390;
    								int i_46_ = method2883(i_36_, i_43_, -28740, i_35_ * i_45_ >> 12, i_38_, i_42_, i_41_);
    								is[i_44_] += i_46_ * i_21_ >> 12;
    							}
    						} else {
    							for (int i_47_ = 0; (i_47_ ^ 0xffffffff) > (Class339_Sub7.anInt8728 ^ 0xffffffff); i_47_++) {
    								int i_48_ = CacheNode_Sub3.anIntArray9442[i_47_] * anInt10390;
    								int i_49_ = method2883(i_36_, i_43_, -28740, i_48_ * i_35_ >> 12, i_38_, i_42_, i_41_);
    								i_49_ = (i_49_ * i_21_ >> 12) + is[i_47_];
    								is[i_47_] = 2048 + (i_49_ >> 1);
    							}
    						}
    					}
    				}
    			}
    		}
    	}
    	
    	final int[] method2775(int i, int i_50_) {
    		anInt10380++;
    		int[] is = aClass146_7460.method1645(27356, i_50_);
    		if (i <= 107) {
    			aShortArray10374 = null;
    		}
    		if (aClass146_7460.aBoolean1819) {
    			method2880(i_50_, is, -88);
    		}
    		return is;
    	}
    	
    	final void method2785(int i) {
    		anInt10375++;
    		aByteArray10371 = Class169_Sub3.method1778(anInt10389, true);
    		method2884(i + -8);
    		int i_51_ = -1 + anInt10382;
    		if (i == 7) {
    			for (/**/; (i_51_ ^ 0xffffffff) <= -2; i_51_--) {
    				short s = aShortArray10386[i_51_];
    				if (s > 8) {
    					break;
    				}
    				if ((s ^ 0xffffffff) > 7) {
    					break;
    				}
    				anInt10382--;
    			}
    		}
    	}
    	
    	static final void method2881(int i, byte b, int i_52_, int i_53_, int i_54_) {
    		anInt10385++;
    		int i_55_ = Node_Sub53.anInt7669;
    	while_229_:
    		do {
    			do {
    				if ((i_55_ ^ 0xffffffff) != -1) {
    					if (i_55_ != 1) {
    						if ((i_55_ ^ 0xffffffff) == -3) {
    							break;
    						}
    						break while_229_;
    					}
    				} else {
    					return;
    				}
    				Class320_Sub28.anInt8469 = i_52_;
    				Node_Sub53.anInt7669 = 2;
    				Node_Sub33.anInt7405 = i_54_;
    				Class168.anInt2046 = i;
    				Class308.anInt3914 = i_53_;
    				return;
    			} while (false);
    			if (Class168.anInt2046 > i) {
    				Class168.anInt2046 = i;
    			}
    			if (Node_Sub33.anInt7405 > i_54_) {
    				Node_Sub33.anInt7405 = i_54_;
    			}
    			if (Class320_Sub28.anInt8469 < i_52_) {
    				Class320_Sub28.anInt8469 = i_52_;
    			}
    			if ((Class308.anInt3914 ^ 0xffffffff) > (i_53_ ^ 0xffffffff)) {
    				Class308.anInt3914 = i_53_;
    			}
    			return;
    		} while (false);
    		if (b != 112) {
    			method2878(-57, null, false, 91);
    		}
    	}
    	
    	static final TemporaryItemDefinition method2882(Buffer buffer, ItemDefinitions itemdefinition, int i) {
    		anInt10373++;
    		TemporaryItemDefinition class38 = new TemporaryItemDefinition(itemdefinition); // <--- Error is flagged here
    		int i_56_ = buffer.readUnsignedByte();
    		boolean bool = (i_56_ & 0x1) != 0;
    		boolean bool_57_ = (i_56_ & 0x2 ^ 0xffffffff) != -1;
    		boolean bool_58_ = (i_56_ & 0x4 ^ 0xffffffff) != -1;
    		boolean bool_59_ = (0x8 & i_56_) != i;
    		if (bool) {
    			class38.maleWornModelIds[0] = buffer.method2183();
    			class38.femaleWornModelIds[0] = buffer.method2183();
    			if (itemdefinition.maleEquip2 != -1 || itemdefinition.femaleEquip2 != -1) {
    				class38.maleWornModelIds[1] = buffer.method2183();
    				class38.femaleWornModelIds[1] = buffer.method2183();
    			}
    			if ((itemdefinition.maleEquipModelId3 ^ 0xffffffff) != 0 || itemdefinition.femaleEquipModelId3 != -1) {
    				class38.maleWornModelIds[2] = buffer.method2183();
    				class38.femaleWornModelIds[2] = buffer.method2183();
    			}
    		}
    		if (bool_57_) {
    			class38.anIntArray564[0] = buffer.method2183();
    			class38.anIntArray568[0] = buffer.method2183();
    			if (itemdefinition.maleDialogueHat != -1 || itemdefinition.femaleDialogueHat != -1) {
    				class38.anIntArray564[1] = buffer.method2183();
    				class38.anIntArray568[1] = buffer.method2183();
    			}
    		}
    		if (bool_58_) {
    			int i_60_ = buffer.readUnsignedShort();
    			int[] is = new int[4];
    			is[0] = Node_Sub30.method2723(i_60_, 15);
    			is[3] = Node_Sub30.method2723(15, i_60_ >> 12);
    			is[1] = Node_Sub30.method2723(15, i_60_ >> 4);
    			is[2] = Node_Sub30.method2723(i_60_, 3921) >> 8;
    			for (int i_61_ = 0; (i_61_ ^ 0xffffffff) > -5; i_61_++) {
    				if ((is[i_61_] ^ 0xffffffff) != -16) {
    					class38.modifiedModelColors[is[i_61_]] = (short) buffer.readUnsignedShort();
    				}
    			}
    		}
    		if (bool_59_) {
    			int i_62_ = buffer.readUnsignedByte();
    			int[] is = new int[2];
    			is[0] = Node_Sub30.method2723(i_62_, 15);
    			is[1] = Node_Sub30.method2723(i_62_ >> 4, 15);
    			for (int i_63_ = 0; (i_63_ ^ 0xffffffff) > -3; i_63_++) {
    				if ((is[i_63_] ^ 0xffffffff) != -16) {
    					class38.modifiedTextureColors[is[i_63_]] = (short) buffer.readUnsignedShort();
    				}
    			}
    		}
    		return class38;
    	}
    	
    	final void method2780(boolean bool, Buffer buffer, int i) {
    		anInt10381++;
    		if (bool != false) {
    			method2775(17, -97);
    		}
    		int i_64_ = i;
    	while_234_:
    		do {
    		while_233_:
    			do {
    			while_232_:
    				do {
    				while_231_:
    					do {
    					while_230_:
    						do {
    							do {
    								if ((i_64_ ^ 0xffffffff) != -1) {
    									if ((i_64_ ^ 0xffffffff) != -2) {
    										if ((i_64_ ^ 0xffffffff) != -3) {
    											if ((i_64_ ^ 0xffffffff) != -4) {
    												if (i_64_ != 4) {
    													if ((i_64_ ^ 0xffffffff) != -6) {
    														if ((i_64_ ^ 0xffffffff) == -7) {
    															break while_233_;
    														}
    														break while_234_;
    													}
    												} else {
    													break while_231_;
    												}
    												break while_232_;
    											}
    										} else {
    											break;
    										}
    										break while_230_;
    									}
    								} else {
    									aBoolean10377 = (buffer.readUnsignedByte() ^ 0xffffffff) == -2;
    									return;
    								}
    								anInt10382 = buffer.readUnsignedByte();
    								return;
    							} while (false);
    							anInt10378 = buffer.readShort();
    							if (anInt10378 < 0) {
    								aShortArray10386 = new short[anInt10382];
    								for (i_64_ = 0; i_64_ < anInt10382; i_64_++)
    									aShortArray10386[i_64_] = (short) buffer.readShort();
    							}
    							break while_234_;
    						} while (false);
    						anInt10390 = anInt10384 = buffer.readUnsignedByte();
    						return;
    					} while (false);
    					anInt10389 = buffer.readUnsignedByte();
    					return;
    				} while (false);
    				anInt10390 = buffer.readUnsignedByte();
    				return;
    			} while (false);
    			anInt10384 = buffer.readUnsignedByte();
    		} while (false);
    	}
    	
    	private final int method2883(int i, int i_65_, int i_66_, int i_67_, int i_68_, int i_69_, int i_70_) {
    		anInt10383++;
    		int i_71_ = i_67_ >> 12;
    		int i_72_ = 1 + i_71_;
    		i_67_ &= 0xfff;
    		if ((i ^ 0xffffffff) >= (i_72_ ^ 0xffffffff)) {
    			i_72_ = 0;
    		}
    		i_71_ &= 0xff;
    		int i_73_ = i_67_ + -4096;
    		i_72_ &= 0xff;
    		int i_74_ = i_68_ - 4096;
    		int i_75_ = CacheNode_Sub17.anIntArray8840[i_67_];
    		if (i_66_ != -28740) {
    			method2880(-110, null, -123);
    		}
    		int i_76_ = 0x3 & aByteArray10371[i_65_ + i_71_];
    		int i_77_;
    		if ((i_76_ ^ 0xffffffff) >= -2) {
    			i_77_ = i_76_ == 0 ? i_67_ + i_68_ : -i_67_ + i_68_;
    		} else {
    			i_77_ = (i_76_ ^ 0xffffffff) == -3 ? i_67_ - i_68_ : -i_68_ + -i_67_;
    		}
    		i_76_ = 0x3 & aByteArray10371[i_72_ - -i_65_];
    		int i_78_;
    		if (i_76_ > 1) {
    			i_78_ = (i_76_ ^ 0xffffffff) != -3 ? -i_68_ + -i_73_ : -i_68_ + i_73_;
    		} else {
    			i_78_ = i_76_ != 0 ? -i_73_ + i_68_ : i_68_ + i_73_;
    		}
    		i_76_ = 0x3 & aByteArray10371[i_71_ - -i_70_];
    		int i_79_ = ((i_78_ - i_77_) * i_75_ >> 12) + i_77_;
    		if (i_76_ <= 1) {
    			i_77_ = i_76_ != 0 ? i_74_ + -i_67_ : i_74_ + i_67_;
    		} else {
    			i_77_ = (i_76_ ^ 0xffffffff) != -3 ? -i_67_ + -i_74_ : -i_74_ + i_67_;
    		}
    		i_76_ = aByteArray10371[i_70_ + i_72_] & 0x3;
    		if ((i_76_ ^ 0xffffffff) < -2) {
    			i_78_ = (i_76_ ^ 0xffffffff) == -3 ? -i_74_ + i_73_ : -i_73_ + -i_74_;
    		} else {
    			i_78_ = (i_76_ ^ 0xffffffff) != -1 ? -i_73_ + i_74_ : i_74_ + i_73_;
    		}
    		int i_80_ = i_77_ - -(i_75_ * (i_78_ - i_77_) >> 12);
    		return (i_69_ * (i_80_ - i_79_) >> 12) + i_79_;
    	}
    	
    	public Node_Sub38_Sub27() {
    		super(0, true);
    		anInt10378 = 1638;
    		anInt10390 = 4;
    		anInt10389 = 0;
    	}
    	
    	private final void method2884(int i) {
    		if (i > (anInt10378 ^ 0xffffffff)) {
    			aShortArray10374 = new short[anInt10382];
    			aShortArray10386 = new short[anInt10382];
    			for (int i_81_ = 0; i_81_ < anInt10382; i_81_++) {
    				aShortArray10386[i_81_] = (short) (int) (4096.0 * Math.pow((double) ((float) anInt10378 / 4096.0F), (double) i_81_));
    				aShortArray10374[i_81_] = (short) (int) Math.pow(2.0, (double) i_81_);
    			}
    		} else if (aShortArray10386 != null && anInt10382 == aShortArray10386.length) {
    			aShortArray10374 = new short[anInt10382];
    			for (int i_82_ = 0; i_82_ < anInt10382; i_82_++)
    				aShortArray10374[i_82_] = (short) (int) Math.pow(2.0, (double) i_82_);
    		}
    		anInt10376++;
    	}
    }
    Player.java (Decode player appearance @ Line 424)
    Code:
    /* Player - Decompiled by JODE
     * 
     */
    
    public class Player extends Actor {
    	static int[][] anIntArrayArray11128;
    	protected int skullId = -1;
    	protected int prayIconId;
    	protected boolean isHidden;
    	protected String displayName;
    	static int anInt11133;
    	protected int anInt11134;
    	protected boolean aBoolean11135;
    	static int anInt11136;
    	protected PlayerDefinition aPlayerDefinition11137;
    	static int anInt11138;
    	protected int anInt11139;
    	static Node_Sub4 aNode_Sub4_11140 = null;
    	protected int combatLevelWithSummoning;
    	protected String aString11142;
    	static int anInt11143;
    	static int anInt11144;
    	private byte aByte11145;
    	static int anInt11146;
    	protected int anInt11147;
    	static int anInt11148;
    	protected boolean hasDisplayName;
    	private byte genderId = 0;
    	private int renderEmoteId;
    	protected int combatLevel;
    	protected int anInt11153;
    	private byte titleId;
    	private String titleString;
    	static Node_Sub4 aNode_Sub4_11155;
    	protected boolean aBoolean11156;
    	protected boolean aBoolean11157;
    	static int anInt11158;
    	static int anInt11159;
    	protected int anInt11160;
    	static int anInt11161;
    	static int anInt11162;
    	static int anInt11163;
    	protected int anInt11164;
    	static int anInt11165;
    	static int anInt11166;
    	protected int anInt11167;
    	static int anInt11168;
    	protected boolean aBoolean11169;
    	static int anInt11170;
    	static int anInt11171;
    	protected int anInt11172;
    	protected int anInt11173;
    	static int anInt11174;
    	static int anInt11175;
    	static int anInt11176;
    	static int anInt11177;
    	static int anInt11178;
    	static int anInt11179;
    	protected int anInt11180;
    	static int anInt11181;
    	protected int anInt11182;
    	static int anInt11183;
    	protected int anInt11184;
    
    	final void method820(GraphicsToolkit graphicstoolkit, int i) {
    		anInt11158++;
    		if (aPlayerDefinition11137 != null && (aBoolean10906 || method890(0, -119, graphicstoolkit))) {
    			Class336 class336 = graphicstoolkit.A();
    			class336.method3860(aClass99_10893.method1086(i ^ ~0x3ffb));
    			class336.method3863(y, i + anInt5937, x);
    			this.method870(graphicstoolkit, (byte) 45, aBoolean10906, aDrawableModelArray10909, class336);
    			for (int i_0_ = 0; (i_0_ ^ 0xffffffff) > (aDrawableModelArray10909.length ^ 0xffffffff); i_0_++)
    				aDrawableModelArray10909[i_0_] = null;
    		}
    	}
    
    	final void method882(int i, int i_1_, String string, byte b) {
    		this.method864(Node_Sub15_Sub10.method2578((byte) 124) * CacheNode_Sub4.aClass1_9466.anInt118, string, false, i_1_, i);
    		anInt11183++;
    	}
    
    	private final void method883(byte b, int i, int i_3_, int i_4_, DrawableModel drawablemodel, Class336 class336, GraphicsToolkit graphicstoolkit, int i_5_) {
    		anInt11159++;
    		if (b != -74) {
    			method820(null, 41);
    		}
    		int i_6_ = i_5_ * i_5_ + i * i;
    		if ((i_6_ ^ 0xffffffff) <= -262145 && (i_6_ ^ 0xffffffff) >= (i_3_ ^ 0xffffffff)) {
    			int i_7_ = (int) (2607.5945876176133 * Math.atan2((double) i, (double) i_5_) - (double) aClass99_10893.method1086(16383)) & 0x3fff;
    			DrawableModel drawablemodel_8_ = Node_Sub53.method2978(anInt10872, anInt10862, 76, i_4_, anInt10832, i_7_, graphicstoolkit);
    			if (drawablemodel_8_ != null) {
    				graphicstoolkit.C(false);
    				drawablemodel_8_.method611(class336, null, 0);
    				graphicstoolkit.C(true);
    			}
    		}
    	}
    
    	public static void method884(int i) {
    		anIntArrayArray11128 = null;
    		if (i != 16053) {
    			method892(-8, -121);
    		}
    		aNode_Sub4_11155 = null;
    		aNode_Sub4_11140 = null;
    	}
    
    	final Class171 method809(GraphicsToolkit graphicstoolkit, int i) {
    		anInt11163++;
    		if (i > -93) {
    			method893(true, true);
    		}
    		return null;
    	}
    
    	final boolean method810(int i, int i_9_, boolean bool, GraphicsToolkit graphicstoolkit) {
    		anInt11170++;
    		if (aPlayerDefinition11137 == null || !method890(131072, -113, graphicstoolkit)) {
    			return false;
    		}
    		Class336 class336 = graphicstoolkit.A();
    		int i_10_ = aClass99_10893.method1086(16383);
    		class336.method3860(i_10_);
    		class336.method3863(y, anInt5937, x);
    		boolean bool_11_ = bool;
    		for (int i_12_ = 0; (i_12_ ^ 0xffffffff) > (aDrawableModelArray10909.length ^ 0xffffffff); i_12_++) {
    			if (aDrawableModelArray10909[i_12_] != null && (!Node_Sub15_Sub10.aBoolean9850 ? aDrawableModelArray10909[i_12_].method624(i_9_, i, class336, true, 0) : aDrawableModelArray10909[i_12_].method621(i_9_, i, class336, true, 0, Class308.anInt3912))) {
    				bool_11_ = true;
    				break;
    			}
    		}
    		for (int i_13_ = 0; i_13_ < aDrawableModelArray10909.length; i_13_++)
    			aDrawableModelArray10909[i_13_] = null;
    		return bool_11_;
    	}
    
    	final boolean method821(int i) {
    		anInt11177++;
    		if (i != 0) {
    			method883((byte) 124, 20, -110, 30, null, null, null, 15);
    		}
    		return false;
    	}
    
    	final int method855(byte b) {
    		anInt11161++;
    		if (b > -48) {
    			method869(-126);
    		}
    		return -1;
    	}
    
    	final void method816(int i, boolean bool, GraphicsToolkit graphicstoolkit, int i_14_, byte b, int i_15_, Animable animable) {
    		if (b >= 101) {
    			anInt11133++;
    			throw new IllegalStateException();
    		}
    	}
    
    	final int method871(int i) {
    		anInt11162++;
    		if (i != 0) {
    			combatLevel = -112;
    		}
    		return renderEmoteId;
    	}
    
    	private final void method885(DrawableModel drawablemodel, int i, byte b, GraphicsToolkit graphicstoolkit, int i_16_, int i_17_, Class336 class336, int i_18_, int i_19_) {
    		anInt11174++;
    		int i_20_ = i_17_ * i_17_ - -(i_19_ * i_19_);
    		if ((i_20_ ^ 0xffffffff) <= -262145 && (i_20_ ^ 0xffffffff) >= (i ^ 0xffffffff)) {
    			if (b > -15) {
    				anInt11172 = -60;
    			}
    			int i_21_ = (int) (Math.atan2((double) i_17_, (double) i_19_) * 2607.5945876176133 - (double) aClass99_10893.method1086(16383)) & 0x3fff;
    			DrawableModel drawablemodel_22_ = Node_Sub53.method2978(anInt10872, anInt10862, 104, i_16_, anInt10832, i_21_, graphicstoolkit);
    			if (drawablemodel_22_ != null) {
    				graphicstoolkit.C(false);
    				drawablemodel_22_.method622(class336, null, i_18_, 0);
    				graphicstoolkit.C(true);
    			}
    		}
    	}
    
    	final boolean method886(byte b) {
    		anInt11165++;
    		if (aPlayerDefinition11137 == null) {
    			return false;
    		}
    		return true;
    	}
    
    	final void method887(int i, int i_23_, int i_24_, byte b) {
    		if (anInt10904 < scenePositionXQueue.length - 1) {
    			anInt10904++;
    		}
    		anInt11138++;
    		for (int i_25_ = anInt10904; i_25_ > 0; i_25_--) {
    			scenePositionXQueue[i_25_] = scenePositionXQueue[-1 + i_25_];
    			scenePositionYQueue[i_25_] = scenePositionYQueue[-1 + i_25_];
    			movementTypeQueue[i_25_] = movementTypeQueue[i_25_ - 1];
    		}
    		scenePositionXQueue[0] = i_24_;
    		movementTypeQueue[0] = b;
    		if (i != -24527) {
    			method855((byte) -13);
    		}
    		scenePositionYQueue[0] = i_23_;
    	}
    
    	final int getSize(byte b) {
    		if (aPlayerDefinition11137 != null && (aPlayerDefinition11137.toNPCId ^ 0xffffffff) != 0) {
    			return Class366.aClass279_4526.getNPCDefinitions(aPlayerDefinition11137.toNPCId, (byte) 107).anInt2811;
    		}
    		return super.getSize((byte) 76);
    	}
    
    	final void method888(int i, int i_26_, int i_27_) {
    		anInt10904 = 0;
    		scenePositionXQueue[0] = i;
    		anInt11176++;
    		anInt10901 = 0;
    		anInt10900 = 0;
    		scenePositionYQueue[0] = i_27_;
    		int i_28_ = getSize((byte) 84);
    		if (i_26_ < -69) {
    			y = i_28_ * 256 + 512 * scenePositionXQueue[0];
    			x = 512 * scenePositionYQueue[0] - -(i_28_ * 256);
    			if (Class295.myPlayer == this) {
    				Class120.method1228(-125);
    			}
    			if (anEntityNode_Sub4_10902 != null) {
    				anEntityNode_Sub4_10902.method965();
    			}
    		}
    	}
    
    	final void method811(int i) {
    		if (i != 27811) {
    			aBoolean11156 = true;
    		}
    		anInt11168++;
    		throw new IllegalStateException();
    	}
    
    	final EntityNode_Sub6 method807(int i, GraphicsToolkit graphicstoolkit) {
    		anInt11171++;
    		if (aPlayerDefinition11137 == null || !method890(2048, -112, graphicstoolkit)) {
    			return null;
    		}
    		Class336 class336 = graphicstoolkit.A();
    		int i_29_ = aClass99_10893.method1086(16383);
    		class336.method3860(i_29_);
    		Class261 class261 = Class175.aClass261ArrayArrayArray2099[plane][y >> Class36.anInt549][x >> Class36.anInt549];
    		if (class261 != null && class261.anAnimable_Sub1_3317 != null) {
    			int i_31_ = anInt10849 + -class261.anAnimable_Sub1_3317.aShort9102;
    			anInt10849 -= (float) i_31_ / 10.0F;
    		} else {
    			anInt10849 -= (float) anInt10849 / 10.0F;
    		}
    		class336.method3863(y, -anInt10849 + anInt5937 + -20, x);
    		aBoolean10903 = false;
    		EntityNode_Sub6 entitynode_sub6 = null;
    		if ((Class213.aNode_Sub27_2512.aClass320_Sub7_7308.method3708(false) ^ 0xffffffff) == -2) {
    			Class259 class259 = this.method868((byte) -126);
    			if (class259.aBoolean3267 && (aPlayerDefinition11137.toNPCId == -1 || Class366.aClass279_4526.getNPCDefinitions(aPlayerDefinition11137.toNPCId, (byte) 107).aBoolean2875)) {
    				Animator animator = !anAnimator10876.method245(-125) || !anAnimator10876.method242((byte) -77) ? null : anAnimator10876;
    				Animator animator_32_ = anAnimator10860.method245(-128) && (!aBoolean10867 || animator == null) ? anAnimator10860 : null;
    				DrawableModel drawablemodel = CacheNode_Sub14_Sub2.method2356(240, aDrawableModelArray10909[0], anInt10862, 0, anInt10832, 1, true, graphicstoolkit, 160, animator_32_ != null ? animator_32_ : animator, anInt10872, i_29_, 0);
    				if (drawablemodel != null) {
    					entitynode_sub6 = Class345.method3972(true, (byte) 72, aDrawableModelArray10909.length + 1);
    					aBoolean10903 = true;
    					graphicstoolkit.C(false);
    					if (Node_Sub15_Sub10.aBoolean9850) {
    						drawablemodel.method622(class336, entitynode_sub6.anEntityNode_Sub5Array5995[aDrawableModelArray10909.length], Class308.anInt3912, 0);
    					} else {
    						drawablemodel.method611(class336, entitynode_sub6.anEntityNode_Sub5Array5995[aDrawableModelArray10909.length], 0);
    					}
    					graphicstoolkit.C(true);
    				}
    			}
    		}
    		if (Class295.myPlayer == this) {
    			for (int i_33_ = Class320_Sub24.cachedHintIcons.length + -1; (i_33_ ^ 0xffffffff) <= -1; i_33_--) {
    				Class223 class223 = Class320_Sub24.cachedHintIcons[i_33_];
    				if (class223 != null && (class223.anInt2666 ^ 0xffffffff) != 0) {
    					if (class223.anInt2654 == 1) {
    						Node_Sub41 node_sub41 = (Node_Sub41) Class12.aHashTable187.method1518(3512, (long) class223.anInt2658);
    						if (node_sub41 != null) {
    							Npc npc = node_sub41.aNpc7518;
    							int i_34_ = -Class295.myPlayer.y + npc.y;
    							int i_35_ = npc.x - Class295.myPlayer.x;
    							if (Node_Sub15_Sub10.aBoolean9850) {
    								method885(aDrawableModelArray10909[0], 92160000, (byte) -57, graphicstoolkit, class223.anInt2666, i_34_, class336, Class308.anInt3912, i_35_);
    							} else {
    								method883((byte) -74, i_34_, 92160000, class223.anInt2666, aDrawableModelArray10909[0], class336, graphicstoolkit, i_35_);
    							}
    						}
    					}
    					if (class223.anInt2654 == 2) {
    						int i_36_ = -Class295.myPlayer.y + class223.anInt2662;
    						int i_37_ = -Class295.myPlayer.x + class223.anInt2653;
    						int i_38_ = class223.anInt2655 << 9;
    						i_38_ *= i_38_;
    						if (!Node_Sub15_Sub10.aBoolean9850) {
    							method883((byte) -74, i_36_, i_38_, class223.anInt2666, aDrawableModelArray10909[0], class336, graphicstoolkit, i_37_);
    						} else {
    							method885(aDrawableModelArray10909[0], i_38_, (byte) -36, graphicstoolkit, class223.anInt2666, i_36_, class336, Class308.anInt3912, i_37_);
    						}
    					}
    					if (class223.anInt2654 == 10 && class223.anInt2658 >= 0 && class223.anInt2658 < Class270_Sub2.LOCAL_PLAYERS.length) {
    						Player player_39_ = Class270_Sub2.LOCAL_PLAYERS[class223.anInt2658];
    						if (player_39_ != null) {
    							int i_40_ = player_39_.y - Class295.myPlayer.y;
    							int i_41_ = -Class295.myPlayer.x + player_39_.x;
    							if (Node_Sub15_Sub10.aBoolean9850) {
    								method885(aDrawableModelArray10909[0], 92160000, (byte) -23, graphicstoolkit, class223.anInt2666, i_40_, class336, Class308.anInt3912, i_41_);
    							} else {
    								method883((byte) -74, i_40_, 92160000, class223.anInt2666, aDrawableModelArray10909[0], class336, graphicstoolkit, i_41_);
    							}
    						}
    					}
    				}
    			}
    			class336.method3860(i_29_);
    			class336.method3863(y, anInt5937, x);
    		}
    		class336.method3860(i_29_);
    		class336.method3863(y, -anInt10849 + anInt5937 - 5, x);
    		if (entitynode_sub6 == null) {
    			entitynode_sub6 = Class345.method3972(true, (byte) 103, aDrawableModelArray10909.length);
    		}
    		this.method870(graphicstoolkit, (byte) 45, false, aDrawableModelArray10909, class336);
    		if (Node_Sub15_Sub10.aBoolean9850) {
    			for (int i_42_ = 0; i_42_ < aDrawableModelArray10909.length; i_42_++) {
    				if (aDrawableModelArray10909[i_42_] != null) {
    					aDrawableModelArray10909[i_42_].method622(class336, entitynode_sub6.anEntityNode_Sub5Array5995[i_42_], Class308.anInt3912, this == Class295.myPlayer ? 1 : 0);
    				}
    			}
    		} else {
    			for (int i_43_ = 0; i_43_ < aDrawableModelArray10909.length; i_43_++) {
    				if (aDrawableModelArray10909[i_43_] != null) {
    					aDrawableModelArray10909[i_43_].method611(class336, entitynode_sub6.anEntityNode_Sub5Array5995[i_43_], Class295.myPlayer == this ? 1 : 0);
    				}
    			}
    		}
    		if (anEntityNode_Sub4_10902 != null) {
    			Class198 class198 = anEntityNode_Sub4_10902.method954();
    			if (Node_Sub15_Sub10.aBoolean9850) {
    				graphicstoolkit.a(class198, Class308.anInt3912);
    			} else {
    				graphicstoolkit.a(class198);
    			}
    		}
    		for (int i_44_ = 0; (i_44_ ^ 0xffffffff) > (aDrawableModelArray10909.length ^ 0xffffffff); i_44_++) {
    			if (aDrawableModelArray10909[i_44_] != null) {
    				aBoolean10903 |= aDrawableModelArray10909[i_44_].F();
    			}
    			aDrawableModelArray10909[i_44_] = null;
    		}
    		anInt10815 = Class110.anInt1412;
    		return entitynode_sub6;
    	}
    
    	final void decodeAppearence(Buffer stream, int i) {
    		stream.offset = 0;
    		anInt11181++;
    		int hash = stream.readUnsignedByte();
    		genderId = (byte) (0x1 & hash);
    		boolean bool = hasDisplayName;
    		hasDisplayName = (0x2 & hash) != 0;
    		boolean bool_46_ = (hash & 0x4) != 0;
    		int i_47_ = super.getSize((byte) 85);
    		this.method861(-1000, 1 + (0x7 & hash >> 3));
    		aByte11145 = (byte) ((0xf2 & hash) >> 6);
    		y += -i_47_ + getSize((byte) 44) << 8;
    		x += -i_47_ + getSize((byte) 111) << 8;
    		titleId = stream.readByte();
    		titleString = stream.readString();
    		skullId = stream.readByte();
    		prayIconId = stream.readByte();
    		isHidden = (stream.readByte() ^ 0xffffffff) == -2;
    		if (Class240.aClass329_2943 == Node_Sub38_Sub1.aClass329_10086 && Class339_Sub7.rights >= 2) {
    			isHidden = false;
    		}
    		anInt11134 = 0;
    		int npcId = -1;
    		int[] equipIds = new int[Class63.aClass363_922.anIntArray4508.length]; // 15
    		TemporaryItemDefinition[] class38s = new TemporaryItemDefinition[Class63.aClass363_922.anIntArray4508.length];
    		ItemDefinitions[] itemdefinitions = new ItemDefinitions[Class63.aClass363_922.anIntArray4508.length];
    		for (int i_49_ = 0; Class63.aClass363_922.anIntArray4508.length > i_49_; i_49_++) {
    			if (Class63.aClass363_922.anIntArray4508[i_49_] != 1) {
    				int i_50_ = stream.readUnsignedByte();
    				if ((i_50_ ^ 0xffffffff) == -1) {
    					equipIds[i_49_] = 0;
    				} else {
    					int i_51_ = stream.readUnsignedByte();
    					int itemId = (i_50_ << 8) - -i_51_;
    					if (i_49_ == 0 && itemId == 65535) {
    						npcId = stream.readUnsignedShort();
    						anInt11134 = stream.readUnsignedByte();
    						break;
    					}
    					if (itemId >= 32768) {
    						itemId = Node_Sub28.anIntArray7329[-32768 + itemId];
    						equipIds[i_49_] = Node_Sub16.method2590(1073741824, itemId);
    						itemdefinitions[i_49_] = EntityNode_Sub3_Sub1.aClass86_9166.getItemDefinitionForId(itemId);
    						int i_53_ = itemdefinitions[i_49_].teamId;
    						if ((i_53_ ^ 0xffffffff) != -1) {
    							anInt11134 = i_53_;
    						}
    					} else {
    						equipIds[i_49_] = Node_Sub16.method2590(itemId + -256, -2147483648);
    					}
    				}
    			}
    		}
    		if (npcId == -1) {
    			int flagHash = stream.readUnsignedShort();
    			int i_55_ = 0;
    			for (int i_56_ = 0; (Class63.aClass363_922.anIntArray4508.length ^ 0xffffffff) < (i_56_ ^ 0xffffffff); i_56_++) {
    				if ((Class63.aClass363_922.anIntArray4508[i_56_] ^ 0xffffffff) == -1) {
    					if ((flagHash & 1 << i_55_ ^ 0xffffffff) != -1) {
    						class38s[i_56_] = Node_Sub38_Sub27.method2882(stream, itemdefinitions[i_56_], 0); // <--- Error is flagged here
    					}
    					i_55_++;
    				}
    			}
    		}
    		int[] colorIds = new int[10];
    		for (int i_58_ = i; (i_58_ ^ 0xffffffff) > -11; i_58_++) {
    			int i_59_ = stream.readUnsignedByte();
    			if ((i_58_ ^ 0xffffffff) <= (Class117_Sub2.aShortArrayArrayArray5151.length ^ 0xffffffff) || i_59_ < 0 || (Class117_Sub2.aShortArrayArrayArray5151[i_58_][0].length ^ 0xffffffff) >= (i_59_ ^ 0xffffffff)) {
    				i_59_ = 0;
    			}
    			colorIds[i_58_] = i_59_;
    		}
    		renderEmoteId = stream.readUnsignedShort();
    		displayName = stream.readString();
    		if (this == Class295.myPlayer) {
    			Node_Sub40.myPlayerDisplayName = displayName;
    		}
    		aString11142 = displayName;
    		combatLevel = stream.readUnsignedByte();
    		if (!bool_46_) {
    			anInt11139 = 0;
    			combatLevelWithSummoning = stream.readUnsignedByte();
    			anInt11184 = stream.readUnsignedByte();
    			if (anInt11184 == 255) {
    				anInt11184 = -1;
    			}
    		} else {
    			anInt11139 = stream.readUnsignedShort();
    			combatLevelWithSummoning = combatLevel;
    			if (anInt11139 == 65535) {
    				anInt11139 = -1;
    			}
    			anInt11184 = -1;
    		}
    		int i_60_ = anInt11164;
    		anInt11164 = stream.readUnsignedByte();
    		if (anInt11164 == 0) {
    			Class45.method462((byte) 69, this);
    		} else {
    			int i_61_ = anInt11167;
    			int i_62_ = anInt11172;
    			int i_63_ = anInt11153;
    			int i_64_ = anInt11182;
    			int i_65_ = anInt11173;
    			anInt11167 = stream.readUnsignedShort();
    			anInt11172 = stream.readUnsignedShort();
    			anInt11153 = stream.readUnsignedShort();
    			anInt11182 = stream.readUnsignedShort();
    			anInt11173 = stream.readUnsignedByte();
    			if (hasDisplayName == !bool || (anInt11164 ^ 0xffffffff) != (i_60_ ^ 0xffffffff) || i_61_ != anInt11167 || (i_62_ ^ 0xffffffff) != (anInt11172 ^ 0xffffffff) || anInt11153 != i_63_ || (anInt11182 ^ 0xffffffff) != (i_64_ ^ 0xffffffff) || i_65_ != anInt11173) {
    				Class135.method1587(113, this);
    			}
    		}
    		if (aPlayerDefinition11137 == null) {
    			aPlayerDefinition11137 = new PlayerDefinition();
    		}
    		int i_66_ = aPlayerDefinition11137.toNPCId;
    		int[] is_67_ = aPlayerDefinition11137.anIntArray3430;
    		aPlayerDefinition11137.method3278(colorIds, equipIds, class38s, npcId, method871(0), (genderId ^ 0xffffffff) == -2, (byte) -110);
    		if (npcId != i_66_) {
    			y = (scenePositionXQueue[0] << 9) - -(getSize((byte) 83) << 8);
    			x = (scenePositionYQueue[0] << 9) + (getSize((byte) 45) << 8);
    		}
    		if (Class166.myPlayerIndex == index && is_67_ != null) {
    			for (int i_68_ = 0; i_68_ < colorIds.length; i_68_++) {
    				if (colorIds[i_68_] != is_67_[i_68_]) {
    					EntityNode_Sub3_Sub1.aClass86_9166.method1008(50);
    					break;
    				}
    			}
    		}
    		if (anEntityNode_Sub4_10902 != null) {
    			anEntityNode_Sub4_10902.method965();
    		}
    		if (anAnimator10860.method245(-128) && aBoolean10867) {
    			Class259 class259 = this.method868((byte) -123);
    			if (!class259.method3130(anAnimator10860.method250((byte) -60), (byte) -127)) {
    				anAnimator10860.method249(true, -1);
    				aBoolean10867 = false;
    			}
    		}
    	}
    
    	private final boolean method890(int i, int i_69_, GraphicsToolkit graphicstoolkit) {
    		anInt11144++;
    		int i_70_ = i;
    		if (i_69_ >= -110) {
    			return true;
    		}
    		Class259 class259 = this.method868((byte) -128);
    		Animator animator = !anAnimator10876.method245(-125) || anAnimator10876.method242((byte) -77) ? null : anAnimator10876;
    		Animator animator_71_ = anAnimator10860.method245(-127) && !aBoolean11169 && (!aBoolean10867 || animator == null) ? anAnimator10860 : null;
    		int i_72_ = class259.anInt3261;
    		int i_73_ = class259.anInt3266;
    		if ((i_72_ ^ 0xffffffff) != -1 || i_73_ != 0 || class259.anInt3250 != 0 || (class259.anInt3285 ^ 0xffffffff) != -1) {
    			i |= 0x7;
    		}
    		int i_74_ = aClass99_10893.method1086(16383);
    		boolean bool = aByte10888 != 0 && (Class174.clientCycle ^ 0xffffffff) <= (anInt10895 ^ 0xffffffff) && Class174.clientCycle < anInt10882;
    		if (bool) {
    			i |= 0x80000;
    		}
    		DrawableModel drawablemodel = aDrawableModelArray10909[0] = aPlayerDefinition11137.method3279(EntityNode_Sub3_Sub1.aClass86_9166, animator, 77, true, InputStream_Sub2.aClass281_83, Class18.aClass37_306, i, anIntArray10881, Class63.aClass363_922, Class42.aClass181_643, graphicstoolkit, Class366.aClass279_4526, anAnimableAnimator_Sub1Array10894, i_74_, animator_71_, Class24.aClass275_442);
    		int i_75_ = Class290_Sub5.method3435(-85);
    		if ((Class201.anInt2446 ^ 0xffffffff) > -97 && i_75_ > 50) {
    			Class189.method1934((byte) 17);
    		}
    		if (Class240.aClass329_2943 != Node_Sub38_Sub1.aClass329_10086 && i_75_ < 50) {
    			int i_76_;
    			for (i_76_ = 50 - i_75_; (Class57.anInt849 ^ 0xffffffff) > (i_76_ ^ 0xffffffff); Class57.anInt849++)
    				Class93.aByteArrayArray1244[Class57.anInt849] = new byte[102400];
    			while (i_76_ < Class57.anInt849) {
    				Class57.anInt849--;
    				Class93.aByteArrayArray1244[Class57.anInt849] = null;
    			}
    		} else if (Class240.aClass329_2943 != Node_Sub38_Sub1.aClass329_10086) {
    			Class57.anInt849 = 0;
    			Class93.aByteArrayArray1244 = new byte[50][];
    		}
    		if (drawablemodel == null) {
    			return false;
    		}
    		anInt10875 = drawablemodel.fa();
    		anInt10844 = drawablemodel.ma();
    		this.method857(drawablemodel, false);
    		if ((i_72_ ^ 0xffffffff) == -1 && (i_73_ ^ 0xffffffff) == -1) {
    			this.method865(i_74_, 0, 0, getSize((byte) 59) << 9, getSize((byte) 126) << 9, -81);
    		} else {
    			this.method865(i_74_, class259.anInt3263, class259.anInt3291, i_72_, i_73_, -104);
    			if (anInt10872 != 0) {
    				drawablemodel.FA(anInt10872);
    			}
    			if (anInt10862 != 0) {
    				drawablemodel.VA(anInt10862);
    			}
    			if (anInt10832 != 0) {
    				drawablemodel.H(0, anInt10832, 0);
    			}
    		}
    		if (bool) {
    			drawablemodel.method626(aByte10896, aByte10878, aByte10884, 0xff & aByte10888);
    		}
    		if (!aBoolean11169) {
    			this.method848(i_70_, i_73_, graphicstoolkit, class259, i_74_, i_72_, -105);
    		}
    		return true;
    	}
    
    	final boolean method862(byte b) {
    		anInt11175++;
    		if (b != -93) {
    			anInt11172 = -110;
    		}
    		return CacheNode_Sub4.aClass1_9466.aBoolean111;
    	}
    
    	final String method891(boolean bool, int i) {
    		if (i != 1) {
    			return null;
    		}
    		anInt11179++;
    		if (!bool) {
    			return aString11142;
    		}
    		return displayName;
    	}
    
    	static final void method892(int i, int i_77_) {
    		anInt11166++;
    		CacheNode_Sub2 cachenode_sub2 = Class320_Sub19.method3754(3, 5, (long) i);
    		cachenode_sub2.method2291((byte) 121);
    	}
    
    	Player(int i) {
    		super(i);
    		isHidden = false;
    		titleId = (byte) 0;
    		anInt11134 = 0;
    		aBoolean11135 = false;
    		prayIconId = -1;
    		hasDisplayName = false;
    		combatLevelWithSummoning = 0;
    		anInt11139 = 0;
    		anInt11164 = 0;
    		aBoolean11156 = false;
    		anInt11167 = -1;
    		aBoolean11169 = false;
    		combatLevel = 0;
    		aBoolean11157 = false;
    		aByte11145 = (byte) 0;
    		anInt11172 = -1;
    		anInt11173 = 255;
    		anInt11153 = -1;
    		anInt11182 = -1;
    		anInt11180 = -1;
    		anInt11184 = -1;
    	}
    
    	public Player() {
    		isHidden = false;
    		titleId = (byte) 0;
    		anInt11134 = 0;
    		aBoolean11135 = false;
    		prayIconId = -1;
    		hasDisplayName = false;
    		combatLevelWithSummoning = 0;
    		anInt11139 = 0;
    		anInt11164 = 0;
    		aBoolean11156 = false;
    		anInt11167 = -1;
    		aBoolean11169 = false;
    		combatLevel = 0;
    		aBoolean11157 = false;
    		aByte11145 = (byte) 0;
    		anInt11172 = -1;
    		anInt11173 = 255;
    		anInt11153 = -1;
    		anInt11182 = -1;
    		anInt11180 = -1;
    		anInt11184 = -1;
    	}
    
    	public String title() {
    		anInt11136++;
    		String title = "";
    		int[] is;
    		if ((genderId ^ 0xffffffff) == -2 && Class83.anIntArray5188 != null) {
    			is = Class83.anIntArray5188;
    		} else {
    			is = InputStream_Sub1.anIntArray77;
    			if (is == null) {
    				is = new int[] { (4 * 256 + 69) };
    			}
    		}
    		if (is != null && (is[aByte11145] ^ 0xffffffff) != 0) {
    			Class39 class39 = Class328.aClass362_4112.method4051(is[aByte11145], -752);
    			if (class39.aChar587 == 's') {
    				title += class39.method412(-3470, titleId & 0xff);
    			}
    		}
    		if (title.length() != 0) {
    			return title;
    		}
    		return "";
    	}
    
    	/**
    	 * The chatbox display name changing
    	 * 
    	 *  @Param bool
    	 *  @Param bool_79_
    	 *  @Return
    	 */
    	final String method893(boolean bool, boolean bool_79_) {
    		anInt11136++;
    		String string = "";
    		if (CacheNode_Sub19.aStringArray9622 != null) {
    			string += CacheNode_Sub19.aStringArray9622[aByte11145];
    		}
    		if (bool != false) {
    			method821(106);
    		}
    		int[] is;
    		if ((genderId ^ 0xffffffff) == -2 && Class83.anIntArray5188 != null) {
    			is = Class83.anIntArray5188;
    		} else {
    			is = InputStream_Sub1.anIntArray77;
    			if (is == null) {
    				is = new int[] { (4 * 256 + 69) };
    			}
    		}
    
    		if (is != null && (is[aByte11145] ^ 0xffffffff) != 0) {
    			Class39 class39 = Class328.aClass362_4112.method4051(is[aByte11145], -752);
    			if (class39.aChar587 == 's') {
    				string += class39.method412(-3470, titleId & 0xff);
    				// string = (new
    				// StringBuilder(String.valueOf(string))).append(titleString).toString();
    			} else {
    				ClanChat.method507(new Throwable(), "gdn1", -125);
    				is[aByte11145] = -1;
    			}
    		}
    		if (!bool_79_) {
    			string += aString11142;
    		} else {
    			string += "<col=" + getRankColour() + ">";
    			string += displayName;
    			string += "</col>";
    		}
    		if (Class320_Sub15.aStringArray8354 != null) {
    			string += Class320_Sub15.aStringArray8354[aByte11145];
    		}
    		return string;
    	}
    
    	/**
    	 * The right click display name changing
    	 * 
    	 *  @Param bool
    	 *  @Param bool_79_
    	 *  @Return
    	 */
    	final String fixedName(boolean bool, boolean bool_79_) {
    		anInt11136++;
    		String string = "";
    		if (CacheNode_Sub19.aStringArray9622 != null) {
    			string += CacheNode_Sub19.aStringArray9622[aByte11145];
    		}
    		if (bool != false) {
    			method821(106);
    		}
    		int[] is;
    		if ((genderId ^ 0xffffffff) == -2 && Class83.anIntArray5188 != null) {
    			is = Class83.anIntArray5188;
    		} else {
    			is = InputStream_Sub1.anIntArray77;
    			if (is == null) {
    				is = new int[] { (4 * 256 + 69) };
    			}
    		}
    
    		if (is != null && (is[aByte11145] ^ 0xffffffff) != 0) {
    			Class39 class39 = Class328.aClass362_4112.method4051(is[aByte11145], -752);
    			if (class39.aChar587 == 's') {
    				string += class39.method412(-3470, titleId & 0xff) + "<col=ffffff>";
    				// string = (new
    				// StringBuilder(String.valueOf(string))).append(titleString).toString();
    			} else {
    				ClanChat.method507(new Throwable(), "gdn1", -125);
    				is[aByte11145] = -1;
    			}
    		}
    		if (!bool_79_) {
    			string += aString11142;
    		} else {
    			string += "<col=" + getRankColour() + ">";
    			string += displayName;
    			string += "</col>";
    		}
    		if (Class320_Sub15.aStringArray8354 != null) {
    			string += Class320_Sub15.aStringArray8354[aByte11145];
    		}
    		return string;
    	}
    
    	private String getRankColour() {
    		if (titleString == null)
    			return "";
    		else {
    			switch (titleString) {
    			case "Easy":
    				return "2AF214";
    			case "Normal":
    				return "087F88";
    			case "Hard":
    				return "FF930D";
    			case "Legend":
    				return "B00A0A";
    			case "Elite":
    				return "FF0000";
    			default:
    				return "";
    			}
    		}
    	}
    
    	final Class59 method869(int i) {
    		if (i != -3109) {
    			aBoolean11157 = false;
    		}
    		anInt11148++;
    		if (aClass59_10861 != null) {
    			if (aClass59_10861.aString877 == null) {
    				return null;
    			}
    			if ((Class69.anInt943 ^ 0xffffffff) == -1 || (Class69.anInt943 ^ 0xffffffff) == -4 || Class69.anInt943 == 1 && Class193.method1955(i + 3109, aString11142)) {
    				return aClass59_10861;
    			}
    		}
    		return null;
    	}
    
    	final void method894(int i, int i_80_, int i_81_, byte b) {
    		if (anAnimator10876.method245(-126) && (anAnimator10876.method243((byte) -24).anInt718 ^ 0xffffffff) == -2) {
    			anIntArray10817 = null;
    			anAnimator10876.method249(true, -1);
    		}
    		anInt11143++;
    		for (int i_82_ = 0; (i_82_ ^ 0xffffffff) > (aClass165Array10886.length ^ 0xffffffff); i_82_++) {
    			if ((aClass165Array10886[i_82_].graphicsId ^ 0xffffffff) != 0) {
    				Class195 class195 = Class16.aClass101_228.method1090(i_81_ ^ ~0x24c3, aClass165Array10886[i_82_].graphicsId);
    				if (class195.aBoolean2402 && (class195.anInt2394 ^ 0xffffffff) != 0 && Class18.aClass37_306.method395(class195.anInt2394, (byte) -107).anInt718 == 1) {
    					aClass165Array10886[i_82_].anAnimator2026.method249(true, -1);
    					aClass165Array10886[i_82_].graphicsId = -1;
    				}
    			}
    		}
    		if (i_81_ != -9380) {
    			getSize((byte) -74);
    		}
    		anInt11180 = -1;
    		if (i_80_ >= 0 && (Node_Sub54.GAME_SCENE_WDITH ^ 0xffffffff) < (i_80_ ^ 0xffffffff) && (i ^ 0xffffffff) <= -1 && (Class377_Sub1.GAME_SCENE_HEIGHT ^ 0xffffffff) < (i ^ 0xffffffff)) {
    			if ((scenePositionXQueue[0] ^ 0xffffffff) > -1 || (scenePositionXQueue[0] ^ 0xffffffff) <= (Node_Sub54.GAME_SCENE_WDITH ^ 0xffffffff) || scenePositionYQueue[0] < 0 || (Class377_Sub1.GAME_SCENE_HEIGHT ^ 0xffffffff) >= (scenePositionYQueue[0] ^ 0xffffffff)) {
    				method888(i_80_, -97, i);
    			} else {
    				if ((b ^ 0xffffffff) == -3) {
    					Class191.method1946(this, i_80_, true, (byte) 2, i);
    				}
    				method887(-24527, i, i_80_, b);
    			}
    		} else {
    			method888(i_80_, -117, i);
    		}
    	}
    }



    So posted above is the player appearance class in the server side, and the first 3 called classes from the crash dump. I kind of suck with client side code, but I'm not entirely sure what's going on. Might be missing a few classes maybe, but not entirely sure. The source im using is the Lotica source Tyluur released, using both source/client released and I'm using the most updated cache from the displee backup site. Server/client should work with any clean cache (from my knowlege).
    Last edited by xCryptic13; 08-22-2022 at 05:10 AM. Reason: Posted wrong player appearance code, posted the customization code, not the actual player generation.
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Oct 2014
    Posts
    39
    Thanks given
    7
    Thanks received
    1
    Rep Power
    11
    Update:

    Found a separate client that works (as in, login and have a player model and navigate a few interfaces) but does not allow me to equip items or change any display settings. - I started comparing the code between the classes the crash error calls out just to see if there's anything different fetching the player model client sided.. The code matches up aside from calling methods and ints differently (however, they're all proper). I'm kind of at a loss and not sure where to go next. Would realistically like to use this client because it's fully functional with all graphics and sizing options.. Anyway I'm going to keep looking and hoping someone has some good ideas for me to try
    Reply With Quote  
     

  5. #5  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,788
    Thanks given
    706
    Thanks received
    702
    Rep Power
    570
    You're writing an extra string for the title:

    Code:
    // CLIENT
    
    titleId = stream.readByte();
    titleString = stream.readString();
    skullId = stream.readByte();
    
    // SERVER
    
    stream.writeByte(title); // mobi arms titles
    // TODO write title here or remove title string from client
    stream.writeByte(player.hasSkull() ? player.getSkullId() : -1);
    You need to remove the line that reads the title string in the client, or get the actual title string from the title numerical index and write it to the client.
    Project thread
    Reply With Quote  
     

  6. Thankful user:


  7. #6  
    Registered Member
    Join Date
    Oct 2014
    Posts
    39
    Thanks given
    7
    Thanks received
    1
    Rep Power
    11
    Quote Originally Posted by clem585 View Post
    You're writing an extra string for the title:

    Code:
    // CLIENT
    
    titleId = stream.readByte();
    titleString = stream.readString();
    skullId = stream.readByte();
    
    // SERVER
    
    stream.writeByte(title); // mobi arms titles
    // TODO write title here or remove title string from client
    stream.writeByte(player.hasSkull() ? player.getSkullId() : -1);
    You need to remove the line that reads the title string in the client, or get the actual title string from the title numerical index and write it to the client.
    Got it, and fixed. Now I can actually log in and see my character. Can't move (server side says wrong packet size) or equip anything, or view some shops due to invalid interface errors. I got a lot of re-learning to do to spin myself back up again.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [667] Requesting 667 client.
    By _Lemon in forum Requests
    Replies: 0
    Last Post: 04-27-2020, 03:05 AM
  2. 667 client won't compile
    By Beta in forum Help
    Replies: 3
    Last Post: 03-14-2012, 07:12 AM
  3. wtf 667 client
    By 64Bit in forum Help
    Replies: 14
    Last Post: 03-13-2012, 10:41 PM
  4. Matrix 667 Client Error
    By 'Andrew' in forum Help
    Replies: 3
    Last Post: 03-11-2012, 06:17 AM
  5. packet lenghts 667 client for ziotic conv
    By Polish Civil in forum Configuration
    Replies: 8
    Last Post: 01-05-2012, 06:53 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •