Description: Removing the attack option while not in the wilderness
Difficulty: 1/10
Assumed Knowledge: Copy and paste, knowing where to place things
Tested Server: Whitescape
Files/Classes Modified: Client
Procedure
Find
Code:
outStream.createFrameVarSize(104);
outStream.writeByteC(3); // command slot
outStream.writeByteA(0); // 0 or 1; 1 if command should be placed on top in context menu
outStream.writeString("Attack");
outStream.endFrameVarSize();
Or something similar. (It should be in run() or initialize())
Replace it all with..
rightClickCheck();
Now declare this method..
Code:
public void rightClickCheck() {
if(nonWild()) {
outStream.createFrameVarSize(104);
outStream.writeByteC(3); // command slot
outStream.writeByteA(0); // 0 or 1; 1 if command should be placed on top in context menu
outStream.writeString("null");
outStream.endFrameVarSize();
}
if(!nonWild()) {
outStream.createFrameVarSize(104);
outStream.writeByteC(3); // command slot
outStream.writeByteA(0); // 0 or 1; 1 if command should be placed on top in context menu
outStream.writeString("Attack");
outStream.endFrameVarSize();
}
}
And add this under process..
Compile and it should work fine. If you do not use the nonWild method replace it with the one you do use.
Credits: Me.
I posted this because alot of people ask about it.. :\ If this has been posted before I am sorry, I searched and could not find it.