Thread: 602 Skill tab issues

Results 1 to 9 of 9
  1. #1 602 Skill tab issues 
    Registered Member

    Join Date
    Aug 2012
    Posts
    3,161
    Thanks given
    2,843
    Thanks received
    855
    Rep Power
    2235
    For some reason I can't get the 602 skill tab to work. Keep getting loaderror 95 and i'm not sure why. Here are some bits of code and media that will hopefully give any of you some leads on what the problem is.

    Spoiler for code:

    Code:
    public static void skillTab() {
    		RSInterface skill = addTabInterface(3917);
    		int[] logoutID = {2450, 2451, 2452};
    	    int[] logoutID2 = {2458 };
    	   for (int i: logoutID) {
    	        RSInterface Logout = interfaceCache[i];
    	        Logout.textColor = 0xFF981F;
    	        Logout.contentType = 0;
    	    }
    	    for (int i: logoutID2) {
    	       RSInterface Logout = interfaceCache[i];
    	       Logout.contentType = 0;
    	    }
    		int[] buttons = { 8654, 8655, 8656, 8657, 8658, 8659, 8660, 8861, 8662, 8663, 8664, 8665, 8666, 8667, 8668, 8669, 8670, 8671, 8672, 12162, 13928, 28177, 28178, 28179, 28180 };
    		int[] hovers = { 4040, 4076, 4112, 4046, 4082, 4118, 4052, 4088, 4124, 4058, 4094, 4130, 4064, 4100, 4136, 4070, 4106, 4142, 4160, 2832, 13917, 28173, 28174, 28175, 28176 };
    		int[][] text = { { 4004, 4005 }, { 4016, 4017 }, { 4028, 4029 },
    				{ 4006, 4007 }, { 4018, 4019 }, { 4030, 4031 }, { 4008, 4009 },
    				{ 4020, 4021 }, { 4032, 4033 }, { 4010, 4011 }, { 4022, 4023 },
    				{ 4034, 4035 }, { 4012, 4013 }, { 4024, 4025 }, { 4036, 4037 },
    				{ 4014, 4015 }, { 4026, 4027 }, { 4038, 4039 }, { 4152, 4153 },
    				{ 12166, 12167 }, { 13926, 13927 }, { 28165, 28169 },
    				{ 28166, 28170 }, { 28167, 28171 }, { 28168, 28172 } };
    
    		int[] icons = { 3965, 3966, 3967, 3968, 3969, 3970, 3971, 3972, 3973,
    				3974, 3975, 3976, 3977, 3978, 3979, 3980, 3981, 3982, 4151,
    				12165, 13925, 28181, 28182, 28183, 28184 };
    
    		int[][] buttonCoords = { { 3, 5 }, { 65, 5 }, { 127, 5 }, { 3, 33 },
    				{ 65, 33 }, { 127, 33 }, { 3, 61 }, { 65, 61 }, { 127, 61 },
    				{ 3, 89 }, { 65, 89 }, { 127, 89 }, { 3, 117 }, { 65, 117 },
    				{ 127, 117 }, { 3, 145 }, { 65, 145 }, { 127, 145 },
    				{ 3, 173 }, { 65, 173 }, { 127, 173 }, { 3, 201 }, { 65, 201 },
    				{ 127, 201 }, { 3, 229 } };
    		int[][] iconCoords = { { 5, 7 }, { 68, 8 }, { 130, 7 }, { 8, 35 },
    				{ 67, 34 }, { 130, 37 }, { 8, 65 }, { 66, 64 }, { 130, 62 },
    				{ 6, 92 }, { 67, 97 }, { 132, 91 }, { 5, 119 }, { 69, 121 },
    				{ 129, 119 }, { 5, 148 }, { 68, 147 }, { 131, 147 },
    				{ 5, 174 }, { 68, 174 }, { 129, 175 }, { 5, 203 }, { 68, 202 },
    				{ 130, 203 }, { 5, 231 } };
    		int[][] textCoords = { { 29, 7, 44, 19 }, { 91, 7, 106, 19 },
    				{ 153, 7, 168, 19 }, { 29, 35, 44, 47 }, { 91, 35, 106, 47 },
    				{ 153, 35, 168, 47 }, { 29, 63, 44, 75 }, { 91, 63, 106, 75 },
    				{ 153, 63, 168, 75 }, { 29, 91, 44, 103 },
    				{ 91, 91, 106, 103 }, { 153, 91, 168, 103 },
    				{ 29, 119, 44, 131 }, { 91, 119, 106, 131 },
    				{ 153, 119, 168, 131 }, { 29, 147, 44, 159 },
    				{ 91, 147, 106, 159 }, { 153, 147, 168, 159 },
    				{ 29, 175, 44, 187 }, { 91, 175, 106, 187 },
    				{ 153, 175, 168, 187 }, { 29, 203, 44, 215 },
    				{ 91, 203, 106, 215 }, { 153, 203, 168, 215 },
    				{ 29, 231, 44, 243 } };
    		int[][] newText = { { 28165, 28166, 28167, 28168 },
    				{ 28169, 28170, 28171, 28172 } };
    		int frame = 0;
    		for (int i = 0; i < hovers.length; i++) {
    			addSkillButton(buttons[i], Skills.SKILL_NAMES[i]);
    			createSkillHover(hovers[i], 205 + i);
    			addSprite(icons[i], Client.cacheSprite[197 + i]);
    		}
    		for (int i = 0; i < 4; i++) {
    			addSkillText(newText[0][i], false, i + 21);
    			addSkillText(newText[1][i], true, i + 21);
    		}
    		skill.children(icons.length + (text.length * 2) + hovers.length + buttons.length + 1);
    		
    		RSInterface totalLevel = interfaceCache[3984];
    		totalLevel.message = "Total level: %1";
    		totalLevel.textDrawingAreas = fonts[2];
    		skill.child(frame, 3984, 96, 237); 
    		frame++;
    		for (int i = 0; i < buttons.length; i++) {
    			skill.child(frame, buttons[i], buttonCoords[i][0], buttonCoords[i][1]); frame++;
    		}
    		for (int i = 0; i < icons.length; i++) {
    			skill.child(frame, icons[i], iconCoords[i][0], iconCoords[i][1]); frame++;
    		}
    		for (int i = 0; i < text.length; i++) {
    			skill.child(frame, text[i][0], textCoords[i][0], textCoords[i][1]); frame++;
    		}
    		for (int i = 0; i < text.length; i++) {
    			skill.child(frame, text[i][1], textCoords[i][2], textCoords[i][3]); frame++;
    		}
    		for (int i = 0; i < hovers.length; i++) {
    			skill.child(frame, hovers[i], buttonCoords[i][0], buttonCoords[i][1]); frame++;
    		}
    		
    	}


    Code:
    public static void addSkillButton(int id, String skillGuide) {
    		RSInterface button = addTabInterface(id);
    		button.type = 5;
    		button.atActionType = 5;
    		button.contentType = 0;
    		button.width = 60;
    		button.height = 28;
    		button.sprite1 = Client.cacheSprite[186];
    		button.tooltip = "@[email protected] @[email protected]" + skillGuide + " @[email protected]";
    	}

    Code:
    private static void addSprite(int id, Sprite sprite)
    	{
    		RSInterface component = interfaceCache[id] = new RSInterface();
    		component.id = id;
    		component.parentID = id;
    		component.type = 5;
    		component.atActionType = 0;
    		component.contentType = 0;
    		component.aByte254 = (byte) 0;
    		component.hoverType = 52;
    		component.sprite1 = sprite;
    		component.sprite2 = sprite;
    		component.width = 512;
    		component.height = 334;
    	}

    Code:
    public static void addSkillButton(int id, String skillGuide) {
    		RSInterface button = addTabInterface(id);
    		button.type = 5;
    		button.atActionType = 5;
    		button.contentType = 0;
    		button.width = 60;
    		button.height = 28;
    		button.sprite1 = Client.cacheSprite[186];
    		button.tooltip = "@[email protected] @[email protected]" + skillGuide + " @[email protected]";
    	}
    Code:
    public static void createSkillHover(int id, int x) {
    		RSInterface hover = addTabInterface(id);
    		hover.inventoryHover = true;
    		hover.type = 8;
    		hover.message = "Attack: 1/1";
    		hover.contentType = x;
    		hover.width = 60;
    		hover.height = 28;
    	}
    Code:
    public static void addSkillText(int id, boolean max, int skill) {
    	RSInterface text = addTabInterface(id);
    	text.id = id;
    	text.parentID = id;
    	text.type = 4;
    	text.atActionType = 0;
    	text.width = 15;
    	text.height = 12;
    	text.textDrawingAreas = fonts[0];
    	text.textShadow = true;
    	text.centerText = true;
    	text.textColor = 16776960;
    	if (!max) {
    		text.valueIndexArray = new int[1][];
    		text.valueIndexArray[0] = new int[3];
    		text.valueIndexArray[0][0] = 1;
    		text.valueIndexArray[0][1] = skill;
    		text.valueIndexArray[0][2] = 0;
    	} else {
    		text.valueIndexArray = new int[2][];
    		text.valueIndexArray[0] = new int[3];
    		text.valueIndexArray[0][0] = 1;
    		text.valueIndexArray[0][1] = skill;
    		text.valueIndexArray[0][2] = 0;
    		text.valueIndexArray[1] = new int[1];
    		text.valueIndexArray[1][0] = 0;
    	}
    	text.message = "%1";
    }


    Yes I did pack the images in my cache.

    Spoiler for Picture:






    Code:
    java.lang.NullPointerException
    	at RSInterface.addSkillText(RSInterface.java:608)
    	at RSInterface.skillTab(RSInterface.java:473)
    	at RSInterface.unpack(RSInterface.java:217)
    	at Client.startUp(Client.java:19307)
    	at RSApplet.run(RSApplet.java:98)
    	at Client.run(Client.java:14460)
    	at java.lang.Thread.run(Unknown Source)
    Code:
    line 608: text.textDrawingAreas = fonts[0];


    Edit: Fixed, changed to

    text.textDrawingAreas = textDrawingAreas;
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Aug 2012
    Posts
    3,161
    Thanks given
    2,843
    Thanks received
    855
    Rep Power
    2235
    Bump
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Aug 2012
    Posts
    3,161
    Thanks given
    2,843
    Thanks received
    855
    Rep Power
    2235
    Bump
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Aug 2012
    Posts
    3,161
    Thanks given
    2,843
    Thanks received
    855
    Rep Power
    2235
    Bump
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Aug 2012
    Posts
    3,161
    Thanks given
    2,843
    Thanks received
    855
    Rep Power
    2235
    Fixed
    Reply With Quote  
     

  6. #6  
    Registered Member

    Join Date
    Aug 2012
    Posts
    3,161
    Thanks given
    2,843
    Thanks received
    855
    Rep Power
    2235
    Still can't get this shit working
    Reply With Quote  
     

  7. #7  
    Registered Member
    Bubletan's Avatar
    Join Date
    May 2011
    Posts
    593
    Thanks given
    133
    Thanks received
    282
    Rep Power
    320
    Print the stack trace of the actual exception, might help more than just an unknown loading error.
    - Playing RS almost 24/7?

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

  8. #8  
    Registered Member

    Join Date
    Aug 2012
    Posts
    3,161
    Thanks given
    2,843
    Thanks received
    855
    Rep Power
    2235
    Quote Originally Posted by Bubletan View Post
    Print the stack trace of the actual exception, might help more than just an unknown loading error.
    Will when I get home. However I do remember it pointing to the addSkillText method though I forgot exactly where
    Reply With Quote  
     

  9. #9  
    Registered Member

    Join Date
    Aug 2012
    Posts
    3,161
    Thanks given
    2,843
    Thanks received
    855
    Rep Power
    2235
    Fixed
    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. [PI/DSPK] New 602 Skill tab
    By Eyfia in forum Snippets
    Replies: 113
    Last Post: 03-12-2014, 05:17 AM
  2. [Renamed] Stewie's 602+ skill tab.[BS]
    By Coder Alex in forum Snippets
    Replies: 16
    Last Post: 11-21-2012, 11:59 PM
  3. 602 skill interface Issue hellp
    By Mr House in forum Help
    Replies: 8
    Last Post: 10-11-2011, 01:45 AM
  4. [Help] "[PI/DSPK] New 602 Skill tab"
    By SocialClub in forum Help
    Replies: 10
    Last Post: 07-29-2011, 04:40 PM
  5. [PI/DSPK] New 602 Skill tab
    By Eyfia in forum Show-off
    Replies: 29
    Last Post: 07-22-2011, 11:18 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
  •