Thread: [INFORMATION] Noclip information

Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1. #11  
    Banned
    Join Date
    May 2009
    Posts
    64
    Thanks given
    2
    Thanks received
    0
    Rep Power
    0
    Sexyy thanks zee
    Reply With Quote  
     

  2. #12  
    Member Market Banned Market Banned

    Zee Best's Avatar
    Join Date
    Feb 2007
    Age
    29
    Posts
    3,036
    Thanks given
    24
    Thanks received
    210
    Rep Power
    1171
    Quote Originally Posted by laxika View Post
    It's greath ty for this Zee. rep++

    My class:

    Code:
    import java.io.BufferedWriter;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    
    public class DumperVariables {
    
        public static RSString dumpTiles = Class112.method1668(43, "::dump");
        public static void dumpWalkables() {
            try {
                BufferedWriter bw = new BufferedWriter(new FileWriter("TileDump/"+Class68_Sub13_Sub15.region + ".txt"));
                for (int height = 0; height < 4; height++) {
                    for (int localY = 1; (localY ^ 0xffffffff) > -104; localY++) {
                        for (int localX = 1; localX < 103; localX++) {
                            bw.write(height + "	" + localY + "	" + localX + "	" + (Class109.heightDimensions[height].tileWalkType[localY][localX]/* - 16777215*/));
                            bw.newLine();
                        }
                    }
                }
                bw.flush();
                bw.close();
            } catch (IOException ex) {
                Logger.getLogger(DumperVariables.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }
    How can I convert local variables to global? Any idea?

    I saw this:

    mapRegionX << 3 and mapRegionY << 3

    This looks good, but inaccurate... (0-7 + or - x/y like the real global X/Y where I stay... )
    Why would you dump it?

    Just rip the map loading method and the route finding method and implement it into a server, the array i gave the value is a flag, class11 (i think dont have a client to hand) handles the changing of the flags for example if a tile is walkable.


    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  3. #13  
    Respected Member


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    32
    Posts
    12,549
    Thanks given
    177
    Thanks received
    5,789
    Discord
    View profile
    Rep Power
    5000
    Although this would be fine for most objects, for walls it would be more awkward, the walk method determines whether you can walk somewhere depending on the direction you are walking onto the tile..since walls only have '1 side' blocked, depending on the direction you are walking onto the tile, and the way the wall is facing, determines whether you can walk onto the tile with the wall on it or not..

    But for the most part, this is fine, and a good start.

    EDIT : Just realised i said the same thing twice lol.

    Reply With Quote  
     

  4. #14  
    Renown Programmer
    veer's Avatar
    Join Date
    Nov 2007
    Posts
    3,747
    Thanks given
    354
    Thanks received
    1,368
    Rep Power
    3032
    old m8 ps mapTileArray is tile_flags
    Reply With Quote  
     

  5. #15  
    Renown Programmer
    veer's Avatar
    Join Date
    Nov 2007
    Posts
    3,747
    Thanks given
    354
    Thanks received
    1,368
    Rep Power
    3032
    the value can most definitely be more than just 0 and 1. if you look in the client, you'll see checks for player and projectile traversal. different bits set mean different characteristics/attributes. this has been known about for a long time and is how modern bots 'walk'.
    Code:
    public static boolean canReach(int startX, int startY, int destX,
    			int destY, boolean isObject) {
    		// Documentation part:
    		// The blocks info
    		// When you can walk freely it's 0, also used to create a noclip
    		int[][] via = new int[104][104];
    		int[][] cost = new int[104][104];
    		int[] tileQueueX = new int[4000];
    		int[] tileQueueY = new int[4000];
    
    		for (int xx = 0; xx < 104; xx++) {
    			for (int yy = 0; yy < 104; yy++) {
    				via[xx][yy] = 0;
    				cost[xx][yy] = 99999999;
    			}
    		}
    
    		int curX = startX;
    		int curY = startY;
    		via[startX][startY] = 99;
    		cost[startX][startY] = 0;
    		int head = 0;
    		int tail = 0;
    		tileQueueX[head] = startX;
    		tileQueueY[head] = startY;
    		head++;
    		int pathLength = tileQueueX.length;
    		int blocks[][] = Bot.getClient().getGroundDataArray()
    				[Bot.getClient().getPlane()].getBlocks();
    		while (tail != head) {
    			curX = tileQueueX[tail];
    			curY = tileQueueY[tail];
    
    			if (!isObject && curX == destX && curY == destY) {
    				return true;
    			} else if (isObject) {
    				if ((curX == destX && curY == destY + 1)
    						|| (curX == destX && curY == destY - 1)
    						|| (curX == destX + 1 && curY == destY)
    						|| (curX == destX - 1 && curY == destY)) {
    					return true;
    				}
    			}
    			tail = (tail + 1) % pathLength;
    
    			// Big and ugly block of code
    			int thisCost = cost[curX][curY] + 1;
    			// Can go south (by determining, whether the north side of the
    			// south tile is blocked :P)
    			if (curY > 0 && via[curX][curY - 1] == 0
    					&& (blocks[curX][curY - 1] & 0x1280102) == 0) {
    				tileQueueX[head] = curX;
    				tileQueueY[head] = curY - 1;
    				head = (head + 1) % pathLength;
    				via[curX][curY - 1] = 1;
    				cost[curX][curY - 1] = thisCost;
    			}
    			// Can go west
    			if (curX > 0 && via[curX - 1][curY] == 0
    					&& (blocks[curX - 1][curY] & 0x1280108) == 0) {
    				tileQueueX[head] = curX - 1;
    				tileQueueY[head] = curY;
    				head = (head + 1) % pathLength;
    				via[curX - 1][curY] = 2;
    				cost[curX - 1][curY] = thisCost;
    			}
    			// Can go north
    			if (curY < 104 - 1 && via[curX][curY + 1] == 0
    					&& (blocks[curX][curY + 1] & 0x1280120) == 0) {
    				tileQueueX[head] = curX;
    				tileQueueY[head] = curY + 1;
    				head = (head + 1) % pathLength;
    				via[curX][curY + 1] = 4;
    				cost[curX][curY + 1] = thisCost;
    			}
    			// Can go east
    			if (curX < 104 - 1 && via[curX + 1][curY] == 0
    					&& (blocks[curX + 1][curY] & 0x1280180) == 0) {
    				tileQueueX[head] = curX + 1;
    				tileQueueY[head] = curY;
    				head = (head + 1) % pathLength;
    				via[curX + 1][curY] = 8;
    				cost[curX + 1][curY] = thisCost;
    			}
    			// Can go southwest
    			if (curX > 0 && curY > 0 && via[curX - 1][curY - 1] == 0
    					&& (blocks[curX - 1][curY - 1] & 0x128010e) == 0
    					&& (blocks[curX - 1][curY] & 0x1280108) == 0
    					&& (blocks[curX][curY - 1] & 0x1280102) == 0) {
    				tileQueueX[head] = curX - 1;
    				tileQueueY[head] = curY - 1;
    				head = (head + 1) % pathLength;
    				via[curX - 1][curY - 1] = 3;
    				cost[curX - 1][curY - 1] = thisCost;
    			}
    			// Can go northwest
    			if (curX > 0 && curY < 104 - 1 && via[curX - 1][curY + 1] == 0
    					&& (blocks[curX - 1][curY + 1] & 0x1280138) == 0
    					&& (blocks[curX - 1][curY] & 0x1280108) == 0
    					&& (blocks[curX][curY + 1] & 0x1280120) == 0) {
    				tileQueueX[head] = curX - 1;
    				tileQueueY[head] = curY + 1;
    				head = (head + 1) % pathLength;
    				via[curX - 1][curY + 1] = 6;
    				cost[curX - 1][curY + 1] = thisCost;
    			}
    			// Can go southeast
    			if (curX < 104 - 1 && curY > 0 && via[curX + 1][curY - 1] == 0
    					&& (blocks[curX + 1][curY - 1] & 0x1280183) == 0
    					&& (blocks[curX + 1][curY] & 0x1280180) == 0
    					&& (blocks[curX][curY - 1] & 0x1280102) == 0) {
    				tileQueueX[head] = curX + 1;
    				tileQueueY[head] = curY - 1;
    				head = (head + 1) % pathLength;
    				via[curX + 1][curY - 1] = 9;
    				cost[curX + 1][curY - 1] = thisCost;
    			}
    			// can go northeast
    			if (curX < 104 - 1 && curY < 104 - 1
    					&& via[curX + 1][curY + 1] == 0
    					&& (blocks[curX + 1][curY + 1] & 0x12801e0) == 0
    					&& (blocks[curX + 1][curY] & 0x1280180) == 0
    					&& (blocks[curX][curY + 1] & 0x1280120) == 0) {
    				tileQueueX[head] = curX + 1;
    				tileQueueY[head] = curY + 1;
    				head = (head + 1) % pathLength;
    				via[curX + 1][curY + 1] = 12;
    				cost[curX + 1][curY + 1] = thisCost;
    			}
    		}
    		return false
    Reply With Quote  
     

  6. #16  
    Renown Programmer
    veer's Avatar
    Join Date
    Nov 2007
    Posts
    3,747
    Thanks given
    354
    Thanks received
    1,368
    Rep Power
    3032
    ps 'heightPlanes'... they just represent the states of different floor levels
    Reply With Quote  
     

  7. #17  




    Scu11's Avatar
    Join Date
    Aug 2007
    Age
    27
    Posts
    16,200
    Thanks given
    7,190
    Thanks received
    12,174
    Discord
    View profile
    Rep Power
    5000
    Quote Originally Posted by super_ View Post
    ps 'heightPlanes'... they just represent the states of different floor levels
    Zomg I love you.

    [Only registered and activated users can see links. ]



    Reply With Quote  
     

  8. #18  
    Registered Member
    Join Date
    Jul 2008
    Posts
    3,167
    Thanks given
    235
    Thanks received
    74
    Rep Power
    209
    so this is the perfect way to stop no clip?
    where i can repace this if i use galkon ref client?
    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

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