Well, I'm reposting this, as my other topic should have no been locked.
I am removing that topic and adding this as it will not get locked as it's not C+P AND all my codes use Conventions.

POST POST POST OR THIS WILL BE REMOVED!

Difficulty: 2/10

What this does:

● Player Faces NPC while fighting.
● Player Faces Player when PKing.
● Makes a better way to Combat/Kill to make it look updated.
● A Base for Following.

Tested on:
● Kidzscape V1
● My new project "WorldEnd".
● Devolution V7 & V6 & V8

Okay, first of all this will explain to you.
You need to do this on your own as well sometimes.
The spoil's will be At the Bottom.

Term's To Know:
__________________________________________________ __________________________________________

● AttackingOn2 = Player VS. Player Belongs to boolean attack()
● AttackingOn2 = This is a second way for attacking on, on NPC's,Belongs to Boolean attackNPC()
● faceNPC = Do NOT Capitialize the NPC as it's in "(" & ")".

Places' to Add:
__________________________________________________ __________________________________________

● AttackingOn = Player Vs. Player. Belongs to Boolean attack();

● NPCSlot = First Click NPC/Second/Third

Something to know:
__________________________________________________ __________________________________________

● Some are NOT from scratch, as I did TuT's before making that part FaceNPC'D.

__________________________________________________ __________________________________________

Kay, let's start.

Go into your Player.Java

You should know what a Class file is by Now.
Search for ClearUpdateFlags Method.

You should Replace that whole method with this.

Code:
	public void clearUpdateFlags() { 
		updateRequired = false;
		chatTextUpdateRequired = false;
		appearanceUpdateRequired = false;
		hitUpdateRequired = false;
		dirUpdateRequired = false;
		FocusPointX = FocusPointY = -1;
		dirUpdate2Required = false;
		faceNPCupdate = false;
		faceNPC = 65535;
		mask100update = false;
		IsStair = false;
	}
I will explain this part.
First ALWAYS use Java coding Conventions.

Do you see:
faceNPCupdate = false;
faceNPC = 65535;
You can see this part is All about what I am talking about.
It needs to update the Flags to FaceNPC and the Number for Facing NPC is apparently, "65535".

Now the method so the faceNPC will work.

Add this method right under ClearUpdateFlags.
Now onto the Method.
Code:
public void faceNPC(int index) {
                		faceNPC = index;
                		faceNPCupdate = true;
                		updateRequired = true;
        	}
       	 	        protected boolean faceNPCupdate = false;
        		public int faceNPC = -1;
       	 	        public void appendFaceNPCUpdate(stream str) {
                		str.writeWordBigEndian(faceNPC);
        	}
This Makes the faceNPC acctually work, without it, this whole tutorial would be worthless.

Add this where I said, Attackingon2 would be put mostly.
It is all the way above of the list.
HINT: this is Player Vs.Player as some would know PVP

Code:
faceNPC(32768 + AttackingOn);
Now we go onto the other method of Attacking on
Code:
		faceNPC(32768 + AttackingOn);
What does this method do, you face an NPC.
Instead of PVP this is NVP.
You can figure out where these all go.

Find

Code:
server.npcHandler.npcs[attacknpc].hit = true;
Under it:
Code:
				faceNPC(attacknpc);
You should know it says, " attackNPC ", you should automatically know where it goes.
Under,
Case 155:
In
Code:
				println_debug("atNPC 1: " + NPCID);
Above that:
Code:
	    			faceNPC(NPCSlot);
Now it's your choice, under or ABove the if else statement?
We talked about this, your choice.
Credits'
Bakatool for the source 55%ish (he only get's percent credits )
KillaMess for the first Numbers, I used his and Linuxes player Following one.
I found out the attackingon by myself.
Delta for the NPCSlot would've never thought of that..lol
Me for the rest, as I figured it out.