Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • wjfgg321: 사설토토사이트추천 첫충20프로%s t - 2 2 5 5. c o m%가입코드 s  t  8  8안전사설토토사이트추천 토토추천 사설토토추천사이트 토토사이트주소 해외토토사이트추천 스포츠토토사이트추천 사설토토추천 안전메이저토토사이트추천 안전사설토토추천
      Today at 07:55:33 PM
    • stCky:[link]
      Today at 07:15:22 PM
    • gordy9596: similar to this [link]
      Today at 05:58:11 PM
    • gordy9596: I'm looking for someone, who would like to make a 2006 remake like this?
      Today at 05:57:41 PM
    • gordy9596: Hi
      Today at 05:57:12 PM
    • `Discardedx2`: k
      Today at 03:47:14 AM
    • Travas: the 'ol welfare bear
      December 09, 2017, 11:51:16 PM
    • Travas: ah, grizzly
      December 09, 2017, 11:51:10 PM
    • Cole1497: im bout to pack me a can of grizzly and go ham on a bitch
      December 09, 2017, 11:14:20 PM
    • wailsalih: It's my day off I'm just smoke and pk please any staff look at my ip ban situation please
      December 09, 2017, 12:24:37 PM
    • wailsalih: Anyone staff here?
      December 09, 2017, 10:11:30 AM
    • wailsalih: I got banned one year ago cause I did something dumb pkags banned me he's still holding the grudge can someone help?
      December 09, 2017, 10:02:50 AM
    • juhta6: oi. where's the download link for rs2 317 client
      December 09, 2017, 08:15:45 AM
    • Striker Fox2: Yes Welcome
      December 09, 2017, 07:50:13 AM
    • Amcora: Welcome soulcist
      December 09, 2017, 06:50:08 AM
    • Daveite: Is there anyway to download this
      December 08, 2017, 08:53:47 PM
    • Daveite: I'm looking for a the runescape chicken model
      December 08, 2017, 08:53:28 PM
    • Daveite: I have a noob question
      December 08, 2017, 08:53:02 PM
    • Daveite: Hey guys
      December 08, 2017, 08:52:53 PM
    • DeathsChaos9: *sigh*
      December 08, 2017, 04:21:46 PM

    Author Topic: Odd error when running on VPS  (Read 291 times)

    0 Members and 1 Guest are viewing this topic.

    OfflineGardenn

    • Member
    • **
    • Posts: 23
    • Thanks: +0/-0
      • View Profile
    Odd error when running on VPS
    « on: May 06, 2015, 04:12:56 AM »
    UPDATE (EDITED) -
    Problem:
    When my client is connected via my VPS and is connected, it will do this -   &  when I login (with an account that was already made before it was brought over to the VPS)


    Tips:
    When a new player account is made when running on the VPS it works and is slow, but will end up doing what I stated above after a few days.
    When I run my client using my localhost, it runs perfectly with no issues
    When I click around it will not move my character
    I can still click through the player tabs
    It will not let me log out, I have to exit the client
    « Last Edit: May 20, 2015, 10:45:23 AM by Gardenn »
    RS2Ad banner

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Re: Odd error when running on VPS
    « Reply #1 on: May 06, 2015, 04:45:25 AM »
    The information you've provided here doesn't explain anything...

    However, this looks like your server isn't sending the packets to the client correctly. As I've had this happen a few times while playing some servers. I'd load the client, download the cache, and try to login, it would display the game world, but the map would be black (as seen in pic 1). After like 20 seconds it'd actually dc me and upon re-connection it would fix.

    The simplest way I could say to fix this would be:
    Check the packets being sent to the client against the data in the client. If the client is expecting to read 1 byte, then make sure your server sends... 1 byte. And so on.

    Example:
    Code: Java
    1.                                 c.getOutStream().createFrameVarSizeWord(53);
    2.                                 c.getOutStream().writeWord(3900);
    3.                                 c.getOutStream().writeWord(TotalItems);
    4.                                 int TotalCount =0;
    5.                                 for(int i =0; i <22; i++){
    6.                                         if(c.getLevelForXP(c.playerXP[i])<99)
    7.                                                 continue;
    8.                                         c.getOutStream().writeByte(1);
    9.                                         c.getOutStream().writeWordBigEndianA(skillCapes[i]+2);
    10.                                         TotalCount++;
    11.                                 }
    12.                                 c.getOutStream().endFrameVarSizeWord();
    13.                                 c.flushOutStream();

    Here's the code for sending a shop in a typical PI. (Specifically the skillcape shop)
    As you can see, it sends a "createFrameVarSizeWord" at the beginning. Which tells the client "Hey there's going to be a strange amount of data in this packet, it won't always be one size".

    And then when you look for packet 53 in the client:
    Code: Java
    1.                         case53:
    2.                                 needDrawTabArea =true;
    3.                                 int i7 = inStream.readUnsignedWord();// The interface id.. or 3900 as seen in the code earlier.
    4.                                 RSInterface class9_1 = RSInterface.interfaceCache[i7];
    5.                                 int j19 = inStream.readUnsignedWord();// The size.. or how many items that will be read.
    6.                                 for(int j22 =0; j22 < j19; j22++){
    7.                                         int i25 = inStream.readUnsignedByte();// How many of the one item will be displayed.. the "1" in writeByte in the for loop.
    8.                                         if(i25 ==255)
    9.                                                 i25 = inStream.method440();
    10.                                         class9_1.inventory[j22]= inStream.method436();// The item being displayed on the shop. skillCapes[i] + 2 in previous code.
    11.                                         class9_1.inventoryValue[j22]= i25;
    12.                                 }
    13.  
    14.                                 for(int j25 = j19; j25 < class9_1.inventory.length; j25++){
    15.                                         class9_1.inventory[j25]=0;
    16.                                         class9_1.inventoryValue[j25]=0;
    17.                                 }
    18.                                 pktType =-1;
    19.                                 returntrue;


    As you can see here, for every byte, string, int, etc being sent, there is something on the client reading it. That's what you need to verify in your server.

    I'd look at player updating and the data sent on first login, as those will be where your issue is.
    RS2Ad banner

    OfflineGardenn

    • Member
    • **
    • Posts: 23
    • Thanks: +0/-0
      • View Profile
    Re: Odd error when running on VPS
    « Reply #2 on: May 19, 2015, 04:04:54 AM »
    Still need help -  bump
    RS2Ad banner

    OfflineZymus

    • Member
    • ****
    • *
    • Posts: 7,267
    • Thanks: +0/-0
      • View Profile
    Re: Odd error when running on VPS
    « Reply #3 on: May 19, 2015, 01:53:37 PM »
    Still need help -  bump

    Did you do what he suggested?

    OfflineGardenn

    • Member
    • **
    • Posts: 23
    • Thanks: +0/-0
      • View Profile
    Re: Odd error when running on VPS
    « Reply #4 on: May 19, 2015, 04:21:33 PM »
    Yes, what he said to do I did, everything seems to check out correctly

    OfflineWarTusk-RSPS

    • Member
    • ***
    • Posts: 186
    • Thanks: +0/-0
      • View Profile
    Re: Odd error when running on VPS
    « Reply #5 on: May 19, 2015, 06:31:15 PM »
    Yes, what he said to do I did, everything seems to check out correctly

    If you did what he told you to do, then tell us where you are stuck now.
    "Speaking of if you want me to stop flooding your server and want a solution on how to prevent it, I'll start the negotiations at 500$. A drop in the bucket for you I suppose. And I'll help fix the XSS vulnerabilities for 100$ each."

    -Sini

    OfflineGardenn

    • Member
    • **
    • Posts: 23
    • Thanks: +0/-0
      • View Profile
    Re: Odd error when running on VPS
    « Reply #6 on: May 19, 2015, 09:27:17 PM »
    Problem:
    When my client is connected via my VPS and is connected, it will do this -   &  when I login (with an account that was already made before it was brought over to the VPS)


    Tips:
    When a new player account is made when running on the VPS it works and is slow, but will end up doing what I stated above after a few days.
    When I run my client using my localhost, it runs perfectly with no issues
    When I click around it will not move my character
    I can still click through the player tabs
    It will not let me log out, I have to exit the client
    « Last Edit: May 19, 2015, 10:27:56 PM by Gardenn »

     

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