Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • ASDss: where do u download source and clients now
      August 18, 2017, 10:39:31 PM
    • ASDss: yo
      August 18, 2017, 10:39:20 PM
    • dan v jad: click me 4 da fun ;)[link]
      August 18, 2017, 04:39:58 PM
    • stCky: Palidinho is your OpenGL (was it OpenGL?) stuff open source anywhere?
      August 16, 2017, 09:07:22 PM
    • Travas:BUILD THE WALL
      August 15, 2017, 09:28:49 PM
    • Travas: i have ass cancer
      August 15, 2017, 09:23:29 PM
    • stCky: what are the fudge are you tryna ask?
      August 15, 2017, 08:21:35 PM
    • bader: what are the rsps community alive ?
      August 15, 2017, 05:46:16 PM
    • bader: yo guys
      August 15, 2017, 05:46:08 PM
    • Spacehost:[link] Updated our thread :)
      August 15, 2017, 09:40:34 AM
    • Adaro: The client is in Download section at Homepage
      August 15, 2017, 01:09:20 AM
    • FaTe_Of_GoDs: where do i get the client?????????????
      August 14, 2017, 05:23:14 PM
    • stCky: can anyone help me? I cant login to the shoutbox
      August 13, 2017, 05:45:15 PM
    • drubrkletern: appeal denied
      August 13, 2017, 02:35:27 PM
    • King_Trout:[link]
      August 13, 2017, 11:17:12 AM
    • Cole1497: no sorry
      August 13, 2017, 10:27:14 AM
    • ayz: yo can anyone explain something to me
      August 13, 2017, 08:08:51 AM
    • coolking12: Hi
      August 13, 2017, 04:16:06 AM
    • stCky: n+1
      August 11, 2017, 06:09:24 PM
    • PalidinoDH: How many more pages are going to show errors before this dude gets on and fixes shit
      August 11, 2017, 04:57:00 PM

    Author Topic: [317refactor] Name change packet showoff  (Read 4751 times)

    0 Members and 1 Guest are viewing this topic.

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    [317refactor] Name change packet showoff
    « on: March 12, 2015, 06:21:16 PM »


    OfflineEyeownyew

    • Member
    • ****
    • Posts: 3,431
    • Thanks: +0/-0
      • View Profile
    Re: [317refactor] Name change packet showoff
    « Reply #1 on: March 12, 2015, 06:26:01 PM »
    Have you gotten it to work with player updating with other clients though?


    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Re: [317refactor] Name change packet showoff
    « Reply #2 on: March 12, 2015, 06:28:33 PM »
    Have you gotten it to work with player updating with other clients though?

    The project I'm working on only requires it to be updated locally rather than for other players, however adding it into the player update protocol would be very easy :)

    Offlinelare69

    • Member
    • ****
    • *
    • Posts: 5,321
    • Thanks: +0/-0
      • View Profile
    Re: [317refactor] Name change packet showoff
    « Reply #3 on: March 13, 2015, 12:41:30 PM »
    Have you gotten it to work with player updating with other clients though?
    Pretty sure to do that all you'd have to do would be to change the username server sided.
    hi. check out luna:)

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Re: [317refactor] Name change packet showoff
    « Reply #4 on: March 13, 2015, 06:29:19 PM »
    IMO, I wouldn't make this command based. I'd make an interface for it. Similar to how runescape does it now (You can change your name in game on an interface or on the website). Reason being, if the name was already taken, the user wouldn't have to constantly type "::name ".
    They could just press a button to check the name. If the name is available, they'd be able to confirm it.

    Is the name change packet a custom one you built or what?

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Re: [317refactor] Name change packet showoff
    « Reply #5 on: March 13, 2015, 07:24:33 PM »
    There will be an interface eventually, this was just to show off the custom packet :p

    OfflineRuneAgent

    • wololo
    • Member
    • ****
    • *
    • *
    • Posts: 7,516
    • Thanks: +0/-0
      • View Profile
      • MITB FORUMS
    Re: [317refactor] Name change packet showoff
    « Reply #6 on: March 18, 2015, 02:34:37 PM »
    why do you keep making things that are already available ??????

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Re: [317refactor] Name change packet showoff
    « Reply #7 on: March 19, 2015, 03:16:11 AM »
    why do you keep making things that are already available ??????
    Show me where this has already been made :)

    OfflineRuneAgent

    • wololo
    • Member
    • ****
    • *
    • *
    • Posts: 7,516
    • Thanks: +0/-0
      • View Profile
      • MITB FORUMS
    Re: [317refactor] Name change packet showoff
    « Reply #8 on: March 19, 2015, 04:35:31 AM »
    why do you keep making things that are already available ??????
    Show me where this has already been made :)

    Server -> Client - dear client sending some player updates
    server -> player in index 9 name is silabsoft
    client -> server - thanks server now drawing silabsoft for player index 9
    silabsoft -> server - ::namechange silab
    server -> clients - remove player index 9
    server -> clients - add player silab
    « Last Edit: March 19, 2015, 04:37:17 AM by Miss Silabsoft »

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Re: [317refactor] Name change packet showoff
    « Reply #9 on: March 19, 2015, 06:28:22 AM »
    Does that change the name locally? No, it doesn't.

    Thanks for the feedback :-)

    OfflineRuneAgent

    • wololo
    • Member
    • ****
    • *
    • *
    • Posts: 7,516
    • Thanks: +0/-0
      • View Profile
      • MITB FORUMS
    Re: [317refactor] Name change packet showoff
    « Reply #10 on: March 19, 2015, 09:50:01 AM »
    Does that change the name locally? No, it doesn't.

    Thanks for the feedback :-)
    oh did someone not tell you that you have a client variable for that?

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Re: [317refactor] Name change packet showoff
    « Reply #11 on: March 19, 2015, 10:12:16 AM »
    The way I see it, silab is right. This could have been done using existing packets and etc.
    However, the custom packet can be used to verify the name and etc on the interface (if/when one is made).
    And it's still cool you're figuring stuff out with the client and (somewhat) server. You just shouldn't be concentrating on only the client, because that's what it seems like you're doing, and is why silab is saying you're doing things that's already possible.

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Re: [317refactor] Name change packet showoff
    « Reply #12 on: March 19, 2015, 11:53:05 AM »
    Does that change the name locally? No, it doesn't.

    Thanks for the feedback :-)
    oh did someone not tell you that you have a client variable for that?
    No, I didn't know that. I actually completely reprogrammed the client to allow me to do this.

    /s

    Offlinelardain

    • Member
    • **
    • Posts: 88
    • Thanks: +0/-0
      • View Profile
    Re: [317refactor] Name change packet showoff
    « Reply #13 on: March 21, 2015, 01:41:46 PM »
    Wait, what? You reprogrammed the WHOLE client just to change a name?
    Btw, I think this could be done without even touching the client, can`t it? Player.getUsername, make a player.SetUsername.
    Code: Java
    1. if(cmd(0).equalsIgnoreCase("name"){
    2. player.setUsername(parseInt[1]);
    3. player.getPackets.sendMessage("Your name has been changed to "+parseInt[1]".");
    4. some method to remove the old playerfile and make a new player file in the Data here.
    5. }
    6.  
    ^^ Ik that would not be the correct way as I have no idea atm for the parseInt. But you get the idea.
    Not trying to make pro code here. But wouldn`t that work aswell if I took the time to use the correct things?

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Re: [317refactor] Name change packet showoff
    « Reply #14 on: March 21, 2015, 02:55:22 PM »
    Wait, what? You reprogrammed the WHOLE client just to change a name?
    Btw, I think this could be done without even touching the client, can`t it? Player.getUsername, make a player.SetUsername.
    Code: Java
    1. if(cmd(0).equalsIgnoreCase("name"){
    2. player.setUsername(parseInt[1]);
    3. player.getPackets.sendMessage("Your name has been changed to "+parseInt[1]".");
    4. some method to remove the old playerfile and make a new player file in the Data here.
    5. }
    6.  
    ^^ Ik that would not be the correct way as I have no idea atm for the parseInt. But you get the idea.
    Not trying to make pro code here. But wouldn`t that work aswell if I took the time to use the correct things?

    Partially, there's a bit of player updating you need to change, I believe.
    When I made my "Instant player rights updating" I noticed the player's name is sent through the player updating block too, so it may not even need updating. You may, however, need to change a variable in the client from a static one to the dynamic one that the sets when it reads the data from the server.
    I haven't really dug into this part, but I'm sure it wouldn't be hard to pull off without the new packet.

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Re: [317refactor] Name change packet showoff
    « Reply #15 on: March 22, 2015, 06:05:05 AM »
    It wouldn't be hard to pull off without the new packet but why write it into the player updating protocol when I only need to change the name of the player at most once per session. There is such thing as over-engineering and it's important to bear that in mind. I have actually rewritten it so that it sends the username during the login protocol because that meets my needs. The constant replies of "why make a new packet when you could implement into a new one" are both disheartening and ignorant.

    Why bother having multiple packets at all when you could handle the entire game through one packet with a large series of parameters? ;)
    « Last Edit: March 22, 2015, 06:06:55 AM by Ambokile »

    Offlinelardain

    • Member
    • **
    • Posts: 88
    • Thanks: +0/-0
      • View Profile
    Re: [317refactor] Name change packet showoff
    « Reply #16 on: March 22, 2015, 08:10:49 AM »
    Well atleast it works, that`s important right? :)

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Re: [317refactor] Name change packet showoff
    « Reply #17 on: March 22, 2015, 01:33:38 PM »
    It wouldn't be hard to pull off without the new packet but why write it into the player updating protocol when I only need to change the name of the player at most once per session. There is such thing as over-engineering and it's important to bear that in mind. I have actually rewritten it so that it sends the username during the login protocol because that meets my needs. The constant replies of "why make a new packet when you could implement into a new one" are both disheartening and ignorant.

    Why bother having multiple packets at all when you could handle the entire game through one packet with a large series of parameters? ;)

    Your point is kind of irrelevant. The player name is already being sent in the player updating. So it wouldn't be writing something new to handle it, as the code is already there.

    This is from scrAllDummysRemoved (For those that don't know, it's basically MITB's deob of the 317 client):
    Code: Java
    1.                 name = TextClass.fixName(TextClass.nameForLong(stream.readQWord()));
    2.                 combatLevel = stream.readUnsignedByte();
    3.                 skill = stream.readUnsignedWord();
    4.                 visible =true;

    So, why would I need to write something new when it already exists?

    What I say in the gif is a little snarky, but:

    OfflineRuneAgent

    • wololo
    • Member
    • ****
    • *
    • *
    • Posts: 7,516
    • Thanks: +0/-0
      • View Profile
      • MITB FORUMS
    Re: [317refactor] Name change packet showoff
    « Reply #18 on: March 22, 2015, 04:58:52 PM »
    I ALREADY SAID THAT!

    Offlinejustaguy

    • Member
    • ****
    • *
    • Posts: 707
    • Thanks: +0/-0
      • View Profile
    Re: [317refactor] Name change packet showoff
    « Reply #19 on: March 22, 2015, 05:09:13 PM »
    Why bother having multiple packets at all when you could handle the entire game through one packet with a large series of parameters? ;)

    Because that's inefficient?
    RIP

     

    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal