By registering with us, you'll be able to discuss, share and private message with other members of our community.
Sign up now!Api wise what does this involve?This is the wrong section for this but I'll go ahead and answer it anyways.
Varps stands for player varps. They are the raw integers that contain many pieces of player specific information. They can often be used by themselves, but often multiple pieces of information get packed into a single varp. This is where Varpbits come into play.
When multiple pieces of information are packed into a single varp, you have two options. The way things have previously been done in the scene would require the bot author to manually unpack the values they want using shifts and masks, but that's not really convenient and leaves a lot of room for error. The solution to this is to use the game client's varpbits. Varpbits are used to isolate individual pieces of information from varps for access within the game's client scripts. A varpbit is like a 1 to 1 mapping to a specific value. It does this by specifying a most and least significant bit internally and then extracting it.
TL;DR
When a varp contains one piece of information, use the raw varps.
When a varp has multiple pieces of information packed within it, use varpbits for easy extraction.
What do you mean? There is both a Varps class and a Varpbits class. You use the index you see in the dev toolkit and call the respective api methods to get there values.Api wise what does this involve?
I never saw the varpbits tab until now, too. It must have been a recent addition.tbh I never really noticed varpbits until now
I never saw the varpbits tab until now, too. It must have been a recent addition.
It was added less than a week ago in response to me not wanting to extract all the bits from a varp after the resizable oldschool update. Internally we've had them for a while but I added them in the developer toolkit to make it easier for me to debug and it's useful for you guys too.tbh I never really noticed varpbits until now
I didn't notice the varpbits class apparentlyWhat do you mean? There is both a Varps class and a Varpbits class. You use the index you see in the dev toolkit and call the respective api methods to get there values.
I manually found the shift and worked out a mask to deal with that xD also there was a pattern between the ordinal of the enum and the bit corresponding to if it contains essenceMaybe it would be wise to announce to developers the addition of a significant new feature so we can notice and make use of it quickly.
Varpbits would have solved ALL of my problems with runecrafting pouches... would have saved so much frustration and time caused by the inadequacy of varps... aargh.
Still using Eclipse over here
You didn't ask me but I use IntelliJ and have been for a long time. I highly recommend it
Done.@Cloud can the Varpbit class be added to the Jdocs as it's not there just yet
(That's kinda the reason I opened this topic too)
Ill check it out sorry that i did not ask you while your one of my favorite bot authors on here hahaYou didn't ask me but I use IntelliJ and have been for a long time. I highly recommend it
We use essential cookies to make this site work, and optional cookies to enhance your experience.