/wc Feature

Posts 1–12 of 12 · Page 1 of 1
/wc Feature
I don't know if anybody remmembers but back in the OryxDom days, there used be a feature where if you did "/wc" it would tell you which players in the realm had an inc. I thought it was a pretty useful feature. Would be great if someone implemented it into A new client.
Best thread 10/10

Is someone bothered to implement this feature? Probably no.
Is anyone that knows how to code not a greedy fuck?

Quote Originally Posted by Ahl View Post
Probably no.
Message the coders on this section. one might be up for. One of the threads even says he's bored and wants hack ideas.
ODom was a proxy, not a client. There's already a scripts for RealmRelay that does that.
Quote Originally Posted by Zasx View Post
ODom was a proxy, not a client. There's already a scripts for RealmRelay that does that.
He probably wants justanoob to add it into the orape client
Quote Originally Posted by Ahl View Post
He probably wants justanoob to add it into the orape client
Because fuck doing anything yourself, amirite?

I can't even wipe my own ass
Jnoob wont be adding it into orape, as hes said from the start he wont. There are enough tutorials on the forum to implement it yourself, and if you're still that lazy, use RealmRelay and use the script that does it..
Go download Realm Relay proxy (Can be found on @alde 's GitHub)
Add this script
Code:
// wc.js

var ID_CREATE_SUCCESS = $.findPacketId("CREATE_SUCCESS");
var ID_NOTIFICATION = $.findPacketId("NOTIFICATION");
var ID_PLAYER_TEXT = $.findPacketId("PLAYERTEXT");
var ID_UPDATE = $.findPacketId("UPDATE");

var helloPacket = null;

var player_id = null;
var inc_holders = {};

function onClientPacket(event) {
	var packet = event.getPacket();
	switch (packet.id()) {
		case ID_PLAYER_TEXT: {
			var text = packet.text;
			if(text == "/wc"){
				event.cancel();

				var toPrint = "Inc Holders:\\n";

				for (var id in inc_holders){
					if (!inc_holders.hasOwnProperty(id))
						continue;

					toPrint += inc_holders[id] + "\\n"
				}

				this.displayNotification(event, player_id, 0xFF8000, toPrint);
			}
			break;
		}
	}
}

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

			// New objects
			for (var i = 0; i < packet.newObjs.length; i++) {
				var objectData = packet.newObjs[i];
				if(objectData == null)
					continue;

				var type = objectData.objectType;
				if(type == 768 || type == 775 || type == 782 || type == 784 || (type >= 797 && type <= 806)){ // player classes
					var inc = false;

					for (var j = 0; j < objectData.status.data.length; j++) {
						var statData = objectData.status.data[j];
						if(statData != null && ((statData.obf0 >= 8 && statData.obf0 <= 19) || (statData.obf0 >= 71 && statData.obf0 <= 78))){
							if(statData.obf1 == 1826) { //1826 - Value for incantation
								inc = true;
							}
						}

						if(inc && statData.obf0 == 31){
							inc_holders[objectData.status.objectId] = statData.obf2;

							boss.displayNotification(event, player_id, 0xFF8000, statData.obf2 + " has an inc!");
							break;
						}
					}
				}
			}

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

				if(inc_holders[droppedObjectId] != null){
					boss.displayNotification(event, player_id, 0xFF8000, inc_holders[droppedObjectId] + " has left.");	
					delete inc_holders[droppedObjectId];			
				}
			}
			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);
}
Please dont be a cunt in Oryx castle. Don't say the name of people holding incs.
Quote Originally Posted by JustAnoobROTMG View Post
Please dont be a cunt in Oryx castle. Don't say the name of people holding incs.
This one cant detect incs in backpacks, need some tweaks to make it work with backpacks.
Posts 1–12 of 12 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us