Thread: Verify Object Clicking via Region Clipping - Stop Those Cheat Clients

Page 1 of 4 123 ... LastLast
Results 1 to 10 of 36
  1. #1 Verify Object Clicking via Region Clipping - Stop Those Cheat Clients 
    Donator

    Thock321's Avatar
    Join Date
    Jul 2011
    Posts
    1,804
    Thanks given
    706
    Thanks received
    363
    Rep Power
    416
    Updated Version - This is now the correct version and loops through objects only in your region.


    If you release this anywhere else, please give me credits.

    In your Region class, add this:
    Code:
    	private ArrayList<Objects> realObjects = new ArrayList<Objects>();
    
    	public static Region getRegion(int x, int y) {
    		int regionX = x >> 3;
    		int regionY = y >> 3;
    		int regionId = (regionX / 8 << 8) + regionY / 8;
    		for (Region region : regions) {
    			if (region.id() == regionId) {
    				return region;
    			}
    		}
    		return null;
    	}
    
    	public static boolean objectExists(int id, int x, int y, int z) {
    		RegionClipping r = getRegion(x, y);
    		if (r == null)
    			return false;
    		for (Objects o : r.realObjects) {
    			if (o.objectId == id) {
    				if (o.objectX == x && o.objectY == y && o.objectHeight == z) {
    					return true;
    				}
    			}
    		}
    		return false;
    	}
    At the bottom of your addObject method, add this:
    Code:
    		Region r = getRegion(x, y);
    		if (r != null) {
    			if (startUp)
    				r.realObjects.add(new Objects(objectId, x, y, height, direction, type));
    			else if (!objectExists(objectId, x, y, height))
    				r.realObjects.add(new Objects(objectId, x, y, height, direction, type));
    		}
    In ActionHandler.java (or whatever you use for handling object clicking)

    Below: (or whatever you use)
    Code:
        public void firstClickObject(int objectType, int obX, int obY) {
            c.clickObjectType = 0;
    And (or whatever you use)
    Code:
        public void secondClickObject(int objectType, int obX, int obY) {
            c.clickObjectType = 0;
    And (or whatever you use)
    Code:
        public void thirdClickObject(int objectType, int obX, int obY) {
            c.clickObjectType = 0;
    Add:
    Code:
            if (!Region.objectExists(objectType, obX, obY, c.heightLevel))
            	return;
    Don't forget to import.

    Credits:
    DotEXE for the getRegion method.
    Anyone who contributed in making region clipping.
    Me.

    Please thank and rep if you use this or found it helpful in any way.
    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    Forum Moderator


    Join Date
    Jan 2009
    Posts
    5,737
    Thanks given
    1,157
    Thanks received
    3,597
    Rep Power
    5000
    Not the correct way to do it, as where an object is I can just replace it with whatever I fancy. This has already been posted and slated to death.
    Reply With Quote  
     

  4. Thankful users:


  5. #3  
    q.q


    Join Date
    Dec 2010
    Posts
    6,519
    Thanks given
    1,072
    Thanks received
    3,535
    Rep Power
    4752
    i sold the proper fix to gabbe and he released it a while ago, this way bad
    Reply With Quote  
     

  6. #4  
    Donator

    Thock321's Avatar
    Join Date
    Jul 2011
    Posts
    1,804
    Thanks given
    706
    Thanks received
    363
    Rep Power
    416
    Quote Originally Posted by 5tuart View Post
    Not the correct way to do it, as where an object is I can just replace it with whatever I fancy. This has already been posted and slated to death.
    Ah, thanks for reminding me. I never thought of that until you mentioned it.

    EDIT:
    Updated. Thought up of a new way of doing this. Objects are stored in an array list and then it checks if the object you click matches any object in the array list.
    Reply With Quote  
     

  7. #5  
    Super Donator


    Join Date
    Sep 2008
    Age
    30
    Posts
    1,894
    Thanks given
    677
    Thanks received
    776
    Rep Power
    456
    Reply With Quote  
     

  8. #6  
    Donator

    Thock321's Avatar
    Join Date
    Jul 2011
    Posts
    1,804
    Thanks given
    706
    Thanks received
    363
    Rep Power
    416
    Quote Originally Posted by Roboyto View Post
    Same concept.

    Seems those leeching this can't bother to even press the "thanks" button.
    Reply With Quote  
     

  9. #7  
    Chemist

    Advocatus's Avatar
    Join Date
    Dec 2009
    Posts
    2,614
    Thanks given
    199
    Thanks received
    804
    Rep Power
    1462
    You really should make this region based. I.E. make the list not static and modify/get it by getting the region.

    Quote Originally Posted by thock321 View Post
    Seems those leeching this can't bother to even press the "thanks" button.
    Next joke, this would be slow as fuck.
    Quote Originally Posted by blakeman8192 View Post
    Quitting is the only true failure.
    Reply With Quote  
     

  10. Thankful users:


  11. #8  
    Donator

    Thock321's Avatar
    Join Date
    Jul 2011
    Posts
    1,804
    Thanks given
    706
    Thanks received
    363
    Rep Power
    416
    Quote Originally Posted by Advocatus Diaboli View Post
    You really should make this region based. I.E. make the list not static and modify/get it by getting the region.



    Next joke, this would be slow as fuck.
    Done. It now get's your region and only loops through objects within your region. Sorry, I released this really late in my time zone and realized later that this would loop through EVERY SINGLE OBJECT in the game.
    Reply With Quote  
     

  12. Thankful user:


  13. #9  
    Donator

    Thock321's Avatar
    Join Date
    Jul 2011
    Posts
    1,804
    Thanks given
    706
    Thanks received
    363
    Rep Power
    416
    Bump
    Reply With Quote  
     

  14. #10  
    q.q


    Join Date
    Dec 2010
    Posts
    6,519
    Thanks given
    1,072
    Thanks received
    3,535
    Rep Power
    4752
    Quote Originally Posted by Thock321 View Post
    Same concept.

    Seems those leeching this can't bother to even press the "thanks" button.
    consider this has already been released and you're basically releasing it, i can't see how you can call anyone a leecher
    Reply With Quote  
     

Page 1 of 4 123 ... 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. [PI] [$] Buying Region Clipping [$] [PI]
    By nucleon in forum Buying
    Replies: 7
    Last Post: 08-04-2012, 01:39 AM
  2. Region Clipping [Pi]
    By Mr Extremez in forum Help
    Replies: 3
    Last Post: 06-21-2012, 03:38 AM
  3. Region Clipping [Pi]
    By Mr Extremez in forum Requests
    Replies: 0
    Last Post: 06-17-2012, 09:49 PM
  4. Region clipping
    By derpscape in forum Help
    Replies: 2
    Last Post: 05-12-2012, 11:58 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
  •