public class Killaura extends Module {
public Killaura() {
super("Killaura", Keyboard.KEY_X, Category.Combat);
}
int delay;
public void onUpdate() {
List list = Wrapper.mc.theWorld.playerEntities;
delay++;
for (int k = 0; k < list.size(); k++) {
if (((EntityPlayer) list.get(k)).getName() == mc.thePlayer.getName()) {
continue;
}
EntityPlayer entityplayer = (EntityPlayer) list.get(1);
if (mc.thePlayer.getDistanceToEntity(entityplayer) > mc.thePlayer.getDistanceToEntity((Entity) list.get(k))) {
entityplayer = (EntityPlayer) list.get(k);
}
float f = mc.thePlayer.getDistanceToEntity(entityplayer);
if (f < 4F && mc.thePlayer.canEntityBeSeen(entityplayer) && delay > 7) {
mc.playerController.attackEntity(Wrapper.mc.thePlayer, entityplayer);
mc.thePlayer.swingItem();
delay = 0;
continue;
}
}
super.onUpdate();
}
}