WinkK Relay Plugin - Oryx Hears Everything

Posts 1–15 of 16 · Page 1 of 2
K Relay Plugin - Oryx Hears Everything
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
ROTMG-K Relay_mpgh.net.zip3 KB · 159 downloads Clean
This is by far the most polite and well-written release I've seen over here

But yes, completely useless
Quote Originally Posted by Zasx View Post
This is by far the most polite and well-written release I've seen over here

But yes, completely useless
Seriously? Thanks! Yep - it is indeed useless
Approved
Thanks for the support!
Quote Originally Posted by krazyshank View Post
Approved
Thanks for the support!
I really didn't think this would be approved lol
Quote Originally Posted by Solvi View Post
Everyone will think you're a weirdo if you keep saying "Oryx you're a fatty" in the chat lmao


Anyways nice plugin
It would be funny

Quote Originally Posted by Zasx View Post
This is by far the most polite and well-written release I've seen over here

But yes, completely useless
Right.... tottaly

Quote Originally Posted by krazyshank View Post
Approved
Thanks for the support!
Kewl Bro

Quote Originally Posted by pixelzerg View Post
I really didn't think this would be approved lol
Why dint you thinkk so :P ?
can you make a cloack timer for k relay? please
Quote Originally Posted by mateo_gon View Post
can you make a cloack timer for k relay? please
Yeah we need cloak timer. I found one but its .js and not .dll so i wont work on K Relay. If you could remake one for K-R would be very nice

//cloaktimer.js

var ID_NOTIFICATION = $.findPacketId("NOTIFICATION");
var ID_CREATE_SUCCESS = $.findPacketId("CREATE_SUCCESS");
var ID_USEITEM = $.findPacketId("USEITEM");

var playerId = -1;

function onClientPacket(event) {
var packet = event.getPacket();
switch (packet.id()) {
case ID_USEITEM: {
if (packet.slotObject.objectType == 2646) {
cloakTimer(event, 0);
} else if (packet.slotObject.objectType == 2647) {
cloakTimer(event, 1);
} else if (packet.slotObject.objectType == 3109 || packet.slotObject.objectType == 2648) {
cloakTimer(event, 2);
} else if (packet.slotObject.objectType == 2779) {
cloakTimer(event, 3);
} else if (packet.slotObject.objectType == 2649) {
cloakTimer(event, 4);
} else if (packet.slotObject.objectType == 2785 || packet.slotObject.objectType == 2855 || packet.slotObject.objectType == 2650) {
cloakTimer(event, 5);
}
break;
}
}
}

function onServerPacket(event) {
var packet = event.getPacket();
switch (packet.id()) {
case ID_CREATE_SUCCESS: {
playerId = packet.objectId;
break;
}
}
}

function displayNotification(event, playerObjectId, color, text) {
var notificationPacket = event.createPacket(ID_NOTIFICATION);
notificationPacket.objectId = playerObjectId;
notificationPacket.message = "{\"key\":\"blank\",\"tokens\":{\"data\":\"" + text + "\"}}";
notificationPacket.color = color;
event.sendToClient(notificationPacket);
}

function cloakTimer(event, cloak) {
var sec = ["5.5","5.0","4.5","4.0","3.5","3.0","2.5","2.0","1 .5","1.0","0.5","0.0"];
var sec2 = 0.0;
var colors = [0x30FF00,0x50FF00,0x70FF00,0xB0FF00,0xD0FF00,0xF0F F00,0xFFD000,0xFFB000,0xFF9000,0xFF5000,0xFF3000,0 xFF1000];
for (var i = 5 - cloak; i < sec.length; i++) {
$.scheduleEvent(sec2, "displayNotification", playerId, colors[i], sec[i]);
sec2 += 0.5;
}
}
Everyone will think you're a weirdo if you keep saying "Oryx you're a fatty" in the chat lmao


Anyways nice plugin
would use this
srsly, why does this - my first ever plugin - have more views than my tradebot?
Wait a second! I thought ROTMG blocks the word oryx because they think you are advertising :P
i saw you today in-game. just a little tip bro, don't make your forum acc name that ur releasing these hacks with the same as your rotmg name. sooner or later your going to be banned.
Posts 1–15 of 16 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us