Merge branch 'master' into rr
This commit is contained in:
@@ -33,11 +33,11 @@ public class MethodGarbageValue
|
||||
|
||||
public MethodGarbageValue(int value)
|
||||
{
|
||||
if(value <= Byte.MAX_VALUE && value >= Byte.MIN_VALUE)
|
||||
if (value <= Byte.MAX_VALUE && value >= Byte.MIN_VALUE)
|
||||
{
|
||||
type = "B";
|
||||
}
|
||||
else if(value <= Short.MAX_VALUE && value >= Short.MIN_VALUE)
|
||||
else if (value <= Short.MAX_VALUE && value >= Short.MIN_VALUE)
|
||||
{
|
||||
type = "S";
|
||||
}
|
||||
@@ -60,6 +60,6 @@ public class MethodGarbageValue
|
||||
|
||||
public String toString()
|
||||
{
|
||||
return "MethodGarbageValue[type="+getType()+",value="+getValue()+"]";
|
||||
return "MethodGarbageValue[type=" + getType() + ",value=" + getValue() + "]";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,10 +33,6 @@ import io.sigpipe.jbsdiff.Patch;
|
||||
import javassist.ClassPool;
|
||||
import javassist.CtClass;
|
||||
import javassist.LoaderClassPath;
|
||||
import org.objectweb.asm.AnnotationVisitor;
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.objectweb.asm.FieldVisitor;
|
||||
import org.objectweb.asm.MethodVisitor;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import us.runelitepl.mixinprocessor.generators.AnnotationProcessor;
|
||||
import us.runelitepl.mixinprocessor.generators.PatchGenerator;
|
||||
@@ -50,14 +46,11 @@ import us.runelitepl.mixinprocessor.util.JavassistUtils;
|
||||
import us.runelitepl.mixinprocessor.util.RefUtils;
|
||||
import org.apache.maven.plugin.AbstractMojo;
|
||||
import org.apache.maven.plugin.MojoExecutionException;
|
||||
|
||||
import org.apache.maven.plugin.MojoFailureException;
|
||||
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||
import org.apache.maven.plugins.annotations.Mojo;
|
||||
import org.apache.maven.plugins.annotations.Parameter;
|
||||
import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
@@ -111,9 +104,9 @@ public class MixinProcessorMojo
|
||||
|
||||
public static HashMap<String, MethodGarbageValue> methodGarbageValues = new HashMap<>();
|
||||
|
||||
public static HashMap<String, byte[]> gamepack = new HashMap<>();
|
||||
private static HashMap<String, byte[]> gamepack = new HashMap<>();
|
||||
|
||||
public static final int BUFFER_SIZE = 1024 * 1024 * 4;
|
||||
private static final int BUFFER_SIZE = 1024 * 1024 * 4;
|
||||
|
||||
public void execute()
|
||||
throws MojoExecutionException
|
||||
@@ -257,7 +250,7 @@ public class MixinProcessorMojo
|
||||
|
||||
}
|
||||
|
||||
public void stderr(String s, Object... format)
|
||||
private void stderr(String s, Object... format)
|
||||
{
|
||||
getLog().info(String.format(s, format));
|
||||
}
|
||||
@@ -267,7 +260,7 @@ public class MixinProcessorMojo
|
||||
INST.stderr(s, format);
|
||||
}
|
||||
|
||||
static void deleteDir(File file) throws IOException
|
||||
private static void deleteDir(File file) throws IOException
|
||||
{
|
||||
if (!file.exists())
|
||||
{
|
||||
|
||||
@@ -31,5 +31,5 @@ public enum InjectionType
|
||||
APPEND,
|
||||
OVERWRITE,
|
||||
PREPEND,
|
||||
PROVIDED;
|
||||
PROVIDED
|
||||
}
|
||||
|
||||
@@ -26,8 +26,6 @@
|
||||
package us.runelitepl.mixinprocessor.generators;
|
||||
|
||||
import us.runelitepl.mixinprocessor.transformers.AnnotationRemoverTransformer;
|
||||
import us.runelitepl.mixinprocessor.transformers.AsmMethodGarbageTransformer;
|
||||
import us.runelitepl.mixinprocessor.transformers.AsmMethodSignatureTransformer;
|
||||
import us.runelitepl.mixinprocessor.transformers.AsmNameTransformer;
|
||||
import us.runelitepl.mixinprocessor.transformers.AsmStaticUsageTransformer;
|
||||
import us.runelitepl.mixinprocessor.transformers.DoNothingTransformer;
|
||||
|
||||
@@ -25,18 +25,12 @@
|
||||
|
||||
package us.runelitepl.mixinprocessor.generators;
|
||||
|
||||
import javassist.CannotCompileException;
|
||||
import javassist.CtClass;
|
||||
import javassist.NotFoundException;
|
||||
import us.runelitepl.mixinprocessor.MixinProcessorMojo;
|
||||
import us.runelitepl.mixinprocessor.util.JavassistUtils;
|
||||
import us.runelitepl.mixinprocessor.util.RefUtils;
|
||||
import org.objectweb.asm.ClassReader;
|
||||
import org.objectweb.asm.tree.ClassNode;
|
||||
import org.objectweb.asm.tree.FieldNode;
|
||||
import org.objectweb.asm.tree.MethodNode;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
@@ -45,11 +39,11 @@ import java.util.Set;
|
||||
public class StaticGenerator
|
||||
{
|
||||
|
||||
public static HashMap<String, ArrayList<MethodNode>> staticMethods = new HashMap<>();
|
||||
public static HashMap<String, ArrayList<FieldNode>> staticFields = new HashMap<>();
|
||||
public static Set<String> modifiedClasses = new HashSet<>();
|
||||
static HashMap<String, ArrayList<MethodNode>> staticMethods = new HashMap<>();
|
||||
static HashMap<String, ArrayList<FieldNode>> staticFields = new HashMap<>();
|
||||
static Set<String> modifiedClasses = new HashSet<>();
|
||||
|
||||
public void run(byte[] bytecode) throws NotFoundException, IOException, CannotCompileException
|
||||
public void run(byte[] bytecode)
|
||||
{
|
||||
ClassReader cr = new ClassReader(bytecode);
|
||||
|
||||
@@ -68,7 +62,7 @@ public class StaticGenerator
|
||||
continue;
|
||||
}
|
||||
String reobbed = RefUtils.reobMethodName(RefUtils.STATICS_STRING, methodName, method.desc);
|
||||
if(reobbed == null)
|
||||
if (reobbed == null)
|
||||
{
|
||||
MixinProcessorMojo.log("Failed to reob static method: %s %s", methodName, method.desc);
|
||||
throw new RuntimeException();
|
||||
@@ -93,7 +87,7 @@ public class StaticGenerator
|
||||
continue;
|
||||
}
|
||||
String reobbed = RefUtils.reobFieldName(RefUtils.STATICS_STRING, fieldName, field.desc);
|
||||
if(reobbed == null)
|
||||
if (reobbed == null)
|
||||
{
|
||||
MixinProcessorMojo.log("Failed to reob static field: %s %s", fieldName, field.desc);
|
||||
throw new RuntimeException();
|
||||
|
||||
@@ -36,7 +36,6 @@ import org.objectweb.asm.tree.AnnotationNode;
|
||||
import org.objectweb.asm.tree.FieldNode;
|
||||
import org.objectweb.asm.tree.MethodNode;
|
||||
import org.objectweb.asm.tree.TypeAnnotationNode;
|
||||
import us.runelitepl.mixinprocessor.MixinProcessorMojo;
|
||||
import us.runelitepl.mixinprocessor.parsers.MethodReflector;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@@ -48,7 +48,7 @@ public class GamepackDownloader
|
||||
ZipInputStream zipInputStream = new ZipInputStream(new ByteArrayInputStream(gamepackJarAry));
|
||||
byte[] buffer = new byte[2048];
|
||||
ZipEntry entry;
|
||||
ByteArrayOutputStream fileContent = new ByteArrayOutputStream(1024*1024*4);
|
||||
ByteArrayOutputStream fileContent = new ByteArrayOutputStream(1024 * 1024 * 4);
|
||||
while ((entry = zipInputStream.getNextEntry()) != null)
|
||||
{
|
||||
if (entry.getName().startsWith("META-INF"))
|
||||
@@ -56,8 +56,8 @@ public class GamepackDownloader
|
||||
continue;
|
||||
}
|
||||
String key = entry.getName().replace(".class", "");
|
||||
int len = 0;
|
||||
while((len = zipInputStream.read(buffer)) > 0)
|
||||
int len;
|
||||
while ((len = zipInputStream.read(buffer)) > 0)
|
||||
{
|
||||
fileContent.write(buffer, 0, len);
|
||||
}
|
||||
@@ -83,7 +83,7 @@ public class GamepackDownloader
|
||||
}
|
||||
}
|
||||
|
||||
public static String getGamepackUrl()
|
||||
private static String getGamepackUrl()
|
||||
{
|
||||
return codebase + initial_jar;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ public class HooksParser
|
||||
String f_owner = (String) field.get("owner");
|
||||
long f_decoder = (long) field.getOrDefault("decoder", (long) 1);
|
||||
String f_deobbedOwner = null;
|
||||
if(f_deobbedName.startsWith("__"))
|
||||
if (f_deobbedName.startsWith("__"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -104,7 +104,7 @@ public class HooksParser
|
||||
String m_deobbedOwner = null;
|
||||
String m_obbedName = (String) method.get("name");
|
||||
String m_descriptor = (String) method.get("descriptor");
|
||||
if(m_deobbedName.startsWith("__"))
|
||||
if (m_deobbedName.startsWith("__"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class MethodAnnotationParser
|
||||
|
||||
public void run() throws ClassNotFoundException
|
||||
{
|
||||
for(CtMethod method : patch.getDeclaredMethods())
|
||||
for (CtMethod method : patch.getDeclaredMethods())
|
||||
{
|
||||
Object[] annotations = method.getAnnotations();
|
||||
|
||||
@@ -112,7 +112,7 @@ public class MethodAnnotationParser
|
||||
}
|
||||
}
|
||||
|
||||
if(reobfuscate)
|
||||
if (reobfuscate)
|
||||
{
|
||||
MixinProcessorMojo.log("Marking: %s %s %s", method.getDeclaringClass().getSimpleName(), methodName,
|
||||
RefUtils.reobMethodDescriptor(method.getSignature()));
|
||||
|
||||
@@ -96,7 +96,7 @@ public class AnnotationRemoverTransformer extends AsmBaseTransformer
|
||||
return cw.toByteArray();
|
||||
}
|
||||
|
||||
public static String makeAnnotationDescriptor(String s)
|
||||
static String makeAnnotationDescriptor(String s)
|
||||
{
|
||||
return "Lus/runelitepl/mixinprocessor/annotations/" + s + ";";
|
||||
}
|
||||
|
||||
@@ -35,9 +35,10 @@ public abstract class AsmBaseTransformer implements Opcodes
|
||||
protected final ArrayList<String> validMethods = new ArrayList<>();
|
||||
protected final ArrayList<String> validFields = new ArrayList<>();
|
||||
|
||||
// CHECKSTYLE:OFF
|
||||
protected void buildMethodList(){}
|
||||
|
||||
protected void buildFieldList(){}
|
||||
// CHECKSTYLE:ON
|
||||
|
||||
public abstract byte[] transform();
|
||||
|
||||
|
||||
@@ -32,8 +32,6 @@ import org.objectweb.asm.MethodVisitor;
|
||||
import us.runelitepl.mixinprocessor.MethodGarbageValue;
|
||||
import us.runelitepl.mixinprocessor.MixinProcessorMojo;
|
||||
import us.runelitepl.mixinprocessor.util.RefUtils;
|
||||
|
||||
import java.sql.Ref;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class AsmMethodGarbageTransformer extends AsmBaseTransformer
|
||||
@@ -74,13 +72,13 @@ public class AsmMethodGarbageTransformer extends AsmBaseTransformer
|
||||
// mv.visitLdcInsn(BIPUSH, constant);
|
||||
// call super method with new descriptor
|
||||
|
||||
if(RefUtils.shouldReobMethod(owner, name, desc))
|
||||
if (RefUtils.shouldReobMethod(owner, name, desc))
|
||||
{
|
||||
String nc = RefUtils.reobMethodName(owner, name, desc).split(" ")[0];
|
||||
String nn = RefUtils.reobMethodName(owner, name, desc).split(" ")[1];
|
||||
String nd = RefUtils.reobMethodDescriptor(desc);
|
||||
MethodGarbageValue value;
|
||||
if((value = MixinProcessorMojo.methodGarbageValues.getOrDefault(String.format("%s.%s%s",
|
||||
if ((value = MixinProcessorMojo.methodGarbageValues.getOrDefault(String.format("%s.%s%s",
|
||||
nc, nn, nd), null)) != null)
|
||||
{
|
||||
switch (value.getType())
|
||||
|
||||
@@ -72,7 +72,7 @@ public class AsmMethodSignatureTransformer extends AsmBaseTransformer
|
||||
|
||||
private String fixMethodDesc(String className, String name, String desc)
|
||||
{
|
||||
if(className.startsWith(RefUtils.TYPE_PREFIX))
|
||||
if (className.startsWith(RefUtils.TYPE_PREFIX))
|
||||
{
|
||||
className = className.substring(RefUtils.TYPE_PREFIX.length());
|
||||
}
|
||||
|
||||
@@ -32,11 +32,6 @@ import org.objectweb.asm.MethodVisitor;
|
||||
import us.runelitepl.mixinprocessor.MixinProcessorMojo;
|
||||
import us.runelitepl.mixinprocessor.util.RefUtils;
|
||||
|
||||
import static org.objectweb.asm.Opcodes.ASM6;
|
||||
import static org.objectweb.asm.Opcodes.GETSTATIC;
|
||||
import static org.objectweb.asm.Opcodes.INVOKESTATIC;
|
||||
import static org.objectweb.asm.Opcodes.PUTSTATIC;
|
||||
|
||||
public class AsmStaticUsageTransformer extends AsmBaseTransformer
|
||||
{
|
||||
|
||||
@@ -89,7 +84,7 @@ public class AsmStaticUsageTransformer extends AsmBaseTransformer
|
||||
@Override
|
||||
public void visitMethodInsn(int opcode, String owner, String name, String descriptor, boolean isInterface)
|
||||
{
|
||||
if(opcode == INVOKESTATIC && owner.endsWith(RefUtils.STATICS_STRING))
|
||||
if (opcode == INVOKESTATIC && owner.endsWith(RefUtils.STATICS_STRING))
|
||||
{
|
||||
String originalOwner = owner.replace(TYPE_PREFIX, "");
|
||||
String temp = RefUtils.reobMethodName(RefUtils.STATICS_STRING, name, descriptor);
|
||||
|
||||
@@ -47,10 +47,10 @@ public class DoNothingTransformer extends AsmBaseTransformer
|
||||
|
||||
ClassReader cr = new ClassReader(bytecode);
|
||||
ClassWriter cw = new ClassWriter(cr, ClassWriter.COMPUTE_FRAMES);
|
||||
|
||||
// CHECKSTYLE:OFF
|
||||
cr.accept(new ClassVisitor(ASM6, cw)
|
||||
{}, 0);
|
||||
|
||||
//CHECKSTYLE:ON
|
||||
return cw.toByteArray();
|
||||
}
|
||||
}
|
||||
@@ -53,22 +53,22 @@ public class ProvidedRemoverTransformer extends AsmBaseTransformer
|
||||
ClassNode node = new ClassNode();
|
||||
cr.accept(node, 0);
|
||||
|
||||
for(Object obj : node.methods)
|
||||
for (Object obj : node.methods)
|
||||
{
|
||||
MethodNode method = (MethodNode) obj;
|
||||
if(method == null)
|
||||
if (method == null)
|
||||
{
|
||||
MixinProcessorMojo.log("ProvidedRemoverTransformer: Method null?");
|
||||
continue;
|
||||
}
|
||||
if(method.visibleAnnotations == null)
|
||||
if (method.visibleAnnotations == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
for(Object obj2 : method.visibleAnnotations)
|
||||
for (Object obj2 : method.visibleAnnotations)
|
||||
{
|
||||
AnnotationNode annot = (AnnotationNode) obj2;
|
||||
if(annot.desc.equals(AnnotationRemoverTransformer.makeAnnotationDescriptor("Provided")))
|
||||
if (annot.desc.equals(AnnotationRemoverTransformer.makeAnnotationDescriptor("Provided")))
|
||||
{
|
||||
validMethods.add(method.access + " " + method.desc + " " + method.name);
|
||||
}
|
||||
@@ -88,7 +88,7 @@ public class ProvidedRemoverTransformer extends AsmBaseTransformer
|
||||
public MethodVisitor visitMethod(int access, String name, String desc, String signature,
|
||||
String[] exceptions)
|
||||
{
|
||||
if(validMethods.contains(access + " " + desc + " " + name))
|
||||
if (validMethods.contains(access + " " + desc + " " + name))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ public class RefUtils
|
||||
public static String reobMethodName(String owner, String deob, String signature)
|
||||
{
|
||||
String prefix = "";
|
||||
if(owner.startsWith(RefUtils.TYPE_PREFIX))
|
||||
if (owner.startsWith(RefUtils.TYPE_PREFIX))
|
||||
{
|
||||
owner = owner.substring(RefUtils.TYPE_PREFIX.length());
|
||||
}
|
||||
@@ -169,11 +169,7 @@ public class RefUtils
|
||||
i++;
|
||||
}
|
||||
}
|
||||
if (i == 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return i == 1;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@@ -187,11 +183,7 @@ public class RefUtils
|
||||
i++;
|
||||
}
|
||||
}
|
||||
if (i == 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return i == 1;
|
||||
}
|
||||
|
||||
public static boolean shouldReobField(String owner, String deob, String desc)
|
||||
@@ -205,7 +197,7 @@ public class RefUtils
|
||||
|
||||
public static boolean shouldReobMethod(String owner, String deob, String desc)
|
||||
{
|
||||
if(owner.startsWith(RefUtils.TYPE_PREFIX))
|
||||
if (owner.startsWith(RefUtils.TYPE_PREFIX))
|
||||
{
|
||||
owner = owner.substring(RefUtils.TYPE_PREFIX.length());
|
||||
}
|
||||
@@ -275,7 +267,7 @@ public class RefUtils
|
||||
{
|
||||
obbedName = className;
|
||||
}
|
||||
deobbed.append("L" + obbedName + ";");
|
||||
deobbed.append("L").append(obbedName ).append(";");
|
||||
strIndex += sigPart.length();
|
||||
}
|
||||
catch (StringIndexOutOfBoundsException ex)
|
||||
|
||||
@@ -50,14 +50,17 @@ public class WebUtils
|
||||
return pageText;
|
||||
}
|
||||
|
||||
public static byte[] downloadFile(String urlText) throws IOException {
|
||||
public static byte[] downloadFile(String urlText) throws IOException
|
||||
{
|
||||
URL url = new URL(urlText);
|
||||
ByteArrayOutputStream output = new ByteArrayOutputStream();
|
||||
|
||||
try (InputStream inputStream = url.openStream()) {
|
||||
int n = 0;
|
||||
try (InputStream inputStream = url.openStream())
|
||||
{
|
||||
int n;
|
||||
byte [] buffer = new byte[ 1024 ];
|
||||
while (-1 != (n = inputStream.read(buffer))) {
|
||||
while (-1 != (n = inputStream.read(buffer)))
|
||||
{
|
||||
output.write(buffer, 0, n);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,8 +185,8 @@ public class Client
|
||||
List list = new java.util.ArrayList();
|
||||
RSNode head = getProjectilesDeque().getHead();
|
||||
for (Node node = ((Node) head).getNext();
|
||||
node != head;
|
||||
node = node.getNext())
|
||||
node != head;
|
||||
node = node.getNext())
|
||||
{
|
||||
list.add(node);
|
||||
}
|
||||
@@ -254,12 +254,12 @@ public class Client
|
||||
return;
|
||||
}
|
||||
net.runelite.api.events.MenuEntryAdded menuEntryAdded =
|
||||
new net.runelite.api.events.MenuEntryAdded(INSTANCE.getMenuOptions()[n3 - 1],
|
||||
INSTANCE.getMenuTargets()[n3 - 1],
|
||||
INSTANCE.getMenuTypes()[n3 - 1],
|
||||
INSTANCE.getMenuIdentifiers()[n3 - 1],
|
||||
INSTANCE.getMenuActionParams0()[n3 - 1],
|
||||
INSTANCE.getMenuActionParams1()[n3 - 1]);
|
||||
new net.runelite.api.events.MenuEntryAdded(INSTANCE.getMenuOptions()[n3 - 1],
|
||||
INSTANCE.getMenuTargets()[n3 - 1],
|
||||
INSTANCE.getMenuTypes()[n3 - 1],
|
||||
INSTANCE.getMenuIdentifiers()[n3 - 1],
|
||||
INSTANCE.getMenuActionParams0()[n3 - 1],
|
||||
INSTANCE.getMenuActionParams1()[n3 - 1]);
|
||||
INSTANCE.getCallbacks().post(menuEntryAdded);
|
||||
}
|
||||
|
||||
@@ -441,10 +441,10 @@ public class Client
|
||||
int n29 = rl$modelViewportXs[n10];
|
||||
int n30 = rl$modelViewportXs[n24];
|
||||
if (n25 != -5000 && n26 != -5000 && n27 != -5000 && (bl5 = (n23 = (n22 = rSModel.isClickable() ? 20
|
||||
: 5) + n11) < n28 && n23 < n29 && n23 < n30 ? false
|
||||
: ((n23 = n11 - n22) > n28 && n23 > n29 && n23 > n30 ? false
|
||||
: ((n23 = n22 + n14) < n25 && n23 < n26 && n23 < n27 ? false
|
||||
: (n23 = n14 - n22) <= n25 || n23 <= n26 || n23 <= n27))))
|
||||
: 5) + n11) < n28 && n23 < n29 && n23 < n30 ? false
|
||||
: ((n23 = n11 - n22) > n28 && n23 > n29 && n23 > n30 ? false
|
||||
: ((n23 = n22 + n14) < n25 && n23 < n26 && n23 < n27 ? false
|
||||
: (n23 = n14 - n22) <= n25 || n23 <= n26 || n23 <= n27))))
|
||||
{
|
||||
this.addHashAtMouse(l2);
|
||||
return;
|
||||
@@ -533,8 +533,7 @@ public class Client
|
||||
}
|
||||
|
||||
@Inject
|
||||
public void invokeMenuAction(int actionParam, int widgetId, int opcode, int targetId, String menuOption,
|
||||
String menuTarget, int mouseX, int mouseY)
|
||||
public void invokeMenuAction(int actionParam, int widgetId, int opcode, int targetId, String menuOption, String menuTarget, int mouseX, int mouseY)
|
||||
{
|
||||
_Statics_.menuAction(actionParam, widgetId, opcode, targetId, menuOption,
|
||||
menuTarget, mouseX, mouseY);
|
||||
|
||||
@@ -51,7 +51,7 @@ public class Player
|
||||
@Overwrite
|
||||
public SkullIcon getSkullIcon()
|
||||
{
|
||||
switch(getHeadIconPk())
|
||||
switch (getHeadIconPk())
|
||||
{
|
||||
case 0:
|
||||
return SkullIcon.SKULL;
|
||||
|
||||
@@ -43,10 +43,10 @@ public class Scene
|
||||
return true;
|
||||
}
|
||||
|
||||
if(renderable instanceof RSPlayer)
|
||||
if (renderable instanceof RSPlayer)
|
||||
{
|
||||
RSPlayer p = (RSPlayer) renderable;
|
||||
if(Client.hideClanMates && p.isClanMember())
|
||||
if (Client.hideClanMates && p.isClanMember())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -41,10 +41,10 @@ public class _Statics_
|
||||
static final void prepend$menuAction(int actionParam, int widgetId, int opcode, int targetId, String menuOption,
|
||||
String menuTarget, int mouseX, int mouseY)
|
||||
{
|
||||
if(Client.printMenuActions)
|
||||
if (Client.printMenuActions)
|
||||
{
|
||||
int printOpcode = opcode;
|
||||
if(opcode >= 2000)
|
||||
if (opcode >= 2000)
|
||||
{
|
||||
printOpcode -= 2000;
|
||||
}
|
||||
|
||||
@@ -214,8 +214,8 @@ public final class AnimationID
|
||||
// POH Animations
|
||||
public static final int INCENSE_BURNER = 3687;
|
||||
public static final int LOW_LEVEL_MAGIC_ATTACK = 1162;
|
||||
public static final int HIGH_LEVEL_MAGIC_ATTACK = 1167;
|
||||
public static final int BLOWPIPE_ATTACK = 5061;
|
||||
public static final int HIGH_LEVEL_MAGIC_ATTACK = 1167;
|
||||
public static final int BLOWPIPE_ATTACK = 5061;
|
||||
|
||||
// Hydra
|
||||
public static final int HYDRA_POISON_1 = 8234;
|
||||
|
||||
@@ -1614,7 +1614,18 @@ public interface Client extends GameEngine
|
||||
|
||||
void toggleRenderSelf();
|
||||
|
||||
void invokeMenuAction(int var1, int var2, int var3, int var4, String var5, String var6, int var7, int var8);
|
||||
/**
|
||||
*
|
||||
* @param param0 This is SceneX for gameObject, index for items, and 0 for npc.
|
||||
* @param param1 This is SceneY for gameObject, static for items, and 0 for npc.
|
||||
* @param type Menu entry Action type.
|
||||
* @param id Targets ID
|
||||
* @param menuEntry Do these actually matter?
|
||||
* @param targetString Do these actually matter?
|
||||
* @param canvasX Canvas X Point
|
||||
* @param canvasY Canvas Y Point
|
||||
*/
|
||||
void invokeMenuAction(int param0, int param1, int type, int id, String menuEntry, String targetString, int canvasX, int canvasY);
|
||||
|
||||
MouseRecorder getMouseRecorder();
|
||||
|
||||
|
||||
@@ -49,6 +49,8 @@ public class ProjectileID
|
||||
public static final int OLM_FALLING_CRYSTAL_TRAIL = 1352;
|
||||
public static final int OLM_ACID_TRAIL = 1354;
|
||||
public static final int OLM_FIRE_LINE = 1347;
|
||||
public static final int OLM_MAGE_ATTACK = 1339;
|
||||
public static final int OLM_RANGE_ATTACK = 1340;
|
||||
|
||||
public static final int VORKATH_BOMB_AOE = 1481;
|
||||
public static final int VORKATH_POISON_POOL_AOE = 1483;
|
||||
@@ -98,5 +100,5 @@ public class ProjectileID
|
||||
public static final int HYDRA_POISON = 1644;
|
||||
public static final int HYDRA_LIGHTNING = 1664;
|
||||
public static final int HYDRA_LIGHTNING_2 = 1665;
|
||||
public static final int DRAKE_BREATH = 1637;
|
||||
public static final int DRAKE_BREATH = 1637;
|
||||
}
|
||||
|
||||
@@ -36,20 +36,20 @@ public enum VarClientInt
|
||||
{
|
||||
TOOLTIP_TIMEOUT(1),
|
||||
|
||||
/**
|
||||
* 0 = no tooltip displayed
|
||||
* 1 = tooltip displaying
|
||||
*/
|
||||
/**
|
||||
* 0 = no tooltip displayed
|
||||
* 1 = tooltip displaying
|
||||
*/
|
||||
TOOLTIP_VISIBLE(2),
|
||||
|
||||
INPUT_TYPE(5),
|
||||
|
||||
MEMBERSHIP_STATUS(103),
|
||||
/**
|
||||
* -1 = player inventory closed
|
||||
* 3 = player inventory opened
|
||||
*/
|
||||
PLAYER_INVENTORY_OPENED(171),
|
||||
/**
|
||||
* -1 = player inventory closed
|
||||
* 3 = player inventory opened
|
||||
*/
|
||||
PLAYER_INVENTORY_OPENED(171),
|
||||
|
||||
INVENTORY_TAB(171),
|
||||
|
||||
|
||||
@@ -523,6 +523,14 @@ public enum Varbits
|
||||
*/
|
||||
QUEST_TAB(8168),
|
||||
|
||||
/**
|
||||
* Explorer ring
|
||||
*/
|
||||
EXPLORER_RING_ALCHTYPE(5398),
|
||||
EXPLORER_RING_TELEPORTS(4552),
|
||||
EXPLORER_RING_ALCHS(4554),
|
||||
EXPLORER_RING_RUNENERGY(4553),
|
||||
|
||||
/**
|
||||
* Temple Trekking
|
||||
*/
|
||||
@@ -559,7 +567,7 @@ public enum Varbits
|
||||
QUEST_THE_EYES_OF_GLOUPHRIE(2497),
|
||||
QUEST_FAIRYTALE_I_GROWING_PAINS(1803),
|
||||
QUEST_FAIRYTALE_II_CURE_A_QUEEN(2326),
|
||||
QUEST_THE_FEUD(334),
|
||||
QUEST_THE_FEUD(334), // 14 = able to pickpocket
|
||||
QUEST_FORGETTABLE_TALE(822),
|
||||
QUEST_GARDEN_OF_TRANQUILLITY(961),
|
||||
QUEST_GHOSTS_AHOY(217),
|
||||
@@ -628,7 +636,12 @@ public enum Varbits
|
||||
/**
|
||||
* Spellbook filtering (1 = unfiltered, 0 = filtered)
|
||||
*/
|
||||
FILTER_SPELLBOOK(6718);
|
||||
FILTER_SPELLBOOK(6718),
|
||||
|
||||
/**
|
||||
* POH Building mode (1 = yes, 0 = no)
|
||||
*/
|
||||
BUILDING_MODE(2176);
|
||||
|
||||
/**
|
||||
* The raw varbit ID.
|
||||
|
||||
@@ -30,5 +30,5 @@ import net.runelite.api.Actor;
|
||||
@Data
|
||||
public class InteractChanged
|
||||
{
|
||||
private Actor actor;
|
||||
private Actor actor;
|
||||
}
|
||||
@@ -41,6 +41,7 @@ public class WidgetID
|
||||
public static final int LOGOUT_PANEL_ID = 182;
|
||||
public static final int BANK_GROUP_ID = 12;
|
||||
public static final int BANK_INVENTORY_GROUP_ID = 15;
|
||||
public static final int BANK_PIN_GROUP_ID = 213;
|
||||
public static final int GRAND_EXCHANGE_INVENTORY_GROUP_ID = 467;
|
||||
public static final int GRAND_EXCHANGE_GROUP_ID = 465;
|
||||
public static final int DEPOSIT_BOX_GROUP_ID = 192;
|
||||
@@ -353,6 +354,7 @@ public class WidgetID
|
||||
static final int MINIMAP = 3;
|
||||
static final int MINIMAP_DRAW_AREA = 8;
|
||||
static final int MULTICOMBAT_INDICATOR = 20;
|
||||
static final int BANK_PIN = 21;
|
||||
static final int CLAN_CHAT_TAB = 31;
|
||||
static final int FRIENDS_TAB = 33;
|
||||
static final int IGNORES_TAB = 32;
|
||||
@@ -390,6 +392,7 @@ public class WidgetID
|
||||
static class ResizableViewport
|
||||
{
|
||||
static final int ITEMS_KEPT_ON_DEATH = 13;
|
||||
static final int BANK_PIN = 13;
|
||||
static final int MULTICOMBAT_INDICATOR = 16;
|
||||
static final int CLAN_CHAT_TAB = 35;
|
||||
static final int FRIENDS_TAB = 37;
|
||||
@@ -425,6 +428,7 @@ public class WidgetID
|
||||
|
||||
static class ResizableViewportBottomLine
|
||||
{
|
||||
static final int BANK_PIN = 13;
|
||||
static final int LOGOUT_BUTTON_OVERLAY = 29;
|
||||
static final int CMB_TAB = 50;
|
||||
static final int CMB_ICON = 57;
|
||||
@@ -930,7 +934,7 @@ public class WidgetID
|
||||
static final int OURANIA_TELEPORT = 142;
|
||||
|
||||
// ARCEUUS SPELLS
|
||||
static final int ARCEUUS_HOME_TELEPORT = 143;
|
||||
static final int ARCEUUS_HOME_TELEPORT = 143;
|
||||
}
|
||||
|
||||
static class Pvp
|
||||
@@ -1034,7 +1038,8 @@ public class WidgetID
|
||||
static final int CUSTOM_TEXT_CONTAINER = 33;
|
||||
}
|
||||
|
||||
public static class TradeScreen {
|
||||
public static class TradeScreen
|
||||
{
|
||||
public static final int SECOND_GROUP_ID = 334;
|
||||
public static final int SECOND_TRADING_WITH = 30;
|
||||
public static final int SECOND_MY_OFFER = 23;
|
||||
@@ -1043,7 +1048,8 @@ public class WidgetID
|
||||
public static final int SECOND_ACCEPT_TEXT = 25;
|
||||
}
|
||||
|
||||
public static class DuelConfig {
|
||||
public static class DuelConfig
|
||||
{
|
||||
public static final int CONFIG_GROUP_IP = 482;
|
||||
public static final int TITLE = 35;
|
||||
public static final int OPPONENT_ATT = 9;
|
||||
@@ -1052,11 +1058,26 @@ public class WidgetID
|
||||
public static final int OPPONENT_HP = 21;
|
||||
}
|
||||
|
||||
public static class DuelResult {
|
||||
public static class DuelResult
|
||||
{
|
||||
public static final int RESULT_GROUP_ID = 372;
|
||||
public static final int TITLE = 16;
|
||||
public static final int TOTAL_STAKED = 32;
|
||||
public static final int TOTAL_TAX = 39;
|
||||
public static final int WINNINGS = 40;
|
||||
}
|
||||
|
||||
public static class BankPin
|
||||
{
|
||||
public static final int BUTTON_1 = 16;
|
||||
public static final int BUTTON_2 = 18;
|
||||
public static final int BUTTON_3 = 20;
|
||||
public static final int BUTTON_4 = 22;
|
||||
public static final int BUTTON_5 = 24;
|
||||
public static final int BUTTON_6 = 26;
|
||||
public static final int BUTTON_7 = 28;
|
||||
public static final int BUTTON_8 = 30;
|
||||
public static final int BUTTON_9 = 32;
|
||||
public static final int BUTTON_0 = 34;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -705,7 +705,21 @@ public enum WidgetInfo
|
||||
ITEMS_KEPT_SAFE_ZONE_CONTAINER(WidgetID.KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.SAFE_ZONE_CONTAINER),
|
||||
ITEMS_KEPT_CUSTOM_TEXT_CONTAINER(WidgetID.KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.CUSTOM_TEXT_CONTAINER),
|
||||
ITEMS_LOST_VALUE(WidgetID.KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.LOST_ITEMS_VALUE),
|
||||
ITEMS_KEPT_MAX(WidgetID.KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.MAX_ITEMS_KEPT_ON_DEATH);
|
||||
ITEMS_KEPT_MAX(WidgetID.KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.MAX_ITEMS_KEPT_ON_DEATH),
|
||||
|
||||
FIXED_BANK_PIN(WidgetID.FIXED_VIEWPORT_GROUP_ID, WidgetID.FixedViewport.BANK_PIN),
|
||||
RESIZABLE_BANK_PIN(WidgetID.RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX_GROUP_ID, WidgetID.ResizableViewport.BANK_PIN),
|
||||
RESIZABLE_BOTTOM_LINE_BANK_PIN(WidgetID.RESIZABLE_VIEWPORT_BOTTOM_LINE_GROUP_ID, WidgetID.ResizableViewportBottomLine.BANK_PIN),
|
||||
BANK_PIN_1(WidgetID.BANK_PIN_GROUP_ID, WidgetID.BankPin.BUTTON_1),
|
||||
BANK_PIN_2(WidgetID.BANK_PIN_GROUP_ID, WidgetID.BankPin.BUTTON_2),
|
||||
BANK_PIN_3(WidgetID.BANK_PIN_GROUP_ID, WidgetID.BankPin.BUTTON_3),
|
||||
BANK_PIN_4(WidgetID.BANK_PIN_GROUP_ID, WidgetID.BankPin.BUTTON_4),
|
||||
BANK_PIN_5(WidgetID.BANK_PIN_GROUP_ID, WidgetID.BankPin.BUTTON_5),
|
||||
BANK_PIN_6(WidgetID.BANK_PIN_GROUP_ID, WidgetID.BankPin.BUTTON_6),
|
||||
BANK_PIN_7(WidgetID.BANK_PIN_GROUP_ID, WidgetID.BankPin.BUTTON_7),
|
||||
BANK_PIN_8(WidgetID.BANK_PIN_GROUP_ID, WidgetID.BankPin.BUTTON_8),
|
||||
BANK_PIN_9(WidgetID.BANK_PIN_GROUP_ID, WidgetID.BankPin.BUTTON_9),
|
||||
BANK_PIN_0(WidgetID.BANK_PIN_GROUP_ID, WidgetID.BankPin.BUTTON_0);
|
||||
|
||||
private final int groupId;
|
||||
private final int childId;
|
||||
|
||||
@@ -100,7 +100,7 @@ public class Notifier
|
||||
// First check if we are running in launcher
|
||||
this.terminalNotifierAvailable =
|
||||
!Strings.isNullOrEmpty(RuneLiteProperties.getLauncherVersion())
|
||||
&& isTerminalNotifierAvailable();
|
||||
&& isTerminalNotifierAvailable();
|
||||
|
||||
storeIcon();
|
||||
}
|
||||
|
||||
@@ -59,7 +59,6 @@ import net.runelite.client.menus.MenuManager;
|
||||
import net.runelite.client.plugins.Plugin;
|
||||
import net.runelite.client.plugins.PluginInstantiationException;
|
||||
import net.runelite.client.plugins.PluginManager;
|
||||
import net.runelite.client.plugins.config.ConfigPanel;
|
||||
import net.runelite.client.rs.ClientUpdateCheckMode;
|
||||
import net.runelite.client.task.Scheduler;
|
||||
import net.runelite.client.ui.ClientUI;
|
||||
@@ -86,10 +85,10 @@ public class RuneLite
|
||||
public static final File PROFILES_DIR = new File(RUNELITE_DIR, "profiles");
|
||||
public static final File PLUGIN_DIR = new File(RUNELITE_DIR, "plugins");
|
||||
public static final File SCREENSHOT_DIR = new File(RUNELITE_DIR, "screenshots");
|
||||
public static RuneLiteSplashScreen splashScreen = new RuneLiteSplashScreen();
|
||||
static final RuneLiteSplashScreen splashScreen = new RuneLiteSplashScreen();
|
||||
|
||||
|
||||
@Getter
|
||||
@Getter
|
||||
private static Injector injector;
|
||||
|
||||
@Inject
|
||||
@@ -242,7 +241,7 @@ public class RuneLite
|
||||
|
||||
// The submessage is shown in case the connection is slow
|
||||
splashScreen.setMessage("Starting RuneLite Injector");
|
||||
splashScreen.setSubMessage( " ");
|
||||
splashScreen.setSubMessage(" ");
|
||||
|
||||
final long start = System.currentTimeMillis();
|
||||
|
||||
|
||||
@@ -80,9 +80,12 @@ public class RuneLiteProperties
|
||||
|
||||
public String getDiscordAppId()
|
||||
{
|
||||
if (RuneLitePlusPlugin.customPresenceEnabled) {
|
||||
if (RuneLitePlusPlugin.customPresenceEnabled)
|
||||
{
|
||||
return properties.getProperty(RuneLitePlusPlugin.rlPlusDiscordApp);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
return properties.getProperty(DISCORD_APP_ID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,12 +36,12 @@ import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.client.events.SessionClose;
|
||||
import net.runelite.client.events.SessionOpen;
|
||||
import net.runelite.client.RuneLite;
|
||||
import net.runelite.client.config.ConfigManager;
|
||||
import net.runelite.client.eventbus.EventBus;
|
||||
import net.runelite.client.eventbus.Subscribe;
|
||||
import net.runelite.client.events.SessionClose;
|
||||
import net.runelite.client.events.SessionOpen;
|
||||
import net.runelite.client.util.LinkBrowser;
|
||||
import net.runelite.client.ws.WSClient;
|
||||
import net.runelite.http.api.account.AccountClient;
|
||||
@@ -147,7 +147,7 @@ public class SessionManager
|
||||
{
|
||||
// Initialize config for new session
|
||||
// If the session isn't logged in yet, don't switch to the new config
|
||||
configManager.switchSession(session);
|
||||
configManager.switchSession();
|
||||
}
|
||||
|
||||
eventBus.post(new SessionOpen());
|
||||
@@ -177,7 +177,7 @@ public class SessionManager
|
||||
accountSession = null; // No more account
|
||||
|
||||
// Restore config
|
||||
configManager.switchSession(null);
|
||||
configManager.switchSession();
|
||||
|
||||
eventBus.post(new SessionClose());
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ import net.runelite.api.Client;
|
||||
import net.runelite.api.Constants;
|
||||
import net.runelite.api.MainBufferProvider;
|
||||
import net.runelite.api.NullItemID;
|
||||
import net.runelite.api.Point;
|
||||
import net.runelite.api.RenderOverview;
|
||||
import net.runelite.api.Renderable;
|
||||
import net.runelite.api.WorldMapManager;
|
||||
@@ -374,6 +375,7 @@ public class Hooks implements Callbacks
|
||||
|
||||
/**
|
||||
* Copy an image
|
||||
*
|
||||
* @param src
|
||||
* @return
|
||||
*/
|
||||
@@ -395,6 +397,18 @@ public class Hooks implements Callbacks
|
||||
BufferedImage image = (BufferedImage) bufferProvider.getImage();
|
||||
Graphics2D graphics2d = image.createGraphics();
|
||||
|
||||
// Update selected scene tile
|
||||
if (!client.isMenuOpen())
|
||||
{
|
||||
Point p = client.getMouseCanvasPosition();
|
||||
p = new Point(
|
||||
p.getX() - client.getViewportXOffset(),
|
||||
p.getY() - client.getViewportYOffset());
|
||||
|
||||
client.setCheckClick(true);
|
||||
client.setMouseCanvasHoverPosition(p);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
renderer.render(graphics2d, OverlayLayer.ABOVE_SCENE);
|
||||
|
||||
@@ -49,4 +49,7 @@ public @interface ConfigItem
|
||||
|
||||
String group() default "";
|
||||
|
||||
String unhide() default "";
|
||||
|
||||
String parent() default "";
|
||||
}
|
||||
|
||||
@@ -24,29 +24,29 @@
|
||||
*/
|
||||
package net.runelite.client.config;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
|
||||
public class ConfigItemsGroup
|
||||
{
|
||||
|
||||
@Getter(AccessLevel.PUBLIC)
|
||||
private final String group;
|
||||
@Getter(AccessLevel.PUBLIC)
|
||||
private final String group;
|
||||
|
||||
@Getter(AccessLevel.PUBLIC)
|
||||
private Collection<ConfigItemDescriptor> items;
|
||||
@Getter(AccessLevel.PUBLIC)
|
||||
private Collection<ConfigItemDescriptor> items;
|
||||
|
||||
public ConfigItemsGroup(String group)
|
||||
{
|
||||
this.group = group;
|
||||
this.items = new ArrayList<>();
|
||||
}
|
||||
public ConfigItemsGroup(String group)
|
||||
{
|
||||
this.group = group;
|
||||
this.items = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void addItem(ConfigItemDescriptor item)
|
||||
{
|
||||
items.add(item);
|
||||
}
|
||||
public void addItem(ConfigItemDescriptor item)
|
||||
{
|
||||
items.add(item);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.coords.WorldPoint;
|
||||
import net.runelite.api.events.ConfigChanged;
|
||||
import net.runelite.client.RuneLite;
|
||||
import net.runelite.client.account.AccountSession;
|
||||
import static net.runelite.client.RuneLite.PROFILES_DIR;
|
||||
import net.runelite.client.eventbus.EventBus;
|
||||
import net.runelite.client.util.ColorUtil;
|
||||
|
||||
@@ -71,14 +71,14 @@ import net.runelite.client.util.ColorUtil;
|
||||
public class ConfigManager
|
||||
{
|
||||
private static final String SETTINGS_FILE_NAME = "runeliteplus.properties";
|
||||
private static final String STANDARD_SETTINGS_FILE_NAME = "settings.properties";
|
||||
private static final File SETTINGS_FILE = new File(RuneLite.RUNELITE_DIR, SETTINGS_FILE_NAME);
|
||||
private static final File STANDARD_SETTINGS_FILE = new File(RuneLite.RUNELITE_DIR, "settings.properties");
|
||||
private static final File STANDARD_SETTINGS_FILE = new File(RuneLite.RUNELITE_DIR, STANDARD_SETTINGS_FILE_NAME);
|
||||
|
||||
@Inject
|
||||
EventBus eventBus;
|
||||
|
||||
private final ScheduledExecutorService executor;
|
||||
|
||||
private final ConfigInvocationHandler handler = new ConfigInvocationHandler(this);
|
||||
private final Properties properties = new Properties();
|
||||
private final Map<String, String> pendingChanges = new HashMap<>();
|
||||
@@ -91,7 +91,7 @@ public class ConfigManager
|
||||
executor.scheduleWithFixedDelay(this::sendConfig, 30, 30, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
public final void switchSession(AccountSession session)
|
||||
public final void switchSession()
|
||||
{
|
||||
// Ensure existing config is saved
|
||||
load();
|
||||
@@ -164,7 +164,7 @@ public class ConfigManager
|
||||
catch (FileNotFoundException ex)
|
||||
{
|
||||
log.debug("Unable to load settings - no such file, syncing from standard settings");
|
||||
syncPropertiesFromFile(STANDARD_SETTINGS_FILE);
|
||||
syncLastModified();
|
||||
}
|
||||
catch (IllegalArgumentException | IOException ex)
|
||||
{
|
||||
@@ -201,11 +201,11 @@ public class ConfigManager
|
||||
}
|
||||
}
|
||||
|
||||
private void saveToFile(final File propertiesFile) throws IOException
|
||||
private void saveToFile() throws IOException
|
||||
{
|
||||
propertiesFile.getParentFile().mkdirs();
|
||||
ConfigManager.SETTINGS_FILE.getParentFile().mkdirs();
|
||||
|
||||
try (FileOutputStream out = new FileOutputStream(propertiesFile))
|
||||
try (FileOutputStream out = new FileOutputStream(ConfigManager.SETTINGS_FILE))
|
||||
{
|
||||
final FileLock lock = out.getChannel().lock();
|
||||
|
||||
@@ -364,9 +364,9 @@ public class ConfigManager
|
||||
}
|
||||
|
||||
itemGroups = itemGroups.stream().sorted((a, b) -> ComparisonChain.start()
|
||||
.compare(a.getGroup(), b.getGroup())
|
||||
.result())
|
||||
.collect(Collectors.toList());
|
||||
.compare(a.getGroup(), b.getGroup())
|
||||
.result())
|
||||
.collect(Collectors.toList());
|
||||
|
||||
return new ConfigDescriptor(group, itemGroups);
|
||||
}
|
||||
@@ -511,22 +511,22 @@ public class ConfigManager
|
||||
{
|
||||
return Duration.ofMillis(Long.parseLong(str));
|
||||
}
|
||||
if (type == Map.class)
|
||||
{
|
||||
Map<String, String> output = new HashMap<>();
|
||||
str = str.substring(1, str.length() - 1);
|
||||
String[] splitStr = str.split(", ");
|
||||
for (String s : splitStr)
|
||||
{
|
||||
String[] keyVal = s.split("=");
|
||||
if (keyVal.length > 1)
|
||||
{
|
||||
output.put(keyVal[0], keyVal[1]);
|
||||
}
|
||||
}
|
||||
if (type == Map.class)
|
||||
{
|
||||
Map<String, String> output = new HashMap<>();
|
||||
str = str.substring(1, str.length() - 1);
|
||||
String[] splitStr = str.split(", ");
|
||||
for (String s : splitStr)
|
||||
{
|
||||
String[] keyVal = s.split("=");
|
||||
if (keyVal.length > 1)
|
||||
{
|
||||
output.put(keyVal[0], keyVal[1]);
|
||||
}
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
return output;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
@@ -589,7 +589,7 @@ public class ConfigManager
|
||||
{
|
||||
try
|
||||
{
|
||||
saveToFile(SETTINGS_FILE);
|
||||
saveToFile();
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
@@ -597,4 +597,32 @@ public class ConfigManager
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void syncLastModified()
|
||||
{
|
||||
File newestFile;
|
||||
|
||||
newestFile = STANDARD_SETTINGS_FILE;
|
||||
|
||||
for (File profileDir : PROFILES_DIR.listFiles())
|
||||
{
|
||||
if (!profileDir.isDirectory())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
for (File settings : profileDir.listFiles())
|
||||
{
|
||||
if (!settings.getName().equals(STANDARD_SETTINGS_FILE_NAME) ||
|
||||
settings.lastModified() < newestFile.lastModified())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
newestFile = settings;
|
||||
}
|
||||
}
|
||||
|
||||
syncPropertiesFromFile(newestFile);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Craftiii4 <craftiii4@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.runelite.client.config;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
|
||||
public class ConfigPanelItem
|
||||
{
|
||||
|
||||
@Getter(AccessLevel.PUBLIC)
|
||||
private ConfigPanelItem parent;
|
||||
|
||||
@Getter(AccessLevel.PUBLIC)
|
||||
private List<ConfigPanelItem> children;
|
||||
|
||||
@Getter(AccessLevel.PUBLIC)
|
||||
private ConfigItemDescriptor item;
|
||||
|
||||
public ConfigPanelItem(ConfigPanelItem parent, ConfigItemDescriptor item)
|
||||
{
|
||||
this.parent = parent;
|
||||
this.children = new ArrayList<>();
|
||||
this.item = item;
|
||||
}
|
||||
|
||||
public List<ConfigPanelItem> getItemsAsList()
|
||||
{
|
||||
List<ConfigPanelItem> items = new ArrayList<>();
|
||||
|
||||
items.add(this);
|
||||
|
||||
for (ConfigPanelItem child : children)
|
||||
{
|
||||
items.addAll(child.getItemsAsList());
|
||||
}
|
||||
return items;
|
||||
}
|
||||
|
||||
public int getDepth()
|
||||
{
|
||||
return (parent == null ? 0 : parent.getDepth() + 1);
|
||||
}
|
||||
|
||||
public boolean addChildIfMatchParent(ConfigItemDescriptor cid)
|
||||
{
|
||||
|
||||
if (item != null && item.getItem().keyName().equals(cid.getItem().parent()))
|
||||
{
|
||||
children.add(new ConfigPanelItem(this, cid));
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (ConfigPanelItem child : children)
|
||||
{
|
||||
if (child.addChildIfMatchParent(cid))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -24,11 +24,10 @@
|
||||
*/
|
||||
package net.runelite.client.config;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import net.runelite.client.ui.FontManager;
|
||||
|
||||
import java.awt.Font;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import net.runelite.client.ui.FontManager;
|
||||
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
|
||||
@@ -67,7 +67,7 @@ public interface RuneLiteConfig extends Config
|
||||
keyName = "enablePlugins",
|
||||
name = "Enable loading of external plugins",
|
||||
description = "Enable loading of external plugins",
|
||||
position = 10
|
||||
position = 10
|
||||
)
|
||||
default boolean enablePlugins()
|
||||
{
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
package net.runelite.client.config;
|
||||
|
||||
public class Stub
|
||||
{
|
||||
}
|
||||
@@ -106,7 +106,7 @@ public class DiscordService implements AutoCloseable
|
||||
discordEventHandlers.joinGame = this::joinGame;
|
||||
discordEventHandlers.spectateGame = this::spectateGame;
|
||||
discordEventHandlers.joinRequest = this::joinRequest;
|
||||
discordRPC.Discord_Initialize(runeLiteProperties.discordAppID, discordEventHandlers, true, null);
|
||||
discordRPC.Discord_Initialize(RuneLiteProperties.discordAppID, discordEventHandlers, true, null);
|
||||
executorService.scheduleAtFixedRate(discordRPC::Discord_RunCallbacks, 0, 2, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,248 +35,307 @@ for mouse motion.
|
||||
package net.runelite.client.flexo;
|
||||
|
||||
import com.github.joonasvali.naturalmouse.api.MouseMotionFactory;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.client.ui.ClientUI;
|
||||
import sun.awt.ComponentFactory;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.AWTException;
|
||||
import java.awt.Color;
|
||||
import java.awt.GraphicsDevice;
|
||||
import java.awt.GraphicsEnvironment;
|
||||
import java.awt.Point;
|
||||
import java.awt.Robot;
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.event.InputEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.peer.RobotPeer;
|
||||
import java.util.Random;
|
||||
import java.util.logging.Logger;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.Constants;
|
||||
import net.runelite.client.ui.ClientUI;
|
||||
import sun.awt.ComponentFactory;
|
||||
|
||||
public class Flexo extends Robot {
|
||||
public ThreadGroup flexoThreads = new ThreadGroup("flexo");
|
||||
public static boolean isActive;
|
||||
public static double scale;
|
||||
public static Client client;
|
||||
public static ClientUI clientUI;
|
||||
public static int fixedWidth = 765;
|
||||
public static int fixedHeight = 503;
|
||||
public static boolean isStretched;
|
||||
public static int minDelay = 45;
|
||||
public static MouseMotionFactory currentMouseMotionFactory;
|
||||
public boolean pausedIndefinitely = false;
|
||||
private Thread holdKeyThread;
|
||||
private RobotPeer peer;
|
||||
public class Flexo extends Robot
|
||||
{
|
||||
public ThreadGroup flexoThreads = new ThreadGroup("flexo");
|
||||
public static boolean isActive;
|
||||
public static double scale;
|
||||
public static Client client;
|
||||
public static ClientUI clientUI;
|
||||
public static int fixedWidth = Constants.GAME_FIXED_WIDTH;
|
||||
public static int fixedHeight = Constants.GAME_FIXED_HEIGHT;
|
||||
public static boolean isStretched;
|
||||
public static int minDelay = 45;
|
||||
public static MouseMotionFactory currentMouseMotionFactory;
|
||||
public boolean pausedIndefinitely = false;
|
||||
private Thread holdKeyThread;
|
||||
private RobotPeer peer;
|
||||
|
||||
public Flexo() throws AWTException {
|
||||
if (GraphicsEnvironment.isHeadless()) {
|
||||
throw new AWTException("headless environment");
|
||||
}
|
||||
init(GraphicsEnvironment.getLocalGraphicsEnvironment()
|
||||
.getDefaultScreenDevice());
|
||||
}
|
||||
public Flexo() throws AWTException
|
||||
{
|
||||
if (GraphicsEnvironment.isHeadless())
|
||||
{
|
||||
throw new AWTException("headless environment");
|
||||
}
|
||||
init(GraphicsEnvironment.getLocalGraphicsEnvironment()
|
||||
.getDefaultScreenDevice());
|
||||
}
|
||||
|
||||
private void init(GraphicsDevice screen) throws AWTException {
|
||||
Toolkit toolkit = Toolkit.getDefaultToolkit();
|
||||
if (toolkit instanceof ComponentFactory) {
|
||||
peer = ((ComponentFactory)toolkit).createRobot(this, screen);
|
||||
RobotDisposer disposer = new RobotDisposer(peer);
|
||||
sun.java2d.Disposer.addRecord(anchor, disposer);
|
||||
}
|
||||
}
|
||||
private void init(GraphicsDevice screen) throws AWTException
|
||||
{
|
||||
Toolkit toolkit = Toolkit.getDefaultToolkit();
|
||||
if (toolkit instanceof ComponentFactory)
|
||||
{
|
||||
peer = ((ComponentFactory) toolkit).createRobot(this, screen);
|
||||
RobotDisposer disposer = new RobotDisposer(peer);
|
||||
sun.java2d.Disposer.addRecord(anchor, disposer);
|
||||
}
|
||||
}
|
||||
|
||||
private transient Object anchor = new Object();
|
||||
private transient Object anchor = new Object();
|
||||
|
||||
static class RobotDisposer implements sun.java2d.DisposerRecord {
|
||||
private final RobotPeer peer;
|
||||
private RobotDisposer(RobotPeer peer) {
|
||||
this.peer = peer;
|
||||
}
|
||||
public void dispose() {
|
||||
if (peer != null) {
|
||||
peer.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
static class RobotDisposer implements sun.java2d.DisposerRecord
|
||||
{
|
||||
private final RobotPeer peer;
|
||||
|
||||
private void pauseMS(int delayMS) {
|
||||
long initialMS = System.currentTimeMillis();
|
||||
while (System.currentTimeMillis()<initialMS+delayMS) {
|
||||
try {
|
||||
Thread.sleep(10);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
isActive = false;
|
||||
}
|
||||
private RobotDisposer(RobotPeer peer)
|
||||
{
|
||||
this.peer = peer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void mouseMove(int x, int y) {
|
||||
try {
|
||||
//TODO: Must be better way to determine titlebar width
|
||||
currentMouseMotionFactory.build(ClientUI.frame.getX()+x+determineHorizontalOffset(), ClientUI.frame.getY()+y+determineVerticalOffset()).move();
|
||||
this.delay(getMinDelay());
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
public void dispose()
|
||||
{
|
||||
if (peer != null)
|
||||
{
|
||||
peer.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void mouseMove(Point p) {
|
||||
Point p2 = p;
|
||||
mouseMove((int)p.getX(), (int)p.getY());
|
||||
try {
|
||||
Thread.sleep(150);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
private void pauseMS(int delayMS)
|
||||
{
|
||||
long initialMS = System.currentTimeMillis();
|
||||
while (System.currentTimeMillis() < initialMS + delayMS)
|
||||
{
|
||||
try
|
||||
{
|
||||
Thread.sleep(10);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
isActive = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void mousePress(int buttonID) {
|
||||
if (buttonID<1 || buttonID >5) {
|
||||
Logger.getAnonymousLogger().warning("Invalid mouse button ID. please use 1-5.");
|
||||
return;
|
||||
}
|
||||
peer.mousePress(InputEvent.getMaskForButton(buttonID));
|
||||
this.delay(getMinDelay());
|
||||
}
|
||||
@Override
|
||||
public synchronized void mouseMove(int x, int y)
|
||||
{
|
||||
try
|
||||
{
|
||||
//TODO: Must be better way to determine titlebar width
|
||||
currentMouseMotionFactory.build(ClientUI.frame.getX() + x + determineHorizontalOffset(), ClientUI.frame.getY() + y + determineVerticalOffset()).move();
|
||||
this.delay(getMinDelay());
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void mousePressAndRelease(int buttonID) {
|
||||
if (buttonID<1 || buttonID >5) {
|
||||
Logger.getAnonymousLogger().warning("Invalid mouse button ID. please use 1-5.");
|
||||
return;
|
||||
}
|
||||
peer.mousePress(InputEvent.getMaskForButton(buttonID));
|
||||
this.delay(getMinDelay());
|
||||
peer.mouseRelease(InputEvent.getMaskForButton(buttonID));
|
||||
this.delay(getMinDelay());
|
||||
}
|
||||
public synchronized void mouseMove(Point p)
|
||||
{
|
||||
Point p2 = p;
|
||||
mouseMove((int) p.getX(), (int) p.getY());
|
||||
try
|
||||
{
|
||||
Thread.sleep(150);
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: Symbols are nut supported at this time
|
||||
public synchronized void typeMessage(String message) {
|
||||
@Override
|
||||
public synchronized void mousePress(int buttonID)
|
||||
{
|
||||
if (buttonID < 1 || buttonID > 5)
|
||||
{
|
||||
Logger.getAnonymousLogger().warning("Invalid mouse button ID. please use 1-5.");
|
||||
return;
|
||||
}
|
||||
peer.mousePress(InputEvent.getMaskForButton(buttonID));
|
||||
this.delay(getMinDelay());
|
||||
}
|
||||
|
||||
Random r = new Random();
|
||||
char[] charArray = message.toCharArray();
|
||||
for (char c : charArray) {
|
||||
keyPress(KeyEvent.getExtendedKeyCodeForChar(c));
|
||||
this.delay(93+r.nextInt(getMinDelay()));
|
||||
}
|
||||
keyPress(KeyEvent.VK_ENTER);
|
||||
this.delay(93+r.nextInt(getMinDelay()));
|
||||
ClientUI.allowInput = true;
|
||||
}
|
||||
public synchronized void mousePressAndRelease(int buttonID)
|
||||
{
|
||||
if (buttonID < 1 || buttonID > 5)
|
||||
{
|
||||
Logger.getAnonymousLogger().warning("Invalid mouse button ID. please use 1-5.");
|
||||
return;
|
||||
}
|
||||
peer.mousePress(InputEvent.getMaskForButton(buttonID));
|
||||
this.delay(getMinDelay());
|
||||
peer.mouseRelease(InputEvent.getMaskForButton(buttonID));
|
||||
this.delay(getMinDelay());
|
||||
}
|
||||
|
||||
//TODO: Symbols are nut supported at this time
|
||||
public synchronized void typeMessage(String message)
|
||||
{
|
||||
|
||||
Random r = new Random();
|
||||
char[] charArray = message.toCharArray();
|
||||
for (char c : charArray)
|
||||
{
|
||||
keyPress(KeyEvent.getExtendedKeyCodeForChar(c));
|
||||
this.delay(93 + r.nextInt(getMinDelay()));
|
||||
}
|
||||
keyPress(KeyEvent.VK_ENTER);
|
||||
this.delay(93 + r.nextInt(getMinDelay()));
|
||||
ClientUI.allowInput = true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public synchronized void mouseRelease(int buttonID)
|
||||
{
|
||||
if (buttonID < 1 || buttonID > 5)
|
||||
{
|
||||
Logger.getAnonymousLogger().warning("Invalid mouse button ID. please use 1-5.");
|
||||
return;
|
||||
}
|
||||
peer.mouseRelease(InputEvent.getMaskForButton(buttonID));
|
||||
this.delay(getMinDelay());
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void mouseRelease(int buttonID) {
|
||||
if (buttonID<1 || buttonID >5) {
|
||||
Logger.getAnonymousLogger().warning("Invalid mouse button ID. please use 1-5.");
|
||||
return;
|
||||
}
|
||||
peer.mouseRelease(InputEvent.getMaskForButton(buttonID));
|
||||
this.delay(getMinDelay());
|
||||
}
|
||||
private int getMinDelay()
|
||||
{
|
||||
Random random = new Random();
|
||||
int random1 = random.nextInt(minDelay);
|
||||
if (random1 < minDelay / 2)
|
||||
{
|
||||
random1 = random.nextInt(minDelay / 2) + minDelay / 2 + random.nextInt(minDelay / 2);
|
||||
}
|
||||
return random1;
|
||||
}
|
||||
|
||||
private int getMinDelay() {
|
||||
Random random = new Random();
|
||||
int random1 = random.nextInt(minDelay);
|
||||
if (random1 < minDelay/2)
|
||||
random1 = random.nextInt(minDelay/2) + minDelay/2+random.nextInt(minDelay/2);
|
||||
return random1;
|
||||
}
|
||||
private int getWheelDelay()
|
||||
{
|
||||
Random random = new Random();
|
||||
int random1 = random.nextInt(minDelay);
|
||||
if (random1 < minDelay / 2)
|
||||
{
|
||||
random1 = random.nextInt(minDelay / 2) + minDelay / 2 + random.nextInt(minDelay / 2);
|
||||
}
|
||||
return random1;
|
||||
}
|
||||
|
||||
private int getWheelDelay() {
|
||||
Random random = new Random();
|
||||
int random1 = random.nextInt(minDelay);
|
||||
if (random1 < minDelay/2)
|
||||
random1 = random.nextInt(minDelay/2) + minDelay/2+random.nextInt(minDelay/2);
|
||||
return random1;
|
||||
}
|
||||
/**
|
||||
* Rotates the scroll wheel on wheel-equipped mice.
|
||||
*
|
||||
* @param wheelAmt number of "notches" to move the mouse wheel
|
||||
* Negative values indicate movement up/away from the user,
|
||||
* positive values indicate movement down/towards the user.
|
||||
* @since 1.4
|
||||
*/
|
||||
@Override
|
||||
public synchronized void mouseWheel(int wheelAmt)
|
||||
{
|
||||
for (int i : new int[wheelAmt])
|
||||
{
|
||||
peer.mouseWheel(wheelAmt);
|
||||
this.delay(getWheelDelay());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Rotates the scroll wheel on wheel-equipped mice.
|
||||
*
|
||||
* @param wheelAmt number of "notches" to move the mouse wheel
|
||||
* Negative values indicate movement up/away from the user,
|
||||
* positive values indicate movement down/towards the user.
|
||||
*
|
||||
* @since 1.4
|
||||
*/
|
||||
@Override
|
||||
public synchronized void mouseWheel(int wheelAmt) {
|
||||
for (int i : new int[wheelAmt]) {
|
||||
peer.mouseWheel(wheelAmt);
|
||||
this.delay(getWheelDelay());
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Presses a given key. The key should be released using the
|
||||
* <code>keyRelease</code> method.
|
||||
* <p>
|
||||
* Key codes that have more than one physical key associated with them
|
||||
* (e.g. <code>KeyEvent.VK_SHIFT</code> could mean either the
|
||||
* left or right shift key) will map to the left key.
|
||||
*
|
||||
* @param keycode Key to press (e.g. <code>KeyEvent.VK_A</code>)
|
||||
* @throws IllegalArgumentException if <code>keycode</code> is not
|
||||
* a valid key
|
||||
* @see #keyRelease(int)
|
||||
* @see java.awt.event.KeyEvent
|
||||
*/
|
||||
@Override
|
||||
public synchronized void keyPress(int keycode)
|
||||
{
|
||||
peer.keyPress(keycode);
|
||||
this.delay(getMinDelay());
|
||||
}
|
||||
|
||||
/**
|
||||
* Presses a given key. The key should be released using the
|
||||
* <code>keyRelease</code> method.
|
||||
* <p>
|
||||
* Key codes that have more than one physical key associated with them
|
||||
* (e.g. <code>KeyEvent.VK_SHIFT</code> could mean either the
|
||||
* left or right shift key) will map to the left key.
|
||||
*
|
||||
* @param keycode Key to press (e.g. <code>KeyEvent.VK_A</code>)
|
||||
* @throws IllegalArgumentException if <code>keycode</code> is not
|
||||
* a valid key
|
||||
* @see #keyRelease(int)
|
||||
* @see java.awt.event.KeyEvent
|
||||
*/
|
||||
@Override
|
||||
public synchronized void keyPress(int keycode) {
|
||||
peer.keyPress(keycode);
|
||||
this.delay(getMinDelay());
|
||||
}
|
||||
@Override
|
||||
public synchronized void keyRelease(int keycode)
|
||||
{
|
||||
peer.keyRelease(keycode);
|
||||
this.delay(getMinDelay());
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void keyRelease(int keycode) {
|
||||
peer.keyRelease(keycode);
|
||||
this.delay(getMinDelay());
|
||||
}
|
||||
public synchronized void holdKey(int keycode, int timeMS)
|
||||
{
|
||||
new Thread(() ->
|
||||
{
|
||||
peer.keyPress(keycode);
|
||||
long startTime = System.currentTimeMillis();
|
||||
while ((startTime + timeMS) > System.currentTimeMillis())
|
||||
{
|
||||
}
|
||||
peer.keyRelease(keycode);
|
||||
this.delay(getMinDelay());
|
||||
}).start();
|
||||
}
|
||||
|
||||
public synchronized void holdKey(int keycode, int timeMS) {
|
||||
new Thread(() -> {
|
||||
peer.keyPress(keycode);
|
||||
long startTime = System.currentTimeMillis();
|
||||
while ((startTime + timeMS) > System.currentTimeMillis()) { }
|
||||
peer.keyRelease(keycode);
|
||||
this.delay(getMinDelay());
|
||||
}).start();
|
||||
}
|
||||
public synchronized void holdKeyIndefinitely(int keycode)
|
||||
{
|
||||
holdKeyThread = new Thread(() ->
|
||||
{
|
||||
pausedIndefinitely = true;
|
||||
peer.keyPress(keycode);
|
||||
while (pausedIndefinitely)
|
||||
{
|
||||
try
|
||||
{
|
||||
Thread.sleep(10);
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
peer.keyRelease(keycode);
|
||||
this.delay(getMinDelay());
|
||||
});
|
||||
holdKeyThread.start();
|
||||
|
||||
public synchronized void holdKeyIndefinitely(int keycode) {
|
||||
holdKeyThread = new Thread(() -> {
|
||||
pausedIndefinitely = true;
|
||||
peer.keyPress(keycode);
|
||||
while (pausedIndefinitely) {
|
||||
try {
|
||||
holdKeyThread.sleep(10);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
peer.keyRelease(keycode);
|
||||
this.delay(getMinDelay());
|
||||
});
|
||||
holdKeyThread.start();
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public Color getPixelColor(int x, int y)
|
||||
{
|
||||
Color color = new Color(peer.getRGBPixel(x, y));
|
||||
return color;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Color getPixelColor(int x, int y) {
|
||||
Color color = new Color(peer.getRGBPixel(x, y));
|
||||
return color;
|
||||
}
|
||||
@Override
|
||||
public void delay(int ms)
|
||||
{
|
||||
pauseMS(ms);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delay(int ms) {
|
||||
pauseMS(ms);
|
||||
}
|
||||
public int determineHorizontalOffset()
|
||||
{
|
||||
return clientUI.getCanvasOffset().getX();
|
||||
}
|
||||
|
||||
public int determineHorizontalOffset() {
|
||||
return clientUI.getCanvasOffset().getX();
|
||||
}
|
||||
|
||||
public int determineVerticalOffset() {
|
||||
return clientUI.getCanvasOffset().getY();
|
||||
}
|
||||
public int determineVerticalOffset()
|
||||
{
|
||||
return clientUI.getCanvasOffset().getY();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -28,163 +28,198 @@
|
||||
|
||||
package net.runelite.client.flexo;
|
||||
|
||||
import net.runelite.client.ui.ClientUI;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.Point;
|
||||
import java.awt.Rectangle;
|
||||
import java.util.Random;
|
||||
import java.util.logging.Logger;
|
||||
import net.runelite.api.Constants;
|
||||
import net.runelite.client.ui.ClientUI;
|
||||
|
||||
public class FlexoMouse {
|
||||
public class FlexoMouse
|
||||
{
|
||||
|
||||
/*
|
||||
Should pass unstretched coords, handles all conversions here.
|
||||
*/
|
||||
public static Point getClickPoint(Rectangle rect)
|
||||
{
|
||||
if (rect!=null) {
|
||||
Random r = new Random();
|
||||
int x = -1;
|
||||
int y = -1;
|
||||
x = rect.x+r.nextInt(rect.width);
|
||||
y = rect.y+r.nextInt(rect.height);
|
||||
/*
|
||||
Should pass unstretched coords, handles all conversions here.
|
||||
*/
|
||||
public static Point getClickPoint(Rectangle rect)
|
||||
{
|
||||
if (rect != null)
|
||||
{
|
||||
Random r = new Random();
|
||||
int x = -1;
|
||||
int y = -1;
|
||||
x = rect.x + r.nextInt(rect.width);
|
||||
y = rect.y + r.nextInt(rect.height);
|
||||
|
||||
if (Flexo.isStretched) {
|
||||
double wScale;
|
||||
double hScale;
|
||||
if (Flexo.isStretched)
|
||||
{
|
||||
double wScale;
|
||||
double hScale;
|
||||
|
||||
if (Flexo.client.isResized()) {
|
||||
wScale = (Flexo.client.getStretchedDimensions().width / Flexo.client.getRealDimensions().width);
|
||||
hScale = (Flexo.client.getStretchedDimensions().height / Flexo.client.getRealDimensions().height);
|
||||
int newX = (int)(x*wScale);
|
||||
int newY = (int)(y*hScale);
|
||||
if (newX>0 && newX< ClientUI.frame.getWidth()) {
|
||||
if (newY>0 && newY< ClientUI.frame.getHeight()) {
|
||||
return new Point(newX, newY);
|
||||
}
|
||||
}
|
||||
Logger.getAnonymousLogger().warning("[RuneLit]Flexo - Off screen point attempted. Split the step, or rotate the screen.");
|
||||
return null;
|
||||
} else {
|
||||
if (x>0 && x< ClientUI.frame.getWidth()) {
|
||||
if (y>0 && y< ClientUI.frame.getHeight()) {
|
||||
return new Point(x, y);
|
||||
}
|
||||
}
|
||||
Logger.getAnonymousLogger().warning("[RuneLit]Flexo - Off screen point attempted. Split the step, or rotate the screen.");
|
||||
return null;
|
||||
}
|
||||
if (Flexo.client.isResized())
|
||||
{
|
||||
wScale = (Flexo.client.getStretchedDimensions().width / (double) Flexo.client.getRealDimensions().width);
|
||||
hScale = (Flexo.client.getStretchedDimensions().height / (double) Flexo.client.getRealDimensions().height);
|
||||
int newX = (int) (x * wScale);
|
||||
int newY = (int) (y * hScale);
|
||||
if (newX > 0 && newX < ClientUI.frame.getWidth())
|
||||
{
|
||||
if (newY > 0 && newY < ClientUI.frame.getHeight())
|
||||
{
|
||||
return new Point(newX, newY);
|
||||
}
|
||||
}
|
||||
Logger.getAnonymousLogger().warning("[RuneLit]Flexo - Off screen point attempted. Split the step, or rotate the screen.");
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (x > 0 && x < ClientUI.frame.getWidth())
|
||||
{
|
||||
if (y > 0 && y < ClientUI.frame.getHeight())
|
||||
{
|
||||
return new Point(x, y);
|
||||
}
|
||||
}
|
||||
Logger.getAnonymousLogger().warning("[RuneLit]Flexo - Off screen point attempted. Split the step, or rotate the screen.");
|
||||
return null;
|
||||
}
|
||||
|
||||
} else if (!Flexo.client.isResized()) {
|
||||
int fixedWidth = 765;
|
||||
int widthDif = ClientUI.frame.getWidth();
|
||||
}
|
||||
else if (!Flexo.client.isResized())
|
||||
{
|
||||
final int fixedWidth = Constants.GAME_FIXED_WIDTH;
|
||||
int widthDif = ClientUI.frame.getWidth();
|
||||
|
||||
if (ClientUI.pluginToolbar.isVisible()) {
|
||||
widthDif -= ClientUI.pluginToolbar.getWidth();
|
||||
}
|
||||
if (ClientUI.pluginPanel!=null)
|
||||
widthDif -= ClientUI.pluginPanel.getWidth();
|
||||
if (ClientUI.pluginToolbar.isVisible())
|
||||
{
|
||||
widthDif -= ClientUI.pluginToolbar.getWidth();
|
||||
}
|
||||
if (ClientUI.pluginPanel != null)
|
||||
{
|
||||
widthDif -= ClientUI.pluginPanel.getWidth();
|
||||
}
|
||||
|
||||
widthDif -= fixedWidth;
|
||||
if (x+(widthDif/2)>0 && x+(widthDif/2)< ClientUI.frame.getWidth()) {
|
||||
if (y>0 && y< ClientUI.frame.getHeight()) {
|
||||
return new Point(x, y);
|
||||
}
|
||||
}
|
||||
Logger.getAnonymousLogger().warning("[RuneLit]Flexo - Off screen point attempted. Split the step, or rotate the screen.");
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
if (x>0 && x< ClientUI.frame.getWidth()) {
|
||||
if (y>0 && y< ClientUI.frame.getHeight()) {
|
||||
return new Point(x, y);
|
||||
}
|
||||
}
|
||||
Logger.getAnonymousLogger().warning("[RuneLit]Flexo - Off screen point attempted. Split the step, or rotate the screen.");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
widthDif -= fixedWidth;
|
||||
if (x + (widthDif / 2) > 0 && x + (widthDif / 2) < ClientUI.frame.getWidth())
|
||||
{
|
||||
if (y > 0 && y < ClientUI.frame.getHeight())
|
||||
{
|
||||
return new Point(x, y);
|
||||
}
|
||||
}
|
||||
Logger.getAnonymousLogger().warning("[RuneLit]Flexo - Off screen point attempted. Split the step, or rotate the screen.");
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (x > 0 && x < ClientUI.frame.getWidth())
|
||||
{
|
||||
if (y > 0 && y < ClientUI.frame.getHeight())
|
||||
{
|
||||
return new Point(x, y);
|
||||
}
|
||||
}
|
||||
Logger.getAnonymousLogger().warning("[RuneLit]Flexo - Off screen point attempted. Split the step, or rotate the screen.");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Rectangle getClickArea(Rectangle rect)
|
||||
{
|
||||
if (Flexo.isStretched)
|
||||
{
|
||||
double wScale;
|
||||
double hScale;
|
||||
public static Rectangle getClickArea(Rectangle rect)
|
||||
{
|
||||
if (Flexo.isStretched)
|
||||
{
|
||||
double wScale;
|
||||
double hScale;
|
||||
|
||||
if (Flexo.client.isResized()) {
|
||||
wScale = (Flexo.client.getStretchedDimensions().width / Flexo.client.getRealDimensions().width);
|
||||
hScale = (Flexo.client.getStretchedDimensions().height / Flexo.client.getRealDimensions().height);
|
||||
} else {
|
||||
wScale = ((double) Flexo.client.getStretchedDimensions().width) / Flexo.fixedWidth;
|
||||
hScale = ((double) Flexo.client.getStretchedDimensions().height) / Flexo.fixedHeight;
|
||||
}
|
||||
if (Flexo.client.isResized())
|
||||
{
|
||||
wScale = (Flexo.client.getStretchedDimensions().width / (double) Flexo.client.getRealDimensions().width);
|
||||
hScale = (Flexo.client.getStretchedDimensions().height / (double) Flexo.client.getRealDimensions().height);
|
||||
}
|
||||
else
|
||||
{
|
||||
wScale = (Flexo.client.getStretchedDimensions().width) / (double) Flexo.fixedWidth;
|
||||
hScale = (Flexo.client.getStretchedDimensions().height) / (double) Flexo.fixedHeight;
|
||||
}
|
||||
|
||||
int xPadding = (int)rect.getWidth()/5;
|
||||
int yPadding = (int)rect.getHeight()/5;
|
||||
Random r = new Random();
|
||||
Rectangle clickRect = new Rectangle();
|
||||
clickRect.width = rect.width-xPadding*2;
|
||||
clickRect.height = rect.height-yPadding*2;
|
||||
clickRect.x = rect.x+xPadding;
|
||||
clickRect.y = rect.y+yPadding;
|
||||
if (clickRect.width>0&&clickRect.height>0) {
|
||||
int x = clickRect.x+r.nextInt(clickRect.width);
|
||||
int y = clickRect.y+r.nextInt(clickRect.height);
|
||||
double tScale = 1 + (Flexo.scale / 100);
|
||||
int xPadding = (int) rect.getWidth() / 5;
|
||||
int yPadding = (int) rect.getHeight() / 5;
|
||||
Random r = new Random();
|
||||
Rectangle clickRect = new Rectangle();
|
||||
clickRect.width = rect.width - xPadding * 2;
|
||||
clickRect.height = rect.height - yPadding * 2;
|
||||
clickRect.x = rect.x + xPadding;
|
||||
clickRect.y = rect.y + yPadding;
|
||||
if (clickRect.width > 0 && clickRect.height > 0)
|
||||
{
|
||||
int x = clickRect.x + r.nextInt(clickRect.width);
|
||||
int y = clickRect.y + r.nextInt(clickRect.height);
|
||||
double tScale = 1 + (Flexo.scale / 100);
|
||||
|
||||
if (Flexo.client.isResized()) {
|
||||
return new Rectangle((int)(clickRect.x * wScale), (int)(clickRect.y * wScale), (int)(clickRect.width * wScale), (int)(clickRect.getHeight()*hScale));
|
||||
} else {
|
||||
return new Rectangle((int)(clickRect.x), (int)(clickRect.y), (int)(clickRect.width), (int)(clickRect.getHeight()));
|
||||
}
|
||||
}
|
||||
if (Flexo.client.isResized())
|
||||
{
|
||||
return new Rectangle((int) (clickRect.x * wScale), (int) (clickRect.y * wScale), (int) (clickRect.width * wScale), (int) (clickRect.getHeight() * hScale));
|
||||
}
|
||||
else
|
||||
{
|
||||
return new Rectangle(clickRect.x, clickRect.y, clickRect.width, (int) (clickRect.getHeight()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//Fixed, not stretched
|
||||
else if (!Flexo.client.isResized()) {
|
||||
int fixedWidth = 765;
|
||||
int widthDif = ClientUI.frame.getWidth();
|
||||
}
|
||||
//Fixed, not stretched
|
||||
else if (!Flexo.client.isResized())
|
||||
{
|
||||
int fixedWidth = 765;
|
||||
int widthDif = ClientUI.frame.getWidth();
|
||||
|
||||
if (ClientUI.pluginToolbar.isVisible()) {
|
||||
widthDif -= ClientUI.pluginToolbar.getWidth();
|
||||
}
|
||||
if (ClientUI.pluginPanel!=null)
|
||||
widthDif -= ClientUI.pluginPanel.getWidth();
|
||||
if (ClientUI.pluginToolbar.isVisible())
|
||||
{
|
||||
widthDif -= ClientUI.pluginToolbar.getWidth();
|
||||
}
|
||||
if (ClientUI.pluginPanel != null)
|
||||
{
|
||||
widthDif -= ClientUI.pluginPanel.getWidth();
|
||||
}
|
||||
|
||||
widthDif -= fixedWidth;
|
||||
int xPadding = (int)rect.getWidth()/5;
|
||||
int yPadding = (int)rect.getHeight()/5;
|
||||
Random r = new Random();
|
||||
Rectangle clickRect = new Rectangle();
|
||||
clickRect.width = rect.width-xPadding;
|
||||
clickRect.height = rect.height-yPadding;
|
||||
clickRect.x = rect.x+xPadding;
|
||||
clickRect.y = rect.y+yPadding;
|
||||
if (clickRect.height>0&&clickRect.width>0) {
|
||||
int x = clickRect.x + r.nextInt(clickRect.width);
|
||||
int y = clickRect.y + r.nextInt(clickRect.height);
|
||||
return new Rectangle((int) (clickRect.x), (int) (clickRect.y), (int) (clickRect.width), (int) (clickRect.getHeight()));
|
||||
}
|
||||
}
|
||||
//Resizable, not stretched
|
||||
else {
|
||||
int xPadding = (int)rect.getWidth()/5;
|
||||
int yPadding = (int)rect.getHeight()/5;
|
||||
Random r = new Random();
|
||||
Rectangle clickRect = new Rectangle();
|
||||
clickRect.width = rect.width-xPadding*2;
|
||||
clickRect.height = rect.height-yPadding*2;
|
||||
clickRect.x = rect.x+xPadding;
|
||||
clickRect.y = rect.y+yPadding;
|
||||
if (clickRect.height>0&&clickRect.width>0) {
|
||||
int x = clickRect.x+r.nextInt(clickRect.width);
|
||||
int y = clickRect.y+r.nextInt(clickRect.height);
|
||||
return new Rectangle((int)(clickRect.x), (int)(clickRect.y), (int)(clickRect.width), (int)(clickRect.getHeight()));
|
||||
}
|
||||
}
|
||||
widthDif -= fixedWidth;
|
||||
int xPadding = (int) rect.getWidth() / 5;
|
||||
int yPadding = (int) rect.getHeight() / 5;
|
||||
Random r = new Random();
|
||||
Rectangle clickRect = new Rectangle();
|
||||
clickRect.width = rect.width - xPadding;
|
||||
clickRect.height = rect.height - yPadding;
|
||||
clickRect.x = rect.x + xPadding;
|
||||
clickRect.y = rect.y + yPadding;
|
||||
if (clickRect.height > 0 && clickRect.width > 0)
|
||||
{
|
||||
int x = clickRect.x + r.nextInt(clickRect.width);
|
||||
int y = clickRect.y + r.nextInt(clickRect.height);
|
||||
return new Rectangle(clickRect.x, clickRect.y, clickRect.width, (int) (clickRect.getHeight()));
|
||||
}
|
||||
}
|
||||
//Resizable, not stretched
|
||||
else
|
||||
{
|
||||
int xPadding = (int) rect.getWidth() / 5;
|
||||
int yPadding = (int) rect.getHeight() / 5;
|
||||
Random r = new Random();
|
||||
Rectangle clickRect = new Rectangle();
|
||||
clickRect.width = rect.width - xPadding * 2;
|
||||
clickRect.height = rect.height - yPadding * 2;
|
||||
clickRect.x = rect.x + xPadding;
|
||||
clickRect.y = rect.y + yPadding;
|
||||
if (clickRect.height > 0 && clickRect.width > 0)
|
||||
{
|
||||
int x = clickRect.x + r.nextInt(clickRect.width);
|
||||
int y = clickRect.y + r.nextInt(clickRect.height);
|
||||
return new Rectangle(clickRect.x, clickRect.y, clickRect.width, (int) (clickRect.getHeight()));
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,54 +26,258 @@
|
||||
package net.runelite.client.game;
|
||||
|
||||
import lombok.Getter;
|
||||
import static net.runelite.api.NullObjectID.*;
|
||||
import static net.runelite.api.ObjectID.*;
|
||||
import static net.runelite.api.NullObjectID.NULL_25337;
|
||||
import static net.runelite.api.NullObjectID.NULL_26371;
|
||||
import static net.runelite.api.NullObjectID.NULL_26375;
|
||||
import static net.runelite.api.NullObjectID.NULL_26884;
|
||||
import static net.runelite.api.NullObjectID.NULL_26886;
|
||||
import static net.runelite.api.NullObjectID.NULL_29868;
|
||||
import static net.runelite.api.NullObjectID.NULL_29869;
|
||||
import static net.runelite.api.NullObjectID.NULL_29870;
|
||||
import static net.runelite.api.NullObjectID.NULL_31823;
|
||||
import static net.runelite.api.NullObjectID.NULL_31849;
|
||||
import static net.runelite.api.NullObjectID.NULL_33327;
|
||||
import static net.runelite.api.NullObjectID.NULL_33328;
|
||||
import static net.runelite.api.ObjectID.A_WOODEN_LOG;
|
||||
import static net.runelite.api.ObjectID.BALANCING_LEDGE_23548;
|
||||
import static net.runelite.api.ObjectID.BIG_WINDOW;
|
||||
import static net.runelite.api.ObjectID.BOULDER_27990;
|
||||
import static net.runelite.api.ObjectID.BROKEN_FENCE;
|
||||
import static net.runelite.api.ObjectID.BROKEN_FENCE_2618;
|
||||
import static net.runelite.api.ObjectID.BROKEN_RAFT;
|
||||
import static net.runelite.api.ObjectID.BROKEN_WALL_33344;
|
||||
import static net.runelite.api.ObjectID.CASTLE_WALL;
|
||||
import static net.runelite.api.ObjectID.CLIMBING_ROCKS;
|
||||
import static net.runelite.api.ObjectID.CLIMBING_ROCKS_11948;
|
||||
import static net.runelite.api.ObjectID.CLIMBING_ROCKS_11949;
|
||||
import static net.runelite.api.ObjectID.CREVICE_16465;
|
||||
import static net.runelite.api.ObjectID.CREVICE_16539;
|
||||
import static net.runelite.api.ObjectID.CREVICE_16543;
|
||||
import static net.runelite.api.ObjectID.CREVICE_19043;
|
||||
import static net.runelite.api.ObjectID.CREVICE_30198;
|
||||
import static net.runelite.api.ObjectID.CREVICE_9739;
|
||||
import static net.runelite.api.ObjectID.CREVICE_9740;
|
||||
import static net.runelite.api.ObjectID.CROSSBOW_TREE_17062;
|
||||
import static net.runelite.api.ObjectID.CRUMBLING_WALL_24222;
|
||||
import static net.runelite.api.ObjectID.DARK_TUNNEL_10047;
|
||||
import static net.runelite.api.ObjectID.DENSE_FOREST;
|
||||
import static net.runelite.api.ObjectID.DENSE_FOREST_3938;
|
||||
import static net.runelite.api.ObjectID.DENSE_FOREST_3939;
|
||||
import static net.runelite.api.ObjectID.DENSE_FOREST_3998;
|
||||
import static net.runelite.api.ObjectID.DENSE_FOREST_3999;
|
||||
import static net.runelite.api.ObjectID.FALLEN_TREE_33192;
|
||||
import static net.runelite.api.ObjectID.FENCE_16518;
|
||||
import static net.runelite.api.ObjectID.GAP;
|
||||
import static net.runelite.api.ObjectID.GAP_2831;
|
||||
import static net.runelite.api.ObjectID.GAP_29326;
|
||||
import static net.runelite.api.ObjectID.HOLE_16520;
|
||||
import static net.runelite.api.ObjectID.HOLE_30966;
|
||||
import static net.runelite.api.ObjectID.HOLE_31481;
|
||||
import static net.runelite.api.ObjectID.HOLE_31482;
|
||||
import static net.runelite.api.ObjectID.ICE_CHUNKS_31822;
|
||||
import static net.runelite.api.ObjectID.ICE_CHUNKS_31990;
|
||||
import static net.runelite.api.ObjectID.JUTTING_WALL_17002;
|
||||
import static net.runelite.api.ObjectID.LADDER_30938;
|
||||
import static net.runelite.api.ObjectID.LADDER_30939;
|
||||
import static net.runelite.api.ObjectID.LADDER_30940;
|
||||
import static net.runelite.api.ObjectID.LADDER_30941;
|
||||
import static net.runelite.api.ObjectID.LEAVES;
|
||||
import static net.runelite.api.ObjectID.LEAVES_3924;
|
||||
import static net.runelite.api.ObjectID.LEAVES_3925;
|
||||
import static net.runelite.api.ObjectID.LEDGE_33190;
|
||||
import static net.runelite.api.ObjectID.LITTLE_BOULDER;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_16540;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_16541;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_16542;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_16546;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_16547;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_16548;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_20882;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_20884;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_23274;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_3929;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_3930;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_3931;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_3932;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_3933;
|
||||
import static net.runelite.api.ObjectID.LOOSE_RAILING;
|
||||
import static net.runelite.api.ObjectID.LOOSE_RAILING_2186;
|
||||
import static net.runelite.api.ObjectID.LOOSE_RAILING_28849;
|
||||
import static net.runelite.api.ObjectID.LOW_FENCE;
|
||||
import static net.runelite.api.ObjectID.MONKEYBARS_23566;
|
||||
import static net.runelite.api.ObjectID.MONKEYBARS_23567;
|
||||
import static net.runelite.api.ObjectID.MYSTERIOUS_PIPE;
|
||||
import static net.runelite.api.ObjectID.OBSTACLE;
|
||||
import static net.runelite.api.ObjectID.OBSTACLE_30767;
|
||||
import static net.runelite.api.ObjectID.OBSTACLE_30962;
|
||||
import static net.runelite.api.ObjectID.OBSTACLE_30964;
|
||||
import static net.runelite.api.ObjectID.OBSTACLE_PIPE_16509;
|
||||
import static net.runelite.api.ObjectID.OBSTACLE_PIPE_16511;
|
||||
import static net.runelite.api.ObjectID.OBSTACLE_PIPE_23140;
|
||||
import static net.runelite.api.ObjectID.ORNATE_RAILING;
|
||||
import static net.runelite.api.ObjectID.ORNATE_RAILING_17000;
|
||||
import static net.runelite.api.ObjectID.PILE_OF_RUBBLE_23563;
|
||||
import static net.runelite.api.ObjectID.PILE_OF_RUBBLE_23564;
|
||||
import static net.runelite.api.ObjectID.PILLAR_31561;
|
||||
import static net.runelite.api.ObjectID.PILLAR_31809;
|
||||
import static net.runelite.api.ObjectID.PIPE_21727;
|
||||
import static net.runelite.api.ObjectID.PIPE_21728;
|
||||
import static net.runelite.api.ObjectID.ROCKS;
|
||||
import static net.runelite.api.ObjectID.ROCKSLIDE_33184;
|
||||
import static net.runelite.api.ObjectID.ROCKSLIDE_33185;
|
||||
import static net.runelite.api.ObjectID.ROCKSLIDE_33191;
|
||||
import static net.runelite.api.ObjectID.ROCKS_14106;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16464;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16514;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16515;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16521;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16522;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16523;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16524;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16534;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16535;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16545;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16549;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16550;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16998;
|
||||
import static net.runelite.api.ObjectID.ROCKS_16999;
|
||||
import static net.runelite.api.ObjectID.ROCKS_17042;
|
||||
import static net.runelite.api.ObjectID.ROCKS_19849;
|
||||
import static net.runelite.api.ObjectID.ROCKS_2231;
|
||||
import static net.runelite.api.ObjectID.ROCKS_27984;
|
||||
import static net.runelite.api.ObjectID.ROCKS_27985;
|
||||
import static net.runelite.api.ObjectID.ROCKS_27987;
|
||||
import static net.runelite.api.ObjectID.ROCKS_27988;
|
||||
import static net.runelite.api.ObjectID.ROCKS_31757;
|
||||
import static net.runelite.api.ObjectID.ROCKS_31758;
|
||||
import static net.runelite.api.ObjectID.ROCKS_31759;
|
||||
import static net.runelite.api.ObjectID.ROCKS_34396;
|
||||
import static net.runelite.api.ObjectID.ROCKS_34397;
|
||||
import static net.runelite.api.ObjectID.ROCKS_34741;
|
||||
import static net.runelite.api.ObjectID.ROCKS_3748;
|
||||
import static net.runelite.api.ObjectID.ROCKS_3790;
|
||||
import static net.runelite.api.ObjectID.ROCKS_3791;
|
||||
import static net.runelite.api.ObjectID.ROCKS_3803;
|
||||
import static net.runelite.api.ObjectID.ROCKS_3804;
|
||||
import static net.runelite.api.ObjectID.ROCKS_6673;
|
||||
import static net.runelite.api.ObjectID.ROCKY_HANDHOLDS_26400;
|
||||
import static net.runelite.api.ObjectID.ROCKY_HANDHOLDS_26401;
|
||||
import static net.runelite.api.ObjectID.ROCKY_HANDHOLDS_26402;
|
||||
import static net.runelite.api.ObjectID.ROCKY_HANDHOLDS_26404;
|
||||
import static net.runelite.api.ObjectID.ROCKY_HANDHOLDS_26405;
|
||||
import static net.runelite.api.ObjectID.ROCKY_HANDHOLDS_26406;
|
||||
import static net.runelite.api.ObjectID.ROCK_16115;
|
||||
import static net.runelite.api.ObjectID.ROPESWING_23568;
|
||||
import static net.runelite.api.ObjectID.ROPESWING_23569;
|
||||
import static net.runelite.api.ObjectID.ROPE_ANCHOR;
|
||||
import static net.runelite.api.ObjectID.ROPE_ANCHOR_30917;
|
||||
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21306;
|
||||
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21307;
|
||||
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21308;
|
||||
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21309;
|
||||
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21310;
|
||||
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21311;
|
||||
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21312;
|
||||
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21313;
|
||||
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21314;
|
||||
import static net.runelite.api.ObjectID.ROPE_BRIDGE_21315;
|
||||
import static net.runelite.api.ObjectID.RUBBER_CAP_MUSHROOM;
|
||||
import static net.runelite.api.ObjectID.SPIKEY_CHAIN;
|
||||
import static net.runelite.api.ObjectID.SPIKEY_CHAIN_16538;
|
||||
import static net.runelite.api.ObjectID.STAIRS_31485;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONES;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONES_23646;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONES_23647;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_10663;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_11768;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_13504;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_14917;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_14918;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_16466;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_16513;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_16533;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_19040;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_19042;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_21738;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_21739;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_29728;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_29729;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_29730;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_5948;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_5949;
|
||||
import static net.runelite.api.ObjectID.STEPS;
|
||||
import static net.runelite.api.ObjectID.STEPS_29993;
|
||||
import static net.runelite.api.ObjectID.STICKS;
|
||||
import static net.runelite.api.ObjectID.STILE;
|
||||
import static net.runelite.api.ObjectID.STILE_12982;
|
||||
import static net.runelite.api.ObjectID.STRANGE_FLOOR;
|
||||
import static net.runelite.api.ObjectID.STRANGE_FLOOR_16544;
|
||||
import static net.runelite.api.ObjectID.STRONG_TREE_17074;
|
||||
import static net.runelite.api.ObjectID.TIGHTGAP;
|
||||
import static net.runelite.api.ObjectID.TRELLIS_20056;
|
||||
import static net.runelite.api.ObjectID.TRIPWIRE;
|
||||
import static net.runelite.api.ObjectID.TUNNEL_30174;
|
||||
import static net.runelite.api.ObjectID.TUNNEL_30175;
|
||||
import static net.runelite.api.ObjectID.TUNNEL_30959;
|
||||
import static net.runelite.api.ObjectID.UNDERWALL_TUNNEL;
|
||||
import static net.runelite.api.ObjectID.UNDERWALL_TUNNEL_16528;
|
||||
import static net.runelite.api.ObjectID.UNDERWALL_TUNNEL_16529;
|
||||
import static net.runelite.api.ObjectID.UNDERWALL_TUNNEL_16530;
|
||||
import static net.runelite.api.ObjectID.UNDERWALL_TUNNEL_19032;
|
||||
import static net.runelite.api.ObjectID.UNDERWALL_TUNNEL_19036;
|
||||
import static net.runelite.api.ObjectID.VINE_26880;
|
||||
import static net.runelite.api.ObjectID.VINE_26882;
|
||||
import static net.runelite.api.ObjectID.WALL_17047;
|
||||
import static net.runelite.api.ObjectID.WALL_17049;
|
||||
import static net.runelite.api.ObjectID.WALL_17050;
|
||||
import static net.runelite.api.ObjectID.WEATHERED_WALL;
|
||||
import static net.runelite.api.ObjectID.WEATHERED_WALL_16526;
|
||||
import net.runelite.api.coords.WorldPoint;
|
||||
|
||||
@Getter
|
||||
public enum AgilityShortcut
|
||||
{
|
||||
GENERIC_SHORTCUT(1, "Shortcut", null,
|
||||
// Trollheim
|
||||
ROCKS_3790, ROCKS_3791,
|
||||
// Fremennik Slayer Cave
|
||||
STEPS_29993,
|
||||
// Fossil Island
|
||||
LADDER_30938, LADDER_30939, LADDER_30940, LADDER_30941, RUBBER_CAP_MUSHROOM,
|
||||
// Brimhaven dungeon
|
||||
CREVICE_30198,
|
||||
// Lumbridge
|
||||
STILE_12982,
|
||||
// Gu'Tanoth Bridge
|
||||
GAP, GAP_2831,
|
||||
// Lumbridge Swamp Caves
|
||||
STEPPING_STONE_5948, STEPPING_STONE_5949, ROCKS_6673,
|
||||
// Morytania Pirate Ship
|
||||
ROCK_16115,
|
||||
// Lumber Yard
|
||||
BROKEN_FENCE_2618,
|
||||
// McGrubor's Wood
|
||||
LOOSE_RAILING,
|
||||
// Underwater Area Fossil Island
|
||||
TUNNEL_30959, HOLE_30966, OBSTACLE, OBSTACLE_30767, OBSTACLE_30964, OBSTACLE_30962,
|
||||
// Tree Gnome Village
|
||||
LOOSE_RAILING_2186,
|
||||
// Burgh de Rott
|
||||
LOW_FENCE,
|
||||
// Taverley
|
||||
STILE,
|
||||
// Asgarnian Ice Dungeon
|
||||
STEPS,
|
||||
// Fossil Island Wyvern Cave
|
||||
STAIRS_31485),
|
||||
// Trollheim
|
||||
ROCKS_3790, ROCKS_3791,
|
||||
// Fremennik Slayer Cave
|
||||
STEPS_29993,
|
||||
// Fossil Island
|
||||
LADDER_30938, LADDER_30939, LADDER_30940, LADDER_30941, RUBBER_CAP_MUSHROOM,
|
||||
// Brimhaven dungeon
|
||||
CREVICE_30198,
|
||||
// Lumbridge
|
||||
STILE_12982,
|
||||
// Gu'Tanoth Bridge
|
||||
GAP, GAP_2831,
|
||||
// Lumbridge Swamp Caves
|
||||
STEPPING_STONE_5948, STEPPING_STONE_5949, ROCKS_6673,
|
||||
// Morytania Pirate Ship
|
||||
ROCK_16115,
|
||||
// Lumber Yard
|
||||
BROKEN_FENCE_2618,
|
||||
// McGrubor's Wood
|
||||
LOOSE_RAILING,
|
||||
// Underwater Area Fossil Island
|
||||
TUNNEL_30959, HOLE_30966, OBSTACLE, OBSTACLE_30767, OBSTACLE_30964, OBSTACLE_30962,
|
||||
// Tree Gnome Village
|
||||
LOOSE_RAILING_2186,
|
||||
// Burgh de Rott
|
||||
LOW_FENCE,
|
||||
// Taverley
|
||||
STILE,
|
||||
// Asgarnian Ice Dungeon
|
||||
STEPS,
|
||||
// Fossil Island Wyvern Cave
|
||||
STAIRS_31485),
|
||||
BRIMHAVEN_DUNGEON_MEDIUM_PIPE_RETURN(1, "Pipe Squeeze", null, new WorldPoint(2698, 9491, 0), PIPE_21727),
|
||||
BRIMHAVEN_DUNGEON_PIPE_RETURN(1, "Pipe Squeeze", null, new WorldPoint(2655, 9573, 0), PIPE_21728),
|
||||
BRIMHAVEN_DUNGEON_STEPPING_STONES_RETURN(1, "Pipe Squeeze", null, STEPPING_STONE_21739),
|
||||
BRIMHAVEN_DUNGEON_LOG_BALANCE_RETURN(1, "Log Balance", null, LOG_BALANCE_20884),
|
||||
AGILITY_PYRAMID_ROCKS_WEST(1, "Rocks", null, CLIMBING_ROCKS_11948),
|
||||
CAIRN_ISLE_CLIMBING_ROCKS(1, "Rocks", null, CLIMBING_ROCKS),
|
||||
KARAMJA_GLIDER_LOG(1, "Log Balance", new WorldPoint(2906, 3050, 0), A_WOODEN_LOG ),
|
||||
FALADOR_CRUMBLING_WALL(5, "Crumbling Wall", new WorldPoint(2936, 3357, 0), CRUMBLING_WALL_24222 ),
|
||||
KARAMJA_GLIDER_LOG(1, "Log Balance", new WorldPoint(2906, 3050, 0), A_WOODEN_LOG),
|
||||
FALADOR_CRUMBLING_WALL(5, "Crumbling Wall", new WorldPoint(2936, 3357, 0), CRUMBLING_WALL_24222),
|
||||
RIVER_LUM_GRAPPLE_WEST(8, "Grapple Broken Raft", new WorldPoint(3245, 3179, 0), BROKEN_RAFT),
|
||||
RIVER_LUM_GRAPPLE_EAST(8, "Grapple Broken Raft", new WorldPoint(3258, 3179, 0), BROKEN_RAFT),
|
||||
CORSAIR_COVE_ROCKS(10, "Rocks", new WorldPoint(2545, 2871, 0), ROCKS_31757),
|
||||
@@ -84,7 +288,7 @@ public enum AgilityShortcut
|
||||
GOBLIN_VILLAGE_WALL(14, "Wall", new WorldPoint(2925, 3523, 0), TIGHTGAP),
|
||||
CORSAIR_COVE_DUNGEON_PILLAR(15, "Pillar Jump", new WorldPoint(1980, 8996, 0), PILLAR_31809),
|
||||
EDGEVILLE_DUNGEON_MONKEYBARS(15, "Monkey Bars", null, MONKEYBARS_23566),
|
||||
TROLLHEIM_ROCKS(15, "Rocks", null, new WorldPoint(2838, 3614, 0), ROCKS_3748), // No fixed world map location, but rocks near death plateau have a requirement of 15
|
||||
TROLLHEIM_ROCKS(15, "Rocks", null, new WorldPoint(2838, 3614, 0), ROCKS_3748), // No fixed world map location, but rocks near death plateau have a requirement of 15
|
||||
YANILLE_UNDERWALL_TUNNEL(16, "Underwall Tunnel", new WorldPoint(2574, 3109, 0), HOLE_16520, CASTLE_WALL),
|
||||
YANILLE_WATCHTOWER_TRELLIS(18, "Trellis", null, TRELLIS_20056),
|
||||
COAL_TRUCKS_LOG_BALANCE(20, "Log Balance", new WorldPoint(2598, 3475, 0), LOG_BALANCE_23274),
|
||||
@@ -128,7 +332,7 @@ public enum AgilityShortcut
|
||||
DEEP_WILDERNESS_DUNGEON_CREVICE_SOUTH(46, "Narrow Crevice", new WorldPoint(3045, 10327, 0), CREVICE_19043),
|
||||
TROLLHEIM_HARD_CLIFF_SCRAMBLE(47, "Rocks", new WorldPoint(2902, 3680, 0), ROCKS_16524),
|
||||
FREMENNIK_LOG_BALANCE(48, "Log Balance", new WorldPoint(2721, 3591, 0), LOG_BALANCE_16540, LOG_BALANCE_16541, LOG_BALANCE_16542),
|
||||
YANILLE_DUNGEON_PIPE_SQUEEZE(49, "Pipe Squeeze", null, OBSTACLE_PIPE_23140),
|
||||
YANILLE_DUNGEON_PIPE_SQUEEZE(49, "Pipe Squeeze", null, OBSTACLE_PIPE_23140),
|
||||
ARCEUUS_ESSENCE_MINE_BOULDER(49, "Boulder", new WorldPoint(1774, 3888, 0), BOULDER_27990),
|
||||
MORYTANIA_STEPPING_STONE(50, "Stepping Stone", new WorldPoint(3418, 3326, 0), STEPPING_STONE_13504),
|
||||
VARROCK_SEWERS_PIPE_SQUEEZE(51, "Pipe Squeeze", new WorldPoint(3152, 9905, 0), OBSTACLE_PIPE_16511),
|
||||
@@ -141,7 +345,7 @@ public enum AgilityShortcut
|
||||
ISAFDAR_FOREST_OBSTACLES(56, "Trap", null, DENSE_FOREST_3938, DENSE_FOREST_3939, DENSE_FOREST_3998, DENSE_FOREST_3999, DENSE_FOREST, LEAVES, LEAVES_3924, LEAVES_3925, STICKS, TRIPWIRE),
|
||||
RELEKKA_EAST_FENCE(57, "Fence", new WorldPoint(2688, 3697, 0), BROKEN_FENCE),
|
||||
YANILLE_DUNGEON_MONKEY_BARS(57, "Monkey Bars", null, MONKEYBARS_23567),
|
||||
PHASMATYS_ECTOPOOL_SHORTCUT(58, "Weathered Wall", null , WEATHERED_WALL, WEATHERED_WALL_16526),
|
||||
PHASMATYS_ECTOPOOL_SHORTCUT(58, "Weathered Wall", null, WEATHERED_WALL, WEATHERED_WALL_16526),
|
||||
ELVEN_OVERPASS_CLIFF_SCRAMBLE(59, "Rocks", new WorldPoint(2345, 3300, 0), ROCKS_16514, ROCKS_16515),
|
||||
WILDERNESS_GWD_CLIMB_EAST(60, "Rocks", new WorldPoint(2943, 3770, 0), ROCKY_HANDHOLDS_26400, ROCKY_HANDHOLDS_26401, ROCKY_HANDHOLDS_26402, ROCKY_HANDHOLDS_26404, ROCKY_HANDHOLDS_26405, ROCKY_HANDHOLDS_26406),
|
||||
WILDERNESS_GWD_CLIMB_WEST(60, "Rocks", new WorldPoint(2928, 3760, 0), ROCKY_HANDHOLDS_26400, ROCKY_HANDHOLDS_26401, ROCKY_HANDHOLDS_26402, ROCKY_HANDHOLDS_26404, ROCKY_HANDHOLDS_26405, ROCKY_HANDHOLDS_26406),
|
||||
@@ -169,22 +373,22 @@ public enum AgilityShortcut
|
||||
TAVERLEY_DUNGEON_PIPE_BLUE_DRAGON(70, "Pipe Squeeze", new WorldPoint(2886, 9798, 0), OBSTACLE_PIPE_16509),
|
||||
TAVERLEY_DUNGEON_ROCKS_NORTH(70, "Rocks", new WorldPoint(2887, 9823, 0), ROCKS, ROCKS_14106),
|
||||
TAVERLEY_DUNGEON_ROCKS_SOUTH(70, "Rocks", new WorldPoint(2887, 9631, 0), ROCKS, ROCKS_14106),
|
||||
FOSSIL_ISLAND_HARDWOOD_NORTH(70, "Hole" , new WorldPoint(3713, 3827, 0), HOLE_31481, HOLE_31482),
|
||||
FOSSIL_ISLAND_HARDWOOD_SOUTH(70, "Hole" , new WorldPoint(3715, 3817, 0), HOLE_31481, HOLE_31482),
|
||||
FOSSIL_ISLAND_HARDWOOD_NORTH(70, "Hole", new WorldPoint(3713, 3827, 0), HOLE_31481, HOLE_31482),
|
||||
FOSSIL_ISLAND_HARDWOOD_SOUTH(70, "Hole", new WorldPoint(3715, 3817, 0), HOLE_31481, HOLE_31482),
|
||||
AL_KHARID_WINDOW(70, "Window", new WorldPoint(3293, 3158, 0), BROKEN_WALL_33344, BIG_WINDOW),
|
||||
GWD_SARADOMIN_ROPE_NORTH(70, "Rope Descent", new WorldPoint(2912, 5300, 0), NULL_26371),
|
||||
GWD_SARADOMIN_ROPE_SOUTH(70, "Rope Descent", new WorldPoint(2951, 5267, 0), NULL_26375),
|
||||
SLAYER_TOWER_ADVANCED_CHAIN_FIRST(71, "Spiked Chain (Floor 2)", new WorldPoint(3447, 3578, 0), SPIKEY_CHAIN ),
|
||||
SLAYER_TOWER_ADVANCED_CHAIN_FIRST(71, "Spiked Chain (Floor 2)", new WorldPoint(3447, 3578, 0), SPIKEY_CHAIN),
|
||||
SLAYER_TOWER_ADVANCED_CHAIN_SECOND(71, "Spiked Chain (Floor 3)", new WorldPoint(3446, 3576, 0), SPIKEY_CHAIN_16538),
|
||||
STRONGHOLD_SLAYER_CAVE_TUNNEL(72, "Tunnel", new WorldPoint(2431, 9806, 0), TUNNEL_30174, TUNNEL_30175),
|
||||
TROLL_STRONGHOLD_WALL_CLIMB(73, "Rocks", new WorldPoint(2841, 3694, 0), ROCKS_16464),
|
||||
ARCEUUS_ESSENSE_MINE_WEST(73, "Rock Climb", new WorldPoint(1742, 3853, 0), ROCKS_27984, ROCKS_27985 ),
|
||||
ARCEUUS_ESSENSE_MINE_WEST(73, "Rock Climb", new WorldPoint(1742, 3853, 0), ROCKS_27984, ROCKS_27985),
|
||||
LAVA_DRAGON_ISLE_JUMP(74, "Stepping Stone", new WorldPoint(3200, 3807, 0), STEPPING_STONE_14918),
|
||||
REVENANT_CAVES_DEMONS_JUMP(75, "Jump", new WorldPoint(3199, 10135, 0), PILLAR_31561),
|
||||
REVENANT_CAVES_ANKOU_EAST(75, "Jump", new WorldPoint(3201, 10195, 0), PILLAR_31561),
|
||||
REVENANT_CAVES_ANKOU_NORTH(75, "Jump", new WorldPoint(3180, 10209, 0), PILLAR_31561),
|
||||
ZUL_ANDRA_ISLAND_CROSSING(76, "Stepping Stone", new WorldPoint(2156, 3073, 0), STEPPING_STONE_10663),
|
||||
SHILO_VILLAGE_STEPPING_STONES( 77, "Stepping Stones", new WorldPoint(2863, 2974, 0), STEPPING_STONE_16466),
|
||||
SHILO_VILLAGE_STEPPING_STONES(77, "Stepping Stones", new WorldPoint(2863, 2974, 0), STEPPING_STONE_16466),
|
||||
KHARAZI_JUNGLE_VINE_CLIMB(79, "Vine", new WorldPoint(2897, 2939, 0), NULL_26884, NULL_26886),
|
||||
TAVERLEY_DUNGEON_SPIKED_BLADES(80, "Strange Floor", new WorldPoint(2877, 9813, 0), STRANGE_FLOOR),
|
||||
SLAYER_DUNGEON_CHASM_JUMP(81, "Spiked Blades", new WorldPoint(2770, 10003, 0), STRANGE_FLOOR_16544),
|
||||
|
||||
@@ -36,6 +36,7 @@ import javax.swing.JLabel;
|
||||
public class AsyncBufferedImage extends BufferedImage
|
||||
{
|
||||
private final List<Runnable> listeners = new CopyOnWriteArrayList<>();
|
||||
|
||||
public AsyncBufferedImage(int width, int height, int imageType)
|
||||
{
|
||||
super(width, height, imageType);
|
||||
|
||||
@@ -48,7 +48,116 @@ import static net.runelite.api.Constants.CLIENT_DEFAULT_ZOOM;
|
||||
import net.runelite.api.GameState;
|
||||
import net.runelite.api.ItemComposition;
|
||||
import net.runelite.api.ItemID;
|
||||
import static net.runelite.api.ItemID.*;
|
||||
import static net.runelite.api.ItemID.AGILITY_CAPE;
|
||||
import static net.runelite.api.ItemID.AGILITY_CAPET;
|
||||
import static net.runelite.api.ItemID.AGILITY_CAPET_13341;
|
||||
import static net.runelite.api.ItemID.AGILITY_CAPE_13340;
|
||||
import static net.runelite.api.ItemID.BOOTS_OF_LIGHTNESS;
|
||||
import static net.runelite.api.ItemID.BOOTS_OF_LIGHTNESS_89;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_11861;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13589;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13590;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13601;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13602;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13613;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13614;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13625;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13626;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13637;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13638;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13677;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_13678;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_21076;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_BOOTS_21078;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_11853;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13581;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13582;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13593;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13594;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13605;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13606;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13617;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13618;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13629;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13630;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13669;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_13670;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_21064;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_CAPE_21066;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_11859;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13587;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13588;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13599;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13600;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13611;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13612;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13623;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13624;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13635;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13636;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13675;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_13676;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_21073;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_GLOVES_21075;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_11851;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13579;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13580;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13591;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13592;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13603;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13604;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13615;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13616;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13627;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13628;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13667;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_13668;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_21061;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_HOOD_21063;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_11857;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13585;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13586;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13597;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13598;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13609;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13610;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13621;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13622;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13633;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13634;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13673;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_13674;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_21070;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_LEGS_21072;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_11855;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_13583;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_13584;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_13595;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_13596;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_13607;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_13608;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_13619;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_13620;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_13631;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_13632;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_13671;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_13672;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_21067;
|
||||
import static net.runelite.api.ItemID.GRACEFUL_TOP_21069;
|
||||
import static net.runelite.api.ItemID.MAX_CAPE;
|
||||
import static net.runelite.api.ItemID.MAX_CAPE_13342;
|
||||
import static net.runelite.api.ItemID.PENANCE_GLOVES;
|
||||
import static net.runelite.api.ItemID.PENANCE_GLOVES_10554;
|
||||
import static net.runelite.api.ItemID.SPOTTED_CAPE;
|
||||
import static net.runelite.api.ItemID.SPOTTED_CAPE_10073;
|
||||
import static net.runelite.api.ItemID.SPOTTIER_CAPE;
|
||||
import static net.runelite.api.ItemID.SPOTTIER_CAPE_10074;
|
||||
import net.runelite.api.SpritePixels;
|
||||
import net.runelite.api.events.GameStateChanged;
|
||||
import net.runelite.api.events.PostItemComposition;
|
||||
@@ -258,6 +367,7 @@ public class ItemManager
|
||||
|
||||
/**
|
||||
* Invalidates internal item manager item composition cache (but not client item composition cache)
|
||||
*
|
||||
* @see Client#getItemCompositionCache()
|
||||
*/
|
||||
public void invalidateItemCompositionCache()
|
||||
@@ -303,6 +413,7 @@ public class ItemManager
|
||||
|
||||
/**
|
||||
* Look up an item's stats
|
||||
*
|
||||
* @param itemId item id
|
||||
* @return item stats
|
||||
*/
|
||||
@@ -442,7 +553,7 @@ public class ItemManager
|
||||
/**
|
||||
* Create item sprite and applies an outline.
|
||||
*
|
||||
* @param itemId item id
|
||||
* @param itemId item id
|
||||
* @param itemQuantity item quantity
|
||||
* @param outlineColor outline color
|
||||
* @return image
|
||||
@@ -456,7 +567,7 @@ public class ItemManager
|
||||
/**
|
||||
* Get item outline with a specific color.
|
||||
*
|
||||
* @param itemId item id
|
||||
* @param itemId item id
|
||||
* @param itemQuantity item quantity
|
||||
* @param outlineColor outline color
|
||||
* @return image
|
||||
|
||||
@@ -29,7 +29,411 @@ import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import static net.runelite.api.ItemID.*;
|
||||
import static net.runelite.api.ItemID.ABYSSAL_TENTACLE;
|
||||
import static net.runelite.api.ItemID.ABYSSAL_WHIP;
|
||||
import static net.runelite.api.ItemID.AHRIMS_HOOD;
|
||||
import static net.runelite.api.ItemID.AHRIMS_HOOD_100;
|
||||
import static net.runelite.api.ItemID.AHRIMS_HOOD_25;
|
||||
import static net.runelite.api.ItemID.AHRIMS_HOOD_50;
|
||||
import static net.runelite.api.ItemID.AHRIMS_HOOD_75;
|
||||
import static net.runelite.api.ItemID.AHRIMS_ROBESKIRT;
|
||||
import static net.runelite.api.ItemID.AHRIMS_ROBESKIRT_100;
|
||||
import static net.runelite.api.ItemID.AHRIMS_ROBESKIRT_25;
|
||||
import static net.runelite.api.ItemID.AHRIMS_ROBESKIRT_50;
|
||||
import static net.runelite.api.ItemID.AHRIMS_ROBESKIRT_75;
|
||||
import static net.runelite.api.ItemID.AHRIMS_ROBETOP;
|
||||
import static net.runelite.api.ItemID.AHRIMS_ROBETOP_100;
|
||||
import static net.runelite.api.ItemID.AHRIMS_ROBETOP_25;
|
||||
import static net.runelite.api.ItemID.AHRIMS_ROBETOP_50;
|
||||
import static net.runelite.api.ItemID.AHRIMS_ROBETOP_75;
|
||||
import static net.runelite.api.ItemID.AHRIMS_STAFF;
|
||||
import static net.runelite.api.ItemID.AHRIMS_STAFF_100;
|
||||
import static net.runelite.api.ItemID.AHRIMS_STAFF_25;
|
||||
import static net.runelite.api.ItemID.AHRIMS_STAFF_50;
|
||||
import static net.runelite.api.ItemID.AHRIMS_STAFF_75;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_FURY;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_FURY_OR;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_GLORY;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_GLORY1;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_GLORY2;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_GLORY3;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_GLORY5;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_GLORY_T;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_GLORY_T1;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_GLORY_T2;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_GLORY_T3;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_GLORY_T5;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_TORTURE;
|
||||
import static net.runelite.api.ItemID.AMULET_OF_TORTURE_OR;
|
||||
import static net.runelite.api.ItemID.ANCIENT_WYVERN_SHIELD;
|
||||
import static net.runelite.api.ItemID.ANCIENT_WYVERN_SHIELD_21634;
|
||||
import static net.runelite.api.ItemID.ANGUISH_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.ARCHERS_RING;
|
||||
import static net.runelite.api.ItemID.ARCHERS_RING_I;
|
||||
import static net.runelite.api.ItemID.ARMADYL_GODSWORD;
|
||||
import static net.runelite.api.ItemID.ARMADYL_GODSWORD_OR;
|
||||
import static net.runelite.api.ItemID.ARMADYL_GODSWORD_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.BANDOS_GODSWORD;
|
||||
import static net.runelite.api.ItemID.BANDOS_GODSWORD_OR;
|
||||
import static net.runelite.api.ItemID.BANDOS_GODSWORD_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.BERSERKER_RING;
|
||||
import static net.runelite.api.ItemID.BERSERKER_RING_I;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_1;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_10_I;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_1_I;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_2;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_2_I;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_3;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_3_I;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_4;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_4_I;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_5;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_5_I;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_6;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_6_I;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_7;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_7_I;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_8;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_8_I;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_9;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_9_I;
|
||||
import static net.runelite.api.ItemID.BLACK_MASK_I;
|
||||
import static net.runelite.api.ItemID.BLACK_SLAYER_HELMET;
|
||||
import static net.runelite.api.ItemID.BLACK_SLAYER_HELMET_I;
|
||||
import static net.runelite.api.ItemID.BONECRUSHER_NECKLACE;
|
||||
import static net.runelite.api.ItemID.BOTTOMLESS_COMPOST_BUCKET;
|
||||
import static net.runelite.api.ItemID.BOTTOMLESS_COMPOST_BUCKET_22997;
|
||||
import static net.runelite.api.ItemID.CRAWS_BOW;
|
||||
import static net.runelite.api.ItemID.CRAWS_BOW_U;
|
||||
import static net.runelite.api.ItemID.DARK_BOW;
|
||||
import static net.runelite.api.ItemID.DARK_BOW_12765;
|
||||
import static net.runelite.api.ItemID.DARK_BOW_12766;
|
||||
import static net.runelite.api.ItemID.DARK_BOW_12767;
|
||||
import static net.runelite.api.ItemID.DARK_BOW_12768;
|
||||
import static net.runelite.api.ItemID.DARK_BOW_20408;
|
||||
import static net.runelite.api.ItemID.DARK_INFINITY_BOTTOMS;
|
||||
import static net.runelite.api.ItemID.DARK_INFINITY_COLOUR_KIT;
|
||||
import static net.runelite.api.ItemID.DARK_INFINITY_HAT;
|
||||
import static net.runelite.api.ItemID.DARK_INFINITY_TOP;
|
||||
import static net.runelite.api.ItemID.DHAROKS_GREATAXE;
|
||||
import static net.runelite.api.ItemID.DHAROKS_GREATAXE_100;
|
||||
import static net.runelite.api.ItemID.DHAROKS_GREATAXE_25;
|
||||
import static net.runelite.api.ItemID.DHAROKS_GREATAXE_50;
|
||||
import static net.runelite.api.ItemID.DHAROKS_GREATAXE_75;
|
||||
import static net.runelite.api.ItemID.DHAROKS_HELM;
|
||||
import static net.runelite.api.ItemID.DHAROKS_HELM_100;
|
||||
import static net.runelite.api.ItemID.DHAROKS_HELM_25;
|
||||
import static net.runelite.api.ItemID.DHAROKS_HELM_50;
|
||||
import static net.runelite.api.ItemID.DHAROKS_HELM_75;
|
||||
import static net.runelite.api.ItemID.DHAROKS_PLATEBODY;
|
||||
import static net.runelite.api.ItemID.DHAROKS_PLATEBODY_100;
|
||||
import static net.runelite.api.ItemID.DHAROKS_PLATEBODY_25;
|
||||
import static net.runelite.api.ItemID.DHAROKS_PLATEBODY_50;
|
||||
import static net.runelite.api.ItemID.DHAROKS_PLATEBODY_75;
|
||||
import static net.runelite.api.ItemID.DHAROKS_PLATELEGS;
|
||||
import static net.runelite.api.ItemID.DHAROKS_PLATELEGS_100;
|
||||
import static net.runelite.api.ItemID.DHAROKS_PLATELEGS_25;
|
||||
import static net.runelite.api.ItemID.DHAROKS_PLATELEGS_50;
|
||||
import static net.runelite.api.ItemID.DHAROKS_PLATELEGS_75;
|
||||
import static net.runelite.api.ItemID.DRAGONBONE_NECKLACE;
|
||||
import static net.runelite.api.ItemID.DRAGONFIRE_SHIELD;
|
||||
import static net.runelite.api.ItemID.DRAGONFIRE_SHIELD_11284;
|
||||
import static net.runelite.api.ItemID.DRAGONFIRE_WARD;
|
||||
import static net.runelite.api.ItemID.DRAGONFIRE_WARD_22003;
|
||||
import static net.runelite.api.ItemID.DRAGON_BOOTS;
|
||||
import static net.runelite.api.ItemID.DRAGON_BOOTS_G;
|
||||
import static net.runelite.api.ItemID.DRAGON_BOOTS_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.DRAGON_CHAINBODY_3140;
|
||||
import static net.runelite.api.ItemID.DRAGON_CHAINBODY_G;
|
||||
import static net.runelite.api.ItemID.DRAGON_CHAINBODY_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.DRAGON_DEFENDER_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.DRAGON_DEFENDER_T;
|
||||
import static net.runelite.api.ItemID.DRAGON_FULL_HELM;
|
||||
import static net.runelite.api.ItemID.DRAGON_FULL_HELM_G;
|
||||
import static net.runelite.api.ItemID.DRAGON_FULL_HELM_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.DRAGON_KITESHIELD;
|
||||
import static net.runelite.api.ItemID.DRAGON_KITESHIELD_G;
|
||||
import static net.runelite.api.ItemID.DRAGON_KITESHIELD_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.DRAGON_LEGSSKIRT_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.DRAGON_PICKAXE;
|
||||
import static net.runelite.api.ItemID.DRAGON_PICKAXE_12797;
|
||||
import static net.runelite.api.ItemID.DRAGON_PLATEBODY;
|
||||
import static net.runelite.api.ItemID.DRAGON_PLATEBODY_G;
|
||||
import static net.runelite.api.ItemID.DRAGON_PLATEBODY_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.DRAGON_PLATELEGS;
|
||||
import static net.runelite.api.ItemID.DRAGON_PLATELEGS_G;
|
||||
import static net.runelite.api.ItemID.DRAGON_PLATESKIRT;
|
||||
import static net.runelite.api.ItemID.DRAGON_PLATESKIRT_G;
|
||||
import static net.runelite.api.ItemID.DRAGON_SCIMITAR;
|
||||
import static net.runelite.api.ItemID.DRAGON_SCIMITAR_OR;
|
||||
import static net.runelite.api.ItemID.DRAGON_SCIMITAR_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.DRAGON_SQ_SHIELD;
|
||||
import static net.runelite.api.ItemID.DRAGON_SQ_SHIELD_G;
|
||||
import static net.runelite.api.ItemID.DRAGON_SQ_SHIELD_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.ENSOULED_ABYSSAL_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_ABYSSAL_HEAD_13508;
|
||||
import static net.runelite.api.ItemID.ENSOULED_AVIANSIE_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_AVIANSIE_HEAD_13505;
|
||||
import static net.runelite.api.ItemID.ENSOULED_BEAR_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_BEAR_HEAD_13463;
|
||||
import static net.runelite.api.ItemID.ENSOULED_BLOODVELD_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_BLOODVELD_HEAD_13496;
|
||||
import static net.runelite.api.ItemID.ENSOULED_CHAOS_DRUID_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_CHAOS_DRUID_HEAD_13472;
|
||||
import static net.runelite.api.ItemID.ENSOULED_DAGANNOTH_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_DAGANNOTH_HEAD_13493;
|
||||
import static net.runelite.api.ItemID.ENSOULED_DEMON_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_DEMON_HEAD_13502;
|
||||
import static net.runelite.api.ItemID.ENSOULED_DOG_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_DOG_HEAD_13469;
|
||||
import static net.runelite.api.ItemID.ENSOULED_DRAGON_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_DRAGON_HEAD_13511;
|
||||
import static net.runelite.api.ItemID.ENSOULED_ELF_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_ELF_HEAD_13481;
|
||||
import static net.runelite.api.ItemID.ENSOULED_GIANT_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_GIANT_HEAD_13475;
|
||||
import static net.runelite.api.ItemID.ENSOULED_GOBLIN_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_GOBLIN_HEAD_13448;
|
||||
import static net.runelite.api.ItemID.ENSOULED_HORROR_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_HORROR_HEAD_13487;
|
||||
import static net.runelite.api.ItemID.ENSOULED_IMP_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_IMP_HEAD_13454;
|
||||
import static net.runelite.api.ItemID.ENSOULED_KALPHITE_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_KALPHITE_HEAD_13490;
|
||||
import static net.runelite.api.ItemID.ENSOULED_MINOTAUR_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_MINOTAUR_HEAD_13457;
|
||||
import static net.runelite.api.ItemID.ENSOULED_MONKEY_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_MONKEY_HEAD_13451;
|
||||
import static net.runelite.api.ItemID.ENSOULED_OGRE_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_OGRE_HEAD_13478;
|
||||
import static net.runelite.api.ItemID.ENSOULED_SCORPION_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_SCORPION_HEAD_13460;
|
||||
import static net.runelite.api.ItemID.ENSOULED_TROLL_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_TROLL_HEAD_13484;
|
||||
import static net.runelite.api.ItemID.ENSOULED_TZHAAR_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_TZHAAR_HEAD_13499;
|
||||
import static net.runelite.api.ItemID.ENSOULED_UNICORN_HEAD;
|
||||
import static net.runelite.api.ItemID.ENSOULED_UNICORN_HEAD_13466;
|
||||
import static net.runelite.api.ItemID.FEROCIOUS_GLOVES;
|
||||
import static net.runelite.api.ItemID.FROZEN_ABYSSAL_WHIP;
|
||||
import static net.runelite.api.ItemID.FURY_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.GAMES_NECKLACE1;
|
||||
import static net.runelite.api.ItemID.GAMES_NECKLACE2;
|
||||
import static net.runelite.api.ItemID.GAMES_NECKLACE3;
|
||||
import static net.runelite.api.ItemID.GAMES_NECKLACE4;
|
||||
import static net.runelite.api.ItemID.GAMES_NECKLACE5;
|
||||
import static net.runelite.api.ItemID.GAMES_NECKLACE6;
|
||||
import static net.runelite.api.ItemID.GAMES_NECKLACE7;
|
||||
import static net.runelite.api.ItemID.GAMES_NECKLACE8;
|
||||
import static net.runelite.api.ItemID.GRANITE_MAUL;
|
||||
import static net.runelite.api.ItemID.GRANITE_MAUL_12848;
|
||||
import static net.runelite.api.ItemID.GRANITE_RING;
|
||||
import static net.runelite.api.ItemID.GRANITE_RING_I;
|
||||
import static net.runelite.api.ItemID.GREEN_SLAYER_HELMET;
|
||||
import static net.runelite.api.ItemID.GREEN_SLAYER_HELMET_I;
|
||||
import static net.runelite.api.ItemID.GUTHANS_CHAINSKIRT;
|
||||
import static net.runelite.api.ItemID.GUTHANS_CHAINSKIRT_100;
|
||||
import static net.runelite.api.ItemID.GUTHANS_CHAINSKIRT_25;
|
||||
import static net.runelite.api.ItemID.GUTHANS_CHAINSKIRT_50;
|
||||
import static net.runelite.api.ItemID.GUTHANS_CHAINSKIRT_75;
|
||||
import static net.runelite.api.ItemID.GUTHANS_HELM;
|
||||
import static net.runelite.api.ItemID.GUTHANS_HELM_100;
|
||||
import static net.runelite.api.ItemID.GUTHANS_HELM_25;
|
||||
import static net.runelite.api.ItemID.GUTHANS_HELM_50;
|
||||
import static net.runelite.api.ItemID.GUTHANS_HELM_75;
|
||||
import static net.runelite.api.ItemID.GUTHANS_PLATEBODY;
|
||||
import static net.runelite.api.ItemID.GUTHANS_PLATEBODY_100;
|
||||
import static net.runelite.api.ItemID.GUTHANS_PLATEBODY_25;
|
||||
import static net.runelite.api.ItemID.GUTHANS_PLATEBODY_50;
|
||||
import static net.runelite.api.ItemID.GUTHANS_PLATEBODY_75;
|
||||
import static net.runelite.api.ItemID.GUTHANS_WARSPEAR;
|
||||
import static net.runelite.api.ItemID.GUTHANS_WARSPEAR_100;
|
||||
import static net.runelite.api.ItemID.GUTHANS_WARSPEAR_25;
|
||||
import static net.runelite.api.ItemID.GUTHANS_WARSPEAR_50;
|
||||
import static net.runelite.api.ItemID.GUTHANS_WARSPEAR_75;
|
||||
import static net.runelite.api.ItemID.HYDRA_LEATHER;
|
||||
import static net.runelite.api.ItemID.HYDRA_SLAYER_HELMET;
|
||||
import static net.runelite.api.ItemID.HYDRA_SLAYER_HELMET_I;
|
||||
import static net.runelite.api.ItemID.HYDRA_TAIL;
|
||||
import static net.runelite.api.ItemID.INFINITY_BOTTOMS;
|
||||
import static net.runelite.api.ItemID.INFINITY_BOTTOMS_20575;
|
||||
import static net.runelite.api.ItemID.INFINITY_HAT;
|
||||
import static net.runelite.api.ItemID.INFINITY_TOP;
|
||||
import static net.runelite.api.ItemID.INFINITY_TOP_10605;
|
||||
import static net.runelite.api.ItemID.INFINITY_TOP_20574;
|
||||
import static net.runelite.api.ItemID.KARILS_COIF;
|
||||
import static net.runelite.api.ItemID.KARILS_COIF_100;
|
||||
import static net.runelite.api.ItemID.KARILS_COIF_25;
|
||||
import static net.runelite.api.ItemID.KARILS_COIF_50;
|
||||
import static net.runelite.api.ItemID.KARILS_COIF_75;
|
||||
import static net.runelite.api.ItemID.KARILS_CROSSBOW;
|
||||
import static net.runelite.api.ItemID.KARILS_CROSSBOW_100;
|
||||
import static net.runelite.api.ItemID.KARILS_CROSSBOW_25;
|
||||
import static net.runelite.api.ItemID.KARILS_CROSSBOW_50;
|
||||
import static net.runelite.api.ItemID.KARILS_CROSSBOW_75;
|
||||
import static net.runelite.api.ItemID.KARILS_LEATHERSKIRT;
|
||||
import static net.runelite.api.ItemID.KARILS_LEATHERSKIRT_100;
|
||||
import static net.runelite.api.ItemID.KARILS_LEATHERSKIRT_25;
|
||||
import static net.runelite.api.ItemID.KARILS_LEATHERSKIRT_50;
|
||||
import static net.runelite.api.ItemID.KARILS_LEATHERSKIRT_75;
|
||||
import static net.runelite.api.ItemID.KARILS_LEATHERTOP;
|
||||
import static net.runelite.api.ItemID.KARILS_LEATHERTOP_100;
|
||||
import static net.runelite.api.ItemID.KARILS_LEATHERTOP_25;
|
||||
import static net.runelite.api.ItemID.KARILS_LEATHERTOP_50;
|
||||
import static net.runelite.api.ItemID.KARILS_LEATHERTOP_75;
|
||||
import static net.runelite.api.ItemID.KRAKEN_TENTACLE;
|
||||
import static net.runelite.api.ItemID.LAVA_BATTLESTAFF;
|
||||
import static net.runelite.api.ItemID.LAVA_BATTLESTAFF_21198;
|
||||
import static net.runelite.api.ItemID.LIGHT_INFINITY_BOTTOMS;
|
||||
import static net.runelite.api.ItemID.LIGHT_INFINITY_COLOUR_KIT;
|
||||
import static net.runelite.api.ItemID.LIGHT_INFINITY_HAT;
|
||||
import static net.runelite.api.ItemID.LIGHT_INFINITY_TOP;
|
||||
import static net.runelite.api.ItemID.MAGIC_SHORTBOW;
|
||||
import static net.runelite.api.ItemID.MAGIC_SHORTBOW_I;
|
||||
import static net.runelite.api.ItemID.MAGMA_HELM;
|
||||
import static net.runelite.api.ItemID.MAGMA_HELM_UNCHARGED;
|
||||
import static net.runelite.api.ItemID.MALEDICTION_WARD;
|
||||
import static net.runelite.api.ItemID.MALEDICTION_WARD_12806;
|
||||
import static net.runelite.api.ItemID.NECKLACE_OF_ANGUISH;
|
||||
import static net.runelite.api.ItemID.NECKLACE_OF_ANGUISH_OR;
|
||||
import static net.runelite.api.ItemID.OCCULT_NECKLACE;
|
||||
import static net.runelite.api.ItemID.OCCULT_NECKLACE_OR;
|
||||
import static net.runelite.api.ItemID.OCCULT_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.ODIUM_WARD;
|
||||
import static net.runelite.api.ItemID.ODIUM_WARD_12807;
|
||||
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE;
|
||||
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_1;
|
||||
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_2;
|
||||
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_4;
|
||||
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_5;
|
||||
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_6;
|
||||
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_7;
|
||||
import static net.runelite.api.ItemID.PHARAOHS_SCEPTRE_8;
|
||||
import static net.runelite.api.ItemID.PURPLE_SLAYER_HELMET;
|
||||
import static net.runelite.api.ItemID.PURPLE_SLAYER_HELMET_I;
|
||||
import static net.runelite.api.ItemID.RED_SLAYER_HELMET;
|
||||
import static net.runelite.api.ItemID.RED_SLAYER_HELMET_I;
|
||||
import static net.runelite.api.ItemID.RING_OF_DUELING1;
|
||||
import static net.runelite.api.ItemID.RING_OF_DUELING2;
|
||||
import static net.runelite.api.ItemID.RING_OF_DUELING3;
|
||||
import static net.runelite.api.ItemID.RING_OF_DUELING4;
|
||||
import static net.runelite.api.ItemID.RING_OF_DUELING5;
|
||||
import static net.runelite.api.ItemID.RING_OF_DUELING6;
|
||||
import static net.runelite.api.ItemID.RING_OF_DUELING7;
|
||||
import static net.runelite.api.ItemID.RING_OF_DUELING8;
|
||||
import static net.runelite.api.ItemID.RING_OF_SUFFERING;
|
||||
import static net.runelite.api.ItemID.RING_OF_SUFFERING_I;
|
||||
import static net.runelite.api.ItemID.RING_OF_SUFFERING_R;
|
||||
import static net.runelite.api.ItemID.RING_OF_SUFFERING_RI;
|
||||
import static net.runelite.api.ItemID.RING_OF_THE_GODS;
|
||||
import static net.runelite.api.ItemID.RING_OF_THE_GODS_I;
|
||||
import static net.runelite.api.ItemID.RING_OF_WEALTH;
|
||||
import static net.runelite.api.ItemID.RING_OF_WEALTH_1;
|
||||
import static net.runelite.api.ItemID.RING_OF_WEALTH_2;
|
||||
import static net.runelite.api.ItemID.RING_OF_WEALTH_3;
|
||||
import static net.runelite.api.ItemID.RING_OF_WEALTH_4;
|
||||
import static net.runelite.api.ItemID.RING_OF_WEALTH_I;
|
||||
import static net.runelite.api.ItemID.RING_OF_WEALTH_I1;
|
||||
import static net.runelite.api.ItemID.RING_OF_WEALTH_I2;
|
||||
import static net.runelite.api.ItemID.RING_OF_WEALTH_I3;
|
||||
import static net.runelite.api.ItemID.RING_OF_WEALTH_I4;
|
||||
import static net.runelite.api.ItemID.RING_OF_WEALTH_I5;
|
||||
import static net.runelite.api.ItemID.SANGUINESTI_STAFF;
|
||||
import static net.runelite.api.ItemID.SANGUINESTI_STAFF_UNCHARGED;
|
||||
import static net.runelite.api.ItemID.SARADOMINS_BLESSED_SWORD;
|
||||
import static net.runelite.api.ItemID.SARADOMINS_TEAR;
|
||||
import static net.runelite.api.ItemID.SARADOMIN_GODSWORD;
|
||||
import static net.runelite.api.ItemID.SARADOMIN_GODSWORD_OR;
|
||||
import static net.runelite.api.ItemID.SARADOMIN_GODSWORD_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.SCYTHE_OF_VITUR;
|
||||
import static net.runelite.api.ItemID.SCYTHE_OF_VITUR_UNCHARGED;
|
||||
import static net.runelite.api.ItemID.SEERS_RING;
|
||||
import static net.runelite.api.ItemID.SEERS_RING_I;
|
||||
import static net.runelite.api.ItemID.SERPENTINE_HELM;
|
||||
import static net.runelite.api.ItemID.SERPENTINE_HELM_UNCHARGED;
|
||||
import static net.runelite.api.ItemID.SKILLS_NECKLACE;
|
||||
import static net.runelite.api.ItemID.SKILLS_NECKLACE1;
|
||||
import static net.runelite.api.ItemID.SKILLS_NECKLACE2;
|
||||
import static net.runelite.api.ItemID.SKILLS_NECKLACE3;
|
||||
import static net.runelite.api.ItemID.SKILLS_NECKLACE5;
|
||||
import static net.runelite.api.ItemID.SLAYER_HELMET;
|
||||
import static net.runelite.api.ItemID.SLAYER_HELMET_I;
|
||||
import static net.runelite.api.ItemID.STEAM_BATTLESTAFF;
|
||||
import static net.runelite.api.ItemID.STEAM_BATTLESTAFF_12795;
|
||||
import static net.runelite.api.ItemID.TANZANITE_HELM;
|
||||
import static net.runelite.api.ItemID.TANZANITE_HELM_UNCHARGED;
|
||||
import static net.runelite.api.ItemID.THAMMARONS_SCEPTRE;
|
||||
import static net.runelite.api.ItemID.THAMMARONS_SCEPTRE_U;
|
||||
import static net.runelite.api.ItemID.TOME_OF_FIRE;
|
||||
import static net.runelite.api.ItemID.TOME_OF_FIRE_EMPTY;
|
||||
import static net.runelite.api.ItemID.TORAGS_HAMMERS;
|
||||
import static net.runelite.api.ItemID.TORAGS_HAMMERS_100;
|
||||
import static net.runelite.api.ItemID.TORAGS_HAMMERS_25;
|
||||
import static net.runelite.api.ItemID.TORAGS_HAMMERS_50;
|
||||
import static net.runelite.api.ItemID.TORAGS_HAMMERS_75;
|
||||
import static net.runelite.api.ItemID.TORAGS_HELM;
|
||||
import static net.runelite.api.ItemID.TORAGS_HELM_100;
|
||||
import static net.runelite.api.ItemID.TORAGS_HELM_25;
|
||||
import static net.runelite.api.ItemID.TORAGS_HELM_50;
|
||||
import static net.runelite.api.ItemID.TORAGS_HELM_75;
|
||||
import static net.runelite.api.ItemID.TORAGS_PLATEBODY;
|
||||
import static net.runelite.api.ItemID.TORAGS_PLATEBODY_100;
|
||||
import static net.runelite.api.ItemID.TORAGS_PLATEBODY_25;
|
||||
import static net.runelite.api.ItemID.TORAGS_PLATEBODY_50;
|
||||
import static net.runelite.api.ItemID.TORAGS_PLATEBODY_75;
|
||||
import static net.runelite.api.ItemID.TORAGS_PLATELEGS;
|
||||
import static net.runelite.api.ItemID.TORAGS_PLATELEGS_100;
|
||||
import static net.runelite.api.ItemID.TORAGS_PLATELEGS_25;
|
||||
import static net.runelite.api.ItemID.TORAGS_PLATELEGS_50;
|
||||
import static net.runelite.api.ItemID.TORAGS_PLATELEGS_75;
|
||||
import static net.runelite.api.ItemID.TORTURE_ORNAMENT_KIT;
|
||||
import static net.runelite.api.ItemID.TOXIC_BLOWPIPE;
|
||||
import static net.runelite.api.ItemID.TOXIC_BLOWPIPE_EMPTY;
|
||||
import static net.runelite.api.ItemID.TOXIC_STAFF_OF_THE_DEAD;
|
||||
import static net.runelite.api.ItemID.TOXIC_STAFF_UNCHARGED;
|
||||
import static net.runelite.api.ItemID.TREASONOUS_RING;
|
||||
import static net.runelite.api.ItemID.TREASONOUS_RING_I;
|
||||
import static net.runelite.api.ItemID.TRIDENT_OF_THE_SEAS;
|
||||
import static net.runelite.api.ItemID.TRIDENT_OF_THE_SEAS_E;
|
||||
import static net.runelite.api.ItemID.TRIDENT_OF_THE_SWAMP;
|
||||
import static net.runelite.api.ItemID.TRIDENT_OF_THE_SWAMP_E;
|
||||
import static net.runelite.api.ItemID.TURQUOISE_SLAYER_HELMET;
|
||||
import static net.runelite.api.ItemID.TURQUOISE_SLAYER_HELMET_I;
|
||||
import static net.runelite.api.ItemID.TYRANNICAL_RING;
|
||||
import static net.runelite.api.ItemID.TYRANNICAL_RING_I;
|
||||
import static net.runelite.api.ItemID.UNCHARGED_TOXIC_TRIDENT;
|
||||
import static net.runelite.api.ItemID.UNCHARGED_TOXIC_TRIDENT_E;
|
||||
import static net.runelite.api.ItemID.UNCHARGED_TRIDENT;
|
||||
import static net.runelite.api.ItemID.UNCHARGED_TRIDENT_E;
|
||||
import static net.runelite.api.ItemID.VERACS_BRASSARD;
|
||||
import static net.runelite.api.ItemID.VERACS_BRASSARD_100;
|
||||
import static net.runelite.api.ItemID.VERACS_BRASSARD_25;
|
||||
import static net.runelite.api.ItemID.VERACS_BRASSARD_50;
|
||||
import static net.runelite.api.ItemID.VERACS_BRASSARD_75;
|
||||
import static net.runelite.api.ItemID.VERACS_FLAIL;
|
||||
import static net.runelite.api.ItemID.VERACS_FLAIL_100;
|
||||
import static net.runelite.api.ItemID.VERACS_FLAIL_25;
|
||||
import static net.runelite.api.ItemID.VERACS_FLAIL_50;
|
||||
import static net.runelite.api.ItemID.VERACS_FLAIL_75;
|
||||
import static net.runelite.api.ItemID.VERACS_HELM;
|
||||
import static net.runelite.api.ItemID.VERACS_HELM_100;
|
||||
import static net.runelite.api.ItemID.VERACS_HELM_25;
|
||||
import static net.runelite.api.ItemID.VERACS_HELM_50;
|
||||
import static net.runelite.api.ItemID.VERACS_HELM_75;
|
||||
import static net.runelite.api.ItemID.VERACS_PLATESKIRT;
|
||||
import static net.runelite.api.ItemID.VERACS_PLATESKIRT_100;
|
||||
import static net.runelite.api.ItemID.VERACS_PLATESKIRT_25;
|
||||
import static net.runelite.api.ItemID.VERACS_PLATESKIRT_50;
|
||||
import static net.runelite.api.ItemID.VERACS_PLATESKIRT_75;
|
||||
import static net.runelite.api.ItemID.VIGGORAS_CHAINMACE;
|
||||
import static net.runelite.api.ItemID.VIGGORAS_CHAINMACE_U;
|
||||
import static net.runelite.api.ItemID.VOLCANIC_ABYSSAL_WHIP;
|
||||
import static net.runelite.api.ItemID.WARRIOR_RING;
|
||||
import static net.runelite.api.ItemID.WARRIOR_RING_I;
|
||||
import static net.runelite.api.ItemID.ZAMORAK_GODSWORD;
|
||||
import static net.runelite.api.ItemID.ZAMORAK_GODSWORD_OR;
|
||||
import static net.runelite.api.ItemID.ZAMORAK_GODSWORD_ORNAMENT_KIT;
|
||||
|
||||
/**
|
||||
* Converts untradeable items to it's tradeable counterparts
|
||||
|
||||
@@ -53,7 +53,8 @@ public class NPCManager
|
||||
|
||||
/**
|
||||
* Returns health for target NPC based on it's combat level and name
|
||||
* @param name npc name
|
||||
*
|
||||
* @param name npc name
|
||||
* @param combatLevel npc combat level
|
||||
* @return health or null if HP is unknown
|
||||
*/
|
||||
|
||||
@@ -67,8 +67,8 @@ public class ChatboxPanelManager
|
||||
|
||||
@Inject
|
||||
private ChatboxPanelManager(EventBus eventBus, Client client, ClientThread clientThread,
|
||||
KeyManager keyManager, MouseManager mouseManager,
|
||||
Provider<ChatboxTextMenuInput> chatboxTextMenuInputProvider, Provider<ChatboxTextInput> chatboxTextInputProvider)
|
||||
KeyManager keyManager, MouseManager mouseManager,
|
||||
Provider<ChatboxTextMenuInput> chatboxTextMenuInputProvider, Provider<ChatboxTextInput> chatboxTextInputProvider)
|
||||
{
|
||||
this.client = client;
|
||||
this.clientThread = clientThread;
|
||||
|
||||
@@ -33,12 +33,12 @@ import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.FontID;
|
||||
import net.runelite.api.widgets.WidgetType;
|
||||
import net.runelite.api.widgets.JavaScriptCallback;
|
||||
import net.runelite.api.widgets.Widget;
|
||||
import net.runelite.api.widgets.WidgetPositionMode;
|
||||
import net.runelite.api.widgets.WidgetSizeMode;
|
||||
import net.runelite.api.widgets.WidgetTextAlignment;
|
||||
import net.runelite.api.widgets.WidgetType;
|
||||
import net.runelite.client.input.KeyListener;
|
||||
|
||||
@Slf4j
|
||||
|
||||
@@ -743,7 +743,7 @@ public class ModelOutlineRenderer
|
||||
* @param outerColor The color of the pixels of the outline furthest away from the model
|
||||
*/
|
||||
private void renderOutline(BufferedImage image, int outlineWidth,
|
||||
Color innerColor, Color outerColor)
|
||||
Color innerColor, Color outerColor)
|
||||
{
|
||||
int[] imageData = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();
|
||||
List<PixelDistanceAlpha> ps = getPriorityList(outlineWidth);
|
||||
@@ -887,8 +887,8 @@ public class ModelOutlineRenderer
|
||||
* @param outerColor The color of the pixels of the outline furthest away from the model
|
||||
*/
|
||||
private void drawModelOutline(Model model,
|
||||
int localX, int localY, int localZ, int orientation,
|
||||
int outlineWidth, Color innerColor, Color outerColor)
|
||||
int localX, int localY, int localZ, int orientation,
|
||||
int outlineWidth, Color innerColor, Color outerColor)
|
||||
{
|
||||
if (outlineWidth <= 0)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
package net.runelite.client.menus;
|
||||
|
||||
import joptsimple.internal.Strings;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import net.runelite.api.MenuEntry;
|
||||
import static net.runelite.client.menus.MenuManager.LEVEL_PATTERN;
|
||||
import net.runelite.client.util.Text;
|
||||
|
||||
@EqualsAndHashCode
|
||||
public class AbstractMenuEntry
|
||||
{
|
||||
@Getter
|
||||
private String option;
|
||||
|
||||
@Getter
|
||||
private String target;
|
||||
|
||||
@Getter
|
||||
private int id;
|
||||
|
||||
@Getter
|
||||
private int type;
|
||||
|
||||
@Getter
|
||||
private boolean strictOption;
|
||||
|
||||
@Getter
|
||||
private boolean strictTarget;
|
||||
|
||||
public AbstractMenuEntry(String option, String target)
|
||||
{
|
||||
this(option, target, -1, -1, true, true);
|
||||
}
|
||||
|
||||
public AbstractMenuEntry(String option, String target, boolean strictTarget)
|
||||
{
|
||||
this(option, target, -1, -1, true, strictTarget);
|
||||
}
|
||||
|
||||
public AbstractMenuEntry(String option, String target, int id, int type, boolean strictOption, boolean strictTarget)
|
||||
{
|
||||
this.option = option;
|
||||
this.target = target;
|
||||
this.id = id;
|
||||
this.type = type;
|
||||
this.strictOption = strictOption;
|
||||
this.strictTarget = strictTarget;
|
||||
}
|
||||
|
||||
boolean matches(MenuEntry entry)
|
||||
{
|
||||
String opt = Text.standardize(entry.getOption());
|
||||
|
||||
if (strictOption && !opt.equals(option) || !strictOption && !opt.contains(option))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (strictTarget || !Strings.isNullOrEmpty(target))
|
||||
{
|
||||
String tgt = Text.standardize(LEVEL_PATTERN.matcher(entry.getTarget()).replaceAll(""));
|
||||
|
||||
if (strictTarget && !tgt.equals(target) || !strictTarget && !tgt.contains(target))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (id != -1)
|
||||
{
|
||||
int id = entry.getIdentifier();
|
||||
|
||||
if (this.id != id)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (type != -1)
|
||||
{
|
||||
int type = entry.getType();
|
||||
|
||||
if (this.type != type)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*boolean equals(AbstractMenuEntry other)
|
||||
{
|
||||
return target.equals(other.getTarget())
|
||||
&& option.equals(other.getOption())
|
||||
&& id == other.getId()
|
||||
&& type == other.getType()
|
||||
&& strictOption == other.isStrictOption()
|
||||
&& strictTarget == other.isStrictTarget();
|
||||
}*/
|
||||
}
|
||||
@@ -26,13 +26,17 @@ package net.runelite.client.menus;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Multimap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Pattern;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -60,6 +64,20 @@ public class MenuManager
|
||||
*/
|
||||
private static final int IDX_LOWER = 4;
|
||||
private static final int IDX_UPPER = 8;
|
||||
static final Pattern LEVEL_PATTERN = Pattern.compile("\\(level-[0-9]*\\)");
|
||||
|
||||
private static MenuEntry CANCEL()
|
||||
{
|
||||
MenuEntry cancel = new MenuEntry();
|
||||
cancel.setOption("Cancel");
|
||||
cancel.setTarget("");
|
||||
cancel.setIdentifier(0);
|
||||
cancel.setType(MenuAction.CANCEL.getId());
|
||||
cancel.setParam0(0);
|
||||
cancel.setParam1(0);
|
||||
|
||||
return cancel;
|
||||
}
|
||||
|
||||
private final Client client;
|
||||
private final EventBus eventBus;
|
||||
@@ -70,6 +88,11 @@ public class MenuManager
|
||||
private final Multimap<Integer, WidgetMenuOption> managedMenuOptions = HashMultimap.create();
|
||||
private final Set<String> npcMenuOptions = new HashSet<>();
|
||||
|
||||
private final Set<AbstractMenuEntry> priorityEntries = new HashSet<>();
|
||||
private final Set<MenuEntry> currentPriorityEntries = new HashSet<>();
|
||||
|
||||
private final Map<AbstractMenuEntry, AbstractMenuEntry> swaps = new HashMap<>();
|
||||
|
||||
@Inject
|
||||
private MenuManager(Client client, EventBus eventBus)
|
||||
{
|
||||
@@ -119,12 +142,18 @@ public class MenuManager
|
||||
{
|
||||
int widgetId = event.getActionParam1();
|
||||
Collection<WidgetMenuOption> options = managedMenuOptions.get(widgetId);
|
||||
MenuEntry[] menuEntries = client.getMenuEntries();
|
||||
|
||||
if (menuEntries.length == 1)
|
||||
{
|
||||
// Menu entries reset, so priority entries should reset as well
|
||||
currentPriorityEntries.clear();
|
||||
}
|
||||
|
||||
for (WidgetMenuOption currentMenu : options)
|
||||
{
|
||||
if (!menuContainsCustomMenu(currentMenu))//Don't add if we have already added it to this widget
|
||||
{
|
||||
MenuEntry[] menuEntries = client.getMenuEntries();
|
||||
menuEntries = Arrays.copyOf(menuEntries, menuEntries.length + 1);
|
||||
|
||||
MenuEntry menuEntry = menuEntries[menuEntries.length - 1] = new MenuEntry();
|
||||
@@ -136,6 +165,74 @@ public class MenuManager
|
||||
client.setMenuEntries(menuEntries);
|
||||
}
|
||||
}
|
||||
|
||||
MenuEntry newestEntry = menuEntries[menuEntries.length - 1];
|
||||
|
||||
boolean isPrio = false;
|
||||
for (AbstractMenuEntry p : priorityEntries)
|
||||
{
|
||||
if (p.matches(newestEntry))
|
||||
{
|
||||
isPrio = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// If the last entry was a priority entry, keep track of it
|
||||
if (isPrio)
|
||||
{
|
||||
currentPriorityEntries.add(newestEntry);
|
||||
}
|
||||
|
||||
// Make a copy of the menu entries, cause you can't remove from Arrays.asList()
|
||||
List<MenuEntry> copy = new ArrayList<>(Arrays.asList(menuEntries));
|
||||
|
||||
// If there are entries we want to prioritize, we have to remove the rest
|
||||
if (!currentPriorityEntries.isEmpty())
|
||||
{
|
||||
copy.retainAll(currentPriorityEntries);
|
||||
|
||||
copy.add(CANCEL());
|
||||
}
|
||||
|
||||
// Find the current entry in the swaps map
|
||||
AbstractMenuEntry swapEntry = null;
|
||||
for (AbstractMenuEntry e : swaps.keySet())
|
||||
{
|
||||
if (e.matches(newestEntry))
|
||||
{
|
||||
swapEntry = e;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (swapEntry != null)
|
||||
{
|
||||
AbstractMenuEntry swapTarget = swaps.get(swapEntry);
|
||||
|
||||
// Find the target for the swap in current menu entries
|
||||
MenuEntry foundSwap = null;
|
||||
for (MenuEntry entry : Lists.reverse(copy))
|
||||
{
|
||||
if (swapTarget.matches(entry))
|
||||
{
|
||||
foundSwap = entry;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (foundSwap != null)
|
||||
{
|
||||
// Swap
|
||||
int index = copy.indexOf(foundSwap);
|
||||
int newIndex = copy.indexOf(newestEntry);
|
||||
|
||||
copy.set(index, newestEntry);
|
||||
copy.set(newIndex, foundSwap);
|
||||
}
|
||||
}
|
||||
|
||||
client.setMenuEntries(copy.toArray(new MenuEntry[0]));
|
||||
}
|
||||
|
||||
public void addPlayerMenuItem(String menuText)
|
||||
@@ -307,4 +404,142 @@ public class MenuManager
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds to the set of menu entries which when present, will remove all entries except for this one
|
||||
*/
|
||||
public void addPriorityEntry(String option, String target)
|
||||
{
|
||||
option = Text.standardize(option);
|
||||
target = Text.standardize(target);
|
||||
|
||||
AbstractMenuEntry entry = new AbstractMenuEntry(option, target);
|
||||
|
||||
priorityEntries.add(entry);
|
||||
}
|
||||
|
||||
public void removePriorityEntry(String option, String target)
|
||||
{
|
||||
option = Text.standardize(option);
|
||||
target = Text.standardize(target);
|
||||
|
||||
AbstractMenuEntry entry = new AbstractMenuEntry(option, target);
|
||||
|
||||
Set<AbstractMenuEntry> toRemove = new HashSet<>();
|
||||
for (AbstractMenuEntry priorityEntry : priorityEntries)
|
||||
{
|
||||
if (entry.equals(priorityEntry))
|
||||
{
|
||||
toRemove.add(entry);
|
||||
}
|
||||
}
|
||||
|
||||
for (AbstractMenuEntry e : toRemove)
|
||||
{
|
||||
priorityEntries.remove(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds to the set of menu entries which when present, will remove all entries except for this one
|
||||
* This method will add one with strict option, but not-strict target (contains for target, equals for option)
|
||||
*/
|
||||
public void addPriorityEntry(String option)
|
||||
{
|
||||
option = Text.standardize(option);
|
||||
|
||||
AbstractMenuEntry entry = new AbstractMenuEntry(option, "", false);
|
||||
|
||||
priorityEntries.add(entry);
|
||||
}
|
||||
|
||||
public void removePriorityEntry(String option)
|
||||
{
|
||||
option = Text.standardize(option);
|
||||
|
||||
AbstractMenuEntry entry = new AbstractMenuEntry(option, "", false);
|
||||
|
||||
Set<AbstractMenuEntry> toRemove = new HashSet<>();
|
||||
for (AbstractMenuEntry priorityEntry : priorityEntries)
|
||||
{
|
||||
if (entry.equals(priorityEntry))
|
||||
{
|
||||
toRemove.add(entry);
|
||||
}
|
||||
}
|
||||
|
||||
for (AbstractMenuEntry e : toRemove)
|
||||
{
|
||||
priorityEntries.remove(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds to the map of swaps. - Strict option + target
|
||||
*/
|
||||
public void addSwap(String option, String target, String option2, String target2)
|
||||
{
|
||||
option = Text.standardize(option);
|
||||
target = Text.standardize(target);
|
||||
|
||||
option2 = Text.standardize(option2);
|
||||
target2 = Text.standardize(target2);
|
||||
|
||||
AbstractMenuEntry swapFrom = new AbstractMenuEntry(option, target);
|
||||
AbstractMenuEntry swapTo = new AbstractMenuEntry(option2, target2);
|
||||
|
||||
if (swapTo.equals(swapFrom))
|
||||
{
|
||||
log.warn("You shouldn't try swapping an entry for itself");
|
||||
return;
|
||||
}
|
||||
|
||||
swaps.put(swapFrom, swapTo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds to the map of swaps - Pre-baked Abstract entry
|
||||
*/
|
||||
public void addSwap(AbstractMenuEntry swapFrom, AbstractMenuEntry swapTo)
|
||||
{
|
||||
if (swapTo.equals(swapFrom))
|
||||
{
|
||||
log.warn("You shouldn't try swapping an entry for itself");
|
||||
return;
|
||||
}
|
||||
|
||||
swaps.put(swapFrom, swapTo);
|
||||
}
|
||||
|
||||
public void removeSwap(String option, String target, String option2, String target2)
|
||||
{
|
||||
option = Text.standardize(option);
|
||||
target = Text.standardize(target);
|
||||
|
||||
option2 = Text.standardize(option2);
|
||||
target2 = Text.standardize(target2);
|
||||
|
||||
AbstractMenuEntry swapFrom = new AbstractMenuEntry(option, target);
|
||||
AbstractMenuEntry swapTo = new AbstractMenuEntry(option2, target2);
|
||||
|
||||
removeSwap(swapFrom, swapTo);
|
||||
}
|
||||
|
||||
public void removeSwap(AbstractMenuEntry swapFrom, AbstractMenuEntry swapTo)
|
||||
{
|
||||
Set<AbstractMenuEntry> toRemove = new HashSet<>();
|
||||
for (Map.Entry<AbstractMenuEntry, AbstractMenuEntry> e : swaps.entrySet())
|
||||
{
|
||||
if (e.getKey().equals(swapFrom) && e.getValue().equals(swapTo))
|
||||
{
|
||||
toRemove.add(e.getKey());
|
||||
}
|
||||
}
|
||||
|
||||
for (AbstractMenuEntry entry : toRemove)
|
||||
{
|
||||
swaps.remove(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,9 +24,8 @@
|
||||
*/
|
||||
package net.runelite.client.menus;
|
||||
|
||||
import net.runelite.api.widgets.WidgetInfo;
|
||||
|
||||
import java.awt.Color;
|
||||
import net.runelite.api.widgets.WidgetInfo;
|
||||
import net.runelite.client.ui.JagexColors;
|
||||
import net.runelite.client.util.ColorUtil;
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ package net.runelite.client.plugins;
|
||||
import com.google.inject.Binder;
|
||||
import com.google.inject.Injector;
|
||||
import com.google.inject.Module;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public abstract class Plugin implements Module
|
||||
|
||||
@@ -59,5 +59,5 @@ public @interface PluginDescriptor
|
||||
|
||||
boolean loadWhenOutdated() default false;
|
||||
|
||||
PluginType type() default PluginType.GENERAL_USE;
|
||||
PluginType type() default PluginType.GENERAL_USE;
|
||||
}
|
||||
|
||||
@@ -57,8 +57,6 @@ import javax.inject.Singleton;
|
||||
import javax.swing.SwingUtilities;
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.client.events.SessionClose;
|
||||
import net.runelite.client.events.SessionOpen;
|
||||
import net.runelite.client.RuneLite;
|
||||
import net.runelite.client.config.Config;
|
||||
import net.runelite.client.config.ConfigGroup;
|
||||
@@ -67,6 +65,8 @@ import net.runelite.client.config.RuneLiteConfig;
|
||||
import net.runelite.client.eventbus.EventBus;
|
||||
import net.runelite.client.eventbus.Subscribe;
|
||||
import net.runelite.client.events.PluginChanged;
|
||||
import net.runelite.client.events.SessionClose;
|
||||
import net.runelite.client.events.SessionOpen;
|
||||
import net.runelite.client.task.Schedule;
|
||||
import net.runelite.client.task.ScheduledMethod;
|
||||
import net.runelite.client.task.Scheduler;
|
||||
@@ -90,7 +90,7 @@ public class PluginManager
|
||||
private final List<Plugin> plugins = new CopyOnWriteArrayList<>();
|
||||
private final List<Plugin> activePlugins = new CopyOnWriteArrayList<>();
|
||||
private final String runeliteGroupName = RuneLiteConfig.class
|
||||
.getAnnotation(ConfigGroup.class).value();
|
||||
.getAnnotation(ConfigGroup.class).value();
|
||||
|
||||
@Inject
|
||||
PluginWatcher pluginWatcher;
|
||||
@@ -116,7 +116,7 @@ public class PluginManager
|
||||
this.sceneTileManager = sceneTileManager;
|
||||
}
|
||||
|
||||
public void watch()
|
||||
public void watch()
|
||||
{
|
||||
pluginWatcher.start();
|
||||
}
|
||||
@@ -243,7 +243,7 @@ public class PluginManager
|
||||
if (clazz.getSuperclass() == Plugin.class)
|
||||
{
|
||||
log.warn("Class {} is a plugin, but has no plugin descriptor",
|
||||
clazz);
|
||||
clazz);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@@ -251,7 +251,7 @@ public class PluginManager
|
||||
if (clazz.getSuperclass() != Plugin.class)
|
||||
{
|
||||
log.warn("Class {} has plugin descriptor, but is not a plugin",
|
||||
clazz);
|
||||
clazz);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -516,6 +516,7 @@ public class PluginManager
|
||||
|
||||
/**
|
||||
* Topologically sort a graph. Uses Kahn's algorithm.
|
||||
*
|
||||
* @param graph
|
||||
* @param <T>
|
||||
* @return
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package net.runelite.client.plugins;
|
||||
|
||||
public enum PluginType {
|
||||
public enum PluginType
|
||||
{
|
||||
|
||||
PVM,
|
||||
PVP,
|
||||
|
||||
@@ -89,7 +89,7 @@ public class PluginWatcher extends Thread
|
||||
scan();
|
||||
}
|
||||
|
||||
for (;;)
|
||||
for (; ; )
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/package net.runelite.client.plugins.achievementdiary;
|
||||
*/
|
||||
package net.runelite.client.plugins.achievementdiary;
|
||||
|
||||
public interface Requirement
|
||||
{
|
||||
|
||||
@@ -27,10 +27,10 @@ package net.runelite.client.plugins.achievementdiary.diaries;
|
||||
import net.runelite.api.Favour;
|
||||
import net.runelite.api.Quest;
|
||||
import net.runelite.api.Skill;
|
||||
import net.runelite.client.plugins.achievementdiary.GenericDiaryRequirement;
|
||||
import net.runelite.client.plugins.achievementdiary.SkillRequirement;
|
||||
import net.runelite.client.plugins.achievementdiary.QuestRequirement;
|
||||
import net.runelite.client.plugins.achievementdiary.FavourRequirement;
|
||||
import net.runelite.client.plugins.achievementdiary.GenericDiaryRequirement;
|
||||
import net.runelite.client.plugins.achievementdiary.QuestRequirement;
|
||||
import net.runelite.client.plugins.achievementdiary.SkillRequirement;
|
||||
|
||||
public class KourendDiaryRequirement extends GenericDiaryRequirement
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@ class AgilityOverlay extends Overlay
|
||||
plugin.getObstacles().forEach((object, obstacle) ->
|
||||
{
|
||||
if (Obstacles.SHORTCUT_OBSTACLE_IDS.containsKey(object.getId()) && !config.highlightShortcuts() ||
|
||||
Obstacles.TRAP_OBSTACLE_IDS.contains(object.getId()) && !config.showTrapOverlay())
|
||||
Obstacles.TRAP_OBSTACLE_IDS.contains(object.getId()) && !config.showTrapOverlay())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -122,7 +122,7 @@ class AgilityOverlay extends Overlay
|
||||
for (Tile markOfGraceTile : marksOfGrace)
|
||||
{
|
||||
if (markOfGraceTile.getPlane() == client.getPlane() && markOfGraceTile.getItemLayer() != null
|
||||
&& markOfGraceTile.getLocalLocation().distanceTo(playerLocation) < MAX_DISTANCE)
|
||||
&& markOfGraceTile.getLocalLocation().distanceTo(playerLocation) < MAX_DISTANCE)
|
||||
{
|
||||
final Polygon poly = markOfGraceTile.getItemLayer().getCanvasTilePoly();
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
package net.runelite.client.plugins.agility;
|
||||
|
||||
import com.google.inject.Provides;
|
||||
import java.awt.Color;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
@@ -37,6 +38,8 @@ import net.runelite.api.Client;
|
||||
import net.runelite.api.Item;
|
||||
import net.runelite.api.ItemID;
|
||||
import static net.runelite.api.ItemID.AGILITY_ARENA_TICKET;
|
||||
import net.runelite.api.MenuAction;
|
||||
import net.runelite.api.MenuEntry;
|
||||
import net.runelite.api.Player;
|
||||
import net.runelite.api.Skill;
|
||||
import static net.runelite.api.Skill.AGILITY;
|
||||
@@ -72,10 +75,7 @@ import net.runelite.client.plugins.Plugin;
|
||||
import net.runelite.client.plugins.PluginDescriptor;
|
||||
import net.runelite.client.ui.overlay.OverlayManager;
|
||||
import net.runelite.client.ui.overlay.infobox.InfoBoxManager;
|
||||
import net.runelite.api.MenuEntry;
|
||||
import net.runelite.client.util.ColorUtil;
|
||||
import net.runelite.api.MenuAction;
|
||||
import java.awt.Color;
|
||||
|
||||
@PluginDescriptor(
|
||||
name = "Agility",
|
||||
@@ -447,7 +447,8 @@ public class AgilityPlugin extends Plugin
|
||||
for (Obstacle nearbyObstacle : getObstacles().values())
|
||||
{
|
||||
AgilityShortcut shortcut = nearbyObstacle.getShortcut();
|
||||
if (shortcut != null && Arrays.stream(shortcut.getObstacleIds()).anyMatch(i -> i == entryId)) {
|
||||
if (shortcut != null && Arrays.stream(shortcut.getObstacleIds()).anyMatch(i -> i == entryId))
|
||||
{
|
||||
MenuEntry entry = menuEntries[menuEntries.length - 1];
|
||||
int level = shortcut.getLevel();
|
||||
Color color = level <= getAgilityLevel() ? Color.GREEN : Color.RED;
|
||||
|
||||
@@ -44,7 +44,210 @@ import static net.runelite.api.NullObjectID.NULL_18133;
|
||||
import static net.runelite.api.NullObjectID.NULL_18135;
|
||||
import static net.runelite.api.NullObjectID.NULL_18136;
|
||||
import static net.runelite.api.NullObjectID.NULL_3550;
|
||||
import static net.runelite.api.ObjectID.*;
|
||||
import static net.runelite.api.ObjectID.BALANCING_LEDGE;
|
||||
import static net.runelite.api.ObjectID.BALANCING_LEDGE_23547;
|
||||
import static net.runelite.api.ObjectID.BALANCING_LEDGE_3561;
|
||||
import static net.runelite.api.ObjectID.BALANCING_ROPE;
|
||||
import static net.runelite.api.ObjectID.BALANCING_ROPE_23557;
|
||||
import static net.runelite.api.ObjectID.BANNER_11382;
|
||||
import static net.runelite.api.ObjectID.BASKET_11380;
|
||||
import static net.runelite.api.ObjectID.BOAT_17961;
|
||||
import static net.runelite.api.ObjectID.BOILER_22635;
|
||||
import static net.runelite.api.ObjectID.CABLE;
|
||||
import static net.runelite.api.ObjectID.CABLE_22569;
|
||||
import static net.runelite.api.ObjectID.CABLE_22572;
|
||||
import static net.runelite.api.ObjectID.CLIMBING_ROCKS_10851;
|
||||
import static net.runelite.api.ObjectID.CLOTHES_LINE;
|
||||
import static net.runelite.api.ObjectID.CONSOLE;
|
||||
import static net.runelite.api.ObjectID.CRATE_10086;
|
||||
import static net.runelite.api.ObjectID.CRUMBLING_WALL_1948;
|
||||
import static net.runelite.api.ObjectID.DOORWAY_10855;
|
||||
import static net.runelite.api.ObjectID.DOOR_18091;
|
||||
import static net.runelite.api.ObjectID.DRYING_LINE;
|
||||
import static net.runelite.api.ObjectID.EDGE;
|
||||
import static net.runelite.api.ObjectID.EDGE_11371;
|
||||
import static net.runelite.api.ObjectID.EDGE_11377;
|
||||
import static net.runelite.api.ObjectID.FLOORBOARDS;
|
||||
import static net.runelite.api.ObjectID.FLOORBOARDS_18071;
|
||||
import static net.runelite.api.ObjectID.FLOORBOARDS_18072;
|
||||
import static net.runelite.api.ObjectID.FLOORBOARDS_18073;
|
||||
import static net.runelite.api.ObjectID.FLOORBOARDS_18089;
|
||||
import static net.runelite.api.ObjectID.FLOORBOARDS_18090;
|
||||
import static net.runelite.api.ObjectID.FLOORBOARDS_18093;
|
||||
import static net.runelite.api.ObjectID.FLOORBOARDS_18094;
|
||||
import static net.runelite.api.ObjectID.FLOORBOARDS_18097;
|
||||
import static net.runelite.api.ObjectID.FLOORBOARDS_18098;
|
||||
import static net.runelite.api.ObjectID.FLOORBOARDS_18109;
|
||||
import static net.runelite.api.ObjectID.FLOORBOARDS_18110;
|
||||
import static net.runelite.api.ObjectID.FLOORBOARDS_18111;
|
||||
import static net.runelite.api.ObjectID.FLOORBOARDS_18112;
|
||||
import static net.runelite.api.ObjectID.FLOORBOARDS_18113;
|
||||
import static net.runelite.api.ObjectID.FLOORBOARDS_18114;
|
||||
import static net.runelite.api.ObjectID.FLOORBOARDS_18117;
|
||||
import static net.runelite.api.ObjectID.FLOORBOARDS_18118;
|
||||
import static net.runelite.api.ObjectID.GAP_10085;
|
||||
import static net.runelite.api.ObjectID.GAP_10352;
|
||||
import static net.runelite.api.ObjectID.GAP_10642;
|
||||
import static net.runelite.api.ObjectID.GAP_10778;
|
||||
import static net.runelite.api.ObjectID.GAP_10779;
|
||||
import static net.runelite.api.ObjectID.GAP_10780;
|
||||
import static net.runelite.api.ObjectID.GAP_10820;
|
||||
import static net.runelite.api.ObjectID.GAP_10821;
|
||||
import static net.runelite.api.ObjectID.GAP_10822;
|
||||
import static net.runelite.api.ObjectID.GAP_10823;
|
||||
import static net.runelite.api.ObjectID.GAP_10828;
|
||||
import static net.runelite.api.ObjectID.GAP_10832;
|
||||
import static net.runelite.api.ObjectID.GAP_10859;
|
||||
import static net.runelite.api.ObjectID.GAP_10861;
|
||||
import static net.runelite.api.ObjectID.GAP_10882;
|
||||
import static net.runelite.api.ObjectID.GAP_10884;
|
||||
import static net.runelite.api.ObjectID.GAP_11161;
|
||||
import static net.runelite.api.ObjectID.GAP_11360;
|
||||
import static net.runelite.api.ObjectID.GAP_11365;
|
||||
import static net.runelite.api.ObjectID.GAP_11374;
|
||||
import static net.runelite.api.ObjectID.GAP_11375;
|
||||
import static net.runelite.api.ObjectID.GAP_11376;
|
||||
import static net.runelite.api.ObjectID.GAP_11383;
|
||||
import static net.runelite.api.ObjectID.GAP_11392;
|
||||
import static net.runelite.api.ObjectID.GAP_11395;
|
||||
import static net.runelite.api.ObjectID.GAP_11396;
|
||||
import static net.runelite.api.ObjectID.GAP_11406;
|
||||
import static net.runelite.api.ObjectID.GAP_11429;
|
||||
import static net.runelite.api.ObjectID.GAP_11430;
|
||||
import static net.runelite.api.ObjectID.GAP_11630;
|
||||
import static net.runelite.api.ObjectID.HAND_HOLDS_10836;
|
||||
import static net.runelite.api.ObjectID.HAND_HOLDS_3583;
|
||||
import static net.runelite.api.ObjectID.HURDLE;
|
||||
import static net.runelite.api.ObjectID.HURDLE_11639;
|
||||
import static net.runelite.api.ObjectID.HURDLE_11640;
|
||||
import static net.runelite.api.ObjectID.ICE;
|
||||
import static net.runelite.api.ObjectID.ICE_21149;
|
||||
import static net.runelite.api.ObjectID.ICE_21150;
|
||||
import static net.runelite.api.ObjectID.ICE_21151;
|
||||
import static net.runelite.api.ObjectID.ICE_21152;
|
||||
import static net.runelite.api.ObjectID.ICE_21153;
|
||||
import static net.runelite.api.ObjectID.ICE_21154;
|
||||
import static net.runelite.api.ObjectID.ICE_21155;
|
||||
import static net.runelite.api.ObjectID.ICE_21156;
|
||||
import static net.runelite.api.ObjectID.ICICLES;
|
||||
import static net.runelite.api.ObjectID.JUTTING_WALL_22552;
|
||||
import static net.runelite.api.ObjectID.LADDER_16682;
|
||||
import static net.runelite.api.ObjectID.LADDER_22564;
|
||||
import static net.runelite.api.ObjectID.LEDGE_10781;
|
||||
import static net.runelite.api.ObjectID.LEDGE_10860;
|
||||
import static net.runelite.api.ObjectID.LEDGE_10886;
|
||||
import static net.runelite.api.ObjectID.LEDGE_10888;
|
||||
import static net.runelite.api.ObjectID.LEDGE_11366;
|
||||
import static net.runelite.api.ObjectID.LEDGE_11367;
|
||||
import static net.runelite.api.ObjectID.LEDGE_11369;
|
||||
import static net.runelite.api.ObjectID.LEDGE_11370;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_23144;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_23145;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_23542;
|
||||
import static net.runelite.api.ObjectID.LOG_BALANCE_3557;
|
||||
import static net.runelite.api.ObjectID.LOW_WALL;
|
||||
import static net.runelite.api.ObjectID.LOW_WALL_10865;
|
||||
import static net.runelite.api.ObjectID.MARKET_STALL_11381;
|
||||
import static net.runelite.api.ObjectID.MONKEYBARS;
|
||||
import static net.runelite.api.ObjectID.MONKEYBARS_15417;
|
||||
import static net.runelite.api.ObjectID.MONKEY_BARS_3564;
|
||||
import static net.runelite.api.ObjectID.NARROW_WALL;
|
||||
import static net.runelite.api.ObjectID.OBSTACLE_NET_20211;
|
||||
import static net.runelite.api.ObjectID.OBSTACLE_NET_23134;
|
||||
import static net.runelite.api.ObjectID.OBSTACLE_NET_23135;
|
||||
import static net.runelite.api.ObjectID.OBSTACLE_PIPE_23137;
|
||||
import static net.runelite.api.ObjectID.OBSTACLE_PIPE_23138;
|
||||
import static net.runelite.api.ObjectID.OBSTACLE_PIPE_23139;
|
||||
import static net.runelite.api.ObjectID.PILE_OF_FISH;
|
||||
import static net.runelite.api.ObjectID.PILLAR_3578;
|
||||
import static net.runelite.api.ObjectID.PIPE_11657;
|
||||
import static net.runelite.api.ObjectID.PLANK_10868;
|
||||
import static net.runelite.api.ObjectID.PLANK_11631;
|
||||
import static net.runelite.api.ObjectID.PLANK_3570;
|
||||
import static net.runelite.api.ObjectID.PLANK_3571;
|
||||
import static net.runelite.api.ObjectID.PLANK_3572;
|
||||
import static net.runelite.api.ObjectID.POLEVAULT;
|
||||
import static net.runelite.api.ObjectID.PYLON_22664;
|
||||
import static net.runelite.api.ObjectID.ROCKS_23640;
|
||||
import static net.runelite.api.ObjectID.ROCK_17958;
|
||||
import static net.runelite.api.ObjectID.ROCK_17959;
|
||||
import static net.runelite.api.ObjectID.ROCK_17960;
|
||||
import static net.runelite.api.ObjectID.ROOF_TOP_BEAMS;
|
||||
import static net.runelite.api.ObjectID.ROPESWING_23131;
|
||||
import static net.runelite.api.ObjectID.ROPESWING_23132;
|
||||
import static net.runelite.api.ObjectID.ROPE_15487;
|
||||
import static net.runelite.api.ObjectID.ROPE_SWING;
|
||||
import static net.runelite.api.ObjectID.ROUGH_WALL;
|
||||
import static net.runelite.api.ObjectID.ROUGH_WALL_10093;
|
||||
import static net.runelite.api.ObjectID.ROUGH_WALL_10586;
|
||||
import static net.runelite.api.ObjectID.ROUGH_WALL_10833;
|
||||
import static net.runelite.api.ObjectID.ROUGH_WALL_11385;
|
||||
import static net.runelite.api.ObjectID.ROUGH_WALL_11391;
|
||||
import static net.runelite.api.ObjectID.SHELF_18086;
|
||||
import static net.runelite.api.ObjectID.SHELF_18087;
|
||||
import static net.runelite.api.ObjectID.SHELF_18095;
|
||||
import static net.runelite.api.ObjectID.SHELF_18096;
|
||||
import static net.runelite.api.ObjectID.SHELF_18105;
|
||||
import static net.runelite.api.ObjectID.SHELF_18106;
|
||||
import static net.runelite.api.ObjectID.SHELF_18107;
|
||||
import static net.runelite.api.ObjectID.SHELF_18108;
|
||||
import static net.runelite.api.ObjectID.SKULL_SLOPE;
|
||||
import static net.runelite.api.ObjectID.SKULL_SLOPE_15483;
|
||||
import static net.runelite.api.ObjectID.STAIRS_10857;
|
||||
import static net.runelite.api.ObjectID.STAIRS_22608;
|
||||
import static net.runelite.api.ObjectID.STAIRS_22609;
|
||||
import static net.runelite.api.ObjectID.STAIRS_22650;
|
||||
import static net.runelite.api.ObjectID.STAIRS_22651;
|
||||
import static net.runelite.api.ObjectID.STAIRS_DOWN;
|
||||
import static net.runelite.api.ObjectID.STEEP_ROOF;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_11643;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_15412;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_21120;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_21126;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_21128;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_21129;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_21130;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_21131;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_21132;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_21133;
|
||||
import static net.runelite.api.ObjectID.STEPPING_STONE_23556;
|
||||
import static net.runelite.api.ObjectID.STILE_7527;
|
||||
import static net.runelite.api.ObjectID.TALL_TREE_10819;
|
||||
import static net.runelite.api.ObjectID.TIGHTROPE;
|
||||
import static net.runelite.api.ObjectID.TIGHTROPE_10075;
|
||||
import static net.runelite.api.ObjectID.TIGHTROPE_10284;
|
||||
import static net.runelite.api.ObjectID.TIGHTROPE_10583;
|
||||
import static net.runelite.api.ObjectID.TIGHTROPE_10834;
|
||||
import static net.runelite.api.ObjectID.TIGHTROPE_11361;
|
||||
import static net.runelite.api.ObjectID.TIGHTROPE_11364;
|
||||
import static net.runelite.api.ObjectID.TIGHTROPE_11378;
|
||||
import static net.runelite.api.ObjectID.TIGHTROPE_11393;
|
||||
import static net.runelite.api.ObjectID.TIGHTROPE_11397;
|
||||
import static net.runelite.api.ObjectID.TREE_11384;
|
||||
import static net.runelite.api.ObjectID.TREE_11389;
|
||||
import static net.runelite.api.ObjectID.TREE_BRANCH_23559;
|
||||
import static net.runelite.api.ObjectID.TREE_BRANCH_23560;
|
||||
import static net.runelite.api.ObjectID.TROPICAL_TREE_10357;
|
||||
import static net.runelite.api.ObjectID.TROPICAL_TREE_15414;
|
||||
import static net.runelite.api.ObjectID.TROPICAL_TREE_16062;
|
||||
import static net.runelite.api.ObjectID.TUNNEL_18085;
|
||||
import static net.runelite.api.ObjectID.TUNNEL_22557;
|
||||
import static net.runelite.api.ObjectID.WALL_10084;
|
||||
import static net.runelite.api.ObjectID.WALL_10777;
|
||||
import static net.runelite.api.ObjectID.WALL_11373;
|
||||
import static net.runelite.api.ObjectID.WALL_17980;
|
||||
import static net.runelite.api.ObjectID.WALL_18078;
|
||||
import static net.runelite.api.ObjectID.WALL_18088;
|
||||
import static net.runelite.api.ObjectID.WALL_RUBBLE;
|
||||
import static net.runelite.api.ObjectID.WALL_RUBBLE_18038;
|
||||
import static net.runelite.api.ObjectID.WASHING_LINE_18099;
|
||||
import static net.runelite.api.ObjectID.WASHING_LINE_18100;
|
||||
import static net.runelite.api.ObjectID.WOODEN_BEAMS;
|
||||
import static net.runelite.api.ObjectID.ZIP_LINE;
|
||||
import static net.runelite.api.ObjectID.ZIP_LINE_11644;
|
||||
import static net.runelite.api.ObjectID.ZIP_LINE_11645;
|
||||
import static net.runelite.api.ObjectID.ZIP_LINE_11646;
|
||||
import net.runelite.client.game.AgilityShortcut;
|
||||
|
||||
class Obstacles
|
||||
|
||||
@@ -32,10 +32,10 @@ import net.runelite.api.coords.WorldPoint;
|
||||
|
||||
enum HydraPhase
|
||||
{ // Sorry for the autism
|
||||
ONE (3, AnimationID.HYDRA_1_1, AnimationID.HYDRA_1_2, ProjectileID.HYDRA_POISON, 0, SpriteID.BIG_ASS_GUTHIX_SPELL, new WorldPoint(1371, 10263, 0)),
|
||||
TWO (3, AnimationID.HYDRA_2_1, AnimationID.HYDRA_2_2, 0, AnimationID.HYDRA_LIGHTNING, SpriteID.BIG_SPEC_TRANSFER, new WorldPoint(1371, 10272, 0)),
|
||||
THREE (3, AnimationID.HYDRA_3_1, AnimationID.HYDRA_3_2, 0, AnimationID.HYDRA_FIRE, SpriteID.BIG_SUPERHEAT, new WorldPoint(1362, 10272, 0)),
|
||||
FOUR (1, AnimationID.HYDRA_4_1, AnimationID.HYDRA_4_2, ProjectileID.HYDRA_POISON, 0, SpriteID.BIG_ASS_GUTHIX_SPELL, null);
|
||||
ONE(3, AnimationID.HYDRA_1_1, AnimationID.HYDRA_1_2, ProjectileID.HYDRA_POISON, 0, SpriteID.BIG_ASS_GUTHIX_SPELL, new WorldPoint(1371, 10263, 0)),
|
||||
TWO(3, AnimationID.HYDRA_2_1, AnimationID.HYDRA_2_2, 0, AnimationID.HYDRA_LIGHTNING, SpriteID.BIG_SPEC_TRANSFER, new WorldPoint(1371, 10272, 0)),
|
||||
THREE(3, AnimationID.HYDRA_3_1, AnimationID.HYDRA_3_2, 0, AnimationID.HYDRA_FIRE, SpriteID.BIG_SUPERHEAT, new WorldPoint(1362, 10272, 0)),
|
||||
FOUR(1, AnimationID.HYDRA_4_1, AnimationID.HYDRA_4_2, ProjectileID.HYDRA_POISON, 0, SpriteID.BIG_ASS_GUTHIX_SPELL, null);
|
||||
|
||||
@Getter
|
||||
private final int attacksPerSwitch;
|
||||
|
||||
@@ -117,9 +117,9 @@ public class HydraPlugin extends Plugin
|
||||
{
|
||||
|
||||
if (hydra != null)
|
||||
{
|
||||
removeOverlays();
|
||||
hydra = null;
|
||||
{
|
||||
removeOverlays();
|
||||
hydra = null;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -305,8 +305,8 @@ public class HydraPlugin extends Plugin
|
||||
}
|
||||
else
|
||||
{
|
||||
hydra.setNextSwitch(hydra.getNextSwitch() - 1);
|
||||
hydra.setLastAttack(hydra.getNextAttack());
|
||||
hydra.setNextSwitch(hydra.getNextSwitch() - 1);
|
||||
hydra.setLastAttack(hydra.getNextAttack());
|
||||
}
|
||||
|
||||
hydra.setAttackCount(hydra.getAttackCount() + 1);
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
package net.runelite.client.plugins.alchemicalhydra;
|
||||
|
||||
import java.awt.BasicStroke;
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Graphics2D;
|
||||
@@ -93,8 +94,8 @@ class HydraPoisonOverlay extends Overlay
|
||||
|
||||
if (poly != null)
|
||||
{
|
||||
poisonTiles.add(new Area(poly));
|
||||
}
|
||||
poisonTiles.add(new Area(poly));
|
||||
}
|
||||
}
|
||||
|
||||
graphics.setPaintMode();
|
||||
@@ -134,12 +135,13 @@ class HydraPoisonOverlay extends Overlay
|
||||
|
||||
Color color = new Color(255, 0, 0, 100); // like
|
||||
|
||||
if (hydra.getNpc().getWorldArea().intersectsWith(new WorldArea(wp, 1, 1))) // coords
|
||||
{ // WHICH FUCKING RETARD DID X, Y, dX, dY, Z???? IT'S XYZdXdY REEEEEEEEEE
|
||||
if (hydra.getNpc().getWorldArea().intersectsWith(new WorldArea(wp, 1, 1))) // coords
|
||||
{ // WHICH FUCKING RETARD DID X, Y, dX, dY, Z???? IT'S XYZdXdY REEEEEEEEEE
|
||||
color = new Color(0, 255, 0, 100);
|
||||
}
|
||||
|
||||
graphics.setColor(color);
|
||||
graphics.setStroke(new BasicStroke(3));
|
||||
graphics.draw(poly);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, https://runelitepl.us
|
||||
* Copyright (c) 2018, DennisDeV <https://github.com/DevDennis>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -24,11 +24,10 @@
|
||||
*/
|
||||
package net.runelite.client.plugins.antidrag;
|
||||
|
||||
import net.runelite.api.Constants;
|
||||
import java.awt.Color;
|
||||
import java.awt.event.KeyEvent;
|
||||
import net.runelite.client.config.Alpha;
|
||||
import net.runelite.api.Constants;
|
||||
import net.runelite.client.config.Alpha;
|
||||
import net.runelite.client.config.Config;
|
||||
import net.runelite.client.config.ConfigGroup;
|
||||
import net.runelite.client.config.ConfigItem;
|
||||
|
||||
@@ -23,30 +23,7 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.runelite.client.plugins.antidrag;
|
||||
/*
|
||||
* Copyright (c) 2018, https://runelitepl.us
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
import com.google.inject.Provides;
|
||||
import javax.inject.Inject;
|
||||
import net.runelite.api.Client;
|
||||
|
||||
@@ -32,7 +32,6 @@ import java.util.Map;
|
||||
import net.runelite.api.ProjectileID;
|
||||
|
||||
|
||||
|
||||
public enum AoeProjectileInfo
|
||||
{
|
||||
LIZARDMAN_SHAMAN_AOE(ProjectileID.LIZARDMAN_SHAMAN_AOE, 5),
|
||||
@@ -108,8 +107,8 @@ public enum AoeProjectileInfo
|
||||
ADDY_DRAG_POISON(ProjectileID.ADDY_DRAG_POISON, 1),
|
||||
|
||||
/**
|
||||
* the Breath of the Drake
|
||||
*/
|
||||
* the Breath of the Drake
|
||||
*/
|
||||
DRAKE_BREATH(ProjectileID.DRAKE_BREATH, 1),
|
||||
|
||||
/**
|
||||
|
||||
@@ -71,7 +71,7 @@ public class AoeWarningOverlay extends Overlay
|
||||
{
|
||||
for (WorldPoint point : plugin.getLightningTrail())
|
||||
{
|
||||
drawTile(graphics, point, new Color(0,150,200), 2, 150, 50);
|
||||
drawTile(graphics, point, new Color(0, 150, 200), 2, 150, 50);
|
||||
}
|
||||
for (WorldPoint point : plugin.getAcidTrail())
|
||||
{
|
||||
@@ -84,7 +84,7 @@ public class AoeWarningOverlay extends Overlay
|
||||
|
||||
Instant now = Instant.now();
|
||||
Map<Projectile, AoeProjectile> projectiles = plugin.getProjectiles();
|
||||
for (Iterator<AoeProjectile> it = projectiles.values().iterator(); it.hasNext();)
|
||||
for (Iterator<AoeProjectile> it = projectiles.values().iterator(); it.hasNext(); )
|
||||
{
|
||||
AoeProjectile aoeProjectile = it.next();
|
||||
|
||||
@@ -145,18 +145,22 @@ public class AoeWarningOverlay extends Overlay
|
||||
return null;
|
||||
}
|
||||
|
||||
private void drawTile(Graphics2D graphics, WorldPoint point, Color color, int strokeWidth, int outlineAlpha, int fillAlpha) {
|
||||
private void drawTile(Graphics2D graphics, WorldPoint point, Color color, int strokeWidth, int outlineAlpha, int fillAlpha)
|
||||
{
|
||||
WorldPoint playerLocation = client.getLocalPlayer().getWorldLocation();
|
||||
if (point.distanceTo(playerLocation) >= 32) {
|
||||
if (point.distanceTo(playerLocation) >= 32)
|
||||
{
|
||||
return;
|
||||
}
|
||||
LocalPoint lp = LocalPoint.fromWorld(client, point);
|
||||
if (lp == null) {
|
||||
if (lp == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Polygon poly = Perspective.getCanvasTilePoly(client, lp);
|
||||
if (poly == null) {
|
||||
if (poly == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
//OverlayUtil.renderPolygon(graphics, poly, color);
|
||||
|
||||
@@ -301,8 +301,8 @@ public class AoeWarningPlugin extends Plugin
|
||||
return config.isXarpusEnabled();
|
||||
case ADDY_DRAG_POISON:
|
||||
return config.addyDrags();
|
||||
case DRAKE_BREATH:
|
||||
return config.isDrakeEnabled();
|
||||
case DRAKE_BREATH:
|
||||
return config.isDrakeEnabled();
|
||||
case CERB_FIRE:
|
||||
return config.isCerbFireEnabled();
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ public class BombOverlay extends Overlay
|
||||
|
||||
//Utilized from the npc highlight code for formatting text being displayed on the client canvas.
|
||||
private static final NumberFormat TIME_LEFT_FORMATTER =
|
||||
DecimalFormat.getInstance(Locale.US);
|
||||
DecimalFormat.getInstance(Locale.US);
|
||||
|
||||
static
|
||||
{
|
||||
@@ -157,22 +157,22 @@ public class BombOverlay extends Overlay
|
||||
|
||||
Instant now = Instant.now();
|
||||
double timeLeft = ((BOMB_DETONATE_TIME - (client.getTickCount() -
|
||||
bomb.getTickStarted())) * ESTIMATED_TICK_LENGTH) -
|
||||
(now.toEpochMilli() - bomb.getLastClockUpdate().toEpochMilli()) / 1000.0;
|
||||
//divided by 1000.00 because of milliseconds :)
|
||||
bomb.getTickStarted())) * ESTIMATED_TICK_LENGTH) -
|
||||
(now.toEpochMilli() - bomb.getLastClockUpdate().toEpochMilli()) / 1000.0;
|
||||
//divided by 1000.00 because of milliseconds :)
|
||||
|
||||
timeLeft = Math.max(0.0, timeLeft);
|
||||
String bombTimerString = TIME_LEFT_FORMATTER.format(timeLeft);
|
||||
int textWidth = graphics.getFontMetrics().stringWidth(bombTimerString);
|
||||
int textHeight = graphics.getFontMetrics().getAscent();
|
||||
Point canvasPoint = Perspective.localToCanvas(client, localLoc.getX(),
|
||||
localLoc.getY(), bomb.getWorldLocation().getPlane());
|
||||
localLoc.getY(), bomb.getWorldLocation().getPlane());
|
||||
|
||||
if (canvasPoint != null)
|
||||
{
|
||||
Point canvasCenterPoint = new Point(
|
||||
canvasPoint.getX() - textWidth / 2,
|
||||
canvasPoint.getY() + textHeight / 2);
|
||||
canvasPoint.getX() - textWidth / 2,
|
||||
canvasPoint.getY() + textHeight / 2);
|
||||
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint, bombTimerString, color_code);
|
||||
}
|
||||
|
||||
|
||||
@@ -65,10 +65,10 @@ public interface BankTagsConfig extends Config
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "hidePlaceholders",
|
||||
name = "Hide placeholders",
|
||||
description = "Hide placeholders in tag tabs or tag search.",
|
||||
position = 4
|
||||
keyName = "hidePlaceholders",
|
||||
name = "Hide placeholders",
|
||||
description = "Hide placeholders in tag tabs or tag search.",
|
||||
position = 4
|
||||
)
|
||||
default boolean hidePlaceholders()
|
||||
{
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
*/
|
||||
package net.runelite.client.plugins.barbarianassault;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.inject.Provides;
|
||||
import java.awt.Color;
|
||||
import java.awt.Font;
|
||||
|
||||
@@ -33,10 +33,10 @@ import net.runelite.api.widgets.WidgetInfo;
|
||||
@AllArgsConstructor
|
||||
enum HealerTeam
|
||||
{
|
||||
TEAMMATE1(WidgetInfo.BA_HEAL_TEAMMATE1, new Point(28, 2), 115),
|
||||
TEAMMATE2(WidgetInfo.BA_HEAL_TEAMMATE2, new Point(26, 2), 115),
|
||||
TEAMMATE3(WidgetInfo.BA_HEAL_TEAMMATE3, new Point(26, 2), 115),
|
||||
TEAMMATE4(WidgetInfo.BA_HEAL_TEAMMATE4, new Point(25, 2), 115);
|
||||
TEAMMATE1(WidgetInfo.BA_HEAL_TEAMMATE1, new Point(28, 2), 115),
|
||||
TEAMMATE2(WidgetInfo.BA_HEAL_TEAMMATE2, new Point(26, 2), 115),
|
||||
TEAMMATE3(WidgetInfo.BA_HEAL_TEAMMATE3, new Point(26, 2), 115),
|
||||
TEAMMATE4(WidgetInfo.BA_HEAL_TEAMMATE4, new Point(25, 2), 115);
|
||||
|
||||
private WidgetInfo teammate;
|
||||
private Point offset;
|
||||
|
||||
@@ -89,10 +89,10 @@ public class BarrowsBrotherSlainOverlay extends Overlay
|
||||
|
||||
float rewardPercent = client.getVar(Varbits.BARROWS_REWARD_POTENTIAL) / 10.0f;
|
||||
panelComponent.getChildren().add(LineComponent.builder()
|
||||
.left("Potential")
|
||||
.right(rewardPercent != 0 ? rewardPercent + "%" : "0%")
|
||||
.rightColor(rewardPercent >= 73.0f && rewardPercent <= 88.0f ? Color.GREEN : rewardPercent < 65.6f ? Color.WHITE : Color.YELLOW)
|
||||
.build());
|
||||
.left("Potential")
|
||||
.right(rewardPercent != 0 ? rewardPercent + "%" : "0%")
|
||||
.rightColor(rewardPercent >= 73.0f && rewardPercent <= 88.0f ? Color.GREEN : rewardPercent < 65.6f ? Color.WHITE : Color.YELLOW)
|
||||
.build());
|
||||
|
||||
return panelComponent.render(graphics);
|
||||
}
|
||||
|
||||
@@ -180,6 +180,7 @@ class BarrowsOverlay extends Overlay
|
||||
|
||||
/**
|
||||
* Get minimap dot color from client
|
||||
*
|
||||
* @param typeIndex index of minimap dot type (1 npcs, 2 players)
|
||||
* @return color
|
||||
*/
|
||||
|
||||
@@ -81,13 +81,13 @@ public class BarrowsPlugin extends Plugin
|
||||
{
|
||||
@Getter(AccessLevel.PACKAGE)
|
||||
private static final Set<Integer> BARROWS_WALLS = Sets.newHashSet
|
||||
(
|
||||
ObjectID.DOOR_20678, NullObjectID.NULL_20681, NullObjectID.NULL_20682, NullObjectID.NULL_20683, NullObjectID.NULL_20684, NullObjectID.NULL_20685, NullObjectID.NULL_20686, NullObjectID.NULL_20687,
|
||||
NullObjectID.NULL_20688, NullObjectID.NULL_20689, NullObjectID.NULL_20690, NullObjectID.NULL_20691, NullObjectID.NULL_20692, NullObjectID.NULL_20693, NullObjectID.NULL_20694, NullObjectID.NULL_20695,
|
||||
NullObjectID.NULL_20696, ObjectID.DOOR_20697, NullObjectID.NULL_20700, NullObjectID.NULL_20701, NullObjectID.NULL_20702, NullObjectID.NULL_20703, NullObjectID.NULL_20704, NullObjectID.NULL_20705,
|
||||
NullObjectID.NULL_20706, NullObjectID.NULL_20707, NullObjectID.NULL_20708, NullObjectID.NULL_20709, NullObjectID.NULL_20710, NullObjectID.NULL_20711, NullObjectID.NULL_20712, NullObjectID.NULL_20713,
|
||||
NullObjectID.NULL_20714, NullObjectID.NULL_20715, NullObjectID.NULL_20728, NullObjectID.NULL_20730
|
||||
);
|
||||
(
|
||||
ObjectID.DOOR_20678, NullObjectID.NULL_20681, NullObjectID.NULL_20682, NullObjectID.NULL_20683, NullObjectID.NULL_20684, NullObjectID.NULL_20685, NullObjectID.NULL_20686, NullObjectID.NULL_20687,
|
||||
NullObjectID.NULL_20688, NullObjectID.NULL_20689, NullObjectID.NULL_20690, NullObjectID.NULL_20691, NullObjectID.NULL_20692, NullObjectID.NULL_20693, NullObjectID.NULL_20694, NullObjectID.NULL_20695,
|
||||
NullObjectID.NULL_20696, ObjectID.DOOR_20697, NullObjectID.NULL_20700, NullObjectID.NULL_20701, NullObjectID.NULL_20702, NullObjectID.NULL_20703, NullObjectID.NULL_20704, NullObjectID.NULL_20705,
|
||||
NullObjectID.NULL_20706, NullObjectID.NULL_20707, NullObjectID.NULL_20708, NullObjectID.NULL_20709, NullObjectID.NULL_20710, NullObjectID.NULL_20711, NullObjectID.NULL_20712, NullObjectID.NULL_20713,
|
||||
NullObjectID.NULL_20714, NullObjectID.NULL_20715, NullObjectID.NULL_20728, NullObjectID.NULL_20730
|
||||
);
|
||||
|
||||
private static final Set<Integer> BARROWS_LADDERS = Sets.newHashSet(NullObjectID.NULL_20675, NullObjectID.NULL_20676, NullObjectID.NULL_20677);
|
||||
private static final ImmutableList<WidgetInfo> POSSIBLE_SOLUTIONS = ImmutableList.of(
|
||||
|
||||
@@ -81,26 +81,6 @@ public interface BAToolsConfig extends Config
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "antiDrag",
|
||||
name = "Anti Drag",
|
||||
description = "asd"
|
||||
)
|
||||
default boolean antiDrag()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "antiDragDelay",
|
||||
name = "Anti Drag Delay",
|
||||
description = "asd"
|
||||
)
|
||||
default int antiDragDelay()
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "eggBoi",
|
||||
name = "Collector helper",
|
||||
|
||||
@@ -25,14 +25,14 @@
|
||||
package net.runelite.client.plugins.batools;
|
||||
|
||||
import java.awt.Color;
|
||||
import static java.awt.Color.GREEN;
|
||||
import static java.awt.Color.RED;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Graphics2D;
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import javax.inject.Inject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.NPCComposition;
|
||||
import net.runelite.client.ui.overlay.Overlay;
|
||||
import net.runelite.client.ui.overlay.OverlayLayer;
|
||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||
@@ -42,16 +42,6 @@ import net.runelite.client.ui.overlay.OverlayUtil;
|
||||
|
||||
public class BAToolsOverlay extends Overlay
|
||||
{
|
||||
private static final Color RED = new Color(221, 44, 0);
|
||||
private static final Color GREEN = new Color(0, 200, 83);
|
||||
private static final Color ORANGE = new Color(255, 109, 0);
|
||||
private static final Color YELLOW = new Color(255, 214, 0);
|
||||
private static final Color CYAN = new Color(0, 184, 212);
|
||||
private static final Color BLUE = new Color(41, 98, 255);
|
||||
private static final Color DEEP_PURPLE = new Color(98, 0, 234);
|
||||
private static final Color PURPLE = new Color(170, 0, 255);
|
||||
private static final Color GRAY = new Color(158, 158, 158);
|
||||
|
||||
private final BAToolsConfig config;
|
||||
private BAToolsPlugin plugin;
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
package net.runelite.client.plugins.batools;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.inject.Provides;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.image.BufferedImage;
|
||||
@@ -61,9 +62,23 @@ import net.runelite.api.events.NpcSpawned;
|
||||
import net.runelite.api.events.VarbitChanged;
|
||||
import net.runelite.api.events.WidgetLoaded;
|
||||
import net.runelite.api.widgets.Widget;
|
||||
import net.runelite.api.widgets.WidgetID;
|
||||
import static net.runelite.api.widgets.WidgetID.BA_REWARD_GROUP_ID;
|
||||
import net.runelite.api.widgets.WidgetInfo;
|
||||
import net.runelite.client.chat.ChatMessageManager;
|
||||
import static net.runelite.api.widgets.WidgetInfo.BA_ATK_CALL_TEXT;
|
||||
import static net.runelite.api.widgets.WidgetInfo.BA_ATK_LISTEN_TEXT;
|
||||
import static net.runelite.api.widgets.WidgetInfo.BA_ATK_ROLE_TEXT;
|
||||
import static net.runelite.api.widgets.WidgetInfo.BA_COLL_CALL_TEXT;
|
||||
import static net.runelite.api.widgets.WidgetInfo.BA_COLL_LISTEN_TEXT;
|
||||
import static net.runelite.api.widgets.WidgetInfo.BA_COLL_ROLE_TEXT;
|
||||
import static net.runelite.api.widgets.WidgetInfo.BA_DEF_CALL_TEXT;
|
||||
import static net.runelite.api.widgets.WidgetInfo.BA_DEF_ROLE_TEXT;
|
||||
import static net.runelite.api.widgets.WidgetInfo.BA_HEAL_CALL_TEXT;
|
||||
import static net.runelite.api.widgets.WidgetInfo.BA_HEAL_LISTEN_TEXT;
|
||||
import static net.runelite.api.widgets.WidgetInfo.BA_REWARD_TEXT;
|
||||
import static net.runelite.api.widgets.WidgetInfo.COMBAT_STYLE_FOUR;
|
||||
import static net.runelite.api.widgets.WidgetInfo.COMBAT_STYLE_ONE;
|
||||
import static net.runelite.api.widgets.WidgetInfo.COMBAT_STYLE_THREE;
|
||||
import static net.runelite.api.widgets.WidgetInfo.COMBAT_STYLE_TWO;
|
||||
import net.runelite.client.config.ConfigManager;
|
||||
import net.runelite.client.eventbus.Subscribe;
|
||||
import net.runelite.client.game.ItemManager;
|
||||
@@ -93,6 +108,7 @@ public class BAToolsPlugin extends Plugin implements KeyListener
|
||||
private int currentWave = 1;
|
||||
private static final int BA_WAVE_NUM_INDEX = 2;
|
||||
private final List<MenuEntry> entries = new ArrayList<>();
|
||||
private ImmutableMap<WidgetInfo, Boolean> originalAttackStyles;
|
||||
private HashMap<Integer, Instant> foodPressed = new HashMap<>();
|
||||
private CycleCounter counter;
|
||||
private Actor lastInteracted;
|
||||
@@ -141,7 +157,6 @@ public class BAToolsPlugin extends Plugin implements KeyListener
|
||||
wave_start = Instant.now();
|
||||
lastInteracted = null;
|
||||
foodPressed.clear();
|
||||
client.setInventoryDragDelay(config.antiDragDelay());
|
||||
keyManager.registerKeyListener(this);
|
||||
}
|
||||
|
||||
@@ -153,7 +168,6 @@ public class BAToolsPlugin extends Plugin implements KeyListener
|
||||
inGameBit = 0;
|
||||
lastInteracted = null;
|
||||
overlayManager.remove(overlay);
|
||||
client.setInventoryDragDelay(5);
|
||||
keyManager.unregisterKeyListener(this);
|
||||
shiftDown = false;
|
||||
}
|
||||
@@ -161,9 +175,9 @@ public class BAToolsPlugin extends Plugin implements KeyListener
|
||||
@Subscribe
|
||||
public void onWidgetLoaded(WidgetLoaded event)
|
||||
{
|
||||
if (event.getGroupId() == WidgetID.BA_REWARD_GROUP_ID)
|
||||
if (event.getGroupId() == BA_REWARD_GROUP_ID)
|
||||
{
|
||||
Widget rewardWidget = client.getWidget(WidgetInfo.BA_REWARD_TEXT);
|
||||
Widget rewardWidget = client.getWidget(BA_REWARD_TEXT);
|
||||
if (rewardWidget != null && rewardWidget.getText().contains("<br>5"))
|
||||
{
|
||||
tickNum = 0;
|
||||
@@ -174,11 +188,6 @@ public class BAToolsPlugin extends Plugin implements KeyListener
|
||||
@Subscribe
|
||||
public void onGameTick(GameTick event)
|
||||
{
|
||||
if (config.antiDrag())
|
||||
{
|
||||
client.setInventoryDragDelay(config.antiDragDelay());
|
||||
}
|
||||
|
||||
Widget callWidget = getWidget();
|
||||
|
||||
if (callWidget != null)
|
||||
@@ -189,21 +198,20 @@ public class BAToolsPlugin extends Plugin implements KeyListener
|
||||
}
|
||||
pastCall = callWidget.getTextColor();
|
||||
}
|
||||
if (inGameBit == 1)
|
||||
if (inGameBit == 1 && config.defTimer())
|
||||
{
|
||||
if (tickNum > 9)
|
||||
{
|
||||
tickNum = 0;
|
||||
}
|
||||
|
||||
if (counter == null)
|
||||
{
|
||||
addCounter();
|
||||
}
|
||||
counter.setCount(tickNum);
|
||||
if (config.defTimer())
|
||||
{
|
||||
tickNum++;
|
||||
}
|
||||
|
||||
tickNum++;
|
||||
}
|
||||
|
||||
Widget weapon = client.getWidget(593, 1);
|
||||
@@ -212,61 +220,70 @@ public class BAToolsPlugin extends Plugin implements KeyListener
|
||||
&& weapon != null
|
||||
&& inGameBit == 1
|
||||
&& weapon.getText().contains("Crystal halberd") || weapon.getText().contains("Dragon claws")
|
||||
&& client.getWidget(WidgetInfo.BA_ATK_LISTEN_TEXT) != null)
|
||||
&& client.getWidget(BA_ATK_LISTEN_TEXT) != null)
|
||||
{
|
||||
String style = client.getWidget(WidgetInfo.BA_ATK_LISTEN_TEXT).getText();
|
||||
if (originalAttackStyles == null)
|
||||
{
|
||||
ImmutableMap.Builder<WidgetInfo, Boolean> builder = new ImmutableMap.Builder<>();
|
||||
|
||||
builder.put(COMBAT_STYLE_ONE, client.getWidget(COMBAT_STYLE_ONE).isHidden());
|
||||
builder.put(COMBAT_STYLE_TWO, client.getWidget(COMBAT_STYLE_TWO).isHidden());
|
||||
builder.put(COMBAT_STYLE_THREE, client.getWidget(COMBAT_STYLE_THREE).isHidden());
|
||||
builder.put(COMBAT_STYLE_FOUR, client.getWidget(COMBAT_STYLE_FOUR).isHidden());
|
||||
|
||||
originalAttackStyles = builder.build();
|
||||
}
|
||||
|
||||
String style = client.getWidget(BA_ATK_LISTEN_TEXT).getText();
|
||||
|
||||
if (style.contains("Defensive"))
|
||||
{
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_ONE).setHidden(true);
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_TWO).setHidden(true);
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_THREE).setHidden(true);
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_FOUR).setHidden(false);
|
||||
client.getWidget(COMBAT_STYLE_ONE).setHidden(true);
|
||||
client.getWidget(COMBAT_STYLE_TWO).setHidden(true);
|
||||
client.getWidget(COMBAT_STYLE_THREE).setHidden(true);
|
||||
client.getWidget(COMBAT_STYLE_FOUR).setHidden(false);
|
||||
}
|
||||
else if (style.contains("Aggressive"))
|
||||
{
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_ONE).setHidden(true);
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_TWO).setHidden(false);
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_THREE).setHidden(true);
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_FOUR).setHidden(true);
|
||||
client.getWidget(COMBAT_STYLE_ONE).setHidden(true);
|
||||
client.getWidget(COMBAT_STYLE_TWO).setHidden(false);
|
||||
client.getWidget(COMBAT_STYLE_THREE).setHidden(true);
|
||||
client.getWidget(COMBAT_STYLE_FOUR).setHidden(true);
|
||||
}
|
||||
else if (style.contains("Controlled"))
|
||||
{
|
||||
if (weapon.getText().contains("Crystal halberd"))
|
||||
{
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_ONE).setHidden(false);
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_THREE).setHidden(true);
|
||||
client.getWidget(COMBAT_STYLE_ONE).setHidden(false);
|
||||
client.getWidget(COMBAT_STYLE_THREE).setHidden(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_ONE).setHidden(true);
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_THREE).setHidden(false);
|
||||
client.getWidget(COMBAT_STYLE_ONE).setHidden(true);
|
||||
client.getWidget(COMBAT_STYLE_THREE).setHidden(false);
|
||||
}
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_TWO).setHidden(true);
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_FOUR).setHidden(true);
|
||||
client.getWidget(COMBAT_STYLE_TWO).setHidden(true);
|
||||
client.getWidget(COMBAT_STYLE_FOUR).setHidden(true);
|
||||
}
|
||||
else if (style.contains("Accurate") && weapon.getText().contains("Dragon claws"))
|
||||
{
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_ONE).setHidden(false);
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_TWO).setHidden(true);
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_THREE).setHidden(true);
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_FOUR).setHidden(true);
|
||||
client.getWidget(COMBAT_STYLE_ONE).setHidden(false);
|
||||
client.getWidget(COMBAT_STYLE_TWO).setHidden(true);
|
||||
client.getWidget(COMBAT_STYLE_THREE).setHidden(true);
|
||||
client.getWidget(COMBAT_STYLE_FOUR).setHidden(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_ONE).setHidden(false);
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_TWO).setHidden(false);
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_THREE).setHidden(false);
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_FOUR).setHidden(false);
|
||||
client.getWidget(COMBAT_STYLE_ONE).setHidden(false);
|
||||
client.getWidget(COMBAT_STYLE_TWO).setHidden(false);
|
||||
client.getWidget(COMBAT_STYLE_THREE).setHidden(false);
|
||||
client.getWidget(COMBAT_STYLE_FOUR).setHidden(false);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
else if (originalAttackStyles != null)
|
||||
{
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_ONE).setHidden(false);
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_TWO).setHidden(false);
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_THREE).setHidden(false);
|
||||
client.getWidget(WidgetInfo.COMBAT_STYLE_FOUR).setHidden(false);
|
||||
originalAttackStyles.forEach((w, b) -> client.getWidget(w).setHidden(b));
|
||||
}
|
||||
|
||||
if (config.prayerMetronome() && isAnyPrayerActive())
|
||||
@@ -280,21 +297,21 @@ public class BAToolsPlugin extends Plugin implements KeyListener
|
||||
|
||||
private Widget getWidget()
|
||||
{
|
||||
if (client.getWidget(WidgetInfo.BA_DEF_CALL_TEXT) != null)
|
||||
if (client.getWidget(BA_DEF_CALL_TEXT) != null)
|
||||
{
|
||||
return client.getWidget(WidgetInfo.BA_DEF_CALL_TEXT);
|
||||
return client.getWidget(BA_DEF_CALL_TEXT);
|
||||
}
|
||||
else if (client.getWidget(WidgetInfo.BA_ATK_CALL_TEXT) != null)
|
||||
else if (client.getWidget(BA_ATK_CALL_TEXT) != null)
|
||||
{
|
||||
return client.getWidget(WidgetInfo.BA_ATK_CALL_TEXT);
|
||||
return client.getWidget(BA_ATK_CALL_TEXT);
|
||||
}
|
||||
else if (client.getWidget(WidgetInfo.BA_COLL_CALL_TEXT) != null)
|
||||
else if (client.getWidget(BA_COLL_CALL_TEXT) != null)
|
||||
{
|
||||
return client.getWidget(WidgetInfo.BA_COLL_CALL_TEXT);
|
||||
return client.getWidget(BA_COLL_CALL_TEXT);
|
||||
}
|
||||
else if (client.getWidget(WidgetInfo.BA_HEAL_CALL_TEXT) != null)
|
||||
else if (client.getWidget(BA_HEAL_CALL_TEXT) != null)
|
||||
{
|
||||
return client.getWidget(WidgetInfo.BA_HEAL_CALL_TEXT);
|
||||
return client.getWidget(BA_HEAL_CALL_TEXT);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -306,7 +323,9 @@ public class BAToolsPlugin extends Plugin implements KeyListener
|
||||
|
||||
if (inGameBit != inGame)
|
||||
{
|
||||
if (inGameBit == 1)
|
||||
inGameBit = inGame;
|
||||
|
||||
if (inGameBit == 0)
|
||||
{
|
||||
pastCall = 0;
|
||||
removeCounter();
|
||||
@@ -317,8 +336,6 @@ public class BAToolsPlugin extends Plugin implements KeyListener
|
||||
addCounter();
|
||||
}
|
||||
}
|
||||
|
||||
inGameBit = inGame;
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
@@ -371,10 +388,7 @@ public class BAToolsPlugin extends Plugin implements KeyListener
|
||||
@Subscribe
|
||||
public void onNpcDespawned(NpcDespawned event)
|
||||
{
|
||||
if (healers.remove(event.getNpc()) != null && healers.isEmpty())
|
||||
{
|
||||
healers.clear();
|
||||
}
|
||||
healers.remove(event.getNpc());
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
@@ -440,33 +454,34 @@ public class BAToolsPlugin extends Plugin implements KeyListener
|
||||
|
||||
if (config.swapLadder() && option.equals("climb-down") && target.equals("ladder"))
|
||||
{
|
||||
swap(client, "quick-start", option, target, true);
|
||||
swap(client, "quick-start", option, target);
|
||||
}
|
||||
else if (config.removeBA() && client.getVar(Varbits.IN_GAME_BA) == 1 && !option.contains("tell-"))//if in barbarian assault and menu isnt from a horn
|
||||
{
|
||||
if (itemId == ItemID.LOGS && !target.contains("healing vial"))
|
||||
{
|
||||
if (client.getWidget(WidgetInfo.BA_DEF_ROLE_TEXT) == null)
|
||||
if (client.getWidget(BA_DEF_ROLE_TEXT) == null)
|
||||
{
|
||||
remove(new String[]{"take", "light"}, target, true);
|
||||
remove(new String[]{"take", "light"}, target);
|
||||
}
|
||||
else//remove "Light" option (and "Take" option if not defender).
|
||||
else //remove "Light" option (and "Take" option if not defender).
|
||||
{
|
||||
remove("light", target, true);
|
||||
remove("light", target);
|
||||
}
|
||||
}
|
||||
else if (option.equals("use"))
|
||||
{
|
||||
if (config.removeHealWrongFood())
|
||||
{
|
||||
Widget healer = client.getWidget(WidgetInfo.BA_HEAL_LISTEN_TEXT);
|
||||
Widget healer = client.getWidget(BA_HEAL_LISTEN_TEXT);
|
||||
if (healer != null)
|
||||
{
|
||||
String item = target.split("-")[0].trim();
|
||||
List<String> poison = Arrays.asList("poisoned tofu", "poisoned meat", "poisoned worms");
|
||||
List<String> vials = Arrays.asList("healing vial", "healing vial(1)", "healing vial(2)", "healing vial(3)", "healing vial(4)");//"healing vial(4)"
|
||||
if (poison.contains(item))
|
||||
{//if item is a poison item
|
||||
{
|
||||
//if item is a poison item
|
||||
int calledPoison = 0;
|
||||
switch (healer.getText())//choose which poison to hide the use/destroy option for
|
||||
{
|
||||
@@ -485,12 +500,12 @@ public class BAToolsPlugin extends Plugin implements KeyListener
|
||||
{
|
||||
if (calledPoison != 0 && itemId != calledPoison)//if no call or chosen item is not the called one
|
||||
{
|
||||
remove(new String[]{"use", "destroy", "examine"}, target, true);//remove options
|
||||
remove(new String[]{"use", "destroy", "examine"}, target);//remove options
|
||||
}
|
||||
}
|
||||
else if (!target.contains("penance healer"))
|
||||
{
|
||||
remove(option, target, true);
|
||||
remove(option, target);
|
||||
}
|
||||
}
|
||||
else if (vials.contains(item))//if item is the healer's healing vial
|
||||
@@ -501,28 +516,30 @@ public class BAToolsPlugin extends Plugin implements KeyListener
|
||||
|
||||
if (!target.contains("level") || target.contains("penance") || target.contains("queen spawn"))//if someone has "penance" or "queen spawn" in their name, gg...
|
||||
{
|
||||
remove(option, target, true);
|
||||
remove(option, target);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (option.equals("attack") && client.getWidget(WidgetInfo.BA_ATK_ROLE_TEXT) == null && !target.equals("queen spawn"))//if not attacker
|
||||
{//remove attack option from everything but queen spawns
|
||||
remove(option, target, true);
|
||||
}
|
||||
else if ((option.equals("fix") || (option.equals("block") && target.equals("penance cave"))) && client.getWidget(WidgetInfo.BA_DEF_ROLE_TEXT) == null)//if not defender
|
||||
{//the check for option requires checking target as well because defensive attack style option is also called "block".
|
||||
remove(option, target, true);
|
||||
}
|
||||
else if ((option.equals("load")) && client.getWidget(WidgetInfo.BA_COLL_ROLE_TEXT) == null)//if not collector, remove hopper options
|
||||
else if (option.equals("attack") && client.getWidget(BA_ATK_ROLE_TEXT) == null && !target.equals("queen spawn"))//if not attacker
|
||||
{
|
||||
remove(new String[]{option, "look-in"}, target, true);
|
||||
//remove attack option from everything but queen spawns
|
||||
remove(option, target);
|
||||
}
|
||||
else if ((option.equals("fix") || (option.equals("block") && target.equals("penance cave"))) && client.getWidget(BA_DEF_ROLE_TEXT) == null)//if not defender
|
||||
{
|
||||
//the check for option requires checking target as well because defensive attack style option is also called "block".
|
||||
remove(option, target);
|
||||
}
|
||||
else if ((option.equals("load")) && client.getWidget(BA_COLL_ROLE_TEXT) == null)//if not collector, remove hopper options
|
||||
{
|
||||
remove(new String[]{option, "look-in"}, target);
|
||||
}
|
||||
else if (config.removeWrongEggs() && option.equals("take"))
|
||||
{
|
||||
Widget eggToColl = client.getWidget(WidgetInfo.BA_COLL_LISTEN_TEXT);
|
||||
Widget eggToColl = client.getWidget(BA_COLL_LISTEN_TEXT);
|
||||
if (eggToColl != null)//if we're a collector
|
||||
{
|
||||
List<Integer> eggsToHide = new ArrayList<>();
|
||||
@@ -544,15 +561,15 @@ public class BAToolsPlugin extends Plugin implements KeyListener
|
||||
}
|
||||
if (eggsToHide.contains(itemId))
|
||||
{
|
||||
remove(option, target, true);//hide wrong eggs
|
||||
remove(option, target);//hide wrong eggs
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
List<Integer> defenderItems = Arrays.asList(ItemID.HAMMER, ItemID.TOFU, ItemID.CRACKERS, ItemID.WORMS);//logs are handled separately due to hiding "light" option too.
|
||||
if (client.getWidget(WidgetInfo.BA_DEF_ROLE_TEXT) == null || !defenderItems.contains(itemId))//if not defender, or item is not a defenderItem
|
||||
if (client.getWidget(BA_DEF_ROLE_TEXT) == null || !defenderItems.contains(itemId))//if not defender, or item is not a defenderItem
|
||||
{
|
||||
remove(option, target, true);//hide everything except hammer/logs and bait if Defender
|
||||
remove(option, target);//hide everything except hammer/logs and bait if Defender
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -583,9 +600,9 @@ public class BAToolsPlugin extends Plugin implements KeyListener
|
||||
client.setMenuEntries(menuEntries);
|
||||
}
|
||||
|
||||
if (client.getWidget(WidgetInfo.BA_COLL_LISTEN_TEXT) != null && inGameBit == 1 && config.eggBoi() && event.getTarget().endsWith("egg") && shiftDown)
|
||||
if (client.getWidget(BA_COLL_LISTEN_TEXT) != null && inGameBit == 1 && config.eggBoi() && event.getTarget().endsWith("egg") && shiftDown)
|
||||
{
|
||||
String[] currentCall = client.getWidget(WidgetInfo.BA_COLL_LISTEN_TEXT).getText().split(" ");
|
||||
String[] currentCall = client.getWidget(BA_COLL_LISTEN_TEXT).getText().split(" ");
|
||||
|
||||
MenuEntry[] menuEntries = client.getMenuEntries();
|
||||
MenuEntry correctEgg = null;
|
||||
@@ -609,9 +626,9 @@ public class BAToolsPlugin extends Plugin implements KeyListener
|
||||
client.setMenuEntries(entries.toArray(new MenuEntry[0]));
|
||||
}
|
||||
|
||||
if (client.getWidget(WidgetInfo.BA_HEAL_LISTEN_TEXT) != null && inGameBit == 1 && config.osHelp() && event.getTarget().equals("<col=ffff>Healer item machine") && shiftDown)
|
||||
if (client.getWidget(BA_HEAL_LISTEN_TEXT) != null && inGameBit == 1 && config.osHelp() && event.getTarget().equals("<col=ffff>Healer item machine") && shiftDown)
|
||||
{
|
||||
String[] currentCall = client.getWidget(WidgetInfo.BA_HEAL_LISTEN_TEXT).getText().split(" ");
|
||||
String[] currentCall = client.getWidget(BA_HEAL_LISTEN_TEXT).getText().split(" ");
|
||||
|
||||
if (!currentCall[0].contains("Pois."))
|
||||
{
|
||||
@@ -632,7 +649,7 @@ public class BAToolsPlugin extends Plugin implements KeyListener
|
||||
if (correctEgg != null)
|
||||
{
|
||||
entries.add(correctEgg);
|
||||
client.setMenuEntries(entries.toArray(new MenuEntry[entries.size()]));
|
||||
client.setMenuEntries(entries.toArray(new MenuEntry[0]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -641,12 +658,12 @@ public class BAToolsPlugin extends Plugin implements KeyListener
|
||||
@Subscribe
|
||||
public void onMenuOptionClicked(MenuOptionClicked event)
|
||||
{
|
||||
if (!config.healerMenuOption() || !event.getMenuTarget().contains("Penance Healer") || client.getWidget(WidgetInfo.BA_HEAL_CALL_TEXT) == null)
|
||||
if (!config.healerMenuOption() || !event.getMenuTarget().contains("Penance Healer") || client.getWidget(BA_HEAL_CALL_TEXT) == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
String currentCall = client.getWidget(WidgetInfo.BA_HEAL_CALL_TEXT).getText();
|
||||
String currentCall = client.getWidget(BA_HEAL_CALL_TEXT).getText();
|
||||
String target = event.getMenuTarget();
|
||||
|
||||
if ((currentCall.equals("Pois. Worms") && (target.contains("Poisoned worms") && target.contains("->") && target.contains("Penance Healer")))
|
||||
@@ -662,12 +679,11 @@ public class BAToolsPlugin extends Plugin implements KeyListener
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onConfigChanged(ConfigChanged event)
|
||||
{
|
||||
if (config.antiDrag())
|
||||
if (counter != null && !config.defTimer())
|
||||
{
|
||||
client.setInventoryDragDelay(config.antiDragDelay());
|
||||
removeCounter();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -697,10 +713,10 @@ public class BAToolsPlugin extends Plugin implements KeyListener
|
||||
counter = null;
|
||||
}
|
||||
|
||||
private void remove(String option, String target, boolean strict)
|
||||
private void remove(String option, String target)
|
||||
{
|
||||
MenuEntry[] entries = client.getMenuEntries();
|
||||
int idx = searchIndex(entries, option, target, strict);
|
||||
int idx = searchIndex(entries, option, target);
|
||||
if (idx >= 0 && entries[idx] != null)
|
||||
{
|
||||
entries = ArrayUtils.removeElement(entries, entries[idx]);
|
||||
@@ -708,12 +724,12 @@ public class BAToolsPlugin extends Plugin implements KeyListener
|
||||
}
|
||||
}
|
||||
|
||||
private void remove(String[] options, String target, boolean strict)
|
||||
private void remove(String[] options, String target)
|
||||
{
|
||||
MenuEntry[] entries = client.getMenuEntries();
|
||||
for (String option : options)
|
||||
{
|
||||
int idx = searchIndex(entries, option, target, strict);
|
||||
int idx = searchIndex(entries, option, target);
|
||||
if (idx >= 0 && entries[idx] != null)
|
||||
{
|
||||
entries = ArrayUtils.removeElement(entries, entries[idx]);
|
||||
@@ -723,7 +739,7 @@ public class BAToolsPlugin extends Plugin implements KeyListener
|
||||
client.setMenuEntries(entries);
|
||||
}
|
||||
|
||||
private int searchIndex(MenuEntry[] entries, String option, String target, boolean strict)
|
||||
private int searchIndex(MenuEntry[] entries, String option, String target)
|
||||
{
|
||||
for (int i = entries.length - 1; i >= 0; i--)
|
||||
{
|
||||
@@ -731,19 +747,9 @@ public class BAToolsPlugin extends Plugin implements KeyListener
|
||||
String entryOption = Text.removeTags(entry.getOption()).toLowerCase();
|
||||
String entryTarget = Text.removeTags(entry.getTarget()).toLowerCase();
|
||||
|
||||
if (strict)
|
||||
if (entryOption.equals(option) && entryTarget.equals(target))
|
||||
{
|
||||
if (entryOption.equals(option) && entryTarget.equals(target))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (entryOption.contains(option.toLowerCase()) && entryTarget.equals(target))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
*/
|
||||
package net.runelite.client.plugins.batools;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum Calls
|
||||
{
|
||||
|
||||
@@ -24,11 +24,10 @@
|
||||
*/
|
||||
package net.runelite.client.plugins.batools;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import net.runelite.client.plugins.Plugin;
|
||||
import net.runelite.client.ui.overlay.infobox.Counter;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
|
||||
class CycleCounter extends Counter
|
||||
{
|
||||
CycleCounter(BufferedImage img, Plugin plugin, int tick)
|
||||
|
||||
@@ -27,9 +27,7 @@ package net.runelite.client.plugins.batools;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import net.runelite.api.NPC;
|
||||
import net.runelite.api.Actor;
|
||||
|
||||
|
||||
class Healer
|
||||
@@ -75,7 +73,7 @@ class Healer
|
||||
|
||||
private HealerCode getCode(int wave)
|
||||
{
|
||||
switch(wave)
|
||||
switch (wave)
|
||||
{
|
||||
case 1:
|
||||
return HealerCode.WAVEONE;
|
||||
@@ -97,7 +95,8 @@ class Healer
|
||||
return HealerCode.WAVENINE;
|
||||
case 10:
|
||||
return HealerCode.WAVETEN;
|
||||
default: return null;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,16 +30,16 @@ import lombok.Getter;
|
||||
enum HealerCode
|
||||
{
|
||||
|
||||
WAVEONE(new int[] {1,1}, new int[] {0,0}, new int[] {0,0}),
|
||||
WAVETWO(new int[] {1,1,2}, new int[] {0,0,0}, new int[] {0,0,21}),
|
||||
WAVETHREE(new int[] {1,6,2}, new int[] {0,0,0}, new int[] {0,0,0}),
|
||||
WAVEFOUR(new int[] {2,5,2,0}, new int[] {0,0,7,10}, new int[] {0,0,0,0}),
|
||||
WAVEFIVE(new int[] {2,5,2,3,0}, new int[] {0,0,0,0,7}, new int[] {0,0,21,30,0}),
|
||||
WAVESIX(new int[] {3,5,2,2,0,0}, new int[] {0,0,0,2,9,10}, new int[] {12,18,21,0,0,0}),
|
||||
WAVESEVEN(new int[] {3,7,1,1,0,0,0}, new int[] {2,0,1,1,2,4,10}, new int[] {0,21,0,0,30,45,0}),
|
||||
WAVEEIGHT(new int[] {1,9,1,1,0,0,0}, new int[] {1,0,1,1,2,2,10}, new int[] {0,0,0,0,33,42,0}),
|
||||
WAVENINE(new int[] {2,8,1,1,0,0,0,0}, new int[] {1,0,1,1,2,1,1,10}, new int[] {0,21,0,0,0,0,0,0,0}),
|
||||
WAVETEN(new int[] {2,5,1,1,0,0,0}, new int[] {1,0,1,1,4,4,8}, new int[] {21,33,0,33,30,45,0});
|
||||
WAVEONE(new int[]{1, 1}, new int[]{0, 0}, new int[]{0, 0}),
|
||||
WAVETWO(new int[]{1, 1, 2}, new int[]{0, 0, 0}, new int[]{0, 0, 21}),
|
||||
WAVETHREE(new int[]{1, 6, 2}, new int[]{0, 0, 0}, new int[]{0, 0, 0}),
|
||||
WAVEFOUR(new int[]{2, 5, 2, 0}, new int[]{0, 0, 7, 10}, new int[]{0, 0, 0, 0}),
|
||||
WAVEFIVE(new int[]{2, 5, 2, 3, 0}, new int[]{0, 0, 0, 0, 7}, new int[]{0, 0, 21, 30, 0}),
|
||||
WAVESIX(new int[]{3, 5, 2, 2, 0, 0}, new int[]{0, 0, 0, 2, 9, 10}, new int[]{12, 18, 21, 0, 0, 0}),
|
||||
WAVESEVEN(new int[]{3, 7, 1, 1, 0, 0, 0}, new int[]{2, 0, 1, 1, 2, 4, 10}, new int[]{0, 21, 0, 0, 30, 45, 0}),
|
||||
WAVEEIGHT(new int[]{1, 9, 1, 1, 0, 0, 0}, new int[]{1, 0, 1, 1, 2, 2, 10}, new int[]{0, 0, 0, 0, 33, 42, 0}),
|
||||
WAVENINE(new int[]{2, 8, 1, 1, 0, 0, 0, 0}, new int[]{1, 0, 1, 1, 2, 1, 1, 10}, new int[]{0, 21, 0, 0, 0, 0, 0, 0, 0}),
|
||||
WAVETEN(new int[]{2, 5, 1, 1, 0, 0, 0}, new int[]{1, 0, 1, 1, 4, 4, 8}, new int[]{21, 33, 0, 33, 30, 45, 0});
|
||||
|
||||
|
||||
@Getter
|
||||
|
||||
@@ -27,107 +27,139 @@ package net.runelite.client.plugins.blackjack;
|
||||
import com.google.inject.Binder;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.ChatMessageType;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.MenuEntry;
|
||||
import net.runelite.api.Quest;
|
||||
import net.runelite.api.QuestState;
|
||||
import static net.runelite.api.Varbits.QUEST_THE_FEUD;
|
||||
import net.runelite.api.events.ChatMessage;
|
||||
import net.runelite.api.events.GameTick;
|
||||
import net.runelite.api.events.MenuEntryAdded;
|
||||
import net.runelite.api.events.VarbitChanged;
|
||||
import net.runelite.client.eventbus.Subscribe;
|
||||
import net.runelite.client.menus.MenuManager;
|
||||
import net.runelite.client.plugins.Plugin;
|
||||
import net.runelite.client.plugins.PluginDescriptor;
|
||||
import net.runelite.client.plugins.PluginType;
|
||||
import static net.runelite.client.util.MenuUtil.swap;
|
||||
|
||||
/**
|
||||
* Authors gazivodag longstreet
|
||||
*/
|
||||
@PluginDescriptor(
|
||||
name = "Blackjack",
|
||||
description = "Uses chat messages and tick timers instead of animations to read",
|
||||
tags = {"blackjack", "thieving"},
|
||||
type = PluginType.UTILITY
|
||||
name = "Blackjack",
|
||||
description = "Uses chat messages and tick timers instead of animations to read",
|
||||
tags = {"blackjack", "thieving"},
|
||||
type = PluginType.UTILITY
|
||||
)
|
||||
@Singleton
|
||||
@Slf4j
|
||||
public class BlackjackPlugin extends Plugin {
|
||||
public class BlackjackPlugin extends Plugin
|
||||
{
|
||||
private static final String PICKPOCKET = "Pickpocket";
|
||||
private static final String KNOCK_OUT = "Knock-out";
|
||||
private static final String LURE = "Lure";
|
||||
private static final String BANDIT = "Bandit";
|
||||
private static final String MENAPHITE = "Menaphite Thug";
|
||||
|
||||
@Inject
|
||||
Client client;
|
||||
@Inject
|
||||
private Client client;
|
||||
|
||||
private static long timeSinceKnockout;
|
||||
private static long timeSinceAggro;
|
||||
@Inject
|
||||
private MenuManager menuManager;
|
||||
|
||||
@Getter
|
||||
private static long currentGameTick;
|
||||
private int lastKnockout;
|
||||
private boolean pickpocketing;
|
||||
private boolean ableToBlackJack;
|
||||
|
||||
@Override
|
||||
public void configure(Binder binder) {
|
||||
}
|
||||
@Override
|
||||
public void configure(Binder binder)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void startUp() throws Exception {
|
||||
currentGameTick = 0;
|
||||
}
|
||||
@Override
|
||||
protected void startUp() throws Exception
|
||||
{
|
||||
menuManager.addPriorityEntry(LURE, BANDIT);
|
||||
menuManager.addPriorityEntry(LURE, MENAPHITE);
|
||||
|
||||
@Override
|
||||
protected void shutDown() throws Exception {
|
||||
currentGameTick = 0;
|
||||
}
|
||||
menuManager.addPriorityEntry(KNOCK_OUT, BANDIT);
|
||||
menuManager.addPriorityEntry(KNOCK_OUT, MENAPHITE);
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onGameTick(GameTick gameTick) {
|
||||
currentGameTick++;
|
||||
}
|
||||
@Override
|
||||
protected void shutDown() throws Exception
|
||||
{
|
||||
menuManager.removePriorityEntry(LURE, BANDIT);
|
||||
menuManager.removePriorityEntry(LURE, MENAPHITE);
|
||||
|
||||
menuManager.removePriorityEntry(PICKPOCKET, BANDIT);
|
||||
menuManager.removePriorityEntry(PICKPOCKET, MENAPHITE);
|
||||
|
||||
@Subscribe
|
||||
public void onChatMessage(ChatMessage chatMessage) {
|
||||
if (chatMessage.getType() == ChatMessageType.SPAM) {
|
||||
if (chatMessage.getMessage().equals("You smack the bandit over the head and render them unconscious.")) {
|
||||
timeSinceKnockout = getCurrentGameTick();
|
||||
}
|
||||
if (chatMessage.getMessage().equals("Your blow only glances off the bandit's head.")) {
|
||||
timeSinceAggro = getCurrentGameTick();
|
||||
}
|
||||
}
|
||||
}
|
||||
menuManager.removePriorityEntry(KNOCK_OUT, BANDIT);
|
||||
menuManager.removePriorityEntry(KNOCK_OUT, MENAPHITE);
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onMenuEntryAdded(MenuEntryAdded menuEntryAdded) {
|
||||
String target = menuEntryAdded.getTarget().toLowerCase();
|
||||
if ((target.contains("bandit") | target.contains("menaphite thug"))) {
|
||||
Quest quest = Quest.THE_FEUD;
|
||||
if (quest.getState(client) == QuestState.FINISHED) {
|
||||
if (currentGameTick < (timeSinceKnockout + 4)) {
|
||||
stripSpecificEntries("pickpocket");
|
||||
}
|
||||
if (currentGameTick < (timeSinceAggro + 4)) {
|
||||
stripSpecificEntries("pickpocket");
|
||||
}
|
||||
stripSpecificEntries("knock-out");
|
||||
}
|
||||
}
|
||||
}
|
||||
@Subscribe
|
||||
public void onGameTick(GameTick gameTick)
|
||||
{
|
||||
if (ableToBlackJack && pickpocketing && client.getTickCount() >= lastKnockout + 4)
|
||||
{
|
||||
pickpocketing = false;
|
||||
|
||||
private void stripSpecificEntries(String exceptFor) {
|
||||
MenuEntry[] currentEntires = client.getMenuEntries();
|
||||
MenuEntry[] newEntries = new MenuEntry[2];
|
||||
menuManager.removePriorityEntry(PICKPOCKET, BANDIT);
|
||||
menuManager.removePriorityEntry(PICKPOCKET, MENAPHITE);
|
||||
|
||||
for (MenuEntry currentEntry : currentEntires) {
|
||||
if (currentEntry.getOption().toLowerCase().equals(exceptFor.toLowerCase())) {
|
||||
newEntries[1] = currentEntry;
|
||||
}
|
||||
if (currentEntry.getOption().toLowerCase().equals("lure")) {
|
||||
newEntries[0] = currentEntry;
|
||||
}
|
||||
}
|
||||
menuManager.addPriorityEntry(KNOCK_OUT, BANDIT);
|
||||
menuManager.addPriorityEntry(KNOCK_OUT, MENAPHITE);
|
||||
}
|
||||
}
|
||||
|
||||
if (newEntries[0] != null && newEntries[1] != null) {
|
||||
client.setMenuEntries(newEntries);
|
||||
}
|
||||
}
|
||||
@Subscribe
|
||||
public void onMenuEntryAdded(MenuEntryAdded event)
|
||||
{
|
||||
// Lure has higher priority than knock-out
|
||||
if (event.getTarget().contains(MENAPHITE) || event.getTarget().contains(BANDIT)
|
||||
&& event.getOption().equals(LURE))
|
||||
{
|
||||
swap(client, KNOCK_OUT, LURE, event.getTarget(), false);
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onChatMessage(ChatMessage chatMessage)
|
||||
{
|
||||
if (chatMessage.getType() == ChatMessageType.SPAM)
|
||||
{
|
||||
if (chatMessage.getMessage().equals("You smack the bandit over the head and render them unconscious.")
|
||||
|| chatMessage.getMessage().equals("Your blow only glances off the bandit's head."))
|
||||
{
|
||||
menuManager.removePriorityEntry(KNOCK_OUT, BANDIT);
|
||||
menuManager.removePriorityEntry(KNOCK_OUT, MENAPHITE);
|
||||
|
||||
menuManager.addPriorityEntry(PICKPOCKET, BANDIT);
|
||||
menuManager.addPriorityEntry(PICKPOCKET, MENAPHITE);
|
||||
|
||||
lastKnockout = client.getTickCount();
|
||||
pickpocketing = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onVarbitChanged(VarbitChanged event)
|
||||
{
|
||||
ableToBlackJack = client.getVar(QUEST_THE_FEUD) >= 13;
|
||||
|
||||
if (!ableToBlackJack)
|
||||
{
|
||||
menuManager.removePriorityEntry(LURE, BANDIT);
|
||||
menuManager.removePriorityEntry(LURE, MENAPHITE);
|
||||
|
||||
menuManager.removePriorityEntry(KNOCK_OUT, BANDIT);
|
||||
menuManager.removePriorityEntry(KNOCK_OUT, MENAPHITE);
|
||||
|
||||
menuManager.removePriorityEntry(PICKPOCKET, BANDIT);
|
||||
menuManager.removePriorityEntry(PICKPOCKET, MENAPHITE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,6 @@ import net.runelite.api.widgets.Widget;
|
||||
import net.runelite.api.widgets.WidgetInfo;
|
||||
import net.runelite.client.game.ItemManager;
|
||||
import net.runelite.client.ui.overlay.Overlay;
|
||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
|
||||
import net.runelite.client.ui.overlay.OverlayMenuEntry;
|
||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||
|
||||
@@ -24,12 +24,11 @@
|
||||
*/
|
||||
package net.runelite.client.plugins.blastmine;
|
||||
|
||||
import java.awt.Color;
|
||||
import net.runelite.client.config.Config;
|
||||
import net.runelite.client.config.ConfigGroup;
|
||||
import net.runelite.client.config.ConfigItem;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
@ConfigGroup("blastmine")
|
||||
public interface BlastMinePluginConfig extends Config
|
||||
{
|
||||
|
||||
@@ -356,7 +356,7 @@ public class BoostsPlugin extends Plugin
|
||||
* section it will "activate" adding an additional 15 second section
|
||||
* to the boost timing. If again the preserve prayer is active for that
|
||||
* entire section a second 15 second section will be added.
|
||||
*
|
||||
* <p>
|
||||
* Preserve is only required to be on for the 4th and 5th sections of the boost timer
|
||||
* to gain full effect (seconds 45-75).
|
||||
*
|
||||
@@ -365,8 +365,8 @@ public class BoostsPlugin extends Plugin
|
||||
int getChangeDownTicks()
|
||||
{
|
||||
if (lastChangeDown == -1 ||
|
||||
config.displayNextBuffChange() == BoostsConfig.DisplayChangeMode.NEVER ||
|
||||
(config.displayNextBuffChange() == BoostsConfig.DisplayChangeMode.BOOSTED && !isChangedUp))
|
||||
config.displayNextBuffChange() == BoostsConfig.DisplayChangeMode.NEVER ||
|
||||
(config.displayNextBuffChange() == BoostsConfig.DisplayChangeMode.BOOSTED && !isChangedUp))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
@@ -393,8 +393,8 @@ public class BoostsPlugin extends Plugin
|
||||
int getChangeUpTicks()
|
||||
{
|
||||
if (lastChangeUp == -1 ||
|
||||
config.displayNextDebuffChange() == BoostsConfig.DisplayChangeMode.NEVER ||
|
||||
(config.displayNextDebuffChange() == BoostsConfig.DisplayChangeMode.BOOSTED && !isChangedDown))
|
||||
config.displayNextDebuffChange() == BoostsConfig.DisplayChangeMode.NEVER ||
|
||||
(config.displayNextDebuffChange() == BoostsConfig.DisplayChangeMode.BOOSTED && !isChangedDown))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
@@ -406,12 +406,13 @@ public class BoostsPlugin extends Plugin
|
||||
|
||||
/**
|
||||
* Converts tick-based time to accurate second time
|
||||
*
|
||||
* @param time tick-based time
|
||||
* @return second-based time
|
||||
*/
|
||||
int getChangeTime(final int time)
|
||||
{
|
||||
final long diff = System.currentTimeMillis() - lastTickMillis;
|
||||
return time != -1 ? (int)((time * Constants.GAME_TICK_LENGTH - diff) / 1000d) : time;
|
||||
return time != -1 ? (int) ((time * Constants.GAME_TICK_LENGTH - diff) / 1000d) : time;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ enum Boss
|
||||
bosses = builder.build();
|
||||
}
|
||||
|
||||
private Boss(int id, long period, ChronoUnit unit, int itemSpriteId)
|
||||
Boss(int id, long period, ChronoUnit unit, int itemSpriteId)
|
||||
{
|
||||
this.id = id;
|
||||
this.spawnTime = Duration.of(period, unit);
|
||||
|
||||
@@ -29,6 +29,7 @@ import net.runelite.client.config.Alpha;
|
||||
import net.runelite.client.config.Config;
|
||||
import net.runelite.client.config.ConfigGroup;
|
||||
import net.runelite.client.config.ConfigItem;
|
||||
import net.runelite.client.config.Range;
|
||||
|
||||
@ConfigGroup("cannon")
|
||||
public interface CannonConfig extends Config
|
||||
@@ -84,6 +85,9 @@ public interface CannonConfig extends Config
|
||||
return true;
|
||||
}
|
||||
|
||||
@Range(
|
||||
max = 29
|
||||
)
|
||||
@ConfigItem(
|
||||
keyName = "ammoAmount",
|
||||
name = "Ammo left",
|
||||
|
||||
@@ -104,6 +104,7 @@ class CannonOverlay extends Overlay
|
||||
|
||||
/**
|
||||
* Draw the double hit spots on a 6 by 6 grid around the cannon
|
||||
*
|
||||
* @param startTile The position of the cannon
|
||||
*/
|
||||
private void drawDoubleHitSpots(Graphics2D graphics, LocalPoint startTile, Color color)
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
package net.runelite.client.plugins.cannon;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.inject.Provides;
|
||||
import java.awt.Color;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
@@ -38,7 +39,6 @@ import net.runelite.api.ChatMessageType;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.GameObject;
|
||||
import net.runelite.api.InventoryID;
|
||||
import net.runelite.api.Item;
|
||||
import net.runelite.api.ItemID;
|
||||
import static net.runelite.api.ObjectID.CANNON_BASE;
|
||||
import net.runelite.api.Player;
|
||||
@@ -62,6 +62,7 @@ import net.runelite.client.plugins.PluginDescriptor;
|
||||
import net.runelite.client.task.Schedule;
|
||||
import net.runelite.client.ui.overlay.OverlayManager;
|
||||
import net.runelite.client.ui.overlay.infobox.InfoBoxManager;
|
||||
import net.runelite.client.util.ItemUtil;
|
||||
|
||||
@PluginDescriptor(
|
||||
name = "Cannon",
|
||||
@@ -72,6 +73,9 @@ public class CannonPlugin extends Plugin
|
||||
{
|
||||
private static final Pattern NUMBER_PATTERN = Pattern.compile("([0-9]+)");
|
||||
private static final int MAX_CBALLS = 30;
|
||||
private static final ImmutableSet<Integer> CANNON_PARTS = ImmutableSet.of(
|
||||
ItemID.CANNON_BASE, ItemID.CANNON_STAND, ItemID.CANNON_BARRELS, ItemID.CANNON_FURNACE
|
||||
);
|
||||
|
||||
private CannonCounter counter;
|
||||
private boolean skipProjectileCheckThisTick;
|
||||
@@ -157,46 +161,7 @@ public class CannonPlugin extends Plugin
|
||||
return;
|
||||
}
|
||||
|
||||
boolean hasBase = false;
|
||||
boolean hasStand = false;
|
||||
boolean hasBarrels = false;
|
||||
boolean hasFurnace = false;
|
||||
boolean hasAll = false;
|
||||
|
||||
if (!cannonPlaced)
|
||||
{
|
||||
for (Item item : event.getItemContainer().getItems())
|
||||
{
|
||||
if (item == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (item.getId())
|
||||
{
|
||||
case ItemID.CANNON_BASE:
|
||||
hasBase = true;
|
||||
break;
|
||||
case ItemID.CANNON_STAND:
|
||||
hasStand = true;
|
||||
break;
|
||||
case ItemID.CANNON_BARRELS:
|
||||
hasBarrels = true;
|
||||
break;
|
||||
case ItemID.CANNON_FURNACE:
|
||||
hasFurnace = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (hasBase && hasStand && hasBarrels && hasFurnace)
|
||||
{
|
||||
hasAll = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cannonSpotOverlay.setHidden(!hasAll);
|
||||
cannonSpotOverlay.setHidden(!ItemUtil.containsAllItemIds(event.getItemContainer().getItems(), CANNON_PARTS));
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
|
||||
@@ -60,6 +60,7 @@ public enum CerberusGhost
|
||||
|
||||
/**
|
||||
* Try to identify if NPC is ghost
|
||||
*
|
||||
* @param npc npc
|
||||
* @return optional ghost
|
||||
*/
|
||||
|
||||
@@ -63,13 +63,13 @@ public class CerberusOverlay extends Overlay
|
||||
|
||||
// Ghosts are already sorted
|
||||
plugin.getGhosts().stream()
|
||||
// Iterate only through the correct amount of ghosts
|
||||
.limit(CerberusGhost.values().length)
|
||||
.forEach(npc -> CerberusGhost
|
||||
.fromNPC(npc)
|
||||
.ifPresent(ghost -> panelComponent
|
||||
.getChildren()
|
||||
.add(new ImageComponent(iconManager.getSkillImage(ghost.getType())))));
|
||||
// Iterate only through the correct amount of ghosts
|
||||
.limit(CerberusGhost.values().length)
|
||||
.forEach(npc -> CerberusGhost
|
||||
.fromNPC(npc)
|
||||
.ifPresent(ghost -> panelComponent
|
||||
.getChildren()
|
||||
.add(new ImageComponent(iconManager.getSkillImage(ghost.getType())))));
|
||||
|
||||
|
||||
return panelComponent.render(graphics);
|
||||
|
||||
@@ -26,12 +26,12 @@ package net.runelite.client.plugins.chatboxperformance;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.widgets.WidgetType;
|
||||
import net.runelite.api.events.WidgetPositioned;
|
||||
import net.runelite.api.widgets.Widget;
|
||||
import net.runelite.api.widgets.WidgetInfo;
|
||||
import net.runelite.api.widgets.WidgetPositionMode;
|
||||
import net.runelite.api.widgets.WidgetSizeMode;
|
||||
import net.runelite.api.widgets.WidgetType;
|
||||
import net.runelite.client.eventbus.Subscribe;
|
||||
import net.runelite.client.plugins.Plugin;
|
||||
import net.runelite.client.plugins.PluginDescriptor;
|
||||
|
||||
@@ -653,7 +653,7 @@ public class ChatCommandsPlugin extends Plugin
|
||||
* response.
|
||||
*
|
||||
* @param chatMessage The chat message containing the command.
|
||||
* @param message The chat message
|
||||
* @param message The chat message
|
||||
*/
|
||||
private void itemPriceLookup(ChatMessage chatMessage, String message)
|
||||
{
|
||||
@@ -689,17 +689,17 @@ public class ChatCommandsPlugin extends Plugin
|
||||
int itemPrice = item.getPrice();
|
||||
|
||||
final ChatMessageBuilder builder = new ChatMessageBuilder();
|
||||
builder.append(ChatColorType.NORMAL);
|
||||
builder.append(ChatColorType.HIGHLIGHT);
|
||||
builder.append(item.getName());
|
||||
builder.append(ChatColorType.NORMAL);
|
||||
builder.append(": GE ");
|
||||
builder.append(ChatColorType.HIGHLIGHT);
|
||||
builder.append(StackFormatter.formatNumber(itemPrice));
|
||||
builder.append(ChatColorType.NORMAL);
|
||||
builder.append(": OSB ");
|
||||
builder.append(ChatColorType.HIGHLIGHT);
|
||||
builder.append(StackFormatter.formatNumber(osbresult.getOverall_average()));
|
||||
builder.append(ChatColorType.NORMAL);
|
||||
builder.append(ChatColorType.HIGHLIGHT);
|
||||
builder.append(item.getName());
|
||||
builder.append(ChatColorType.NORMAL);
|
||||
builder.append(": GE ");
|
||||
builder.append(ChatColorType.HIGHLIGHT);
|
||||
builder.append(StackFormatter.formatNumber(itemPrice));
|
||||
builder.append(ChatColorType.NORMAL);
|
||||
builder.append(": OSB ");
|
||||
builder.append(ChatColorType.HIGHLIGHT);
|
||||
builder.append(StackFormatter.formatNumber(osbresult.getOverall_average()));
|
||||
|
||||
ItemComposition itemComposition = itemManager.getItemComposition(itemId);
|
||||
if (itemComposition != null)
|
||||
@@ -726,7 +726,7 @@ public class ChatCommandsPlugin extends Plugin
|
||||
* response.
|
||||
*
|
||||
* @param chatMessage The chat message containing the command.
|
||||
* @param message The chat message
|
||||
* @param message The chat message
|
||||
*/
|
||||
private void playerSkillLookup(ChatMessage chatMessage, String message)
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user