Thread: Adding new slots to the equipment tab

Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13
  1. #11  
    Registered Member
    Join Date
    Jul 2021
    Posts
    1
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    @Omar @Rebecca

    Code:
    // Add these to your interface class
        public static RSInterface createSprite(final int parentIndex, final int index, final String disabled, final String enabled) {
            final Sprite disabledSprite = Sprite.fetchSprite(disabled);
            final Sprite enabledSprite = Sprite.fetchSprite(enabled);
            final RSInterface sprite = instances[index] = new RSInterface();
            sprite.id = index;
            sprite.parent = parentIndex;
            sprite.type = 5;
            sprite.width = disabledSprite.width;
            sprite.height = disabledSprite.height;
            sprite.disabledSprite = disabledSprite;
            sprite.enabledSprite = enabledSprite;
            return sprite;
        }
    I dont have a "Sprite.fetchSprite" or any method with just 1 param in Sprite.
    Reply With Quote  
     

  2. #12  






    Omar's Avatar
    Join Date
    Dec 2007
    Posts
    256
    Thanks given
    532
    Thanks received
    686
    Discord
    View profile
    Rep Power
    5000
    Quote Originally Posted by kippie View Post
    @Omar @Rebecca

    Code:
    // Add these to your interface class
        public static RSInterface createSprite(final int parentIndex, final int index, final String disabled, final String enabled) {
            final Sprite disabledSprite = Sprite.fetchSprite(disabled);
            final Sprite enabledSprite = Sprite.fetchSprite(enabled);
            final RSInterface sprite = instances[index] = new RSInterface();
            sprite.id = index;
            sprite.parent = parentIndex;
            sprite.type = 5;
            sprite.width = disabledSprite.width;
            sprite.height = disabledSprite.height;
            sprite.disabledSprite = disabledSprite;
            sprite.enabledSprite = enabledSprite;
            return sprite;
        }
    I dont have a "Sprite.fetchSprite" or any method with just 1 param in Sprite.
    I believe that was just a wrapper for this method:

    getImage()

    Code:
        public static Image24 getImage(int id, FileArchive media, String name) {
            long uid = (StringUtil.hashCode(name) << 8) + (long) id;
            Image24 image = imageCache.get(uid);
            if (image != null) {
                return image;
            }
            try {
                image = new Image24(media, name, id);
                imageCache.put(uid, image);
            } catch (Exception _ex) {
                return null;
            }
            return image;
        }
    
        public static Image24 getImage(final String image, final FileArchive media) {
            final int index = image.lastIndexOf(",");
            return getImage(Integer.parseInt(image.substring(index + 1)), media, image.substring(0, index));
        }
    
        public static Image24 getImage(final String image) {
            return getImage(image, Component.media);
        }
    With "Component.media" being the media archive passed in the interface decoder: unpack()

    Many clients are modified to just store a reference to that somewhere:



    Spoiler for aaaa:



    Reply With Quote  
     

  3. #13  
    Registered Member
    CABLE's Avatar
    Join Date
    Mar 2015
    Age
    29
    Posts
    1,249
    Thanks given
    191
    Thanks received
    297
    Discord
    View profile
    Rep Power
    694
    im having trouble adding this to my 718 server, i manage to make new slot (i copy the aura slot) but and it works fine but when i activate my aura my wings slot disappear
    Reply With Quote  
     

Page 2 of 2 FirstFirst 12

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. IPB Adding new groups to the online list
    By Grey59 in forum Application Development
    Replies: 13
    Last Post: 07-20-2016, 09:29 AM
  2. Adding teleports on to the quest tab?
    By Haashim in forum Help
    Replies: 1
    Last Post: 05-04-2013, 11:48 AM
  3. Adding new maps to the clipping system?
    By RebornHonor in forum Help
    Replies: 3
    Last Post: 08-20-2012, 07:24 PM
  4. Adding new chars to the server (hard)
    By Shoes in forum Help
    Replies: 6
    Last Post: 05-30-2010, 09:00 PM
  5. Adding new maps to the Worldmap!
    By SWAT in forum Tutorials
    Replies: 27
    Last Post: 02-03-2010, 07:46 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
  •