Hello guys - this is my first post and first time making packet hacks.
Can I just say - the Kronks' K Relay program is absolutely amazing!
It's extremely lightweight and its API is just so awesome (when compared to Realm Relay, for example)
What is the Plugin?
This is my first ever K Relay plugin - Oryx Hears Everything.
It's not very useful - just a little plugin I made in C#
Basically - if you say that Oryx is fat in the chat - Oryx will demand you to take that back.
Why?
I'm releasing the source code here so if anyone wants to use it as a template or something, they can.
Even if you have never done this sort of thing before - I highly recommend you to try it out.
The API is very easy to learn. If you think of making K Relay plugins, I recommend you check
out the oficial K Relay documentation.
The Code
Code:
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.Client;
using Lib_K_Relay.Networking.Packets.DataObjects;
using Lib_K_Relay.Networking.Packets.Server;
using Lib_K_Relay.Utilities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PixelZerg
{
public class MyPlugin : IPlugin
{
private bool _enabled = true;
public string GetAuthor()
{ return "PixelZerg"; }
public string GetName()
{ return "Oryx Hears Everything"; }
public string GetDescription()
{ return "If you say that Oryx is fat he WILL hear you! - he is god after all."; }
public string[] GetCommands()
{ return new string[] { "/oryxhears enable:disable" }; }
public void Initialize(Proxy proxy)
{
proxy.HookCommand("oryxhears", OnMyPluginCommand);
proxy.HookPacket(PacketType.PLAYERTEXT, OnPlayerText);
}
private void OnMyPluginCommand(Client client, string command, string[] args)
{
if (args.Length == 0) return;
if (args[0] == "enable")
{
_enabled = true;
client.SendToClient(PluginUtils.CreateOryxNotification(
"Oryx the Mad God", "I'm listening ;)"));
}
if (args[0] == "disable")
{
_enabled = false;
client.SendToClient(PluginUtils.CreateOryxNotification(
"Oryx the Mad God", "Argh! I've gone deaf!"));
}
}
private void OnPlayerText(Client client, Packet packet)
{
if (!_enabled) return;
PlayerTextPacket playerText = (PlayerTextPacket)packet;
String s1 = playerText.Text;
String s2 = "fat";
String s3 = "oryx";
bool insult1;
bool insult2;
insult1 = s1.Contains(s2);
insult2 = s1.Contains(s3);
if (insult1 == true && insult2 == true)
{
// System.Threading.Thread.Sleep(1000);
client.SendToClient(PluginUtils.CreateOryxNotification(
"Oryx the Mad God", "Fool! I can hear EVERYTHING you are saying about me!"));
client.SendToClient(PluginUtils.CreateOryxNotification(
"Oryx the Mad God", "You said '" + playerText.Text + "' TAKE THAT BACK!!"));
}
}
}
}
Legal
Oryx Hears Evertything by PixelZerg is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.
To view the full copy of the license, please google it (I cannot post links here)
To attribute just give a link to this page.
DO NOT Change the Author name!
Virus Scans
virusscan.jotti.org/en/scanresult/0122f55798fe1a723b39ca99ca433c704cb881a4
virustotal.com/uk/file/1ed8d1fa53d6683317ab25b8e41c1b743239e48bc5af7ce6f7 315fd010978433/analysis/1431370438/
Download
Please find attached the fully compiled .dll file for the script and several screenshots. Just place the dll in your K Relay plugin folder