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.
/**
* 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.