Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › Realm of the Mad God Hacks & Cheats › Realm of the Mad God Tutorials & Source Code › OUTDATED - [Realm Relay] Event Notifier script

OUTDATED - [Realm Relay] Event Notifier script

Posts 1–15 of 21 · Page 1 of 2
IZ
IziLife
OUTDATED - [Realm Relay] Event Notifier script
Update :
The script now works as intended

TODO :
- Sound notification


First of all i wanna say a BIG THANK YOU TO @DeVoidCoder for your amazing app !


Here is my event notifier script, it took me time to wrote it so at least say thank you :3

Feel free to edit/improve it, don't forget to post your modification here






 
EventNotif.js
Code:
//EventNotif.js

var ID_TEXT = 20;
var ID_NOTIFICATION = 91;
var ID_PLAYER_TEXT = 80;

var ID_PLAYER_HIT = 26;
var ID_CREATE_SUCCESS = 47;

var playerObjectId = -1 ;

// colors
    var white = 0xFFFFFF;
    var black = 0x000000;
    var lightGrey = 0xC0C0C0;
    var grey = 0x808080;
    var red = 0xFF0000;
    var orange = 0xF0A804;
    var yellow = 0xFFFF00;
    var green = 0x008000;
    var blue = 0x0000FF;
    var purple = 0x800080;



// Crystal
    var Crystal = [
        "Sweet treasure awaits for powerful adventurers!",
        "I think you need more people...",
        "If you are not very strong, this could kill you"
    ];
    var CrystalBroke = [
        "You cracked the crystal! Soon we shall emerge! You might want to BACK AWAY..!!"
    ];

// Sphinx
    var Sphinx = [
        "At last, a Grand Sphinx will teach you to respect!",
        "A Grand Sphinx is more than a match for this rabble.",
        "My Grand Sphinxes will bewitch you with their beauty!"
    ];

    var lastSphinx = [
        "You festering rat-catchers! A Grand Sphinx will make you doubt your purpose!",
        "Gaze upon the beauty of the Grand Sphinx and feel your last hopes drain away."
    ];


    var SphinxDead = [
         "My Grand Sphinx, she was so beautiful. I will kill you myself",
         "My Grand Sphinx had lived for thousands of years!",
         "you up-jumped goat herder! You shall pay for defeating my Grand Sphinx!",
         "you pestiferous lout! I will not forget what you did to my Grand Sphinx!",
         "you foul ruffian! Do not think I forget your defiling of my Grand Sphinx!"
    ];

// Hermit
    var Hermit = [
        "My Hermit God's thousand tentacles shall drag you to a watery grave!"
    ];
    var HermitDead = [
        "My Hermit God was more than you'll ever be",
        "Without my Hermit God, Dreadstump is free to roam the seas without fear!"
    ];

// Ship
    var Ship = [
        "My Ghost Ship will terrorize you pathetic peasants!",
        "A Ghost Ship has entered the Realm."
    ];
    var ShipDead = [
        "defeat my dreaded Ghost Ship?!",
        "has crossed me for the last time! My Ghost Ship shall be avenged.",
        "The spirits of the sea will seek revenge on your worthless soul"
    ];

// Skull Shrine

    var Skull = [
        "Your futile efforts are no match for a Skull Shrine!"
    ];
    var SkullDead = [
        "defaced a Skull Shrine! Minions, to arms!",
        "razed one of my Skull Shrines -- I WILL HAVE MY REVENGE!",
        "you will rue the day you dared to defile my Skull Shrine!",
        "you contemptible pig! Ruining my Skull Shrine will be the last mistake you ever make!",
        "{PLAYER}, you insignificant cur! The penalty for destroying a Skull Shrine is death!"
    ];

// Cube

    var Cube = [
        "Your meager abilities cannot possibly challenge a Cube God!",
        "Worthless mortals! A mighty Cube God defends me!"
    ];
    var CubeDead = [
        "You have dispatched my Cube God",
        "I have many more Cube Gods",
        "you wretched dog! You killed my Cube God!",
        "you pathetic swine! How dare you assault my Cube God!"
    ];

// Pentaract

    var Pentaract = [
        "Behold my Pentaract, and despair!",
        "Ignorant fools! A Pentaract guards me still!"
    ];
    var PentaractDead = [
        "That was but one of many Pentaracts",
        "you destoryed my Pentaract!",
        "by destroying my Pentaract you have sealed your own doom!"
    ];

// Lord
    var Lord = [
        "Pathetic fools! My Lord of the Lost Lands will crush you all!",
        "My Lord of the Lost Lands will make short work of you!"
    ];
    var LordDead = [
        "How dare you foul-mouthed hooligans treat my Lord of the Lost Lands with such indignity!",
        "What trickery is this?! My Lord of the Lost Lands was invincible!"
    ];

// lich
    var finalLich = [
        "My final Lich shall consume your souls!",
        "My final Lich will protect me forever!"
    ];






function onServerPacket(event) {
    
    var packet = event.getPacket();

    // Get the PlayerID
    if (packet.id() == ID_CREATE_SUCCESS) {
        playerObjectId = packet.objectId;
        event.echo("Player OID: " + playerObjectId);
    }

    
    
    if (packet.id() == ID_TEXT) {
    

        var text = packet.text;
            
            // Events    
                // Crystal
                    for (var c = 0; c < Crystal.length; c++) {
                        if (text.indexOf(Crystal[c]) != -1) {
                            
                        event.scheduleEvent(1, "displayCrystal", playerObjectId);
                            //displayCrystal(event, playerObjectId);        
                            break;
                        }
                    }
                    for (var cb = 0; cb < CrystalBroke.length; cb++) {
                        if (text.indexOf(CrystalBroke[cb]) != -1) {
                            event.scheduleEvent(1, "displayCrystalBroke", playerObjectId);
                            break;
                        }
                    }

                // Sphinx
                    for (var s = 0; s < Sphinx.length; s++) {
                        if (text.indexOf(Sphinx[s]) != -1) {                                        
                            event.scheduleEvent(1, "displaySphinx", playerObjectId);                    
                            break;
                        }
                    }
                    for (var ls = 0; ls < lastSphinx.length; ls++) {    
                        if (text.indexOf(lastSphinx[ls]) != -1) {
                            event.scheduleEvent(1, "displaylastSphinx", playerObjectId);
                            break;
                        }
                    }
                    for (var sd = 0; sd < SphinxDead.length; sd++) {
                        if (text.indexOf(SphinxDead[sd]) != -1) {
                            event.scheduleEvent(1, "displaySphinxDead", playerObjectId);
                            break;
                        }
                    }

                // Hermit
                    for (var h = 0; h < Hermit.length; h++) {
                        if (text.indexOf(Hermit[h]) != -1) {                                        
                            event.scheduleEvent(1, "displayHermit", playerObjectId);                    
                            break;
                        }
                    }
                    for (var hd = 0; hd < HermitDead.length; hd++) {    
                        if (text.indexOf(HermitDead[hd]) != -1) {
                            event.scheduleEvent(1, "displayHermitDead", playerObjectId);
                            break;
                        }                
                    }
                // Ship
                    for (var sh = 0; sh < Ship.length; sh++) {
                        if (text.indexOf(Ship[sh]) != -1) {                                        
                            event.scheduleEvent(1, "displayShip", playerObjectId);                    
                            break;
                        }
                    }
                    for (var shd = 0; shd < ShipDead.length; shd++) {    
                        if (text.indexOf(ShipDead[sh]) != -1) {
                            event.scheduleEvent(1, "displayShipDead", playerObjectId);
                            break;
                        }                
                    }
                // Skull
                    for (var sk = 0; sk < Skull.length; sk++) {
                        if (text.indexOf(Skull[sk]) != -1) {                                        
                            event.scheduleEvent(1, "displaySkull", playerObjectId);                    
                            break;
                        }
                    }
                    for (var skd = 0; skd < SkullDead.length; skd++) {
                        if (text.indexOf(SkullDead[skd]) != -1) {
                            event.scheduleEvent(1, "displaySkullDead", playerObjectId);
                            break;
                        }                        
                    }
                // Cube
                    for (var cu = 0; cu < Cube.length; cu++) {
                        if (text.indexOf(Cube[cu]) != -1) {                                        
                            event.scheduleEvent(1, "displayCube", playerObjectId);                    
                            break;
                        }
                    }
                    for (var cud = 0; cud < CubeDead.length; cud++) {    
                        if (text.indexOf(CubeDead[cud]) != -1) {
                            event.scheduleEvent(1, "displayCubeDead", playerObjectId);
                            break;
                        }                        
                    }
                // Penta
                    for (var p = 0; p < Pentaract.length; p++) {
                        if (text.indexOf(Pentaract[p]) != -1) {                                        
                            event.scheduleEvent(1, "displayPentaract", playerObjectId);                    
                            break;
                        }
                    }
                    for (var pd = 0; pd < PentaractDead.length; pd++) {    
                        if (text.indexOf(PentaractDead[pd]) != -1) {
                            event.scheduleEvent(1, "displayPentaractDead", playerObjectId);
                            break;
                        }                        
                    }
                // Lord
                    for (var l = 0; l < Lord.length; l++) {
                        if (text.indexOf(Lord[l]) != -1) {                                        
                            event.scheduleEvent(1, "displayLord", playerObjectId);                    
                            break;
                        }
                    }
                    for (var ld = 0; ld < LordDead.length; ld++) {    
                        if (text.indexOf(LordDead[ld]) != -1) {
                            event.scheduleEvent(1, "displayLordDead", playerObjectId);
                            break;
                        }                        
                    }
                // Lich
                    for (var fl = 0; fl < finalLich.length; fl++) {
                        if (text.indexOf(finalLich[fl]) != -1) {                                        
                            event.scheduleEvent(1, "displayfinalLich", playerObjectId);                    
                            break;
                        }
                    }
                

    }
}










// Play a sound
        function playSound(event) {

                }



// Display a message onScreen




    // Crystal
        function displayCrystal(event, playerObjectId) {
            var notificationPacket = event.createPacket(ID_NOTIFICATION);
            notificationPacket.objectId = playerObjectId;
            notificationPacket.message = "{\"key\":\"blank\",\"tokens\":{\"data\":\"Crystal somewhere!\"}}";
            notificationPacke*****lor = 0x33FFFF;
            event.sendToClient(notificationPacket);
        }
        function displayCrystalBroke(event, playerObjectId) {
            var notificationPacket = event.createPacket(ID_NOTIFICATION);
            notificationPacket.objectId = playerObjectId;
            notificationPacket.message = "{\"key\":\"blank\",\"tokens\":{\"data\":\"Crystal is Broken, Hurry Up!\"}}";
            notificationPacke*****lor = 0x33FFFF;
            event.sendToClient(notificationPacket);
        }

    // Sphinx
        function dispaySphinx(event, playerObjectId) {
            var notificationPacket = event.createPacket(ID_NOTIFICATION);
            notificationPacket.objectId = playerObjectId;
            notificationPacket.message = "{\"key\":\"blank\",\"tokens\":{\"data\":\"Sphinx somewhere!\"}}";
            notificationPacke*****lor = 0x33FFFF;
            event.sendToClient(notificationPacket);
        }
        function displaylastSphinx(event, playerObjectId) {
            var notificationPacket = event.createPacket(ID_NOTIFICATION);
            notificationPacket.objectId = playerObjectId;
            notificationPacket.message = "{\"key\":\"blank\",\"tokens\":{\"data\":\"The last Sphinx spawned!\"}}";
            notificationPacke*****lor = 0x33FFFF;
            event.sendToClient(notificationPacket);
        }
        function displaySphinxDead(event, playerObjectId) {
            var notificationPacket = event.createPacket(ID_NOTIFICATION);
            notificationPacket.objectId = playerObjectId;
            notificationPacket.message = "{\"key\":\"blank\",\"tokens\":{\"data\":\"A Sphinx Died!\"}}";
            notificationPacke*****lor = 0x33FFFF;
            event.sendToClient(notificationPacket);
        }

    // Hermit
        function displayHermit(event, playerObjectId) {
            var notificationPacket = event.createPacket(ID_NOTIFICATION);
            notificationPacket.objectId = playerObjectId;
            notificationPacket.message = "{\"key\":\"blank\",\"tokens\":{\"data\":\"Hermit somewhere!\"}}";
            notificationPacke*****lor = 0x33FFFF;
            event.sendToClient(notificationPacket);
        }
        function displayHermitDead(event, playerObjectId) {
            var notificationPacket = event.createPacket(ID_NOTIFICATION);
            notificationPacket.objectId = playerObjectId;
            notificationPacket.message = "{\"key\":\"blank\",\"tokens\":{\"data\":\"Hermit Died!\"}}";
            notificationPacke*****lor = 0x33FFFF;
            event.sendToClient(notificationPacket);
        }

    // Ship
        function displayShip(event, playerObjectId) {
            var notificationPacket = event.createPacket(ID_NOTIFICATION);
            notificationPacket.objectId = playerObjectId;
            notificationPacket.message = "{\"key\":\"blank\",\"tokens\":{\"data\":\"Ghost Ship somewhere!\"}}";
            notificationPacke*****lor = 0x33FFFF;
            event.sendToClient(notificationPacket);
        }
        function displayShipDead(event, playerObjectId) {
            var notificationPacket = event.createPacket(ID_NOTIFICATION);
            notificationPacket.objectId = playerObjectId;
            notificationPacket.message = "{\"key\":\"blank\",\"tokens\":{\"data\":\"Ghost Ship Died!\"}}";
            notificationPacke*****lor = 0x33FFFF;
            event.sendToClient(notificationPacket);
        }

    // Skull
        function displaySkull(event, playerObjectId) {
            var notificationPacket = event.createPacket(ID_NOTIFICATION);
            notificationPacket.objectId = playerObjectId;
            notificationPacket.message = "{\"key\":\"blank\",\"tokens\":{\"data\":\"Skull Shrine somewhere!\"}}";
            notificationPacke*****lor = 0x33FFFF;
            event.sendToClient(notificationPacket);
        }
        function displaySkullDead(event, playerObjectId) {
            var notificationPacket = event.createPacket(ID_NOTIFICATION);
            notificationPacket.objectId = playerObjectId;
            notificationPacket.message = "{\"key\":\"blank\",\"tokens\":{\"data\":\"Skull Shrine Died!\"}}";
            notificationPacke*****lor = 0x33FFFF;
            event.sendToClient(notificationPacket);
        }

    // Cube
        function displayCube(event, playerObjectId) {
            var notificationPacket = event.createPacket(ID_NOTIFICATION);
            notificationPacket.objectId = playerObjectId;
            notificationPacket.message = "{\"key\":\"blank\",\"tokens\":{\"data\":\"Cube God somewhere!\"}}";
            notificationPacke*****lor = 0x33FFFF;
            event.sendToClient(notificationPacket);
        }
        function displayCubeDead(event, playerObjectId) {
            var notificationPacket = event.createPacket(ID_NOTIFICATION);
            notificationPacket.objectId = playerObjectId;
            notificationPacket.message = "{\"key\":\"blank\",\"tokens\":{\"data\":\"Cube God Died!\"}}";
            notificationPacke*****lor = 0x33FFFF;
            event.sendToClient(notificationPacket);
        }

    // Penta
        function displayPentaract(event, playerObjectId) {
            var notificationPacket = event.createPacket(ID_NOTIFICATION);
            notificationPacket.objectId = playerObjectId;
            notificationPacket.message = "{\"key\":\"blank\",\"tokens\":{\"data\":\"Pentaract somewhere!\"}}";
            notificationPacke*****lor = 0x33FFFF;
            event.sendToClient(notificationPacket);
        }
        function displayPentaractDead(event, playerObjectId) {
            var notificationPacket = event.createPacket(ID_NOTIFICATION);
            notificationPacket.objectId = playerObjectId;
            notificationPacket.message = "{\"key\":\"blank\",\"tokens\":{\"data\":\"Pentaract Died!\"}}";
            notificationPacke*****lor = 0x33FFFF;
            event.sendToClient(notificationPacket);
        }

    // Lord
        function displayLord(event, playerObjectId) {
            var notificationPacket = event.createPacket(ID_NOTIFICATION);
            notificationPacket.objectId = playerObjectId;
            notificationPacket.message = "{\"key\":\"blank\",\"tokens\":{\"data\":\"Lord of The Lost Lands somewhere!\"}}";
            notificationPacke*****lor = 0x33FFFF;
            event.sendToClient(notificationPacket);
        }
        function displayLordDead(event, playerObjectId) {
            var notificationPacket = event.createPacket(ID_NOTIFICATION);
            notificationPacket.objectId = playerObjectId;
            notificationPacket.message = "{\"key\":\"blank\",\"tokens\":{\"data\":\"Lord of The Lost Lands Died!\"}}";
            notificationPacke*****lor = 0x33FFFF;
            event.sendToClient(notificationPacket);
        }

    // Lich
        function displayfinalLich(event, playerObjectId) {
            var notificationPacket = event.createPacket(ID_NOTIFICATION);
            notificationPacket.objectId = playerObjectId;
            notificationPacket.message = "{\"key\":\"blank\",\"tokens\":{\"data\":\"FINAL LICH !!!\"}}";
            notificationPacke*****lor = 0x33FFFF;
            event.sendToClient(notificationPacket);
        }
#1 · edited 12y ago · 12y ago
Zasx
Zasx
So this works with chat disabled too?
#2 · 12y ago
IZ
IziLife
Quote Originally Posted by Zasx View Post
So this works with chat disabled too?
I don't know, im gonna test

PS :
There is a little issue in the code i'm trying to fix it
#3 · 12y ago
Zasx
Zasx
Script seems to freeze itself after some time passed...
#4 · 12y ago
IZ
IziLife
The problem is the notification go on the sender, if you write "Sweet treasure awaits for powerful adventures!" it will add a notification for your player but if it's another one guy, it ill add the notification on him, same problem if the sender is oryx, so you can't see the notification even if the text was detected
@DeVoidCoder I need your help :3
#5 · 12y ago
DE
DeVoidCoder
To get the objectId of the player:

Code:
var ID_CREATE_SUCCESS = 47;

var playerObjectId = -1;

function onServerPacket(event) {
	var packet = event.getPacket();
	if (packet.id() == ID_CREATE_SUCCESS) {
		playerObjectId = packet.objectId;
	}
}
You can then use playerObjectId correctly in the rest of the script; I hope that helps.
#6 · 12y ago
IZ
IziLife
Quote Originally Posted by DeVoidCoder View Post
To get the objectId of the player:

Code:
var ID_CREATE_SUCCESS = 47;

var playerObjectId = -1;

function onServerPacket(event) {
	var packet = event.getPacket();
	if (packet.id() == ID_CREATE_SUCCESS) {
		playerObjectId = packet.objectId;
	}
}
You can then use playerObjectId correctly in the rest of the script; I hope that helps.
I already tried this, but it doesn't work

Code:
var packet = event.getPacket();
// Get the PlayerOID
	if (packet.id() == ID_CREATE_SUCCESS) {
		playerObjectId = playerObjectId;
		event.echo("Player OID: " + playerObjectId);
	}
It still return me -1 or what ever i've set as playerObjectId

Code:
19:10:43 Player OID: -1
#7 · edited 12y ago · 12y ago
DE
DeVoidCoder
you are setting playerObjectId = playerObjectId
#8 · 12y ago
IZ
IziLife
Quote Originally Posted by DeVoidCoder View Post
you are setting playerObjectId = playerObjectId
Oooops !! :3

It works fine now, thanks !
#9 · 12y ago
rikaieners
rikaieners
I liked the code, but as I put it on my client? and one more question, as was the final code?

ty and sy
i noob =P
#10 · 12y ago
IZ
IziLife
Quote Originally Posted by rikaieners View Post
I liked the code, but as I put it on my client? and one more question, as was the final code?

ty and sy
i noob =P
Thank you!

It works with RealmRelay
http://www.mpgh.net/forum/599-realm-...mg-17-2-a.html
#11 · 12y ago
Trollaux
Trollaux
You should have made it check what the name of the text sender was

EDIT: Wow you didnt even remove the + infront of the notification
#12 · 12y ago
Zasx
Zasx
Quote Originally Posted by Trollaux View Post
You should have made it check what the name of the text sender was

EDIT: Wow you didnt even remove the + infront of the notification
Not giving a shit about the plus, works good as it is.
#13 · 12y ago
Trollaux
Trollaux
Quote Originally Posted by Zasx View Post
Not giving a shit about the plus, works good as it is.
Wow thanks for responding angrily to someone giving you tips on how to improve. Its really simple on how to fix, but apparently you are ignorant to my other idea too.
#14 · 12y ago
Zasx
Zasx
Quote Originally Posted by Trollaux View Post


Wow thanks for responding angrily to someone giving you tips on how to improve. Its really simple on how to fix, but apparently you are ignorant to my other idea too.
That was anything but an angry response. A bit harsh maybe, but not angry. Also I see you are smart enough to write "ignorant" instead of "idiot", or "stupid", or "noob", or whatever. Sort of thanks for that.
#15 · 12y ago
Posts 1–15 of 21 · Page 1 of 2

Post a Reply

Similar Threads

  • Realm Relay Command Script!By angelofsilence123 in Realm of the Mad God Hacks & Cheats
    7Last post 12y ago
  • Event Notifier?By Windleton in Realm of the Mad God Discussions
    9Last post 13y ago
  • Realm Relay v1.0.0 - Proxy for RotMG 17.2By DeVoidCoder in Realm of the Mad God Hacks & Cheats
    126Last post 12y ago
  • PLEASE NEED HELP WITH REALM RElAYBy DANWARPER in Realm of the Mad God Help & Requests
    18Last post 12y ago
  • Realm Relay /wcBy Nisuxen in Realm of the Mad God Tutorials & Source Code
    5Last post 12y ago

Tags for this Thread

None