QuestionSolvedbring back this hack please

Posts 115 of 22 · Page 1 of 2
bring back this hack please
this is a hack that used to be in rotmg ages ago
i was wondering if one of you guys could add it back in
(eggs are annoying me)

how do i add a picture without making anyone download it?
Quote Originally Posted by KieronZeCoder View Post
this is a hack that used to be in rotmg ages ago
i was wondering if one of you guys could add it back in
(eggs are annoying me)

how do i add a picture without making anyone download it?
Use imgur.com and then you can post the link.
Quote Originally Posted by HappyMan20 View Post
Use imgur.com and then you can post the link.
it says kieronzecoder you cant post links
Quote Originally Posted by KieronZeCoder View Post
it says kieronzecoder you cant post links
just post what's after the .com, or put spaces everywhere
Or even just describe the mod.
Quote Originally Posted by Zasx View Post
Or even just describe the mod.
All we know is that it's graphical. I'd guess it's the "display hp left instead damage taken" -mod
You're Mem Lvl 1 now, so you can post them.
Use IMG tags([IMG]---link---[/IMG])
there we go, i have posted the link for the picture
Oh. Loot notif. There's a script for that somewhere.
Can someone show me how to put that into this build? I'd love to see that back again :c
Quote Originally Posted by AQWMexi View Post
Can someone show me how to put that into this build? I'd love to see that back again :c
Download Realm Relay from the releases section.
Make a script called lootnotif.js using notepad and put the stuff inside the code tags inside that file. (Edit it with Notepad)
Put said file in the scripts folder. You're good to go.
Code:
// lootnotif.js

var ID_MOVE = $.findPacketId("MOVE");
var ID_UPDATE = $.findPacketId("UPDATE");
var ID_NEW_TICK = $.findPacketId("NEW_TICK");
var ID_CREATE_SUCCESS = $.findPacketId("CREATE_SUCCESS");
var ID_NOTIFICATION = $.findPacketId("NOTIFICATION");

var player_id = -1;
var playerLocation = null;
var lootbags = {};
var lootbaglocs = {};
var send_notif = true;

var tier = 11; // Minimum tier of items to be notifi'ied

var desirables = [
					0xa20, // Def Pot
					0xa1f, // Att Pot
					0xa21, // Spd Pot
					0xa34, // Vit Pot
					0xa35, // Wis Pot
					0xa4c, // Dex Pot
					0xae9, // Life Pot
					0xaea, // Mana Pot
					0xadd, // Minor Health Potion
					0xab0, // Minor Magic Potion
					0xa22, // Health Potion
					0xa23  // Magic Potion
				];

function onClientPacket(event) {
	var packet = event.getPacket();
	switch (packet.id()) {
		case ID_MOVE: {
			var time = packet.time;
			playerLocation = packet.newPosition;

			if(send_notif){
				for(var bag in lootbags){
					if(lootbaglocs[bag].distanceSquaredTo(playerLocation) <= 200){
						var params = {} 
						toNotif = "";

						for(var idx in lootbags[bag]){
							if(lootbags[bag][idx] != -1){
								var item = $.findItem(lootbags[bag][idx]);
								toNotif += "\\n" + item.id
							}
						}
						if(toNotif == ""){
							continue;
						}
						this.displayNotification(event,bag,0x00ffff,toNotif);						
					}
				}
				send_notif = false;
				$.scheduleEvent(2, "refresh_notif");
			}
			
			break;
		}
	}
}

function onServerPacket(event) {
	var packet = event.getPacket();
	switch (packet.id()) {
		case ID_CREATE_SUCCESS: {
			player_id = packet.objectId;
			break;
		}
		case ID_UPDATE: {
			// New objects
			for (var i = 0; i < packet.newObjs.length; i++) {
				var objectData = packet.newObjs[i];
				if(objectData == null)
					break;

				var type = objectData.objectType;

				if(type == 1280 || type == 1283 || (type >= 1286 && type <= 1296)){
					// new loot bag
					var bagId = objectData.status.objectId;
					lootbags[bagId] = [-1,-1,-1,-1,-1,-1,-1,-1];
					lootbaglocs[bagId] = objectData.status.pos;

					for (var j = 0; j < objectData.status.data.length; j++){
						var statData = objectData.status.data[j];
						if(statData.obf0 >= 8 && statData.obf0 <= 15){
							if(statData.obf1 != -1){
								var item = $.findItem(statData.obf1);

								if(item.tier >= tier || item.bagType == 4 || desirables.indexOf(statData.obf1) != -1){
									lootbags[bagId][statData.obf0 - 8] = statData.obf1;
								}
							}

						}
					}

				}
			}

			// Removed objects
			for (var i = 0; i < packet.drops.length; i++) {
				var droppedObjectId = packet.drops[i];

				if(lootbags[droppedObjectId] != null){
					delete lootbags[droppedObjectId];
					delete lootbaglocs[droppedObjectId];		
				}
			}

			break;
		}
		case ID_NEW_TICK: {
			for (var i = 0; i < packet.statuses.length; i++) {
				var status = packet.statuses[i];

				if(lootbags[status.objectId] != null){
					for (var j = 0; j < status.data.length; j++){
						var statData = status.data[j];
						if(statData.obf0 >= 8 && statData.obf0 <= 15){
							if(statData.obf1 == -1){
								lootbags[status.objectId][statData.obf0 - 8] = statData.obf1;
							}else{
								var item = $.findItem(statData.obf1);

								if(item.tier >= tier || item.bagType == 4 || desirables.indexOf(statData.obf1) != -1){
									lootbags[status.objectId][statData.obf0 - 8] = statData.obf1;
								}
							}

						}
					}
				}
			}
			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 refresh_notif(event) {
	send_notif = true;
}
Quote Originally Posted by paradoxial View Post
Download Realm Relay from the releases section.
Make a script called lootnotif.js using notepad and put the stuff inside the code tags inside that file. (Edit it with Notepad)
Put said file in the scripts folder. You're good to go.
Code:
// lootnotif.js

var ID_MOVE = $.findPacketId("MOVE");
var ID_UPDATE = $.findPacketId("UPDATE");
var ID_NEW_TICK = $.findPacketId("NEW_TICK");
var ID_CREATE_SUCCESS = $.findPacketId("CREATE_SUCCESS");
var ID_NOTIFICATION = $.findPacketId("NOTIFICATION");

var player_id = -1;
var playerLocation = null;
var lootbags = {};
var lootbaglocs = {};
var send_notif = true;

var tier = 11; // Minimum tier of items to be notifi'ied

var desirables = [
					0xa20, // Def Pot
					0xa1f, // Att Pot
					0xa21, // Spd Pot
					0xa34, // Vit Pot
					0xa35, // Wis Pot
					0xa4c, // Dex Pot
					0xae9, // Life Pot
					0xaea, // Mana Pot
					0xadd, // Minor Health Potion
					0xab0, // Minor Magic Potion
					0xa22, // Health Potion
					0xa23  // Magic Potion
				];

function onClientPacket(event) {
	var packet = event.getPacket();
	switch (packet.id()) {
		case ID_MOVE: {
			var time = packet.time;
			playerLocation = packet.newPosition;

			if(send_notif){
				for(var bag in lootbags){
					if(lootbaglocs[bag].distanceSquaredTo(playerLocation) <= 200){
						var params = {} 
						toNotif = "";

						for(var idx in lootbags[bag]){
							if(lootbags[bag][idx] != -1){
								var item = $.findItem(lootbags[bag][idx]);
								toNotif += "\\n" + item.id
							}
						}
						if(toNotif == ""){
							continue;
						}
						this.displayNotification(event,bag,0x00ffff,toNotif);						
					}
				}
				send_notif = false;
				$.scheduleEvent(2, "refresh_notif");
			}
			
			break;
		}
	}
}

function onServerPacket(event) {
	var packet = event.getPacket();
	switch (packet.id()) {
		case ID_CREATE_SUCCESS: {
			player_id = packet.objectId;
			break;
		}
		case ID_UPDATE: {
			// New objects
			for (var i = 0; i < packet.newObjs.length; i++) {
				var objectData = packet.newObjs[i];
				if(objectData == null)
					break;

				var type = objectData.objectType;

				if(type == 1280 || type == 1283 || (type >= 1286 && type <= 1296)){
					// new loot bag
					var bagId = objectData.status.objectId;
					lootbags[bagId] = [-1,-1,-1,-1,-1,-1,-1,-1];
					lootbaglocs[bagId] = objectData.status.pos;

					for (var j = 0; j < objectData.status.data.length; j++){
						var statData = objectData.status.data[j];
						if(statData.obf0 >= 8 && statData.obf0 <= 15){
							if(statData.obf1 != -1){
								var item = $.findItem(statData.obf1);

								if(item.tier >= tier || item.bagType == 4 || desirables.indexOf(statData.obf1) != -1){
									lootbags[bagId][statData.obf0 - 8] = statData.obf1;
								}
							}

						}
					}

				}
			}

			// Removed objects
			for (var i = 0; i < packet.drops.length; i++) {
				var droppedObjectId = packet.drops[i];

				if(lootbags[droppedObjectId] != null){
					delete lootbags[droppedObjectId];
					delete lootbaglocs[droppedObjectId];		
				}
			}

			break;
		}
		case ID_NEW_TICK: {
			for (var i = 0; i < packet.statuses.length; i++) {
				var status = packet.statuses[i];

				if(lootbags[status.objectId] != null){
					for (var j = 0; j < status.data.length; j++){
						var statData = status.data[j];
						if(statData.obf0 >= 8 && statData.obf0 <= 15){
							if(statData.obf1 == -1){
								lootbags[status.objectId][statData.obf0 - 8] = statData.obf1;
							}else{
								var item = $.findItem(statData.obf1);

								if(item.tier >= tier || item.bagType == 4 || desirables.indexOf(statData.obf1) != -1){
									lootbags[status.objectId][statData.obf0 - 8] = statData.obf1;
								}
							}

						}
					}
				}
			}
			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 refresh_notif(event) {
	send_notif = true;
}
Did that with the Mod Selector (add other mods) and started and it said: Selected Server: USWest
Waiting for HELLO from Client. Nothing happens
Quote Originally Posted by AQWMexi View Post
Did that with the Mod Selector (add other mods) and started and it said: Selected Server: USWest
Waiting for HELLO from Client. Nothing happens

Not mod selector, Realm Relay.

EDIT: For all Realm Relay scripts you need to select the Proxy Server. (You need to select it when building your client and when you play. After your client is built open it>Servers> Select "Proxy Server">Play>Play>Reap the rewards.

EDIT 2: Actually, I believe that @IziLife has lootnotif.js in his RR GUI already. Just go download it here: http://www.mpgh.net/forum/showthread.php?t=812822
RR is not updated to the current builds?
Posts 115 of 22 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?