Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • ragnoroker: Brand new unique server just released! - Awesome Community - [link]
      October 14, 2019, 11:11:32 AM
    • ragnoroker: Brand new unique server just released! - Awesome Community - [link]
      October 14, 2019, 11:11:28 AM
    • ragnoroker: Brand new unique server just released! - Awesome Community - [link]
      October 14, 2019, 11:11:23 AM
    • marquise:[link]
      October 11, 2019, 12:24:21 PM
    • marquise: hey guys try autoscape.org [link]
      October 11, 2019, 12:19:08 PM
    • Rash: is this site still ded
      October 08, 2019, 07:54:22 PM
    • The Meek: Just Uploaded New Server ~Phusion~
      October 01, 2019, 03:30:31 AM
    • ragnoroker: Pre-EOC New server just dropped today! Come check it out :) - [link]
      September 27, 2019, 08:43:43 PM
    • ragnoroker: Pre-EOC New server just dropped today! Come check it out :) - [link]
      September 27, 2019, 08:43:40 PM
    • ragnoroker: Pre-EOC New server just dropped today! Come check it out :) - [link]
      September 27, 2019, 08:43:33 PM
    • PavSwag: try autoscape,0rg today i will personally help you get RICH and well KNOWN - pav
      September 26, 2019, 09:02:13 AM
    • PavSwag: try autoscape,0rg today i will personally help you get RICH and well KNOWN - pav
      September 26, 2019, 08:52:25 AM
    • ragnoroker: Brand new server! Join today - Good Eco/Nice Players - [link]
      September 25, 2019, 08:59:33 AM
    • ragnoroker: Brand new server! Join today - Good Eco/Nice Players - [link]
      September 25, 2019, 08:59:24 AM
    • ragnoroker: Brand new server! Join today - Good Eco/Nice Players - [link]
      September 25, 2019, 08:59:15 AM
    • PavSwag: bopalini
      September 23, 2019, 10:08:02 PM
    • PavSwag: Join autoscape,0rg fun events daily for infernal mystery boxes only server with Infernal Twisted Bow
      September 23, 2019, 03:05:33 PM
    • Frostydapure: Upcoming dmm/open pvp world server, 2006 style (different and fun trus me) [link] join join!
      September 23, 2019, 08:05:52 AM
    • Frostydapure: Upcoming dmm/open pvp world server, 2006 style (different and fun trus me) [link] join join!
      September 23, 2019, 08:05:45 AM
    • PavSwag: try autoscape,0rg today i will personally help you get RICH and well KNOWN - pav
      September 22, 2019, 02:55:32 PM

    Author Topic: 317refactor - the most usable 317 client  (Read 14518 times)

    0 Members and 1 Guest are viewing this topic.

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Re: 317refactor - the most usable 317 client
    « Reply #20 on: November 18, 2014, 07:06:27 PM »
    drawCentredTextWithPotentialShadow
    gross

    Right, just keep it drawText, the boolean 'shadowed' is enough to signify that the text will have a shadow.

    getTextDisplayedWidth ???

    getTextWidth gets the width including any @[email protected] embeds (used in overhead chatting). getTextDisplayedWidth gets the width without those embeds as they will be stripped out.
    Runescape Gambling

    Offlineimthenull

    • Member
    • ****
    • Posts: 2,511
    • Thanks: +1/-0
      • View Profile
    Re: 317refactor - the most usable 317 client
    « Reply #21 on: November 18, 2014, 07:08:32 PM »
    how does the word 'display' differentiate the two? it makes no sense

    OfflineRyley

    • Member
    • ****
    • *
    • Posts: 7,315
    • Thanks: +0/-0
      • View Profile
    Re: 317refactor - the most usable 317 client
    « Reply #22 on: November 18, 2014, 07:12:13 PM »
    I would honestly combine those methods, add a flag for 'including embeds' name it getTextWidth or getTextLength

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Re: 317refactor - the most usable 317 client
    « Reply #23 on: November 18, 2014, 07:25:06 PM »
    I would honestly combine those methods, add a flag for 'including embeds' name it getTextWidth or getTextLength

    But that means changing functions! :(

    Offline2Hdagger

    • Member
    • **
    • Posts: 19
    • Thanks: +0/-0
      • View Profile
    Re: 317refactor - the most usable 317 client
    « Reply #24 on: December 20, 2014, 10:11:37 PM »
    Good job dude, this will make development a lot easier. If you want to make it even easier, you can start adding comments.
    Code: [Select]
    // Client.java
    if (menuAction == 113) { // What button was clicked?

    Though I'm disappointed that after all these years, there's only one refactored client

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Re: 317refactor - the most usable 317 client
    « Reply #25 on: December 20, 2014, 11:47:58 PM »
    Good job dude, this will make development a lot easier. If you want to make it even easier, you can start adding comments.
    Code: [Select]
    // Client.java
    if (menuAction == 113) { // What button was clicked?

    Though I'm disappointed that after all these years, there's only one refactored client
    There are plenty of them.. However, this is by far the most completed one..
    I do agree with your point. It is sad that only one is this far refactored. But hey, we can't complain too much, we didn't do any better ourselves...

    Offline2Hdagger

    • Member
    • **
    • Posts: 19
    • Thanks: +0/-0
      • View Profile
    Re: 317refactor - the most usable 317 client
    « Reply #26 on: December 21, 2014, 12:32:56 AM »
    Good job dude, this will make development a lot easier. If you want to make it even easier, you can start adding comments.
    Code: [Select]
    // Client.java
    if (menuAction == 113) { // What button was clicked?

    Though I'm disappointed that after all these years, there's only one refactored client
    There are plenty of them.. However, this is by far the most completed one..
    I do agree with your point. It is sad that only one is this far refactored. But hey, we can't complain too much, we didn't do any better ourselves...

    Every one I've checked only had some classes renamed and maybe a very tiny bit of refactored code. If we don't complain, then nothing will change

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Re: 317refactor - the most usable 317 client
    « Reply #27 on: December 21, 2014, 02:04:31 AM »
    Every one I've checked only had some classes renamed and maybe a very tiny bit of refactored code. If we don't complain, then nothing will change
    Incorrect.
    Do you think Ambokile just sat around complaining his client wasn't refactored, and then *boom* it's refactored?
    Nope.
    He did something.

    Offline2Hdagger

    • Member
    • **
    • Posts: 19
    • Thanks: +0/-0
      • View Profile
    Re: 317refactor - the most usable 317 client
    « Reply #28 on: December 21, 2014, 02:44:22 AM »
    I meant that if nobody complained about the obfuscated code, it would take longer for somebody to refactor it because they wouldn't know that's what people want

    And how do I run this client?
    Error: Could not find or load main class Client

    Code: [Select]
    @echo off
    title Client
    cd ./bin/com/jagex/runescape/
    "C:\Program Files (x86)\Java\jre1.8.0_25\bin\java.exe" -Xmx500m Client 30 0 lowmem members 32
    pause
    « Last Edit: December 21, 2014, 06:19:53 AM by 2Hdagger »

    Offlineimthenull

    • Member
    • ****
    • Posts: 2,511
    • Thanks: +1/-0
      • View Profile
    Re: 317refactor - the most usable 317 client
    « Reply #29 on: December 22, 2014, 07:18:44 PM »
    Good job dude, this will make development a lot easier. If you want to make it even easier, you can start adding comments.
    Code: [Select]
    // Client.java
    if (menuAction == 113) { // What button was clicked?

    Though I'm disappointed that after all these years, there's only one refactored client
    There are plenty of them.. However, this is by far the most completed one..
    I do agree with your point. It is sad that only one is this far refactored. But hey, we can't complain too much, we didn't do any better ourselves...
    There are better refactors available, I prefer to use Cyberus' located at

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Re: 317refactor - the most usable 317 client
    « Reply #30 on: December 22, 2014, 08:34:56 PM »
    There are better refactors available, I prefer to use Cyberus' located at

    As I stated in the OP, I used Cyberus' client as a reference for this. It is largely unfinished though and therefore isn't as good for people who want to simply build on top of the RS2 client.

    Offline2Hdagger

    • Member
    • **
    • Posts: 19
    • Thanks: +0/-0
      • View Profile
    Re: 317refactor - the most usable 317 client
    « Reply #31 on: December 22, 2014, 10:36:28 PM »
    There are better refactors available, I prefer to use Cyberus' located at

    This client has more refactored code
    And from looking in Cyberus' source, it seems I can't run this client because it's missing some files
    « Last Edit: December 22, 2014, 10:44:08 PM by 2Hdagger »

    Offlineimthenull

    • Member
    • ****
    • Posts: 2,511
    • Thanks: +1/-0
      • View Profile
    Re: 317refactor - the most usable 317 client
    « Reply #32 on: December 23, 2014, 02:35:29 PM »
    i can run it no problem. you just have to have the cache

    Offline2Hdagger

    • Member
    • **
    • Posts: 19
    • Thanks: +0/-0
      • View Profile
    Re: 317refactor - the most usable 317 client
    « Reply #33 on: December 23, 2014, 05:58:17 PM »
    i can run it no problem. you just have to have the cache

    Which cache? I just wasted my time downloading Reflux 317's cache to find out it doesn't work
    Renamed it rscache and moved it to C:

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Re: 317refactor - the most usable 317 client
    « Reply #34 on: December 23, 2014, 08:22:23 PM »
    2HDagger, I recommend using Eclipse to build the project- it allows you to explore the refactoring better. The cache goes in the root folder of the client.

    I'm on my phone at the moment but if you still need help tomorrow just let me know.

    Offline2Hdagger

    • Member
    • **
    • Posts: 19
    • Thanks: +0/-0
      • View Profile
    Re: 317refactor - the most usable 317 client
    « Reply #35 on: December 23, 2014, 10:13:06 PM »
    I got JDK 1.6.0_25 and now I'm getting this
    Exception in thread "main" java.lang.NoClassDefFoundError: Client (wrong name: com/jagex/runescape/Client)
    « Last Edit: December 23, 2014, 10:51:04 PM by 2Hdagger »

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Re: 317refactor - the most usable 317 client
    « Reply #36 on: December 25, 2014, 08:33:42 PM »
    I got JDK 1.6.0_25 and now I'm getting this
    Exception in thread "main" java.lang.NoClassDefFoundError: Client (wrong name: com/jagex/runescape/Client)

    Is the project being compiled correctly?



    I made a few changes to the DrawingArea class today, you can now draw translucent lines, and both opaque and translucent circles..

    I was avoiding any adding of features up until this point but as they don't have to be used, I decided to add them.



    You can also see an upcoming guide for 317refactor in the video below. Merry Christmas all!


    Offline2Hdagger

    • Member
    • **
    • Posts: 19
    • Thanks: +0/-0
      • View Profile
    Re: 317refactor - the most usable 317 client
    « Reply #37 on: December 25, 2014, 10:25:51 PM »
    Nevermind, fixed it and thanks for trying to help. What server/cache are you using btw? I've tried 4 different caches and they all get stuck at loading config
    Fixed run.bat
    Code: [Select]
    @echo off
    title Client
    cd bin\
    "C:\Program Files (x86)\Java\jdk1.6.0_25\bin\java.exe" -Xmx500m com.jagex.runescape.Client 30 0 lowmem members 32
    pause

    Nice snow :) Although I don't like when it's not 3D but I know that would require a lot more work

    Edit: Finally found a working cache that's included with Cyberus' client
    « Last Edit: December 26, 2014, 03:57:40 AM by 2Hdagger »

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Re: 317refactor - the most usable 317 client
    « Reply #38 on: December 26, 2014, 05:21:50 AM »
    I can't provide a cache with the git repo but any 317-377 cache should do.

    Offline2Hdagger

    • Member
    • **
    • Posts: 19
    • Thanks: +0/-0
      • View Profile
    Re: 317refactor - the most usable 317 client
    « Reply #39 on: December 26, 2014, 06:20:35 AM »
    I fixed the cache issue but there's a problem again

    Tried 3 different servers and get this error when loading every time
    Code: [Select]
    java.lang.NullPointerException
            at com.jagex.runescape.Buffer.getUnsignedLEShort(Buffer.java:211)
            at com.jagex.runescape.Sprite.<init>(Sprite.java:44)
            at com.jagex.runescape.Client.startUp(Client.java:10451)
            at com.jagex.runescape.RSApplet.run(RSApplet.java:371)
            at com.jagex.runescape.Client.run(Client.java:9816)
            at java.lang.Thread.run(Thread.java:662)

    Which server are you using? :palm:

     

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