Hey,Guest we see you didn't join yet?
Click Register to register,Or login to login to the forums.
We hope you have a great time on our forums.

Join the forum, it's quick and easy

Hey,Guest we see you didn't join yet?
Click Register to register,Or login to login to the forums.
We hope you have a great time on our forums.

Would you like to react to this message? Create an account in a few clicks or log in to continue.

    Fix delta pvp following. Melee only (Yet)

    i just did
    i just did
    Moderators
    Moderators


    Number of posts : 562
    Rep: : 32
    Registration date : 2009-03-14
    Age : 32

    Fix delta pvp following. Melee only (Yet) Empty Fix delta pvp following. Melee only (Yet)

    Post  i just did Sat Mar 21, 2009 4:11 am

    first open client.java find this:

    Code:

    if (GoodDistance(EnemyX, EnemyY, absX, absY, 1) == true && !UseBow && !UseCrossBow && !UseRing) {

    replace it whit this:

    Code:

          if (((GoodDistance(EnemyX, EnemyY, absX, absY, 1) && !isMoving) ||  (GoodDistance(EnemyX, EnemyY, absX, absY, 3) && isMoving))&& !UseBow && !UseCrossBow && !UseRing ) {

    now add spec Work! Made By Patrickftww

    find this:

    Code:

    if(specOn == true && AttackingOn2.currentHealth > 0 && GoodDistance(EnemyX, EnemyY, absX, absY, 1)){//players

    change it to this:

    Code:

    f(specOn == true && AttackingOn2.currentHealth > 0 && (((GoodDistance(EnemyX, EnemyY, absX, absY, 1) && !isMoving) ||  (GoodDistance(EnemyX, EnemyY, absX, absY, 3) && isMoving))&& !UseBow && !UseCrossBow && !UseRing )){//players

    now save and close client.java and open player.java

    first add this:


    Code:


       public boolean isMoving = false;
    then find this:

    Code:

    public void updateThisPlayerMovement(stream str) {

    replace that void whit this void:

    Code:


       public void updateThisPlayerMovement(stream str) {
          if (mapRegionDidChange) {
             str.createFrame(73);
             str.writeWordA(mapRegionX + 6); // for some reason the client substracts 6
             // from those values
             str.writeWord(mapRegionY + 6);
          }

          if (didTeleport == true) {
             str.createFrameVarSizeWord(81);
             str.initBitAccess();
             str.writeBits(1, 1);
             str.writeBits(2, 3);
             // updateType
             str.writeBits(2, heightLevel);
             str.writeBits(1, 1);
             // set to true, if discarding (clientside) walking queue
             str.writeBits(1, (updateRequired) ? 1 : 0);
             str.writeBits(7, currentY);
             str.writeBits(7, currentX);
             return;
          }

          if (dir1 == -1) {
             isMoving = false;
             // don't have to update the character position, because we're just
             // standing
             str.createFrameVarSizeWord(81);
             str.initBitAccess();
             if (updateRequired) {
                // tell client there's an update block appended at the end
                str.writeBits(1, 1);
                str.writeBits(2, 0);
             } else {
                str.writeBits(1, 0);
             }
             if (DirectionCount < 50) {
                DirectionCount++;
             }
          } else {
             
             DirectionCount = 0;
             str.createFrameVarSizeWord(81);
             str.initBitAccess();
             str.writeBits(1, 1);

             if (dir2 == -1) {
                isMoving = true;
                // send "walking packet"
                str.writeBits(2, 1);
                // updateType
                str.writeBits(3, misc.xlateDirectionToClient[dir1]);
                if (updateRequired)
                   str.writeBits(1, 1);
                // tell client there's an update block appended at the end
                else
                   str.writeBits(1, 0);
             } else {
                isMoving = true;
                // send "running packet"
                str.writeBits(2, 2);
                // updateType
                str.writeBits(3, misc.xlateDirectionToClient[dir1]);
                str.writeBits(3, misc.xlateDirectionToClient[dir2]);
                if (updateRequired)
                   str.writeBits(1, 1);
                // tell client there's an update block appended at the end
                else
                   str.writeBits(1, 0);
                if (playerEnergy > 0) {
                   playerEnergy -= 1;
                } else {
                   isRunning2 = false;
                }
             }
          }

       }


    Save and compile.

    Credits: Patrickftww, Minutes.

    Note : This maybe a little bugged but it fixes that run bugg with melee.

      Similar topics

      -

      Current date/time is Fri May 10, 2024 12:20 pm