Thread: 530 Server and client runs great. As soon as combat happens, client crashes

Results 1 to 6 of 6
  1. #1 530 Server and client runs great. As soon as combat happens, client crashes 
    Registered Member
    Join Date
    Nov 2021
    Posts
    3
    Thanks given
    0
    Thanks received
    1
    Rep Power
    0
    If I am using anyones personal work as part of this server I am very sorry. I will not make this server public or accept any money. It seems like a lot of releases in this community are forced upon the content creators because of assholes selling leaked copies of their work

    Hello everyone I'm very new to this and I've been blindly stumbling my way around and learning a lot. I'm just trying to make a tiny server for me and a close group of friends. I downloaded the source and client from here. On page 11 of the comments there are two links which I downloaded.

    The server/client im trying to run are from this link

    I ripped the cache out of the files from here and copied them into the above mentioned server, so the server would run happily. I also had to change some path directories as they were in C:\Users\Settings which is restricted. After this the server seems to run with minimal issues.

    When looking at the client source it appears to just be decompiled source referencing all sorts of randomly numbered classes and methods. If this is impossible to fix, just let me know.

    The client created a cache folder at c:\users\(me)\.530 and even runs in HD after extracting the 530hdlibs into the cache directory. Connecting to the server is perfect and everything from speaking to NPCs, intereacting with objects, teleporting, etc all works. The moment I attack an NPC or am attacked by an NPC I see the animation start to play out, hear the sound effect, and then the screen turns white. The client crashes with this log
    Client log:
    Code:
    aString1212: runescape
    File: C:\Users\itach/.530/random.dat
    File: C:\Users\itach/.530/runescape/main_file_cache.dat2
    File: C:\Users\itach/.530/runescape/main_file_cache.idx255
    File: C:\Users\itach/.530/runescape/main_file_cache.idx0
    File: C:\Users\itach/.530/runescape/main_file_cache.idx1
    File: C:\Users\itach/.530/runescape/main_file_cache.idx2
    File: C:\Users\itach/.530/runescape/main_file_cache.idx3
    File: C:\Users\itach/.530/runescape/main_file_cache.idx4
    File: C:\Users\itach/.530/runescape/main_file_cache.idx5
    File: C:\Users\itach/.530/runescape/main_file_cache.idx6
    File: C:\Users\itach/.530/runescape/main_file_cache.idx7
    File: C:\Users\itach/.530/runescape/main_file_cache.idx8
    File: C:\Users\itach/.530/runescape/main_file_cache.idx9
    File: C:\Users\itach/.530/runescape/main_file_cache.idx10
    File: C:\Users\itach/.530/runescape/main_file_cache.idx11
    File: C:\Users\itach/.530/runescape/main_file_cache.idx12
    File: C:\Users\itach/.530/runescape/main_file_cache.idx13
    File: C:\Users\itach/.530/runescape/main_file_cache.idx14
    File: C:\Users\itach/.530/runescape/main_file_cache.idx15
    File: C:\Users\itach/.530/runescape/main_file_cache.idx16
    File: C:\Users\itach/.530/runescape/main_file_cache.idx17
    File: C:\Users\itach/.530/runescape/main_file_cache.idx18
    File: C:\Users\itach/.530/runescape/main_file_cache.idx19
    File: C:\Users\itach/.530/runescape/main_file_cache.idx20
    File: C:\Users\itach/.530/runescape/main_file_cache.idx21
    File: C:\Users\itach/.530/runescape/main_file_cache.idx22
    File: C:\Users\itach/.530/runescape/main_file_cache.idx23
    File: C:\Users\itach/.530/runescape/main_file_cache.idx24
    File: C:\Users\itach/.530/runescape/main_file_cache.idx25
    File: C:\Users\itach/.530/runescape/main_file_cache.idx26
    File: C:\Users\itach/.530/runescape/main_file_cache.idx27
    Class122(C:\Users\itach/, jagex_runescape_preferences.dat
    client modewhere> 0  ip>127.0.0.1  ondemand>443  port>43594  world>1
    method278 opcode 1
    Class122(C:\Users\itach/, jagex_runescape_preferences.dat
    [FindCache] set to C:\Users\itach/.530/runescape/ using file path C:\Users\itach/.530/runescape/jogl_64.dll
    You have the required HD libs.
    File: C:\Users\itach/.530/runescape/jogl_64.dll
    Libraries already aquired.
    File: C:\Users\itach/.530/runescape/jogl_awt_64.dll
    Class122(C:\Users\itach/, jagex_runescape_preferences.dat
    Login new Socket(127.0.0.1, 43594)
    sound packet #4 id 76
    sound packet #4 id 76
    sound packet #4 id 76
    sound packet #4 id 2
    sound packet #4 id 2
    packet #172 81 10 0
    sound packet #4 id 76
    sound packet #4 id 76
    packet #172 2564 10 0
    packet #172 371 10 0
    list: 0 | 199
    index2 list: null| ID: 199
    Error: lc.D(0,1920,0,624,1017,624,-7397) gn.B(0,0,0,{...},1920,-1,0,1017,119,-1) ag.E(-101,746,0,1920,0,-1,1017,0,0) al.G(true) ha.G(0) client.K(40) rc.AA(0) | Class82.method1405:205 Class3_Sub13_Sub36.method338:139 Class47.drawGameScreen:281 Class3_Sub13_Sub1.method171:141 Class8.method841:156 Class49.method1127:234 Client.mainRedraw:85 GameApplet.method37:335 GameApplet.run:403 java.lang.Thread.run | java.lang.ArrayIndexOutOfBoundsException: 2
    error_game_crash
    Shutdown complete - clean:true
    Server Log (seems fine)
    Code:
    [Nov/17/2021 13:42:20] (GameWorld.java:106): Prompting #530 Game World...
    [Nov/17/2021 13:42:20] (Cache.java:26): Initializing cache...
    [Nov/17/2021 13:42:21] (ObjectDefinitionsParser.java:15): Could not load object definitions for id 9292 - no data!
    [Nov/17/2021 13:42:21] (NPCConfiguration.java:96): Missing NPC configurations from NPC id 7774!
    [Nov/17/2021 13:42:22] (ComponentParser.java:18): Loaded 205 component definitions!
    [Nov/17/2021 13:42:22] (ScriptManager.java:46): Parsed 20 #530 scripts...
    [Nov/17/2021 13:42:24] (AbstractNPC.java:53): [RevenantDragonNPC] - Warning: Mapping already contained NPC id -1! (RevenantDemonNPC)
    [Nov/17/2021 13:42:24] (AbstractNPC.java:53): [RevenantImpNPC] - Warning: Mapping already contained NPC id -1! (RevenantDemonNPC)
    [Nov/17/2021 13:42:24] (AbstractNPC.java:53): [RevenantKnightNPC] - Warning: Mapping already contained NPC id -1! (RevenantDemonNPC)
    [Nov/17/2021 13:42:24] (AbstractNPC.java:53): [RevenantOrcNPC] - Warning: Mapping already contained NPC id -1! (RevenantDemonNPC)
    [Nov/17/2021 13:42:24] (AbstractNPC.java:53): [RevenantVampireNPC] - Warning: Mapping already contained NPC id -1! (RevenantDemonNPC)
    [Nov/17/2021 13:42:24] (PluginManager.java:78): Failed to load plugin HotspotBuildPlugin!
    [Nov/17/2021 13:42:24] (PluginManager.java:25): Initialized 1357 plugins...
    [Nov/17/2021 13:42:26] (Main.java:21): #530 flags GameSettings [name=#530, beta=true, sql=false, devMode=true, type=ECONOMY, worldId=1]
    [Nov/17/2021 13:42:26] (Main.java:22): #530 started in 6067 milliseconds.
    [Nov/17/2021 13:44:31] (GameInterface.java:30): button: 110 component: 746
    [Nov/17/2021 13:44:59] (GameInterface.java:30): button: 42 component: 746
    [Nov/17/2021 13:45:00] (GameInterface.java:30): button: 43 component: 746
    [Nov/17/2021 13:45:09] (GameInterface.java:30): button: 44 component: 746
    [Nov/17/2021 13:45:09] (GameInterface.java:30): button: 45 component: 746
    [Nov/17/2021 13:45:10] (GameInterface.java:30): button: 47 component: 746
    [Nov/17/2021 13:45:10] (GameInterface.java:30): button: 49 component: 746
    [Nov/17/2021 13:45:10] (GameInterface.java:30): button: 50 component: 746
    [Nov/17/2021 13:45:11] (GameInterface.java:30): button: 49 component: 746
    [Nov/17/2021 13:45:12] (GameInterface.java:30): button: 50 component: 746
    [Nov/17/2021 13:45:12] (GameInterface.java:30): button: 51 component: 746
    [Nov/17/2021 13:45:15] (GameInterface.java:30): button: 52 component: 746
    [Nov/17/2021 13:45:36] (GameInterface.java:30): button: 44 component: 746
    I tried using a couple different versions of the .530 cache to no avail. Is this possibly a cache problem?

    I've got this weird mysterious pack partially working and its the one my friends and I really want to play on. If anyone has any suggestions or insight I would greatly appreciate it! thanks

    EDIT: Fixed by Armo. Thank you so much!!! I could not have done this without you.
    Reply With Quote  
     

  2. #2  
    RuneCasino


    Join Date
    Jul 2007
    Posts
    1,647
    Thanks given
    175
    Thanks received
    257
    Rep Power
    358
    Add my discord: Armo#0980
    Reply With Quote  
     

  3. #3  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,788
    Thanks given
    706
    Thanks received
    702
    Rep Power
    570
    Quote Originally Posted by itachipirate View Post
    If I am using anyones personal work as part of this server I am very sorry. I will not make this server public or accept any money. It seems like a lot of releases in this community are forced upon the content creators because of assholes selling leaked copies of their work

    Hello everyone I'm very new to this and I've been blindly stumbling my way around and learning a lot. I'm just trying to make a tiny server for me and a close group of friends. I downloaded the source and client from here. On page 11 of the comments there are two links which I downloaded.

    The server/client im trying to run are from this link

    I ripped the cache out of the files from here and copied them into the above mentioned server, so the server would run happily. I also had to change some path directories as they were in C:\Users\Settings which is restricted. After this the server seems to run with minimal issues.

    When looking at the client source it appears to just be decompiled source referencing all sorts of randomly numbered classes and methods. If this is impossible to fix, just let me know.

    The client created a cache folder at c:\users\(me)\.530 and even runs in HD after extracting the 530hdlibs into the cache directory. Connecting to the server is perfect and everything from speaking to NPCs, intereacting with objects, teleporting, etc all works. The moment I attack an NPC or am attacked by an NPC I see the animation start to play out, hear the sound effect, and then the screen turns white. The client crashes with this log
    Client log:
    Code:
    aString1212: runescape
    File: C:\Users\itach/.530/random.dat
    File: C:\Users\itach/.530/runescape/main_file_cache.dat2
    File: C:\Users\itach/.530/runescape/main_file_cache.idx255
    File: C:\Users\itach/.530/runescape/main_file_cache.idx0
    File: C:\Users\itach/.530/runescape/main_file_cache.idx1
    File: C:\Users\itach/.530/runescape/main_file_cache.idx2
    File: C:\Users\itach/.530/runescape/main_file_cache.idx3
    File: C:\Users\itach/.530/runescape/main_file_cache.idx4
    File: C:\Users\itach/.530/runescape/main_file_cache.idx5
    File: C:\Users\itach/.530/runescape/main_file_cache.idx6
    File: C:\Users\itach/.530/runescape/main_file_cache.idx7
    File: C:\Users\itach/.530/runescape/main_file_cache.idx8
    File: C:\Users\itach/.530/runescape/main_file_cache.idx9
    File: C:\Users\itach/.530/runescape/main_file_cache.idx10
    File: C:\Users\itach/.530/runescape/main_file_cache.idx11
    File: C:\Users\itach/.530/runescape/main_file_cache.idx12
    File: C:\Users\itach/.530/runescape/main_file_cache.idx13
    File: C:\Users\itach/.530/runescape/main_file_cache.idx14
    File: C:\Users\itach/.530/runescape/main_file_cache.idx15
    File: C:\Users\itach/.530/runescape/main_file_cache.idx16
    File: C:\Users\itach/.530/runescape/main_file_cache.idx17
    File: C:\Users\itach/.530/runescape/main_file_cache.idx18
    File: C:\Users\itach/.530/runescape/main_file_cache.idx19
    File: C:\Users\itach/.530/runescape/main_file_cache.idx20
    File: C:\Users\itach/.530/runescape/main_file_cache.idx21
    File: C:\Users\itach/.530/runescape/main_file_cache.idx22
    File: C:\Users\itach/.530/runescape/main_file_cache.idx23
    File: C:\Users\itach/.530/runescape/main_file_cache.idx24
    File: C:\Users\itach/.530/runescape/main_file_cache.idx25
    File: C:\Users\itach/.530/runescape/main_file_cache.idx26
    File: C:\Users\itach/.530/runescape/main_file_cache.idx27
    Class122(C:\Users\itach/, jagex_runescape_preferences.dat
    client modewhere> 0  ip>127.0.0.1  ondemand>443  port>43594  world>1
    method278 opcode 1
    Class122(C:\Users\itach/, jagex_runescape_preferences.dat
    [FindCache] set to C:\Users\itach/.530/runescape/ using file path C:\Users\itach/.530/runescape/jogl_64.dll
    You have the required HD libs.
    File: C:\Users\itach/.530/runescape/jogl_64.dll
    Libraries already aquired.
    File: C:\Users\itach/.530/runescape/jogl_awt_64.dll
    Class122(C:\Users\itach/, jagex_runescape_preferences.dat
    Login new Socket(127.0.0.1, 43594)
    sound packet #4 id 76
    sound packet #4 id 76
    sound packet #4 id 76
    sound packet #4 id 2
    sound packet #4 id 2
    packet #172 81 10 0
    sound packet #4 id 76
    sound packet #4 id 76
    packet #172 2564 10 0
    packet #172 371 10 0
    list: 0 | 199
    index2 list: null| ID: 199
    Error: lc.D(0,1920,0,624,1017,624,-7397) gn.B(0,0,0,{...},1920,-1,0,1017,119,-1) ag.E(-101,746,0,1920,0,-1,1017,0,0) al.G(true) ha.G(0) client.K(40) rc.AA(0) | Class82.method1405:205 Class3_Sub13_Sub36.method338:139 Class47.drawGameScreen:281 Class3_Sub13_Sub1.method171:141 Class8.method841:156 Class49.method1127:234 Client.mainRedraw:85 GameApplet.method37:335 GameApplet.run:403 java.lang.Thread.run | java.lang.ArrayIndexOutOfBoundsException: 2
    error_game_crash
    Shutdown complete - clean:true
    Server Log (seems fine)
    Code:
    [Nov/17/2021 13:42:20] (GameWorld.java:106): Prompting #530 Game World...
    [Nov/17/2021 13:42:20] (Cache.java:26): Initializing cache...
    [Nov/17/2021 13:42:21] (ObjectDefinitionsParser.java:15): Could not load object definitions for id 9292 - no data!
    [Nov/17/2021 13:42:21] (NPCConfiguration.java:96): Missing NPC configurations from NPC id 7774!
    [Nov/17/2021 13:42:22] (ComponentParser.java:18): Loaded 205 component definitions!
    [Nov/17/2021 13:42:22] (ScriptManager.java:46): Parsed 20 #530 scripts...
    [Nov/17/2021 13:42:24] (AbstractNPC.java:53): [RevenantDragonNPC] - Warning: Mapping already contained NPC id -1! (RevenantDemonNPC)
    [Nov/17/2021 13:42:24] (AbstractNPC.java:53): [RevenantImpNPC] - Warning: Mapping already contained NPC id -1! (RevenantDemonNPC)
    [Nov/17/2021 13:42:24] (AbstractNPC.java:53): [RevenantKnightNPC] - Warning: Mapping already contained NPC id -1! (RevenantDemonNPC)
    [Nov/17/2021 13:42:24] (AbstractNPC.java:53): [RevenantOrcNPC] - Warning: Mapping already contained NPC id -1! (RevenantDemonNPC)
    [Nov/17/2021 13:42:24] (AbstractNPC.java:53): [RevenantVampireNPC] - Warning: Mapping already contained NPC id -1! (RevenantDemonNPC)
    [Nov/17/2021 13:42:24] (PluginManager.java:78): Failed to load plugin HotspotBuildPlugin!
    [Nov/17/2021 13:42:24] (PluginManager.java:25): Initialized 1357 plugins...
    [Nov/17/2021 13:42:26] (Main.java:21): #530 flags GameSettings [name=#530, beta=true, sql=false, devMode=true, type=ECONOMY, worldId=1]
    [Nov/17/2021 13:42:26] (Main.java:22): #530 started in 6067 milliseconds.
    [Nov/17/2021 13:44:31] (GameInterface.java:30): button: 110 component: 746
    [Nov/17/2021 13:44:59] (GameInterface.java:30): button: 42 component: 746
    [Nov/17/2021 13:45:00] (GameInterface.java:30): button: 43 component: 746
    [Nov/17/2021 13:45:09] (GameInterface.java:30): button: 44 component: 746
    [Nov/17/2021 13:45:09] (GameInterface.java:30): button: 45 component: 746
    [Nov/17/2021 13:45:10] (GameInterface.java:30): button: 47 component: 746
    [Nov/17/2021 13:45:10] (GameInterface.java:30): button: 49 component: 746
    [Nov/17/2021 13:45:10] (GameInterface.java:30): button: 50 component: 746
    [Nov/17/2021 13:45:11] (GameInterface.java:30): button: 49 component: 746
    [Nov/17/2021 13:45:12] (GameInterface.java:30): button: 50 component: 746
    [Nov/17/2021 13:45:12] (GameInterface.java:30): button: 51 component: 746
    [Nov/17/2021 13:45:15] (GameInterface.java:30): button: 52 component: 746
    [Nov/17/2021 13:45:36] (GameInterface.java:30): button: 44 component: 746
    I tried using a couple different versions of the .530 cache to no avail. Is this possibly a cache problem?

    I've got this weird mysterious pack partially working and its the one my friends and I really want to play on. If anyone has any suggestions or insight I would greatly appreciate it! thanks

    EDIT: Fixed by Armo. Thank you so much!!! I could not have done this without you.
    Would be nice to post the fix for future people that might find this thread ;p
    Project thread
    Reply With Quote  
     

  4. #4  
    RuneCasino


    Join Date
    Jul 2007
    Posts
    1,647
    Thanks given
    175
    Thanks received
    257
    Rep Power
    358
    Quote Originally Posted by clem585 View Post
    Would be nice to post the fix for future people that might find this thread
    Edit: misread post sorry.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Nov 2021
    Posts
    3
    Thanks given
    0
    Thanks received
    1
    Rep Power
    0
    Armo fixed some bugs in the Class82 and ClientUtil java files. Here they are

    Class82.java
    Code:
    final class Class82 {
    
    	private int[] anIntArray1144;
    	private Class3_Sub13 aClass3_Sub13_1145;
    	static Class93 aClass93_1146 = new Class93(64);
    	private Class3_Sub13[] aClass3_Sub13Array1147;
    	private Class3_Sub13 aClass3_Sub13_1148;
    	private int[] anIntArray1149;
    	static int anInt1150 = -1;
    	static RSString aClass94_1151 = Class3_Sub4.getString("settings=");
    	static int anInt1152;
    
    	final int[] method1404(int var1, boolean var2, int var3, double var4, int var6, JS5 var7, Interface2 var8, boolean var9) {
    		try {
    			SceneGraphNode.method1859(var4, var6 ^ 359938);
    			Class17.anInterface2_408 = var8;
    			Class104.aClass153_2172 = var7;
    			Class3_Sub13_Sub3.method180(-1, var1, var3);
    			int var11;
    			for(var11 = 0; ~this.aClass3_Sub13Array1147.length < ~var11; ++var11) {
    				this.aClass3_Sub13Array1147[var11].method160(var1, var3, 250);
    			}
    			if(var6 != 327680) {
    				method1405(68, 8, 20, -51, 31, 61, -34);
    			}
    			int[] var10 = new int[var1 * var3];
    			int var12;
    			byte var13;
    			if(!var9) {
    				var13 = 1;
    				var11 = 0;
    				var12 = var3;
    			} else {
    				var13 = -1;
    				var12 = -1;
    				var11 = var3 - 1;
    			}
    			int var14 = 0;
    			int var15;
    			for(var15 = 0; ~var15 > ~var1; ++var15) {
    				if(var2) {
    					var14 = var15;
    				}
    				int[] var17;
    				int[] var16;
    				int[] var18;
    				if(this.aClass3_Sub13_1145.aBoolean2375) {
    					int[] var19 = this.aClass3_Sub13_1145.method154(var15, (byte)109);
    					var16 = var19;
    					var17 = var19;
    					var18 = var19;
    				} else {
    					int[][] var24 = this.aClass3_Sub13_1145.method166(-1, var15);
    					var16 = var24[0];
    					var18 = var24[2];
    					var17 = var24[1];
    				}
    				for(int var25 = var11; var25 != var12; var25 += var13) {
    					int var20 = var16[var25] >> 4;
    					if(var20 > 255) {
    						var20 = 255;
    					}
    					if(~var20 > -1) {
    						var20 = 0;
    					}
    					var20 = PacketBuffer.anIntArray3804[var20];
    					int var22 = var18[var25] >> 4;
    					int var21 = var17[var25] >> 4;
    					if(var21 > 255) {
    						var21 = 255;
    					}
    					if(0 > var21) {
    						var21 = 0;
    					}
    					if(-256 > ~var22) {
    						var22 = 255;
    					}
    					var21 = PacketBuffer.anIntArray3804[var21];
    					if(-1 < ~var22) {
    						var22 = 0;
    					}
    					var22 = PacketBuffer.anIntArray3804[var22];
    					var10[var14++] = (var20 << 16) - -(var21 << 8) + var22;
    					if(var2) {
    						var14 += var3 + -1;
    					}
    				}
    			}
    			for(var15 = 0; var15 < this.aClass3_Sub13Array1147.length; ++var15) {
    				this.aClass3_Sub13Array1147[var15].method161((byte)-45);
    			}
    			return var10;
    		} catch (RuntimeException var23) {
    			throw Class44.method1067(var23, "lc.C(" + var1 + ',' + var2 + ',' + var3 + ',' + var4 + ',' + var6 + ',' + (var7 != null?"{...}":"null") + ',' + (var8 != null?"{...}":"null") + ',' + var9 + ')');
    		}
    	}
    
    	static final void method1405(int y, int var1, int x, int var3, int var4, int var5, int var6) {
    		try {
    			Class3_Sub13_Sub39.screenTextAmount = 0;
    			int var7;
    			int var15;
    			int var19;
    			int var21;
    			int var22;
    			int var29;
    			int color;
    			for(var7 = -1; var7 < Class159.anInt2022 + Class163.anInt2046; ++var7) {
    				Object entity;
    				if(0 == ~var7) {
    					entity = TextureLoader.player;
    				} else if(~Class159.anInt2022 < ~var7) {
    					entity = Class3_Sub13_Sub22.aClass140_Sub4_Sub1Array3269[Class56.anIntArray887[var7]];
    				} else {
    					entity = Class3_Sub13_Sub24.aClass140_Sub4_Sub2Array3292[Class15.anIntArray347[-Class159.anInt2022 + var7]];
    				}
    				if(null != entity && ((Entity) entity).method1966((byte)17)) {
    					NPCDefinition npcDefinition;
    					if(entity instanceof NPC) {
    						npcDefinition = ((NPC)entity).npcDefinition;
    						if(null != npcDefinition.anIntArray1292) {
    							npcDefinition = npcDefinition.method1471((byte)-93);
    						}
    						if(npcDefinition == null) {
    							continue;
    						}
    					}
    					int var12;
    					if(var7 < Class159.anInt2022) {
    						var19 = 30;
    						Player player = (Player) entity;
    						if(player.skullIcon != -1 || -1 != player.headIcon) {
    							Class107.method1647((byte)122, var4 >> 1, var3, (Entity)entity, var5, ((Entity) entity).method1975(var6 ^ -28716) - -15, var1 >> 1);
    							if(-1 < Class32.anInt590) {
    								if(0 != ~player.skullIcon) {
    									Class3_Sub13_Sub31.skullIconSprites[player.skullIcon].drawRegularSprite(-12 + Class32.anInt590 + x, -var19 + y + Class3_Sub1.anInt2208);
    									var19 += 25;
    								}
    								if(player.headIcon != -1) {
    									NPC.headIconSprites[player.headIcon].drawRegularSprite(-12 + x + Class32.anInt590, y - (-Class3_Sub1.anInt2208 + var19));
    									var19 += 25;
    								}
    							}
    						}
    						if(~var7 <= -1) {
    							HintIcon[] var11 = RuntimeException_Sub1.aClass96Array2114;
    							for(var12 = 0; ~var11.length < ~var12; ++var12) {
    								HintIcon hintIcon = var11[var12];
    								if(null != hintIcon && -11 == ~hintIcon.targetType && Class56.anIntArray887[var7] == hintIcon.anInt1359) {
    									Class107.method1647((byte)122, var4 >> 1, var3, (Entity) entity, var5, ((Entity) entity).method1975(var6 ^ -28716) - -15, var1 >> 1);
    									if(Class32.anInt590 > -1) {
    										Class166.hintIconSprites[hintIcon.arrowId].drawRegularSprite(x - (-Class32.anInt590 + 12), y + (Class3_Sub1.anInt2208 - var19));
    									}
    								}
    							}
    						}
    					} else {
    						npcDefinition = ((NPC) entity).npcDefinition;
    						if(npcDefinition.anIntArray1292 != null) {
    							npcDefinition = npcDefinition.method1471((byte)102);
    						}
    						if(~npcDefinition.anInt1269 <= -1 && NPC.headIconSprites.length > npcDefinition.anInt1269) {
    							if(0 == ~npcDefinition.anInt1265) {
    								var22 = 15 + ((Entity) entity).method1975(27855);
    							} else {
    								var22 = 15 + npcDefinition.anInt1265;
    							}
    							Class107.method1647((byte)122, var4 >> 1, var3, (Entity) entity, var5, var22, var1 >> 1);
    							if(~Class32.anInt590 < 0) {
    								NPC.headIconSprites[npcDefinition.anInt1269].drawRegularSprite(x - -Class32.anInt590 - 12, -30 + y - -Class3_Sub1.anInt2208);
    							}
    						}
    						HintIcon[] var20 = RuntimeException_Sub1.aClass96Array2114;
    						for(var21 = 0; ~var21 > ~var20.length; ++var21) {
    							HintIcon hinticon = var20[var21];
    							if(null != hinticon && hinticon.targetType == 1 && ~hinticon.anInt1359 == ~Class15.anIntArray347[-Class159.anInt2022 + var7] && -11 < ~(Class44.loopCycle % 20)) {
    								if(-1 != npcDefinition.anInt1265) {
    									var29 = 15 + npcDefinition.anInt1265;
    								} else {
    									var29 = 15 + ((Entity)entity).method1975(var6 + '\u89b4');
    								}
    								Class107.method1647((byte)122, var4 >> 1, var3, (Entity)entity, var5, var29, var1 >> 1);
    								if(0 > ~Class32.anInt590) {
    									Class166.hintIconSprites[hinticon.arrowId].drawRegularSprite(-12 + x + Class32.anInt590, -28 + Class3_Sub1.anInt2208 + y);
    								}
    							}
    						}
    					}
    					if(((Entity) entity).aClass94_2825 != null && (var7 >= Class159.anInt2022 || ~Class3_Sub13_Sub8.anInt3101 == -1 || 3 == Class3_Sub13_Sub8.anInt3101 || 1 == Class3_Sub13_Sub8.anInt3101 && Class54.method1176(((Player)entity).username, (byte)-82))) {
    						Class107.method1647((byte)122, var4 >> 1, var3, (Entity) entity, var5, ((Entity) entity).method1975(27855), var1 >> 1);
    						if(-1 < Class32.anInt590 && Class3_Sub13_Sub39.screenTextAmount < Class3_Sub13_Sub26.anInt3332) {
    							Class3_Sub13_Sub26.anIntArray3329[Class3_Sub13_Sub39.screenTextAmount] = UnderlayType.boldFont.getStringWidth(((Entity) entity).aClass94_2825) / 2;
    							Class3_Sub13_Sub26.anIntArray3327[Class3_Sub13_Sub39.screenTextAmount] = UnderlayType.boldFont.baseCharacterheight;
    							Class3_Sub13_Sub26.anIntArray3319[Class3_Sub13_Sub39.screenTextAmount] = Class32.anInt590;
    							Class3_Sub13_Sub26.anIntArray3337[Class3_Sub13_Sub39.screenTextAmount] = Class3_Sub1.anInt2208;
    							Class3_Sub13_Sub26.anIntArray3331[Class3_Sub13_Sub39.screenTextAmount] = ((Entity) entity).anInt2837;
    							Class3_Sub13_Sub26.anIntArray3336[Class3_Sub13_Sub39.screenTextAmount] = ((Entity) entity).anInt2753;
    							Class3_Sub13_Sub26.anIntArray3318[Class3_Sub13_Sub39.screenTextAmount] = ((Entity) entity).anInt2814;
    							Class3_Sub13_Sub26.aClass94Array3317[Class3_Sub13_Sub39.screenTextAmount] = ((Entity) entity).aClass94_2825;
    							++Class3_Sub13_Sub39.screenTextAmount;
    						}
    					}
    					if(~((Entity) entity).anInt2781 < ~Class44.loopCycle) {
    						boolean newHealthBars = ((boolean) Settings.getSetting("562Data") || (boolean) Settings.getSetting("603Data"));
    						AbstractSprite redBarSprite = JS5CacheWorker.healhBarSprites[0];//newHealthBars ? 1 : 2];
    						AbstractSprite greenBarSprite = JS5CacheWorker.healhBarSprites[1];//newHealthBars ? 0 : 3];
    						if (entity instanceof NPC) {
    							NPC npc = (NPC) entity;
    							AbstractSprite[] var31 = (AbstractSprite[]) ((AbstractSprite[]) Class3_Sub13_Sub11.aClass93_3130.get((long)npc.npcDefinition.anInt1279, (byte)121));
    							if (var31 == null) {
    								var31 = Class140_Sub6.method2027(0, (byte) 11, npc.npcDefinition.anInt1279, Class140_Sub6.cacheIndex8);
    								if (null != var31) {
    									Class3_Sub13_Sub11.aClass93_3130.put((byte) -98, var31, (long) npc.npcDefinition.anInt1279);
    								}
    							}
    							if (null != var31 && ~var31.length == -3) {
    								greenBarSprite = var31[1];
    								redBarSprite = var31[0];
    							}
    							NPCDefinition npcDef = npc.npcDefinition;
    							if (-1 == npcDef.anInt1265) {
    								var21 = ((Entity) entity).method1975(27855);
    							} else {
    								var21 = npcDef.anInt1265;
    							}
    						} else {
    							var21 = ((Entity) entity).method1975(27855);
    						}
    						Class107.method1647((byte)122, var4 >> 1, var3, (Entity) entity, var5, redBarSprite.height + 10 + var21, var1 >> 1);
    						if (-1 < Class32.anInt590) {
    							var12 = -(redBarSprite.width >> 1) + Class32.anInt590 + x;
    							var29 = Class3_Sub1.anInt2208 + y + -3;
    							redBarSprite.drawRegularSprite(var12, var29);
    							color = redBarSprite.width * ((Entity) entity).anInt2775 / 255;
    							var15 = redBarSprite.height;
    							if(!HDToolKit.openGLEnabled) {
    								GraphicsLD.method1326(var12, var29, var12 + color, var15 + var29);
    							} else {
    								GraphicsHD.method931(var12, var29, var12 + color, var29 + var15);
    							}
    							greenBarSprite.drawRegularSprite(var12, var29);
    							if(HDToolKit.openGLEnabled) {
    								GraphicsHD.clipRectangle(x, y, var1 + x, y - -var4);
    							} else {
    								GraphicsLD.clipRectangle(x, y, var1 + x, var4 + y);
    							}
    						}
    					}
    					for(var19 = 0; ~var19 > -5; ++var19) {
    						if(~((Entity) entity).hitCycle[var19] < ~Class44.loopCycle) {
    							if(!(entity instanceof NPC)) {
    								var22 = ((Entity) entity).method1975(var6 ^ -28716) / 2;
    							} else {
    								NPC npc = (NPC) entity;
    								NPCDefinition npcDef = npc.npcDefinition;
    								if(~npcDef.anInt1265 == 0) {
    									var22 = ((Entity) entity).method1975(27855) / 2;
    								} else {
    									var22 = npcDef.anInt1265 / 2;
    								}
    							}
    							Class107.method1647((byte)122, var4 >> 1, var3, (Entity) entity, var5, var22, var1 >> 1);
    							if(-1 < Class32.anInt590) {
    								if(var19 == 1) {
    									Class3_Sub1.anInt2208 -= 20;
    								}
    								if(-3 == ~var19) {
    									Class3_Sub1.anInt2208 -= 10;
    									Class32.anInt590 -= 15;
    								}
    								if(3 == var19) {
    									Class3_Sub1.anInt2208 -= 10;
    									Class32.anInt590 += 15;
    								}
    								int index = ((Entity) entity).hitType[var19];
    								int damage = ((Entity) entity).hitValue[var19];
    								boolean newHitmarks = ((boolean) Settings.getSetting("562Data") || (boolean) Settings.getSetting("603Data"));
    								if (newHitmarks) {
    									if (index == 0) {
    										index = 5;
    									} else if (index == 1) {
    										if (damage > 99) {
    											index = 7;
    										} else {
    											index = 6;
    										}
    									} else if (index == 2) {
    										if (damage > 99) {
    											index = 9;
    										} else {
    											index = 8;
    										}
    									}
    									int xIncrease = (index == 7 || index == 9) ? 20 : 12;
    									int yIncrease = (index == 7 || index == 9) ? 13 : 12;
    									Class75_Sub3.hitMarkerSprites[index].drawRegularSprite(-xIncrease + x + Class32.anInt590, y + Class3_Sub1.anInt2208 - yIncrease);
    									Class3_Sub13.smallFont.drawCenteredText(Class72.method1298((byte)9, damage), -1 + Class32.anInt590 + x, 3 + Class3_Sub1.anInt2208 + y, 16777215, 0);
    								} else {
    									Class75_Sub3.hitMarkerSprites[index].drawRegularSprite(-12 + x + Class32.anInt590, y + Class3_Sub1.anInt2208 - 12);
    									Class3_Sub13.smallFont.drawCenteredText(Class72.method1298((byte)9, damage), -1 + Class32.anInt590 + x, 3 + Class3_Sub1.anInt2208 + y, 16777215, 0);
    								}
    							}
    						}
    					}
    				}
    			}
    			var7 = 0;
    			if(var6 != -7397) {
    				method1409(true);
    			}
    			for(; Class3_Sub13_Sub39.screenTextAmount > var7; ++var7) {
    				var19 = Class3_Sub13_Sub26.anIntArray3337[var7];
    				int var18 = Class3_Sub13_Sub26.anIntArray3319[var7];
    				var21 = Class3_Sub13_Sub26.anIntArray3327[var7];
    				var22 = Class3_Sub13_Sub26.anIntArray3329[var7];
    				boolean var27 = true;
    				while(var27) {
    					var27 = false;
    					for(var29 = 0; var7 > var29; ++var29) {
    						if(Class3_Sub13_Sub26.anIntArray3337[var29] - Class3_Sub13_Sub26.anIntArray3327[var29] < 2 + var19 && -var21 + var19 < Class3_Sub13_Sub26.anIntArray3337[var29] - -2 && -var22 + var18 < Class3_Sub13_Sub26.anIntArray3319[var29] + Class3_Sub13_Sub26.anIntArray3329[var29] && Class3_Sub13_Sub26.anIntArray3319[var29] - Class3_Sub13_Sub26.anIntArray3329[var29] < var22 + var18 && -Class3_Sub13_Sub26.anIntArray3327[var29] + Class3_Sub13_Sub26.anIntArray3337[var29] < var19) {
    							var19 = Class3_Sub13_Sub26.anIntArray3337[var29] - Class3_Sub13_Sub26.anIntArray3327[var29];
    							var27 = true;
    						}
    					}
    				}
    				Class32.anInt590 = Class3_Sub13_Sub26.anIntArray3319[var7];
    				Class3_Sub1.anInt2208 = Class3_Sub13_Sub26.anIntArray3337[var7] = var19;
    				RSString string = Class3_Sub13_Sub26.aClass94Array3317[var7];
    				if(~FileSystem.anInt688 == -1) {
    					color = 16776960;
    					if(-7 < ~Class3_Sub13_Sub26.anIntArray3331[var7]) {
    						color = Class3_Sub1.anIntArray2213[Class3_Sub13_Sub26.anIntArray3331[var7]];
    					}
    					if(6 == Class3_Sub13_Sub26.anIntArray3331[var7]) {
    						color = 10 <= VarBit.anInt1127 % 20?16776960:16711680;
    					}
    					if(~Class3_Sub13_Sub26.anIntArray3331[var7] == -8) {
    						color = ~(VarBit.anInt1127 % 20) > -11?255:'\uffff';
    					}
    					if(8 == Class3_Sub13_Sub26.anIntArray3331[var7]) {
    						color = ~(VarBit.anInt1127 % 20) <= -11?8454016:'\ub000';
    					}
    					if(9 == Class3_Sub13_Sub26.anIntArray3331[var7]) {
    						var15 = -Class3_Sub13_Sub26.anIntArray3318[var7] + 150;
    						if(var15 >= 50) {
    							if(var15 >= 100) {
    								if(150 > var15) {
    									color = -500 - (-(5 * var15) - '\uff00');
    								}
    							} else {
    								color = 16776960 + 16384000 + -(327680 * var15);
    							}
    						} else {
    							color = var15 * 1280 + 16711680;
    						}
    					}
    					if(10 == Class3_Sub13_Sub26.anIntArray3331[var7]) {
    						var15 = -Class3_Sub13_Sub26.anIntArray3318[var7] + 150;
    						if(50 <= var15) {
    							if(~var15 > -101) {
    								color = -(327680 * (-50 + var15)) + 16711935;
    							} else if(150 > var15) {
    								color = 327680 * var15 - (32768000 - (255 + -(5 * var15) + 500));
    							}
    						} else {
    							color = 16711680 + var15 * 5;
    						}
    					}
    					if(Class3_Sub13_Sub26.anIntArray3331[var7] == 11) {
    						var15 = 150 + -Class3_Sub13_Sub26.anIntArray3318[var7];
    						if(var15 >= 50) {
    							if(-101 >= ~var15) {
    								if(var15 < 150) {
    									color = 16777215 - var15 * 327680 + 32768000;
    								}
    							} else {
    								color = '\uff00' - (-(327685 * var15) - -16384250);
    							}
    						} else {
    							color = 16777215 - 327685 * var15;
    						}
    					}
    					if(0 == Class3_Sub13_Sub26.anIntArray3336[var7]) {
    						UnderlayType.boldFont.drawCenteredText(string, Class32.anInt590 + x, y + Class3_Sub1.anInt2208, color, 0);
    					}
    					if(1 == Class3_Sub13_Sub26.anIntArray3336[var7]) {
    						UnderlayType.boldFont.drawYModCenteredText(string, x - -Class32.anInt590, Class3_Sub1.anInt2208 + y, color, 0, VarBit.anInt1127);
    					}
    					if(Class3_Sub13_Sub26.anIntArray3336[var7] == 2) {
    						UnderlayType.boldFont.method695(string, x - -Class32.anInt590, y - -Class3_Sub1.anInt2208, color, 0, VarBit.anInt1127);
    					}
    					if(-4 == ~Class3_Sub13_Sub26.anIntArray3336[var7]) {
    						UnderlayType.boldFont.method692(string, x + Class32.anInt590, Class3_Sub1.anInt2208 + y, color, 0, VarBit.anInt1127, 150 - Class3_Sub13_Sub26.anIntArray3318[var7]);
    					}
    					if(4 == Class3_Sub13_Sub26.anIntArray3336[var7]) {
    						var15 = (-Class3_Sub13_Sub26.anIntArray3318[var7] + 150) * (UnderlayType.boldFont.getStringWidth(string) - -100) / 150;
    						if(!HDToolKit.openGLEnabled) {
    							GraphicsLD.method1326(-50 + (x - -Class32.anInt590), y, 50 + Class32.anInt590 + x, var4 + y);
    						} else {
    							GraphicsHD.method931(Class32.anInt590 + x + -50, y, Class32.anInt590 + x - -50, var4 + y);
    						}
    						UnderlayType.boldFont.drawText(string, x - (-Class32.anInt590 + -50) + -var15, y + Class3_Sub1.anInt2208, color, 0);
    						if(HDToolKit.openGLEnabled) {
    							GraphicsHD.clipRectangle(x, y, var1 + x, var4 + y);
    						} else {
    							GraphicsLD.clipRectangle(x, y, x - -var1, y + var4);
    						}
    					}
    
    					if(Class3_Sub13_Sub26.anIntArray3336[var7] == 5) {
    						int var16 = 0;
    						var15 = -Class3_Sub13_Sub26.anIntArray3318[var7] + 150;
    						if(HDToolKit.openGLEnabled) {
    							GraphicsHD.method931(x, -1 + -UnderlayType.boldFont.baseCharacterheight + Class3_Sub1.anInt2208 + y, var1 + x, 5 + y - -Class3_Sub1.anInt2208);
    						} else {
    							GraphicsLD.method1326(x, -1 + -UnderlayType.boldFont.baseCharacterheight + Class3_Sub1.anInt2208 + y, x + var1, 5 + Class3_Sub1.anInt2208 + y);
    						}
    
    						if(25 > var15) {
    							var16 = var15 + -25;
    						} else if(var15 > 125) {
    							var16 = var15 - 125;
    						}
    
    						UnderlayType.boldFont.drawCenteredText(string, Class32.anInt590 + x, var16 + y + Class3_Sub1.anInt2208, color, 0);
    						if(HDToolKit.openGLEnabled) {
    							GraphicsHD.clipRectangle(x, y, x - -var1, y + var4);
    						} else {
    							GraphicsLD.clipRectangle(x, y, x + var1, y + var4);
    						}
    					}
    				} else {
    					UnderlayType.boldFont.drawCenteredText(string, x - -Class32.anInt590, y + Class3_Sub1.anInt2208, 16776960, 0);
    				}
    			}
    
    		} catch (RuntimeException var17) {
    			throw Class44.method1067(var17, "lc.D(" + y + ',' + var1 + ',' + x + ',' + var3 + ',' + var4 + ',' + var5 + ',' + var6 + ')');
    		}
    	}
    
    	static final int method1406(byte var0) {
    		try {
    			int var1 = -21 % ((63 - var0) / 49);
    			return RawObjectCache.anInt4045;
    		} catch (RuntimeException var2) {
    			throw Class44.method1067(var2, "lc.E(" + var0 + ')');
    		}
    	}
    
    	final byte[] method1407(int var1, int var2, boolean var3, Interface2 var4, double var5, int var7, JS5 var8) {
    		try {
    			byte[] var9 = new byte[4 * var2 * var1];
    			if(var7 != 8839) {
    				return (byte[])null;
    			} else {
    				SceneGraphNode.method1859(var5, 32258);
    				Class104.aClass153_2172 = var8;
    				Class17.anInterface2_408 = var4;
    				Class3_Sub13_Sub3.method180(-32, var1, var2);
    
    				int var10;
    				for(var10 = 0; this.aClass3_Sub13Array1147.length > var10; ++var10) {
    					this.aClass3_Sub13Array1147[var10].method160(var1, var2, var7 + -8589);
    				}
    
    				var10 = 0;
    
    				int var11;
    				for(var11 = 0; ~var1 < ~var11; ++var11) {
    					if(var3) {
    						var10 = var11 << 2;
    					}
    
    					int[] var12;
    					int[] var13;
    					int[] var14;
    					int[] var15;
    					if(this.aClass3_Sub13_1145.aBoolean2375) {
    						var15 = this.aClass3_Sub13_1145.method154(var11, (byte)-98);
    						var12 = var15;
    						var13 = var15;
    						var14 = var15;
    					} else {
    						int[][] var22 = this.aClass3_Sub13_1145.method166(-1, var11);
    						var12 = var22[0];
    						var13 = var22[1];
    						var14 = var22[2];
    					}
    
    					if(this.aClass3_Sub13_1148.aBoolean2375) {
    						var15 = this.aClass3_Sub13_1148.method154(var11, (byte)-103);
    					} else {
    						var15 = this.aClass3_Sub13_1148.method166(-1, var11)[0];
    					}
    
    					for(int var16 = var2 - 1; ~var16 <= -1; --var16) {
    						int var17 = var12[var16] >> 4;
    					if(var17 > 255) {
    						var17 = 255;
    					}
    
    					if(var17 < 0) {
    						var17 = 0;
    					}
    
    					int var18 = var13[var16] >> 4;
    					if(-256 > ~var18) {
    						var18 = 255;
    					}
    
    					int var19 = var14[var16] >> 4;
    					if(var19 > 255) {
    						var19 = 255;
    					}
    
    					var17 = PacketBuffer.anIntArray3804[var17];
    					if(~var19 > -1) {
    						var19 = 0;
    					}
    
    					if(~var18 > -1) {
    						var18 = 0;
    					}
    
    					var18 = PacketBuffer.anIntArray3804[var18];
    					var19 = PacketBuffer.anIntArray3804[var19];
    					int var20;
    					if(~var17 == -1 && -1 == ~var18 && -1 == ~var19) {
    						var20 = 0;
    					} else {
    						var20 = var15[var16] >> 4;
    						if(255 < var20) {
    							var20 = 255;
    						}
    
    						if(-1 < ~var20) {
    							var20 = 0;
    						}
    					}
    
    					var9[var10++] = (byte)var17;
    					var9[var10++] = (byte)var18;
    					var9[var10++] = (byte)var19;
    					var9[var10++] = (byte)var20;
    					if(var3) {
    						var10 += -4 + (var2 << 2);
    					}
    					}
    				}
    
    				for(var11 = 0; ~var11 > ~this.aClass3_Sub13Array1147.length; ++var11) {
    					this.aClass3_Sub13Array1147[var11].method161((byte)-45);
    				}
    
    				return var9;
    			}
    		} catch (RuntimeException var21) {
    			throw Class44.method1067(var21, "lc.F(" + var1 + ',' + var2 + ',' + var3 + ',' + (var4 != null?"{...}":"null") + ',' + var5 + ',' + var7 + ',' + (var8 != null?"{...}":"null") + ')');
    		}
    	}
    
    	final boolean method1408(boolean var1, Interface2 var2, JS5 var3) {
    		try {
    			int var4;
    			if(0 < PlainTile.anInt1668) {
    				for(var4 = 0; ~var4 > ~this.anIntArray1144.length; ++var4) {
    					if(!var3.method2129((byte)-78, this.anIntArray1144[var4], PlainTile.anInt1668)) {
    						return false;
    					}
    				}
    			} else {
    				for(var4 = 0; ~var4 > ~this.anIntArray1144.length; ++var4) {
    					if(!var3.method2144(0, this.anIntArray1144[var4])) {
    						return false;
    					}
    				}
    			}
    
    			if(!var1) {
    				this.anIntArray1144 = (int[])null;
    			}
    
    			for(var4 = 0; ~this.anIntArray1149.length < ~var4; ++var4) {
    				if(!var2.method11(21, this.anIntArray1149[var4])) {
    					return false;
    				}
    			}
    
    			return true;
    		} catch (RuntimeException var5) {
    			throw Class44.method1067(var5, "lc.B(" + var1 + ',' + (var2 != null?"{...}":"null") + ',' + (var3 != null?"{...}":"null") + ')');
    		}
    	}
    
    	public static void method1409(boolean var0) {
    		try {
    			aClass93_1146 = null;
    			if(var0) {
    				aClass94_1151 = (RSString)null;
    			}
    
    			aClass94_1151 = null;
    		} catch (RuntimeException var2) {
    			throw Class44.method1067(var2, "lc.A(" + var0 + ')');
    		}
    	}
    
    	public Class82() {
    		try {
    			this.anIntArray1149 = new int[0];
    			this.anIntArray1144 = new int[0];
    			this.aClass3_Sub13_1145 = new Class3_Sub13_Sub22();
    			this.aClass3_Sub13_1145.anInt2381 = 1;
    			this.aClass3_Sub13_1148 = new Class3_Sub13_Sub22();
    			this.aClass3_Sub13Array1147 = new Class3_Sub13[]{this.aClass3_Sub13_1145, this.aClass3_Sub13_1148};
    			this.aClass3_Sub13_1148.anInt2381 = 1;
    		} catch (RuntimeException var2) {
    			throw Class44.method1067(var2, "lc.<init>()");
    		}
    	}
    
    	Class82(RSByteBuffer var1) {
    		try {
    			int var2 = var1.getByte((byte)-93);
    			this.aClass3_Sub13Array1147 = new Class3_Sub13[var2];
    			int[][] var5 = new int[var2][];
    			int var4 = 0;
    			int var3 = 0;
    
    			int var6;
    			Class3_Sub13 var7;
    			int var8;
    			int var9;
    			for(var6 = 0; var2 > var6; ++var6) {
    				var7 = InputStream_Sub1.method63((byte)-67, var1);
    				if(0 <= var7.method159(4)) {
    					++var3;
    				}
    
    				if(~var7.method155((byte)19) <= -1) {
    					++var4;
    				}
    
    				var8 = var7.aClass3_Sub13Array2377.length;
    				var5[var6] = new int[var8];
    
    				for(var9 = 0; ~var8 < ~var9; ++var9) {
    					var5[var6][var9] = var1.getByte((byte)-85);
    				}
    
    				this.aClass3_Sub13Array1147[var6] = var7;
    			}
    
    			this.anIntArray1144 = new int[var3];
    			this.anIntArray1149 = new int[var4];
    			var3 = 0;
    			var4 = 0;
    
    			for(var6 = 0; var6 < var2; ++var6) {
    				var7 = this.aClass3_Sub13Array1147[var6];
    				var8 = var7.aClass3_Sub13Array2377.length;
    
    				for(var9 = 0; ~var9 > ~var8; ++var9) {
    					var7.aClass3_Sub13Array2377[var9] = this.aClass3_Sub13Array1147[var5[var6][var9]];
    				}
    
    				var9 = var7.method159(4);
    				int var10 = var7.method155((byte)19);
    				if(-1 > ~var9) {
    					this.anIntArray1144[var3++] = var9;
    				}
    
    				if(~var10 < -1) {
    					this.anIntArray1149[var4++] = var10;
    				}
    
    				var5[var6] = null;
    			}
    
    			this.aClass3_Sub13_1145 = this.aClass3_Sub13Array1147[var1.getByte((byte)-85)];
    			var5 = (int[][])null;
    			this.aClass3_Sub13_1148 = this.aClass3_Sub13Array1147[var1.getByte((byte)-87)];
    		} catch (RuntimeException var11) {
    			throw Class44.method1067(var11, "lc.<init>(" + (var1 != null?"{...}":"null") + ')');
    		}
    	}
    
    }
    ClientUtil.java
    Code:
    import java.util.ArrayList;
    
    /**
     * Handles and holds client utilities.
     *
     * @author Torchic
     * @Date Sep 22, 2015
     */
    public class ClientUtil {
    	public static int indexCount = 28;
    	public static AbstractSprite[] xpCounterSprites;
    	public static int xpCounterSpriteIndexId = 1708;
    	public static int totalExperience;
    	public static int experienceGained = 0;
    	public static int[][] xpAdded = new int[10][3];
    	private static boolean xpMerge = true;
    	public static String counterColor = "0xffffff";// "4682B4";
    
    	public static void drawCounter() {
    		Font font = PlainTile.font;
    		Font boldFont = UnderlayType.boldFont;
    		int fontHeight = 22;
    		int widthStart = 520;
    		int x = 510;
    		int y = -100;
    		int xOffset = Integer.toString(experienceGained).length();
    		int offset = xOffset == 1 ? 5 : ((xOffset - 1) * 5);
    		for (int index = 0; index < xpAdded.length; index++) {
    			if (xpAdded[index][0] > -1) {
    				if (xpAdded[index][2] >= 0) {
    					int xpGained = xpAdded[index][1];
    					int transparency = 256;
    					if (xpAdded[index][2] > 120) {
    						transparency = (20 - (xpAdded[index][2] - 120)) * 256 / 20;
    					}
    					RSString string = Class3_Sub4
    							.getString("<col=" + counterColor + "><trans=" + transparency + ">" + xpGained);
    					int iconXOffset = 0;
    					AbstractSprite[] sprite = JS5CacheWorker.healhBarSprites;
    					for (int spriteIndex = 0; spriteIndex < sprite.length; spriteIndex++) {
    						if ((xpAdded[index][0] & (1 << spriteIndex)) == 0) {
    							continue;
    						}
    						int id = spriteIndex;
    						iconXOffset += sprite[id].width + 3;
    						sprite[id].drawTransparentSprite(x - offset + 12 - font.getStringWidth(string) - iconXOffset, y
    								+ 150 + (140 - xpAdded[index][2]) - (fontHeight / 2) - (sprite[spriteIndex].height / 2),
    								transparency);
    					}
    					font.drawText(string, x - offset + 12 - font.getStringWidth(string),
    							y + 150 + (140 - xpAdded[index][2]), 0xffffff, -1);
    				}
    				xpAdded[index][2]++;
    				if (xpAdded[index][2] >= 140) {
    					xpAdded[index][0] = -1;
    				}
    			}
    		}
    		// int totalOffset =
    		// boldFont.getStringWidth(Class3_Sub4.getString("Total: " +
    		// Integer.toString(totalExperience)));
    		// boldFont.drawText(Class3_Sub4.getString("Total: " +
    		// Integer.toString(totalExperience)), widthStart - 10 - totalOffset,
    		// 20, 16777215, -1);
    	}
    
    	public static void addToCounter(int skillId, int experience) {
    		int fontHeight = 24;
    		if (experience <= 0 || (experience == totalExperience)) {
    			return;
    		}
    		experienceGained += experience;
    		int lowestYOffset = Integer.MAX_VALUE;
    		for (int i = 0; i < xpAdded.length; i++) {
    			if (xpAdded[i][0] > -1) {
    				lowestYOffset = Math.min(lowestYOffset, xpAdded[i][2]);
    			}
    		}
    		if (xpMerge && lowestYOffset != Integer.MAX_VALUE && lowestYOffset <= 0) {
    			for (int i = 0; i < xpAdded.length; i++) {
    				if (xpAdded[i][2] != lowestYOffset) {
    					continue;
    				}
    				xpAdded[i][0] |= (1 << skillId);
    				xpAdded[i][1] += experience;
    				return;
    			}
    		} else {
    			ArrayList<Integer> list = new ArrayList<Integer>();
    			int y = fontHeight;
    			boolean go = true;
    			while (go) {
    				go = false;
    				for (int i = 0; i < xpAdded.length; i++) {
    					if (xpAdded[i][0] == -1 || list.contains(new Integer(i))) {
    						continue;
    					}
    					if (xpAdded[i][2] < y) {
    						xpAdded[i][2] = y;
    						y += fontHeight;
    						go = true;
    						list.add(new Integer(i));
    					}
    				}
    			}
    			if (lowestYOffset == Integer.MAX_VALUE || lowestYOffset >= fontHeight) {
    				lowestYOffset = 0;
    			} else {
    				lowestYOffset = 0;
    			}
    			for (int i = 0; i < xpAdded.length; i++) {
    				if (xpAdded[i][0] == -1) {
    					xpAdded[i][0] = (1 << skillId);
    					xpAdded[i][1] = experience;
    					xpAdded[i][2] = lowestYOffset;
    					return;
    				}
    			}
    		}
    	}
    }
    Reply With Quote  
     

  6. Thankful user:


  7. #6  
    RuneCasino


    Join Date
    Jul 2007
    Posts
    1,647
    Thanks given
    175
    Thanks received
    257
    Rep Power
    358
    Misread clem585's post, sorry.
    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. Client error as soon as I open
    By watev7 in forum Help
    Replies: 0
    Last Post: 07-06-2014, 08:41 PM
  2. NEED HELP as soon as possible
    By pofroze in forum Help
    Replies: 6
    Last Post: 02-16-2014, 04:15 AM
  3. Replies: 2
    Last Post: 01-24-2014, 01:55 PM
  4. Replies: 9
    Last Post: 06-23-2013, 01:08 PM
  5. Client crashes as soon as i log in?
    By Bosnia in forum Help
    Replies: 13
    Last Post: 01-12-2012, 11:01 PM
Tags for this Thread

View Tag Cloud

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •