PDA

View Full Version : [508] Flashing tab icons



firescape_team
June 27th, 2010, 23:41
Open up Frames.java and check if you have the setConfig method, if not then add it:

/**
* Setting client configs.
* <p>This is used for setting prayers, running, etc.
* @param p The Player which the frame should be created for.
* @param id The config id to set.
* @param set What to set the config.
*/
public void setConfig(Player p, int id, int set) {
if (p == null || p.stream == null || p.disconnected[0]) {
return;
}
if (set < 128) {
setConfig1(p, id, set);
} else {
setConfig2(p, id, set);
}
}

Right, now we are going to make a command to just teach you how you should add it later on in a quest or skill. Open up Commands.java and add this:

if (cmd[0].equals("flashingicon")) {
p.frames.setConfig(p, 1021, Integer.parseInt(cmd[1]));
}

Now you can simply do ::flashingicon [id] to test it.
Here is a list of the icons you can use:

0 - Attack icon
1 - Skill icon
2 - Quest icon
3 - Inventory icon
4 - Wearing icon
5 - Prayer icon
6 - Magic icon
7 - Empty (not useable)
8 - Friend icon
9 - Ignore icon
10 - Logout icon
11 - Settings icon
12 - Emotes icon
13 - Music icon

Example of a codeline to use it:

p.frames.setConfig(p, 1021, 1);


How you should make it stop flashing (nothing needed to change, doesn't matters which tab is flashing it will stop them all):

p.frames.setConfig(p, 1021, -1);


Have fun, 100% credits to me.

UnitedScape
June 28th, 2010, 02:38
thanks im going to use this

TehCow
June 28th, 2010, 11:22
Pic's? Iam confused..

firescape_team
June 28th, 2010, 12:07
Pic's? Iam confused..

Only the registered members can see the link.

Skillet
June 28th, 2010, 12:10
Nice one buddy

Greetz keyani

Rian
June 30th, 2010, 11:57
I like this alot! I could really use this in future projects:)

Joe
July 3rd, 2010, 09:41
sounds like a step toward adding tut island onto 508 ;)

berka
July 7th, 2010, 19:22
sounds cool , now people can try to make there own way to get icons flashing when you level up a skill.
Very nice tutorial , never saw a way like this.

Spear
July 7th, 2010, 19:23
Very nice tutorial, I have never seen this before.

Billy
July 10th, 2010, 08:46
I think this was released before? lmao.

Billy
July 10th, 2010, 08:47
Very nice tutorial, I have never seen this before.

Lol i think this was released before all posts/accounts were deleted and on runeservr, :p

Break
July 10th, 2010, 08:50
Was release before, Not at runelocus.
Good job with this tutorial!

arcen
June 11th, 2011, 03:05
some pics?