Thread: please help me

Results 1 to 6 of 6
  1. #1 please help me 
    Owner - TeamNex

    Join Date
    Oct 2011
    Age
    30
    Posts
    175
    Thanks given
    14
    Thanks received
    20
    Rep Power
    23
    i have problem new players cant move? i changed starter maybe i did something wrong? iam using zepsity source
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Jan 2012
    Posts
    58
    Thanks given
    0
    Thanks received
    3
    Rep Power
    22
    The problem is most likely to do with Clipped Following, that's if you even have Clipped Following.

    Have I helped you? Don't post a thanks, there's a button for it.

    Reply With Quote  
     

  3. #3  
    Owner - TeamNex

    Join Date
    Oct 2011
    Age
    30
    Posts
    175
    Thanks given
    14
    Thanks received
    20
    Rep Power
    23
    here is following
    Code:
    	 * Following
    	**/
    	
    	public void playerWalk(int x, int y) {
    		PathFinder.getPathFinder().findRoute(c, x, y, true, 1, 1);
    	}
    	
    	public void followPlayer(int i) {
    		if(Server.playerHandler.players[c.followId] == null || Server.playerHandler.players[c.followId].isDead) {
    			c.followId = 0;
    			return;
    		}		
    				if (c.freezeTimer > 0) {
    			return;
    		}
    		if (c.inWG()) {
    			c.followId = 0;
    			return;
    		}
    		if (c.inDuelArena()) {
    			c.followId = 0;
    			return;
    		}
    		if (c.inJail() && c.Jail == true) {
    			c.sendMessage("You cannot follow in jail!");
    			c.followId = 0;
    			return;
    		}
    		if (c.Jail == true) {
    			c.sendMessage("You cannot follow in jail!");
    			c.followId = 0;
    			return;
    		}
    		if (c.isDead || c.playerLevel[3] <= 0)
    			return;
    		if(c.freezeTimer > 0 || c.isDead || c.playerLevel[3] <= 0)
    			return;
    		
    		int otherX = Server.playerHandler.players[c.followId].getX();
    		int otherY = Server.playerHandler.players[c.followId].getY();
    		boolean withinDistance = c.goodDistance(otherX, otherY, c.getX(), c.getY(), 1);
    		boolean goodDistance = c.goodDistance(otherX, otherY, c.getX(), c.getY(), 1);
    		boolean hallyDistance = c.goodDistance(otherX, otherY, c.getX(), c.getY(), 2);
    		boolean bowDistance = c.goodDistance(otherX, otherY, c.getX(), c.getY(), 8);
    		boolean rangeWeaponDistance = c.goodDistance(otherX, otherY, c.getX(), c.getY(), 4);
    		boolean sameSpot = c.absX == otherX && c.absY == otherY;
    		if(!c.goodDistance(otherX, otherY, c.getX(), c.getY(), 25)) {
    			c.followId = 0;
    			return;
    		}
    		if(c.goodDistance(otherX, otherY, c.getX(), c.getY(), 1)) {
    			if (otherX != c.getX() && otherY != c.getY()) {
    				stopDiagonal(otherX, otherY);//This is what causes Clipping through walls needa rewrite this
    				return;
    			}
    		}
    		
    		if((c.usingBow || c.mageFollow || (c.playerIndex > 0 && c.autocastId > 0)) && bowDistance && !sameSpot) {
    			return;
    		}
    
    		if(c.getCombat().usingHally() && hallyDistance && !sameSpot) {
    			return;
    		}
    
    		if(c.usingRangeWeapon && rangeWeaponDistance && !sameSpot) {
    			return;
    		}
    		
    		
    		c.faceUpdate(c.followId+32768);
    		int absX = c.getX();
    		int absY = c.getY();
    		if (otherX == c.absX && otherY == c.absY) {
    			int r = Misc.random(3);
    			switch (r) {
    				case 0:
    					walkTo(0,-1);
    				break;
    				case 1:
    					walkTo(0,1);
    				break;
    				case 2:
    					walkTo(1,0);
    				break;
    				case 3:
    					walkTo(-1,0);
    				break;			
    			}		
    		} else if(c.isRunning2 && !withinDistance) {
    			if(otherY > c.getY() && otherX == c.getX()) {
    				playerWalk(otherX, otherY - 1);
    			} else if(otherY < c.getY() && otherX == c.getX()) {
    				playerWalk(otherX, otherY + 1);
    			} else if(otherX > c.getX() && otherY == c.getY()) {
    				playerWalk(otherX - 1, otherY);
    			} else if(otherX < c.getX() && otherY == c.getY()) {
    				playerWalk(otherX + 1, otherY);
    			} else if(otherX < c.getX() && otherY < c.getY()) {
    				playerWalk(otherX + 1, otherY + 1);
    			} else if(otherX > c.getX() && otherY > c.getY()) {
    				playerWalk(otherX - 1, otherY - 1);
    			} else if(otherX < c.getX() && otherY > c.getY()) {
    				playerWalk(otherX + 1, otherY - 1);
    			} else if(otherX > c.getX() && otherY < c.getY()) {
    				playerWalk(otherX + 1, otherY - 1);
    			}
    		} else {
    			if(otherY > c.getY() && otherX == c.getX()) {
    				playerWalk(otherX, otherY - 1);
    			} else if(otherY < c.getY() && otherX == c.getX()) {
    				playerWalk(otherX, otherY + 1);
    			} else if(otherX > c.getX() && otherY == c.getY()) {
    				playerWalk(otherX - 1, otherY);
    			} else if(otherX < c.getX() && otherY == c.getY()) {
    				playerWalk(otherX + 1, otherY);
    			} else if(otherX < c.getX() && otherY < c.getY()) {
    				playerWalk(otherX + 1, otherY + 1);
    			} else if(otherX > c.getX() && otherY > c.getY()) {
    				playerWalk(otherX - 1, otherY - 1);
    			} else if(otherX < c.getX() && otherY > c.getY()) {
    				playerWalk(otherX + 1, otherY - 1);
    			} else if(otherX > c.getX() && otherY < c.getY()) {
    				playerWalk(otherX - 1, otherY + 1);
    			} 
    		}
    		c.faceUpdate(c.followId+32768);
    	}
    	
    	public void followNpc() { //old one
    		if (Server.npcHandler.npcs[c.followId2] == null
    				|| Server.npcHandler.npcs[c.followId2].isDead) {
    			c.followId2 = 0;
    			return;
    		}
    		if (c.freezeTimer > 0) {
    			return;
    		}
    		if (c.inWG()) {
    			c.followId = 0;
    			return;
    		}
    		if (c.inDuelArena()) {
    			c.followId = 0;
    			return;
    		}
    		if (c.inJail() && c.Jail == true) {
    			c.sendMessage("You cannot follow in jail!");
    			c.followId = 0;
    			return;
    		}
    		if (c.Jail == true) {
    			c.sendMessage("You cannot follow in jail!");
    			c.followId = 0;
    			return;
    		}
    		if (c.isDead || c.playerLevel[3] <= 0)
    			return;
    
    		int otherX = Server.npcHandler.npcs[c.followId2].getX();
    		int otherY = Server.npcHandler.npcs[c.followId2].getY();
    		boolean withinDistance = c.goodDistance(otherX, otherY, c.getX(),
    				c.getY(), 2);
    		boolean goodDistance = c.goodDistance(otherX, otherY, c.getX(),
    				c.getY(), 1);
    		boolean hallyDistance = c.goodDistance(otherX, otherY, c.getX(),
    				c.getY(), 2);
    		boolean bowDistance = c.goodDistance(otherX, otherY, c.getX(),
    				c.getY(), 8);
    		boolean rangeWeaponDistance = c.goodDistance(otherX, otherY, c.getX(),
    				c.getY(), 4);
    		boolean sameSpot = c.absX == otherX && c.absY == otherY;
    		if (!c.goodDistance(otherX, otherY, c.getX(), c.getY(), 25)) {
    			c.followId2 = 0;
    			return;
    		}
    		if (c.goodDistance(otherX, otherY, c.getX(), c.getY(), 1)) {
    			if (otherX != c.getX() && otherY != c.getY()) {
    				stopDiagonal(otherX, otherY);
    				return;
    			}
    		}
    
    		if ((c.usingBow || c.mageFollow || (c.npcIndex > 0 && c.autocastId > 0))
    				&& bowDistance && !sameSpot) {
    			return;
    		}
    
    		if (c.getCombat().usingHally() && hallyDistance && !sameSpot) {
    			return;
    		}
    
    		if (c.usingRangeWeapon && rangeWeaponDistance && !sameSpot) {
    			return;
    		}
    
    		c.faceUpdate(c.followId2);
    		if (otherX == c.absX && otherY == c.absY) {
    			int r = Misc.random(3);
    			switch (r) {
    			case 0:
    				walkTo(0, -1);
    				break;
    			case 1:
    				walkTo(0, 1);
    				break;
    			case 2:
    				walkTo(1, 0);
    				break;
    			case 3:
    				walkTo(-1, 0);
    				break;
    			}
    		} else if (c.isRunning2 && !withinDistance) {
    			if (otherY > c.getY() && otherX == c.getX()) {
    				walkTo(0,
    						getMove(c.getY(), otherY - 1)
    								+ getMove(c.getY(), otherY - 1));
    			} else if (otherY < c.getY() && otherX == c.getX()) {
    				walkTo(0,
    						getMove(c.getY(), otherY + 1)
    								+ getMove(c.getY(), otherY + 1));
    			} else if (otherX > c.getX() && otherY == c.getY()) {
    				walkTo(getMove(c.getX(), otherX - 1)
    						+ getMove(c.getX(), otherX - 1), 0);
    			} else if (otherX < c.getX() && otherY == c.getY()) {
    				walkTo(getMove(c.getX(), otherX + 1)
    						+ getMove(c.getX(), otherX + 1), 0);
    			} else if (otherX < c.getX() && otherY < c.getY()) {
    				walkTo(getMove(c.getX(), otherX + 1)
    						+ getMove(c.getX(), otherX + 1),
    						getMove(c.getY(), otherY + 1)
    								+ getMove(c.getY(), otherY + 1));
    			} else if (otherX > c.getX() && otherY > c.getY()) {
    				walkTo(getMove(c.getX(), otherX - 1)
    						+ getMove(c.getX(), otherX - 1),
    						getMove(c.getY(), otherY - 1)
    								+ getMove(c.getY(), otherY - 1));
    			} else if (otherX < c.getX() && otherY > c.getY()) {
    				walkTo(getMove(c.getX(), otherX + 1)
    						+ getMove(c.getX(), otherX + 1),
    						getMove(c.getY(), otherY - 1)
    								+ getMove(c.getY(), otherY - 1));
    			} else if (otherX > c.getX() && otherY < c.getY()) {
    				walkTo(getMove(c.getX(), otherX + 1)
    						+ getMove(c.getX(), otherX + 1),
    						getMove(c.getY(), otherY - 1)
    								+ getMove(c.getY(), otherY - 1));
    			}
    		} else {
    			if (otherY > c.getY() && otherX == c.getX()) {
    				walkTo(0, getMove(c.getY(), otherY - 1));
    			} else if (otherY < c.getY() && otherX == c.getX()) {
    				walkTo(0, getMove(c.getY(), otherY + 1));
    			} else if (otherX > c.getX() && otherY == c.getY()) {
    				walkTo(getMove(c.getX(), otherX - 1), 0);
    			} else if (otherX < c.getX() && otherY == c.getY()) {
    				walkTo(getMove(c.getX(), otherX + 1), 0);
    			} else if (otherX < c.getX() && otherY < c.getY()) {
    				walkTo(getMove(c.getX(), otherX + 1),
    						getMove(c.getY(), otherY + 1));
    			} else if (otherX > c.getX() && otherY > c.getY()) {
    				walkTo(getMove(c.getX(), otherX - 1),
    						getMove(c.getY(), otherY - 1));
    			} else if (otherX < c.getX() && otherY > c.getY()) {
    				walkTo(getMove(c.getX(), otherX + 1),
    						getMove(c.getY(), otherY - 1));
    			} else if (otherX > c.getX() && otherY < c.getY()) {
    				walkTo(getMove(c.getX(), otherX - 1),
    						getMove(c.getY(), otherY + 1));
    			}
    		}
    		c.faceUpdate(c.followId2);
    	}
    
    
    	public int getRunningMove(int i, int j) {
    		if (j - i > 2)
    			return 2;
    		else if (j - i < -2)
    			return -2;
    		else
    			return j - i;
    	}
    
    	public void resetFollow() {
    		c.followId = 0;
    		c.followId2 = 0;
    		c.mageFollow = false;
    		c.outStream.createFrame(174);
    		c.outStream.writeWord(0);
    		c.outStream.writeByte(0);
    		c.outStream.writeWord(1);
    	}
    
    	public void walkTo(int i, int j) {
    		c.newWalkCmdSteps = 0;
    		if (++c.newWalkCmdSteps > 50)
    			c.newWalkCmdSteps = 0;
    		int k = c.getX() + i;
    		k -= c.mapRegionX * 8;
    		c.getNewWalkCmdX()[0] = c.getNewWalkCmdY()[0] = 0;
    		int l = c.getY() + j;
    		l -= c.mapRegionY * 8;
    
    		for (int n = 0; n < c.newWalkCmdSteps; n++) {
    			c.getNewWalkCmdX()[n] += k;
    			c.getNewWalkCmdY()[n] += l;
    		}
    	}
    
    	public void walkTo2(int i, int j) {
    		if (c.freezeDelay > 0)
    			return;
    		c.newWalkCmdSteps = 0;
    		if (++c.newWalkCmdSteps > 50)
    			c.newWalkCmdSteps = 0;
    		int k = c.getX() + i;
    		k -= c.mapRegionX * 8;
    		c.getNewWalkCmdX()[0] = c.getNewWalkCmdY()[0] = 0;
    		int l = c.getY() + j;
    		l -= c.mapRegionY * 8;
    
    		for (int n = 0; n < c.newWalkCmdSteps; n++) {
    			c.getNewWalkCmdX()[n] += k;
    			c.getNewWalkCmdY()[n] += l;
    		}
    	}
    
    	public void stopDiagonal(int otherX, int otherY) {
    		if (c.freezeDelay > 0)
    			return;
    		c.newWalkCmdSteps = 1;
    		int xMove = otherX - c.getX();
    		int yMove = 0;
    		if (xMove == 0)
    			yMove = otherY - c.getY();
    		/*
    		 * if (!clipHor) { yMove = 0; } else if (!clipVer) { xMove = 0; }
    		 */
    
    		int k = c.getX() + xMove;
    		k -= c.mapRegionX * 8;
    		c.getNewWalkCmdX()[0] = c.getNewWalkCmdY()[0] = 0;
    		int l = c.getY() + yMove;
    		l -= c.mapRegionY * 8;
    
    		for (int n = 0; n < c.newWalkCmdSteps; n++) {
    			c.getNewWalkCmdX()[n] += k;
    			c.getNewWalkCmdY()[n] += l;
    		}
    
    	}
    
    	public void walkToCheck(int i, int j) {
    		if (c.freezeDelay > 0)
    			return;
    		c.newWalkCmdSteps = 0;
    		if (++c.newWalkCmdSteps > 50)
    			c.newWalkCmdSteps = 0;
    		int k = c.getX() + i;
    		k -= c.mapRegionX * 8;
    		c.getNewWalkCmdX()[0] = c.getNewWalkCmdY()[0] = 0;
    		int l = c.getY() + j;
    		l -= c.mapRegionY * 8;
    
    		for (int n = 0; n < c.newWalkCmdSteps; n++) {
    			c.getNewWalkCmdX()[n] += k;
    			c.getNewWalkCmdY()[n] += l;
    		}
    	}
    
    	public int getMove(int place1, int place2) {
    		if (System.currentTimeMillis() - c.lastSpear < 4000)
    			return 0;
    		if ((place1 - place2) == 0) {
    			return 0;
    		} else if ((place1 - place2) < 0) {
    			return 1;
    		} else if ((place1 - place2) > 0) {
    			return -1;
    		}
    		return 0;
    	}
    Reply With Quote  
     

  4. #4  
    Registered Member beastro man's Avatar
    Join Date
    Dec 2008
    Posts
    148
    Thanks given
    4
    Thanks received
    9
    Rep Power
    32
    Code:
    use code, not quote
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    therefore you don't take up the entire page
    RS2007 Loader



    - trololol




    Need a dollar? [̲̅$̲̅(̲̅1)̲̅$̲̅]
    Reply With Quote  
     

  5. #5  
    Extreme Donator


    Join Date
    Oct 2006
    Posts
    1,370
    Thanks given
    64
    Thanks received
    197
    Rep Power
    426
    +1 beastro, although, walking has nothing to do with following. Does it print an error in the player's chatbox, or the commandline?


    ~flow@hacking . rs
    Reply With Quote  
     

  6. #6  
    Owner - TeamNex

    Join Date
    Oct 2011
    Age
    30
    Posts
    175
    Thanks given
    14
    Thanks received
    20
    Rep Power
    23
    no i dont get any errors
    Reply With Quote  
     


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
  •