Thread: [REL]OSRS & 667+ Object offset fix

Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1 [REL]OSRS & 667+ Object offset fix 
    Banned

    Join Date
    Sep 2018
    Posts
    65
    Thanks given
    27
    Thanks received
    46
    Rep Power
    0
    Today I will be showing you how to fix the object offset bug in some map areas. This includes raids maps, roof top agility and the dungeoneering map entrance

    Edited classes:
    ObjectManager

    1. Go into your ObjectManager and search for method175. Once at that method, you want to rename the following
    int i --> int regionY
    int k --> plane
    int l --> regionX
    aByteArrayArrayArray149 --> tileSettings
    anIntArrayArrayArray129 --> tileHeights
    anInt145 --> highestPlane
    int k1 --> int a_y
    int l1 --> int b_y
    int i2 --> int d_y
    int j2 --> int c_y


    the start of your method should now look like:
    Code:
      if(plane < highestPlane)
                highestPlane = plane;
            int a_y = tileHeights[plane][regionX][regionY];
            int b_y = tileHeights[plane][regionX + 1][regionY];
            int d_y = tileHeights[plane][regionX + 1][regionY + 1];
            int c_y = tileHeights[plane][regionX][regionY + 1];
            int k2 = a_y + b_y + d_y + c_y >> 2;
            ObjectDef class46 = ObjectDef.forID(i1);
            int l2 = regionX + (regionY << 7) + ((i1 > 0x7fff ? i1 & 0x7fff : i1) << 14) + 0x40000000;
            if(!class46.hasActions)
                l2 += 0x80000000;
            byte byte0 = (byte)((j1 << 6) + j);
    2. Under:
    Code:
    if(plane < anInt145)
                anInt145 = plane;
    Add:
    Code:
    ObjectDef class46 = ObjectDef.forID(i1);
    		int size1;
    		int size2;
    		if (j1 == 1 || j1 == 3) {
    			size1 = class46.anInt761;//objectSizeY
    			size2 = class46.anInt744;//objectSizeX
    		} else {
    			size1 = class46.anInt744;
    			size2 = class46.anInt761;
    		}
    		int modX;
    		int modX1;
    		if (104 >= (size1 + regionX)) {
    			modX1 = regionX + (size1 + 1 >> 1);
    			modX = regionX + (size1 >> 1);
    		} else {
    			modX = regionX;
    			modX1 = regionX + 1;
    		}
    		int modY;
    		int modY1;
    		if (104>= (size2 + regionY)) {
    			modY1 = regionY + (size2 + 1 >> 1);
    			modY = (size2 >> 1) + regionY;
    		} else {
    			modY = regionY;
    			modY1 = 1 + regionY;
    		}
    3.Under:
    Code:
     int k2 = a_y + b_y + d_y + c_y >> 2;
    Remove the duplicate variable:
    Code:
    ObjectDef class46 = ObjectDef.forID(i1);
    4. Replace the following:
    Code:
     int a_y = tileHeights[plane][regionX][regionY];
            int b_y = tileHeights[plane][regionX + 1][regionY];
            int d_y = tileHeights[plane][regionX + 1][regionY + 1];
            int c_y = tileHeights[plane][regionX][regionY + 1];
    with:
    Code:
    	int a_y = tileHeights[plane][modX][modY];
    			int b_y = tileHeights[plane][modX1][modY];
    			int d_y = tileHeights[plane][modX1][modY1];
    			int c_y = tileHeights[plane][modX][modY1];
    Osrs Before/After images:
    Attached image
    Attached image

    667 Before/After:
    Attached image
    Attached image

    Credits:
    RedSixtySeven
    Greg
    Reply With Quote  
     


  2. #2  
    2021
    SoulSplit's Avatar
    Join Date
    Nov 2011
    Posts
    830
    Thanks given
    620
    Thanks received
    654
    Rep Power
    528
    nice
    Reply With Quote  
     

  3. #3  
    Community Veteran

    mige5's Avatar
    Join Date
    Aug 2008
    Posts
    5,528
    Thanks given
    573
    Thanks received
    1,410
    Rep Power
    2114
    Nice job

    U know if this can be added even if u have just 317 maps? (or could there possibly be bugs?) - Just incase I update the maps in the future so its already patched.
    Number of page #1 releases with most views & posts: (Updated: 2023)
    RS2 server section: 1
    RS2 client section: 2
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Dec 2018
    Posts
    30
    Thanks given
    21
    Thanks received
    2
    Rep Power
    4
    Hey man thanks for this, possible you could add my discord i have a few questions

    [ENDURANCE] Adam#6391
    Reply With Quote  
     

  5. #5  
    Banned

    Join Date
    Sep 2018
    Posts
    65
    Thanks given
    27
    Thanks received
    46
    Rep Power
    0
    Quote Originally Posted by mige5 View Post
    Nice job

    U know if this can be added even if u have just 317 maps? (or could there possibly be bugs?) - Just incase I update the maps in the future so its already patched.
    As far as I’m aware, you should be fine
    Reply With Quote  
     

  6. Thankful user:


  7. #6  
    Registered Member Stevenhax's Avatar
    Join Date
    Jul 2014
    Posts
    387
    Thanks given
    55
    Thanks received
    64
    Rep Power
    42
    Well done ripping this from Frontier and not giving credits
    releasing something that you shouldn't have in the first place.
    Credits belong to Greg.
    Reply With Quote  
     

  8. #7  
    Rune-Server Affiliate

    Join Date
    Apr 2014
    Posts
    1,761
    Thanks given
    75
    Thanks received
    714
    Rep Power
    1073
    Quote Originally Posted by Stevenhax View Post
    Well done ripping this from Frontier and not giving credits
    releasing something that you shouldn't have in the first place.
    Credits belong to Greg.
    It's also available in any OSRS deob
    Reply With Quote  
     

  9. Thankful users:


  10. #8  
    Renown Programmer
    Greg's Avatar
    Join Date
    Jun 2010
    Posts
    1,179
    Thanks given
    260
    Thanks received
    1,012
    Rep Power
    2003
    Quote Originally Posted by Zion View Post
    It's also available in any OSRS deob
    Or any 500+


    Quote Originally Posted by Guardian_ View Post
    Code:
      if(plane < highestPlane)
                highestPlane = plane;
            int a_y = tileHeights[plane][regionX][regionY];
            int b_y = tileHeights[plane][regionX + 1][regionY];
            int d_y = tileHeights[plane][regionX + 1][regionY + 1];
            int c_y = tileHeights[plane][regionX][regionY + 1];
            int k2 = a_y + b_y + d_y + c_y >> 2;
            ObjectDef class46 = ObjectDef.forID(i1);
            int l2 = regionX + (regionY << 7) + ((i1 > 0x7fff ? i1 & 0x7fff : i1) << 14) + 0x40000000;
            if(!class46.hasActions)
                l2 += 0x80000000;
            byte byte0 = (byte)((j1 << 6) + j);
    Fully refactored is

    Code:
    boolean flag = rotation == 1 || rotation == 3;
            int sizeY = flag ? definition.sizeY : definition.sizeX;
            int sizeX = flag ? definition.sizeX : definition.sizeY;
    
            flag = this.width >= sizeY + regionX;
            int modX = flag ? regionX + (sizeY >> 1) : regionX;
            int modX1 = flag ? regionX + (sizeY + 1 >> 1) : regionX + 1;
    
            flag = this.length >= sizeX + regionY;
            int modY = flag ? (sizeX >> 1) + regionY : regionY;
            int modY1 = flag ? regionY + (sizeX + 1 >> 1) : regionY + 1;
    
            int centre = tileHeights[z][modX][modY];
            int east = tileHeights[z][modX1][modY];
            int northEast = tileHeights[z][modX1][modY1];
            int north = tileHeights[z][modX][modY1];
            int mean = centre + east + northEast + north >> 2;
            long key = (long) (rotation << 20 | (type << 14 | (regionY << 7 | regionX)) | 0x40000000);
    
            if (!definition.isInteractive())
                key |= ~0x7fffffffffffffffL;
    
            if (definition.supportItems == 1)
                key |= 0x400000L;
    
            key |= (long) id << 32;
    Attached imageAttached image
    Reply With Quote  
     

  11. Thankful users:


  12. #9  
    'Slutty McFur'

    Owain's Avatar
    Join Date
    Sep 2014
    Age
    26
    Posts
    2,894
    Thanks given
    2,360
    Thanks received
    2,200
    Rep Power
    5000
    Thanks for this.


    Spoiler for wat:
    Attached image
    Attached image

    Attached image


    Reply With Quote  
     

  13. #10  
    Donator

    .css's Avatar
    Join Date
    Dec 2018
    Age
    29
    Posts
    579
    Thanks given
    89
    Thanks received
    270
    Rep Power
    351
    Does this fix 667 trees? I know there's a few issues with 667 map data, would be nice to clean that up imo
    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: 17
    Last Post: 06-02-2022, 04:18 PM
  2. 667 Object editing (Fixed)
    By Skrew in forum Help
    Replies: 9
    Last Post: 10-19-2017, 07:32 PM
  3. 667 object fixes
    By DragonSmith in forum Help
    Replies: 3
    Last Post: 11-21-2016, 01:42 AM
  4. [667] ground objects/items [fixed my self]
    By Little Helper in forum Help
    Replies: 1
    Last Post: 07-11-2012, 12:22 AM
  5. RichScape Object Clicking Fix
    By Auruo in forum Tutorials
    Replies: 11
    Last Post: 06-24-2009, 03:16 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •