What's the correct way to make attack only appear in wilderness?
Code:
private boolean Attack = false;
public void attackButton() {
if (!isInWilderness() && Attack) {
outStream.createFrameVarSize(104);
outStream.writeByteC(3);
outStream.writeByteA(0);
outStream.writeString("null");
outStream.endFrameVarSize();
Attack = false;
} else if (isInWilderness() && !Attack) {
outStream.createFrameVarSize(104);
outStream.writeByteC(3);
outStream.writeByteA(0);
outStream.writeString("Attack");
outStream.endFrameVarSize();
Attack = true;
}
}
Conditions to work fully:
In initialize set Attack to true if they are in the wilderness
And then just put attackButton(); in some sort of process.
Improvement?