Thread: Construct map region packet aka 'secondary map region packet'

Page 2 of 10 FirstFirst 1234 ... LastLast
Results 11 to 20 of 96
  1. #11  
    Ex RSPS-cleaner

    SWAT's Avatar
    Join Date
    Aug 2007
    Age
    30
    Posts
    5,484
    Thanks given
    403
    Thanks received
    599
    Rep Power
    3609
    ok, also for like fightcaves or? and other private area's?
    Reply With Quote  
     

  2. #12  
    Programmer, Contributor, RM and Veteran




    Join Date
    Mar 2007
    Posts
    5,147
    Thanks given
    2,656
    Thanks received
    3,731
    Rep Power
    5000
    Quote Originally Posted by SWAT View Post
    ok, also for like fightcaves or? and other private area's?
    Might be not sure, I haven't played the real RS in years so wouldn't know.
    .
    Reply With Quote  
     

  3. #13  
     

    Vastiko's Avatar
    Join Date
    Dec 2006
    Posts
    5,700
    Thanks given
    300
    Thanks received
    663
    Rep Power
    5000
    Quote Originally Posted by SWAT View Post
    ok, also for like fightcaves or? and other private area's?
    Fight caves yes

    Very nice Graham!
    Reply With Quote  
     

  4. #14  
    Hi.

    'Mystic Flow's Avatar
    Join Date
    Nov 2007
    Posts
    7,146
    Thanks given
    256
    Thanks received
    1,252
    Rep Power
    3714
    Good job Graham



    Reply With Quote  
     

  5. #15  
    Brown
    Guest
    Quote Originally Posted by Graham View Post
    @Brown: you can use this to help you:

    Code:
    	/**
    	 * Sends the packet to construct a map region.
    	 * @param palette The palette of map regions, int[13][13] array.
    	 * @return The action sender instance, for chaining.
    	 */
    	public ActionSender sendConstructMapRegion(int[][] palette) {
    		player.setLastKnownRegion(player.getLocation());
    
    		PacketBuilder bldr = new PacketBuilder(241, Type.VARIABLE_SHORT);
    		bldr.putShortA(player.getLocation().getRegionY() + 6);
    		bldr.startBitAccess();
    		for(int z = 0; z < 4; z++) {
    			for(int x = 0; x < 13; x++) {
    				for(int y = 0; y < 13; y++) {
    					boolean flag = z == player.getLocation().getZ();
    					bldr.putBits(1, flag ? 1 : 0);
    					if(flag) {
    						bldr.putBits(26, palette[x][y] << 14 | palette[x][y] << 3);
    					}
    				}
    			}
    		}
    		bldr.finishBitAccess();
    		bldr.putShort(player.getLocation().getRegionX() + 6);
    		player.getSession().write(bldr.toPacket());
    		return this;
    	}


    Player owned houses.
    Oh, thanks alot! I'll give it a try later today, (:
    Reply With Quote  
     

  6. #16  
    Programmer, Contributor, RM and Veteran




    Join Date
    Mar 2007
    Posts
    5,147
    Thanks given
    2,656
    Thanks received
    3,731
    Rep Power
    5000
    Quote Originally Posted by Brown View Post
    Oh, thanks alot! I'll give it a try later today, (:
    The map regions in the palette are the coords / 8. So to get the 2nd screenshot of lummy castle edge multiple times, the pallete was full of 3200/8.
    .
    Reply With Quote  
     

  7. #17  
    isAwesome = true;
    Typhoeus's Avatar
    Join Date
    Nov 2008
    Posts
    815
    Thanks given
    18
    Thanks received
    13
    Rep Power
    246
    Sweet this can be used for stuff like fight caves, multiple mini games at once or tons of other things.
    Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction.
    - Albert Einstein

    It is one thing to show a man that he is in an error, and another to put him in possession of the truth.
    - John Locke
    Reply With Quote  
     

  8. #18  
    Doctor p - Sweet Shop

    Join Date
    Apr 2007
    Age
    31
    Posts
    6,835
    Thanks given
    150
    Thanks received
    584
    Rep Power
    2595
    I remember people said RuneScape used heightlevels for stuff like this in the old days

    guess they were all wrong??

    Reply With Quote  
     

  9. #19  
    Registered Member

    Join Date
    Jan 2008
    Posts
    1,338
    Thanks given
    243
    Thanks received
    85
    Rep Power
    250
    nicely killed nice map :l you litle! "eat my shorts"
    Reply With Quote  
     

  10. #20  
    Registered Member
    Deadly Uzi's Avatar
    Join Date
    Jul 2008
    Posts
    994
    Thanks given
    177
    Thanks received
    87
    Rep Power
    362
    But if you were in a 'secondary map region,' wouldn't your coordinates be different?
    Attempting to develop a multi-revision library. See it on GitHub.
    Reply With Quote  
     

Page 2 of 10 FirstFirst 1234 ... LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •