Results 1 to 11 of 11
  1. #1
    The richest man is not the one who has the most but the one who needs the least.
    MPGH Member
    Alde.'s Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    1,706
    Reputation
    166
    Thanks
    3,627
    My Mood
    Sleepy

    [Realm Relay] Positions & Time

    How do positions & time works?

    Code:
    
    realmrelay.data.location@32e8273u281
    
    time = 927361

    Last edited by Royce; 12-22-2013 at 11:48 AM.
    Alde is Alde is

  2. #2
    059's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    California
    Posts
    3,312
    Reputation
    700
    Thanks
    92,771
    @32e8273u281

    At first I was gonna say that looks like a memory address pointer in hex but the "u" in there threw me off.
    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

  3. #3
    Notsomeone's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Posts
    155
    Reputation
    10
    Thanks
    24
    My Mood
    Inspired
    Please refer to scripts_help.txt. I suggest reading the entire thing.

    Code:
    Location
    	float x
    	float y
    	float distanceSquaredTo(Location location)
    	float distanceTo(Location location)

  4. #4
    Threadstarter
    The richest man is not the one who has the most but the one who needs the least.
    MPGH Member
    Alde.'s Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    1,706
    Reputation
    166
    Thanks
    3,627
    My Mood
    Sleepy
    Quote Originally Posted by 059 View Post
    @32e8273u281

    At first I was gonna say that looks like a memory address pointer in hex but the "u" in there threw me off.
    OOHHHHHHHHHHHH!

    I typed that very quickly, it's not right.

    Maybe you're right!
    Alde is Alde is

  5. #5
    Threadstarter
    The richest man is not the one who has the most but the one who needs the least.
    MPGH Member
    Alde.'s Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    1,706
    Reputation
    166
    Thanks
    3,627
    My Mood
    Sleepy
    Quote Originally Posted by Notsomeone View Post
    Please refer to scripts_help.txt. I suggest reading the entire thing.

    Code:
    Location
    	float x
    	float y
    	float distanceSquaredTo(Location location)
    	float distanceTo(Location location)
    But.. I dont understand
    Alde is Alde is

  6. #6
    Threadstarter
    The richest man is not the one who has the most but the one who needs the least.
    MPGH Member
    Alde.'s Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    1,706
    Reputation
    166
    Thanks
    3,627
    My Mood
    Sleepy
    How do we acess it?

    var x = Location.x doesnt work
    var x = packet.Location.x doesnt work

    #noob
    Last edited by Alde.; 12-22-2013 at 02:24 AM.
    Alde is Alde is

  7. #7
    Notsomeone's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Posts
    155
    Reputation
    10
    Thanks
    24
    My Mood
    Inspired
    I suggest you learn the basics of variables and classes. I don't know what packet you mean, but most of them have a field "pos". Also you should learn how to study error messages.

    Lets take the NEW_TICK packet for example:

    Code:
    NEW_TICK
    	int tickId
    	int tickTime
    	Status[] statuses
    So the packet has:

    Code:
    packet.tickId // int
    packet.tickTime // int
    packet.statuses // an array which holds the class Status
    So the tickId and tickTime do not seem very interesting at the moment, lets take a look at the Status class:

    Code:
    Status
    	int objectId
    	Location pos
    	StatData[] data
    Aha! The Status class has a field called "pos". That seems promising. Now we see that "pos" is a Location. Lets see what it looks like.

    Code:
    Location
    	float x
    	float y
    	float distanceSquaredTo(Location location)
    	float distanceTo(Location location)
    Heureka! The Location class has the fields "x" and "y". These are what we are looking for!

    So to sum up:

    1. NEW_TICK has an array full of Status called "statuses"
    2. Status holds a Location called "pos"
    3. Location has fields called "x" and "y"

    I'll help you a bit more:

    Code:
    for (i in packet.statuses) {
        $.echo("X: " + i.pos.x + " Y: " + i.pos.y)
    }

  8. The Following User Says Thank You to Notsomeone For This Useful Post:

    Alde. (12-22-2013)

  9. #8
    Threadstarter
    The richest man is not the one who has the most but the one who needs the least.
    MPGH Member
    Alde.'s Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    1,706
    Reputation
    166
    Thanks
    3,627
    My Mood
    Sleepy
    Quote Originally Posted by Notsomeone View Post
    I suggest you learn the basics of variables and classes. I don't know what packet you mean, but most of them have a field "pos". Also you should learn how to study error messages.

    Lets take the NEW_TICK packet for example:

    Code:
    NEW_TICK
    	int tickId
    	int tickTime
    	Status[] statuses
    So the packet has:

    Code:
    packet.tickId // int
    packet.tickTime // int
    packet.statuses // an array which holds the class Status
    So the tickId and tickTime do not seem very interesting at the moment, lets take a look at the Status class:

    Code:
    Status
    	int objectId
    	Location pos
    	StatData[] data
    Aha! The Status class has a field called "pos". That seems promising. Now we see that "pos" is a Location. Lets see what it looks like.

    Code:
    Location
    	float x
    	float y
    	float distanceSquaredTo(Location location)
    	float distanceTo(Location location)
    Heureka! The Location class has the fields "x" and "y". These are what we are looking for!

    So to sum up:

    1. NEW_TICK has an array full of Status called "statuses"
    2. Status holds a Location called "pos"
    3. Location has fields called "x" and "y"

    I'll help you a bit more:

    Code:
    for (i in packet.statuses) {
        $.echo("X: " + i.pos.x + " Y: " + i.pos.y)
    }
    Who are you?

    You came out of nowhere!

    Anyways, thanks a lot!

    With only basic reverse engineering I couldnt have achieved that :P
    Alde is Alde is

  10. #9
    Threadstarter
    The richest man is not the one who has the most but the one who needs the least.
    MPGH Member
    Alde.'s Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    1,706
    Reputation
    166
    Thanks
    3,627
    My Mood
    Sleepy
    Quote Originally Posted by Notsomeone View Post
    Code:
    for (i in packet.statuses) {
        $.echo("X: " + i.pos.x + " Y: " + i.pos.y)
    }
    Also, this may sound totally stupid but wich object position's does it give?

    The player's one?
    Alde is Alde is

  11. #10
    Notsomeone's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Posts
    155
    Reputation
    10
    Thanks
    24
    My Mood
    Inspired
    @Royce

    I guess this is solved?

  12. #11
    Royce's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Posts
    17,967
    Reputation
    4088
    Thanks
    6,418
    I'm going to close it since you helped him , not sure if he actually got it to work

Similar Threads

  1. PLEASE NEED HELP WITH REALM RElAY
    By DANWARPER in forum Realm of the Mad God Help & Requests
    Replies: 18
    Last Post: 01-04-2014, 05:38 AM
  2. Realm Relay /con
    By Nisuxen in forum Realm of the Mad God Tutorials & Source Code
    Replies: 5
    Last Post: 12-15-2013, 12:10 PM
  3. Realm Relay /wc
    By Nisuxen in forum Realm of the Mad God Tutorials & Source Code
    Replies: 5
    Last Post: 10-27-2013, 11:32 PM
  4. [Release] Realm Relay Command Script!
    By angelofsilence123 in forum Realm of the Mad God Hacks & Cheats
    Replies: 7
    Last Post: 10-21-2013, 02:06 AM
  5. [Outdated] Realm Relay v1.0.0 - Proxy for RotMG 17.2
    By DeVoidCoder in forum Realm of the Mad God Hacks & Cheats
    Replies: 126
    Last Post: 10-17-2013, 10:23 PM