Thread: [Elvarg] Updating SideIcons for your Client!

Results 1 to 5 of 5
  1. #1 [Elvarg] Updating SideIcons for your Client! 
    Donator

    Join Date
    Feb 2018
    Posts
    66
    Thanks given
    29
    Thanks received
    10
    Rep Power
    60
    This could be extended but I am just adjusting the SpriteIDs

    Go into your client and find
    Code:
    			for (int j3 = 0; j3 <= 14; j3++) 
    			 sideIcons[j3] = new Sprite(mediaArchive, "sideicons", j3);
    *This code reads the sideicons.dat (in the cache in the 2dgraphics data) to declare the sideIcon sprites, since we want our own we will add a different way*

    Comment that code out, or just replace it with this

    Code:
    			for (int i = 0; i < 14; i++) 
    				sideIcons[i] = cacheSprite[SideIcon.getIcon(i).getSpriteId()];
    Create a new enumeration in your client called SideIcon

    Code:
    public enum SideIcon {
    
    	COMBAT(431),
    	STATS(432),
    	QUEST(674),//433
    	INVENTORY(434),
    	EQUIPMENT(435),
    	PRAYER(436),
    	SPELLBOOK(437),
    	CLAN(438),
    	FRIENDS(439),
    	IGNORE(440),
    	LOGOUT(441),
    	SETTINGS(442),
    	EMOTES(443),
    	MISC(444);
    	
    	private int spriteId;
    	
    	SideIcon(int spriteID) {
    		this.setSpriteId(spriteID);
    	}
    	
    	public static SideIcon getIcon(int index) {
    		return values()[index];
    	}
    
    	public int getSpriteId() {
    		return spriteId;
    	}
    
    	public void setSpriteId(int spriteId) {
    		this.spriteId = spriteId;
    	}
    }
    I have this command for testing

    Code:
    						if (inputString.equals("::testquest")) {
    							if (teststuff == true) {
    								teststuff = false;
    								sideIcons[SideIcon.QUEST.ordinal()] = SpriteLoader.sprites[675];
    								sideIcons[SideIcon.SPELLBOOK.ordinal()] = SpriteLoader.sprites[679];
    								
    							} else {
    								teststuff = true;
    								sideIcons[SideIcon.QUEST.ordinal()] = SpriteLoader.sprites[676];
    								sideIcons[SideIcon.SPELLBOOK.ordinal()] = SpriteLoader.sprites[680];
    							}
    							drawSideIcons();
    						}
    This doesn't adjust the X/Y of the sprite, that's hard coded in the Client and it would take some time to adjust the offsets for whichever game view you have (resizable, ect)
    All this does is update the spriteID, and if the Sprite is properly setup it should work without much issue of needing to update the x/y of the sprite

    When you did it all, the result is this...

    Attached image
    Attached image

    I just wanted to give you guys something this sunday! I hope to release actual tutorials soon! IF you guys have any suggestions for a tutorial, let me know!

    - Strict
    Last edited by Strict; 09-03-2018 at 04:16 AM.
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Jul 2018
    Posts
    121
    Thanks given
    82
    Thanks received
    55
    Rep Power
    0
    Quote Originally Posted by Strict View Post
    [/QUOTE=Strict;5569566]
    Should help people this is what I've been doing for illerai apart from the magic tabs and that I've been doing this instead of sending a packet.

    Code:
    public enum MagicSideIcons {
    		
    		STANDARD(20000,668,1272),
    		ANCIENT(21000,671,1292),
    		LUNAR(22000,670,1293),
    		ARCUUS(23000,669,1294),
    		CUSTOM(24000,672,1295);
    		
    		private final int id;
    		private final int spriteId;
    		private final int spriteId317;
    		
    		MagicSideIcons(int id, int spriteId, int spriteId317) {
    			this.id = (id);
    			this.spriteId = (spriteId);
    			this.spriteId317 = (spriteId317);
    		}
    		
    		public int getId() {
    			return id;
    		}
    		
    		public int getSpriteId() {
    			return spriteId;
    		}
    		
    		public int getSpriteId317() {
    			return spriteId317;
    		}
    		
    		public static SideIcons forId(int id) {
    			for (SideIcons interfaceid : SideIcons.values()) {
    				if (interfaceid.getId() == id) {
    					return interfaceid;
    				} else {
    					return STANDARD;
    				}
    			}
    			return null;
    		}
    		
    	}
    So i have a enum for the diffrent types of magic book items and the first pram is the interface id and then in the sidebar enum where you have the magic book you would add this were the sprite id is

    Code:
    MagicBooks.SideIcons.forId(Client.tabInterfaceIDs[7]).getSpriteId317()
    Saves you from sending a packet
    Reply With Quote  
     

  3. #3  
    Respected Member


    Kris's Avatar
    Join Date
    Jun 2016
    Age
    26
    Posts
    3,638
    Thanks given
    820
    Thanks received
    2,642
    Rep Power
    5000
    Quote Originally Posted by Zac343 View Post
    Should help people this is what I've been doing for illerai apart from the magic tabs and that I've been doing this instead of sending a packet.

    Code:
    public enum MagicSideIcons {
    		
    		STANDARD(20000,668,1272),
    		ANCIENT(21000,671,1292),
    		LUNAR(22000,670,1293),
    		ARCUUS(23000,669,1294),
    		CUSTOM(24000,672,1295);
    		
    		private final int id;
    		private final int spriteId;
    		private final int spriteId317;
    		
    		MagicSideIcons(int id, int spriteId, int spriteId317) {
    			this.id = (id);
    			this.spriteId = (spriteId);
    			this.spriteId317 = (spriteId317);
    		}
    		
    		public int getId() {
    			return id;
    		}
    		
    		public int getSpriteId() {
    			return spriteId;
    		}
    		
    		public int getSpriteId317() {
    			return spriteId317;
    		}
    		
    		public static SideIcons forId(int id) {
    			for (SideIcons interfaceid : SideIcons.values()) {
    				if (interfaceid.getId() == id) {
    					return interfaceid;
    				} else {
    					return STANDARD;
    				}
    			}
    			return null;
    		}
    		
    	}
    So i have a enum for the diffrent types of magic book items and the first pram is the interface id and then in the sidebar enum where you have the magic book you would add this were the sprite id is

    Code:
    MagicBooks.SideIcons.forId(Client.tabInterfaceIDs[7]).getSpriteId317()
    Saves you from sending a packet
    Lol whats the point of the loop if you're not allowing it to go past the very first value?
    Attached image
    Reply With Quote  
     

  4. Thankful users:


  5. #4  
    Banned

    Join Date
    Jul 2018
    Posts
    121
    Thanks given
    82
    Thanks received
    55
    Rep Power
    0
    Quote Originally Posted by Kris View Post
    Lol whats the point of the loop if you're not allowing it to go past the very first value?
    You make a very good point lol but ye lol
    Reply With Quote  
     

  6. Thankful user:


  7. #5  
    Donator

    Join Date
    Feb 2018
    Posts
    66
    Thanks given
    29
    Thanks received
    10
    Rep Power
    60
    Quote Originally Posted by Zac343 View Post
    You make a very good point lol but ye lol
    Thanks for that, I understand your idea and I think I will make something with that.

    Much appreciated

    - Strict
    Reply With Quote  
     

  8. Thankful user:

    Zac


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. Replies: 1
    Last Post: 04-06-2014, 04:41 AM
  2. Replies: 19
    Last Post: 10-12-2009, 03:50 AM
  3. Defboy, Iso your Cache editor for 500+ clients.
    By salenabaxter in forum Requests
    Replies: 0
    Last Post: 12-05-2008, 12:38 AM
  4. Replies: 24
    Last Post: 09-18-2008, 12:25 AM
  5. Background Images For Your Client
    By Vegeta in forum Graphics
    Replies: 2
    Last Post: 04-13-2008, 10:41 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
  •