Tired of AFK players just standing at home?
This is a small snippet that will make the player: do push ups, sit ups, star jumps and jog on the place when AFK.
Simple enough, just replace your IdleLogout (server.model.players.packets) class with this:
Code:
public class IdleLogout implements PacketType {
int[] emotes = {2756, 2761, 2763, 2764};
@Override
public void processPacket(Client c, int packetType, int packetSize) {
if (c.membership) {
c.startAnimation(emotes[Misc.random((emotes.length - 1))]);
}
}
}
If you don't have a boolean called "membership" or just want all players to do this, use this:
Code:
public class IdleLogout implements PacketType {
int[] emotes = {2756, 2761, 2763, 2764};
@Override
public void processPacket(Client c, int packetType, int packetSize) {
//if (c.membership) {
c.startAnimation(emotes[Misc.random((emotes.length - 1))]);
//}
}
}
Originally Posted by
Verisimilitude
Not to be a smart ass or anything, but I think you forgot to tell them to import this
Code:
import core.utility.Misc;
or wherever they place the file at.