Skip to content

chore: [289] migrate thieving stall logic to marketthief varbits - #682

Open
ewby wants to merge 3 commits into
LostCityRS:289from
ewby:refactor/marketthief-vars
Open

chore: [289] migrate thieving stall logic to marketthief varbits#682
ewby wants to merge 3 commits into
LostCityRS:289from
ewby:refactor/marketthief-vars

Conversation

@ewby

@ewby ewby commented Jul 24, 2026

Copy link
Copy Markdown

this updates the existing thieving stall logic (minus miscellania and etceteria) to use the new marketthief_* varbits and retire the old thieving_stall_timer varp.

marketthief_* is new to 289 and makes the code more readable and allows the unpacking of a really bloated thieving_stall_timer varp. no more setbit, testbit, and clearbit for each stall index, now it's handled by the nicely named varbits.

also did housecleaning and removed related old definitions and stall index constants. updated the cheat_reset.rs2 runescript to %marketthief = 0, but it should be noted that this also resets the miscellania/etceteria varbits as well. i did this so there wouldn't be like 10 lines of %marketthief_cake = 0, %marketthief_silk = 0, %marketthief_tea= 0, etc.

Big thanks to @Indio3 for the idea and guidance!

Comment thread pack/varp.pack
135=varp_135
136=varp_136
137=varp_137
138=thieving_stall_timer

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't add or remove varps because it'll break crcs since they come from the client cache, but you can rename it if you want

@ewby ewby Jul 24, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

traveling today, sorry for the late reply. i appreciate the insight! will get this fixed tonight and learn more about the server compilation process to avoid breaking anything in the future.

similar thing to what you brought up but im also seeing thieving_stall_timer here:

im still learning about how the clients compile and depend on eachother for their game cache (assuming since they’re different each revision and no redundant definitions), I can’t remove/rename that definition though because previous versions depend on it right? and therefore if I were to remove/rename it globally from varp.pack wouldn’t that break some stuff?

or when the server prompts you to select a revision it definitely could just be downloading the branch specific to what you chose, and this is 289 so that doesn’t matter. again, will be giving this a try locally tonight to see.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AmVoidGuy

added the varp back and renamed as you mentioned, i like this rather than keeping it as 138=thieving_stall_timer for readability and general understanding.

also tested my fears for the _unpack/225/all.varp changes, removed the [thieving_stall_timer] definition and replaced with [varp_138], no compile errors and thieving functions as expected. idk why i was so worried about it, i thought this was gonna affect 225 compiling or something lol

thank you for the feedback so far!

…rors. removed [thieving_stall_timer] varp definition, replaced with [varp_138]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants