Thread: [Necrotic/Ruse] Adding raw fish sprites to fishing spots like RuneLite

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 [Necrotic/Ruse] Adding raw fish sprites to fishing spots like RuneLite 
    Registered Member Hyperion.'s Avatar
    Join Date
    Jun 2018
    Posts
    124
    Thanks given
    0
    Thanks received
    28
    Rep Power
    26
    Tested source: Nectrotic (Ruse)

    Resources needed:
    Sprite images: https://dl.dropbox.com/s/mt1vton896pt5m3/sprites.rar
    Sprite Packer: https://dl.dropbox.com/s/frxbdg848dk...ker%201.44.jar

    What you are adding:
    Attached image

    Client Side:
    Code:
    package org.necrotic.client;
    Find:

    Code:
    private void updateEntities() {
    In the updateEntities() method find and replace:

    Code:
    				if (obj instanceof NPC) {
    					MobDefinition entityDef = ((NPC) obj).definitionOverride;
    					if (entityDef.childrenIDs != null) {
    						entityDef = entityDef.method161();
    					}
    					if (entityDef == null) {
    						continue;
    					}
    				}
    With:

    Code:
    				if (obj instanceof NPC) {
    					MobDefinition entityDef = ((NPC) obj).definitionOverride;
    					npcScreenPos((Entity) obj, ((Entity) obj).height + 15);
    						if (spriteDrawX > -1) {
    							
    							//draw sprites on npc
    							if (entityDef.id == 316) {
    								cacheSprite[1226].drawSprite(spriteDrawX - 12, spriteDrawY - 30);
    							}
    							
    							if (entityDef.id == 312) {
    								cacheSprite[1227].drawSprite(spriteDrawX - 12, spriteDrawY - 30);
    							}
    							
    							if (entityDef.id == 313) {
    								cacheSprite[1229].drawSprite(spriteDrawX - 12, spriteDrawY - 30);
    							}
    							
    							if (entityDef.id == 318) {
    								cacheSprite[1228].drawSprite(spriteDrawX - 12, spriteDrawY - 30);
    							}
    							
    							//rock tail are objects
    						}
    					
    					if (entityDef.childrenIDs != null) {
    						entityDef = entityDef.method161();
    					}
    					if (entityDef == null) {
    						continue;
    					}
    				}
    Credits:
    Whoever released the Sprite Packer (found a download link in a comment on these forums ages ago)
    Me for the snippet
    Attached image
    Online

    PM me for Discord link
    Attached image
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Registered Member

    Join Date
    Feb 2013
    Posts
    1,682
    Thanks given
    401
    Thanks received
    402
    Rep Power
    446
    Pretty cool feature to have, but instead of using extra sprites loaded from the packed files, you could've used the actual item sprite.

    Thanks for the release.
    Reply With Quote  
     

  4. #3  
    Skotos Founder


    Join Date
    Jan 2017
    Age
    24
    Posts
    954
    Thanks given
    178
    Thanks received
    191
    Rep Power
    199
    Would this work on lost-isle?
    Attached image
    Reply With Quote  
     

  5. #4  
    Registered Member Hyperion.'s Avatar
    Join Date
    Jun 2018
    Posts
    124
    Thanks given
    0
    Thanks received
    28
    Rep Power
    26
    Quote Originally Posted by Delinquent View Post
    Pretty cool feature to have, but instead of using extra sprites loaded from the packed files, you could've used the actual item sprite.

    Thanks for the release.
    This is true, but I didn't know how. I was following the format that was already in the source.

    Quote Originally Posted by Mantvis View Post
    Would this work on lost-isle?
    Of course, it will work with any base you just got to know which methods are the ones to use in your source.
    Attached image
    Online

    PM me for Discord link
    Attached image
    Reply With Quote  
     

  6. #5  
    Registered Member
    Join Date
    Jul 2015
    Posts
    451
    Thanks given
    15
    Thanks received
    58
    Rep Power
    55
    Pre cool release gj
    Reply With Quote  
     

  7. #6  
    Registered Member
    Join Date
    Apr 2017
    Posts
    301
    Thanks given
    34
    Thanks received
    59
    Rep Power
    65
    Don't really need to pack sprites for this instance. But thanks for this.
    Reply With Quote  
     

  8. #7  
    Registered Member Hyperion.'s Avatar
    Join Date
    Jun 2018
    Posts
    124
    Thanks given
    0
    Thanks received
    28
    Rep Power
    26
    Quote Originally Posted by VenomRS View Post
    Don't really need to pack sprites for this instance. But thanks for this.
    Yeah, I don't know how to access the packed sprites. Never looked into it.
    Attached image
    Online

    PM me for Discord link
    Attached image
    Reply With Quote  
     

  9. #8  
    Extreme Donator


    Join Date
    Aug 2016
    Posts
    597
    Thanks given
    109
    Thanks received
    96
    Rep Power
    254
    Quote Originally Posted by Hyperion. View Post
    Yeah, I don't know how to access the packed sprites. Never looked into it.
    You could do something like this

    Code:
    Sprite sprite = ItemDefinition.getSprite(317, 1, 0);
    sprite.drawSprite(spriteDrawX - 12, spriteDrawY - 30);
    317 being the item id of the sprite you want to take
    Reply With Quote  
     

  10. #9  
    Registered Member Hyperion.'s Avatar
    Join Date
    Jun 2018
    Posts
    124
    Thanks given
    0
    Thanks received
    28
    Rep Power
    26
    Quote Originally Posted by Goody View Post
    You could do something like this

    Code:
    Sprite sprite = ItemDefinition.getSprite(317, 1, 0);
    sprite.drawSprite(spriteDrawX - 12, spriteDrawY - 30);
    317 being the item id of the sprite you want to take
    Thanks for the tip. I will look at that later when I continue my development.
    Attached image
    Online

    PM me for Discord link
    Attached image
    Reply With Quote  
     

  11. #10  
    Extreme Donator


    Join Date
    Aug 2016
    Posts
    597
    Thanks given
    109
    Thanks received
    96
    Rep Power
    254
    It worked out pretty well for me and then I just changed the rocktail spot to an npc
    Attached image
    Reply With Quote  
     

Page 1 of 2 12 LastLast

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: 49
    Last Post: 08-29-2014, 03:51 PM
  2. Adding hasBarbtail to fishing 718
    By Ozora in forum Help
    Replies: 2
    Last Post: 01-15-2014, 03:44 PM
  3. Replies: 2
    Last Post: 12-08-2009, 07:59 PM
  4. Replies: 1
    Last Post: 06-06-2009, 11:59 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
  •