mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-06 08:39:33 +00:00
Added dump mode
This commit is contained in:
@@ -88,6 +88,9 @@ public final class Landing {
|
|||||||
case "-loadlocal":
|
case "-loadlocal":
|
||||||
Core.setLoadLocal(true);
|
Core.setLoadLocal(true);
|
||||||
break;
|
break;
|
||||||
|
case "-dump":
|
||||||
|
Core.setDump(true);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import org.parabot.environment.servers.ServerProvider;
|
|||||||
|
|
||||||
import java.applet.Applet;
|
import java.applet.Applet;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
@@ -157,6 +158,11 @@ public class Context {
|
|||||||
serverProvider.injectHooks();
|
serverProvider.injectHooks();
|
||||||
Core.verbose("Done.");
|
Core.verbose("Done.");
|
||||||
Core.verbose("Fetching game applet...");
|
Core.verbose("Fetching game applet...");
|
||||||
|
if(Core.shouldDump()) {
|
||||||
|
Core.verbose("Dumping injected client...");
|
||||||
|
classPath.dump(new File(Directories.getWorkspace(), "dump.jar"));
|
||||||
|
Core.verbose("Done.");
|
||||||
|
}
|
||||||
gameApplet = serverProvider.fetchApplet();
|
gameApplet = serverProvider.fetchApplet();
|
||||||
if (getClient() == null) {
|
if (getClient() == null) {
|
||||||
setClientInstance(gameApplet);
|
setClientInstance(gameApplet);
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import java.io.IOException;
|
|||||||
public class Core {
|
public class Core {
|
||||||
private static boolean debug;
|
private static boolean debug;
|
||||||
private static boolean verbose;
|
private static boolean verbose;
|
||||||
|
private static boolean dump;
|
||||||
private static boolean loadLocal; //Loads both local and public scripts/servers
|
private static boolean loadLocal; //Loads both local and public scripts/servers
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -39,6 +40,15 @@ public class Core {
|
|||||||
public static void setDebug(final boolean debug) {
|
public static void setDebug(final boolean debug) {
|
||||||
Core.debug = debug;
|
Core.debug = debug;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enables dump mode
|
||||||
|
*
|
||||||
|
* @param dump
|
||||||
|
*/
|
||||||
|
public static void setDump(final boolean dump) {
|
||||||
|
Core.dump = dump;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return if the client is in debug mode.
|
* @return if the client is in debug mode.
|
||||||
@@ -53,6 +63,13 @@ public class Core {
|
|||||||
public static boolean inVerboseMode() {
|
public static boolean inVerboseMode() {
|
||||||
return verbose;
|
return verbose;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return if parabot should dump injected jar
|
||||||
|
*/
|
||||||
|
public static boolean shouldDump() {
|
||||||
|
return dump;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets verbose mode
|
* Sets verbose mode
|
||||||
|
|||||||
Reference in New Issue
Block a user