Thread: [VIDEO] NPC and PVP combat problem - Project Exile

Results 1 to 3 of 3
  1. #1 [VIDEO] NPC and PVP combat problem - Project Exile 
    Registered Member Slant's Avatar
    Join Date
    Nov 2012
    Posts
    42
    Thanks given
    3
    Thanks received
    4
    Rep Power
    14
    This is a problem that I get when I try to attack NPCS and Players, if you could help me that would be amazing thanks.

    I am using the base Project-Exile also if you have a bug list for this server and I could have it I would be so grateful ;D

    Here's a video of the problem (Walter White aka. Heisenberg) #PotatoQuality

    Reply With Quote  
     

  2. #2  
    Donator

    Jason's Avatar
    Join Date
    Aug 2009
    Posts
    6,092
    Thanks given
    2,402
    Thanks received
    2,823
    Rep Power
    4550
    Add this to your following class if you don't already have it. If you already have it, replace it.

    Code:
        public static void stepAway(Player playerObject) {
            if (Region.getClipping(playerObject.getX() - 1, playerObject.getY(), playerObject.heightLevel, -1, 0))
                playerObject.getPA().walkTo(-1, 0);
            else if (Region.getClipping(playerObject.getX() + 1, playerObject.getY(), playerObject.heightLevel, 1, 0))
                playerObject.getPA().walkTo(1, 0);
            else if (Region.getClipping(playerObject.getX(), playerObject.getY() - 1, playerObject.heightLevel, 0, -1))
                playerObject.getPA().walkTo(0, -1);
            else if (Region.getClipping(playerObject.getX(), playerObject.getY() + 1, playerObject.heightLevel, 0, 1))
                playerObject.getPA().walkTo(0, 1);
        }
    Still in following you should find a method along the lines of;
    Code:
    public static void player(Player p) {
    In that method remove this
    Code:
    if(sameSpot) {
                stepAway(p);
                p.faceUpdate(p.followId + 32768);
                return;
            }
    In the attackPlayer function in CombatAssistant, add this.
    Code:
                if(c.absX == PlayerHandler.players[i].getX() && c.absY == PlayerHandler.players[i].getY()) {
                    Following.stepAway(c);
                    return;
                }
    Also, there is a following issue which pertains to the attackPlayer method where the player tries to stop his diagonal movement. This causes the player the move along the x-axis of the map until the x is equal to that of your opponent.
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member Slant's Avatar
    Join Date
    Nov 2012
    Posts
    42
    Thanks given
    3
    Thanks received
    4
    Rep Power
    14
    Quote Originally Posted by Jason View Post
    Add this to your following class if you don't already have it. If you already have it, replace it.

    Code:
        public static void stepAway(Player playerObject) {
            if (Region.getClipping(playerObject.getX() - 1, playerObject.getY(), playerObject.heightLevel, -1, 0))
                playerObject.getPA().walkTo(-1, 0);
            else if (Region.getClipping(playerObject.getX() + 1, playerObject.getY(), playerObject.heightLevel, 1, 0))
                playerObject.getPA().walkTo(1, 0);
            else if (Region.getClipping(playerObject.getX(), playerObject.getY() - 1, playerObject.heightLevel, 0, -1))
                playerObject.getPA().walkTo(0, -1);
            else if (Region.getClipping(playerObject.getX(), playerObject.getY() + 1, playerObject.heightLevel, 0, 1))
                playerObject.getPA().walkTo(0, 1);
        }
    Still in following you should find a method along the lines of;
    Code:
    public static void player(Player p) {
    In that method remove this
    Code:
    if(sameSpot) {
                stepAway(p);
                p.faceUpdate(p.followId + 32768);
                return;
            }
    In the attackPlayer function in CombatAssistant, add this.
    Code:
                if(c.absX == PlayerHandler.players[i].getX() && c.absY == PlayerHandler.players[i].getY()) {
                    Following.stepAway(c);
                    return;
                }
    Also, there is a following issue which pertains to the attackPlayer method where the player tries to stop his diagonal movement. This causes the player the move along the x-axis of the map until the x is equal to that of your opponent.
    It does the same thing what should I do? The base is Project-Exile Like I still cant attack things when on top of them
    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. Replies: 3
    Last Post: 02-19-2013, 05:49 AM
  2. Replies: 10
    Last Post: 08-20-2012, 09:13 PM
  3. Replies: 72
    Last Post: 07-25-2012, 12:44 PM
  4. Drops on death player vs npc and pvp
    By Moofens in forum Help
    Replies: 3
    Last Post: 01-06-2010, 07:40 AM
  5. Npc Combat ANd pvp
    By Huey in forum Help
    Replies: 2
    Last Post: 05-28-2009, 08:26 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
  •