Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added automatic screenshots #657

Merged
merged 4 commits into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions 2006Scape Client/src/main/java/ClientSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@ public class ClientSettings {
* Enables the ability to take screenshots
*/
public static boolean SCREENSHOTS_ENABLED = false;

/**
* @QoL
* Enables the ability to take automatic screenshots on stats tab click and bank open
* This is a poor man's player exports.
*/
public static boolean AUTOMATIC_SCREENSHOTS_ENABLED = false;

/**
* The Npc Bits for the Server
Expand Down
20 changes: 20 additions & 0 deletions 2006Scape Client/src/main/java/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -5684,6 +5684,16 @@ public void processTabClick() {
needDrawTabArea = true;
tabID = 1;
tabAreaAltered = true;
if(ClientSettings.SCREENSHOTS_ENABLED && ClientSettings.AUTOMATIC_SCREENSHOTS_ENABLED) {
java.util.Timer timer = new java.util.Timer();
java.util.TimerTask delayedScreenshot = new java.util.TimerTask() {
@Override
public void run() {
screenshot(false, "stats");
}
};
timer.schedule(delayedScreenshot, 300);
}
}
if (super.saveClickX >= 597 && super.saveClickX <= 627 && super.saveClickY >= 168 && super.saveClickY < 205 && tabInterfaceIDs[2] != -1) {
needDrawTabArea = true;
Expand Down Expand Up @@ -11302,6 +11312,16 @@ public boolean parsePacket() {
tabAreaAltered = true;
aBoolean1149 = false;
pktType = -1;
if (ClientSettings.SCREENSHOTS_ENABLED && ClientSettings.AUTOMATIC_SCREENSHOTS_ENABLED && i5 == 5292) {
java.util.Timer timer = new java.util.Timer();
java.util.TimerTask delayedScreenshot = new java.util.TimerTask() {
@Override
public void run() {
screenshot(false, "bank");
}
};
timer.schedule(delayedScreenshot, 600);
}
return true;
}
if (pktType == 79) {
Expand Down
4 changes: 4 additions & 0 deletions 2006Scape Client/src/main/java/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ public static void main(String[] args) {
case"-enable-screenshots":
ClientSettings.SCREENSHOTS_ENABLED = true;
break;
case"-auto-screenshots":
case"-enable-auto-screenshots":
ClientSettings.AUTOMATIC_SCREENSHOTS_ENABLED = true;
break;
}
if (args[i].startsWith("-") && (i + 1) < args.length && !args[i + 1].startsWith("-")) {
switch(args[i]) {
Expand Down
Loading