If you still haven't updated to latest version of K Relay, now is a great time to do so. I've included a separate download for the newest version of K Relay, compiled and ready for use. This download also includes AntiLag.
If there are still any plugins that haven't been updated, you may request for updating them in this thread. Please include a link to the original post in your request.
using Lib_K_Relay;
using Lib_K_Relay.Interface;
using Lib_K_Relay.Networking;
using Lib_K_Relay.Networking.Packets;
using Lib_K_Relay.Networking.Packets.Server;
namespace AntiLag
{
public class AntiLag : IPlugin
{
public string GetAuthor()
{
return "059";
}
public string GetName()
{
return "AntiLag";
}
public string GetDescription()
{
return "Blocks certain packets which contribute significantly to lagging your client.";
}
public string[] GetCommands()
{
return new string[0];
}
private void OnShowEffect(Client client, Packet packet)
{
ShowEffectPacket sep = (ShowEffectPacket)packet;
switch ((int)sep.EffectType)
{
case 5:
if (sep.TargetId != client.ObjectId)
packet.Send = false;
break;
case 1:
case 2:
case 6:
case 7:
case 8:
case 9:
case 10:
case 12:
case 17:
case 18:
case 19:
packet.Send = false;
break;
}
}
Edit: People didn't seem too thrilled about me removing all the commands so I created a second version with commands for toggling everything.
Code:
using Lib_K_Relay;
using Lib_K_Relay.Interface;
using Lib_K_Relay.Utilities;
using Lib_K_Relay.Networking;
using Lib_K_Relay.Networking.Packets;
using Lib_K_Relay.Networking.Packets.Server;
namespace AntiLag
{
public class AntiLag : IPlugin
{
private bool[] active = { true, true, true};
public string GetAuthor()
{
return "059";
}
public string GetName()
{
return "AntiLag";
}
public string GetDescription()
{
return "Blocks certain packets which contribute significantly to lagging your client.\n\n/al ally toggles allied projectiles\n/al damage toggles the damage display on allies\n/al particle toggles particle effects succh as necromancer skull\n/al toggles them all";
}
public string[] GetCommands()
{
return new string[]
{
"/al <ally:damage:particle>"
};
}
private void OnShowEffect(Client client, Packet packet)
{
if (active[2])
{
ShowEffectPacket sep = (ShowEffectPacket)packet;
switch ((int)sep.EffectType)
{
case 5:
if (sep.TargetId != client.ObjectId)
packet.Send = false;
break;
case 1:
case 2:
case 6:
case 7:
case 8:
case 9:
case 10:
case 12:
case 17:
case 18:
case 19:
packet.Send = false;
break;
}
}
}