Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 35
  1. #16
    sgrawsreghawrhgwrhgr's Avatar
    Join Date
    Oct 2014
    Gender
    male
    Location
    UK
    Posts
    516
    Reputation
    10
    Thanks
    729
    My Mood
    Angelic
    This is how the XML data was structured on the project I mentioned above, it too used the X2 client, though I can't remember if we made any modifications to the friend lists:
    getRequests : https://hastebin.com/bevadudoso.xml
    getList : https://hastebin.com/oharatihok.xml


    Looking at it now it's quite a lot, and I'm sure you could minimize it to just the essentials (Texture, Online, Name and what-not, I'm sure you don't need all the ClassStats etc.)
    Last edited by sgrawsreghawrhgwrhgr; 07-11-2018 at 12:19 PM.

  2. The Following User Says Thank You to sgrawsreghawrhgwrhgr For This Useful Post:

    FlashFlyyy (07-11-2018)

  3. #17
    FlashFlyyy's Avatar
    Join Date
    Jun 2017
    Gender
    male
    Posts
    141
    Reputation
    10
    Thanks
    19
    My Mood
    Amazed
    Quote Originally Posted by Nobody77 View Post
    This is how the XML data was structured on the project I mentioned above, it too used the X2 client, though I can't remember if we made any modifications to the friend lists:
    getRequests : https://hastebin.com/bevadudoso.xml
    getList : https://hastebin.com/oharatihok.xml


    Looking at it now it's quite a lot, and I'm sure you could minimize it to just the essentials (Texture, Online, Name and what-not, I'm sure you don't need all the ClassStats etc.)
    You do need the ClassStats I think.
    Btw, I fixed up my XML structure but still not working. Keep getting a black faded screen when I click on 'Social' -_-

    Also there is no request for '/friends/getRequests', so Idk

    When I make '/friends/getList' return an error, client requests '/friends/getRequests' and this is the XML data. But still black faded screen -.-


    This is my '/friends/getRequest' XML example data,
    Code:
    <Requests>
        <Account>
            <Character>
                <ObjectType>782</ObjectType>
                <Level>1</Level>
                <Exp>0</Exp>
                <CurrentFame>0</CurrentFame>
                <Texture>0</Texture>
            </Character>
            <Name>TestOne</Name>
            <Online>0</Online>
            <Stats>
                <ClassStats objectType="0x30e">
                    <BestLevel>1</BestLevel>
                    <BestFame>45</BestFame>
                </ClassStats>
                <BestCharFame>0</BestCharFame>
                <TotalFame>1045</TotalFame>
                <Fame>1045</Fame>
            </Stats>
        </Account>
    </Requests>
    This is my '/friends/getList' XML example data,
    Code:
    <Friends>
        <Account>
            <Character>
                <ObjectType>782</ObjectType>
                <Level>1</Level>
                <Exp>36</Exp>
                <CurrentFame>0</CurrentFame>
                <Texture>0</Texture>
            </Character>
            <Name>TestTwo</Name>
            <Online>0</Online>
            <Stats>
                <ClassStats objectType="0x30e">
                    <BestLevel>1</BestLevel>
                    <BestFame>45</BestFame>
                </ClassStats>
                <ClassStats objectType="0x31f">
                    <BestLevel>9</BestLevel>
                    <BestFame>3</BestFame>
                </ClassStats>
                <BestCharFame>3</BestCharFame>
                <TotalFame>1045</TotalFame>
                <Fame>45</Fame>
            </Stats>
        </Account>
    </Friends>
    EDIT
    - tried 'objectType' as int instead of hex but doesn't change anything
    - strange thing is, why was I able to see the box when it was giving errors? But when I give it data it doesn't work?
    - btw, the commands such as 'Add Friend' work perfectly as I have used them using the tooltip box thing. So only problem is this thing :@
    - btw,
    If the XML data is correct then perhaps the issue might be this,
    Code:
    (...)
    result += "</Requests>";
    byte[] buf = Encoding.UTF8.GetBytes(result);
    Context.Response.OutputStream.Write(buf, 0, buf.Length);
    using (StreamWriter wtr = new StreamWriter(Context.Response.OutputStream))
    wtr.Write("<Success/>");
    Should I be writing something else?


    OH ****************



    I REMOVED THE HIGHLIGHTED PART AND IT WORKS NOW!!! OMFG :OOOOO

    Btw,
    What should "{amount}" be? So I can display the friend count?
    https://i.gyazo.com/146b310145cfde89...f4f3513a39.mp4
    Last edited by FlashFlyyy; 07-11-2018 at 03:26 PM.

  4. #18
    sgrawsreghawrhgwrhgr's Avatar
    Join Date
    Oct 2014
    Gender
    male
    Location
    UK
    Posts
    516
    Reputation
    10
    Thanks
    729
    My Mood
    Angelic
    Try simply exporting <Friends></Friends> & <Requests></Requests>. If those don't work (still black screen), then you're doing something wrong, I unfortunately do not remember exactly how the whole friend-list mechanic works, but the things I put above should 100% work, you must be able to open the UI by exporting them, and if the UI does not open, you're most likely not handling your requests correctly (perhaps you mixed them up somewhere, just have a recheck)

  5. The Following User Says Thank You to sgrawsreghawrhgwrhgr For This Useful Post:

    FlashFlyyy (07-11-2018)

  6. #19
    FlashFlyyy's Avatar
    Join Date
    Jun 2017
    Gender
    male
    Posts
    141
    Reputation
    10
    Thanks
    19
    My Mood
    Amazed
    Quote Originally Posted by Nobody77 View Post
    Try simply exporting <Friends></Friends> & <Requests></Requests>. If those don't work (still black screen), then you're doing something wrong, I unfortunately do not remember exactly how the whole friend-list mechanic works, but the things I put above should 100% work, you must be able to open the UI by exporting them, and if the UI does not open, you're most likely not handling your requests correctly (perhaps you mixed them up somewhere, just have a recheck)
    It's fine it works!
    Btw,

    1. What should "{amount}" be? So I can display the friend count?
    https://gyazo.com/146b310145cfde89205262f4f3513a39

    2. Does the 'Search' functionality not work as it is not implemented?
    Code:
        public static const SEARCH:String = "searchFriend";
    Should this in the client be:
    Code:
        public static const SEARCH:String = "/searchFriend";
    Then make another handler for it?

    3. When a player has no friends they can't open their friends list. What XML should I pass when there's no data? I thought of,
    Code:
    <Friends>
    </Friends>
    But this doesn't work.
    Last edited by FlashFlyyy; 07-11-2018 at 03:49 PM.

  7. #20
    sgrawsreghawrhgwrhgr's Avatar
    Join Date
    Oct 2014
    Gender
    male
    Location
    UK
    Posts
    516
    Reputation
    10
    Thanks
    729
    My Mood
    Angelic
    1) Look into the client to see how it handles the {amount} stuff, but I think you're using the new production language strings that have different stuff
    Take a look here: https://hastebin.com/abukizihen.json
    Those are the strings that we used, and everything looked okay, don't just copy & paste it as I believe it has some differences (as it was a custom server project), just look over the friends stuff
    2) I don't think it is implemented, you'd have to debug that a little, try logging if a request/unknown packet is sent to server
    3) That should work fine, check over your code

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

    FlashFlyyy (07-11-2018)

  9. #21
    FlashFlyyy's Avatar
    Join Date
    Jun 2017
    Gender
    male
    Posts
    141
    Reputation
    10
    Thanks
    19
    My Mood
    Amazed
    Quote Originally Posted by Nobody77 View Post
    3) That should work fine, check over your code
    Well...it doesn't


  10. #22
    sgrawsreghawrhgwrhgr's Avatar
    Join Date
    Oct 2014
    Gender
    male
    Location
    UK
    Posts
    516
    Reputation
    10
    Thanks
    729
    My Mood
    Angelic
    Quote Originally Posted by FlashFlyyy View Post
    Well...it doesn't

    Export <Requests></Requests> for /getRequests, <Friends></Friends> for /getList

  11. #23
    FlashFlyyy's Avatar
    Join Date
    Jun 2017
    Gender
    male
    Posts
    141
    Reputation
    10
    Thanks
    19
    My Mood
    Amazed
    Quote Originally Posted by Nobody77 View Post
    Export <Requests></Requests> for /getRequests, <Friends></Friends> for /getList
    That's what the screenshot is showing lol



    NVM!! lol I found the problem

    It was this else statement,
    Code:
                        //else
                        //{
                        //    using (StreamWriter wtr = new StreamWriter(Context.Response.OutputStream))
                        //        wtr.Write("<Error>Not a pending friend request</Error>");
                        //}
    Last edited by FlashFlyyy; 07-11-2018 at 04:39 PM.

  12. #24
    sgrawsreghawrhgwrhgr's Avatar
    Join Date
    Oct 2014
    Gender
    male
    Location
    UK
    Posts
    516
    Reputation
    10
    Thanks
    729
    My Mood
    Angelic
    Yeah my bad, I was thinking you exported <Friends></Friends>, didn't see the other CMD.
    Either way, I was wrong.
    Export <Friends/> & <Requests/> if you don't have anything else to export, that should be good (that's what we did at least, other option should work the same)
    Last edited by sgrawsreghawrhgwrhgr; 07-11-2018 at 04:43 PM.

  13. The Following User Says Thank You to sgrawsreghawrhgwrhgr For This Useful Post:

    FlashFlyyy (07-11-2018)

  14. #25
    FlashFlyyy's Avatar
    Join Date
    Jun 2017
    Gender
    male
    Posts
    141
    Reputation
    10
    Thanks
    19
    My Mood
    Amazed
    Quote Originally Posted by Nobody77 View Post
    Yeah my bad, I was thinking you exported <Friends></Friends>, didn't see the other CMD.
    Either way, I was wrong.
    Export <Friends/> & <Requests/> if you don't have anything else to export, that should be good (that's what we did at least, other option should work the same)
    OH!! 'Search' doesn't search for players in database to add. It just filters your friendlist... lol

    Quote Originally Posted by Nobody77 View Post
    Export <Friends/> & <Requests/> if you don't have anything else to export, that should be good (that's what we did at least, other option should work the same)
    I will take note of this, thanks!

    - - - Updated - - -

    Any idea how to fix the 'server name' description?

    Last edited by FlashFlyyy; 07-11-2018 at 04:56 PM.

  15. #26
    sebastianfra12's Avatar
    Join Date
    Dec 2013
    Gender
    male
    Posts
    361
    Reputation
    21
    Thanks
    75
    My Mood
    Inspired
    Quote Originally Posted by FlashFlyyy View Post
    OH!! 'Search' doesn't search for players in database to add. It just filters your friendlist... lol



    I will take note of this, thanks!

    - - - Updated - - -

    Any idea how to fix the 'server name' description?

    Change "<Online>value</Online>" to your server's ip

  16. The Following 2 Users Say Thank You to sebastianfra12 For This Useful Post:

    DevilRotMG (07-12-2018),FlashFlyyy (07-12-2018)

  17. #27
    FlashFlyyy's Avatar
    Join Date
    Jun 2017
    Gender
    male
    Posts
    141
    Reputation
    10
    Thanks
    19
    My Mood
    Amazed
    Quote Originally Posted by sebastianfra12 View Post
    Change "<Online>value</Online>" to your server's ip
    Is there a simple way to obtain the IP address of the connected server? Other than using 'Dns'?

    Also, if the player is offline what should value be?

    EDIT: If player is offline there will be no '<Online>' tag
    Last edited by FlashFlyyy; 07-12-2018 at 04:15 AM.

  18. #28
    DevilRotMG's Avatar
    Join Date
    Jun 2018
    Gender
    male
    Location
    Dust II
    Posts
    364
    Reputation
    -3
    Thanks
    155
    My Mood
    Drunk
    I'm assuming you only have 1 server, so the IP would just be the ip of the server in server.cfg

  19. #29
    FlashFlyyy's Avatar
    Join Date
    Jun 2017
    Gender
    male
    Posts
    141
    Reputation
    10
    Thanks
    19
    My Mood
    Amazed
    Quote Originally Posted by DevilRotMG View Post
    I'm assuming you only have 1 server, so the IP would just be the ip of the server in server.cfg
    Ye, but if say in the future I have more I want to dynamically assign it

  20. #30
    SeXZeFPS's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Location
    In your wardrobe
    Posts
    598
    Reputation
    10
    Thanks
    637
    My Mood
    Asleep
    This is how NR-Core get's the users
    Code:
    var servers = player.Manager.InterServer.GetServerList();
    
                foreach (var server in servers)
                    foreach (PlayerInfo plr in server.playerList)
                    {
                        if (!plr.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase) ||
                            plr.Hidden && !player.Client.Account.Admin)
                            continue;
    
                        player.SendInfo($"{plr.Name} is playing on {server.name} at [{plr.WorldInstance}]{plr.WorldName}.");
                        return true;
                    }

  21. The Following User Says Thank You to SeXZeFPS For This Useful Post:

    DevilRotMG (07-12-2018)

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. I'm trying to contact the owner of this site
    By dasani in forum Suggestions, Requests & General Help
    Replies: 1
    Last Post: 12-01-2008, 08:12 PM
  2. Error im getting when trying to use the nexon plugin
    By mpghhackersrock123 in forum WarRock Korea Hacks
    Replies: 4
    Last Post: 03-16-2008, 09:38 AM
  3. Replies: 12
    Last Post: 10-24-2007, 04:33 AM
  4. probem when i try to open the hack
    By klota in forum WarRock - International Hacks
    Replies: 1
    Last Post: 07-25-2007, 12:40 AM