Results 1 to 10 of 10
  1. #1
    059's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    California
    Posts
    3,312
    Reputation
    700
    Thanks
    92,773

    [Realm Relay] Avatar Block, protects you against teleporting on top of the avatar

    Hey all. This script will save you from accidental teleports onto players using the infamous 0 speedhack with cheat engine. If you are within 1.1 tiles of the avatar, if you get hit by a shot, the script will it will block it, send a nexus, and disconnect you.

    From my tests, it worked 100% of the time over 10+ tests on a 0/8 level 20 knight with tops, and it worked about 50% of the time over 6 tests on a level 1 trickster with no equips. You will have higher success rates playing on a server with low ping (close to you). On my level 1, I died more when I was on an EU server while I live in the US (but I still died on US servers sometimes, so I recommend being maxed).

    I am in the process of porting it to K Relay.

    Disclaimer: I am not responsible if you lose a character while using my script.

    Code:
    /* avatarblock.js by 059
    
    UPDATE
    	Tile[] tiles
    	Entity[] newObjs
    	int[] drops
    
    Entity
    	short objectType
    	Status status
    
    Status
    	int objectId
    	Location pos
    	StatData[] data
    
    Location
    	float x
    	float y
    	float distanceSquaredTo(Location location)
    	float distanceTo(Location location)
    */
    var ID_MOVE = $.findPacketId("MOVE");
    var ID_UPDATE = $.findPacketId("UPDATE");
    var ID_ESCAPE = $.findPacketId("ESCAPE");
    var ID_OTHERHIT = $.findPacketId("OTHERHIT");
    var ID_PLAYERHIT = $.findPacketId("PLAYERHIT");
    
    var myPos;
    var block = false;
    var avatarPos;
    var avatarFound = false;
    
    function onClientPacket(event) {
    	var packet = event.getPacket();
    
    	if (packet.id() == ID_MOVE) {
    		myPos = packet.newPosition;
    		if (avatarFound) {
    			var dist = Math.sqrt(myPos.distanceSquaredTo(avatarPos));
    			if (dist < 1.1) {
    				block = true;
    			} else
    				block = false;
    		}
    	}
    
    	if (block) {
    		if (packet.id() == ID_PLAYERHIT) {
    			event.cancel();
    			event.sendToServer(event.createPacket(ID_ESCAPE));
    			$.disconnect();
    		}
    
    		if (packet.id() == ID_SHOOTACK) {
    			event.cancel();
    			event.sendToServer(event.createPacket(ID_ESCAPE));
    			$.disconnect();
    		}
    
    		if (packet.id() == ID_OTHERHIT) {
    			event.cancel();
    			event.sendToServer(event.createPacket(ID_ESCAPE));
    			$.disconnect();
    		}
    	}
    }
    
    function onServerPacket(event) {
    	var packet = event.getPacket();
    
    	if (packet.id() == ID_UPDATE)
    		if (!avatarFound)
    			for (var x = 0; x < packet.newObjs.length; x++)
    				if (packet.newObjs[x].objectType == 0x734d) {
    					avatarFound = true;
    					avatarPos = packet.newObjs[x].status.pos;
    				}
    }
    My Vouches
    Having an issue with RotMG? Check for the solution here.


    Need Realm items? Come to RealmStock!

    Accepting PayPal - Bitcoin - Giftcards
    Selling ST Sets, Class Top Sets, Life Pots, and much more!


    Find it here: MPGH Sales Thread

  2. The Following 4 Users Say Thank You to 059 For This Useful Post:

    Alde. (04-28-2015),krazyshank (04-27-2015),luferac (04-27-2015),Thomas Friedman (04-27-2015)

  3. #2
    Thomas Friedman's Avatar
    Join Date
    Apr 2013
    Gender
    male
    Posts
    157
    Reputation
    10
    Thanks
    138
    My Mood
    Lurking
    Interesting, I'm gonna have to implement this into my auto nexus script.

    Vouches
    Skype: mpgh.thomasfriedman
    [img]https://**********.com/addskype/red/mpgh.thomasfriedman.png[/img]
    If I'm on, I'm available to buy and sell. Don't waste my time, when you add include a message explaining what you want and who you are from MPGH(with a link to your vouches).

  4. #3
    jakerofl's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Posts
    286
    Reputation
    10
    Thanks
    149
    Quote Originally Posted by 059 View Post
    Hey all. This script will save you from accidental teleports onto players using the infamous 0 speedhack with cheat engine. If you are within 1.1 tiles of the avatar, if you get hit by a shot, the script will it will block it, send a nexus, and disconnect you.

    From my tests, it worked 100% of the time over 10+ tests on a 0/8 level 20 knight with tops, and it worked about 50% of the time over 6 tests on a level 1 trickster with no equips. You will have higher success rates playing on a server with low ping (close to you). On my level 1, I died more when I was on an EU server while I live in the US (but I still died on US servers sometimes, so I recommend being maxed).

    I am in the process of porting it to K Relay.

    Disclaimer: I am not responsible if you lose a character while using my script.

    Code:
    /* avatarblock.js by 059
    
    UPDATE
    	Tile[] tiles
    	Entity[] newObjs
    	int[] drops
    
    Entity
    	short objectType
    	Status status
    
    Status
    	int objectId
    	Location pos
    	StatData[] data
    
    Location
    	float x
    	float y
    	float distanceSquaredTo(Location location)
    	float distanceTo(Location location)
    */
    var ID_MOVE = $.findPacketId("MOVE");
    var ID_UPDATE = $.findPacketId("UPDATE");
    var ID_ESCAPE = $.findPacketId("ESCAPE");
    var ID_OTHERHIT = $.findPacketId("OTHERHIT");
    var ID_PLAYERHIT = $.findPacketId("PLAYERHIT");
    
    var myPos;
    var block = false;
    var avatarPos;
    var avatarFound = false;
    
    function onClientPacket(event) {
    	var packet = event.getPacket();
    
    	if (packet.id() == ID_MOVE) {
    		myPos = packet.newPosition;
    		if (avatarFound) {
    			var dist = Math.sqrt(myPos.distanceSquaredTo(avatarPos));
    			if (dist < 1.1) {
    				block = true;
    			} else
    				block = false;
    		}
    	}
    
    	if (block) {
    		if (packet.id() == ID_PLAYERHIT) {
    			event.cancel();
    			event.sendToServer(event.createPacket(ID_ESCAPE));
    			$.disconnect();
    		}
    
    		if (packet.id() == ID_SHOOTACK) {
    			event.cancel();
    			event.sendToServer(event.createPacket(ID_ESCAPE));
    			$.disconnect();
    		}
    
    		if (packet.id() == ID_OTHERHIT) {
    			event.cancel();
    			event.sendToServer(event.createPacket(ID_ESCAPE));
    			$.disconnect();
    		}
    	}
    }
    
    function onServerPacket(event) {
    	var packet = event.getPacket();
    
    	if (packet.id() == ID_UPDATE)
    		if (!avatarFound)
    			for (var x = 0; x < packet.newObjs.length; x++)
    				if (packet.newObjs[x].objectType == 0x734d) {
    					avatarFound = true;
    					avatarPos = packet.newObjs[x].status.pos;
    				}
    }
    Would be very helpful with the shatters first boss blue bullets and ice spheres. If you get hit by one of the bullets you're basically dead so..

  5. #4
    luferac's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    16
    Reputation
    10
    Thanks
    0
    Great work man, it's always sad to see people losing their hard earned characters to a bunch of ce scrubs.

    Funny that I'm saying this on a hacking forum.

  6. #5
    krazyshank's Avatar
    Join Date
    Jan 2012
    Gender
    male
    Location
    RealmStock
    Posts
    2,589
    Reputation
    467
    Thanks
    16,668
    My Mood
    Angelic
    Quote Originally Posted by luferac View Post
    Great work man, it's always sad to see people losing their hard earned characters to a bunch of ce scrubs.

    Funny that I'm saying this on a hacking forum.
    You're right though.
    Using CE and saying you're a leet pro coder isn't hacking.

    Accepting PayPal - Bitcoin - Giftcards - Items:

    Find it here: MPGH Sales Thread

  7. The Following User Says Thank You to krazyshank For This Useful Post:

    wecopaul (04-29-2015)

  8. #6
    Threadstarter
    We are the CONTRIBUFORCE
    Former Staff
    Contributor
    059's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    California
    Posts
    3,312
    Reputation
    700
    Thanks
    92,773
    Quote Originally Posted by jakerofl View Post
    Would be very helpful with the shatters first boss blue bullets and ice spheres. If you get hit by one of the bullets you're basically dead so..
    The difference is those are avoidable because you can see when they spawn and you know what they are, teleporting onto an avatar doesn't kill you because of lack of skill, only lack of foresight.
    My Vouches
    Having an issue with RotMG? Check for the solution here.


    Need Realm items? Come to RealmStock!

    Accepting PayPal - Bitcoin - Giftcards
    Selling ST Sets, Class Top Sets, Life Pots, and much more!


    Find it here: MPGH Sales Thread

  9. #7
    jakerofl's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Posts
    286
    Reputation
    10
    Thanks
    149
    Quote Originally Posted by 059 View Post
    The difference is those are avoidable because you can see when they spawn and you know what they are, teleporting onto an avatar doesn't kill you because of lack of skill, only lack of foresight.
    Oh believe me I know, I've lost my fair share of characters to that too (though 0 speed with CE? Pft. You dc after like 10 seconds. There are 2 more reliable ways that you can do it..). I was just saying it would make for an excellent anti-death mod for realmrelay, not that they were unfair or anything.

  10. #8
    TheMrNobody's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Location
    Death Star
    Posts
    101
    Reputation
    10
    Thanks
    60
    nice work @059, you should release a K Relay version too

  11. The Following User Says Thank You to TheMrNobody For This Useful Post:

    Kierze (06-15-2015)

  12. #9
    Jator's Avatar
    Join Date
    Apr 2015
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    1
    how to i add it by myself?

  13. #10
    Threadstarter
    We are the CONTRIBUFORCE
    Former Staff
    Contributor
    059's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    California
    Posts
    3,312
    Reputation
    700
    Thanks
    92,773
    Quote Originally Posted by Jator View Post
    how to i add it by myself?
    Get realm relay, then save the text I put in the code section to the scripts folder in realm relay. Then start rr and connect to proxy server in game.
    My Vouches
    Having an issue with RotMG? Check for the solution here.


    Need Realm items? Come to RealmStock!

    Accepting PayPal - Bitcoin - Giftcards
    Selling ST Sets, Class Top Sets, Life Pots, and much more!


    Find it here: MPGH Sales Thread

Similar Threads

  1. Rate the avatar/signature above you
    By Time in forum Spammers Corner
    Replies: 3028
    Last Post: 07-24-2023, 02:40 PM
  2. [Realm Relay] [Orape] Hotkey teleport to unnamed leader (for multiboxing)
    By 059 in forum Realm of the Mad God Tutorials & Source Code
    Replies: 7
    Last Post: 05-27-2015, 08:33 AM
  3. Can you get caught using a hacked client or realm relay?
    By bluntblunt in forum Realm of the Mad God Discussions
    Replies: 8
    Last Post: 09-29-2014, 08:11 AM
  4. [Info] DaddyCraft [Premium][Plugins][PVP][Block Protection][iConomy][NO WhiteList][24/7]
    By hooligansgr in forum Minecraft Server Advertising
    Replies: 1
    Last Post: 02-27-2012, 05:55 AM