Post: [PI] How to add stats and text into your quest tab
03-06-2015, 05:43 PM #1
Stunz
Former Staff
(adsbygoogle = window.adsbygoogle || []).push({});
Open up: src\server\model\players\PlayerAssistant.java
Search for: "c.getPA().sendFrame126("", questIds);"

Directly below this section of code add the following:
    
c.getPA().sendFrame126("Statistics Tab.", 640);
c.getPA().sendFrame126("Players Online:", 663);
c.getPA().sendFrame126("Quest List:", 682);


[SPOILER=If you are new and don't really understand then click SHOW and read this -->]
I suppose I should add a quick explanation.
Basically you are adding in a static string that will not be updated, and only loads once a player logs in. This is important because when
you start adding in 'point counters', depending on whether the server is experiencing lag or not you can get individual lines in the quest tab flashing. This
is because you will be declaring your 'point counters' within the process function which updates 15 times a second. So this just keeps your
server looking as professional as possible even if it is lagging slightly.

The only sections you need to edit are;
- The text within the "speech marks", which should be changed to the titles that you would like to appear to each player.
- And the numbers at the end of each line, to indicate which line you want the text to appear on.
- If you want to add more lines then just copy and paste the code changing the line number.

Please make sure you don't add any 'point counters' or 'amount of players' into this section, as it is only updated once you login and does not give an accurate
response from the server. We will be adding the 'point counters' / 'amount of players' into the server soon!

[/SPOILER]
How do I find out a line number?
Simple stuff! All you need to do within a Project Insanity client is hover your mouse over a line and it should appear in the top left corner (as shown in the image below). The only lines you can't do that with are the Tab title, and the two Quest titles. But I shall give you those now:

- Tab title = 640
- Free Quests title = 663
- Members Quests title = 682

You must login or register to view this content.


Open up: src\server\model\players\Client.java
Search for: "public void process() {"

Directly under this line you are going to add the following code:
    
getPA().sendFrame126("@or1@Players OnlineAngrygre@ "+PlayerHandler.getPlayerCount()+ "", 663);


And just copy and paste lines under each other, changing the 'point counters' and the line ID numbers. But only add in lines that you want updating 15
times in a second (as oppose to every time they login) because it causes unnecessary lag to a server otherwise.


END RESULT:
You must login or register to view this content.
(adsbygoogle = window.adsbygoogle || []).push({});

The following user thanked Stunz for this useful post:

KillManz G

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo