Thread: Removing ALL "qj1" - "qj100" lines from quest journal

Results 1 to 8 of 8
  1. #1 Removing ALL "qj1" - "qj100" lines from quest journal 
    Registered Member Matchbox 20's Avatar
    Join Date
    Oct 2012
    Posts
    865
    Thanks given
    228
    Thanks received
    55
    Rep Power
    0
    Getting rid of those pesky qp lines to make your server look more legit. (Also provides you with the id's of the last 50 lines of the journal)

    Most servers only clear up to line 50 because the children id's of the interface jump exponentially. I'm going to give you a way to fix this

    P.S: The benefits of doing it client sided mean that it loads only once on startup and does not require further loading to clear them

    For reference:
    Interface ID: 8134
    Title String: 8144
    Children Id's (Quest Journal body): 8145-8195, 12174-12224

    Before:
    [Only registered and activated users can see links. ]

    After (Without title of course):
    [Only registered and activated users can see links. ]


    Client: open RSInterface.java and search for:
    Code:
    if(rsInterface.type == 8)
    				rsInterface.message = stream.readString();
    Under that, add:
    Code:
    			/** 
    			 * Sets all the Strings of the quest journal to be empty, loaded once on startup!
    			 */
    			if (rsInterface.id >= 8144 && rsInterface.id <= 8195)
    				rsInterface.message = "";
    			if (rsInterface.id >= 12174 && rsInterface.id <= 12224)
    				rsInterface.message = "";
    Compile, and restart your client and your interface will be cleared. Congrats! Leave a thanks or comment if you used/helped you in any way
    Spoiler for My Releases [317:
    Spoiler for Snippets:
    [Only registered and activated users can see links. ][Only registered and activated users can see links. ]
    Spoiler for Configuration:
    [Only registered and activated users can see links. ][Only registered and activated users can see links. ]
     

  2. #2  
    

    Kris's Avatar
    Join Date
    Jun 2016
    Age
    20
    Posts
    3,211
    Thanks given
    489
    Thanks received
    1,720
    Rep Power
    1612
    That's an awful lot of looping. Are you sure this is what you've intended?
    Running that loop once results in 2600 * 2 (2 if-sentences) if-checks. I'm assuming that piece of code is ran more than once, since it seems like you're running it for all type 8 interfaces (which idk what it means but.. yeah).

    [Only registered and activated users can see links. ]
    Discord: Kris#1337
     

  3. #3  
    Registered Member Matchbox 20's Avatar
    Join Date
    Oct 2012
    Posts
    865
    Thanks given
    228
    Thanks received
    55
    Rep Power
    0
    Quote Originally Posted by Kris View Post
    That's an awful lot of looping. Are you sure this is what you've intended?
    Running that loop once results in 2600 * 2 (2 if-sentences) if-checks. I'm assuming that piece of code is ran more than once, since it seems like you're running it for all type 8 interfaces (which idk what it means but.. yeah).
    Sorry perhaps my implementation is incorrect. I am just meaning to loop through ids 8144-8195, as well as 12174-12224.

    Code:
    if(rsInterface.type == 8)
    				rsInterface.message = stream.readString();
    is a 1 line conditional statement and the nested for loops are not apart of it

    Code:
    			/** 
    			 * Sets all the Strings of the quest journal to be empty, loaded once on startup!
    			 */
    			for (int q = 8144; q < 8195; q++) {
    				if (rsInterface.id == q)
    					rsInterface.message = "";
    			}
    			for (int p = 12174; p < 12224; p++) {
    				if (rsInterface.id == p)
    					rsInterface.message = "";
    			}
    It is all done on startup in the unpack method and don't believe it will cause any overhead. The loop(s) only run once
    Spoiler for My Releases [317:
    Spoiler for Snippets:
    [Only registered and activated users can see links. ][Only registered and activated users can see links. ]
    Spoiler for Configuration:
    [Only registered and activated users can see links. ][Only registered and activated users can see links. ]
     

  4. #4  
    

    Kris's Avatar
    Join Date
    Jun 2016
    Age
    20
    Posts
    3,211
    Thanks given
    489
    Thanks received
    1,720
    Rep Power
    1612
    Quote Originally Posted by Matchbox 20 View Post
    Sorry perhaps my implementation is incorrect. I am just meaning to loop through ids 8144-8195, as well as 12174-12224.

    Code:
    if(rsInterface.type == 8)
    				rsInterface.message = stream.readString();
    is a 1 line conditional statement and the nested for loops are not apart of it

    Code:
    			/** 
    			 * Sets all the Strings of the quest journal to be empty, loaded once on startup!
    			 */
    			for (int q = 8144; q < 8195; q++) {
    				if (rsInterface.id == q)
    					rsInterface.message = "";
    			}
    			for (int p = 12174; p < 12224; p++) {
    				if (rsInterface.id == p)
    					rsInterface.message = "";
    			}
    It is all done on startup in the unpack method and don't believe it will cause any overhead. The loop(s) only run once
    Why do you loop though? It's obvious that the rsInterface.id can only be one value at the time of looping, so why not instead just check it as
    if (rsInterface.id >= 8144 && rsInterface.id <= 8195)
    rsInterface.message = "";

    Doesn't make much sense to loop it but yeah, glad you figured out that nested loop at least. Lol.

    [Only registered and activated users can see links. ]
    Discord: Kris#1337
     

  5. Thankful user:


  6. #5  
    Registered Member Matchbox 20's Avatar
    Join Date
    Oct 2012
    Posts
    865
    Thanks given
    228
    Thanks received
    55
    Rep Power
    0
    Quote Originally Posted by Kris View Post
    Why do you loop though? It's obvious that the rsInterface.id can only be one value at the time of looping, so why not instead just check it as
    if (rsInterface.id >= 8144 && rsInterface.id <= 8195)
    rsInterface.message = "";

    Doesn't make much sense to loop it but yeah, glad you figured out that nested loop at least. Lol.
    I understand what you mean now lol.. I've been high since 6AM so the nested for loops kinda went right over my head haha. Updated main post with the fix
    Thanks lmao

    I don't really go in the client unless I come up with a feature I want to implement then I scour through the client looking how to do it lol. And decided to release something albeit it not being very useful lol
    Spoiler for My Releases [317:
    Spoiler for Snippets:
    [Only registered and activated users can see links. ][Only registered and activated users can see links. ]
    Spoiler for Configuration:
    [Only registered and activated users can see links. ][Only registered and activated users can see links. ]
     

  7. #6  
    Registered Member

    Join Date
    Apr 2014
    Posts
    1,573
    Thanks given
    47
    Thanks received
    612
    Rep Power
    802
    v cool !!
     

  8. #7  
    Registered Member Matchbox 20's Avatar
    Join Date
    Oct 2012
    Posts
    865
    Thanks given
    228
    Thanks received
    55
    Rep Power
    0
    Quote Originally Posted by Zion View Post
    v cool !!
    Thanks can't tell if post count, sarcasm, or truth lol
    Spoiler for My Releases [317:
    Spoiler for Snippets:
    [Only registered and activated users can see links. ][Only registered and activated users can see links. ]
    Spoiler for Configuration:
    [Only registered and activated users can see links. ][Only registered and activated users can see links. ]
     

  9. #8  
    Registered Member OP411's Avatar
    Join Date
    May 2014
    Posts
    294
    Thanks given
    28
    Thanks received
    30
    Rep Power
    0
    just remove the old quest interface and load a new clean one
     

  10. Thankful user:



Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Remove all quests
    By buck in forum Help
    Replies: 2
    Last Post: 08-15-2009, 06:29 AM
  2. Remove all global objects (client-sided)
    By McG Rawest in forum Configuration
    Replies: 5
    Last Post: 07-26-2009, 03:18 AM
  3. Remove all tutorials sections
    By Seecon in forum Suggestions
    Replies: 12
    Last Post: 07-15-2009, 08:46 AM
  4. Replies: 6
    Last Post: 06-06-2009, 10:42 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •