I recently learned about these and as far as I have seen only a very small portion of people know about it so this is going to be just a quick little tut explaining how they work.
As we all know players have settings. You can change the brightness, turn auto retaliate on, etc. However, objects and npcs also use the same methods to change their "settings".
In farming for example. If you where to log into rs using rs bot, and check the id of a patch while you raked it, you would see the object id never changes, even though the weeds get smaller. This is because it is using configs.
If you look in entitydef, objectdef, animable_5, or client.java in your client, you'd see they all contain a similar code.
Code:
public ObjectDef method580()
{
int i = -1;
if(varbit_idx != -1)
{
VarBit varBit = VarBit.cache[varbit_idx];
int setting = varBit.setting;
int start = varBit.start;
int end = varBit.end;
int mask = client.bitmasks[end - start];
i = clientInstance.variousSettings[setting] >> start & mask;
} else
if(setting_idx != -1)
i = clientInstance.variousSettings[setting_idx];
if(i < 0 || i >= childrenIDs.length || childrenIDs[i] == -1)
return null;
else
return forID(childrenIDs[i]);
}
(This is what mine looks like its partially refactored between galkon and methods client so yours will look different)
As this is the loading of settings, you can see it is used for both objects and npcs. However it is loading these settings from the player. So inorder to change these settings for an object, all we do is use the exact same code we do for changing player settings.
(method will vary based on your base, I use hyperion but just look for something similar in your actionsender or client)
This is a config that changes the camera angle for a player.(Custom client, it was the first one i found in my source.)
Code:
player.getActionSender().sendClientConfig(168, 1);
This one, will change a patch of weeds, into a different patch of weeds.
Code:
player.getActionSender().sendConfig(504, 1);
Its really pretty simple, but I feel its something people have been unable to use because they where not aware it existed. Here is a list made by method of some.
Code:
allotment:
- settings 504-505, 8 bits each
flower:
- setting 508, 8 bits each
- setting 1183, bits 12-19 (wilderness?)
herb:
- setting 515, 8 bits each
- setting 830, bits 0-7 (Trollheim patch?)
hops:
- setting 506, 8 bits each
- setting 521, bits 8-11 (kelda hops)
bush:
- setting 509, 8 bits each
calquat:
- setting 507, bits 24-29
fruit tree:
- setting 503, 8 bits each
- setting 830, bits 23-30 (lletya?)
- setting 1931, bits 18-25 (herblore habitat?)
spirit tree:
- setting 507, 6 bits each (3 total)
tree:
- setting 502, 8 bits each
- setting 830, bits 11-18
white tree:
- setting 554, bits 18-21
evil turnip:
- setting 1171, bits 7-10
jade vine:
- setting 1077, bits 23-27
These will help with farming, but it should also help with other objects as well. I believe that the rocks underneath castlewars may use this as well.
It also should work with some npcs, as to which npcs those are I have no idea.
Hope some people have found this a useful learning experience.
Credits:
99% Method for helping me with this
1% Me for compiling it into a tutorial