Thread: Attack following issue

Results 1 to 5 of 5
  1. #1 Attack following issue 
    Registered Member
    Join Date
    Nov 2012
    Posts
    447
    Thanks given
    26
    Thanks received
    35
    Rep Power
    14
    There's a issue with following during combat (not Clipping) it's alreadyclipped.

    Here's a situation

    Let's say a player attacks me.
    Then i run away. the player normally is suspose to run with me like follow me.
    But for me, the player just stands there. and doesn't follow?

    Anything?

    Thanks.
    Project is finally released, Come try it out @ Optimize-OS.
    Spoiler for Optimize-OS:
    http://www.rune-server.org/runescape-development/rs2-server/advertise/617031-optimize-os-spawn-pking-dont-let-your-enemy-escape-beginning.html
    Reply With Quote  
     

  2. #2  
    Author of the first public OSRSPS

    Shadowy's Avatar
    Join Date
    Sep 2009
    Age
    28
    Posts
    1,499
    Thanks given
    490
    Thanks received
    241
    Rep Power
    307
    too broad cant really help mate
    what framework are you using? project insanity?

    you need to debug your code aka follow through the combat process in the engine and find the attacking code for PvP and look for following code and see if you find any weird problems
    search your source for "follow" and just see what you come up with
    Owner of OS-RSPS, the first Oldschool RuneScape Server (2014)
    Reply With Quote  
     

  3. #3  
    hi


    Join Date
    Aug 2013
    Posts
    925
    Thanks given
    290
    Thanks received
    384
    Rep Power
    402
    Check your followPlayer method in PlayerAssistant
    Reply With Quote  
     

  4. Thankful user:


  5. #4  
    Registered Member RuneForceGame's Avatar
    Join Date
    May 2014
    Posts
    17
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Show me you CombatAssistant.
    Reply With Quote  
     

  6. #5  
    Registered Member
    Join Date
    Jan 2014
    Posts
    813
    Thanks given
    69
    Thanks received
    47
    Rep Power
    9
    Already have this done.
    Check your followplayer method in playerassistant.java

    replace yours with this
    Code:
    public void followPlayer() {
    		if(PlayerHandler.players[c.followId] == null || PlayerHandler.players[c.followId].isDead) {
    			c.followId = 0;
    			return;
    		}		
    		if(c.freezeTimer > 0) {
    			return;
    		}
    		if (c.isDead || c.playerLevel[3] <= 0)
    			return;
    		
            int otherX = PlayerHandler.players[c.followId].getX();
            int otherY = PlayerHandler.players[c.followId].getY();
    		boolean sameSpot = (c.absX == otherX && c.absY == otherY);
    
    		boolean hallyDistance = c.goodDistance(otherX, otherY, c.getX(),
    				c.getY(), 2);
    
    		boolean rangeWeaponDistance = c.goodDistance(otherX, otherY, c.getX(),
    				c.getY(), 4);
    		boolean bowDistance = c.goodDistance(otherX, otherY, c.getX(),
    				c.getY(), 6);
    		boolean mageDistance = c.goodDistance(otherX, otherY, c.getX(),
    				c.getY(), 7);
    
    		boolean castingMagic = (c.usingMagic || c.mageFollow || c.autocasting || c.spellId > 0)
    				&& mageDistance;
    		boolean playerRanging = (c.usingRangeWeapon)
    				&& rangeWeaponDistance;
    		boolean playerBowOrCross = (c.usingBow) && bowDistance;
    
    		if(!c.goodDistance(otherX, otherY, c.getX(), c.getY(), 25)) {
    			c.followId = 0;
    			return;
    		}
    		c.faceUpdate(c.followId + 32768);
    		if (!sameSpot) {
            if (!c.usingSpecial && c.inWild()) {
    				if (c.usingSpecial && (playerRanging || playerBowOrCross)) {
    					c.stopMovement();
    					return;
    				}
    				if (playerRanging || playerBowOrCross) {
    					c.stopMovement();
    					return;
    				}
    				if (castingMagic || playerRanging || playerBowOrCross) {
    					c.stopMovement();
    					return;
    				}
    				if (c.getCombat().usingHally() && hallyDistance) {
    					c.stopMovement();
    					return;
    				}
    			}
    		}
                    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) {
                            if (otherY > c.getY() && otherX == c.getX()) {
                                    walkTo(otherX, otherY - 1);
                            } else if (otherY < c.getY() && otherX == c.getX()) {
                                    walkTo(otherX, otherY + 1);
                            } else if (otherX > c.getX() && otherY == c.getY()) {
                                    walkTo(otherX - 1, otherY);
                            } else if (otherX < c.getX() && otherY == c.getY()) {
                                    walkTo(otherX + 1, otherY);
                            } else if (otherX < c.getX() && otherY < c.getY()) {
                                    walkTo(otherX + 1, otherY + 1);
                            } else if (otherX > c.getX() && otherY > c.getY()) {
                                    walkTo(otherX - 1, otherY - 1);
                            } else if (otherX < c.getX() && otherY > c.getY()) {
                                    walkTo(otherX + 1, otherY - 1);
                            } else if (otherX > c.getX() && otherY < c.getY()) {
                                    walkTo(otherX + 1, otherY - 1);
                            }
                    } else {
                            if (otherY > c.getY() && otherX == c.getX()) {
                                    walkTo(otherX, otherY - 1);
                            } else if (otherY < c.getY() && otherX == c.getX()) {
                                    walkTo(otherX, otherY + 1);
                            } else if (otherX > c.getX() && otherY == c.getY()) {
                                    walkTo(otherX - 1, otherY);
                            } else if (otherX < c.getX() && otherY == c.getY()) {
                                    walkTo(otherX + 1, otherY);
                            } else if (otherX < c.getX() && otherY < c.getY()) {
                                    walkTo(otherX + 1, otherY + 1);
                            } else if (otherX > c.getX() && otherY > c.getY()) {
                                    walkTo(otherX - 1, otherY - 1);
                            } else if (otherX < c.getX() && otherY > c.getY()) {
                                    walkTo(otherX + 1, otherY - 1);
                            } else if (otherX > c.getX() && otherY < c.getY()) {
                                    walkTo(otherX - 1, otherY + 1);
                            }
                    }
                    c.faceUpdate(c.followId+32768);
            }
    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

Similar Threads

  1. Following issues
    By Gooman130 in forum Help
    Replies: 3
    Last Post: 06-09-2012, 11:54 PM
  2. Summoning Npc Follow issue
    By Gnakos in forum Help
    Replies: 2
    Last Post: 03-15-2012, 10:34 PM
  3. Attack tab issues.
    By demon dylan001 in forum Help
    Replies: 3
    Last Post: 06-05-2011, 10:33 AM
  4. Special Attack Follow
    By Savy` in forum Help
    Replies: 5
    Last Post: 05-04-2010, 05:01 PM
  5. Replies: 1
    Last Post: 02-04-2010, 11:06 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
  •