+299
@@ -0,0 +1,299 @@
|
|||||||
|
{
|
||||||
|
"buildCommit": "2d0c2b8eb66a8088b41b29d42ec2a58ead460581",
|
||||||
|
"artifacts": [
|
||||||
|
{
|
||||||
|
"hash": "b12331da8683e5f107d294adeebb83ecf9124abc1db533554d2a8d3c62832d75",
|
||||||
|
"name": "asm-all-6.0_BETA.jar",
|
||||||
|
"path": "https://mvn.runelite.net/org/ow2/asm/asm-all/6.0_BETA/asm-all-6.0_BETA.jar",
|
||||||
|
"size": "265176"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "37abf0103ce5318bfda004fabc004c75ed0dc6d392a8459175692ab7eac97083",
|
||||||
|
"name": "naturalmouse-2.0.0.jar",
|
||||||
|
"path": "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/artifacts/naturalmouse-2.0.0.jar",
|
||||||
|
"size": "3168921"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "50d1e07f11827672249dee9ce8a23691fc59f663deed084bb7b52a4f778d5fbc",
|
||||||
|
"name": "jcl-core-2.9-SNAPSHOT.jar",
|
||||||
|
"path": "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/artifacts/jcl-core-2.9-SNAPSHOT.jar",
|
||||||
|
"size": "3168921"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "4c388a85fb538bbb8cb6e0fd93e0ba0666605123d77b976764818be6f090bbe5",
|
||||||
|
"name": "client-1.5.28-SNAPSHOT.jar",
|
||||||
|
"path": "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/client-1.5.28-SNAPSHOT.jar",
|
||||||
|
"size": "5871886"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "18c4a0095d5c1da6b817592e767bb23d29dd2f560ad74df75ff3961dbde25b79",
|
||||||
|
"name": "slf4j-api-1.7.25.jar",
|
||||||
|
"path": "https://mvn.runelite.net/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar",
|
||||||
|
"size": "41203"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "fb53f8539e7fcb8f093a56e138112056ec1dc809ebb020b59d8a36a5ebac37e0",
|
||||||
|
"name": "logback-classic-1.2.3.jar",
|
||||||
|
"path": "https://mvn.runelite.net/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar",
|
||||||
|
"size": "290339"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "5946d837fe6f960c02a53eda7a6926ecc3c758bbdd69aa453ee429f858217f22",
|
||||||
|
"name": "logback-core-1.2.3.jar",
|
||||||
|
"path": "https://mvn.runelite.net/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar",
|
||||||
|
"size": "471901"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "9f0c8d50fa4b79b6ff1502dbec8502179d6b9497cacbe17a13074001aed537ec",
|
||||||
|
"name": "jopt-simple-5.0.1.jar",
|
||||||
|
"path": "https://mvn.runelite.net/net/sf/jopt-simple/jopt-simple/5.0.1/jopt-simple-5.0.1.jar",
|
||||||
|
"size": "78826"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "5be9a7d05ba0ccd74708bc8018ae412255f85843c0b92302e9b9befa6ed52564",
|
||||||
|
"name": "guava-23.2-jre.jar",
|
||||||
|
"path": "https://mvn.runelite.net/com/google/guava/guava/23.2-jre/guava-23.2-jre.jar",
|
||||||
|
"size": "2649860"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "905721a0eea90a81534abb7ee6ef4ea2e5e645fa1def0a5cd88402df1b46c9ed",
|
||||||
|
"name": "jsr305-1.3.9.jar",
|
||||||
|
"path": "https://mvn.runelite.net/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar",
|
||||||
|
"size": "33015"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "cb4cfad870bf563a07199f3ebea5763f0dec440fcda0b318640b1feaa788656b",
|
||||||
|
"name": "error_prone_annotations-2.0.18.jar",
|
||||||
|
"path": "https://mvn.runelite.net/com/google/errorprone/error_prone_annotations/2.0.18/error_prone_annotations-2.0.18.jar",
|
||||||
|
"size": "12078"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "2994a7eb78f2710bd3d3bfb639b2c94e219cedac0d4d084d516e78c16dddecf6",
|
||||||
|
"name": "j2objc-annotations-1.1.jar",
|
||||||
|
"path": "https://mvn.runelite.net/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar",
|
||||||
|
"size": "8782"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "2068320bd6bad744c3673ab048f67e30bef8f518996fa380033556600669905d",
|
||||||
|
"name": "animal-sniffer-annotations-1.14.jar",
|
||||||
|
"path": "https://mvn.runelite.net/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar",
|
||||||
|
"size": "3482"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "9264c6931c431e928dc64adc842584d5f57d17b2f3aff29221f2b3fdea673dad",
|
||||||
|
"name": "guice-4.1.0-no_aop.jar",
|
||||||
|
"path": "https://mvn.runelite.net/com/google/inject/guice/4.1.0/guice-4.1.0-no_aop.jar",
|
||||||
|
"size": "428603"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "91c77044a50c481636c32d916fd89c9118a72195390452c81065080f957de7ff",
|
||||||
|
"name": "javax.inject-1.jar",
|
||||||
|
"path": "https://mvn.runelite.net/javax/inject/javax.inject/1/javax.inject-1.jar",
|
||||||
|
"size": "2497"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "0addec670fedcd3f113c5c8091d783280d23f75e3acb841b61a9cdb079376a08",
|
||||||
|
"name": "aopalliance-1.0.jar",
|
||||||
|
"path": "https://mvn.runelite.net/aopalliance/aopalliance/1.0/aopalliance-1.0.jar",
|
||||||
|
"size": "4467"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "233a0149fc365c9f6edbd683cfe266b19bdc773be98eabdaf6b3c924b48e7d81",
|
||||||
|
"name": "gson-2.8.5.jar",
|
||||||
|
"path": "https://mvn.runelite.net/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar",
|
||||||
|
"size": "241622"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "0467d25f408428824d5c9c09ec60ee1f0bc341d9bf48971a77fd14939a826c83",
|
||||||
|
"name": "substance-8.0.02.jar",
|
||||||
|
"path": "https://repo.runelite.net/net/runelite/pushingpixels/substance/8.0.02/substance-8.0.02.jar",
|
||||||
|
"size": "1589195"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "3214e1c23d549d5d67c91da4da1ef33c5248470bb824f91cbe8f9e0beea59eef",
|
||||||
|
"name": "trident-1.5.00.jar",
|
||||||
|
"path": "https://repo.runelite.net/net/runelite/pushingpixels/trident/1.5.00/trident-1.5.00.jar",
|
||||||
|
"size": "79726"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "d4a57bbc1627da7c391308fd0fe910b83170fb66afd117236a5b111d2db1590b",
|
||||||
|
"name": "commons-text-1.2.jar",
|
||||||
|
"path": "https://mvn.runelite.net/org/apache/commons/commons-text/1.2/commons-text-1.2.jar",
|
||||||
|
"size": "136544"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "6e8dc31e046508d9953c96534edf0c2e0bfe6f468966b5b842b3f87e43b6a847",
|
||||||
|
"name": "commons-lang3-3.7.jar",
|
||||||
|
"path": "https://mvn.runelite.net/org/apache/commons/commons-lang3/3.7/commons-lang3-3.7.jar",
|
||||||
|
"size": "499634"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "e74603dc77b4183f108480279dbbf7fed3ac206069478636406c1fb45e83b31a",
|
||||||
|
"name": "jogl-all-2.3.2.jar",
|
||||||
|
"path": "https://mvn.runelite.net/org/jogamp/jogl/jogl-all/2.3.2/jogl-all-2.3.2.jar",
|
||||||
|
"size": "3414448"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "8c53b1884cef19309d34fd10a94b010136d9d6de9a88c386f46006fb47acab5d",
|
||||||
|
"name": "jogl-all-2.3.2-natives-windows-amd64.jar",
|
||||||
|
"path": "https://mvn.runelite.net/org/jogamp/jogl/jogl-all/2.3.2/jogl-all-2.3.2-natives-windows-amd64.jar",
|
||||||
|
"size": "240721"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "507a0e6bd1ee4e81c3dfb287783af93775864eec742988d4162f98ce0cbac9d6",
|
||||||
|
"name": "jogl-all-2.3.2-natives-windows-i586.jar",
|
||||||
|
"path": "https://mvn.runelite.net/org/jogamp/jogl/jogl-all/2.3.2/jogl-all-2.3.2-natives-windows-i586.jar",
|
||||||
|
"size": "209445"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "82637302ae9effdf7d6f302e1050ad6aee3b13019914ddda5b502b9faa980216",
|
||||||
|
"name": "jogl-all-2.3.2-natives-linux-amd64.jar",
|
||||||
|
"path": "https://mvn.runelite.net/org/jogamp/jogl/jogl-all/2.3.2/jogl-all-2.3.2-natives-linux-amd64.jar",
|
||||||
|
"size": "224010"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "f474ef2ef01be24ec811d3858b0f4bc5659076975f4a58ddd79abd787e9305c7",
|
||||||
|
"name": "jogl-all-2.3.2-natives-linux-i586.jar",
|
||||||
|
"path": "https://mvn.runelite.net/org/jogamp/jogl/jogl-all/2.3.2/jogl-all-2.3.2-natives-linux-i586.jar",
|
||||||
|
"size": "217274"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "084844543b18f7ff71b4c0437852bd22f0cb68d7e44c2c611c1bbea76f8c6fdf",
|
||||||
|
"name": "gluegen-rt-2.3.2.jar",
|
||||||
|
"path": "https://mvn.runelite.net/org/jogamp/gluegen/gluegen-rt/2.3.2/gluegen-rt-2.3.2.jar",
|
||||||
|
"size": "345605"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "3474017422eff384db466bdb56c96c61220c43133a9da6329cf1781bea16c6b6",
|
||||||
|
"name": "gluegen-rt-2.3.2-natives-windows-amd64.jar",
|
||||||
|
"path": "https://mvn.runelite.net/org/jogamp/gluegen/gluegen-rt/2.3.2/gluegen-rt-2.3.2-natives-windows-amd64.jar",
|
||||||
|
"size": "8159"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "4eeed9fc2ebea5b9dc48a342b9478d127e989a2e1aa7129b512a98ec75cde338",
|
||||||
|
"name": "gluegen-rt-2.3.2-natives-windows-i586.jar",
|
||||||
|
"path": "https://mvn.runelite.net/org/jogamp/gluegen/gluegen-rt/2.3.2/gluegen-rt-2.3.2-natives-windows-i586.jar",
|
||||||
|
"size": "7577"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "f2dfd1800202059cf7e0294db5d57755147304e6eb220a9277526dbe6842bde2",
|
||||||
|
"name": "gluegen-rt-2.3.2-natives-linux-amd64.jar",
|
||||||
|
"path": "https://mvn.runelite.net/org/jogamp/gluegen/gluegen-rt/2.3.2/gluegen-rt-2.3.2-natives-linux-amd64.jar",
|
||||||
|
"size": "4149"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "1365d463f98c0abec92f3ad6b35aa4b53a9599a517800cf99fdabea6712ca7ec",
|
||||||
|
"name": "gluegen-rt-2.3.2-natives-linux-i586.jar",
|
||||||
|
"path": "https://mvn.runelite.net/org/jogamp/gluegen/gluegen-rt/2.3.2/gluegen-rt-2.3.2-natives-linux-i586.jar",
|
||||||
|
"size": "4130"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "7b7ae00e2aa98c3b2b5ac76e793e2c9b752bf51c86c54654dbd473843a25f1aa",
|
||||||
|
"name": "jbsdiff-1.0.jar",
|
||||||
|
"path": "https://mvn.runelite.net/io/sigpipe/jbsdiff/1.0/jbsdiff-1.0.jar",
|
||||||
|
"size": "24589"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "55bbfe26cee9296fd5b7c0d47ce6a00ea4dd572e235b63e9bb4eaf6f802315e4",
|
||||||
|
"name": "commons-compress-1.5.jar",
|
||||||
|
"path": "https://mvn.runelite.net/org/apache/commons/commons-compress/1.5/commons-compress-1.5.jar",
|
||||||
|
"size": "256241"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "fbc9de96a0cc193a125b4008dbc348e9ed54e5e13fc67b8ed40e645d303cc51b",
|
||||||
|
"name": "jna-4.5.1.jar",
|
||||||
|
"path": "https://mvn.runelite.net/net/java/dev/jna/jna/4.5.1/jna-4.5.1.jar",
|
||||||
|
"size": "1440662"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "84c8667555ee8dd91fef44b451419f6f16f71f727d5fc475a10c2663eba83abb",
|
||||||
|
"name": "jna-platform-4.5.1.jar",
|
||||||
|
"path": "https://mvn.runelite.net/net/java/dev/jna/jna-platform/4.5.1/jna-platform-4.5.1.jar",
|
||||||
|
"size": "2327547"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "440c629bec3905eb21dc5965fa38464f160a4cb8f87ca76806cdecc18b2c5992",
|
||||||
|
"name": "runelite-api-1.5.28-SNAPSHOT.jar",
|
||||||
|
"path": "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/runelite-api-1.5.28-SNAPSHOT.jar",
|
||||||
|
"size": "1019717"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "45e3bcec9e7bae4ca2facd0fbee1f3da5e0700584e8419deed784a95255552c1",
|
||||||
|
"name": "runescape-api-1.5.28-SNAPSHOT.jar",
|
||||||
|
"path": "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/runescape-api-1.5.28-SNAPSHOT.jar",
|
||||||
|
"size": "56079"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "811aadce9ce35ac638712da86123d4cb99570a9550614931471295cb26f91c36",
|
||||||
|
"name": "http-api-1.5.28-SNAPSHOT.jar",
|
||||||
|
"path": "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/http-api-1.5.28-SNAPSHOT.jar",
|
||||||
|
"size": "101785"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "f55abda036da75e1af45bd43b9dfa79b2a3d90905be9cb38687c6621597a8165",
|
||||||
|
"name": "okhttp-3.7.0.jar",
|
||||||
|
"path": "https://mvn.runelite.net/com/squareup/okhttp3/okhttp/3.7.0/okhttp-3.7.0.jar",
|
||||||
|
"size": "394987"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "bfe7dfe483c37137966a1690f0c7d0b448ba217902c1fed202aaffdbba3291ae",
|
||||||
|
"name": "okio-1.12.0.jar",
|
||||||
|
"path": "https://mvn.runelite.net/com/squareup/okio/okio/1.12.0/okio-1.12.0.jar",
|
||||||
|
"size": "81088"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "9d4924588d6280c7516db3a4b7298306db5b6f0d1cdf568ce738309b5660f008",
|
||||||
|
"name": "commons-csv-1.4.jar",
|
||||||
|
"path": "https://mvn.runelite.net/org/apache/commons/commons-csv/1.4/commons-csv-1.4.jar",
|
||||||
|
"size": "39978"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "7e26a8d043418f2f22d5f6a3083a9a131817009ee8cd72c004e83b50d1849a7c",
|
||||||
|
"name": "discord-1.1.jar",
|
||||||
|
"path": "https://repo.runelite.net/net/runelite/discord/1.1/discord-1.1.jar",
|
||||||
|
"size": "617294"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hash": "a3cab9293960d1d61968ce1591c87859ddcaa6cb2faca554cc938961c8fb3d3a",
|
||||||
|
"name": "injected-client-1.5.28-SNAPSHOT.jar",
|
||||||
|
"path": "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/injected-client-1.5.28-SNAPSHOT.jar",
|
||||||
|
"size": "2193046"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"client": {
|
||||||
|
"artifactId": "client",
|
||||||
|
"classifier": "",
|
||||||
|
"extension": "jar",
|
||||||
|
"groupId": "net.runelite",
|
||||||
|
"properties": "",
|
||||||
|
"version": "1.5.28"
|
||||||
|
},
|
||||||
|
"clientJvm9Arguments": [
|
||||||
|
"-XX:+DisableAttachMechanism",
|
||||||
|
"-Xmx512m",
|
||||||
|
"-Xss2m",
|
||||||
|
"-XX:CompileThreshold=1500",
|
||||||
|
"-Djna.nosys=true"
|
||||||
|
],
|
||||||
|
"clientJvmArguments": [
|
||||||
|
"-XX:+DisableAttachMechanism",
|
||||||
|
"-Xmx512m",
|
||||||
|
"-Xss2m",
|
||||||
|
"-XX:CompileThreshold=1500",
|
||||||
|
"-Xincgc",
|
||||||
|
"-XX:+UseConcMarkSweepGC",
|
||||||
|
"-XX:+UseParNewGC",
|
||||||
|
"-Djna.nosys=true"
|
||||||
|
],
|
||||||
|
"launcherArguments": [
|
||||||
|
"-XX:+DisableAttachMechanism",
|
||||||
|
"-Drunelite.launcher.nojvm=true",
|
||||||
|
"-Xmx512m",
|
||||||
|
"-Xss2m",
|
||||||
|
"-XX:CompileThreshold=1500",
|
||||||
|
"-Xincgc",
|
||||||
|
"-XX:+UseConcMarkSweepGC",
|
||||||
|
"-XX:+UseParNewGC",
|
||||||
|
"-Djna.nosys=true"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.27-SNAPSHOT</version>
|
<version>1.5.28-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>cache-client</artifactId>
|
<artifactId>cache-client</artifactId>
|
||||||
@@ -50,10 +50,14 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
|
<version>4.12</version>
|
||||||
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-simple</artifactId>
|
<artifactId>slf4j-simple</artifactId>
|
||||||
|
<version>1.7.12</version>
|
||||||
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.27-SNAPSHOT</version>
|
<version>1.5.28-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<name>Cache Updater</name>
|
<name>Cache Updater</name>
|
||||||
@@ -36,7 +36,6 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<spring.boot.version>1.5.6.RELEASE</spring.boot.version>
|
<spring.boot.version>1.5.6.RELEASE</spring.boot.version>
|
||||||
<mysql.connector.version>5.1.45</mysql.connector.version>
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@@ -59,7 +58,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>mysql</groupId>
|
<groupId>mysql</groupId>
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
<version>${mysql.connector.version}</version>
|
<version>5.1.45</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
@@ -69,10 +68,12 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.sql2o</groupId>
|
<groupId>org.sql2o</groupId>
|
||||||
<artifactId>sql2o</artifactId>
|
<artifactId>sql2o</artifactId>
|
||||||
|
<version>1.5.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.minio</groupId>
|
<groupId>io.minio</groupId>
|
||||||
<artifactId>minio</artifactId>
|
<artifactId>minio</artifactId>
|
||||||
|
<version>3.0.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
|
|||||||
Vendored
+10
-7
@@ -29,18 +29,16 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.27-SNAPSHOT</version>
|
<version>1.5.28-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>cache</artifactId>
|
<artifactId>cache</artifactId>
|
||||||
<name>Cache</name>
|
<name>Cache</name>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<commons.cli.version>1.3.1</commons.cli.version>
|
|
||||||
<commons.compress.version>1.10</commons.compress.version>
|
|
||||||
<antlr4.version>4.6</antlr4.version>
|
|
||||||
|
|
||||||
<cache.version>165</cache.version>
|
<cache.version>165</cache.version>
|
||||||
|
|
||||||
|
<antlr4.version>4.6</antlr4.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@@ -61,7 +59,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-compress</artifactId>
|
<artifactId>commons-compress</artifactId>
|
||||||
<version>${commons.compress.version}</version>
|
<version>1.10</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.gson</groupId>
|
<groupId>com.google.code.gson</groupId>
|
||||||
@@ -70,6 +68,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.netty</groupId>
|
<groupId>io.netty</groupId>
|
||||||
<artifactId>netty-buffer</artifactId>
|
<artifactId>netty-buffer</artifactId>
|
||||||
|
<version>4.1.0.Final</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.antlr</groupId>
|
<groupId>org.antlr</groupId>
|
||||||
@@ -79,7 +78,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-cli</groupId>
|
<groupId>commons-cli</groupId>
|
||||||
<artifactId>commons-cli</artifactId>
|
<artifactId>commons-cli</artifactId>
|
||||||
<version>${commons.cli.version}</version>
|
<version>1.3.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
@@ -90,10 +89,14 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
|
<version>4.12</version>
|
||||||
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-simple</artifactId>
|
<artifactId>slf4j-simple</artifactId>
|
||||||
|
<version>1.7.12</version>
|
||||||
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.runelite.rs</groupId>
|
<groupId>net.runelite.rs</groupId>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.27-SNAPSHOT</version>
|
<version>1.5.28-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>deobfuscator</artifactId>
|
<artifactId>deobfuscator</artifactId>
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.27-SNAPSHOT</version>
|
<version>1.5.28-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<name>Web API</name>
|
<name>Web API</name>
|
||||||
|
|||||||
+11
-13
@@ -28,7 +28,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.27-SNAPSHOT</version>
|
<version>1.5.28-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<name>Web Service</name>
|
<name>Web Service</name>
|
||||||
@@ -38,12 +38,6 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<spring.boot.version>1.5.6.RELEASE</spring.boot.version>
|
<spring.boot.version>1.5.6.RELEASE</spring.boot.version>
|
||||||
<mapstruct.version>1.2.0.Final</mapstruct.version>
|
<mapstruct.version>1.2.0.Final</mapstruct.version>
|
||||||
<maria.java.client.version>2.2.3</maria.java.client.version>
|
|
||||||
<mongodb.driver.version>3.10.1</mongodb.driver.version>
|
|
||||||
<scribejava.apis.version>4.1.0</scribejava.apis.version>
|
|
||||||
<swagger.maven.plugin.version>3.1.8</swagger.maven.plugin.version>
|
|
||||||
<redis.clients.version>2.10.0</redis.clients.version>
|
|
||||||
<jaxb.api.version>2.3.1</jaxb.api.version>
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@@ -91,12 +85,13 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mariadb.jdbc</groupId>
|
<groupId>org.mariadb.jdbc</groupId>
|
||||||
<artifactId>mariadb-java-client</artifactId>
|
<artifactId>mariadb-java-client</artifactId>
|
||||||
<version>${maria.java.client.version}</version>
|
<version>2.2.3</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.sql2o</groupId>
|
<groupId>org.sql2o</groupId>
|
||||||
<artifactId>sql2o</artifactId>
|
<artifactId>sql2o</artifactId>
|
||||||
|
<version>1.5.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.guava</groupId>
|
<groupId>com.google.guava</groupId>
|
||||||
@@ -109,16 +104,17 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.scribejava</groupId>
|
<groupId>com.github.scribejava</groupId>
|
||||||
<artifactId>scribejava-apis</artifactId>
|
<artifactId>scribejava-apis</artifactId>
|
||||||
<version>${scribejava.apis.version}</version>
|
<version>4.1.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.minio</groupId>
|
<groupId>io.minio</groupId>
|
||||||
<artifactId>minio</artifactId>
|
<artifactId>minio</artifactId>
|
||||||
|
<version>3.0.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>redis.clients</groupId>
|
<groupId>redis.clients</groupId>
|
||||||
<artifactId>jedis</artifactId>
|
<artifactId>jedis</artifactId>
|
||||||
<version>${redis.clients.version}</version>
|
<version>2.10.0</version>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
@@ -129,7 +125,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mongodb</groupId>
|
<groupId>org.mongodb</groupId>
|
||||||
<artifactId>mongodb-driver-sync</artifactId>
|
<artifactId>mongodb-driver-sync</artifactId>
|
||||||
<version>${mongodb.driver.version}</version>
|
<version>3.10.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -140,6 +136,8 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
<artifactId>mockwebserver</artifactId>
|
<artifactId>mockwebserver</artifactId>
|
||||||
|
<version>3.7.0</version>
|
||||||
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.h2database</groupId>
|
<groupId>com.h2database</groupId>
|
||||||
@@ -190,13 +188,13 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>com.github.kongchen</groupId>
|
<groupId>com.github.kongchen</groupId>
|
||||||
<artifactId>swagger-maven-plugin</artifactId>
|
<artifactId>swagger-maven-plugin</artifactId>
|
||||||
<version>${swagger.maven.plugin.version}</version>
|
<version>3.1.8</version>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- Java 11+ does not include this anymore -->
|
<!-- Java 11+ does not include this anymore -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.xml.bind</groupId>
|
<groupId>javax.xml.bind</groupId>
|
||||||
<artifactId>jaxb-api</artifactId>
|
<artifactId>jaxb-api</artifactId>
|
||||||
<version>${jaxb.api.version}</version>
|
<version>2.3.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<configuration>
|
<configuration>
|
||||||
|
|||||||
+3
-15
@@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.27-SNAPSHOT</version>
|
<version>1.5.28-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>injected-client</artifactId>
|
<artifactId>injected-client</artifactId>
|
||||||
@@ -37,23 +37,11 @@
|
|||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite.rs</groupId>
|
||||||
<artifactId>client</artifactId>
|
<artifactId>rs-client</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<optional>true</optional> <!-- to prevent the dependency on this from runelite-client -->
|
<optional>true</optional> <!-- to prevent the dependency on this from runelite-client -->
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>net.runelite.rs</groupId>
|
|
||||||
<artifactId>runescape-api</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
<optional>false</optional> <!-- to prevent the dependency on this from runelite-client -->
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>net.runelite</groupId>
|
|
||||||
<artifactId>runelite-api</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
<optional>false</optional> <!-- to prevent the dependency on this from runelite-client -->
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.runelite.rs</groupId>
|
<groupId>net.runelite.rs</groupId>
|
||||||
<artifactId>vanilla</artifactId>
|
<artifactId>vanilla</artifactId>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.27-SNAPSHOT</version>
|
<version>1.5.28-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>net.runelite.rs</groupId>
|
<groupId>net.runelite.rs</groupId>
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ import net.runelite.deob.deobfuscators.arithmetic.DMath;
|
|||||||
import net.runelite.injector.raw.ClearColorBuffer;
|
import net.runelite.injector.raw.ClearColorBuffer;
|
||||||
import net.runelite.injector.raw.DrawAfterWidgets;
|
import net.runelite.injector.raw.DrawAfterWidgets;
|
||||||
import net.runelite.injector.raw.DrawMenu;
|
import net.runelite.injector.raw.DrawMenu;
|
||||||
|
import net.runelite.injector.raw.Occluder;
|
||||||
import net.runelite.injector.raw.RasterizerHook;
|
import net.runelite.injector.raw.RasterizerHook;
|
||||||
import net.runelite.injector.raw.RenderDraw;
|
import net.runelite.injector.raw.RenderDraw;
|
||||||
import net.runelite.injector.raw.ScriptVM;
|
import net.runelite.injector.raw.ScriptVM;
|
||||||
@@ -76,6 +77,7 @@ public class Inject
|
|||||||
private final ScriptVM scriptVM = new ScriptVM(this);
|
private final ScriptVM scriptVM = new ScriptVM(this);
|
||||||
private final ClearColorBuffer clearColorBuffer = new ClearColorBuffer(this);
|
private final ClearColorBuffer clearColorBuffer = new ClearColorBuffer(this);
|
||||||
private final RenderDraw renderDraw = new RenderDraw(this);
|
private final RenderDraw renderDraw = new RenderDraw(this);
|
||||||
|
private final Occluder occluder = new Occluder(this);
|
||||||
|
|
||||||
// deobfuscated contains exports etc to apply to vanilla
|
// deobfuscated contains exports etc to apply to vanilla
|
||||||
private final ClassGroup deobfuscated, vanilla;
|
private final ClassGroup deobfuscated, vanilla;
|
||||||
@@ -334,6 +336,7 @@ public class Inject
|
|||||||
clearColorBuffer.inject();
|
clearColorBuffer.inject();
|
||||||
renderDraw.inject();
|
renderDraw.inject();
|
||||||
drawMenu.inject();
|
drawMenu.inject();
|
||||||
|
occluder.inject();
|
||||||
}
|
}
|
||||||
|
|
||||||
private java.lang.Class injectInterface(ClassFile cf, ClassFile other)
|
private java.lang.Class injectInterface(ClassFile cf, ClassFile other)
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ public class InjectHookMethod
|
|||||||
new net.runelite.asm.pool.Method(
|
new net.runelite.asm.pool.Method(
|
||||||
new net.runelite.asm.pool.Class(vanillaMethod.getClassFile().getName()),
|
new net.runelite.asm.pool.Class(vanillaMethod.getClassFile().getName()),
|
||||||
hookMethod.getName(),
|
hookMethod.getName(),
|
||||||
signature
|
hookMethod.getDescriptor()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
package net.runelite.injector.raw;
|
||||||
|
|
||||||
|
import com.google.common.base.Stopwatch;
|
||||||
|
import java.util.ListIterator;
|
||||||
|
import net.runelite.asm.Method;
|
||||||
|
import net.runelite.asm.attributes.Code;
|
||||||
|
import net.runelite.asm.attributes.code.Instruction;
|
||||||
|
import net.runelite.asm.attributes.code.Instructions;
|
||||||
|
import net.runelite.asm.attributes.code.instructions.BiPush;
|
||||||
|
import net.runelite.injector.Inject;
|
||||||
|
import net.runelite.injector.InjectUtil;
|
||||||
|
import net.runelite.injector.InjectionException;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
public class Occluder
|
||||||
|
{
|
||||||
|
private final Inject inject;
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(Occluder.class);
|
||||||
|
private static final byte OLDVALUE = 25;
|
||||||
|
private static final byte NEWVALUE = 90;
|
||||||
|
|
||||||
|
public Occluder(Inject inject)
|
||||||
|
{
|
||||||
|
this.inject = inject;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void inject() throws InjectionException
|
||||||
|
{
|
||||||
|
Stopwatch stopwatch = Stopwatch.createStarted();
|
||||||
|
Method occlude = InjectUtil.findMethod(inject, "occlude");
|
||||||
|
int replaced = 0;
|
||||||
|
|
||||||
|
if (occlude == null)
|
||||||
|
{
|
||||||
|
throw new InjectionException("Occlude couldn't be found");
|
||||||
|
}
|
||||||
|
|
||||||
|
Code code = occlude.getCode();
|
||||||
|
|
||||||
|
if (code == null)
|
||||||
|
{
|
||||||
|
throw new InjectionException("Occlude code was null");
|
||||||
|
}
|
||||||
|
|
||||||
|
Instructions ins = code.getInstructions();
|
||||||
|
|
||||||
|
ListIterator<Instruction> it = ins.getInstructions().listIterator();
|
||||||
|
|
||||||
|
while (it.hasNext())
|
||||||
|
{
|
||||||
|
Instruction i = it.next();
|
||||||
|
|
||||||
|
if (!(i instanceof BiPush))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean shouldChange = (byte) ((BiPush) i).getConstant() == OLDVALUE;
|
||||||
|
|
||||||
|
if (!shouldChange)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
replaced++;
|
||||||
|
|
||||||
|
Instruction biPush = new BiPush(ins, NEWVALUE);
|
||||||
|
|
||||||
|
it.set(biPush);
|
||||||
|
}
|
||||||
|
|
||||||
|
stopwatch.stop();
|
||||||
|
|
||||||
|
if (replaced != 10)
|
||||||
|
{
|
||||||
|
throw new InjectionException("Only found " + replaced + " 25's to replace in occlude instead of expected 10");
|
||||||
|
}
|
||||||
|
|
||||||
|
log.info("Changed {} values in occlude()", replaced);
|
||||||
|
log.info("occluder took {}", stopwatch.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -17,7 +17,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
|
|
||||||
public class RenderDraw
|
public class RenderDraw
|
||||||
{
|
{
|
||||||
private static final Logger log = LoggerFactory.getLogger(ClearColorBuffer.class);
|
private static final Logger log = LoggerFactory.getLogger(RenderDraw.class);
|
||||||
private static final net.runelite.asm.pool.Method renderDraw = new net.runelite.asm.pool.Method(
|
private static final net.runelite.asm.pool.Method renderDraw = new net.runelite.asm.pool.Method(
|
||||||
new Class("net.runelite.client.callback.Hooks"),
|
new Class("net.runelite.client.callback.Hooks"),
|
||||||
"renderDraw",
|
"renderDraw",
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.27-SNAPSHOT</version>
|
<version>1.5.28-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<name>RuneLite</name>
|
<name>RuneLite</name>
|
||||||
@@ -302,9 +302,7 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<configLocation>checkstyle.xml</configLocation>
|
<configLocation>checkstyle.xml</configLocation>
|
||||||
<!-- exclude generated sources from checkstyle https://stackoverflow.com/a/30406454/7189686 -->
|
<!-- exclude generated sources from checkstyle https://stackoverflow.com/a/30406454/7189686 -->
|
||||||
<sourceDirectories>
|
|
||||||
<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
|
<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
|
||||||
</sourceDirectories>
|
|
||||||
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.27-SNAPSHOT</version>
|
<version>1.5.28-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>protocol-api</artifactId>
|
<artifactId>protocol-api</artifactId>
|
||||||
@@ -58,6 +58,8 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
|
<version>4.12</version>
|
||||||
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
+4
-1
@@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.27-SNAPSHOT</version>
|
<version>1.5.28-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>protocol</artifactId>
|
<artifactId>protocol</artifactId>
|
||||||
@@ -54,6 +54,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.netty</groupId>
|
<groupId>io.netty</groupId>
|
||||||
<artifactId>netty-all</artifactId>
|
<artifactId>netty-all</artifactId>
|
||||||
|
<version>4.1.0.Final</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
@@ -64,6 +65,8 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
|
<version>4.12</version>
|
||||||
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -29,16 +29,12 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.27-SNAPSHOT</version>
|
<version>1.5.28-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>runelite-api</artifactId>
|
<artifactId>runelite-api</artifactId>
|
||||||
<name>RuneLite API</name>
|
<name>RuneLite API</name>
|
||||||
|
|
||||||
<properties>
|
|
||||||
<jsr305.version>1.3.9</jsr305.version>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
@@ -52,7 +48,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.findbugs</groupId>
|
<groupId>com.google.code.findbugs</groupId>
|
||||||
<artifactId>jsr305</artifactId>
|
<artifactId>jsr305</artifactId>
|
||||||
<version>${jsr305.version}</version>
|
<version>1.3.9</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -178,6 +178,7 @@ public final class AnimationID
|
|||||||
public static final int BLACKJACK_KO = 838;
|
public static final int BLACKJACK_KO = 838;
|
||||||
public static final int VETION_EARTHQUAKE = 5507;
|
public static final int VETION_EARTHQUAKE = 5507;
|
||||||
public static final int ZULRAH_DEATH = 5804;
|
public static final int ZULRAH_DEATH = 5804;
|
||||||
|
public static final int ZULRAH_PHASE = 5072;
|
||||||
|
|
||||||
// Farming
|
// Farming
|
||||||
public static final int FARMING_HARVEST_FRUIT_TREE = 2280;
|
public static final int FARMING_HARVEST_FRUIT_TREE = 2280;
|
||||||
|
|||||||
@@ -934,7 +934,7 @@ public interface Client extends GameShell
|
|||||||
*
|
*
|
||||||
* @return all projectiles
|
* @return all projectiles
|
||||||
*/
|
*/
|
||||||
java.util.List<Projectile> getProjectiles();
|
List<Projectile> getProjectiles();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a list of all graphics objects currently drawn.
|
* Gets a list of all graphics objects currently drawn.
|
||||||
@@ -1426,6 +1426,13 @@ public interface Client extends GameShell
|
|||||||
*/
|
*/
|
||||||
void setNPCsHidden(boolean state);
|
void setNPCsHidden(boolean state);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets which NPCs are hidden
|
||||||
|
*
|
||||||
|
* @param names the names of the npcs seperated by ','
|
||||||
|
*/
|
||||||
|
void setNPCsNames(String names);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets whether 2D sprites (ie. overhead prayers) related to
|
* Sets whether 2D sprites (ie. overhead prayers) related to
|
||||||
* the NPCs are hidden.
|
* the NPCs are hidden.
|
||||||
@@ -1496,14 +1503,6 @@ public interface Client extends GameShell
|
|||||||
*/
|
*/
|
||||||
NodeCache getWidgetSpriteCache();
|
NodeCache getWidgetSpriteCache();
|
||||||
|
|
||||||
/**
|
|
||||||
* Overrides health bar sprites with the sprites from the specified override.
|
|
||||||
* Pass in {@code null} to revert the health bars back to their default.
|
|
||||||
*
|
|
||||||
* @param override the health bar override
|
|
||||||
*/
|
|
||||||
void setHealthBarOverride(HealthBarOverride override);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the current server tick count.
|
* Gets the current server tick count.
|
||||||
*
|
*
|
||||||
@@ -1632,7 +1631,7 @@ public interface Client extends GameShell
|
|||||||
|
|
||||||
void draw2010Menu();
|
void draw2010Menu();
|
||||||
|
|
||||||
NodeCache getHealthBarCache();
|
void resetHealthBarCaches();
|
||||||
|
|
||||||
void setRenderSelf(boolean enabled);
|
void setRenderSelf(boolean enabled);
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,19 @@ public class Constants
|
|||||||
public static final int GAME_TICK_LENGTH = 600;
|
public static final int GAME_TICK_LENGTH = 600;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used when getting High Alchemy value - multiplied by general store price.
|
* High alchemy = shop price * HIGH_ALCHEMY_MULTIPLIER
|
||||||
|
*
|
||||||
|
* @see ItemDefinition#getPrice
|
||||||
*/
|
*/
|
||||||
public static final float HIGH_ALCHEMY_CONSTANT = 0.6f;
|
public static final float HIGH_ALCHEMY_MULTIPLIER = 0.6f;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Width of a standard item sprite
|
||||||
|
*/
|
||||||
|
public static final int ITEM_SPRITE_WIDTH = 36;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Height of a standard item sprite
|
||||||
|
*/
|
||||||
|
public static final int ITEM_SPRITE_HEIGHT = 32;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package net.runelite.api;
|
||||||
|
|
||||||
|
public interface DynamicObject extends Renderable
|
||||||
|
{
|
||||||
|
int getAnimationID();
|
||||||
|
}
|
||||||
@@ -52,5 +52,7 @@ public class GraphicID
|
|||||||
public static final int FLYING_FISH = 1387;
|
public static final int FLYING_FISH = 1387;
|
||||||
public static final int OLM_BURN = 1351;
|
public static final int OLM_BURN = 1351;
|
||||||
public static final int OLM_TELEPORT = 1359;
|
public static final int OLM_TELEPORT = 1359;
|
||||||
|
public static final int OLM_HEAL = 1363;
|
||||||
|
public static final int OLM_CRYSTAL = 1447;
|
||||||
public static final int XERIC_TELEPORT = 1612;
|
public static final int XERIC_TELEPORT = 1612;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,5 +30,7 @@ public interface HealthBar
|
|||||||
|
|
||||||
Sprite getHealthBarBackSprite();
|
Sprite getHealthBarBackSprite();
|
||||||
|
|
||||||
|
int getHealthBarFrontSpriteId();
|
||||||
|
|
||||||
void setPadding(int padding);
|
void setPadding(int padding);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2019, Lotto <https://github.com/devLotto>
|
|
||||||
* 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 HOLDER 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.api;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class HealthBarOverride
|
|
||||||
{
|
|
||||||
public final Sprite frontSprite;
|
|
||||||
public final Sprite backSprite;
|
|
||||||
public final Sprite frontSpriteLarge;
|
|
||||||
public final Sprite backSpriteLarge;
|
|
||||||
}
|
|
||||||
@@ -63,6 +63,8 @@ public interface ItemDefinition
|
|||||||
* alchemy values, respectively.
|
* alchemy values, respectively.
|
||||||
*
|
*
|
||||||
* @return the general store value of the item
|
* @return the general store value of the item
|
||||||
|
*
|
||||||
|
* @see Constants#HIGH_ALCHEMY_MULTIPLIER
|
||||||
*/
|
*/
|
||||||
int getPrice();
|
int getPrice();
|
||||||
|
|
||||||
|
|||||||
@@ -10791,5 +10791,35 @@ public final class ItemID
|
|||||||
public static final int TORMENTED_BRACELET_OR = 23444;
|
public static final int TORMENTED_BRACELET_OR = 23444;
|
||||||
public static final int GIANT_EASTER_EGG = 23446;
|
public static final int GIANT_EASTER_EGG = 23446;
|
||||||
public static final int BUNNYMAN_MASK = 23448;
|
public static final int BUNNYMAN_MASK = 23448;
|
||||||
|
public static final int ENCHANTED_LYREI = 23458;
|
||||||
|
public static final int ATTACKER_ICON_23460 = 23460;
|
||||||
|
public static final int ATTACKER_ICON_23461 = 23461;
|
||||||
|
public static final int ATTACKER_ICON_23462 = 23462;
|
||||||
|
public static final int ATTACKER_ICON_23463 = 23463;
|
||||||
|
public static final int ATTACKER_ICON_23464 = 23464;
|
||||||
|
public static final int ATTACKER_ICON_23465 = 23465;
|
||||||
|
public static final int DEFENDER_ICON_23466 = 23466;
|
||||||
|
public static final int DEFENDER_ICON_23467 = 23467;
|
||||||
|
public static final int DEFENDER_ICON_23468 = 23468;
|
||||||
|
public static final int DEFENDER_ICON_23469 = 23469;
|
||||||
|
public static final int DEFENDER_ICON_23470 = 23470;
|
||||||
|
public static final int COLLECTOR_ICON_23471 = 23471;
|
||||||
|
public static final int COLLECTOR_ICON_23472 = 23472;
|
||||||
|
public static final int COLLECTOR_ICON_23473 = 23473;
|
||||||
|
public static final int COLLECTOR_ICON_23474 = 23474;
|
||||||
|
public static final int COLLECTOR_ICON_23475 = 23475;
|
||||||
|
public static final int COLLECTOR_ICON_23476 = 23476;
|
||||||
|
public static final int COLLECTOR_ICON_23477 = 23477;
|
||||||
|
public static final int HEALER_ICON_23478 = 23478;
|
||||||
|
public static final int HEALER_ICON_23479 = 23479;
|
||||||
|
public static final int HEALER_ICON_23480 = 23480;
|
||||||
|
public static final int HEALER_ICON_23481 = 23481;
|
||||||
|
public static final int HEALER_ICON_23482 = 23482;
|
||||||
|
public static final int HEALER_ICON_23483 = 23483;
|
||||||
|
public static final int HEALER_ICON_23484 = 23484;
|
||||||
|
public static final int HEALER_ICON_23485 = 23485;
|
||||||
|
public static final int HEALER_ICON_23486 = 23486;
|
||||||
|
public static final int WINE_OF_ZAMORAK_23489 = 23489;
|
||||||
|
public static final int LARRANS_KEY = 23490;
|
||||||
/* This file is automatically generated. Do not edit. */
|
/* This file is automatically generated. Do not edit. */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -460,10 +460,9 @@ public final class NpcID
|
|||||||
public static final int SKELETAL_WYVERN_468 = 468;
|
public static final int SKELETAL_WYVERN_468 = 468;
|
||||||
public static final int KILLERWATT = 469;
|
public static final int KILLERWATT = 469;
|
||||||
public static final int KILLERWATT_470 = 470;
|
public static final int KILLERWATT_470 = 470;
|
||||||
public static final int FUNGI = 471;
|
public static final int DARK_WIZARD = 472;
|
||||||
public static final int FUNGI_472 = 472;
|
public static final int INVRIGAR_THE_NECROMANCER = 473;
|
||||||
public static final int ZYGOMITE = 473;
|
public static final int DARK_WIZARD_474 = 474;
|
||||||
public static final int ZYGOMITE_474 = 474;
|
|
||||||
public static final int HOLE_IN_THE_WALL = 475;
|
public static final int HOLE_IN_THE_WALL = 475;
|
||||||
public static final int WALL_BEAST = 476;
|
public static final int WALL_BEAST = 476;
|
||||||
public static final int GIANT_FROG = 477;
|
public static final int GIANT_FROG = 477;
|
||||||
@@ -493,40 +492,37 @@ public final class NpcID
|
|||||||
public static final int VANESSA = 502;
|
public static final int VANESSA = 502;
|
||||||
public static final int RICHARD = 503;
|
public static final int RICHARD = 503;
|
||||||
public static final int ALICE = 504;
|
public static final int ALICE = 504;
|
||||||
public static final int BOB = 505;
|
public static final int MUGGER = 505;
|
||||||
public static final int SHOP_KEEPER = 506;
|
public static final int WITCH = 506;
|
||||||
public static final int SHOP_ASSISTANT = 507;
|
public static final int WITCH_507 = 507;
|
||||||
public static final int SHOP_KEEPER_508 = 508;
|
public static final int BLACK_KNIGHT = 508;
|
||||||
public static final int SHOP_ASSISTANT_509 = 509;
|
public static final int BLACK_KNIGHT_509 = 509;
|
||||||
public static final int SHOP_KEEPER_510 = 510;
|
public static final int HIGHWAYMAN = 510;
|
||||||
public static final int SHOP_ASSISTANT_511 = 511;
|
public static final int HIGHWAYMAN_511 = 511;
|
||||||
public static final int SHOP_KEEPER_512 = 512;
|
public static final int CHAOS_DRUID = 512;
|
||||||
public static final int SHOP_ASSISTANT_513 = 513;
|
public static final int PIRATE = 513;
|
||||||
public static final int SHOP_KEEPER_514 = 514;
|
public static final int PIRATE_514 = 514;
|
||||||
public static final int SHOP_ASSISTANT_515 = 515;
|
public static final int PIRATE_515 = 515;
|
||||||
public static final int SHOP_KEEPER_516 = 516;
|
public static final int PIRATE_516 = 516;
|
||||||
public static final int SHOP_ASSISTANT_517 = 517;
|
public static final int THUG = 517;
|
||||||
public static final int SHOP_KEEPER_518 = 518;
|
public static final int ROGUE = 518;
|
||||||
public static final int SHOP_ASSISTANT_519 = 519;
|
public static final int MONK_OF_ZAMORAK = 519;
|
||||||
public static final int FAIRY_SHOP_KEEPER = 520;
|
public static final int MONK_OF_ZAMORAK_520 = 520;
|
||||||
public static final int FAIRY_SHOP_ASSISTANT = 521;
|
public static final int MONK_OF_ZAMORAK_521 = 521;
|
||||||
public static final int VALAINE = 522;
|
public static final int TRIBESMAN = 522;
|
||||||
public static final int SCAVVO = 523;
|
public static final int DARK_WARRIOR = 523;
|
||||||
public static final int PEKSA = 524;
|
public static final int CHAOS_DRUID_WARRIOR = 524;
|
||||||
public static final int SILK_TRADER = 525;
|
public static final int NECROMANCER = 525;
|
||||||
public static final int GEM_TRADER = 526;
|
public static final int BANDIT = 526;
|
||||||
public static final int ZEKE = 527;
|
public static final int GUARD_BANDIT = 527;
|
||||||
public static final int LOUIE_LEGS = 528;
|
public static final int BARBARIAN_GUARD = 528;
|
||||||
public static final int KARIM = 529;
|
public static final int PORTAL = 530;
|
||||||
public static final int RANAEL = 530;
|
public static final int PORTAL_532 = 532;
|
||||||
public static final int DOMMIK = 531;
|
public static final int FUNGI = 533;
|
||||||
public static final int ZAFF = 532;
|
|
||||||
public static final int BARAEK = 533;
|
|
||||||
public static final int THESSALIA = 534;
|
public static final int THESSALIA = 534;
|
||||||
public static final int HORVIK = 535;
|
public static final int FUNGI_535 = 535;
|
||||||
public static final int LOWE = 536;
|
public static final int ZYGOMITE = 537;
|
||||||
public static final int SHOP_KEEPER_537 = 537;
|
public static final int FUNGI_538 = 538;
|
||||||
public static final int SHOP_ASSISTANT_538 = 538;
|
|
||||||
public static final int ELFINLOCKS = 539;
|
public static final int ELFINLOCKS = 539;
|
||||||
public static final int CLOCKWORK_CAT = 540;
|
public static final int CLOCKWORK_CAT = 540;
|
||||||
public static final int CLOCKWORK_CAT_541 = 541;
|
public static final int CLOCKWORK_CAT_541 = 541;
|
||||||
@@ -625,7 +621,7 @@ public final class NpcID
|
|||||||
public static final int BREWER_634 = 634;
|
public static final int BREWER_634 = 634;
|
||||||
public static final int FISHING_SPOT = 635;
|
public static final int FISHING_SPOT = 635;
|
||||||
public static final int KARAMTHULHU = 636;
|
public static final int KARAMTHULHU = 636;
|
||||||
public static final int AUBURY = 637;
|
public static final int FUNGI_637 = 637;
|
||||||
public static final int ELF_TRACKER = 638;
|
public static final int ELF_TRACKER = 638;
|
||||||
public static final int TYRAS_GUARD = 639;
|
public static final int TYRAS_GUARD = 639;
|
||||||
public static final int UG = 640;
|
public static final int UG = 640;
|
||||||
@@ -678,7 +674,7 @@ public final class NpcID
|
|||||||
public static final int BARTENDER = 687;
|
public static final int BARTENDER = 687;
|
||||||
public static final int EBLIS = 688;
|
public static final int EBLIS = 688;
|
||||||
public static final int EBLIS_689 = 689;
|
public static final int EBLIS_689 = 689;
|
||||||
public static final int BANDIT = 690;
|
public static final int BANDIT_690 = 690;
|
||||||
public static final int BANDIT_691 = 691;
|
public static final int BANDIT_691 = 691;
|
||||||
public static final int BANDIT_692 = 692;
|
public static final int BANDIT_692 = 692;
|
||||||
public static final int BANDIT_693 = 693;
|
public static final int BANDIT_693 = 693;
|
||||||
@@ -992,37 +988,34 @@ public final class NpcID
|
|||||||
public static final int RAT = 1020;
|
public static final int RAT = 1020;
|
||||||
public static final int RAT_1021 = 1021;
|
public static final int RAT_1021 = 1021;
|
||||||
public static final int RAT_1022 = 1022;
|
public static final int RAT_1022 = 1022;
|
||||||
public static final int FANCY_DRESS_SHOP_OWNER = 1023;
|
public static final int ZYGOMITE_1024 = 1024;
|
||||||
public static final int SHOP_KEEPER_1024 = 1024;
|
public static final int BANKER_1027 = 1027;
|
||||||
public static final int GRUM = 1025;
|
public static final int BANKER_1028 = 1028;
|
||||||
public static final int WYDIN = 1026;
|
public static final int BANKER_1029 = 1029;
|
||||||
public static final int GERRANT = 1027;
|
public static final int BANKER_1030 = 1030;
|
||||||
public static final int BRIAN = 1028;
|
public static final int BANKER_1031 = 1031;
|
||||||
public static final int JIMINUA = 1029;
|
public static final int BANKER_1032 = 1032;
|
||||||
public static final int SHOP_KEEPER_1030 = 1030;
|
public static final int BANKER_1033 = 1033;
|
||||||
public static final int CANDLE_MAKER = 1031;
|
public static final int BANKER_1034 = 1034;
|
||||||
public static final int ARHEIN = 1032;
|
public static final int BANKER_1035 = 1035;
|
||||||
public static final int JUKAT = 1033;
|
public static final int BANKER_1036 = 1036;
|
||||||
public static final int LUNDERWIN = 1034;
|
public static final int SNAKE = 1037;
|
||||||
public static final int IRKSOL = 1035;
|
public static final int MONKEY_1038 = 1038;
|
||||||
public static final int FAIRY = 1036;
|
public static final int ALBINO_BAT = 1039;
|
||||||
public static final int ZAMBO = 1037;
|
public static final int CRAB = 1040;
|
||||||
public static final int SILVER_MERCHANT = 1038;
|
public static final int GIANT_MOSQUITO = 1041;
|
||||||
public static final int GEM_MERCHANT = 1039;
|
public static final int JUNGLE_HORROR = 1042;
|
||||||
public static final int BAKER = 1040;
|
public static final int JUNGLE_HORROR_1043 = 1043;
|
||||||
public static final int SPICE_SELLER = 1041;
|
public static final int JUNGLE_HORROR_1044 = 1044;
|
||||||
public static final int FUR_TRADER = 1042;
|
public static final int JUNGLE_HORROR_1045 = 1045;
|
||||||
public static final int SILK_MERCHANT = 1043;
|
public static final int JUNGLE_HORROR_1046 = 1046;
|
||||||
public static final int HICKTON = 1044;
|
public static final int CAVE_HORROR = 1047;
|
||||||
public static final int HARRY = 1045;
|
public static final int CAVE_HORROR_1048 = 1048;
|
||||||
public static final int CASSIE = 1046;
|
public static final int CAVE_HORROR_1049 = 1049;
|
||||||
public static final int FRINCOS = 1047;
|
public static final int CAVE_HORROR_1050 = 1050;
|
||||||
public static final int DROGO_DWARF = 1048;
|
public static final int CAVE_HORROR_1051 = 1051;
|
||||||
public static final int FLYNN = 1049;
|
public static final int CAVEY_DAVEY = 1052;
|
||||||
public static final int WAYNE = 1050;
|
public static final int PATCHY = 1053;
|
||||||
public static final int DWARF_1051 = 1051;
|
|
||||||
public static final int BETTY = 1052;
|
|
||||||
public static final int HERQUIN = 1053;
|
|
||||||
public static final int LAUNA = 1054;
|
public static final int LAUNA = 1054;
|
||||||
public static final int LAUNA_1055 = 1055;
|
public static final int LAUNA_1055 = 1055;
|
||||||
public static final int BRANA = 1056;
|
public static final int BRANA = 1056;
|
||||||
@@ -1134,13 +1127,12 @@ public final class NpcID
|
|||||||
public static final int MONK_OF_ENTRANA_1169 = 1169;
|
public static final int MONK_OF_ENTRANA_1169 = 1169;
|
||||||
public static final int MONK_OF_ENTRANA_1170 = 1170;
|
public static final int MONK_OF_ENTRANA_1170 = 1170;
|
||||||
public static final int MONK_1171 = 1171;
|
public static final int MONK_1171 = 1171;
|
||||||
public static final int ROMMIK = 1172;
|
public static final int CHICKEN = 1173;
|
||||||
public static final int GAIUS = 1173;
|
public static final int CHICKEN_1174 = 1174;
|
||||||
public static final int JATIX = 1174;
|
public static final int ROOSTER = 1175;
|
||||||
public static final int DAVON = 1175;
|
public static final int LIL_LAMB = 1176;
|
||||||
public static final int ZENESHA = 1176;
|
public static final int LAMB = 1177;
|
||||||
public static final int AEMAD = 1177;
|
public static final int SHEEP_1178 = 1178;
|
||||||
public static final int KORTAN = 1178;
|
|
||||||
public static final int LUMBRIDGE_GUIDE_1179 = 1179;
|
public static final int LUMBRIDGE_GUIDE_1179 = 1179;
|
||||||
public static final int LUMBRIDGE_GUIDE_1181 = 1181;
|
public static final int LUMBRIDGE_GUIDE_1181 = 1181;
|
||||||
public static final int ___ = 1182;
|
public static final int ___ = 1182;
|
||||||
@@ -1252,17 +1244,17 @@ public final class NpcID
|
|||||||
public static final int MORTTON_LOCAL_1296 = 1296;
|
public static final int MORTTON_LOCAL_1296 = 1296;
|
||||||
public static final int AFFLICTED_1297 = 1297;
|
public static final int AFFLICTED_1297 = 1297;
|
||||||
public static final int AFFLICTED_1298 = 1298;
|
public static final int AFFLICTED_1298 = 1298;
|
||||||
public static final int ROACHEY = 1299;
|
public static final int SHEEP_1299 = 1299;
|
||||||
public static final int FRENITA = 1300;
|
public static final int SHEEP_1300 = 1300;
|
||||||
public static final int NURMOF = 1301;
|
public static final int SHEEP_1301 = 1301;
|
||||||
public static final int TEA_SELLER = 1302;
|
public static final int SHEEP_1302 = 1302;
|
||||||
public static final int FAT_TONY = 1303;
|
public static final int SHEEP_1303 = 1303;
|
||||||
public static final int NOTERAZZO = 1304;
|
public static final int SHEEP_1304 = 1304;
|
||||||
public static final int HAIRDRESSER = 1305;
|
public static final int HAIRDRESSER = 1305;
|
||||||
public static final int MAKEOVER_MAGE = 1306;
|
public static final int MAKEOVER_MAGE = 1306;
|
||||||
public static final int MAKEOVER_MAGE_1307 = 1307;
|
public static final int MAKEOVER_MAGE_1307 = 1307;
|
||||||
public static final int DIANGO = 1308;
|
public static final int SHEEP_1308 = 1308;
|
||||||
public static final int BRIAN_1309 = 1309;
|
public static final int SHEEP_1309 = 1309;
|
||||||
public static final int BARTENDER_1310 = 1310;
|
public static final int BARTENDER_1310 = 1310;
|
||||||
public static final int BARTENDER_1311 = 1311;
|
public static final int BARTENDER_1311 = 1311;
|
||||||
public static final int BARTENDER_1312 = 1312;
|
public static final int BARTENDER_1312 = 1312;
|
||||||
@@ -1392,12 +1384,12 @@ public final class NpcID
|
|||||||
public static final int DAERO = 1444;
|
public static final int DAERO = 1444;
|
||||||
public static final int DAERO_1445 = 1445;
|
public static final int DAERO_1445 = 1445;
|
||||||
public static final int WAYDAR = 1446;
|
public static final int WAYDAR = 1446;
|
||||||
public static final int PIRATE = 1447;
|
public static final int PIRATE_1447 = 1447;
|
||||||
public static final int THIEF = 1448;
|
public static final int THIEF = 1448;
|
||||||
public static final int LUMDO_1453 = 1453;
|
public static final int LUMDO_1453 = 1453;
|
||||||
public static final int LUMDO_1454 = 1454;
|
public static final int LUMDO_1454 = 1454;
|
||||||
public static final int GLO_CARANOCK = 1460;
|
public static final int GLO_CARANOCK = 1460;
|
||||||
public static final int MUGGER = 1461;
|
public static final int MUGGER_1461 = 1461;
|
||||||
public static final int SMALL_NINJA_MONKEY = 1462;
|
public static final int SMALL_NINJA_MONKEY = 1462;
|
||||||
public static final int MEDIUM_NINJA_MONKEY = 1463;
|
public static final int MEDIUM_NINJA_MONKEY = 1463;
|
||||||
public static final int GORILLA = 1464;
|
public static final int GORILLA = 1464;
|
||||||
@@ -1478,7 +1470,7 @@ public final class NpcID
|
|||||||
public static final int FISHING_SPOT_1542 = 1542;
|
public static final int FISHING_SPOT_1542 = 1542;
|
||||||
public static final int GARGOYLE_1543 = 1543;
|
public static final int GARGOYLE_1543 = 1543;
|
||||||
public static final int FISHING_SPOT_1544 = 1544;
|
public static final int FISHING_SPOT_1544 = 1544;
|
||||||
public static final int BLACK_KNIGHT = 1545;
|
public static final int BLACK_KNIGHT_1545 = 1545;
|
||||||
public static final int GUARD_1546 = 1546;
|
public static final int GUARD_1546 = 1546;
|
||||||
public static final int GUARD_1547 = 1547;
|
public static final int GUARD_1547 = 1547;
|
||||||
public static final int GUARD_1548 = 1548;
|
public static final int GUARD_1548 = 1548;
|
||||||
@@ -1486,7 +1478,7 @@ public final class NpcID
|
|||||||
public static final int GUARD_1550 = 1550;
|
public static final int GUARD_1550 = 1550;
|
||||||
public static final int GUARD_1551 = 1551;
|
public static final int GUARD_1551 = 1551;
|
||||||
public static final int GUARD_1552 = 1552;
|
public static final int GUARD_1552 = 1552;
|
||||||
public static final int CRAB = 1553;
|
public static final int CRAB_1553 = 1553;
|
||||||
public static final int SEAGULL_1554 = 1554;
|
public static final int SEAGULL_1554 = 1554;
|
||||||
public static final int SEAGULL_1555 = 1555;
|
public static final int SEAGULL_1555 = 1555;
|
||||||
public static final int FIRE_WIZARD = 1556;
|
public static final int FIRE_WIZARD = 1556;
|
||||||
@@ -1668,7 +1660,7 @@ public final class NpcID
|
|||||||
public static final int BRAWLER_1736 = 1736;
|
public static final int BRAWLER_1736 = 1736;
|
||||||
public static final int BRAWLER_1737 = 1737;
|
public static final int BRAWLER_1737 = 1737;
|
||||||
public static final int BRAWLER_1738 = 1738;
|
public static final int BRAWLER_1738 = 1738;
|
||||||
public static final int PORTAL = 1739;
|
public static final int PORTAL_1739 = 1739;
|
||||||
public static final int PORTAL_1740 = 1740;
|
public static final int PORTAL_1740 = 1740;
|
||||||
public static final int PORTAL_1741 = 1741;
|
public static final int PORTAL_1741 = 1741;
|
||||||
public static final int PORTAL_1742 = 1742;
|
public static final int PORTAL_1742 = 1742;
|
||||||
@@ -1716,10 +1708,10 @@ public final class NpcID
|
|||||||
public static final int SKELETON_1785 = 1785;
|
public static final int SKELETON_1785 = 1785;
|
||||||
public static final int GHOST_1786 = 1786;
|
public static final int GHOST_1786 = 1786;
|
||||||
public static final int SKELETON_MAGE_1787 = 1787;
|
public static final int SKELETON_MAGE_1787 = 1787;
|
||||||
public static final int BETTY_1788 = 1788;
|
public static final int BETTY = 1788;
|
||||||
public static final int GRUM_1789 = 1789;
|
public static final int GRUM = 1789;
|
||||||
public static final int GERRANT_1790 = 1790;
|
public static final int GERRANT = 1790;
|
||||||
public static final int WYDIN_1791 = 1791;
|
public static final int WYDIN = 1791;
|
||||||
public static final int GOAT = 1792;
|
public static final int GOAT = 1792;
|
||||||
public static final int GOAT_1793 = 1793;
|
public static final int GOAT_1793 = 1793;
|
||||||
public static final int BILLY_GOAT = 1794;
|
public static final int BILLY_GOAT = 1794;
|
||||||
@@ -1767,7 +1759,7 @@ public final class NpcID
|
|||||||
public static final int STAG = 1845;
|
public static final int STAG = 1845;
|
||||||
public static final int WOOD_DRYAD = 1846;
|
public static final int WOOD_DRYAD = 1846;
|
||||||
public static final int FAIRY_VERY_WISE = 1847;
|
public static final int FAIRY_VERY_WISE = 1847;
|
||||||
public static final int FAIRY_1848 = 1848;
|
public static final int FAIRY = 1848;
|
||||||
public static final int FAIRY_1849 = 1849;
|
public static final int FAIRY_1849 = 1849;
|
||||||
public static final int FAIRY_1850 = 1850;
|
public static final int FAIRY_1850 = 1850;
|
||||||
public static final int FAIRY_1851 = 1851;
|
public static final int FAIRY_1851 = 1851;
|
||||||
@@ -1915,7 +1907,7 @@ public final class NpcID
|
|||||||
public static final int FRITZ_THE_GLASSBLOWER = 2053;
|
public static final int FRITZ_THE_GLASSBLOWER = 2053;
|
||||||
public static final int CHAOS_ELEMENTAL = 2054;
|
public static final int CHAOS_ELEMENTAL = 2054;
|
||||||
public static final int CHAOS_ELEMENTAL_JR = 2055;
|
public static final int CHAOS_ELEMENTAL_JR = 2055;
|
||||||
public static final int DARK_WIZARD = 2056;
|
public static final int DARK_WIZARD_2056 = 2056;
|
||||||
public static final int DARK_WIZARD_2057 = 2057;
|
public static final int DARK_WIZARD_2057 = 2057;
|
||||||
public static final int DARK_WIZARD_2058 = 2058;
|
public static final int DARK_WIZARD_2058 = 2058;
|
||||||
public static final int DARK_WIZARD_2059 = 2059;
|
public static final int DARK_WIZARD_2059 = 2059;
|
||||||
@@ -2488,7 +2480,7 @@ public final class NpcID
|
|||||||
public static final int LILIYA = 2632;
|
public static final int LILIYA = 2632;
|
||||||
public static final int BANKER_2633 = 2633;
|
public static final int BANKER_2633 = 2633;
|
||||||
public static final int MYRE_BLAMISH_SNAIL = 2634;
|
public static final int MYRE_BLAMISH_SNAIL = 2634;
|
||||||
public static final int BOB_2635 = 2635;
|
public static final int BOB = 2635;
|
||||||
public static final int BOB_2636 = 2636;
|
public static final int BOB_2636 = 2636;
|
||||||
public static final int SPHINX = 2637;
|
public static final int SPHINX = 2637;
|
||||||
public static final int NEITE = 2638;
|
public static final int NEITE = 2638;
|
||||||
@@ -2544,11 +2536,12 @@ public final class NpcID
|
|||||||
public static final int IMIAGO = 2688;
|
public static final int IMIAGO = 2688;
|
||||||
public static final int LILIWEN = 2689;
|
public static final int LILIWEN = 2689;
|
||||||
public static final int COOL_MOM227 = 2690;
|
public static final int COOL_MOM227 = 2690;
|
||||||
public static final int CHICKEN = 2692;
|
public static final int SHEEP_2691 = 2691;
|
||||||
public static final int CHICKEN_2693 = 2693;
|
public static final int SHEEP_2692 = 2692;
|
||||||
public static final int ROOSTER = 2694;
|
public static final int SHEEP_2693 = 2693;
|
||||||
public static final int LIL_LAMB = 2695;
|
public static final int SHEEP_2694 = 2694;
|
||||||
public static final int LAMB = 2696;
|
public static final int SHEEP_2695 = 2695;
|
||||||
|
public static final int SHEEP_2696 = 2696;
|
||||||
public static final int SHEEP_2697 = 2697;
|
public static final int SHEEP_2697 = 2697;
|
||||||
public static final int SHEEP_2698 = 2698;
|
public static final int SHEEP_2698 = 2698;
|
||||||
public static final int SHEEP_2699 = 2699;
|
public static final int SHEEP_2699 = 2699;
|
||||||
@@ -2642,43 +2635,43 @@ public final class NpcID
|
|||||||
public static final int SHEEP_2787 = 2787;
|
public static final int SHEEP_2787 = 2787;
|
||||||
public static final int SHEEP_2788 = 2788;
|
public static final int SHEEP_2788 = 2788;
|
||||||
public static final int SHEEP_2789 = 2789;
|
public static final int SHEEP_2789 = 2789;
|
||||||
public static final int SHEEP_2790 = 2790;
|
public static final int COW = 2790;
|
||||||
public static final int SHEEP_2791 = 2791;
|
public static final int COW_2791 = 2791;
|
||||||
public static final int SHEEP_2792 = 2792;
|
public static final int COW_CALF = 2792;
|
||||||
public static final int SHEEP_2793 = 2793;
|
public static final int COW_2793 = 2793;
|
||||||
public static final int SHEEP_2794 = 2794;
|
public static final int COW_CALF_2794 = 2794;
|
||||||
public static final int SHEEP_2795 = 2795;
|
public static final int COW_2795 = 2795;
|
||||||
public static final int SHEEP_2796 = 2796;
|
public static final int PIG = 2796;
|
||||||
public static final int SHEEP_2797 = 2797;
|
public static final int PIG_2797 = 2797;
|
||||||
public static final int SHEEP_2798 = 2798;
|
public static final int PIGLET = 2798;
|
||||||
public static final int SHEEP_2799 = 2799;
|
public static final int PIGLET_2799 = 2799;
|
||||||
public static final int SHEEP_2800 = 2800;
|
public static final int PIGLET_2800 = 2800;
|
||||||
public static final int SHEEP_2801 = 2801;
|
public static final int COW_CALF_2801 = 2801;
|
||||||
public static final int SHEEP_2802 = 2802;
|
public static final int SHEEPDOG = 2802;
|
||||||
public static final int SHEEP_2803 = 2803;
|
public static final int ROOSTER_2803 = 2803;
|
||||||
public static final int SHEEP_2804 = 2804;
|
public static final int CHICKEN_2804 = 2804;
|
||||||
public static final int COW = 2805;
|
public static final int CHICKEN_2805 = 2805;
|
||||||
public static final int COW_2806 = 2806;
|
public static final int CHICKEN_2806 = 2806;
|
||||||
public static final int COW_CALF = 2807;
|
public static final int PIG_2807 = 2807;
|
||||||
public static final int COW_2808 = 2808;
|
public static final int PIG_2808 = 2808;
|
||||||
public static final int COW_CALF_2809 = 2809;
|
public static final int PIGLET_2809 = 2809;
|
||||||
public static final int COW_2810 = 2810;
|
public static final int PIGLET_2810 = 2810;
|
||||||
public static final int PIG = 2811;
|
public static final int PIGLET_2811 = 2811;
|
||||||
public static final int PIG_2812 = 2812;
|
public static final int BOB_2812 = 2812;
|
||||||
public static final int PIGLET = 2813;
|
public static final int SHOP_KEEPER = 2813;
|
||||||
public static final int PIGLET_2814 = 2814;
|
public static final int SHOP_ASSISTANT = 2814;
|
||||||
public static final int PIGLET_2815 = 2815;
|
public static final int SHOP_KEEPER_2815 = 2815;
|
||||||
public static final int COW_CALF_2816 = 2816;
|
public static final int SHOP_ASSISTANT_2816 = 2816;
|
||||||
public static final int SHEEPDOG = 2817;
|
public static final int SHOP_KEEPER_2817 = 2817;
|
||||||
public static final int ROOSTER_2818 = 2818;
|
public static final int SHOP_ASSISTANT_2818 = 2818;
|
||||||
public static final int CHICKEN_2819 = 2819;
|
public static final int SHOP_KEEPER_2819 = 2819;
|
||||||
public static final int CHICKEN_2820 = 2820;
|
public static final int SHOP_ASSISTANT_2820 = 2820;
|
||||||
public static final int CHICKEN_2821 = 2821;
|
public static final int SHOP_KEEPER_2821 = 2821;
|
||||||
public static final int PIG_2822 = 2822;
|
public static final int SHOP_ASSISTANT_2822 = 2822;
|
||||||
public static final int PIG_2823 = 2823;
|
public static final int SHOP_KEEPER_2823 = 2823;
|
||||||
public static final int PIGLET_2824 = 2824;
|
public static final int SHOP_ASSISTANT_2824 = 2824;
|
||||||
public static final int PIGLET_2825 = 2825;
|
public static final int SHOP_KEEPER_2825 = 2825;
|
||||||
public static final int PIGLET_2826 = 2826;
|
public static final int SHOP_ASSISTANT_2826 = 2826;
|
||||||
public static final int BAT = 2827;
|
public static final int BAT = 2827;
|
||||||
public static final int DRYAD = 2828;
|
public static final int DRYAD = 2828;
|
||||||
public static final int FAIRY_2829 = 2829;
|
public static final int FAIRY_2829 = 2829;
|
||||||
@@ -2697,7 +2690,7 @@ public final class NpcID
|
|||||||
public static final int ICE_WARRIOR_2842 = 2842;
|
public static final int ICE_WARRIOR_2842 = 2842;
|
||||||
public static final int OTHERWORLDLY_BEING = 2843;
|
public static final int OTHERWORLDLY_BEING = 2843;
|
||||||
public static final int MAGIC_AXE = 2844;
|
public static final int MAGIC_AXE = 2844;
|
||||||
public static final int SNAKE = 2845;
|
public static final int SNAKE_2845 = 2845;
|
||||||
public static final int SKAVID = 2846;
|
public static final int SKAVID = 2846;
|
||||||
public static final int YETI = 2847;
|
public static final int YETI = 2847;
|
||||||
public static final int MONKEY_2848 = 2848;
|
public static final int MONKEY_2848 = 2848;
|
||||||
@@ -2720,33 +2713,33 @@ public final class NpcID
|
|||||||
public static final int DUNGEON_RAT = 2865;
|
public static final int DUNGEON_RAT = 2865;
|
||||||
public static final int DUNGEON_RAT_2866 = 2866;
|
public static final int DUNGEON_RAT_2866 = 2866;
|
||||||
public static final int DUNGEON_RAT_2867 = 2867;
|
public static final int DUNGEON_RAT_2867 = 2867;
|
||||||
public static final int DARK_WIZARD_2868 = 2868;
|
public static final int FAIRY_SHOP_KEEPER = 2868;
|
||||||
public static final int INVRIGAR_THE_NECROMANCER = 2869;
|
public static final int FAIRY_SHOP_ASSISTANT = 2869;
|
||||||
public static final int DARK_WIZARD_2870 = 2870;
|
public static final int VALAINE = 2870;
|
||||||
public static final int MUGGER_2871 = 2871;
|
public static final int SCAVVO = 2871;
|
||||||
public static final int WITCH = 2872;
|
public static final int PEKSA = 2872;
|
||||||
public static final int WITCH_2873 = 2873;
|
public static final int SILK_TRADER = 2873;
|
||||||
public static final int BLACK_KNIGHT_2874 = 2874;
|
public static final int GEM_TRADER = 2874;
|
||||||
public static final int BLACK_KNIGHT_2875 = 2875;
|
public static final int ZEKE = 2875;
|
||||||
public static final int HIGHWAYMAN = 2876;
|
public static final int LOUIE_LEGS = 2876;
|
||||||
public static final int HIGHWAYMAN_2877 = 2877;
|
public static final int KARIM = 2877;
|
||||||
public static final int CHAOS_DRUID = 2878;
|
public static final int RANAEL = 2878;
|
||||||
public static final int PIRATE_2879 = 2879;
|
public static final int DOMMIK = 2879;
|
||||||
public static final int PIRATE_2880 = 2880;
|
public static final int ZAFF = 2880;
|
||||||
public static final int PIRATE_2881 = 2881;
|
public static final int BARAEK = 2881;
|
||||||
public static final int PIRATE_2882 = 2882;
|
public static final int HORVIK = 2882;
|
||||||
public static final int THUG = 2883;
|
public static final int LOWE = 2883;
|
||||||
public static final int ROGUE = 2884;
|
public static final int SHOP_KEEPER_2884 = 2884;
|
||||||
public static final int MONK_OF_ZAMORAK = 2885;
|
public static final int SHOP_ASSISTANT_2885 = 2885;
|
||||||
public static final int MONK_OF_ZAMORAK_2886 = 2886;
|
public static final int AUBURY = 2886;
|
||||||
public static final int MONK_OF_ZAMORAK_2887 = 2887;
|
public static final int FANCY_DRESS_SHOP_OWNER = 2887;
|
||||||
public static final int TRIBESMAN = 2888;
|
public static final int SHOP_KEEPER_2888 = 2888;
|
||||||
public static final int DARK_WARRIOR = 2889;
|
public static final int GRUM_2889 = 2889;
|
||||||
public static final int CHAOS_DRUID_WARRIOR = 2890;
|
public static final int WYDIN_2890 = 2890;
|
||||||
public static final int NECROMANCER = 2891;
|
public static final int GERRANT_2891 = 2891;
|
||||||
public static final int BANDIT_2892 = 2892;
|
public static final int BRIAN = 2892;
|
||||||
public static final int GUARD_BANDIT = 2893;
|
public static final int JIMINUA = 2893;
|
||||||
public static final int BARBARIAN_GUARD = 2894;
|
public static final int SHOP_KEEPER_2894 = 2894;
|
||||||
public static final int COOK_2895 = 2895;
|
public static final int COOK_2895 = 2895;
|
||||||
public static final int COOK_2896 = 2896;
|
public static final int COOK_2896 = 2896;
|
||||||
public static final int BANKER_2897 = 2897;
|
public static final int BANKER_2897 = 2897;
|
||||||
@@ -3022,23 +3015,23 @@ public final class NpcID
|
|||||||
public static final int EMERALD_BENEDICT = 3194;
|
public static final int EMERALD_BENEDICT = 3194;
|
||||||
public static final int SPIN_BLADES = 3195;
|
public static final int SPIN_BLADES = 3195;
|
||||||
public static final int SPIN_BLADES_3196 = 3196;
|
public static final int SPIN_BLADES_3196 = 3196;
|
||||||
public static final int SNAKE_3199 = 3199;
|
public static final int CANDLE_MAKER = 3199;
|
||||||
public static final int MONKEY_3200 = 3200;
|
public static final int ARHEIN = 3200;
|
||||||
public static final int ALBINO_BAT = 3201;
|
public static final int JUKAT = 3201;
|
||||||
public static final int CRAB_3202 = 3202;
|
public static final int LUNDERWIN = 3202;
|
||||||
public static final int GIANT_MOSQUITO = 3203;
|
public static final int IRKSOL = 3203;
|
||||||
public static final int JUNGLE_HORROR = 3204;
|
public static final int FAIRY_3204 = 3204;
|
||||||
public static final int JUNGLE_HORROR_3205 = 3205;
|
public static final int ZAMBO = 3205;
|
||||||
public static final int JUNGLE_HORROR_3206 = 3206;
|
public static final int SILVER_MERCHANT = 3206;
|
||||||
public static final int JUNGLE_HORROR_3207 = 3207;
|
public static final int GEM_MERCHANT = 3207;
|
||||||
public static final int JUNGLE_HORROR_3208 = 3208;
|
public static final int BAKER = 3208;
|
||||||
public static final int CAVE_HORROR = 3209;
|
public static final int SPICE_SELLER = 3209;
|
||||||
public static final int CAVE_HORROR_3210 = 3210;
|
public static final int FUR_TRADER = 3210;
|
||||||
public static final int CAVE_HORROR_3211 = 3211;
|
public static final int SILK_MERCHANT = 3211;
|
||||||
public static final int CAVE_HORROR_3212 = 3212;
|
public static final int HICKTON = 3212;
|
||||||
public static final int CAVE_HORROR_3213 = 3213;
|
public static final int HARRY = 3213;
|
||||||
public static final int CAVEY_DAVEY = 3214;
|
public static final int CASSIE = 3214;
|
||||||
public static final int PATCHY = 3215;
|
public static final int FRINCOS = 3215;
|
||||||
public static final int MELEE_COMBAT_TUTOR = 3216;
|
public static final int MELEE_COMBAT_TUTOR = 3216;
|
||||||
public static final int RANGED_COMBAT_TUTOR = 3217;
|
public static final int RANGED_COMBAT_TUTOR = 3217;
|
||||||
public static final int MAGIC_COMBAT_TUTOR = 3218;
|
public static final int MAGIC_COMBAT_TUTOR = 3218;
|
||||||
@@ -4354,7 +4347,7 @@ public final class NpcID
|
|||||||
public static final int GEM_MERCHANT_4581 = 4581;
|
public static final int GEM_MERCHANT_4581 = 4581;
|
||||||
public static final int SILVER_MERCHANT_4582 = 4582;
|
public static final int SILVER_MERCHANT_4582 = 4582;
|
||||||
public static final int SILK_MERCHANT_4583 = 4583;
|
public static final int SILK_MERCHANT_4583 = 4583;
|
||||||
public static final int ZENESHA_4584 = 4584;
|
public static final int ZENESHA = 4584;
|
||||||
public static final int ALI_MORRISANE_4585 = 4585;
|
public static final int ALI_MORRISANE_4585 = 4585;
|
||||||
public static final int GRIMESQUIT = 4586;
|
public static final int GRIMESQUIT = 4586;
|
||||||
public static final int PHINGSPET = 4587;
|
public static final int PHINGSPET = 4587;
|
||||||
@@ -5591,11 +5584,11 @@ public final class NpcID
|
|||||||
public static final int TZREKJAD = 5892;
|
public static final int TZREKJAD = 5892;
|
||||||
public static final int TZREKJAD_5893 = 5893;
|
public static final int TZREKJAD_5893 = 5893;
|
||||||
public static final int BAST = 5894;
|
public static final int BAST = 5894;
|
||||||
public static final int BANKER_5895 = 5895;
|
public static final int DROGO_DWARF = 5895;
|
||||||
public static final int BANKER_5896 = 5896;
|
public static final int FLYNN = 5896;
|
||||||
public static final int BANKER_5897 = 5897;
|
public static final int WAYNE = 5897;
|
||||||
public static final int BANKER_5904 = 5904;
|
public static final int DWARF_5904 = 5904;
|
||||||
public static final int BANKER_5905 = 5905;
|
public static final int BETTY_5905 = 5905;
|
||||||
public static final int PROBITA = 5906;
|
public static final int PROBITA = 5906;
|
||||||
public static final int CHAOS_ELEMENTAL_JR_5907 = 5907;
|
public static final int CHAOS_ELEMENTAL_JR_5907 = 5907;
|
||||||
public static final int ABYSSAL_SIRE_5908 = 5908;
|
public static final int ABYSSAL_SIRE_5908 = 5908;
|
||||||
@@ -6021,8 +6014,8 @@ public final class NpcID
|
|||||||
public static final int FIDELIO = 6525;
|
public static final int FIDELIO = 6525;
|
||||||
public static final int SBOTT = 6526;
|
public static final int SBOTT = 6526;
|
||||||
public static final int ROAVAR = 6527;
|
public static final int ROAVAR = 6527;
|
||||||
public static final int BANKER_6529 = 6529;
|
public static final int HERQUIN = 6529;
|
||||||
public static final int BANKER_6530 = 6530;
|
public static final int ROMMIK = 6530;
|
||||||
public static final int BLURBERRY = 6531;
|
public static final int BLURBERRY = 6531;
|
||||||
public static final int BARMAN_6532 = 6532;
|
public static final int BARMAN_6532 = 6532;
|
||||||
public static final int ROMILY_WEAKLAX = 6533;
|
public static final int ROMILY_WEAKLAX = 6533;
|
||||||
@@ -7135,7 +7128,7 @@ public final class NpcID
|
|||||||
public static final int ANCIENT_WYVERN = 7795;
|
public static final int ANCIENT_WYVERN = 7795;
|
||||||
public static final int LOBSTROSITY = 7796;
|
public static final int LOBSTROSITY = 7796;
|
||||||
public static final int ANCIENT_ZYGOMITE = 7797;
|
public static final int ANCIENT_ZYGOMITE = 7797;
|
||||||
public static final int ANCIENT_FUNGI = 7798;
|
public static final int GAIUS = 7798;
|
||||||
public static final int AMMONITE_CRAB = 7799;
|
public static final int AMMONITE_CRAB = 7799;
|
||||||
public static final int FOSSIL_ROCK = 7800;
|
public static final int FOSSIL_ROCK = 7800;
|
||||||
public static final int TAR_BUBBLES = 7801;
|
public static final int TAR_BUBBLES = 7801;
|
||||||
@@ -7745,7 +7738,7 @@ public final class NpcID
|
|||||||
public static final int TRAPPED_SOUL_HARD = 8529;
|
public static final int TRAPPED_SOUL_HARD = 8529;
|
||||||
public static final int AMELIA_8530 = 8530;
|
public static final int AMELIA_8530 = 8530;
|
||||||
public static final int ALLANNA = 8531;
|
public static final int ALLANNA = 8531;
|
||||||
public static final int LEKE_QUO_KERAN = 8532;
|
public static final int JATIX = 8532;
|
||||||
public static final int NIKKIE = 8533;
|
public static final int NIKKIE = 8533;
|
||||||
public static final int ROSIE = 8534;
|
public static final int ROSIE = 8534;
|
||||||
public static final int ALAN = 8535;
|
public static final int ALAN = 8535;
|
||||||
@@ -7855,11 +7848,23 @@ public final class NpcID
|
|||||||
public static final int ILFEEN_8677 = 8677;
|
public static final int ILFEEN_8677 = 8677;
|
||||||
public static final int FERAL_VAMPYRE_8678 = 8678;
|
public static final int FERAL_VAMPYRE_8678 = 8678;
|
||||||
public static final int ABIDOR_CRANK_8679 = 8679;
|
public static final int ABIDOR_CRANK_8679 = 8679;
|
||||||
public static final int BANKER_8680 = 8680;
|
public static final int DAVON = 8680;
|
||||||
public static final int BANKER_8681 = 8681;
|
public static final int ZENESHA_8681 = 8681;
|
||||||
public static final int BANKER_8682 = 8682;
|
public static final int AEMAD = 8682;
|
||||||
public static final int PORTAL_8684 = 8684;
|
public static final int KORTAN = 8683;
|
||||||
public static final int PORTAL_8686 = 8686;
|
public static final int ROACHEY = 8684;
|
||||||
|
public static final int FRENITA = 8685;
|
||||||
|
public static final int NURMOF = 8686;
|
||||||
|
public static final int TEA_SELLER = 8687;
|
||||||
|
public static final int FAT_TONY = 8688;
|
||||||
|
public static final int ANCIENT_FUNGI = 8690;
|
||||||
|
public static final int ANCIENT_FUNGI_8691 = 8691;
|
||||||
|
public static final int NOTERAZZO = 8692;
|
||||||
|
public static final int DIANGO = 8693;
|
||||||
|
public static final int BRIAN_8694 = 8694;
|
||||||
public static final int MOSOL_REI_8696 = 8696;
|
public static final int MOSOL_REI_8696 = 8696;
|
||||||
|
public static final int LEKE_QUO_KERAN = 8697;
|
||||||
|
public static final int MONK_OF_ZAMORAK_8698 = 8698;
|
||||||
|
public static final int LARRAN = 8699;
|
||||||
/* This file is automatically generated. Do not edit. */
|
/* This file is automatically generated. Do not edit. */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12456,5 +12456,12 @@ public final class NullItemID
|
|||||||
public static final int NULL_23455 = 23455;
|
public static final int NULL_23455 = 23455;
|
||||||
public static final int NULL_23456 = 23456;
|
public static final int NULL_23456 = 23456;
|
||||||
public static final int NULL_23457 = 23457;
|
public static final int NULL_23457 = 23457;
|
||||||
|
public static final int NULL_23459 = 23459;
|
||||||
|
public static final int NULL_23487 = 23487;
|
||||||
|
public static final int NULL_23488 = 23488;
|
||||||
|
public static final int NULL_23491 = 23491;
|
||||||
|
public static final int NULL_23492 = 23492;
|
||||||
|
public static final int NULL_23493 = 23493;
|
||||||
|
public static final int NULL_23494 = 23494;
|
||||||
/* This file is automatically generated. Do not edit. */
|
/* This file is automatically generated. Do not edit. */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16209,5 +16209,7 @@ public final class NullObjectID
|
|||||||
public static final int NULL_34823 = 34823;
|
public static final int NULL_34823 = 34823;
|
||||||
public static final int NULL_34824 = 34824;
|
public static final int NULL_34824 = 34824;
|
||||||
public static final int NULL_34825 = 34825;
|
public static final int NULL_34825 = 34825;
|
||||||
|
public static final int NULL_34831 = 34831;
|
||||||
|
public static final int NULL_34832 = 34832;
|
||||||
/* This file is automatically generated. Do not edit. */
|
/* This file is automatically generated. Do not edit. */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16133,7 +16133,7 @@ public final class ObjectID
|
|||||||
public static final int GRAND_EXCHANGE_BOOTH_30390 = 30390;
|
public static final int GRAND_EXCHANGE_BOOTH_30390 = 30390;
|
||||||
public static final int IRON_LADDER_30391 = 30391;
|
public static final int IRON_LADDER_30391 = 30391;
|
||||||
public static final int IRON_LADDER_30392 = 30392;
|
public static final int IRON_LADDER_30392 = 30392;
|
||||||
public static final int JADFEST_PORTAL = 30395;
|
public static final int MYSTERIOUS_POOL = 30395;
|
||||||
public static final int SHIMMERING_BARRIER_30396 = 30396;
|
public static final int SHIMMERING_BARRIER_30396 = 30396;
|
||||||
public static final int SHIMMERING_BARRIER_30397 = 30397;
|
public static final int SHIMMERING_BARRIER_30397 = 30397;
|
||||||
public static final int SHIMMERING_BARRIER_30398 = 30398;
|
public static final int SHIMMERING_BARRIER_30398 = 30398;
|
||||||
@@ -17528,7 +17528,7 @@ public final class ObjectID
|
|||||||
public static final int FIRE_OF_DEHUMIDIFICATION = 33322;
|
public static final int FIRE_OF_DEHUMIDIFICATION = 33322;
|
||||||
public static final int PILE_OF_RUBBLE_33340 = 33340;
|
public static final int PILE_OF_RUBBLE_33340 = 33340;
|
||||||
public static final int PILE_OF_RUBBLE_33341 = 33341;
|
public static final int PILE_OF_RUBBLE_33341 = 33341;
|
||||||
public static final int HUB_PORTAL = 33343;
|
public static final int LARRANS_SMALL_CHEST = 33343;
|
||||||
public static final int BROKEN_WALL_33344 = 33344;
|
public static final int BROKEN_WALL_33344 = 33344;
|
||||||
public static final int PORTAL_NEXUS_SPACE = 33346;
|
public static final int PORTAL_NEXUS_SPACE = 33346;
|
||||||
public static final int RUG_SPACE_33347 = 33347;
|
public static final int RUG_SPACE_33347 = 33347;
|
||||||
@@ -18605,5 +18605,10 @@ public final class ObjectID
|
|||||||
public static final int RUBBLE_34803 = 34803;
|
public static final int RUBBLE_34803 = 34803;
|
||||||
public static final int RUBBLE_34804 = 34804;
|
public static final int RUBBLE_34804 = 34804;
|
||||||
public static final int RUBBLE_34805 = 34805;
|
public static final int RUBBLE_34805 = 34805;
|
||||||
|
public static final int JADFEST_PORTAL = 34826;
|
||||||
|
public static final int HUB_PORTAL = 34827;
|
||||||
|
public static final int LARRANS_SMALL_CHEST_34828 = 34828;
|
||||||
|
public static final int LARRANS_BIG_CHEST = 34829;
|
||||||
|
public static final int LARRANS_BIG_CHEST_34830 = 34830;
|
||||||
/* This file is automatically generated. Do not edit. */
|
/* This file is automatically generated. Do not edit. */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,6 +110,16 @@ public final class ScriptID
|
|||||||
*/
|
*/
|
||||||
public static final int KEPT_LOST_ITEM_EXAMINE = 1603;
|
public static final int KEPT_LOST_ITEM_EXAMINE = 1603;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Displays the game messages when clicking on an item inside the Items Kept on Death interface
|
||||||
|
* <ul>
|
||||||
|
* <li> int (boolean) Item kept on death </li>
|
||||||
|
* <li> int Item Quantity </li>
|
||||||
|
* <li> String Item Name </li>
|
||||||
|
* </ul>
|
||||||
|
*/
|
||||||
|
public static final int DEATH_KEEP_ITEM_EXAMINE = 1603;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks the state of the given stash unit.
|
* Checks the state of the given stash unit.
|
||||||
* <ul>
|
* <ul>
|
||||||
|
|||||||
@@ -1564,9 +1564,28 @@ public final class SpriteID
|
|||||||
public static final int MOBILE_FUNCTION_MODE_DISABLED = 1624;
|
public static final int MOBILE_FUNCTION_MODE_DISABLED = 1624;
|
||||||
public static final int MOBILE_YELLOW_TOUCH_ANIMATION_1 = 1625;
|
public static final int MOBILE_YELLOW_TOUCH_ANIMATION_1 = 1625;
|
||||||
public static final int MOBILE_YELLOW_TOUCH_ANIMATION_2 = 1626;
|
public static final int MOBILE_YELLOW_TOUCH_ANIMATION_2 = 1626;
|
||||||
|
/* Unmapped: 1627~1707 */
|
||||||
public static final int TAB_MAGIC_SPELLBOOK_ARCEUUS_UNUSED = 1708;
|
public static final int TAB_MAGIC_SPELLBOOK_ARCEUUS_UNUSED = 1708;
|
||||||
|
/* Unmapped: 1709, 1710 */
|
||||||
public static final int TAB_MAGIC_SPELLBOOK_ARCEUUS = 1711;
|
public static final int TAB_MAGIC_SPELLBOOK_ARCEUUS = 1711;
|
||||||
public static final int BIG_ASS_GUTHIX_SPELL = 1774;
|
public static final int BIG_ASS_GUTHIX_SPELL = 1774;
|
||||||
public static final int BIG_SUPERHEAT = 1800;
|
public static final int BIG_SUPERHEAT = 1800;
|
||||||
public static final int BIG_SPEC_TRANSFER = 1959;
|
public static final int BIG_SPEC_TRANSFER = 1959;
|
||||||
|
/* Unmapped: 1712~2175 */
|
||||||
|
public static final int HEALTHBAR_DEFAULT_FRONT_30PX = 2176;
|
||||||
|
public static final int HEALTHBAR_DEFAULT_BACK_30PX = 2177;
|
||||||
|
public static final int HEALTHBAR_DEFAULT_FRONT_50PX = 2178;
|
||||||
|
public static final int HEALTHBAR_DEFAULT_BACK_50PX = 2179;
|
||||||
|
public static final int HEALTHBAR_DEFAULT_FRONT_60PX = 2180;
|
||||||
|
public static final int HEALTHBAR_DEFAULT_BACK_60PX = 2181;
|
||||||
|
public static final int HEALTHBAR_DEFAULT_FRONT_80PX = 2182;
|
||||||
|
public static final int HEALTHBAR_DEFAULT_BACK_80PX = 2183;
|
||||||
|
public static final int HEALTHBAR_DEFAULT_FRONT_100PX = 2184;
|
||||||
|
public static final int HEALTHBAR_DEFAULT_BACK_100PX = 2185;
|
||||||
|
public static final int HEALTHBAR_DEFAULT_FRONT_120PX = 2186;
|
||||||
|
public static final int HEALTHBAR_DEFAULT_BACK_120PX = 2187;
|
||||||
|
public static final int HEALTHBAR_DEFAULT_FRONT_140PX = 2188;
|
||||||
|
public static final int HEALTHBAR_DEFAULT_BACK_140PX = 2189;
|
||||||
|
public static final int HEALTHBAR_DEFAULT_FRONT_160PX = 2190;
|
||||||
|
public static final int HEALTHBAR_DEFAULT_BACK_160PX = 2191;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -295,6 +295,15 @@ public enum Varbits
|
|||||||
THEATRE_OF_BLOOD(6440),
|
THEATRE_OF_BLOOD(6440),
|
||||||
BLOAT_DOOR(6447),
|
BLOAT_DOOR(6447),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Theatre of Blood orb varbits each number stands for the player's health on a scale of 1-27 (I think), 0 hides the orb
|
||||||
|
*/
|
||||||
|
THEATRE_OF_BLOOD_ORB_1(6442),
|
||||||
|
THEATRE_OF_BLOOD_ORB_2(6443),
|
||||||
|
THEATRE_OF_BLOOD_ORB_3(6444),
|
||||||
|
THEATRE_OF_BLOOD_ORB_4(6445),
|
||||||
|
THEATRE_OF_BLOOD_ORB_5(6446),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Nightmare Zone
|
* Nightmare Zone
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -113,4 +113,14 @@ public enum WorldType
|
|||||||
{
|
{
|
||||||
return worldTypes.stream().anyMatch(PVP_WORLD_TYPES::contains);
|
return worldTypes.stream().anyMatch(PVP_WORLD_TYPES::contains);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks to see if a collection of WorlTypes is a Deadman Mode World
|
||||||
|
* @param worldTypes The List of world types for a world
|
||||||
|
* @return true if it is deadman, false otherwise
|
||||||
|
*/
|
||||||
|
public static boolean isDeadmanWorld(final Collection<WorldType> worldTypes)
|
||||||
|
{
|
||||||
|
return worldTypes.stream().anyMatch(EnumSet.of(DEADMAN, DEADMAN_TOURNAMENT, SEASONAL_DEADMAN)::contains);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public enum SlayerUnlock
|
|||||||
TZHARR_ENABLE(18),
|
TZHARR_ENABLE(18),
|
||||||
BOSS_ENABLE(19),
|
BOSS_ENABLE(19),
|
||||||
BLOODVELD_EXTEND(20),
|
BLOODVELD_EXTEND(20),
|
||||||
ABBERANT_SPECTRE_EXTEND(21),
|
ABERRANT_SPECTRE_EXTEND(21),
|
||||||
AVIANSIES_EXTEND(22),
|
AVIANSIES_EXTEND(22),
|
||||||
MITHRIL_DRAGON_EXTEND(23),
|
MITHRIL_DRAGON_EXTEND(23),
|
||||||
CAVE_HORROR_EXTEND(24),
|
CAVE_HORROR_EXTEND(24),
|
||||||
@@ -79,7 +79,7 @@ public enum SlayerUnlock
|
|||||||
RUNE_DRAGON_EXTEND(41),
|
RUNE_DRAGON_EXTEND(41),
|
||||||
VORKATH_SLAYER_HELM(42),
|
VORKATH_SLAYER_HELM(42),
|
||||||
FOSSIL_ISLAND_WYVERN_DISABLE(43, Varbits.FOSSIL_ISLAND_WYVERN_DISABLE),
|
FOSSIL_ISLAND_WYVERN_DISABLE(43, Varbits.FOSSIL_ISLAND_WYVERN_DISABLE),
|
||||||
GROTESQUE_GARDIAN_DOUBLE_COUNT(44);
|
GROTESQUE_GUARDIAN_DOUBLE_COUNT(44);
|
||||||
|
|
||||||
private Varbits toggleVarbit;
|
private Varbits toggleVarbit;
|
||||||
|
|
||||||
|
|||||||
@@ -149,6 +149,7 @@ public class WidgetID
|
|||||||
public static final int BEGINNER_CLUE_MAP_NORTH_OF_FALADOR = 351;
|
public static final int BEGINNER_CLUE_MAP_NORTH_OF_FALADOR = 351;
|
||||||
public static final int BEGINNER_CLUE_MAP_WIZARDS_TOWER = 356;
|
public static final int BEGINNER_CLUE_MAP_WIZARDS_TOWER = 356;
|
||||||
public static final int SEED_BOX_GROUP_ID = 128;
|
public static final int SEED_BOX_GROUP_ID = 128;
|
||||||
|
public static final int ITEMS_KEPT_ON_DEATH_GROUP_ID = 4;
|
||||||
|
|
||||||
static class WorldMap
|
static class WorldMap
|
||||||
{
|
{
|
||||||
@@ -962,9 +963,9 @@ public class WidgetID
|
|||||||
static final int ATTACK_RANGE = 59; // OUTDATED?
|
static final int ATTACK_RANGE = 59; // OUTDATED?
|
||||||
static final int BOUNTY_HUNTER_INFO = 19;
|
static final int BOUNTY_HUNTER_INFO = 19;
|
||||||
static final int KILLDEATH_RATIO = 15;
|
static final int KILLDEATH_RATIO = 15;
|
||||||
static final int SKULL_CONTAINER = 62;
|
static final int SKULL_CONTAINER = 61;
|
||||||
static final int SAFE_ZONE = 64;
|
static final int SAFE_ZONE = 63;
|
||||||
static final int WILDERNESS_LEVEL = 67; // this can also be the Deadman Mode "Protection" text
|
static final int WILDERNESS_LEVEL = 66; // this can also be the Deadman Mode "Protection" text
|
||||||
}
|
}
|
||||||
|
|
||||||
static class KourendFavour
|
static class KourendFavour
|
||||||
@@ -1047,12 +1048,13 @@ public class WidgetID
|
|||||||
static class KeptOnDeath
|
static class KeptOnDeath
|
||||||
{
|
{
|
||||||
static final int KEPT_ITEMS_CONTAINER = 18;
|
static final int KEPT_ITEMS_CONTAINER = 18;
|
||||||
|
static final int KEPT_ITEMS_TEXT = 17;
|
||||||
|
static final int LOST_ITEMS_TEXT = 20;
|
||||||
static final int LOST_ITEMS_CONTAINER = 21;
|
static final int LOST_ITEMS_CONTAINER = 21;
|
||||||
static final int LOST_ITEMS_VALUE = 23;
|
static final int LOST_ITEMS_VALUE = 23;
|
||||||
static final int INFORMATION_CONTAINER = 29;
|
static final int INFORMATION_CONTAINER = 29;
|
||||||
static final int MAX_ITEMS_KEPT_ON_DEATH = 30;
|
static final int MAX_ITEMS_KEPT_ON_DEATH = 30;
|
||||||
static final int SAFE_ZONE_CONTAINER = 31;
|
static final int SAFE_ZONE_CONTAINER = 31;
|
||||||
|
|
||||||
static final int CUSTOM_TEXT_CONTAINER = 33;
|
static final int CUSTOM_TEXT_CONTAINER = 33;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -739,7 +739,10 @@ public enum WidgetInfo
|
|||||||
XP_DROP_4(WidgetID.EXPERIENCE_DROP_GROUP_ID, WidgetID.ExperienceDrop.DROP_4),
|
XP_DROP_4(WidgetID.EXPERIENCE_DROP_GROUP_ID, WidgetID.ExperienceDrop.DROP_4),
|
||||||
XP_DROP_5(WidgetID.EXPERIENCE_DROP_GROUP_ID, WidgetID.ExperienceDrop.DROP_5),
|
XP_DROP_5(WidgetID.EXPERIENCE_DROP_GROUP_ID, WidgetID.ExperienceDrop.DROP_5),
|
||||||
XP_DROP_6(WidgetID.EXPERIENCE_DROP_GROUP_ID, WidgetID.ExperienceDrop.DROP_6),
|
XP_DROP_6(WidgetID.EXPERIENCE_DROP_GROUP_ID, WidgetID.ExperienceDrop.DROP_6),
|
||||||
XP_DROP_7(WidgetID.EXPERIENCE_DROP_GROUP_ID, WidgetID.ExperienceDrop.DROP_7);
|
XP_DROP_7(WidgetID.EXPERIENCE_DROP_GROUP_ID, WidgetID.ExperienceDrop.DROP_7),
|
||||||
|
|
||||||
|
ITEMS_KEPT_ON_DEATH_TEXT(WidgetID.ITEMS_KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.KEPT_ITEMS_TEXT),
|
||||||
|
ITEMS_LOST_ON_DEATH_TEXT(WidgetID.ITEMS_KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.LOST_ITEMS_TEXT);
|
||||||
|
|
||||||
private final int groupId;
|
private final int groupId;
|
||||||
private final int childId;
|
private final int childId;
|
||||||
|
|||||||
+7
-18
@@ -29,7 +29,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>net.runelite</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>runelite-parent</artifactId>
|
<artifactId>runelite-parent</artifactId>
|
||||||
<version>1.5.27-SNAPSHOT</version>
|
<version>1.5.28-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>client</artifactId>
|
<artifactId>client</artifactId>
|
||||||
@@ -209,11 +209,12 @@
|
|||||||
<groupId>net.runelite.rs</groupId>
|
<groupId>net.runelite.rs</groupId>
|
||||||
<artifactId>runescape-api</artifactId>
|
<artifactId>runescape-api</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.runelit</groupId>
|
<groupId>net.runelite</groupId>
|
||||||
<artifactId>client-patch</artifactId>
|
<artifactId>injected-client</artifactId>
|
||||||
<version>1.5.26.2</version>
|
<version>${project.version}</version>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -232,11 +233,6 @@
|
|||||||
<version>${runelite.orange.extensions.version}</version>
|
<version>${runelite.orange.extensions.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>net.runelite.rs</groupId>
|
|
||||||
<artifactId>runescape-api</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
@@ -339,8 +335,8 @@
|
|||||||
<filters>
|
<filters>
|
||||||
<!-- include runtime apis -->
|
<!-- include runtime apis -->
|
||||||
<filter>
|
<filter>
|
||||||
<!-- net.runelite:client-patch and net.runelite:api -->
|
<!-- net.runelite:injected-client and net.runelite:api -->
|
||||||
<artifact>net.runelite:api</artifact>
|
<artifact>net.runelite:*</artifact>
|
||||||
<includes>
|
<includes>
|
||||||
<include>**</include>
|
<include>**</include>
|
||||||
</includes>
|
</includes>
|
||||||
@@ -351,13 +347,6 @@
|
|||||||
<include>**</include>
|
<include>**</include>
|
||||||
</includes>
|
</includes>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
|
||||||
<!-- net.runelit:client-patch -->
|
|
||||||
<artifact>net.runelit:client-patch</artifact>
|
|
||||||
<includes>
|
|
||||||
<include>**</include>
|
|
||||||
</includes>
|
|
||||||
</filter>
|
|
||||||
<filter>
|
<filter>
|
||||||
<artifact>net.runelite.pushingpixels:*</artifact>
|
<artifact>net.runelite.pushingpixels:*</artifact>
|
||||||
<includes>
|
<includes>
|
||||||
|
|||||||
@@ -46,11 +46,13 @@ import javax.inject.Singleton;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.runelite.api.ChatMessageType;
|
import net.runelite.api.ChatMessageType;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
|
import net.runelite.api.Constants;
|
||||||
import net.runelite.api.GameState;
|
import net.runelite.api.GameState;
|
||||||
import net.runelite.client.chat.ChatColorType;
|
import net.runelite.client.chat.ChatColorType;
|
||||||
import net.runelite.client.chat.ChatMessageBuilder;
|
import net.runelite.client.chat.ChatMessageBuilder;
|
||||||
import net.runelite.client.chat.ChatMessageManager;
|
import net.runelite.client.chat.ChatMessageManager;
|
||||||
import net.runelite.client.chat.QueuedMessage;
|
import net.runelite.client.chat.QueuedMessage;
|
||||||
|
import net.runelite.client.config.FlashNotification;
|
||||||
import net.runelite.client.config.RuneLiteConfig;
|
import net.runelite.client.config.RuneLiteConfig;
|
||||||
import net.runelite.client.ui.ClientUI;
|
import net.runelite.client.ui.ClientUI;
|
||||||
import net.runelite.client.util.OSType;
|
import net.runelite.client.util.OSType;
|
||||||
@@ -68,7 +70,8 @@ public class Notifier
|
|||||||
|
|
||||||
// Notifier properties
|
// Notifier properties
|
||||||
private static final Color FLASH_COLOR = new Color(255, 0, 0, 70);
|
private static final Color FLASH_COLOR = new Color(255, 0, 0, 70);
|
||||||
private static final int FLASH_DURATION = 2000;
|
private static final int MINIMUM_FLASH_DURATION_MILLIS = 2000;
|
||||||
|
private static final int MINIMUM_FLASH_DURATION_TICKS = MINIMUM_FLASH_DURATION_MILLIS / Constants.CLIENT_TICK_LENGTH;
|
||||||
|
|
||||||
private final Client client;
|
private final Client client;
|
||||||
private final String appName;
|
private final String appName;
|
||||||
@@ -79,6 +82,7 @@ public class Notifier
|
|||||||
private final Path notifyIconPath;
|
private final Path notifyIconPath;
|
||||||
private final boolean terminalNotifierAvailable;
|
private final boolean terminalNotifierAvailable;
|
||||||
private Instant flashStart;
|
private Instant flashStart;
|
||||||
|
private long mouseLastPressedMillis;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Notifier(
|
private Notifier(
|
||||||
@@ -146,9 +150,10 @@ public class Notifier
|
|||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (runeLiteConfig.enableFlashNotification())
|
if (runeLiteConfig.flashNotification() != FlashNotification.DISABLED)
|
||||||
{
|
{
|
||||||
flashStart = Instant.now();
|
flashStart = Instant.now();
|
||||||
|
mouseLastPressedMillis = client.getMouseLastPressedMillis();
|
||||||
}
|
}
|
||||||
|
|
||||||
log.debug(message);
|
log.debug(message);
|
||||||
@@ -156,25 +161,49 @@ public class Notifier
|
|||||||
|
|
||||||
public void processFlash(final Graphics2D graphics)
|
public void processFlash(final Graphics2D graphics)
|
||||||
{
|
{
|
||||||
if (flashStart == null || client.getGameCycle() % 40 >= 20)
|
if (flashStart == null || client.getGameState() != GameState.LOGGED_IN)
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (client.getGameState() != GameState.LOGGED_IN)
|
|
||||||
{
|
{
|
||||||
flashStart = null;
|
flashStart = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FlashNotification flashNotification = runeLiteConfig.flashNotification();
|
||||||
|
|
||||||
|
if (client.getGameCycle() % 40 >= 20
|
||||||
|
// For solid colour, fall through every time.
|
||||||
|
&& (flashNotification == FlashNotification.FLASH_TWO_SECONDS
|
||||||
|
|| flashNotification == FlashNotification.FLASH_UNTIL_CANCELLED))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final Color color = graphics.getColor();
|
final Color color = graphics.getColor();
|
||||||
graphics.setColor(FLASH_COLOR);
|
graphics.setColor(FLASH_COLOR);
|
||||||
graphics.fill(new Rectangle(client.getCanvas().getSize()));
|
graphics.fill(new Rectangle(client.getCanvas().getSize()));
|
||||||
graphics.setColor(color);
|
graphics.setColor(color);
|
||||||
|
|
||||||
if (Instant.now().minusMillis(FLASH_DURATION).isAfter(flashStart))
|
if (!Instant.now().minusMillis(MINIMUM_FLASH_DURATION_MILLIS).isAfter(flashStart))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (flashNotification)
|
||||||
|
{
|
||||||
|
case FLASH_TWO_SECONDS:
|
||||||
|
case SOLID_TWO_SECONDS:
|
||||||
|
flashStart = null;
|
||||||
|
break;
|
||||||
|
case SOLID_UNTIL_CANCELLED:
|
||||||
|
case FLASH_UNTIL_CANCELLED:
|
||||||
|
// Any interaction with the client since the notification started will cancel it after the minimum duration
|
||||||
|
if (client.getMouseIdleTicks() < MINIMUM_FLASH_DURATION_TICKS
|
||||||
|
|| client.getKeyboardIdleTicks() < MINIMUM_FLASH_DURATION_TICKS
|
||||||
|
|| client.getMouseLastPressedMillis() > mouseLastPressedMillis)
|
||||||
{
|
{
|
||||||
flashStart = null;
|
flashStart = null;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendNotification(
|
private void sendNotification(
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class RuneLite
|
public class RuneLite
|
||||||
{
|
{
|
||||||
public static final String RUNELIT_VERSION = "2.0.0";
|
public static final String RUNELIT_VERSION = "2.0.1-1";
|
||||||
public static final File RUNELITE_DIR = new File(System.getProperty("user.home"), ".runelite");
|
public static final File RUNELITE_DIR = new File(System.getProperty("user.home"), ".runelite");
|
||||||
public static final File PROFILES_DIR = new File(RUNELITE_DIR, "profiles");
|
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 PLUGIN_DIR = new File(RUNELITE_DIR, "plugins");
|
||||||
|
|||||||
+13
-12
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2019, ganom <https://github.com/Ganom>
|
* Copyright (c) 2019, Twiglet1022 <https://github.com/Twiglet1022>
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer in the documentation
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
* and/or other materials provided with the distribution.
|
* and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
* 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
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
@@ -21,26 +22,26 @@
|
|||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.coxhelper;
|
package net.runelite.client.config;
|
||||||
|
|
||||||
import java.awt.Font;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public enum FontStyle
|
public enum FlashNotification
|
||||||
{
|
{
|
||||||
BOLD("Bold", Font.BOLD),
|
DISABLED("Off"),
|
||||||
ITALIC("Italic", Font.ITALIC),
|
FLASH_TWO_SECONDS("Flash for 2 seconds"),
|
||||||
PLAIN("Plain", Font.PLAIN);
|
SOLID_TWO_SECONDS("Solid for 2 seconds"),
|
||||||
|
FLASH_UNTIL_CANCELLED("Flash until cancelled"),
|
||||||
|
SOLID_UNTIL_CANCELLED("Solid until cancelled");
|
||||||
|
|
||||||
private String name;
|
private final String type;
|
||||||
private int font;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
return getName();
|
return type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -191,9 +191,9 @@ public interface RuneLiteConfig extends Config
|
|||||||
description = "Flashes the game frame as a notification",
|
description = "Flashes the game frame as a notification",
|
||||||
position = 24
|
position = 24
|
||||||
)
|
)
|
||||||
default boolean enableFlashNotification()
|
default FlashNotification flashNotification()
|
||||||
{
|
{
|
||||||
return false;
|
return FlashNotification.DISABLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
|
|||||||
@@ -44,8 +44,9 @@ import javax.inject.Singleton;
|
|||||||
import lombok.Value;
|
import lombok.Value;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
|
import net.runelite.api.Constants;
|
||||||
import static net.runelite.api.Constants.CLIENT_DEFAULT_ZOOM;
|
import static net.runelite.api.Constants.CLIENT_DEFAULT_ZOOM;
|
||||||
import static net.runelite.api.Constants.HIGH_ALCHEMY_CONSTANT;
|
import static net.runelite.api.Constants.HIGH_ALCHEMY_MULTIPLIER;
|
||||||
import net.runelite.api.GameState;
|
import net.runelite.api.GameState;
|
||||||
import net.runelite.api.ItemDefinition;
|
import net.runelite.api.ItemDefinition;
|
||||||
import net.runelite.api.ItemID;
|
import net.runelite.api.ItemID;
|
||||||
@@ -423,7 +424,7 @@ public class ItemManager
|
|||||||
return 1000;
|
return 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (int) Math.max(1, composition.getPrice() * HIGH_ALCHEMY_CONSTANT);
|
return (int) Math.max(1, composition.getPrice() * HIGH_ALCHEMY_MULTIPLIER);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getAlchValue(int itemID)
|
public int getAlchValue(int itemID)
|
||||||
@@ -437,7 +438,7 @@ public class ItemManager
|
|||||||
return 1000;
|
return 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (int) Math.max(1, getItemDefinition(itemID).getPrice() * HIGH_ALCHEMY_CONSTANT);
|
return (int) Math.max(1, getItemDefinition(itemID).getPrice() * HIGH_ALCHEMY_MULTIPLIER);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -521,7 +522,7 @@ public class ItemManager
|
|||||||
*/
|
*/
|
||||||
private AsyncBufferedImage loadImage(int itemId, int quantity, boolean stackable)
|
private AsyncBufferedImage loadImage(int itemId, int quantity, boolean stackable)
|
||||||
{
|
{
|
||||||
AsyncBufferedImage img = new AsyncBufferedImage(36, 32, BufferedImage.TYPE_INT_ARGB);
|
AsyncBufferedImage img = new AsyncBufferedImage(Constants.ITEM_SPRITE_WIDTH, Constants.ITEM_SPRITE_HEIGHT, BufferedImage.TYPE_INT_ARGB);
|
||||||
clientThread.invoke(() ->
|
clientThread.invoke(() ->
|
||||||
{
|
{
|
||||||
if (client.getGameState().ordinal() < GameState.LOGIN_SCREEN.ordinal())
|
if (client.getGameState().ordinal() < GameState.LOGIN_SCREEN.ordinal())
|
||||||
|
|||||||
@@ -144,10 +144,12 @@ public enum ItemMapping
|
|||||||
// Bounty hunter
|
// Bounty hunter
|
||||||
ITEM_GRANITE_MAUL(GRANITE_MAUL, GRANITE_MAUL_12848),
|
ITEM_GRANITE_MAUL(GRANITE_MAUL, GRANITE_MAUL_12848),
|
||||||
ITEM_MAGIC_SHORTBOW(MAGIC_SHORTBOW, MAGIC_SHORTBOW_I),
|
ITEM_MAGIC_SHORTBOW(MAGIC_SHORTBOW, MAGIC_SHORTBOW_I),
|
||||||
|
ITEM_MAGIC_SHORTBOW_SCROLL(MAGIC_SHORTBOW_SCROLL, MAGIC_SHORTBOW_I),
|
||||||
ITEM_SARADOMINS_BLESSED_SWORD(SARADOMINS_TEAR, SARADOMINS_BLESSED_SWORD),
|
ITEM_SARADOMINS_BLESSED_SWORD(SARADOMINS_TEAR, SARADOMINS_BLESSED_SWORD),
|
||||||
|
|
||||||
// Jewellery with charges
|
// Jewellery with charges
|
||||||
ITEM_RING_OF_WEALTH(RING_OF_WEALTH, RING_OF_WEALTH_I, RING_OF_WEALTH_1, RING_OF_WEALTH_I1, RING_OF_WEALTH_2, RING_OF_WEALTH_I2, RING_OF_WEALTH_3, RING_OF_WEALTH_I3, RING_OF_WEALTH_4, RING_OF_WEALTH_I4, RING_OF_WEALTH_I5),
|
ITEM_RING_OF_WEALTH(RING_OF_WEALTH, RING_OF_WEALTH_I, RING_OF_WEALTH_1, RING_OF_WEALTH_I1, RING_OF_WEALTH_2, RING_OF_WEALTH_I2, RING_OF_WEALTH_3, RING_OF_WEALTH_I3, RING_OF_WEALTH_4, RING_OF_WEALTH_I4, RING_OF_WEALTH_I5),
|
||||||
|
ITEM_RING_OF_WEALTH_SCROLL(RING_OF_WEALTH_SCROLL, RING_OF_WEALTH_I, RING_OF_WEALTH_I1, RING_OF_WEALTH_I2, RING_OF_WEALTH_I3, RING_OF_WEALTH_I4, RING_OF_WEALTH_I5),
|
||||||
ITEM_AMULET_OF_GLORY(AMULET_OF_GLORY, AMULET_OF_GLORY1, AMULET_OF_GLORY2, AMULET_OF_GLORY3, AMULET_OF_GLORY5),
|
ITEM_AMULET_OF_GLORY(AMULET_OF_GLORY, AMULET_OF_GLORY1, AMULET_OF_GLORY2, AMULET_OF_GLORY3, AMULET_OF_GLORY5),
|
||||||
ITEM_AMULET_OF_GLORY_T(AMULET_OF_GLORY_T, AMULET_OF_GLORY_T1, AMULET_OF_GLORY_T2, AMULET_OF_GLORY_T3, AMULET_OF_GLORY_T5),
|
ITEM_AMULET_OF_GLORY_T(AMULET_OF_GLORY_T, AMULET_OF_GLORY_T1, AMULET_OF_GLORY_T2, AMULET_OF_GLORY_T3, AMULET_OF_GLORY_T5),
|
||||||
ITEM_SKILLS_NECKLACE(SKILLS_NECKLACE, SKILLS_NECKLACE1, SKILLS_NECKLACE2, SKILLS_NECKLACE3, SKILLS_NECKLACE5),
|
ITEM_SKILLS_NECKLACE(SKILLS_NECKLACE, SKILLS_NECKLACE1, SKILLS_NECKLACE2, SKILLS_NECKLACE3, SKILLS_NECKLACE5),
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ public class LootManager
|
|||||||
case NpcID.LIZARD:
|
case NpcID.LIZARD:
|
||||||
|
|
||||||
case NpcID.ZYGOMITE:
|
case NpcID.ZYGOMITE:
|
||||||
case NpcID.ZYGOMITE_474:
|
case NpcID.ZYGOMITE_1024:
|
||||||
case NpcID.ANCIENT_ZYGOMITE:
|
case NpcID.ANCIENT_ZYGOMITE:
|
||||||
|
|
||||||
// these monsters die with >0 hp, so we just look for coincident
|
// these monsters die with >0 hp, so we just look for coincident
|
||||||
|
|||||||
+5
-28
@@ -28,40 +28,17 @@
|
|||||||
package net.runelite.client.plugins.aoewarnings;
|
package net.runelite.client.plugins.aoewarnings;
|
||||||
|
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
import net.runelite.api.coords.LocalPoint;
|
import net.runelite.api.coords.LocalPoint;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
class AoeProjectile
|
class AoeProjectile
|
||||||
{
|
{
|
||||||
private final Instant startTime;
|
private final Instant startTime;
|
||||||
private final LocalPoint targetPoint;
|
private final LocalPoint targetPoint;
|
||||||
private final AoeProjectileInfo aoeProjectileInfo;
|
private final AoeProjectileInfo aoeProjectileInfo;
|
||||||
private final int projectileLifetime;
|
private final int projectileLifetime;
|
||||||
|
private final int finalTick;
|
||||||
AoeProjectile(Instant startTime, LocalPoint targetPoint, AoeProjectileInfo aoeProjectileInfo, int projectileLifetime)
|
|
||||||
{
|
|
||||||
this.startTime = startTime;
|
|
||||||
this.targetPoint = targetPoint;
|
|
||||||
this.aoeProjectileInfo = aoeProjectileInfo;
|
|
||||||
this.projectileLifetime = projectileLifetime;
|
|
||||||
}
|
|
||||||
|
|
||||||
Instant getStartTime()
|
|
||||||
{
|
|
||||||
return startTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
LocalPoint getTargetPoint()
|
|
||||||
{
|
|
||||||
return targetPoint;
|
|
||||||
}
|
|
||||||
|
|
||||||
AoeProjectileInfo getAoeProjectileInfo()
|
|
||||||
{
|
|
||||||
return aoeProjectileInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
int getProjectileLifetime()
|
|
||||||
{
|
|
||||||
return projectileLifetime;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
+154
-61
@@ -27,14 +27,36 @@
|
|||||||
package net.runelite.client.plugins.aoewarnings;
|
package net.runelite.client.plugins.aoewarnings;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
import java.awt.Font;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
import net.runelite.client.config.Config;
|
import net.runelite.client.config.Config;
|
||||||
import net.runelite.client.config.ConfigGroup;
|
import net.runelite.client.config.ConfigGroup;
|
||||||
import net.runelite.client.config.ConfigItem;
|
import net.runelite.client.config.ConfigItem;
|
||||||
|
import net.runelite.client.config.Range;
|
||||||
import net.runelite.client.config.Stub;
|
import net.runelite.client.config.Stub;
|
||||||
|
|
||||||
@ConfigGroup("aoe")
|
@ConfigGroup("aoe")
|
||||||
public interface AoeWarningConfig extends Config
|
public interface AoeWarningConfig extends Config
|
||||||
{
|
{
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum FontStyle
|
||||||
|
{
|
||||||
|
BOLD("Bold", Font.BOLD),
|
||||||
|
ITALIC("Italic", Font.ITALIC),
|
||||||
|
PLAIN("Plain", Font.PLAIN);
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private int font;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "aoeNotifyAll",
|
keyName = "aoeNotifyAll",
|
||||||
name = "Notify for all AoE warnings",
|
name = "Notify for all AoE warnings",
|
||||||
@@ -105,11 +127,82 @@ public interface AoeWarningConfig extends Config
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "tickTimers",
|
||||||
|
name = "Tick Timers",
|
||||||
|
description = "Configures whether or not AoE Projectile Warnings has tick timers overlaid as well.",
|
||||||
|
parent = "overlayStub",
|
||||||
|
position = 6
|
||||||
|
)
|
||||||
|
default boolean tickTimers()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
position = 7,
|
||||||
|
keyName = "text",
|
||||||
|
name = "Text",
|
||||||
|
description = "",
|
||||||
|
hidden = true,
|
||||||
|
unhide = "tickTimers"
|
||||||
|
)
|
||||||
|
default Stub text()
|
||||||
|
{
|
||||||
|
return new Stub();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
position = 8,
|
||||||
|
keyName = "fontStyle",
|
||||||
|
name = "Font Style",
|
||||||
|
description = "Bold/Italics/Plain",
|
||||||
|
parent = "text",
|
||||||
|
hidden = true,
|
||||||
|
unhide = "tickTimers"
|
||||||
|
)
|
||||||
|
default FontStyle fontStyle()
|
||||||
|
{
|
||||||
|
return FontStyle.BOLD;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Range(
|
||||||
|
min = 20,
|
||||||
|
max = 40
|
||||||
|
)
|
||||||
|
@ConfigItem(
|
||||||
|
position = 9,
|
||||||
|
keyName = "textSize",
|
||||||
|
name = "Text Size",
|
||||||
|
description = "Text Size for Timers.",
|
||||||
|
parent = "text",
|
||||||
|
hidden = true,
|
||||||
|
unhide = "tickTimers"
|
||||||
|
)
|
||||||
|
default int textSize()
|
||||||
|
{
|
||||||
|
return 32;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
position = 10,
|
||||||
|
keyName = "shadows",
|
||||||
|
name = "Shadows",
|
||||||
|
description = "Adds Shadows to text.",
|
||||||
|
parent = "text",
|
||||||
|
hidden = true,
|
||||||
|
unhide = "tickTimers"
|
||||||
|
)
|
||||||
|
default boolean shadows()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "npcStub",
|
keyName = "npcStub",
|
||||||
name = "NPC's",
|
name = "NPC's",
|
||||||
description = "",
|
description = "",
|
||||||
position = 6
|
position = 11
|
||||||
)
|
)
|
||||||
default Stub npcStub()
|
default Stub npcStub()
|
||||||
{
|
{
|
||||||
@@ -120,7 +213,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
keyName = "lizardmanaoeStub",
|
keyName = "lizardmanaoeStub",
|
||||||
name = "Lizardman Shamans",
|
name = "Lizardman Shamans",
|
||||||
description = "",
|
description = "",
|
||||||
position = 7,
|
position = 12,
|
||||||
parent = "npcStub"
|
parent = "npcStub"
|
||||||
)
|
)
|
||||||
default Stub lizardmanaoeStub()
|
default Stub lizardmanaoeStub()
|
||||||
@@ -133,7 +226,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Lizardman Shamans",
|
name = "Lizardman Shamans",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Lizardman Shamans is displayed",
|
description = "Configures whether or not AoE Projectile Warnings for Lizardman Shamans is displayed",
|
||||||
parent = "lizardmanaoeStub",
|
parent = "lizardmanaoeStub",
|
||||||
position = 8
|
position = 13
|
||||||
)
|
)
|
||||||
default boolean isShamansEnabled()
|
default boolean isShamansEnabled()
|
||||||
{
|
{
|
||||||
@@ -145,7 +238,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Lizardman Shamans Notify",
|
name = "Lizardman Shamans Notify",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Lizardman Shamans should trigger a notification",
|
description = "Configures whether or not AoE Projectile Warnings for Lizardman Shamans should trigger a notification",
|
||||||
parent = "lizardmanaoeStub",
|
parent = "lizardmanaoeStub",
|
||||||
position = 9,
|
position = 14,
|
||||||
hide = "aoeNotifyAll"
|
hide = "aoeNotifyAll"
|
||||||
)
|
)
|
||||||
default boolean isShamansNotifyEnabled()
|
default boolean isShamansNotifyEnabled()
|
||||||
@@ -157,7 +250,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
keyName = "archaeologistaoeStub",
|
keyName = "archaeologistaoeStub",
|
||||||
name = "Crazy Archaeologist",
|
name = "Crazy Archaeologist",
|
||||||
description = "",
|
description = "",
|
||||||
position = 10,
|
position = 15,
|
||||||
parent = "npcStub"
|
parent = "npcStub"
|
||||||
)
|
)
|
||||||
default Stub archaeologistaoeStub()
|
default Stub archaeologistaoeStub()
|
||||||
@@ -170,7 +263,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Crazy Archaeologist",
|
name = "Crazy Archaeologist",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Archaeologist is displayed",
|
description = "Configures whether or not AoE Projectile Warnings for Archaeologist is displayed",
|
||||||
parent = "archaeologistaoeStub",
|
parent = "archaeologistaoeStub",
|
||||||
position = 11
|
position = 16
|
||||||
)
|
)
|
||||||
default boolean isArchaeologistEnabled()
|
default boolean isArchaeologistEnabled()
|
||||||
{
|
{
|
||||||
@@ -182,7 +275,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Crazy Archaeologist Notify",
|
name = "Crazy Archaeologist Notify",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Crazy Archaeologist should trigger a notification",
|
description = "Configures whether or not AoE Projectile Warnings for Crazy Archaeologist should trigger a notification",
|
||||||
parent = "archaeologistaoeStub",
|
parent = "archaeologistaoeStub",
|
||||||
position = 12,
|
position = 17,
|
||||||
hide = "aoeNotifyAll"
|
hide = "aoeNotifyAll"
|
||||||
)
|
)
|
||||||
default boolean isArchaeologistNotifyEnabled()
|
default boolean isArchaeologistNotifyEnabled()
|
||||||
@@ -194,7 +287,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
keyName = "icedemonStub",
|
keyName = "icedemonStub",
|
||||||
name = "Ice Demon",
|
name = "Ice Demon",
|
||||||
description = "",
|
description = "",
|
||||||
position = 13,
|
position = 18,
|
||||||
parent = "npcStub"
|
parent = "npcStub"
|
||||||
)
|
)
|
||||||
default Stub icedemonStub()
|
default Stub icedemonStub()
|
||||||
@@ -207,7 +300,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Ice Demon",
|
name = "Ice Demon",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Ice Demon is displayed",
|
description = "Configures whether or not AoE Projectile Warnings for Ice Demon is displayed",
|
||||||
parent = "icedemonStub",
|
parent = "icedemonStub",
|
||||||
position = 14
|
position = 19
|
||||||
)
|
)
|
||||||
default boolean isIceDemonEnabled()
|
default boolean isIceDemonEnabled()
|
||||||
{
|
{
|
||||||
@@ -219,7 +312,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Ice Demon Notify",
|
name = "Ice Demon Notify",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Ice Demon should trigger a notification",
|
description = "Configures whether or not AoE Projectile Warnings for Ice Demon should trigger a notification",
|
||||||
parent = "icedemonStub",
|
parent = "icedemonStub",
|
||||||
position = 15,
|
position = 20,
|
||||||
hide = "aoeNotifyAll"
|
hide = "aoeNotifyAll"
|
||||||
)
|
)
|
||||||
default boolean isIceDemonNotifyEnabled()
|
default boolean isIceDemonNotifyEnabled()
|
||||||
@@ -231,7 +324,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
keyName = "vasaStub",
|
keyName = "vasaStub",
|
||||||
name = "Vasa",
|
name = "Vasa",
|
||||||
description = "",
|
description = "",
|
||||||
position = 16,
|
position = 21,
|
||||||
parent = "npcStub"
|
parent = "npcStub"
|
||||||
)
|
)
|
||||||
default Stub vasaStub()
|
default Stub vasaStub()
|
||||||
@@ -244,7 +337,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Vasa",
|
name = "Vasa",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Vasa is displayed",
|
description = "Configures whether or not AoE Projectile Warnings for Vasa is displayed",
|
||||||
parent = "vasaStub",
|
parent = "vasaStub",
|
||||||
position = 17
|
position = 22
|
||||||
)
|
)
|
||||||
default boolean isVasaEnabled()
|
default boolean isVasaEnabled()
|
||||||
{
|
{
|
||||||
@@ -256,7 +349,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Vasa Notify",
|
name = "Vasa Notify",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Vasa should trigger a notification",
|
description = "Configures whether or not AoE Projectile Warnings for Vasa should trigger a notification",
|
||||||
parent = "vasaStub",
|
parent = "vasaStub",
|
||||||
position = 18,
|
position = 23,
|
||||||
hide = "aoeNotifyAll"
|
hide = "aoeNotifyAll"
|
||||||
)
|
)
|
||||||
default boolean isVasaNotifyEnabled()
|
default boolean isVasaNotifyEnabled()
|
||||||
@@ -268,7 +361,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
keyName = "tektonStub",
|
keyName = "tektonStub",
|
||||||
name = "Tekton",
|
name = "Tekton",
|
||||||
description = "",
|
description = "",
|
||||||
position = 19,
|
position = 24,
|
||||||
parent = "npcStub"
|
parent = "npcStub"
|
||||||
)
|
)
|
||||||
default Stub tektonStub()
|
default Stub tektonStub()
|
||||||
@@ -281,7 +374,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Tekton",
|
name = "Tekton",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Tekton is displayed",
|
description = "Configures whether or not AoE Projectile Warnings for Tekton is displayed",
|
||||||
parent = "tektonStub",
|
parent = "tektonStub",
|
||||||
position = 20
|
position = 25
|
||||||
)
|
)
|
||||||
default boolean isTektonEnabled()
|
default boolean isTektonEnabled()
|
||||||
{
|
{
|
||||||
@@ -293,7 +386,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Tekton Notify",
|
name = "Tekton Notify",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Tekton should trigger a notification",
|
description = "Configures whether or not AoE Projectile Warnings for Tekton should trigger a notification",
|
||||||
parent = "tektonStub",
|
parent = "tektonStub",
|
||||||
position = 21,
|
position = 26,
|
||||||
hide = "aoeNotifyAll"
|
hide = "aoeNotifyAll"
|
||||||
)
|
)
|
||||||
default boolean isTektonNotifyEnabled()
|
default boolean isTektonNotifyEnabled()
|
||||||
@@ -305,7 +398,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
keyName = "vorkathStub",
|
keyName = "vorkathStub",
|
||||||
name = "Vorkath",
|
name = "Vorkath",
|
||||||
description = "",
|
description = "",
|
||||||
position = 22,
|
position = 27,
|
||||||
parent = "npcStub"
|
parent = "npcStub"
|
||||||
)
|
)
|
||||||
default Stub vorkathStub()
|
default Stub vorkathStub()
|
||||||
@@ -318,7 +411,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Vorkath",
|
name = "Vorkath",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Vorkath are displayed",
|
description = "Configures whether or not AoE Projectile Warnings for Vorkath are displayed",
|
||||||
parent = "vorkathStub",
|
parent = "vorkathStub",
|
||||||
position = 23
|
position = 28
|
||||||
)
|
)
|
||||||
default boolean isVorkathEnabled()
|
default boolean isVorkathEnabled()
|
||||||
{
|
{
|
||||||
@@ -330,7 +423,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Vorkath Notify",
|
name = "Vorkath Notify",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Vorkath should trigger a notification",
|
description = "Configures whether or not AoE Projectile Warnings for Vorkath should trigger a notification",
|
||||||
parent = "vorkathStub",
|
parent = "vorkathStub",
|
||||||
position = 24,
|
position = 29,
|
||||||
hide = "aoeNotifyAll"
|
hide = "aoeNotifyAll"
|
||||||
)
|
)
|
||||||
default boolean isVorkathNotifyEnabled()
|
default boolean isVorkathNotifyEnabled()
|
||||||
@@ -342,7 +435,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
keyName = "galvekStub",
|
keyName = "galvekStub",
|
||||||
name = "Galvek",
|
name = "Galvek",
|
||||||
description = "",
|
description = "",
|
||||||
position = 25,
|
position = 30,
|
||||||
parent = "npcStub"
|
parent = "npcStub"
|
||||||
)
|
)
|
||||||
default Stub galvekStub()
|
default Stub galvekStub()
|
||||||
@@ -355,7 +448,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Galvek",
|
name = "Galvek",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Galvek are displayed",
|
description = "Configures whether or not AoE Projectile Warnings for Galvek are displayed",
|
||||||
parent = "galvekStub",
|
parent = "galvekStub",
|
||||||
position = 26
|
position = 31
|
||||||
)
|
)
|
||||||
default boolean isGalvekEnabled()
|
default boolean isGalvekEnabled()
|
||||||
{
|
{
|
||||||
@@ -367,7 +460,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Galvek Notify",
|
name = "Galvek Notify",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Galvek should trigger a notification",
|
description = "Configures whether or not AoE Projectile Warnings for Galvek should trigger a notification",
|
||||||
parent = "galvekStub",
|
parent = "galvekStub",
|
||||||
position = 27,
|
position = 32,
|
||||||
hide = "aoeNotifyAll"
|
hide = "aoeNotifyAll"
|
||||||
)
|
)
|
||||||
default boolean isGalvekNotifyEnabled()
|
default boolean isGalvekNotifyEnabled()
|
||||||
@@ -379,7 +472,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
keyName = "gargbossStub",
|
keyName = "gargbossStub",
|
||||||
name = "Gargoyle Boss",
|
name = "Gargoyle Boss",
|
||||||
description = "",
|
description = "",
|
||||||
position = 28,
|
position = 33,
|
||||||
parent = "npcStub"
|
parent = "npcStub"
|
||||||
)
|
)
|
||||||
default Stub gargbossStub()
|
default Stub gargbossStub()
|
||||||
@@ -392,7 +485,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Gargoyle Boss",
|
name = "Gargoyle Boss",
|
||||||
description = "Configs whether or not AoE Projectile Warnings for Dawn/Dusk are displayed",
|
description = "Configs whether or not AoE Projectile Warnings for Dawn/Dusk are displayed",
|
||||||
parent = "gargbossStub",
|
parent = "gargbossStub",
|
||||||
position = 29
|
position = 34
|
||||||
)
|
)
|
||||||
default boolean isGargBossEnabled()
|
default boolean isGargBossEnabled()
|
||||||
{
|
{
|
||||||
@@ -404,7 +497,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Gargoyle Boss Notify",
|
name = "Gargoyle Boss Notify",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Gargoyle Bosses should trigger a notification",
|
description = "Configures whether or not AoE Projectile Warnings for Gargoyle Bosses should trigger a notification",
|
||||||
parent = "gargbossStub",
|
parent = "gargbossStub",
|
||||||
position = 30,
|
position = 35,
|
||||||
hide = "aoeNotifyAll"
|
hide = "aoeNotifyAll"
|
||||||
)
|
)
|
||||||
default boolean isGargBossNotifyEnabled()
|
default boolean isGargBossNotifyEnabled()
|
||||||
@@ -416,7 +509,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
keyName = "vetionStub",
|
keyName = "vetionStub",
|
||||||
name = "Vet'ion",
|
name = "Vet'ion",
|
||||||
description = "",
|
description = "",
|
||||||
position = 31,
|
position = 36,
|
||||||
parent = "npcStub"
|
parent = "npcStub"
|
||||||
)
|
)
|
||||||
default Stub vetionStub()
|
default Stub vetionStub()
|
||||||
@@ -429,7 +522,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Vet'ion",
|
name = "Vet'ion",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Vet'ion are displayed",
|
description = "Configures whether or not AoE Projectile Warnings for Vet'ion are displayed",
|
||||||
parent = "vetionStub",
|
parent = "vetionStub",
|
||||||
position = 32
|
position = 37
|
||||||
)
|
)
|
||||||
default boolean isVetionEnabled()
|
default boolean isVetionEnabled()
|
||||||
{
|
{
|
||||||
@@ -441,7 +534,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Vet'ion Notify",
|
name = "Vet'ion Notify",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Vet'ion should trigger a notification",
|
description = "Configures whether or not AoE Projectile Warnings for Vet'ion should trigger a notification",
|
||||||
parent = "vetionStub",
|
parent = "vetionStub",
|
||||||
position = 33,
|
position = 38,
|
||||||
hide = "aoeNotifyAll"
|
hide = "aoeNotifyAll"
|
||||||
)
|
)
|
||||||
default boolean isVetionNotifyEnabled()
|
default boolean isVetionNotifyEnabled()
|
||||||
@@ -453,7 +546,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
keyName = "chaosfanaticStub",
|
keyName = "chaosfanaticStub",
|
||||||
name = "Chaos Fanatic",
|
name = "Chaos Fanatic",
|
||||||
description = "",
|
description = "",
|
||||||
position = 34,
|
position = 39,
|
||||||
parent = "npcStub"
|
parent = "npcStub"
|
||||||
)
|
)
|
||||||
default Stub chaosfanaticStub()
|
default Stub chaosfanaticStub()
|
||||||
@@ -466,7 +559,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Chaos Fanatic",
|
name = "Chaos Fanatic",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Chaos Fanatic are displayed",
|
description = "Configures whether or not AoE Projectile Warnings for Chaos Fanatic are displayed",
|
||||||
parent = "chaosfanaticStub",
|
parent = "chaosfanaticStub",
|
||||||
position = 35
|
position = 40
|
||||||
)
|
)
|
||||||
default boolean isChaosFanaticEnabled()
|
default boolean isChaosFanaticEnabled()
|
||||||
{
|
{
|
||||||
@@ -478,7 +571,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Chaos Fanatic Notify",
|
name = "Chaos Fanatic Notify",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Chaos Fanatic should trigger a notification",
|
description = "Configures whether or not AoE Projectile Warnings for Chaos Fanatic should trigger a notification",
|
||||||
parent = "chaosfanaticStub",
|
parent = "chaosfanaticStub",
|
||||||
position = 36,
|
position = 41,
|
||||||
hide = "aoeNotifyAll"
|
hide = "aoeNotifyAll"
|
||||||
)
|
)
|
||||||
default boolean isChaosFanaticNotifyEnabled()
|
default boolean isChaosFanaticNotifyEnabled()
|
||||||
@@ -490,7 +583,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
keyName = "olmStub",
|
keyName = "olmStub",
|
||||||
name = "Olm",
|
name = "Olm",
|
||||||
description = "",
|
description = "",
|
||||||
position = 37,
|
position = 42,
|
||||||
parent = "npcStub"
|
parent = "npcStub"
|
||||||
)
|
)
|
||||||
default Stub olmStub()
|
default Stub olmStub()
|
||||||
@@ -503,7 +596,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Olm",
|
name = "Olm",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for The Great Olm are displayed",
|
description = "Configures whether or not AoE Projectile Warnings for The Great Olm are displayed",
|
||||||
parent = "olmStub",
|
parent = "olmStub",
|
||||||
position = 38
|
position = 43
|
||||||
)
|
)
|
||||||
default boolean isOlmEnabled()
|
default boolean isOlmEnabled()
|
||||||
{
|
{
|
||||||
@@ -515,7 +608,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Olm Notify",
|
name = "Olm Notify",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Olm should trigger a notification",
|
description = "Configures whether or not AoE Projectile Warnings for Olm should trigger a notification",
|
||||||
parent = "olmStub",
|
parent = "olmStub",
|
||||||
position = 39,
|
position = 44,
|
||||||
hide = "aoeNotifyAll"
|
hide = "aoeNotifyAll"
|
||||||
)
|
)
|
||||||
default boolean isOlmNotifyEnabled()
|
default boolean isOlmNotifyEnabled()
|
||||||
@@ -527,7 +620,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
keyName = "olmBombStub",
|
keyName = "olmBombStub",
|
||||||
name = "Bombs",
|
name = "Bombs",
|
||||||
description = "",
|
description = "",
|
||||||
position = 40,
|
position = 45,
|
||||||
parent = "olmStub"
|
parent = "olmStub"
|
||||||
)
|
)
|
||||||
default Stub olmBombsStub()
|
default Stub olmBombsStub()
|
||||||
@@ -540,7 +633,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Olm Bombs",
|
name = "Olm Bombs",
|
||||||
description = "Display a timer and colour-coded AoE for Olm's crystal-phase bombs.",
|
description = "Display a timer and colour-coded AoE for Olm's crystal-phase bombs.",
|
||||||
parent = "olmBombStub",
|
parent = "olmBombStub",
|
||||||
position = 41
|
position = 46
|
||||||
)
|
)
|
||||||
default boolean bombDisplay()
|
default boolean bombDisplay()
|
||||||
{
|
{
|
||||||
@@ -552,7 +645,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Olm Bombs Notify",
|
name = "Olm Bombs Notify",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Olm Bombs should trigger a notification",
|
description = "Configures whether or not AoE Projectile Warnings for Olm Bombs should trigger a notification",
|
||||||
parent = "olmBombStub",
|
parent = "olmBombStub",
|
||||||
position = 42,
|
position = 47,
|
||||||
hide = "aoeNotifyAll"
|
hide = "aoeNotifyAll"
|
||||||
)
|
)
|
||||||
default boolean bombDisplayNotifyEnabled()
|
default boolean bombDisplayNotifyEnabled()
|
||||||
@@ -564,7 +657,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
keyName = "olmlightningStub",
|
keyName = "olmlightningStub",
|
||||||
name = "Lightning Trails",
|
name = "Lightning Trails",
|
||||||
description = "",
|
description = "",
|
||||||
position = 43,
|
position = 48,
|
||||||
parent = "olmStub"
|
parent = "olmStub"
|
||||||
)
|
)
|
||||||
default Stub olmlightningStub()
|
default Stub olmlightningStub()
|
||||||
@@ -577,7 +670,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Olm Lightning Trails",
|
name = "Olm Lightning Trails",
|
||||||
description = "Show Lightning Trails",
|
description = "Show Lightning Trails",
|
||||||
parent = "olmlightningStub",
|
parent = "olmlightningStub",
|
||||||
position = 44
|
position = 49
|
||||||
)
|
)
|
||||||
default boolean LightningTrail()
|
default boolean LightningTrail()
|
||||||
{
|
{
|
||||||
@@ -589,7 +682,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Olm Lightning Trails Notify",
|
name = "Olm Lightning Trails Notify",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Olm Lightning Trails should trigger a notification",
|
description = "Configures whether or not AoE Projectile Warnings for Olm Lightning Trails should trigger a notification",
|
||||||
parent = "olmlightningStub",
|
parent = "olmlightningStub",
|
||||||
position = 45,
|
position = 50,
|
||||||
hide = "aoeNotifyAll"
|
hide = "aoeNotifyAll"
|
||||||
)
|
)
|
||||||
default boolean LightningTrailNotifyEnabled()
|
default boolean LightningTrailNotifyEnabled()
|
||||||
@@ -601,7 +694,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
keyName = "corpStub",
|
keyName = "corpStub",
|
||||||
name = "Corporeal Beast",
|
name = "Corporeal Beast",
|
||||||
description = "",
|
description = "",
|
||||||
position = 46,
|
position = 51,
|
||||||
parent = "npcStub"
|
parent = "npcStub"
|
||||||
)
|
)
|
||||||
default Stub corpStub()
|
default Stub corpStub()
|
||||||
@@ -614,7 +707,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Corporeal Beast",
|
name = "Corporeal Beast",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for the Corporeal Beast are displayed",
|
description = "Configures whether or not AoE Projectile Warnings for the Corporeal Beast are displayed",
|
||||||
parent = "corpStub",
|
parent = "corpStub",
|
||||||
position = 47
|
position = 52
|
||||||
)
|
)
|
||||||
default boolean isCorpEnabled()
|
default boolean isCorpEnabled()
|
||||||
{
|
{
|
||||||
@@ -626,7 +719,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Corporeal Beast Notify",
|
name = "Corporeal Beast Notify",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Corporeal Beast should trigger a notification",
|
description = "Configures whether or not AoE Projectile Warnings for Corporeal Beast should trigger a notification",
|
||||||
parent = "corpStub",
|
parent = "corpStub",
|
||||||
position = 48,
|
position = 53,
|
||||||
hide = "aoeNotifyAll"
|
hide = "aoeNotifyAll"
|
||||||
)
|
)
|
||||||
default boolean isCorpNotifyEnabled()
|
default boolean isCorpNotifyEnabled()
|
||||||
@@ -638,7 +731,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
keyName = "wintertodtStub",
|
keyName = "wintertodtStub",
|
||||||
name = "Wintertodt",
|
name = "Wintertodt",
|
||||||
description = "",
|
description = "",
|
||||||
position = 49,
|
position = 54,
|
||||||
parent = "npcStub"
|
parent = "npcStub"
|
||||||
)
|
)
|
||||||
default Stub wintertodtStub()
|
default Stub wintertodtStub()
|
||||||
@@ -651,7 +744,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Wintertodt Snow Fall",
|
name = "Wintertodt Snow Fall",
|
||||||
description = "Configures whether or not AOE Projectile Warnings for the Wintertodt snow fall are displayed",
|
description = "Configures whether or not AOE Projectile Warnings for the Wintertodt snow fall are displayed",
|
||||||
parent = "wintertodtStub",
|
parent = "wintertodtStub",
|
||||||
position = 50
|
position = 55
|
||||||
)
|
)
|
||||||
default boolean isWintertodtEnabled()
|
default boolean isWintertodtEnabled()
|
||||||
{
|
{
|
||||||
@@ -663,7 +756,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Wintertodt Snow Fall Notify",
|
name = "Wintertodt Snow Fall Notify",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Wintertodt Snow Fall Notify should trigger a notification",
|
description = "Configures whether or not AoE Projectile Warnings for Wintertodt Snow Fall Notify should trigger a notification",
|
||||||
parent = "wintertodtStub",
|
parent = "wintertodtStub",
|
||||||
position = 51,
|
position = 56,
|
||||||
hide = "aoeNotifyAll"
|
hide = "aoeNotifyAll"
|
||||||
)
|
)
|
||||||
default boolean isWintertodtNotifyEnabled()
|
default boolean isWintertodtNotifyEnabled()
|
||||||
@@ -675,7 +768,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
keyName = "xarpusStub",
|
keyName = "xarpusStub",
|
||||||
name = "Xarpus",
|
name = "Xarpus",
|
||||||
description = "",
|
description = "",
|
||||||
position = 52,
|
position = 57,
|
||||||
parent = "npcStub"
|
parent = "npcStub"
|
||||||
)
|
)
|
||||||
default Stub xarpusStub()
|
default Stub xarpusStub()
|
||||||
@@ -688,7 +781,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Xarpus",
|
name = "Xarpus",
|
||||||
description = "Configures whether or not AOE Projectile Warnings for Xarpus are displayed",
|
description = "Configures whether or not AOE Projectile Warnings for Xarpus are displayed",
|
||||||
parent = "xarpusStub",
|
parent = "xarpusStub",
|
||||||
position = 53
|
position = 58
|
||||||
)
|
)
|
||||||
default boolean isXarpusEnabled()
|
default boolean isXarpusEnabled()
|
||||||
{
|
{
|
||||||
@@ -700,7 +793,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Xarpus Notify",
|
name = "Xarpus Notify",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Xarpus should trigger a notification",
|
description = "Configures whether or not AoE Projectile Warnings for Xarpus should trigger a notification",
|
||||||
parent = "xarpusStub",
|
parent = "xarpusStub",
|
||||||
position = 54,
|
position = 59,
|
||||||
hide = "aoeNotifyAll"
|
hide = "aoeNotifyAll"
|
||||||
)
|
)
|
||||||
default boolean isXarpusNotifyEnabled()
|
default boolean isXarpusNotifyEnabled()
|
||||||
@@ -712,7 +805,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
keyName = "addyDragsStub",
|
keyName = "addyDragsStub",
|
||||||
name = "Addy Drags",
|
name = "Addy Drags",
|
||||||
description = "",
|
description = "",
|
||||||
position = 55,
|
position = 60,
|
||||||
parent = "npcStub"
|
parent = "npcStub"
|
||||||
)
|
)
|
||||||
default Stub addyDragsStub()
|
default Stub addyDragsStub()
|
||||||
@@ -725,7 +818,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Addy Drags",
|
name = "Addy Drags",
|
||||||
description = "Show Bad Areas",
|
description = "Show Bad Areas",
|
||||||
parent = "addyDragsStub",
|
parent = "addyDragsStub",
|
||||||
position = 56
|
position = 61
|
||||||
)
|
)
|
||||||
default boolean addyDrags()
|
default boolean addyDrags()
|
||||||
{
|
{
|
||||||
@@ -737,7 +830,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Addy Drags Notify",
|
name = "Addy Drags Notify",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Addy Dragons should trigger a notification",
|
description = "Configures whether or not AoE Projectile Warnings for Addy Dragons should trigger a notification",
|
||||||
parent = "addyDragsStub",
|
parent = "addyDragsStub",
|
||||||
position = 57,
|
position = 62,
|
||||||
hide = "aoeNotifyAll"
|
hide = "aoeNotifyAll"
|
||||||
)
|
)
|
||||||
default boolean addyDragsNotifyEnabled()
|
default boolean addyDragsNotifyEnabled()
|
||||||
@@ -749,7 +842,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
keyName = "drakeStub",
|
keyName = "drakeStub",
|
||||||
name = "Drakes",
|
name = "Drakes",
|
||||||
description = "",
|
description = "",
|
||||||
position = 58,
|
position = 63,
|
||||||
parent = "npcStub"
|
parent = "npcStub"
|
||||||
)
|
)
|
||||||
default Stub drakeStub()
|
default Stub drakeStub()
|
||||||
@@ -762,7 +855,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Drakes Breath",
|
name = "Drakes Breath",
|
||||||
description = "Configures if Drakes Breath tile markers are displayed",
|
description = "Configures if Drakes Breath tile markers are displayed",
|
||||||
parent = "drakeStub",
|
parent = "drakeStub",
|
||||||
position = 59
|
position = 64
|
||||||
)
|
)
|
||||||
default boolean isDrakeEnabled()
|
default boolean isDrakeEnabled()
|
||||||
{
|
{
|
||||||
@@ -774,7 +867,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Drakes Breath Notify",
|
name = "Drakes Breath Notify",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Drakes Breath should trigger a notification",
|
description = "Configures whether or not AoE Projectile Warnings for Drakes Breath should trigger a notification",
|
||||||
parent = "drakeStub",
|
parent = "drakeStub",
|
||||||
position = 60,
|
position = 65,
|
||||||
hide = "aoeNotifyAll"
|
hide = "aoeNotifyAll"
|
||||||
)
|
)
|
||||||
default boolean isDrakeNotifyEnabled()
|
default boolean isDrakeNotifyEnabled()
|
||||||
@@ -786,7 +879,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
keyName = "cerberusStub",
|
keyName = "cerberusStub",
|
||||||
name = "Cerberus",
|
name = "Cerberus",
|
||||||
description = "",
|
description = "",
|
||||||
position = 61,
|
position = 66,
|
||||||
parent = "npcStub"
|
parent = "npcStub"
|
||||||
)
|
)
|
||||||
default Stub cerberusStub()
|
default Stub cerberusStub()
|
||||||
@@ -799,7 +892,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Cerberus Fire",
|
name = "Cerberus Fire",
|
||||||
description = "Configures if Cerberus fire tile markers are displayed",
|
description = "Configures if Cerberus fire tile markers are displayed",
|
||||||
parent = "cerberusStub",
|
parent = "cerberusStub",
|
||||||
position = 62
|
position = 67
|
||||||
)
|
)
|
||||||
default boolean isCerbFireEnabled()
|
default boolean isCerbFireEnabled()
|
||||||
{
|
{
|
||||||
@@ -811,7 +904,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Cerberus Fire Notify",
|
name = "Cerberus Fire Notify",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Cerberus his fire should trigger a notification",
|
description = "Configures whether or not AoE Projectile Warnings for Cerberus his fire should trigger a notification",
|
||||||
parent = "cerberusStub",
|
parent = "cerberusStub",
|
||||||
position = 63,
|
position = 68,
|
||||||
hide = "aoeNotifyAll"
|
hide = "aoeNotifyAll"
|
||||||
)
|
)
|
||||||
default boolean isCerbFireNotifyEnabled()
|
default boolean isCerbFireNotifyEnabled()
|
||||||
@@ -823,7 +916,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
keyName = "demonicGorillaStub",
|
keyName = "demonicGorillaStub",
|
||||||
name = "Demonic Gorilla",
|
name = "Demonic Gorilla",
|
||||||
description = "",
|
description = "",
|
||||||
position = 64,
|
position = 69,
|
||||||
parent = "npcStub"
|
parent = "npcStub"
|
||||||
)
|
)
|
||||||
default Stub demonicGorillaStub()
|
default Stub demonicGorillaStub()
|
||||||
@@ -836,7 +929,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Demonic Gorilla",
|
name = "Demonic Gorilla",
|
||||||
description = "Configures if Demonic Gorilla boulder tile markers are displayed",
|
description = "Configures if Demonic Gorilla boulder tile markers are displayed",
|
||||||
parent = "demonicGorillaStub",
|
parent = "demonicGorillaStub",
|
||||||
position = 65
|
position = 70
|
||||||
)
|
)
|
||||||
default boolean isDemonicGorillaEnabled()
|
default boolean isDemonicGorillaEnabled()
|
||||||
{
|
{
|
||||||
@@ -848,7 +941,7 @@ public interface AoeWarningConfig extends Config
|
|||||||
name = "Demonic Gorilla Notify",
|
name = "Demonic Gorilla Notify",
|
||||||
description = "Configures whether or not AoE Projectile Warnings for Demonic Gorilla boulders should trigger a notification",
|
description = "Configures whether or not AoE Projectile Warnings for Demonic Gorilla boulders should trigger a notification",
|
||||||
parent = "demonicGorillaStub",
|
parent = "demonicGorillaStub",
|
||||||
position = 66,
|
position = 71,
|
||||||
hide = "aoeNotifyAll"
|
hide = "aoeNotifyAll"
|
||||||
)
|
)
|
||||||
default boolean isDemonicGorillaNotifyEnabled()
|
default boolean isDemonicGorillaNotifyEnabled()
|
||||||
|
|||||||
+49
-4
@@ -30,8 +30,10 @@ package net.runelite.client.plugins.aoewarnings;
|
|||||||
import java.awt.BasicStroke;
|
import java.awt.BasicStroke;
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
|
import java.awt.Font;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.awt.Polygon;
|
import java.awt.Polygon;
|
||||||
|
import java.awt.Rectangle;
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@@ -40,12 +42,14 @@ import javax.annotation.Nullable;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.Perspective;
|
import net.runelite.api.Perspective;
|
||||||
|
import net.runelite.api.Point;
|
||||||
import net.runelite.api.Projectile;
|
import net.runelite.api.Projectile;
|
||||||
import net.runelite.api.coords.LocalPoint;
|
import net.runelite.api.coords.LocalPoint;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
import net.runelite.client.ui.overlay.Overlay;
|
import net.runelite.client.ui.overlay.Overlay;
|
||||||
import net.runelite.client.ui.overlay.OverlayLayer;
|
import net.runelite.client.ui.overlay.OverlayLayer;
|
||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
|
import net.runelite.client.ui.overlay.OverlayUtil;
|
||||||
import static net.runelite.client.util.ColorUtil.setAlphaComponent;
|
import static net.runelite.client.util.ColorUtil.setAlphaComponent;
|
||||||
|
|
||||||
public class AoeWarningOverlay extends Overlay
|
public class AoeWarningOverlay extends Overlay
|
||||||
@@ -95,7 +99,7 @@ public class AoeWarningOverlay extends Overlay
|
|||||||
for (Iterator<AoeProjectile> it = projectiles.values().iterator(); it.hasNext(); )
|
for (Iterator<AoeProjectile> it = projectiles.values().iterator(); it.hasNext(); )
|
||||||
{
|
{
|
||||||
AoeProjectile aoeProjectile = it.next();
|
AoeProjectile aoeProjectile = it.next();
|
||||||
|
Color color;
|
||||||
if (now.isAfter(aoeProjectile.getStartTime().plus(Duration.ofMillis(aoeProjectile.getProjectileLifetime()))))
|
if (now.isAfter(aoeProjectile.getStartTime().plus(Duration.ofMillis(aoeProjectile.getProjectileLifetime()))))
|
||||||
{
|
{
|
||||||
it.remove();
|
it.remove();
|
||||||
@@ -111,6 +115,8 @@ public class AoeWarningOverlay extends Overlay
|
|||||||
// how far through the projectiles lifetime between 0-1.
|
// how far through the projectiles lifetime between 0-1.
|
||||||
double progress = (System.currentTimeMillis() - aoeProjectile.getStartTime().toEpochMilli()) / (double) aoeProjectile.getProjectileLifetime();
|
double progress = (System.currentTimeMillis() - aoeProjectile.getStartTime().toEpochMilli()) / (double) aoeProjectile.getProjectileLifetime();
|
||||||
|
|
||||||
|
int tickProgress = aoeProjectile.getFinalTick() - client.getTickCount();
|
||||||
|
|
||||||
int fillAlpha, outlineAlpha;
|
int fillAlpha, outlineAlpha;
|
||||||
if (config.isFadeEnabled())
|
if (config.isFadeEnabled())
|
||||||
{
|
{
|
||||||
@@ -122,6 +128,14 @@ public class AoeWarningOverlay extends Overlay
|
|||||||
fillAlpha = FILL_START_ALPHA;
|
fillAlpha = FILL_START_ALPHA;
|
||||||
outlineAlpha = OUTLINE_START_ALPHA;
|
outlineAlpha = OUTLINE_START_ALPHA;
|
||||||
}
|
}
|
||||||
|
if (tickProgress == 0)
|
||||||
|
{
|
||||||
|
color = Color.RED;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
color = Color.WHITE;
|
||||||
|
}
|
||||||
|
|
||||||
if (fillAlpha < 0)
|
if (fillAlpha < 0)
|
||||||
{
|
{
|
||||||
@@ -138,7 +152,7 @@ public class AoeWarningOverlay extends Overlay
|
|||||||
}
|
}
|
||||||
if (outlineAlpha > 255)
|
if (outlineAlpha > 255)
|
||||||
{
|
{
|
||||||
outlineAlpha = 255;//Make sure we don't pass in an invalid alpha
|
outlineAlpha = 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.isOutlineEnabled())
|
if (config.isOutlineEnabled())
|
||||||
@@ -146,7 +160,13 @@ public class AoeWarningOverlay extends Overlay
|
|||||||
graphics.setColor(new Color(setAlphaComponent(config.overlayColor().getRGB(), outlineAlpha), true));
|
graphics.setColor(new Color(setAlphaComponent(config.overlayColor().getRGB(), outlineAlpha), true));
|
||||||
graphics.drawPolygon(tilePoly);
|
graphics.drawPolygon(tilePoly);
|
||||||
}
|
}
|
||||||
|
if (config.tickTimers())
|
||||||
|
{
|
||||||
|
if (tickProgress >= 0)
|
||||||
|
{
|
||||||
|
renderTextLocation(graphics, Integer.toString(tickProgress), config.textSize(), config.fontStyle().getFont(), color, centerPoint(tilePoly.getBounds()));
|
||||||
|
}
|
||||||
|
}
|
||||||
graphics.setColor(new Color(setAlphaComponent(config.overlayColor().getRGB(), fillAlpha), true));
|
graphics.setColor(new Color(setAlphaComponent(config.overlayColor().getRGB(), fillAlpha), true));
|
||||||
graphics.fillPolygon(tilePoly);
|
graphics.fillPolygon(tilePoly);
|
||||||
}
|
}
|
||||||
@@ -171,11 +191,36 @@ public class AoeWarningOverlay extends Overlay
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//OverlayUtil.renderPolygon(graphics, poly, color);
|
|
||||||
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), outlineAlpha));
|
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), outlineAlpha));
|
||||||
graphics.setStroke(new BasicStroke(strokeWidth));
|
graphics.setStroke(new BasicStroke(strokeWidth));
|
||||||
graphics.draw(poly);
|
graphics.draw(poly);
|
||||||
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), fillAlpha));
|
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), fillAlpha));
|
||||||
graphics.fill(poly);
|
graphics.fill(poly);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void renderTextLocation(Graphics2D graphics, String txtString, int fontSize, int fontStyle, Color fontColor, Point canvasPoint)
|
||||||
|
{
|
||||||
|
graphics.setFont(new Font("Arial", fontStyle, fontSize));
|
||||||
|
if (canvasPoint != null)
|
||||||
|
{
|
||||||
|
final Point canvasCenterPoint = new Point(
|
||||||
|
canvasPoint.getX(),
|
||||||
|
canvasPoint.getY());
|
||||||
|
final Point canvasCenterPoint_shadow = new Point(
|
||||||
|
canvasPoint.getX() + 1,
|
||||||
|
canvasPoint.getY() + 1);
|
||||||
|
if (config.shadows())
|
||||||
|
{
|
||||||
|
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint_shadow, txtString, Color.BLACK);
|
||||||
|
}
|
||||||
|
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint, txtString, fontColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Point centerPoint(Rectangle rect)
|
||||||
|
{
|
||||||
|
int x = (int) (rect.getX() + rect.getWidth() / 2);
|
||||||
|
int y = (int) (rect.getY() + rect.getHeight() / 2);
|
||||||
|
return new Point(x, y);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+34
-2
@@ -147,11 +147,18 @@ public class AoeWarningPlugin extends Plugin
|
|||||||
|
|
||||||
int projectileId = projectile.getId();
|
int projectileId = projectile.getId();
|
||||||
int projectileLifetime = config.delay() + (projectile.getRemainingCycles() * 20);
|
int projectileLifetime = config.delay() + (projectile.getRemainingCycles() * 20);
|
||||||
|
int ticksRemaining = projectile.getRemainingCycles() / 30;
|
||||||
|
if (!isTickTimersEnabledForProjectileID(projectileId))
|
||||||
|
{
|
||||||
|
ticksRemaining = 0;
|
||||||
|
}
|
||||||
|
int tickCycle = client.getTickCount() + ticksRemaining;
|
||||||
AoeProjectileInfo aoeProjectileInfo = AoeProjectileInfo.getById(projectileId);
|
AoeProjectileInfo aoeProjectileInfo = AoeProjectileInfo.getById(projectileId);
|
||||||
if (aoeProjectileInfo != null && isConfigEnabledForProjectileId(projectileId, false))
|
if (aoeProjectileInfo != null
|
||||||
|
&& isConfigEnabledForProjectileId(projectileId, false))
|
||||||
{
|
{
|
||||||
LocalPoint targetPoint = event.getPosition();
|
LocalPoint targetPoint = event.getPosition();
|
||||||
AoeProjectile aoeProjectile = new AoeProjectile(Instant.now(), targetPoint, aoeProjectileInfo, projectileLifetime);
|
AoeProjectile aoeProjectile = new AoeProjectile(Instant.now(), targetPoint, aoeProjectileInfo, projectileLifetime, tickCycle);
|
||||||
projectiles.put(projectile, aoeProjectile);
|
projectiles.put(projectile, aoeProjectile);
|
||||||
|
|
||||||
if (config.aoeNotifyAll() || isConfigEnabledForProjectileId(projectileId, true))
|
if (config.aoeNotifyAll() || isConfigEnabledForProjectileId(projectileId, true))
|
||||||
@@ -294,6 +301,31 @@ public class AoeWarningPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isTickTimersEnabledForProjectileID(int projectileId)
|
||||||
|
{
|
||||||
|
AoeProjectileInfo projectileInfo = AoeProjectileInfo.getById(projectileId);
|
||||||
|
|
||||||
|
if (projectileInfo == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (projectileInfo)
|
||||||
|
{
|
||||||
|
case VASA_RANGED_AOE:
|
||||||
|
case VORKATH_POISON_POOL:
|
||||||
|
case VORKATH_SPAWN:
|
||||||
|
case VORKATH_TICK_FIRE:
|
||||||
|
case OLM_BURNING:
|
||||||
|
case OLM_FALLING_CRYSTAL_TRAIL:
|
||||||
|
case OLM_ACID_TRAIL:
|
||||||
|
case OLM_FIRE_LINE:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
private boolean isConfigEnabledForProjectileId(int projectileId, boolean notify)
|
private boolean isConfigEnabledForProjectileId(int projectileId, boolean notify)
|
||||||
{
|
{
|
||||||
AoeProjectileInfo projectileInfo = AoeProjectileInfo.getById(projectileId);
|
AoeProjectileInfo projectileInfo = AoeProjectileInfo.getById(projectileId);
|
||||||
|
|||||||
+8
-1
@@ -50,6 +50,7 @@ import javax.inject.Inject;
|
|||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
|
import net.runelite.api.Constants;
|
||||||
import net.runelite.api.InventoryID;
|
import net.runelite.api.InventoryID;
|
||||||
import net.runelite.api.Item;
|
import net.runelite.api.Item;
|
||||||
import net.runelite.api.ItemDefinition;
|
import net.runelite.api.ItemDefinition;
|
||||||
@@ -730,7 +731,13 @@ public class TabInterface
|
|||||||
|
|
||||||
if (tagTab.getIcon() == null)
|
if (tagTab.getIcon() == null)
|
||||||
{
|
{
|
||||||
Widget icon = createGraphic(ColorUtil.wrapWithColorTag(tagTab.getTag(), HILIGHT_COLOR), -1, tagTab.getIconItemId(), 36, 32, bounds.x + 3, 1, false);
|
Widget icon = createGraphic(
|
||||||
|
ColorUtil.wrapWithColorTag(tagTab.getTag(), HILIGHT_COLOR),
|
||||||
|
-1,
|
||||||
|
tagTab.getIconItemId(),
|
||||||
|
Constants.ITEM_SPRITE_WIDTH, Constants.ITEM_SPRITE_HEIGHT,
|
||||||
|
bounds.x + 3, 1,
|
||||||
|
false);
|
||||||
int clickmask = icon.getClickMask();
|
int clickmask = icon.getClickMask();
|
||||||
clickmask |= WidgetConfig.DRAG;
|
clickmask |= WidgetConfig.DRAG;
|
||||||
clickmask |= WidgetConfig.DRAG_ON;
|
clickmask |= WidgetConfig.DRAG_ON;
|
||||||
|
|||||||
+41
-17
@@ -27,12 +27,10 @@
|
|||||||
package net.runelite.client.plugins.banlist;
|
package net.runelite.client.plugins.banlist;
|
||||||
|
|
||||||
import com.google.inject.Provides;
|
import com.google.inject.Provides;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.runelite.api.ChatMessageType;
|
import net.runelite.api.ChatMessageType;
|
||||||
import net.runelite.api.ClanMember;
|
import net.runelite.api.ClanMember;
|
||||||
@@ -159,10 +157,21 @@ public class BanListPlugin extends Plugin
|
|||||||
public void onClanMemberJoined(ClanMemberJoined event)
|
public void onClanMemberJoined(ClanMemberJoined event)
|
||||||
{
|
{
|
||||||
ClanMember member = event.getMember();
|
ClanMember member = event.getMember();
|
||||||
ListType listType = checkBanList(Text.standardize(member.getUsername()));
|
ListType scamList = checkScamList(Text.standardize(member.getUsername()));
|
||||||
if (listType != null)
|
ListType toxicList = checkToxicList(Text.standardize(member.getUsername()));
|
||||||
|
|
||||||
|
if (scamList != null)
|
||||||
{
|
{
|
||||||
sendWarning(Text.standardize(member.getUsername()), listType);
|
sendWarning(Text.standardize(member.getUsername()), scamList);
|
||||||
|
if (config.highlightInClan())
|
||||||
|
{
|
||||||
|
highlightRedInCC();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (toxicList != null)
|
||||||
|
{
|
||||||
|
sendWarning(Text.standardize(member.getUsername()), toxicList);
|
||||||
if (config.highlightInClan())
|
if (config.highlightInClan())
|
||||||
{
|
{
|
||||||
highlightRedInCC();
|
highlightRedInCC();
|
||||||
@@ -184,10 +193,14 @@ public class BanListPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
Widget tradingWith = client.getWidget(335, 31);
|
Widget tradingWith = client.getWidget(335, 31);
|
||||||
String name = tradingWith.getText().replaceAll("Trading With: ", "");
|
String name = tradingWith.getText().replaceAll("Trading With: ", "");
|
||||||
if (checkBanList(name) != null)
|
if (checkScamList(name) != null)
|
||||||
{
|
{
|
||||||
tradingWith.setText(tradingWith.getText().replaceAll(name, "<col=ff0000>" + name + " (Scammer)" + "</col>"));
|
tradingWith.setText(tradingWith.getText().replaceAll(name, "<col=ff0000>" + name + " (Scammer)" + "</col>"));
|
||||||
}
|
}
|
||||||
|
if (checkToxicList(name) != null)
|
||||||
|
{
|
||||||
|
tradingWith.setText(tradingWith.getText().replaceAll(name, "<col=ff6400>" + name + " (Toxic)" + "</col>"));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -196,7 +209,7 @@ public class BanListPlugin extends Plugin
|
|||||||
/**
|
/**
|
||||||
* Compares player name to everything in the ban lists
|
* Compares player name to everything in the ban lists
|
||||||
*/
|
*/
|
||||||
private ListType checkBanList(String nameToBeChecked)
|
private ListType checkScamList(String nameToBeChecked)
|
||||||
{
|
{
|
||||||
if (wdrScamArrayList.size() > 0 && config.enableWDR())
|
if (wdrScamArrayList.size() > 0 && config.enableWDR())
|
||||||
{
|
{
|
||||||
@@ -206,14 +219,6 @@ public class BanListPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wdrToxicArrayList.size() > 0 && config.enableWDR())
|
|
||||||
{
|
|
||||||
if (wdrToxicArrayList.stream().anyMatch(nameToBeChecked::equalsIgnoreCase))
|
|
||||||
{
|
|
||||||
return ListType.WEDORAIDSTOXIC_LIST;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (runeWatchArrayList.size() > 0 && config.enableRuneWatch())
|
if (runeWatchArrayList.size() > 0 && config.enableRuneWatch())
|
||||||
{
|
{
|
||||||
if (runeWatchArrayList.stream().anyMatch(nameToBeChecked::equalsIgnoreCase))
|
if (runeWatchArrayList.stream().anyMatch(nameToBeChecked::equalsIgnoreCase))
|
||||||
@@ -233,6 +238,20 @@ public class BanListPlugin extends Plugin
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private ListType checkToxicList(String nameToBeChecked)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (wdrToxicArrayList.size() > 0 && config.enableWDR())
|
||||||
|
{
|
||||||
|
if (wdrToxicArrayList.stream().anyMatch(nameToBeChecked::equalsIgnoreCase))
|
||||||
|
{
|
||||||
|
return ListType.WEDORAIDSTOXIC_LIST;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends a warning to our player, notifying them that a player is on a ban list
|
* Sends a warning to our player, notifying them that a player is on a ban list
|
||||||
*/
|
*/
|
||||||
@@ -393,12 +412,17 @@ public class BanListPlugin extends Plugin
|
|||||||
Widget widget = client.getWidget(WidgetInfo.CLAN_CHAT_LIST);
|
Widget widget = client.getWidget(WidgetInfo.CLAN_CHAT_LIST);
|
||||||
for (Widget widgetChild : widget.getDynamicChildren())
|
for (Widget widgetChild : widget.getDynamicChildren())
|
||||||
{
|
{
|
||||||
ListType listType = checkBanList(widgetChild.getText());
|
ListType scamList = checkScamList(widgetChild.getText());
|
||||||
|
ListType toxicList = checkToxicList(widgetChild.getText());
|
||||||
|
|
||||||
if (listType != null)
|
if (scamList != null)
|
||||||
{
|
{
|
||||||
widgetChild.setText("<col=ff0000>" + widgetChild.getText() + "</col>");
|
widgetChild.setText("<col=ff0000>" + widgetChild.getText() + "</col>");
|
||||||
}
|
}
|
||||||
|
else if (toxicList != null)
|
||||||
|
{
|
||||||
|
widgetChild.setText("<col=ff6400>" + widgetChild.getText() + "</col>");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
+43
@@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2019, gazivodag <https://github.com/gazivodag>
|
||||||
|
* 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.plugins.blackjack;
|
||||||
|
|
||||||
|
import net.runelite.client.config.Config;
|
||||||
|
import net.runelite.client.config.ConfigGroup;
|
||||||
|
import net.runelite.client.config.ConfigItem;
|
||||||
|
|
||||||
|
@ConfigGroup("blackjack")
|
||||||
|
public interface BlackjackConfig extends Config
|
||||||
|
{
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "pickpocketOnAggro",
|
||||||
|
name = "Pickpocket when aggro\'d",
|
||||||
|
description = "Switches to \"Pickpocket\" when bandit is aggro\'d. Saves food at the cost of slight xp/h."
|
||||||
|
)
|
||||||
|
default boolean pickpocketOnAggro()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
+20
-9
@@ -26,6 +26,7 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.blackjack;
|
package net.runelite.client.plugins.blackjack;
|
||||||
|
|
||||||
|
import com.google.inject.Provides;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -35,11 +36,13 @@ import net.runelite.api.GameState;
|
|||||||
import net.runelite.api.Varbits;
|
import net.runelite.api.Varbits;
|
||||||
import net.runelite.api.events.ChatMessage;
|
import net.runelite.api.events.ChatMessage;
|
||||||
import net.runelite.api.events.MenuEntryAdded;
|
import net.runelite.api.events.MenuEntryAdded;
|
||||||
|
import net.runelite.client.config.ConfigManager;
|
||||||
import net.runelite.client.eventbus.Subscribe;
|
import net.runelite.client.eventbus.Subscribe;
|
||||||
import net.runelite.client.menus.MenuManager;
|
import net.runelite.client.menus.MenuManager;
|
||||||
import net.runelite.client.plugins.Plugin;
|
import net.runelite.client.plugins.Plugin;
|
||||||
import net.runelite.client.plugins.PluginDescriptor;
|
import net.runelite.client.plugins.PluginDescriptor;
|
||||||
import net.runelite.client.plugins.PluginType;
|
import net.runelite.client.plugins.PluginType;
|
||||||
|
import net.runelite.client.util.MenuUtil;
|
||||||
import net.runelite.client.util.Text;
|
import net.runelite.client.util.Text;
|
||||||
import org.apache.commons.lang3.RandomUtils;
|
import org.apache.commons.lang3.RandomUtils;
|
||||||
|
|
||||||
@@ -58,15 +61,24 @@ import org.apache.commons.lang3.RandomUtils;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class BlackjackPlugin extends Plugin
|
public class BlackjackPlugin extends Plugin
|
||||||
{
|
{
|
||||||
|
private static final String SUCCESS_BLACKJACK = "You smack the bandit over the head and render them unconscious.";
|
||||||
|
private static final String FAILED_BLACKJACK = "Your blow only glances off the bandit's head.";
|
||||||
|
private static final int POLLNIVNEACH_REGION = 13358;
|
||||||
|
private long nextKnockOutTick = 0;
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private MenuManager menuManager;
|
private MenuManager menuManager;
|
||||||
|
@Inject
|
||||||
|
private BlackjackConfig config;
|
||||||
|
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
BlackjackConfig getConfig(ConfigManager configManager)
|
||||||
|
{
|
||||||
|
return configManager.getConfig(BlackjackConfig.class);
|
||||||
|
}
|
||||||
|
|
||||||
private static final int POLLNIVNEACH_REGION = 13358;
|
|
||||||
private boolean isKnockedOut = false;
|
|
||||||
private long nextKnockOutTick = 0;
|
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onMenuEntryAdded(MenuEntryAdded event)
|
public void onMenuEntryAdded(MenuEntryAdded event)
|
||||||
@@ -80,13 +92,13 @@ public class BlackjackPlugin extends Plugin
|
|||||||
|
|
||||||
String option = Text.removeTags(event.getOption().toLowerCase());
|
String option = Text.removeTags(event.getOption().toLowerCase());
|
||||||
String target = Text.removeTags(event.getTarget().toLowerCase());
|
String target = Text.removeTags(event.getTarget().toLowerCase());
|
||||||
if (isKnockedOut && nextKnockOutTick >= client.getTickCount())
|
if (nextKnockOutTick >= client.getTickCount())
|
||||||
{
|
{
|
||||||
menuManager.addSwap("", target, "pickpocket", target, false, false);
|
MenuUtil.swap(client, "pickpocket", option, target);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
menuManager.addSwap("", target, "knock-out", target, false, false);
|
MenuUtil.swap(client, "knock-out", option, target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,9 +107,8 @@ public class BlackjackPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
if (event.getType() == ChatMessageType.SPAM)
|
if (event.getType() == ChatMessageType.SPAM)
|
||||||
{
|
{
|
||||||
if (event.getMessage().equals("You smack the bandit over the head and render them unconscious."))
|
if (event.getMessage().equals(SUCCESS_BLACKJACK) ^ (event.getMessage().equals(FAILED_BLACKJACK) && config.pickpocketOnAggro()))
|
||||||
{
|
{
|
||||||
isKnockedOut = true;
|
|
||||||
nextKnockOutTick = client.getTickCount() + RandomUtils.nextInt(3, 4);
|
nextKnockOutTick = client.getTickCount() + RandomUtils.nextInt(3, 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-1
@@ -38,6 +38,7 @@ import net.runelite.client.ui.overlay.OverlayMenuEntry;
|
|||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
import net.runelite.client.ui.overlay.components.table.TableComponent;
|
import net.runelite.client.ui.overlay.components.table.TableComponent;
|
||||||
|
import net.runelite.client.ui.overlay.components.table.TableAlignment;
|
||||||
import net.runelite.client.util.StackFormatter;
|
import net.runelite.client.util.StackFormatter;
|
||||||
|
|
||||||
class BlastFurnaceCofferOverlay extends Overlay
|
class BlastFurnaceCofferOverlay extends Overlay
|
||||||
@@ -64,6 +65,9 @@ class BlastFurnaceCofferOverlay extends Overlay
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TableComponent tableComponent = new TableComponent();
|
||||||
|
tableComponent.setColumnAlignments(TableAlignment.LEFT, TableAlignment.RIGHT);
|
||||||
|
|
||||||
Widget sack = client.getWidget(WidgetInfo.BLAST_FURNACE_COFFER);
|
Widget sack = client.getWidget(WidgetInfo.BLAST_FURNACE_COFFER);
|
||||||
|
|
||||||
panelComponent.getChildren().clear();
|
panelComponent.getChildren().clear();
|
||||||
@@ -72,9 +76,11 @@ class BlastFurnaceCofferOverlay extends Overlay
|
|||||||
{
|
{
|
||||||
sack.setHidden(true);
|
sack.setHidden(true);
|
||||||
|
|
||||||
TableComponent tableComponent = new TableComponent();
|
|
||||||
tableComponent.addRow("Coffer:", StackFormatter.quantityToStackSize(client.getVar(BLAST_FURNACE_COFFER)) + " gp");
|
tableComponent.addRow("Coffer:", StackFormatter.quantityToStackSize(client.getVar(BLAST_FURNACE_COFFER)) + " gp");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!tableComponent.isEmpty())
|
||||||
|
{
|
||||||
panelComponent.getChildren().add(tableComponent);
|
panelComponent.getChildren().add(tableComponent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public enum CannonSpots
|
|||||||
|
|
||||||
BLOODVELDS(new WorldPoint(2439, 9821, 0), new WorldPoint(2448, 9821, 0), new WorldPoint(2472, 9833, 0), new WorldPoint(2453, 9817, 0)),
|
BLOODVELDS(new WorldPoint(2439, 9821, 0), new WorldPoint(2448, 9821, 0), new WorldPoint(2472, 9833, 0), new WorldPoint(2453, 9817, 0)),
|
||||||
FIRE_GIANTS(new WorldPoint(2393, 9782, 0), new WorldPoint(2412, 9776, 0), new WorldPoint(2401, 9780, 0)),
|
FIRE_GIANTS(new WorldPoint(2393, 9782, 0), new WorldPoint(2412, 9776, 0), new WorldPoint(2401, 9780, 0)),
|
||||||
ABBERANT_SPECTRES(new WorldPoint(2456, 9791, 0)),
|
ABERRANT_SPECTRES(new WorldPoint(2456, 9791, 0)),
|
||||||
HELLHOUNDS(new WorldPoint(2431, 9776, 0), new WorldPoint(2413, 9786, 0), new WorldPoint(2783, 9686, 0), new WorldPoint(3198, 10071, 0)),
|
HELLHOUNDS(new WorldPoint(2431, 9776, 0), new WorldPoint(2413, 9786, 0), new WorldPoint(2783, 9686, 0), new WorldPoint(3198, 10071, 0)),
|
||||||
BLACK_DEMONS(new WorldPoint(2859, 9778, 0), new WorldPoint(2841, 9791, 0)),
|
BLACK_DEMONS(new WorldPoint(2859, 9778, 0), new WorldPoint(2841, 9791, 0)),
|
||||||
ELVES(new WorldPoint(2044, 4635, 0)),
|
ELVES(new WorldPoint(2044, 4635, 0)),
|
||||||
|
|||||||
+5
-2
@@ -129,9 +129,12 @@ public class ChatNotificationsPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
List<String> items = Text.fromCSV(config.highlightWordsString());
|
List<String> items = Text.fromCSV(config.highlightWordsString());
|
||||||
String joined = items.stream()
|
String joined = items.stream()
|
||||||
|
.map(Text::escapeJagex) // we compare these strings to the raw Jagex ones
|
||||||
.map(Pattern::quote)
|
.map(Pattern::quote)
|
||||||
.collect(Collectors.joining("|"));
|
.collect(Collectors.joining("|"));
|
||||||
highlightMatcher = Pattern.compile("\\b(" + joined + ")\\b", Pattern.CASE_INSENSITIVE);
|
// To match <word> \b doesn't work due to <> not being in \w,
|
||||||
|
// so match \b or \s
|
||||||
|
highlightMatcher = Pattern.compile("(?:\\b|(?<=\\s))(" + joined + ")(?:\\b|(?=\\s))", Pattern.CASE_INSENSITIVE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,7 +142,6 @@ public class ChatNotificationsPlugin extends Plugin
|
|||||||
public void onChatMessage(ChatMessage chatMessage)
|
public void onChatMessage(ChatMessage chatMessage)
|
||||||
{
|
{
|
||||||
MessageNode messageNode = chatMessage.getMessageNode();
|
MessageNode messageNode = chatMessage.getMessageNode();
|
||||||
String nodeValue = Text.removeTags(messageNode.getValue());
|
|
||||||
boolean update = false;
|
boolean update = false;
|
||||||
|
|
||||||
switch (chatMessage.getType())
|
switch (chatMessage.getType())
|
||||||
@@ -202,6 +204,7 @@ public class ChatNotificationsPlugin extends Plugin
|
|||||||
|
|
||||||
if (highlightMatcher != null)
|
if (highlightMatcher != null)
|
||||||
{
|
{
|
||||||
|
String nodeValue = messageNode.getValue();
|
||||||
Matcher matcher = highlightMatcher.matcher(nodeValue);
|
Matcher matcher = highlightMatcher.matcher(nodeValue);
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
StringBuffer stringBuffer = new StringBuffer();
|
StringBuffer stringBuffer = new StringBuffer();
|
||||||
|
|||||||
+1
-1
@@ -259,7 +259,7 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc
|
|||||||
new CrypticClue("Search the drawers in Catherby's Archery shop.", DRAWERS_350, new WorldPoint(2825, 3442, 0), "Hickton's Archery Emporium in Catherby."),
|
new CrypticClue("Search the drawers in Catherby's Archery shop.", DRAWERS_350, new WorldPoint(2825, 3442, 0), "Hickton's Archery Emporium in Catherby."),
|
||||||
new CrypticClue("The hand ain't listening.", "The Face", new WorldPoint(3019, 3232, 0), "Talk to The Face located by the manhole just north of the Port Sarim fishing shop."),
|
new CrypticClue("The hand ain't listening.", "The Face", new WorldPoint(3019, 3232, 0), "Talk to The Face located by the manhole just north of the Port Sarim fishing shop."),
|
||||||
new CrypticClue("Search the chest in the left-hand tower of Camelot Castle.", CLOSED_CHEST_25592, new WorldPoint(2748, 3495, 2), "Located on the second floor of the western tower of Camelot."),
|
new CrypticClue("Search the chest in the left-hand tower of Camelot Castle.", CLOSED_CHEST_25592, new WorldPoint(2748, 3495, 2), "Located on the second floor of the western tower of Camelot."),
|
||||||
new CrypticClue("Kill the spiritual, magic and godly whilst representing their own god", null, "Kill a spiritual mage while wearing a corresponding god item."),
|
new CrypticClue("Kill the spiritual, magic and godly whilst representing their own god.", null, "Kill a spiritual mage while wearing a corresponding god item."),
|
||||||
new CrypticClue("Anger those who adhere to Saradomin's edicts to prevent travel.", "Monk of Entrana", new WorldPoint(3042, 3236, 0), "Port Sarim Docks, try to charter a ship to Entrana with armour or weapons equipped."),
|
new CrypticClue("Anger those who adhere to Saradomin's edicts to prevent travel.", "Monk of Entrana", new WorldPoint(3042, 3236, 0), "Port Sarim Docks, try to charter a ship to Entrana with armour or weapons equipped."),
|
||||||
new CrypticClue("South of a river in a town surrounded by the undead, what lies beneath the furnace?", new WorldPoint(2857, 2966, 0), "Dig in front of the Shilo Village furnace."),
|
new CrypticClue("South of a river in a town surrounded by the undead, what lies beneath the furnace?", new WorldPoint(2857, 2966, 0), "Dig in front of the Shilo Village furnace."),
|
||||||
new CrypticClue("Talk to the Squire in the White Knights' castle in Falador.", "Squire", new WorldPoint(2977, 3343, 0), "The squire is located in the courtyard of the White Knights' Castle."),
|
new CrypticClue("Talk to the Squire in the White Knights' castle in Falador.", "Squire", new WorldPoint(2977, 3343, 0), "The squire is located in the courtyard of the White Knights' Castle."),
|
||||||
|
|||||||
+2
-2
@@ -87,11 +87,11 @@ public class FaloTheBardClue extends ClueScroll implements TextClueScroll, NpcCl
|
|||||||
new FaloTheBardClue("A shiny helmet of flight, to obtain this with melee, struggle you might.", item(ARMADYL_HELMET)),
|
new FaloTheBardClue("A shiny helmet of flight, to obtain this with melee, struggle you might.", item(ARMADYL_HELMET)),
|
||||||
// The wiki doesn't specify whether the trimmed dragon defender will work so I've assumed that it doesn't
|
// The wiki doesn't specify whether the trimmed dragon defender will work so I've assumed that it doesn't
|
||||||
new FaloTheBardClue("A sword held in the other hand, red its colour, Cyclops strength you must withstand.", item(DRAGON_DEFENDER)),
|
new FaloTheBardClue("A sword held in the other hand, red its colour, Cyclops strength you must withstand.", item(DRAGON_DEFENDER)),
|
||||||
new FaloTheBardClue("A token used to kill mythical beasts, in hope of a blade or just for an xp feast.", item(WARRIOR_GUILD_TOKEN)),
|
new FaloTheBardClue("A token used to kill mythical beasts, in hopes of a blade or just for an xp feast.", item(WARRIOR_GUILD_TOKEN)),
|
||||||
new FaloTheBardClue("Green is my favorite, mature ale I do love, this takes your herblore above.", item(GREENMANS_ALEM)),
|
new FaloTheBardClue("Green is my favorite, mature ale I do love, this takes your herblore above.", item(GREENMANS_ALEM)),
|
||||||
new FaloTheBardClue("It can hold down a boat or crush a goat, this object, you see, is quite heavy.", item(BARRELCHEST_ANCHOR)),
|
new FaloTheBardClue("It can hold down a boat or crush a goat, this object, you see, is quite heavy.", item(BARRELCHEST_ANCHOR)),
|
||||||
new FaloTheBardClue("It comes from the ground, underneath the snowy plain. Trolls aplenty, with what looks like a mane.", item(BASALT)),
|
new FaloTheBardClue("It comes from the ground, underneath the snowy plain. Trolls aplenty, with what looks like a mane.", item(BASALT)),
|
||||||
new FaloTheBardClue("No attack to wield, only strength is required, made of obsidian but with no room for a shield.", item(TZHAARKETOM)),
|
new FaloTheBardClue("No attack to wield, only strength is required, made of obsidian, but with no room for a shield.", item(TZHAARKETOM)),
|
||||||
new FaloTheBardClue("Penance healers runners and more, obtaining this body often gives much deplore.", item(FIGHTER_TORSO)),
|
new FaloTheBardClue("Penance healers runners and more, obtaining this body often gives much deplore.", item(FIGHTER_TORSO)),
|
||||||
new FaloTheBardClue("Strangely found in a chest, many believe these gloves are the best.", item(BARROWS_GLOVES)),
|
new FaloTheBardClue("Strangely found in a chest, many believe these gloves are the best.", item(BARROWS_GLOVES)),
|
||||||
new FaloTheBardClue("These gloves of white won't help you fight, but aid in cooking, they just might.", item(COOKING_GAUNTLETS)),
|
new FaloTheBardClue("These gloves of white won't help you fight, but aid in cooking, they just might.", item(COOKING_GAUNTLETS)),
|
||||||
|
|||||||
+33
-19
@@ -24,22 +24,23 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.combatcounter;
|
package net.runelite.client.plugins.combatcounter;
|
||||||
|
|
||||||
import net.runelite.api.Client;
|
import java.awt.Dimension;
|
||||||
import net.runelite.api.Player;
|
import java.awt.Graphics2D;
|
||||||
import net.runelite.client.ui.overlay.Overlay;
|
|
||||||
import net.runelite.client.ui.overlay.OverlayMenuEntry;
|
|
||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
|
||||||
import net.runelite.client.ui.overlay.components.LineComponent;
|
|
||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
|
||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
|
||||||
|
|
||||||
import javax.inject.Inject;
|
|
||||||
import java.awt.*;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import net.runelite.api.Client;
|
||||||
import static net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG;
|
import static net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG;
|
||||||
|
import net.runelite.api.Player;
|
||||||
|
import net.runelite.client.ui.overlay.Overlay;
|
||||||
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
|
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
|
||||||
|
import net.runelite.client.ui.overlay.OverlayMenuEntry;
|
||||||
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
|
import net.runelite.client.ui.overlay.components.table.TableAlignment;
|
||||||
|
import net.runelite.client.ui.overlay.components.table.TableComponent;
|
||||||
|
import net.runelite.client.util.ColorUtil;
|
||||||
|
|
||||||
class CombatOverlay extends Overlay
|
class CombatOverlay extends Overlay
|
||||||
{
|
{
|
||||||
@@ -66,8 +67,6 @@ class CombatOverlay extends Overlay
|
|||||||
getMenuEntries().add(new OverlayMenuEntry(RUNELITE_OVERLAY_CONFIG, OPTION_CONFIGURE, "Tick Counter"));
|
getMenuEntries().add(new OverlayMenuEntry(RUNELITE_OVERLAY_CONFIG, OPTION_CONFIGURE, "Tick Counter"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Dimension render(Graphics2D graphics)
|
public Dimension render(Graphics2D graphics)
|
||||||
{
|
{
|
||||||
@@ -77,39 +76,54 @@ class CombatOverlay extends Overlay
|
|||||||
|
|
||||||
Player local = client.getLocalPlayer();
|
Player local = client.getLocalPlayer();
|
||||||
if (local == null || local.getName() == null)
|
if (local == null || local.getName() == null)
|
||||||
|
{
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
panelComponent.setBackgroundColor(config.bgColor());
|
panelComponent.setBackgroundColor(config.bgColor());
|
||||||
panelComponent.getChildren().add(TitleComponent.builder().text("Tick Counter").color(config.titleColor()).build());
|
panelComponent.getChildren().add(TitleComponent.builder().text("Tick Counter").color(config.titleColor()).build());
|
||||||
int total = 0;
|
int total = 0;
|
||||||
|
|
||||||
|
TableComponent tableComponent = new TableComponent();
|
||||||
|
tableComponent.setColumnAlignments(TableAlignment.LEFT, TableAlignment.RIGHT);
|
||||||
|
|
||||||
if (plugin.getCounter().isEmpty())
|
if (plugin.getCounter().isEmpty())
|
||||||
{
|
{
|
||||||
panelComponent.getChildren().add(LineComponent.builder().left(local.getName()).right("0").build());
|
tableComponent.addRow(local.getName(), "0");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Map<String, Long> map = this.plugin.getCounter();
|
Map<String, Long> map = this.plugin.getCounter();
|
||||||
if (map == null)
|
if (map == null)
|
||||||
|
{
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
for (String name : map.keySet())
|
for (String name : map.keySet())
|
||||||
{
|
{
|
||||||
if (client.getLocalPlayer().getName().contains(name))
|
if (client.getLocalPlayer().getName().contains(name))
|
||||||
{
|
{
|
||||||
panelComponent.getChildren().add(1, LineComponent.builder().left(name).right(Long.toString(map.get(name))).leftColor(config.selfColor()).rightColor(config.selfColor()).build());
|
tableComponent.addRow(ColorUtil.prependColorTag(name, config.selfColor()), ColorUtil.prependColorTag(Long.toString(map.get(name)), config.selfColor()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
panelComponent.getChildren().add(1, LineComponent.builder().left(name).right(Long.toString(map.get(name))).leftColor(config.otherColor()).rightColor(config.otherColor()).build());
|
tableComponent.addRow(ColorUtil.prependColorTag(name, config.otherColor()), ColorUtil.prependColorTag(Long.toString(map.get(name)), config.otherColor()));
|
||||||
}
|
}
|
||||||
total += map.get(name);
|
total += map.get(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!map.containsKey(local.getName()))
|
if (!map.containsKey(local.getName()))
|
||||||
{
|
{
|
||||||
panelComponent.getChildren().add(LineComponent.builder().left(local.getName()).right("0").leftColor(config.selfColor()).rightColor(config.selfColor()).build());
|
tableComponent.addRow(ColorUtil.prependColorTag(local.getName(), config.selfColor()), ColorUtil.prependColorTag("0", config.selfColor()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
panelComponent.getChildren().add(LineComponent.builder().left("Total").leftColor(config.totalColor()).rightColor(config.totalColor()).right(String.valueOf(total)).build());
|
|
||||||
|
tableComponent.addRow(ColorUtil.prependColorTag("Total:", config.totalColor()), ColorUtil.prependColorTag(String.valueOf(total), config.totalColor()));
|
||||||
|
|
||||||
|
if (!tableComponent.isEmpty())
|
||||||
|
{
|
||||||
|
panelComponent.getChildren().add(tableComponent);
|
||||||
|
}
|
||||||
|
|
||||||
return panelComponent.render(graphics);
|
return panelComponent.render(graphics);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
+25
-11
@@ -24,20 +24,22 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.combatcounter;
|
package net.runelite.client.plugins.combatcounter;
|
||||||
|
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.Graphics2D;
|
||||||
|
import java.util.Map;
|
||||||
|
import javax.inject.Inject;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
|
import static net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG;
|
||||||
import net.runelite.api.Player;
|
import net.runelite.api.Player;
|
||||||
import net.runelite.client.ui.overlay.Overlay;
|
import net.runelite.client.ui.overlay.Overlay;
|
||||||
|
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
|
||||||
import net.runelite.client.ui.overlay.OverlayMenuEntry;
|
import net.runelite.client.ui.overlay.OverlayMenuEntry;
|
||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
import net.runelite.client.ui.overlay.components.LineComponent;
|
|
||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
import javax.inject.Inject;
|
import net.runelite.client.ui.overlay.components.table.TableAlignment;
|
||||||
import java.awt.*;
|
import net.runelite.client.ui.overlay.components.table.TableComponent;
|
||||||
import java.util.Map;
|
import net.runelite.client.util.ColorUtil;
|
||||||
|
|
||||||
import static net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG;
|
|
||||||
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
|
|
||||||
|
|
||||||
class DamageOverlay extends Overlay
|
class DamageOverlay extends Overlay
|
||||||
{
|
{
|
||||||
@@ -75,39 +77,51 @@ class DamageOverlay extends Overlay
|
|||||||
|
|
||||||
Player local = client.getLocalPlayer();
|
Player local = client.getLocalPlayer();
|
||||||
if (local == null || local.getName() == null)
|
if (local == null || local.getName() == null)
|
||||||
|
{
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
panelComponent.setBackgroundColor(config.bgColor());
|
panelComponent.setBackgroundColor(config.bgColor());
|
||||||
panelComponent.getChildren().add(TitleComponent.builder().text("Damage Counter").color(config.titleColor()).build());
|
panelComponent.getChildren().add(TitleComponent.builder().text("Damage Counter").color(config.titleColor()).build());
|
||||||
|
|
||||||
|
TableComponent tableComponent = new TableComponent();
|
||||||
|
tableComponent.setColumnAlignments(TableAlignment.LEFT, TableAlignment.RIGHT);
|
||||||
|
|
||||||
if (plugin.getCounter().isEmpty())
|
if (plugin.getCounter().isEmpty())
|
||||||
{
|
{
|
||||||
panelComponent.getChildren().add(LineComponent.builder().left(local.getName()).right("0").build());
|
tableComponent.addRow(local.getName(), "0");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Map<String, Double> map = this.plugin.playerDamage;
|
Map<String, Double> map = this.plugin.playerDamage;
|
||||||
if (map == null)
|
if (map == null)
|
||||||
|
{
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
for (String name : map.keySet())
|
for (String name : map.keySet())
|
||||||
{
|
{
|
||||||
String val = String.format("%.1f", map.get(name));
|
String val = String.format("%.1f", map.get(name));
|
||||||
if (client.getLocalPlayer().getName().contains(name))
|
if (client.getLocalPlayer().getName().contains(name))
|
||||||
{
|
{
|
||||||
panelComponent.getChildren().add(1, LineComponent.builder().left(name).right(val).leftColor(config.selfColor()).rightColor(config.selfColor()).build());
|
tableComponent.addRow(ColorUtil.prependColorTag(name, config.selfColor()), ColorUtil.prependColorTag(val, config.selfColor()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
panelComponent.getChildren().add(1, LineComponent.builder().left(name).right(val).leftColor(config.otherColor()).rightColor(config.otherColor()).build());
|
tableComponent.addRow(ColorUtil.prependColorTag(name, config.otherColor()), ColorUtil.prependColorTag(val, config.otherColor()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!map.containsKey(local.getName()))
|
if (!map.containsKey(local.getName()))
|
||||||
{
|
{
|
||||||
panelComponent.getChildren().add(LineComponent.builder().left(local.getName()).right("0").leftColor(config.selfColor()).rightColor(config.selfColor()).build());
|
tableComponent.addRow(ColorUtil.prependColorTag(local.getName(), config.selfColor()), ColorUtil.prependColorTag("0", config.selfColor()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!tableComponent.isEmpty())
|
||||||
|
{
|
||||||
|
panelComponent.getChildren().add(tableComponent);
|
||||||
|
}
|
||||||
|
|
||||||
return panelComponent.render(graphics);
|
return panelComponent.render(graphics);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ import javax.swing.border.EmptyBorder;
|
|||||||
import javax.swing.event.ChangeListener;
|
import javax.swing.event.ChangeListener;
|
||||||
import javax.swing.event.DocumentEvent;
|
import javax.swing.event.DocumentEvent;
|
||||||
import javax.swing.event.DocumentListener;
|
import javax.swing.event.DocumentListener;
|
||||||
|
import javax.swing.plaf.basic.BasicSpinnerUI;
|
||||||
import javax.swing.text.JTextComponent;
|
import javax.swing.text.JTextComponent;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.runelite.client.config.ChatColorConfig;
|
import net.runelite.client.config.ChatColorConfig;
|
||||||
@@ -702,20 +703,66 @@ public class ConfigPanel extends PluginPanel
|
|||||||
|
|
||||||
if (max < Integer.MAX_VALUE)
|
if (max < Integer.MAX_VALUE)
|
||||||
{
|
{
|
||||||
|
JLabel sliderValueLabel = new JLabel();
|
||||||
JSlider slider = new JSlider(min, max, value);
|
JSlider slider = new JSlider(min, max, value);
|
||||||
configEntryName.setText(name.concat(": ").concat(String.valueOf(slider.getValue())));
|
sliderValueLabel.setText(String.valueOf(slider.getValue()));
|
||||||
slider.setPreferredSize(new Dimension(85, 25));
|
slider.setPreferredSize(new Dimension(85, 25));
|
||||||
String finalName = name;
|
|
||||||
slider.addChangeListener((l) ->
|
slider.addChangeListener((l) ->
|
||||||
{
|
{
|
||||||
configEntryName.setText(finalName.concat(": ").concat(String.valueOf(slider.getValue())));
|
sliderValueLabel.setText(String.valueOf(slider.getValue()));
|
||||||
if (!slider.getValueIsAdjusting())
|
if (!slider.getValueIsAdjusting())
|
||||||
{
|
{
|
||||||
changeConfiguration(listItem, config, slider, cd, cid);
|
changeConfiguration(listItem, config, slider, cd, cid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
item.add(slider, BorderLayout.EAST);
|
|
||||||
|
SpinnerModel model = new SpinnerNumberModel(value, min, max, 1);
|
||||||
|
JSpinner spinner = new JSpinner(model);
|
||||||
|
Component editor = spinner.getEditor();
|
||||||
|
JFormattedTextField spinnerTextField = ((JSpinner.DefaultEditor) editor).getTextField();
|
||||||
|
spinnerTextField.setColumns(SPINNER_FIELD_WIDTH);
|
||||||
|
spinner.setUI(new BasicSpinnerUI()
|
||||||
|
{
|
||||||
|
protected Component createNextButton()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Component createPreviousButton()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
spinner.addChangeListener((ce) ->
|
||||||
|
{
|
||||||
|
changeConfiguration(listItem, config, spinner, cd, cid);
|
||||||
|
spinner.setVisible(false);
|
||||||
|
sliderValueLabel.setText(String.valueOf(spinner.getValue()));
|
||||||
|
sliderValueLabel.setVisible(true);
|
||||||
|
slider.setValue((Integer) spinner.getValue());
|
||||||
|
slider.setVisible(true);
|
||||||
|
});
|
||||||
|
spinner.setVisible(false);
|
||||||
|
|
||||||
|
sliderValueLabel.addMouseListener(new MouseAdapter()
|
||||||
|
{
|
||||||
|
public void mouseClicked(MouseEvent e)
|
||||||
|
{
|
||||||
|
spinner.setValue(slider.getValue());
|
||||||
|
spinner.setVisible(true);
|
||||||
|
sliderValueLabel.setVisible(false);
|
||||||
|
slider.setVisible(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
JPanel subPanel = new JPanel();
|
||||||
|
|
||||||
|
subPanel.add(spinner);
|
||||||
|
subPanel.add(sliderValueLabel);
|
||||||
|
subPanel.add(slider);
|
||||||
|
|
||||||
|
item.add(subPanel, BorderLayout.EAST);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,6 +26,9 @@
|
|||||||
package net.runelite.client.plugins.coxhelper;
|
package net.runelite.client.plugins.coxhelper;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
import java.awt.Font;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
import net.runelite.client.config.Config;
|
import net.runelite.client.config.Config;
|
||||||
import net.runelite.client.config.ConfigGroup;
|
import net.runelite.client.config.ConfigGroup;
|
||||||
import net.runelite.client.config.ConfigItem;
|
import net.runelite.client.config.ConfigItem;
|
||||||
@@ -36,6 +39,24 @@ import net.runelite.client.config.Stub;
|
|||||||
|
|
||||||
public interface CoxConfig extends Config
|
public interface CoxConfig extends Config
|
||||||
{
|
{
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum FontStyle
|
||||||
|
{
|
||||||
|
BOLD("Bold", Font.BOLD),
|
||||||
|
ITALIC("Italic", Font.ITALIC),
|
||||||
|
PLAIN("Plain", Font.PLAIN);
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private int font;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 1,
|
position = 1,
|
||||||
keyName = "muttadileStub",
|
keyName = "muttadileStub",
|
||||||
@@ -48,12 +69,12 @@ public interface CoxConfig extends Config
|
|||||||
}
|
}
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 2,
|
position = 2,
|
||||||
keyName = "Muttadile",
|
keyName = "muttadile",
|
||||||
name = "Muttadile Marker",
|
name = "Muttadile Marker",
|
||||||
description = "Places an overlay around muttadiles showing their melee range.",
|
description = "Places an overlay around muttadiles showing their melee range.",
|
||||||
parent = "muttadileStub"
|
parent = "muttadileStub"
|
||||||
)
|
)
|
||||||
default boolean Muttadile()
|
default boolean muttadile()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -71,12 +92,12 @@ public interface CoxConfig extends Config
|
|||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 4,
|
position = 4,
|
||||||
keyName = "Tekton",
|
keyName = "tekton",
|
||||||
name = "Tekton Marker",
|
name = "Tekton Marker",
|
||||||
description = "Places an overlay around Tekton showing his melee range.",
|
description = "Places an overlay around Tekton showing his melee range.",
|
||||||
parent = "tektonStub"
|
parent = "tektonStub"
|
||||||
)
|
)
|
||||||
default boolean Tekton()
|
default boolean tekton()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -106,12 +127,24 @@ public interface CoxConfig extends Config
|
|||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 6,
|
position = 6,
|
||||||
keyName = "Guardians",
|
keyName = "guardians",
|
||||||
name = "Guardians timing",
|
name = "Guardians Overlay",
|
||||||
description = "Places an overlay near Guardians showing safespot.",
|
description = "Places an overlay near Guardians showing safespot.",
|
||||||
parent = "guardiansStub"
|
parent = "guardiansStub"
|
||||||
)
|
)
|
||||||
default boolean Guardians()
|
default boolean guardians()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
position = 6,
|
||||||
|
keyName = "guardinTickCounter",
|
||||||
|
name = "Guardians Tick Timing",
|
||||||
|
description = "Places an overlay on Guardians showing attack tick timers.",
|
||||||
|
parent = "guardiansStub"
|
||||||
|
)
|
||||||
|
default boolean guardinTickCounter()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -200,12 +233,12 @@ public interface CoxConfig extends Config
|
|||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 14,
|
position = 14,
|
||||||
keyName = "OlmTick",
|
keyName = "olmTick",
|
||||||
name = "Olm Tick Counter",
|
name = "Olm Tick Counter",
|
||||||
description = "Show Tick Counter on Olm",
|
description = "Show Tick Counter on Olm",
|
||||||
parent = "olmStub"
|
parent = "olmStub"
|
||||||
)
|
)
|
||||||
default boolean OlmTick()
|
default boolean olmTick()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
+55
-13
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2019, gazivodag <https://github.com/gazivodag>
|
* Copyright (c) 2019, lyzrds <https://discord.gg/5eb9Fe>
|
||||||
* Copyright (c) 2019, ganom <https://github.com/Ganom>
|
* Copyright (c) 2019, ganom <https://github.com/Ganom>
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -33,40 +33,50 @@ import java.awt.Rectangle;
|
|||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
|
import net.runelite.api.NpcID;
|
||||||
import net.runelite.api.SpriteID;
|
import net.runelite.api.SpriteID;
|
||||||
import net.runelite.client.game.SpriteManager;
|
import net.runelite.client.game.SpriteManager;
|
||||||
import net.runelite.client.ui.overlay.Overlay;
|
import net.runelite.client.ui.overlay.Overlay;
|
||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
import net.runelite.client.ui.overlay.components.ComponentConstants;
|
import net.runelite.client.ui.overlay.components.ComponentConstants;
|
||||||
import net.runelite.client.ui.overlay.components.ComponentOrientation;
|
|
||||||
import net.runelite.client.ui.overlay.components.InfoBoxComponent;
|
import net.runelite.client.ui.overlay.components.InfoBoxComponent;
|
||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
|
import net.runelite.client.ui.overlay.components.table.TableAlignment;
|
||||||
|
import net.runelite.client.ui.overlay.components.table.TableComponent;
|
||||||
|
import net.runelite.client.util.ColorUtil;
|
||||||
|
|
||||||
class OlmPrayAgainstOverlay extends Overlay
|
public class CoxInfoBox extends Overlay
|
||||||
{
|
{
|
||||||
private static final Color NOT_ACTIVATED_BACKGROUND_COLOR = new Color(150, 0, 0, 150);
|
private static final Color NOT_ACTIVATED_BACKGROUND_COLOR = new Color(150, 0, 0, 150);
|
||||||
private final CoxPlugin plugin;
|
private final CoxPlugin plugin;
|
||||||
private final CoxConfig config;
|
private final CoxConfig config;
|
||||||
private final Client client;
|
private final Client client;
|
||||||
private final SpriteManager spriteManager;
|
private final SpriteManager spriteManager;
|
||||||
|
private final PanelComponent prayAgainstPanel = new PanelComponent();
|
||||||
private final PanelComponent panelComponent = new PanelComponent();
|
private final PanelComponent panelComponent = new PanelComponent();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
OlmPrayAgainstOverlay(CoxPlugin plugin, CoxConfig config, Client client, SpriteManager spriteManager)
|
CoxInfoBox(CoxPlugin plugin, CoxConfig config, Client client, SpriteManager spriteManager)
|
||||||
{
|
{
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
this.config = config;
|
this.config = config;
|
||||||
this.client = client;
|
this.client = client;
|
||||||
this.spriteManager = spriteManager;
|
this.spriteManager = spriteManager;
|
||||||
setPosition(OverlayPosition.BOTTOM_RIGHT);
|
setPosition(OverlayPosition.BOTTOM_RIGHT);
|
||||||
panelComponent.setOrientation(ComponentOrientation.VERTICAL);
|
setPosition(OverlayPosition.DETACHED);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dimension render(Graphics2D graphics2D)
|
@Override
|
||||||
|
public Dimension render(Graphics2D graphics)
|
||||||
{
|
{
|
||||||
panelComponent.getChildren().clear();
|
panelComponent.getChildren().clear();
|
||||||
|
if (plugin.inRaid())
|
||||||
|
{
|
||||||
|
prayAgainstPanel.getChildren().clear();
|
||||||
|
|
||||||
final PrayAgainst prayAgainst = plugin.getPrayAgainstOlm();
|
final PrayAgainst prayAgainst = plugin.getPrayAgainstOlm();
|
||||||
|
|
||||||
if (plugin.getPrayAgainstOlm() == null && !config.prayAgainstOlm())
|
if (plugin.getPrayAgainstOlm() == null && !config.prayAgainstOlm())
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
@@ -82,21 +92,55 @@ class OlmPrayAgainstOverlay extends Overlay
|
|||||||
? ComponentConstants.STANDARD_BACKGROUND_COLOR
|
? ComponentConstants.STANDARD_BACKGROUND_COLOR
|
||||||
: NOT_ACTIVATED_BACKGROUND_COLOR);
|
: NOT_ACTIVATED_BACKGROUND_COLOR);
|
||||||
prayComponent.setPreferredSize(new Dimension(40, 40));
|
prayComponent.setPreferredSize(new Dimension(40, 40));
|
||||||
panelComponent.getChildren().add(prayComponent);
|
prayAgainstPanel.getChildren().add(prayComponent);
|
||||||
|
|
||||||
panelComponent.setPreferredSize(new Dimension(40, 40));
|
prayAgainstPanel.setPreferredSize(new Dimension(40, 40));
|
||||||
panelComponent.setBorder(new Rectangle(0, 0, 0, 0));
|
prayAgainstPanel.setBorder(new Rectangle(0, 0, 0, 0));
|
||||||
return panelComponent.render(graphics2D);
|
return prayAgainstPanel.render(graphics);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
plugin.setPrayAgainstOlm(null);
|
plugin.setPrayAgainstOlm(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config.vangHealth() && plugin.getVanguards() > 0)
|
||||||
|
{
|
||||||
|
panelComponent.getChildren().add(TitleComponent.builder()
|
||||||
|
.text("Vanguards")
|
||||||
|
.color(Color.pink)
|
||||||
|
.build());
|
||||||
|
|
||||||
|
TableComponent tableComponent = new TableComponent();
|
||||||
|
tableComponent.setColumnAlignments(TableAlignment.LEFT, TableAlignment.RIGHT);
|
||||||
|
for (NPCContainer npcs : plugin.getNpcContainer().values())
|
||||||
|
{
|
||||||
|
float percent = (float) npcs.getNpc().getHealthRatio() / npcs.getNpc().getHealth() * 100;
|
||||||
|
switch (npcs.getNpc().getId())
|
||||||
|
{
|
||||||
|
case NpcID.VANGUARD_7527:
|
||||||
|
tableComponent.addRow(ColorUtil.prependColorTag("Melee", npcs.getAttackStyle().getColor()),
|
||||||
|
Integer.toString((int) percent));
|
||||||
|
break;
|
||||||
|
case NpcID.VANGUARD_7528:
|
||||||
|
tableComponent.addRow(ColorUtil.prependColorTag("Range", npcs.getAttackStyle().getColor()),
|
||||||
|
Integer.toString((int) percent));
|
||||||
|
break;
|
||||||
|
case NpcID.VANGUARD_7529:
|
||||||
|
tableComponent.addRow(ColorUtil.prependColorTag("Mage", npcs.getAttackStyle().getColor()),
|
||||||
|
Integer.toString((int) percent));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
panelComponent.getChildren().add(tableComponent);
|
||||||
|
|
||||||
|
return panelComponent.render(graphics);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (client.getLocalPlayer().getWorldLocation().getRegionID() == 4919)
|
if (client.getLocalPlayer().getWorldLocation().getRegionID() == 4919)
|
||||||
{
|
{
|
||||||
plugin.setPrayAgainstOlm(null);
|
plugin.setPrayAgainstOlm(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,6 +178,4 @@ class OlmPrayAgainstOverlay extends Overlay
|
|||||||
g.dispose();
|
g.dispose();
|
||||||
return scaledImage;
|
return scaledImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
+227
-101
@@ -34,9 +34,11 @@ import java.awt.Polygon;
|
|||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
import net.runelite.api.Actor;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.NPC;
|
import net.runelite.api.NPC;
|
||||||
import net.runelite.api.NPCDefinition;
|
import net.runelite.api.NPCDefinition;
|
||||||
|
import net.runelite.api.NpcID;
|
||||||
import net.runelite.api.Perspective;
|
import net.runelite.api.Perspective;
|
||||||
import net.runelite.api.Point;
|
import net.runelite.api.Point;
|
||||||
import net.runelite.api.coords.LocalPoint;
|
import net.runelite.api.coords.LocalPoint;
|
||||||
@@ -51,8 +53,6 @@ import net.runelite.client.ui.overlay.OverlayUtil;
|
|||||||
public class CoxOverlay extends Overlay
|
public class CoxOverlay extends Overlay
|
||||||
{
|
{
|
||||||
private final Client client;
|
private final Client client;
|
||||||
|
|
||||||
|
|
||||||
private final CoxPlugin plugin;
|
private final CoxPlugin plugin;
|
||||||
private final CoxConfig config;
|
private final CoxConfig config;
|
||||||
|
|
||||||
@@ -72,7 +72,6 @@ public class CoxOverlay extends Overlay
|
|||||||
{
|
{
|
||||||
for (WorldPoint point : plugin.getOlm_Heal())
|
for (WorldPoint point : plugin.getOlm_Heal())
|
||||||
{
|
{
|
||||||
client.setHintArrow(point);
|
|
||||||
drawTile(graphics, point, config.tpColor(), 2, 150, 50);
|
drawTile(graphics, point, config.tpColor(), 2, 150, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,99 +81,201 @@ public class CoxOverlay extends Overlay
|
|||||||
drawTile(graphics, point, config.tpColor(), 2, 150, 50);
|
drawTile(graphics, point, config.tpColor(), 2, 150, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (plugin.isRunMutta())
|
if (plugin.inRaid())
|
||||||
{
|
{
|
||||||
if (config.Muttadile())
|
for (NPCContainer npcs : plugin.getNpcContainer().values())
|
||||||
{
|
{
|
||||||
NPC boss = plugin.getMomma_NPC();
|
Color color;
|
||||||
NPC baby = plugin.getMutta_NPC();
|
List<WorldPoint> hitSquares;
|
||||||
if (boss != null)
|
int ticksLeft;
|
||||||
|
switch (npcs.getNpc().getId())
|
||||||
{
|
{
|
||||||
int size = 1;
|
case NpcID.TEKTON:
|
||||||
NPCDefinition composition = boss.getTransformedDefinition();
|
case NpcID.TEKTON_7541:
|
||||||
|
case NpcID.TEKTON_7542:
|
||||||
|
case NpcID.TEKTON_7545:
|
||||||
|
case NpcID.TEKTON_ENRAGED:
|
||||||
|
case NpcID.TEKTON_ENRAGED_7544:
|
||||||
|
if (config.tekton())
|
||||||
{
|
{
|
||||||
size = composition.getSize();
|
hitSquares = getHitSquares(npcs.getNpc().getWorldLocation(), npcs.getNpcSize(), 1, false);
|
||||||
}
|
for (WorldPoint p : hitSquares)
|
||||||
List<WorldPoint> meleeRangeMom = getHitSquares(boss.getWorldLocation(), size, 1, false);
|
|
||||||
for (WorldPoint p : meleeRangeMom)
|
|
||||||
{
|
|
||||||
drawTile(graphics, p, config.muttaColor(), 0, 0, 50);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (baby != null)
|
|
||||||
{
|
|
||||||
int size = 1;
|
|
||||||
NPCDefinition compositionbaby = baby.getTransformedDefinition();
|
|
||||||
{
|
|
||||||
size = compositionbaby.getSize();
|
|
||||||
}
|
|
||||||
List<WorldPoint> meleeRange = getHitSquares(baby.getWorldLocation(), size, 1, false);
|
|
||||||
for (WorldPoint p : meleeRange)
|
|
||||||
{
|
|
||||||
drawTile(graphics, p, config.muttaColor(), 0, 0, 50);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (plugin.isRunGuard())
|
|
||||||
{
|
|
||||||
if (config.Guardians())
|
|
||||||
{
|
|
||||||
NPC G1 = plugin.getGuard1_NPC();
|
|
||||||
NPC G2 = plugin.getGuard2_NPC();
|
|
||||||
int tick = plugin.getGuardTick();
|
|
||||||
if (tick == 5)
|
|
||||||
{
|
|
||||||
if (G1 != null)
|
|
||||||
{
|
|
||||||
int size = 1;
|
|
||||||
NPCDefinition composition = G1.getTransformedDefinition();
|
|
||||||
{
|
|
||||||
size = composition.getSize();
|
|
||||||
}
|
|
||||||
List<WorldPoint> meleeRange = getHitSquares(G1.getWorldLocation(), size, 1, true);
|
|
||||||
for (WorldPoint p : meleeRange)
|
|
||||||
{
|
|
||||||
drawTile(graphics, p, config.guardColor(), 0, 0, 50);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (G2 != null)
|
|
||||||
{
|
|
||||||
int size = 1;
|
|
||||||
NPCDefinition composition = G2.getTransformedDefinition();
|
|
||||||
{
|
|
||||||
size = composition.getSize();
|
|
||||||
}
|
|
||||||
List<WorldPoint> meleeRange = getHitSquares(G2.getWorldLocation(), size, 1, true);
|
|
||||||
for (WorldPoint p : meleeRange)
|
|
||||||
{
|
|
||||||
drawTile(graphics, p, config.guardColor(), 0, 0, 50);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (plugin.isRunTekton())
|
|
||||||
{
|
|
||||||
if (config.Tekton())
|
|
||||||
{
|
|
||||||
NPC boss = plugin.getTekton_NPC();
|
|
||||||
if (boss != null)
|
|
||||||
{
|
|
||||||
int size = 1;
|
|
||||||
NPCDefinition composition = boss.getTransformedDefinition();
|
|
||||||
{
|
|
||||||
size = composition.getSize();
|
|
||||||
}
|
|
||||||
List<WorldPoint> meleeRange = getHitSquares(boss.getWorldLocation(), size, 1, false);
|
|
||||||
for (WorldPoint p : meleeRange)
|
|
||||||
{
|
{
|
||||||
drawTile(graphics, p, config.tektonColor(), 0, 0, 50);
|
drawTile(graphics, p, config.tektonColor(), 0, 0, 50);
|
||||||
}
|
}
|
||||||
|
if (config.tektonTickCounter())
|
||||||
|
{
|
||||||
|
ticksLeft = npcs.getTicksUntilAttack();
|
||||||
|
int attackTicksleft = plugin.getTektonAttackTicks();
|
||||||
|
if (ticksLeft > 0)
|
||||||
|
{
|
||||||
|
if (ticksLeft == 1)
|
||||||
|
{
|
||||||
|
color = npcs.getAttackStyle().getColor();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
color = Color.WHITE;
|
||||||
|
}
|
||||||
|
final String ticksLeftStr = String.valueOf(ticksLeft);
|
||||||
|
Point canvasPoint = npcs.getNpc().getCanvasTextLocation(graphics, ticksLeftStr, 0);
|
||||||
|
renderTextLocation(graphics, ticksLeftStr, config.textSize(), config.fontStyle().getFont(), color, canvasPoint);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (config.tektonTickCounter())
|
||||||
|
{
|
||||||
|
final int attackTicksleft = plugin.getTektonAttackTicks();
|
||||||
|
String attacksLeftStr;
|
||||||
|
Color attackcolor;
|
||||||
|
if (attackTicksleft >= 0 && plugin.isTektonActive())
|
||||||
|
{
|
||||||
|
if (attackTicksleft <= 1)
|
||||||
|
{
|
||||||
|
attackcolor = new Color(255, 0, 0, 255);
|
||||||
|
attacksLeftStr = "Phase Over";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
attackcolor = new Color(255, 255, 255, 255);
|
||||||
|
attacksLeftStr = String.valueOf(attackTicksleft);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (npcs.getNpc() != null)
|
||||||
|
{
|
||||||
|
Point canvasPoint = npcs.getNpc().getCanvasTextLocation(graphics, attacksLeftStr, 0);
|
||||||
|
renderTextLocationAbove(graphics, attacksLeftStr, config.textSize(), config.fontStyle().getFont(), attackcolor, canvasPoint);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case NpcID.MUTTADILE:
|
||||||
|
case NpcID.MUTTADILE_7562:
|
||||||
|
case NpcID.MUTTADILE_7563:
|
||||||
|
if (config.muttadile())
|
||||||
|
{
|
||||||
|
hitSquares = getHitSquares(npcs.getNpc().getWorldLocation(), npcs.getNpcSize(), 1, false);
|
||||||
|
for (WorldPoint p : hitSquares)
|
||||||
|
{
|
||||||
|
drawTile(graphics, p, config.muttaColor(), 0, 0, 50);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case NpcID.GUARDIAN:
|
||||||
|
case NpcID.GUARDIAN_7570:
|
||||||
|
case NpcID.GUARDIAN_7571:
|
||||||
|
case NpcID.GUARDIAN_7572:
|
||||||
|
if (config.guardians())
|
||||||
|
{
|
||||||
|
hitSquares = getHitSquares(npcs.getNpc().getWorldLocation(), npcs.getNpcSize(), 2, true);
|
||||||
|
for (WorldPoint p : hitSquares)
|
||||||
|
{
|
||||||
|
drawTile(graphics, p, config.guardColor(), 0, 0, 50);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (config.guardinTickCounter())
|
||||||
|
{
|
||||||
|
ticksLeft = npcs.getTicksUntilAttack();
|
||||||
|
if (ticksLeft > 0)
|
||||||
|
{
|
||||||
|
if (ticksLeft == 1)
|
||||||
|
{
|
||||||
|
color = npcs.getAttackStyle().getColor();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
color = Color.WHITE;
|
||||||
|
}
|
||||||
|
final String ticksLeftStr = String.valueOf(ticksLeft);
|
||||||
|
Point canvasPoint = npcs.getNpc().getCanvasTextLocation(graphics, ticksLeftStr, 0);
|
||||||
|
renderTextLocation(graphics, ticksLeftStr, config.textSize(), config.fontStyle().getFont(), color, canvasPoint);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case NpcID.VANGUARD_7526:
|
||||||
|
case NpcID.VANGUARD_7527:
|
||||||
|
case NpcID.VANGUARD_7528:
|
||||||
|
case NpcID.VANGUARD_7529:
|
||||||
|
if (config.vangHighlight())
|
||||||
|
{
|
||||||
|
OverlayUtil.renderPolygon(graphics, npcs.getNpc().getConvexHull(), npcs.getAttackStyle().getColor());
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (plugin.isHandCripple())
|
||||||
|
{
|
||||||
|
int tick = plugin.getTimer();
|
||||||
|
NPC olmHand = plugin.getHand();
|
||||||
|
final String tickStr = String.valueOf(tick);
|
||||||
|
Point canvasPoint = olmHand.getCanvasTextLocation(graphics, tickStr, 50);
|
||||||
|
renderTextLocation(graphics, tickStr, config.textSize(), config.fontStyle().getFont(), Color.GRAY, canvasPoint);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (config.timers())
|
||||||
|
{
|
||||||
|
if (plugin.getBurnTarget().size() > 0)
|
||||||
|
{
|
||||||
|
for (Actor actor : plugin.getBurnTarget())
|
||||||
|
{
|
||||||
|
final int ticksLeft = plugin.getBurnTicks();
|
||||||
|
String ticksLeftStr = String.valueOf(ticksLeft);
|
||||||
|
Color tickcolor = new Color(255, 255, 255, 255);
|
||||||
|
if (ticksLeft >= 0)
|
||||||
|
{
|
||||||
|
if (ticksLeft == 34 ||
|
||||||
|
ticksLeft == 33 ||
|
||||||
|
ticksLeft == 26 ||
|
||||||
|
ticksLeft == 25 ||
|
||||||
|
ticksLeft == 18 ||
|
||||||
|
ticksLeft == 17 ||
|
||||||
|
ticksLeft == 10 ||
|
||||||
|
ticksLeft == 9 ||
|
||||||
|
ticksLeft == 2 ||
|
||||||
|
ticksLeft == 1)
|
||||||
|
{
|
||||||
|
tickcolor = new Color(255, 0, 0, 255);
|
||||||
|
ticksLeftStr = "GAP";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tickcolor = new Color(255, 255, 255, 255);
|
||||||
|
}
|
||||||
|
Point canvasPoint = actor.getCanvasTextLocation(graphics, ticksLeftStr, 0);
|
||||||
|
renderTextLocation(graphics, ticksLeftStr, config.textSize(), config.fontStyle().getFont(), tickcolor, canvasPoint);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (plugin.getAcidTarget() != null)
|
||||||
|
{
|
||||||
|
Actor actor = plugin.getAcidTarget();
|
||||||
|
renderActorOverlay(graphics, actor, config.acidColor(), 2, 100, 10);
|
||||||
|
final int ticksLeft = plugin.getAcidTicks();
|
||||||
|
Color tickcolor = new Color(255, 255, 255, 255);
|
||||||
|
if (ticksLeft > 0)
|
||||||
|
{
|
||||||
|
if (ticksLeft > 1)
|
||||||
|
{
|
||||||
|
tickcolor = new Color(69, 241, 44, 255);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tickcolor = new Color(255, 255, 255, 255);
|
||||||
|
}
|
||||||
|
final String ticksLeftStr = String.valueOf(ticksLeft);
|
||||||
|
Point canvasPoint = actor.getCanvasTextLocation(graphics, ticksLeftStr, 0);
|
||||||
|
renderTextLocation(graphics, ticksLeftStr, config.textSize(), config.fontStyle().getFont(), tickcolor, canvasPoint);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (config.tpOverlay())
|
||||||
|
{
|
||||||
|
if (plugin.getTeleportTarget() != null)
|
||||||
|
{
|
||||||
|
renderActorOverlay(graphics, plugin.getTeleportTarget(), new Color(193, 255, 245, 255), 2, 100, 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,7 +283,7 @@ public class CoxOverlay extends Overlay
|
|||||||
{
|
{
|
||||||
NPC boss = plugin.getOlm_NPC();
|
NPC boss = plugin.getOlm_NPC();
|
||||||
|
|
||||||
if (config.OlmTick())
|
if (config.olmTick())
|
||||||
{
|
{
|
||||||
if (boss != null)
|
if (boss != null)
|
||||||
{
|
{
|
||||||
@@ -232,6 +333,8 @@ public class CoxOverlay extends Overlay
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -282,6 +385,22 @@ public class CoxOverlay extends Overlay
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void renderActorOverlay(Graphics2D graphics, Actor actor, Color color, int outlineWidth, int outlineAlpha, int fillAlpha)
|
||||||
|
{
|
||||||
|
int size = 1;
|
||||||
|
LocalPoint lp = actor.getLocalLocation();
|
||||||
|
Polygon tilePoly = Perspective.getCanvasTileAreaPoly(client, lp, size);
|
||||||
|
|
||||||
|
if (tilePoly != null)
|
||||||
|
{
|
||||||
|
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), outlineAlpha));
|
||||||
|
graphics.setStroke(new BasicStroke(outlineWidth));
|
||||||
|
graphics.draw(tilePoly);
|
||||||
|
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), fillAlpha));
|
||||||
|
graphics.fill(tilePoly);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void renderTextLocation(Graphics2D graphics, String txtString, int fontSize, int fontStyle, Color fontColor, Point canvasPoint)
|
private void renderTextLocation(Graphics2D graphics, String txtString, int fontSize, int fontStyle, Color fontColor, Point canvasPoint)
|
||||||
{
|
{
|
||||||
graphics.setFont(new Font("Arial", fontStyle, fontSize));
|
graphics.setFont(new Font("Arial", fontStyle, fontSize));
|
||||||
@@ -301,6 +420,25 @@ public class CoxOverlay extends Overlay
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void renderTextLocationAbove(Graphics2D graphics, String txtString, int fontSize, int fontStyle, Color fontColor, Point canvasPoint)
|
||||||
|
{
|
||||||
|
graphics.setFont(new Font("Arial", fontStyle, fontSize));
|
||||||
|
if (canvasPoint != null)
|
||||||
|
{
|
||||||
|
final Point canvasCenterPoint = new Point(
|
||||||
|
canvasPoint.getX(),
|
||||||
|
canvasPoint.getY() + 20);
|
||||||
|
final Point canvasCenterPoint_shadow = new Point(
|
||||||
|
canvasPoint.getX() + 1,
|
||||||
|
canvasPoint.getY() + 21);
|
||||||
|
if (config.shadows())
|
||||||
|
{
|
||||||
|
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint_shadow, txtString, Color.BLACK);
|
||||||
|
}
|
||||||
|
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint, txtString, fontColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private List<WorldPoint> getHitSquares(WorldPoint npcLoc, int npcSize, int thickness, boolean includeUnder)
|
private List<WorldPoint> getHitSquares(WorldPoint npcLoc, int npcSize, int thickness, boolean includeUnder)
|
||||||
{
|
{
|
||||||
List<WorldPoint> little = new WorldArea(npcLoc, npcSize, npcSize).toWorldPointList();
|
List<WorldPoint> little = new WorldArea(npcLoc, npcSize, npcSize).toWorldPointList();
|
||||||
@@ -318,16 +456,4 @@ public class CoxOverlay extends Overlay
|
|||||||
}
|
}
|
||||||
return big;
|
return big;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void renderPoly(Graphics2D graphics, Color color, Polygon polygon)
|
|
||||||
{
|
|
||||||
if (polygon != null)
|
|
||||||
{
|
|
||||||
graphics.setColor(color);
|
|
||||||
graphics.setStroke(new BasicStroke(2));
|
|
||||||
graphics.draw(polygon);
|
|
||||||
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), 20));
|
|
||||||
graphics.fill(polygon);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+226
-380
@@ -29,7 +29,9 @@ package net.runelite.client.plugins.coxhelper;
|
|||||||
|
|
||||||
import com.google.inject.Provides;
|
import com.google.inject.Provides;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
@@ -51,13 +53,12 @@ import net.runelite.api.Projectile;
|
|||||||
import net.runelite.api.ProjectileID;
|
import net.runelite.api.ProjectileID;
|
||||||
import net.runelite.api.Varbits;
|
import net.runelite.api.Varbits;
|
||||||
import net.runelite.api.coords.WorldPoint;
|
import net.runelite.api.coords.WorldPoint;
|
||||||
import net.runelite.api.events.AnimationChanged;
|
|
||||||
import net.runelite.api.events.ChatMessage;
|
import net.runelite.api.events.ChatMessage;
|
||||||
import net.runelite.api.events.GameTick;
|
import net.runelite.api.events.GameTick;
|
||||||
import net.runelite.api.events.SpotAnimationChanged;
|
|
||||||
import net.runelite.api.events.NpcDespawned;
|
import net.runelite.api.events.NpcDespawned;
|
||||||
import net.runelite.api.events.NpcSpawned;
|
import net.runelite.api.events.NpcSpawned;
|
||||||
import net.runelite.api.events.ProjectileMoved;
|
import net.runelite.api.events.ProjectileMoved;
|
||||||
|
import net.runelite.api.events.SpotAnimationChanged;
|
||||||
import net.runelite.client.chat.ChatMessageManager;
|
import net.runelite.client.chat.ChatMessageManager;
|
||||||
import net.runelite.client.config.ConfigManager;
|
import net.runelite.client.config.ConfigManager;
|
||||||
import net.runelite.client.eventbus.Subscribe;
|
import net.runelite.client.eventbus.Subscribe;
|
||||||
@@ -65,6 +66,7 @@ import net.runelite.client.plugins.Plugin;
|
|||||||
import net.runelite.client.plugins.PluginDescriptor;
|
import net.runelite.client.plugins.PluginDescriptor;
|
||||||
import net.runelite.client.plugins.PluginType;
|
import net.runelite.client.plugins.PluginType;
|
||||||
import net.runelite.client.ui.overlay.OverlayManager;
|
import net.runelite.client.ui.overlay.OverlayManager;
|
||||||
|
import net.runelite.client.util.Text;
|
||||||
|
|
||||||
@PluginDescriptor(
|
@PluginDescriptor(
|
||||||
name = "CoX Helper",
|
name = "CoX Helper",
|
||||||
@@ -78,175 +80,79 @@ import net.runelite.client.ui.overlay.OverlayManager;
|
|||||||
@Singleton
|
@Singleton
|
||||||
public class CoxPlugin extends Plugin
|
public class CoxPlugin extends Plugin
|
||||||
{
|
{
|
||||||
private static final int GAMEOBJECT_ID_PSN = 30032;
|
|
||||||
private static final int GRAPHICSOBJECT_ID_CRYSTAL = 1447;
|
|
||||||
private static final int GRAPHICSOBJECT_ID_HEAL = 1363;
|
|
||||||
private static final int ANIMATION_ID_G1 = 430;
|
private static final int ANIMATION_ID_G1 = 430;
|
||||||
private static final String OLM_HAND_CRIPPLE = "The Great Olm\'s left claw clenches to protect itself temporarily.";
|
private static final String OLM_HAND_CRIPPLE = "The Great Olm\'s left claw clenches to protect itself temporarily.";
|
||||||
private static final Pattern TP_REGEX = Pattern.compile("You have been paired with <col=ff0000>(.*)</col>! The magical power will enact soon...");
|
private static final Pattern TP_REGEX = Pattern.compile("You have been paired with <col=ff0000>(.*)</col>! The magical power will enact soon...");
|
||||||
private int sleepcount = 0;
|
|
||||||
private boolean needOlm = false;
|
|
||||||
private GraphicsObject teleportObject;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private Client client;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private ChatMessageManager chatMessageManager;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private CoxOverlay overlay;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private TimersOverlay timersOverlay;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private CoxConfig config;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private OverlayManager overlayManager;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private OlmCrippleTimerOverlay olmCrippleTimerOverlay;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private OlmPrayAgainstOverlay prayAgainstOverlay;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private VanguardsHighlight vanguardsHighlight;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private VanguardsOverlay vanguardsOverlay;
|
|
||||||
|
|
||||||
@Setter
|
@Setter
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
protected PrayAgainst prayAgainstOlm;
|
protected PrayAgainst prayAgainstOlm;
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private boolean runMutta;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private boolean runTekton;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private boolean runVanguards;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private boolean runGuard = false;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private boolean enrageStage = false;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private boolean HandCripple;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private boolean runOlm;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private NPC rangeVang;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private NPC mageVang;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private NPC meleeVang;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private NPC Guard1_NPC;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private NPC Guard2_NPC;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private NPC Tekton_NPC;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private NPC hand;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private NPC Olm_NPC;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private NPC OlmMelee_NPC;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private NPC Mutta_NPC;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private NPC Momma_NPC;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private List<WorldPoint> Olm_Crystals = new ArrayList<>();
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private List<WorldPoint> Olm_Heal = new ArrayList<>();
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private List<WorldPoint> Olm_TP = new ArrayList<>();
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private List<WorldPoint> Olm_PSN = new ArrayList<>();
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private List<Actor> burnTarget = new ArrayList<>();
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private Actor teleportTarget;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private Actor acidTarget;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private int mageVangHP = -1;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private int rangeVangHP = -1;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private int meleeVangHP = -1;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private int timer = 45;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private int burnTicks = 41;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private int acidTicks = 25;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private int teleportTicks = 10;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private int tektonTicks;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private int tektonAttacks;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private int tektonAttackTicks;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private int guardTick = -1;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private int OlmPhase = 0;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private int Olm_TicksUntilAction = -1;
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private int Olm_ActionCycle = -1; //4:0 = auto 3:0 = null 2:0 = auto 1:0 = spec + actioncycle =4
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
|
||||||
private int Olm_NextSpec = -1; // 1= crystals 2=lightnig 3=portals 4= heal hand if p4
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
protected long lastPrayTime;
|
protected long lastPrayTime;
|
||||||
|
private int sleepcount = 0;
|
||||||
|
private boolean needOlm = false;
|
||||||
|
private GraphicsObject teleportObject;
|
||||||
|
@Inject
|
||||||
|
private Client client;
|
||||||
|
@Inject
|
||||||
|
private ChatMessageManager chatMessageManager;
|
||||||
|
@Inject
|
||||||
|
private CoxOverlay coxOverlay;
|
||||||
|
@Inject
|
||||||
|
private CoxInfoBox coxInfoBox;
|
||||||
|
@Inject
|
||||||
|
private CoxConfig config;
|
||||||
|
@Inject
|
||||||
|
private OverlayManager overlayManager;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private boolean HandCripple;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private boolean runOlm;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private int vanguards;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private boolean tektonActive;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private NPC hand;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private NPC Olm_NPC;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private NPC OlmMelee_NPC;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private List<WorldPoint> Olm_Crystals = new ArrayList<>();
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private List<WorldPoint> Olm_Heal = new ArrayList<>();
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private List<WorldPoint> Olm_TP = new ArrayList<>();
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private List<WorldPoint> Olm_PSN = new ArrayList<>();
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private List<Actor> burnTarget = new ArrayList<>();
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private Actor teleportTarget;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private Actor acidTarget;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private int timer = 45;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private int burnTicks = 41;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private int acidTicks = 25;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private int teleportTicks = 10;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private int tektonAttackTicks;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private int OlmPhase = 0;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private int Olm_TicksUntilAction = -1;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private int Olm_ActionCycle = -1; //4:0 = auto 3:0 = null 2:0 = auto 1:0 = spec + actioncycle =4
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private int Olm_NextSpec = -1; // 1= crystals 2=lightnig 3=portals 4= heal hand if p4
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private float percent;
|
private float percent;
|
||||||
|
@Getter(AccessLevel.PACKAGE)
|
||||||
|
private Map<NPC, NPCContainer> npcContainer = new HashMap<>();
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
CoxConfig getConfig(ConfigManager configManager)
|
CoxConfig getConfig(ConfigManager configManager)
|
||||||
@@ -257,23 +163,8 @@ public class CoxPlugin extends Plugin
|
|||||||
@Override
|
@Override
|
||||||
protected void startUp()
|
protected void startUp()
|
||||||
{
|
{
|
||||||
overlayManager.add(overlay);
|
overlayManager.add(coxOverlay);
|
||||||
overlayManager.add(olmCrippleTimerOverlay);
|
overlayManager.add(coxInfoBox);
|
||||||
overlayManager.add(prayAgainstOverlay);
|
|
||||||
overlayManager.add(timersOverlay);
|
|
||||||
overlayManager.add(vanguardsHighlight);
|
|
||||||
overlayManager.add(vanguardsOverlay);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void shutDown()
|
|
||||||
{
|
|
||||||
overlayManager.remove(overlay);
|
|
||||||
overlayManager.remove(olmCrippleTimerOverlay);
|
|
||||||
overlayManager.remove(prayAgainstOverlay);
|
|
||||||
overlayManager.remove(timersOverlay);
|
|
||||||
overlayManager.remove(vanguardsHighlight);
|
|
||||||
overlayManager.remove(vanguardsOverlay);
|
|
||||||
HandCripple = false;
|
HandCripple = false;
|
||||||
hand = null;
|
hand = null;
|
||||||
acidTarget = null;
|
acidTarget = null;
|
||||||
@@ -285,11 +176,14 @@ public class CoxPlugin extends Plugin
|
|||||||
burnTicks = 40;
|
burnTicks = 40;
|
||||||
acidTicks = 25;
|
acidTicks = 25;
|
||||||
teleportTicks = 10;
|
teleportTicks = 10;
|
||||||
|
vanguards = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean inRaid()
|
@Override
|
||||||
|
protected void shutDown()
|
||||||
{
|
{
|
||||||
return client.getVar(Varbits.IN_RAID) == 1;
|
overlayManager.remove(coxOverlay);
|
||||||
|
overlayManager.remove(coxInfoBox);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
@@ -312,9 +206,12 @@ public class CoxPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String msg = chatMessage.getMessageNode().getValue().toLowerCase();
|
switch (Text.standardize(chatMessage.getMessageNode().getValue()))
|
||||||
if (msg.contains("the great olm rises with the power of"))
|
|
||||||
{
|
{
|
||||||
|
case "the great olm rises with the power of acid.":
|
||||||
|
case "the great olm rises with the power of crystal.":
|
||||||
|
case "the great olm rises with the power of flame.":
|
||||||
|
case "the great olm is giving its all. this is its final stand.":
|
||||||
if (!runOlm)
|
if (!runOlm)
|
||||||
{
|
{
|
||||||
Olm_ActionCycle = -1;
|
Olm_ActionCycle = -1;
|
||||||
@@ -329,44 +226,24 @@ public class CoxPlugin extends Plugin
|
|||||||
runOlm = true;
|
runOlm = true;
|
||||||
needOlm = true;
|
needOlm = true;
|
||||||
Olm_NextSpec = -1;
|
Olm_NextSpec = -1;
|
||||||
}
|
break;
|
||||||
|
case "the great olm's left claw clenches to protect itself temporarily.":
|
||||||
if (msg.contains("the great olm is giving its all. this is its final stand"))
|
|
||||||
{
|
|
||||||
if (!runOlm)
|
|
||||||
{
|
|
||||||
Olm_ActionCycle = -1;
|
|
||||||
Olm_TicksUntilAction = 4;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Olm_ActionCycle = -1;
|
|
||||||
Olm_TicksUntilAction = 3;
|
|
||||||
}
|
|
||||||
OlmPhase = 1;
|
|
||||||
runOlm = true;
|
|
||||||
needOlm = true;
|
|
||||||
Olm_NextSpec = -1;
|
|
||||||
}
|
|
||||||
if (msg.startsWith(OLM_HAND_CRIPPLE))
|
|
||||||
{
|
|
||||||
HandCripple = true;
|
HandCripple = true;
|
||||||
timer = 45;
|
timer = 45;
|
||||||
}
|
break;
|
||||||
if (msg.contains("aggression"))
|
case "the great olm fires a sphere of aggression your way. your prayers have been sapped.":
|
||||||
{
|
|
||||||
prayAgainstOlm = PrayAgainst.MELEE;
|
prayAgainstOlm = PrayAgainst.MELEE;
|
||||||
lastPrayTime = System.currentTimeMillis();
|
lastPrayTime = System.currentTimeMillis();
|
||||||
}
|
break;
|
||||||
if (msg.contains("of magical power"))
|
case "the great olm fires a sphere of magical power your way. your prayers have been sapped.":
|
||||||
{
|
|
||||||
prayAgainstOlm = PrayAgainst.MAGIC;
|
prayAgainstOlm = PrayAgainst.MAGIC;
|
||||||
lastPrayTime = System.currentTimeMillis();
|
lastPrayTime = System.currentTimeMillis();
|
||||||
}
|
break;
|
||||||
if (msg.contains("accuracy and dexterity"))
|
case "the great olm fires a sphere of accuracy and dexterity your way. your prayers have been sapped.":
|
||||||
{
|
|
||||||
prayAgainstOlm = PrayAgainst.RANGED;
|
prayAgainstOlm = PrayAgainst.RANGED;
|
||||||
lastPrayTime = System.currentTimeMillis();
|
lastPrayTime = System.currentTimeMillis();
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -390,7 +267,7 @@ public class CoxPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
if (projectile.getId() == ProjectileID.OLM_ACID_TRAIL)
|
if (projectile.getId() == ProjectileID.OLM_ACID_TRAIL)
|
||||||
{
|
{
|
||||||
/*acidTarget = projectile.getInteracting();*/
|
acidTarget = projectile.getInteracting();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -402,40 +279,13 @@ public class CoxPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
Actor actor = graphicChanged.getActor();
|
Actor actor = graphicChanged.getActor();
|
||||||
if (actor.getSpotAnimation() == GraphicID.OLM_BURN)
|
if (actor.getSpotAnimation() == GraphicID.OLM_BURN)
|
||||||
|
{
|
||||||
|
if (!burnTarget.contains(actor))
|
||||||
{
|
{
|
||||||
burnTarget.add(actor);
|
burnTarget.add(actor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
|
||||||
public void onAnimationChanged(AnimationChanged event)
|
|
||||||
{
|
|
||||||
if (event.getActor() == Tekton_NPC)
|
|
||||||
{
|
|
||||||
switch (Tekton_NPC.getAnimation())
|
|
||||||
{
|
|
||||||
case AnimationID.TEKTON_AUTO1:
|
|
||||||
case AnimationID.TEKTON_AUTO2:
|
|
||||||
case AnimationID.TEKTON_AUTO3:
|
|
||||||
case AnimationID.TEKTON_ENRAGE_AUTO1:
|
|
||||||
case AnimationID.TEKTON_ENRAGE_AUTO2:
|
|
||||||
case AnimationID.TEKTON_ENRAGE_AUTO3:
|
|
||||||
tektonTicks = 4;
|
|
||||||
tektonAttacks++;
|
|
||||||
break;
|
|
||||||
case AnimationID.TEKTON_FAST_AUTO1:
|
|
||||||
case AnimationID.TEKTON_FAST_AUTO2:
|
|
||||||
tektonTicks = 3;
|
|
||||||
tektonAttacks++;
|
|
||||||
break;
|
|
||||||
case AnimationID.TEKTON_ANVIL:
|
|
||||||
tektonTicks = 15;
|
|
||||||
tektonAttacks = 0;
|
|
||||||
tektonAttackTicks = 47;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
@@ -452,36 +302,23 @@ public class CoxPlugin extends Plugin
|
|||||||
case NpcID.TEKTON_7545:
|
case NpcID.TEKTON_7545:
|
||||||
case NpcID.TEKTON_ENRAGED:
|
case NpcID.TEKTON_ENRAGED:
|
||||||
case NpcID.TEKTON_ENRAGED_7544:
|
case NpcID.TEKTON_ENRAGED_7544:
|
||||||
runTekton = true;
|
npcContainer.put(npc, new NPCContainer(npc));
|
||||||
Tekton_NPC = npc;
|
|
||||||
tektonAttackTicks = 27;
|
tektonAttackTicks = 27;
|
||||||
break;
|
break;
|
||||||
case NpcID.MUTTADILE:
|
case NpcID.MUTTADILE:
|
||||||
Momma_NPC = npc;
|
|
||||||
break;
|
|
||||||
case NpcID.MUTTADILE_7562:
|
case NpcID.MUTTADILE_7562:
|
||||||
runMutta = true;
|
|
||||||
Mutta_NPC = npc;
|
|
||||||
break;
|
|
||||||
case NpcID.MUTTADILE_7563:
|
case NpcID.MUTTADILE_7563:
|
||||||
runMutta = true;
|
|
||||||
Momma_NPC = npc;
|
|
||||||
break;
|
|
||||||
case NpcID.GUARDIAN:
|
case NpcID.GUARDIAN:
|
||||||
Guard1_NPC = npc;
|
|
||||||
guardTick = -1;
|
|
||||||
runGuard = true;
|
|
||||||
break;
|
|
||||||
case NpcID.GUARDIAN_7570:
|
case NpcID.GUARDIAN_7570:
|
||||||
Guard2_NPC = npc;
|
npcContainer.put(npc, new NPCContainer(npc));
|
||||||
guardTick = -1;
|
|
||||||
runGuard = true;
|
|
||||||
break;
|
break;
|
||||||
|
case NpcID.VANGUARD:
|
||||||
case NpcID.VANGUARD_7526:
|
case NpcID.VANGUARD_7526:
|
||||||
case NpcID.VANGUARD_7527:
|
case NpcID.VANGUARD_7527:
|
||||||
case NpcID.VANGUARD_7528:
|
case NpcID.VANGUARD_7528:
|
||||||
case NpcID.VANGUARD_7529:
|
case NpcID.VANGUARD_7529:
|
||||||
runVanguards = true;
|
vanguards++;
|
||||||
|
npcContainer.put(npc, new NPCContainer(npc));
|
||||||
break;
|
break;
|
||||||
case NpcID.GREAT_OLM_LEFT_CLAW:
|
case NpcID.GREAT_OLM_LEFT_CLAW:
|
||||||
case NpcID.GREAT_OLM_LEFT_CLAW_7555:
|
case NpcID.GREAT_OLM_LEFT_CLAW_7555:
|
||||||
@@ -492,11 +329,11 @@ public class CoxPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onNpcDespawned(NpcDespawned npcDespawned)
|
public void onNpcDespawned(NpcDespawned event)
|
||||||
{
|
{
|
||||||
if (inRaid())
|
if (inRaid())
|
||||||
{
|
{
|
||||||
NPC npc = npcDespawned.getNpc();
|
NPC npc = event.getNpc();
|
||||||
switch (npc.getId())
|
switch (npc.getId())
|
||||||
{
|
{
|
||||||
case NpcID.TEKTON:
|
case NpcID.TEKTON:
|
||||||
@@ -505,35 +342,28 @@ public class CoxPlugin extends Plugin
|
|||||||
case NpcID.TEKTON_7545:
|
case NpcID.TEKTON_7545:
|
||||||
case NpcID.TEKTON_ENRAGED:
|
case NpcID.TEKTON_ENRAGED:
|
||||||
case NpcID.TEKTON_ENRAGED_7544:
|
case NpcID.TEKTON_ENRAGED_7544:
|
||||||
enrageStage = false;
|
|
||||||
runTekton = false;
|
|
||||||
Tekton_NPC = null;
|
|
||||||
break;
|
|
||||||
case NpcID.MUTTADILE:
|
case NpcID.MUTTADILE:
|
||||||
Momma_NPC = null;
|
|
||||||
break;
|
|
||||||
case NpcID.MUTTADILE_7562:
|
case NpcID.MUTTADILE_7562:
|
||||||
Mutta_NPC = null;
|
|
||||||
break;
|
|
||||||
case NpcID.MUTTADILE_7563:
|
case NpcID.MUTTADILE_7563:
|
||||||
runMutta = false;
|
|
||||||
Momma_NPC = null;
|
|
||||||
break;
|
|
||||||
case NpcID.GUARDIAN:
|
case NpcID.GUARDIAN:
|
||||||
Guard1_NPC = null;
|
|
||||||
runGuard = false;
|
|
||||||
Guard2_NPC = null;
|
|
||||||
break;
|
|
||||||
case NpcID.GUARDIAN_7570:
|
case NpcID.GUARDIAN_7570:
|
||||||
Guard2_NPC = null;
|
|
||||||
Guard1_NPC = null;
|
|
||||||
runGuard = false;
|
|
||||||
break;
|
|
||||||
case NpcID.GUARDIAN_7571:
|
case NpcID.GUARDIAN_7571:
|
||||||
case NpcID.GUARDIAN_7572:
|
case NpcID.GUARDIAN_7572:
|
||||||
Guard1_NPC = null;
|
if (npcContainer.remove(event.getNpc()) != null && !npcContainer.isEmpty())
|
||||||
Guard2_NPC = null;
|
{
|
||||||
runGuard = false;
|
npcContainer.remove(event.getNpc());
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case NpcID.VANGUARD:
|
||||||
|
case NpcID.VANGUARD_7526:
|
||||||
|
case NpcID.VANGUARD_7527:
|
||||||
|
case NpcID.VANGUARD_7528:
|
||||||
|
case NpcID.VANGUARD_7529:
|
||||||
|
if (npcContainer.remove(event.getNpc()) != null && !npcContainer.isEmpty())
|
||||||
|
{
|
||||||
|
npcContainer.remove(event.getNpc());
|
||||||
|
}
|
||||||
|
vanguards--;
|
||||||
break;
|
break;
|
||||||
case NpcID.GREAT_OLM_RIGHT_CLAW_7553:
|
case NpcID.GREAT_OLM_RIGHT_CLAW_7553:
|
||||||
case NpcID.GREAT_OLM_RIGHT_CLAW:
|
case NpcID.GREAT_OLM_RIGHT_CLAW:
|
||||||
@@ -548,21 +378,21 @@ public class CoxPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
if (!inRaid())
|
if (!inRaid())
|
||||||
{
|
{
|
||||||
runOlm = false;
|
|
||||||
runGuard = false;
|
|
||||||
runMutta = false;
|
|
||||||
runTekton = false;
|
|
||||||
runVanguards = false;
|
|
||||||
enrageStage = false;
|
|
||||||
needOlm = false;
|
needOlm = false;
|
||||||
OlmPhase = 0;
|
OlmPhase = 0;
|
||||||
sleepcount = 0;
|
sleepcount = 0;
|
||||||
Olm_Heal.clear();
|
Olm_Heal.clear();
|
||||||
|
npcContainer.clear();
|
||||||
burnTarget.clear();
|
burnTarget.clear();
|
||||||
|
Olm_NPC = null;
|
||||||
|
hand = null;
|
||||||
prayAgainstOlm = null;
|
prayAgainstOlm = null;
|
||||||
|
runOlm = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
npcHandler();
|
||||||
|
|
||||||
if (needOlm = true)
|
if (needOlm = true)
|
||||||
{
|
{
|
||||||
for (NPC monster : client.getNpcs())
|
for (NPC monster : client.getNpcs())
|
||||||
@@ -576,93 +406,6 @@ public class CoxPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (runTekton)
|
|
||||||
{
|
|
||||||
runVanguards = false;
|
|
||||||
if (Tekton_NPC.getId() == NpcID.TEKTON_ENRAGED || Tekton_NPC.getId() == NpcID.TEKTON_ENRAGED_7544)
|
|
||||||
{
|
|
||||||
enrageStage = true;
|
|
||||||
}
|
|
||||||
if (tektonTicks > 0)
|
|
||||||
{
|
|
||||||
tektonTicks--;
|
|
||||||
}
|
|
||||||
if (tektonAttacks > 0 && tektonAttackTicks > 0)
|
|
||||||
{
|
|
||||||
tektonAttackTicks--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (runGuard)
|
|
||||||
{
|
|
||||||
runVanguards = false;
|
|
||||||
if (guardTick == -1)
|
|
||||||
{
|
|
||||||
if (Guard1_NPC != null)
|
|
||||||
{
|
|
||||||
if (Guard1_NPC.getAnimation() == ANIMATION_ID_G1)
|
|
||||||
{
|
|
||||||
guardTick = 5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (Guard2_NPC != null)
|
|
||||||
{
|
|
||||||
if (Guard2_NPC.getAnimation() == ANIMATION_ID_G1)
|
|
||||||
{
|
|
||||||
guardTick = 5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
guardTick--;
|
|
||||||
}
|
|
||||||
if (guardTick == 0)
|
|
||||||
{
|
|
||||||
guardTick = 5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (runVanguards)
|
|
||||||
{
|
|
||||||
for (NPC npc : client.getNpcs())
|
|
||||||
{
|
|
||||||
switch (npc.getId())
|
|
||||||
{
|
|
||||||
case NpcID.VANGUARD_7529:
|
|
||||||
percent = (float) npc.getHealthRatio() / npc.getHealth() * 100;
|
|
||||||
mageVangHP = (int) percent;
|
|
||||||
mageVang = npc;
|
|
||||||
break;
|
|
||||||
case NpcID.VANGUARD_7528:
|
|
||||||
percent = (float) npc.getHealthRatio() / npc.getHealth() * 100;
|
|
||||||
rangeVangHP = (int) percent;
|
|
||||||
rangeVang = npc;
|
|
||||||
break;
|
|
||||||
case NpcID.VANGUARD_7527:
|
|
||||||
percent = (float) npc.getHealthRatio() / npc.getHealth() * 100;
|
|
||||||
meleeVangHP = (int) percent;
|
|
||||||
meleeVang = npc;
|
|
||||||
break;
|
|
||||||
case NpcID.VANGUARD_7526:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (mageVangHP == 0 && meleeVangHP == 0 && rangeVangHP == 0)
|
|
||||||
{
|
|
||||||
runVanguards = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (runOlm)
|
|
||||||
{
|
|
||||||
runVanguards = false;
|
|
||||||
Olm_Crystals.clear();
|
|
||||||
Olm_Heal.clear();
|
|
||||||
Olm_TP.clear();
|
|
||||||
client.clearHintArrow();
|
|
||||||
sleepcount--;
|
|
||||||
|
|
||||||
if (teleportTarget != null)
|
if (teleportTarget != null)
|
||||||
{
|
{
|
||||||
log.info(teleportTarget.getName());
|
log.info(teleportTarget.getName());
|
||||||
@@ -676,6 +419,7 @@ public class CoxPlugin extends Plugin
|
|||||||
teleportTicks = 10;
|
teleportTicks = 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (acidTarget != null)
|
if (acidTarget != null)
|
||||||
{
|
{
|
||||||
acidTicks--;
|
acidTicks--;
|
||||||
@@ -685,6 +429,7 @@ public class CoxPlugin extends Plugin
|
|||||||
acidTicks = 25;
|
acidTicks = 25;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (burnTarget.size() > 0)
|
if (burnTarget.size() > 0)
|
||||||
{
|
{
|
||||||
burnTicks--;
|
burnTicks--;
|
||||||
@@ -694,6 +439,7 @@ public class CoxPlugin extends Plugin
|
|||||||
burnTicks = 41;
|
burnTicks = 41;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HandCripple)
|
if (HandCripple)
|
||||||
{
|
{
|
||||||
timer--;
|
timer--;
|
||||||
@@ -704,6 +450,102 @@ public class CoxPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (runOlm)
|
||||||
|
{
|
||||||
|
olmHandler();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void npcHandler()
|
||||||
|
{
|
||||||
|
for (NPCContainer npcs : getNpcContainer().values())
|
||||||
|
{
|
||||||
|
switch (npcs.getNpc().getId())
|
||||||
|
{
|
||||||
|
case NpcID.TEKTON:
|
||||||
|
case NpcID.TEKTON_7541:
|
||||||
|
case NpcID.TEKTON_7542:
|
||||||
|
case NpcID.TEKTON_7545:
|
||||||
|
case NpcID.TEKTON_ENRAGED:
|
||||||
|
case NpcID.TEKTON_ENRAGED_7544:
|
||||||
|
npcs.setTicksUntilAttack(npcs.getTicksUntilAttack() - 1);
|
||||||
|
npcs.setAttackStyle(NPCContainer.Attackstyle.MELEE);
|
||||||
|
switch (npcs.getNpc().getAnimation())
|
||||||
|
{
|
||||||
|
case AnimationID.TEKTON_AUTO1:
|
||||||
|
case AnimationID.TEKTON_AUTO2:
|
||||||
|
case AnimationID.TEKTON_AUTO3:
|
||||||
|
case AnimationID.TEKTON_ENRAGE_AUTO1:
|
||||||
|
case AnimationID.TEKTON_ENRAGE_AUTO2:
|
||||||
|
case AnimationID.TEKTON_ENRAGE_AUTO3:
|
||||||
|
tektonActive = true;
|
||||||
|
if (npcs.getTicksUntilAttack() < 1)
|
||||||
|
{
|
||||||
|
npcs.setTicksUntilAttack(4);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case AnimationID.TEKTON_FAST_AUTO1:
|
||||||
|
case AnimationID.TEKTON_FAST_AUTO2:
|
||||||
|
tektonActive = true;
|
||||||
|
if (npcs.getTicksUntilAttack() < 1)
|
||||||
|
{
|
||||||
|
npcs.setTicksUntilAttack(3);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case AnimationID.TEKTON_ANVIL:
|
||||||
|
tektonActive = false;
|
||||||
|
tektonAttackTicks = 47;
|
||||||
|
if (npcs.getTicksUntilAttack() < 1)
|
||||||
|
{
|
||||||
|
npcs.setTicksUntilAttack(15);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case NpcID.GUARDIAN:
|
||||||
|
case NpcID.GUARDIAN_7570:
|
||||||
|
case NpcID.GUARDIAN_7571:
|
||||||
|
case NpcID.GUARDIAN_7572:
|
||||||
|
npcs.setTicksUntilAttack(npcs.getTicksUntilAttack() - 1);
|
||||||
|
npcs.setAttackStyle(NPCContainer.Attackstyle.MELEE);
|
||||||
|
if (npcs.getNpc().getAnimation() == ANIMATION_ID_G1 &&
|
||||||
|
npcs.getTicksUntilAttack() < 1)
|
||||||
|
{
|
||||||
|
npcs.setTicksUntilAttack(5);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case NpcID.VANGUARD_7529:
|
||||||
|
if (npcs.getAttackStyle() == NPCContainer.Attackstyle.UNKNOWN)
|
||||||
|
{
|
||||||
|
npcs.setAttackStyle(NPCContainer.Attackstyle.MAGE);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case NpcID.VANGUARD_7528:
|
||||||
|
if (npcs.getAttackStyle() == NPCContainer.Attackstyle.UNKNOWN)
|
||||||
|
{
|
||||||
|
npcs.setAttackStyle(NPCContainer.Attackstyle.RANGE);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case NpcID.VANGUARD_7527:
|
||||||
|
if (npcs.getAttackStyle() == NPCContainer.Attackstyle.UNKNOWN)
|
||||||
|
{
|
||||||
|
npcs.setAttackStyle(NPCContainer.Attackstyle.MELEE);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (tektonActive && tektonAttackTicks > 0)
|
||||||
|
{
|
||||||
|
tektonAttackTicks--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void olmHandler()
|
||||||
|
{
|
||||||
|
Olm_Crystals.clear();
|
||||||
|
Olm_Heal.clear();
|
||||||
|
Olm_TP.clear();
|
||||||
|
client.clearHintArrow();
|
||||||
|
sleepcount--;
|
||||||
if (Olm_TicksUntilAction == 1)
|
if (Olm_TicksUntilAction == 1)
|
||||||
{
|
{
|
||||||
if (Olm_ActionCycle == 1)
|
if (Olm_ActionCycle == 1)
|
||||||
@@ -742,7 +584,7 @@ public class CoxPlugin extends Plugin
|
|||||||
|
|
||||||
for (GraphicsObject o : client.getGraphicsObjects())
|
for (GraphicsObject o : client.getGraphicsObjects())
|
||||||
{
|
{
|
||||||
if (o.getId() == GRAPHICSOBJECT_ID_CRYSTAL)
|
if (o.getId() == GraphicID.OLM_CRYSTAL)
|
||||||
{
|
{
|
||||||
WorldPoint newloc;
|
WorldPoint newloc;
|
||||||
for (int x = -1; x <= 1; x++)
|
for (int x = -1; x <= 1; x++)
|
||||||
@@ -773,11 +615,11 @@ public class CoxPlugin extends Plugin
|
|||||||
sleepcount = 50;
|
sleepcount = 50;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (o.getId() == 1359)
|
if (o.getId() == GraphicID.OLM_TELEPORT)
|
||||||
{
|
{
|
||||||
Olm_TP.add(WorldPoint.fromLocal(client, o.getLocation()));
|
Olm_TP.add(WorldPoint.fromLocal(client, o.getLocation()));
|
||||||
}
|
}
|
||||||
if (o.getId() == GRAPHICSOBJECT_ID_HEAL)
|
if (o.getId() == GraphicID.OLM_HEAL)
|
||||||
{
|
{
|
||||||
Olm_Heal.add(WorldPoint.fromLocal(client, o.getLocation()));
|
Olm_Heal.add(WorldPoint.fromLocal(client, o.getLocation()));
|
||||||
}
|
}
|
||||||
@@ -792,5 +634,9 @@ public class CoxPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean inRaid()
|
||||||
|
{
|
||||||
|
return client.getVar(Varbits.IN_RAID) == 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+120
@@ -0,0 +1,120 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2018, Woox <https://github.com/wooxsolo>
|
||||||
|
* Copyright (c) 2019, Ganom <https://github.com/Ganom>
|
||||||
|
* 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.plugins.coxhelper;
|
||||||
|
|
||||||
|
import java.awt.Color;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import net.runelite.api.Actor;
|
||||||
|
import net.runelite.api.NPC;
|
||||||
|
import net.runelite.api.NPCDefinition;
|
||||||
|
|
||||||
|
class NPCContainer
|
||||||
|
{
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
private NPC npc;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
private int npcIndex;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
private String npcName;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
private int npcSize;
|
||||||
|
|
||||||
|
@Setter
|
||||||
|
@Getter
|
||||||
|
private int ticksUntilAttack;
|
||||||
|
|
||||||
|
@Setter
|
||||||
|
@Getter
|
||||||
|
private int intermissionPeriod;
|
||||||
|
|
||||||
|
@Setter
|
||||||
|
@Getter
|
||||||
|
private int npcSpeed;
|
||||||
|
|
||||||
|
@Setter
|
||||||
|
@Getter
|
||||||
|
private Actor npcInteracting;
|
||||||
|
|
||||||
|
@Setter
|
||||||
|
@Getter
|
||||||
|
private Specials specials;
|
||||||
|
|
||||||
|
@Setter
|
||||||
|
@Getter
|
||||||
|
private Attackstyle attackStyle;
|
||||||
|
|
||||||
|
|
||||||
|
NPCContainer(NPC npc)
|
||||||
|
{
|
||||||
|
this.npc = npc;
|
||||||
|
this.npcName = npc.getName();
|
||||||
|
this.npcIndex = npc.getIndex();
|
||||||
|
this.npcInteracting = npc.getInteracting();
|
||||||
|
this.npcSpeed = 0;
|
||||||
|
this.ticksUntilAttack = 0;
|
||||||
|
this.intermissionPeriod = 0;
|
||||||
|
this.attackStyle = Attackstyle.UNKNOWN;
|
||||||
|
this.specials = Specials.UNKNOWN;
|
||||||
|
final NPCDefinition composition = npc.getTransformedDefinition();
|
||||||
|
|
||||||
|
if (composition != null)
|
||||||
|
{
|
||||||
|
this.npcSize = composition.getSize();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Getter
|
||||||
|
public enum Specials
|
||||||
|
{
|
||||||
|
PORTALS("Portals"),
|
||||||
|
LIGHTNING("Lightning"),
|
||||||
|
CRYSTALS("Crystals"),
|
||||||
|
HEAL("Heal"),
|
||||||
|
UNKNOWN("Unknown");
|
||||||
|
|
||||||
|
private String name = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Getter
|
||||||
|
public enum Attackstyle
|
||||||
|
{
|
||||||
|
MAGE("Mage", Color.CYAN),
|
||||||
|
RANGE("Range", Color.GREEN),
|
||||||
|
MELEE("Melee", Color.RED),
|
||||||
|
UNKNOWN("Unknown", Color.WHITE);
|
||||||
|
|
||||||
|
private String name = "";
|
||||||
|
private Color color;
|
||||||
|
}
|
||||||
|
}
|
||||||
-95
@@ -1,95 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2018, https://runelitepl.us
|
|
||||||
* Copyright (c) 2019, ganom <https://github.com/Ganom>
|
|
||||||
* 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.plugins.coxhelper;
|
|
||||||
|
|
||||||
|
|
||||||
import java.awt.Color;
|
|
||||||
import java.awt.Dimension;
|
|
||||||
import java.awt.Font;
|
|
||||||
import java.awt.Graphics2D;
|
|
||||||
import javax.inject.Inject;
|
|
||||||
import net.runelite.api.Client;
|
|
||||||
import net.runelite.api.NPC;
|
|
||||||
import net.runelite.api.Point;
|
|
||||||
import net.runelite.client.ui.overlay.Overlay;
|
|
||||||
import net.runelite.client.ui.overlay.OverlayLayer;
|
|
||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
|
||||||
import net.runelite.client.ui.overlay.OverlayPriority;
|
|
||||||
import net.runelite.client.ui.overlay.OverlayUtil;
|
|
||||||
|
|
||||||
|
|
||||||
public class OlmCrippleTimerOverlay extends Overlay
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
private final Client client;
|
|
||||||
private final CoxPlugin plugin;
|
|
||||||
private final CoxConfig config;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private OlmCrippleTimerOverlay(Client client, CoxPlugin plugin, CoxConfig config)
|
|
||||||
{
|
|
||||||
this.client = client;
|
|
||||||
this.plugin = plugin;
|
|
||||||
this.config = config;
|
|
||||||
setPosition(OverlayPosition.DYNAMIC);
|
|
||||||
setPriority(OverlayPriority.HIGH);
|
|
||||||
setLayer(OverlayLayer.ABOVE_SCENE);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Dimension render(Graphics2D graphics)
|
|
||||||
{
|
|
||||||
if (plugin.isHandCripple())
|
|
||||||
{
|
|
||||||
int tick = plugin.getTimer();
|
|
||||||
NPC olmHand = plugin.getHand();
|
|
||||||
final String tickStr = String.valueOf(tick);
|
|
||||||
Point canvasPoint = olmHand.getCanvasTextLocation(graphics, tickStr, 50);
|
|
||||||
renderTextLocation(graphics, tickStr, config.textSize(), config.fontStyle().getFont(), Color.GRAY, canvasPoint);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void renderTextLocation(Graphics2D graphics, String txtString, int fontSize, int fontStyle, Color fontColor, Point canvasPoint)
|
|
||||||
{
|
|
||||||
graphics.setFont(new Font("Arial", fontStyle, fontSize));
|
|
||||||
if (canvasPoint != null)
|
|
||||||
{
|
|
||||||
final Point canvasCenterPoint = new Point(
|
|
||||||
canvasPoint.getX(),
|
|
||||||
canvasPoint.getY());
|
|
||||||
final Point canvasCenterPoint_shadow = new Point(
|
|
||||||
canvasPoint.getX() + 1,
|
|
||||||
canvasPoint.getY() + 1);
|
|
||||||
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint_shadow, txtString, Color.BLACK);
|
|
||||||
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint, txtString, fontColor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
-231
@@ -1,231 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2019, ganom <https://github.com/Ganom>
|
|
||||||
* 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.plugins.coxhelper;
|
|
||||||
|
|
||||||
import java.awt.BasicStroke;
|
|
||||||
import java.awt.Color;
|
|
||||||
import java.awt.Dimension;
|
|
||||||
import java.awt.Font;
|
|
||||||
import java.awt.Graphics2D;
|
|
||||||
import java.awt.Polygon;
|
|
||||||
import javax.inject.Inject;
|
|
||||||
import net.runelite.api.Actor;
|
|
||||||
import net.runelite.api.Client;
|
|
||||||
import net.runelite.api.Perspective;
|
|
||||||
import net.runelite.api.Point;
|
|
||||||
import net.runelite.api.coords.LocalPoint;
|
|
||||||
import net.runelite.client.ui.overlay.Overlay;
|
|
||||||
import net.runelite.client.ui.overlay.OverlayLayer;
|
|
||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
|
||||||
import net.runelite.client.ui.overlay.OverlayPriority;
|
|
||||||
import net.runelite.client.ui.overlay.OverlayUtil;
|
|
||||||
|
|
||||||
public class TimersOverlay extends Overlay
|
|
||||||
{
|
|
||||||
|
|
||||||
private CoxPlugin plugin;
|
|
||||||
private CoxConfig config;
|
|
||||||
private Client client;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
TimersOverlay(CoxPlugin plugin, CoxConfig config, Client client)
|
|
||||||
{
|
|
||||||
this.plugin = plugin;
|
|
||||||
this.config = config;
|
|
||||||
this.client = client;
|
|
||||||
setPosition(OverlayPosition.DYNAMIC);
|
|
||||||
setPriority(OverlayPriority.HIGHEST);
|
|
||||||
setLayer(OverlayLayer.ALWAYS_ON_TOP);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Dimension render(Graphics2D graphics)
|
|
||||||
{
|
|
||||||
if (config.tektonTickCounter())
|
|
||||||
{
|
|
||||||
Actor actor = plugin.getTekton_NPC();
|
|
||||||
final int ticksLeft = plugin.getTektonTicks();
|
|
||||||
final int attackTicksleft = plugin.getTektonAttackTicks();
|
|
||||||
String attacksLeftStr;
|
|
||||||
Color tickcolor;
|
|
||||||
Color attackcolor;
|
|
||||||
if (ticksLeft > 0)
|
|
||||||
{
|
|
||||||
if (ticksLeft == 1)
|
|
||||||
{
|
|
||||||
tickcolor = new Color(255, 0, 0, 255);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
tickcolor = new Color(255, 255, 255, 255);
|
|
||||||
}
|
|
||||||
final String ticksLeftStr = String.valueOf(ticksLeft);
|
|
||||||
Point canvasPoint = actor.getCanvasTextLocation(graphics, ticksLeftStr, 0);
|
|
||||||
renderTextLocation(graphics, ticksLeftStr, config.textSize(), config.fontStyle().getFont(), tickcolor, canvasPoint);
|
|
||||||
}
|
|
||||||
if (attackTicksleft >= 0 && plugin.getTektonAttacks() > 0)
|
|
||||||
{
|
|
||||||
if (attackTicksleft <= 1)
|
|
||||||
{
|
|
||||||
attackcolor = new Color(255, 0, 0, 255);
|
|
||||||
attacksLeftStr = "Phase Over";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
attackcolor = new Color(255, 255, 255, 255);
|
|
||||||
attacksLeftStr = String.valueOf(attackTicksleft);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (actor != null)
|
|
||||||
{
|
|
||||||
Point canvasPoint = actor.getCanvasTextLocation(graphics, attacksLeftStr, 0);
|
|
||||||
renderTextLocationAbove(graphics, attacksLeftStr, config.textSize(), config.fontStyle().getFont(), attackcolor, canvasPoint);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (config.timers())
|
|
||||||
{
|
|
||||||
if (plugin.getBurnTarget().size() > 0)
|
|
||||||
{
|
|
||||||
for (Actor actor : plugin.getBurnTarget())
|
|
||||||
{
|
|
||||||
renderNpcOverlay(graphics, actor, config.burnColor(), 2, 100, 10);
|
|
||||||
final int ticksLeft = plugin.getBurnTicks();
|
|
||||||
String ticksLeftStr = String.valueOf(ticksLeft);
|
|
||||||
Color tickcolor = new Color(255, 255, 255, 255);
|
|
||||||
if (ticksLeft >= 0)
|
|
||||||
{
|
|
||||||
if (ticksLeft == 34 ||
|
|
||||||
ticksLeft == 33 ||
|
|
||||||
ticksLeft == 26 ||
|
|
||||||
ticksLeft == 25 ||
|
|
||||||
ticksLeft == 18 ||
|
|
||||||
ticksLeft == 17 ||
|
|
||||||
ticksLeft == 10 ||
|
|
||||||
ticksLeft == 9 ||
|
|
||||||
ticksLeft == 2 ||
|
|
||||||
ticksLeft == 1)
|
|
||||||
{
|
|
||||||
tickcolor = new Color(255, 0, 0, 255);
|
|
||||||
ticksLeftStr = "GAP";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
tickcolor = new Color(255, 255, 255, 255);
|
|
||||||
}
|
|
||||||
Point canvasPoint = actor.getCanvasTextLocation(graphics, ticksLeftStr, 0);
|
|
||||||
renderTextLocation(graphics, ticksLeftStr, config.textSize(), config.fontStyle().getFont(), tickcolor, canvasPoint);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (plugin.getAcidTarget() != null)
|
|
||||||
{
|
|
||||||
Actor actor = plugin.getAcidTarget();
|
|
||||||
renderNpcOverlay(graphics, actor, config.acidColor(), 2, 100, 10);
|
|
||||||
final int ticksLeft = plugin.getAcidTicks();
|
|
||||||
Color tickcolor = new Color(255, 255, 255, 255);
|
|
||||||
if (ticksLeft > 0)
|
|
||||||
{
|
|
||||||
if (ticksLeft > 1)
|
|
||||||
{
|
|
||||||
tickcolor = new Color(69, 241, 44, 255);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
tickcolor = new Color(255, 255, 255, 255);
|
|
||||||
}
|
|
||||||
final String ticksLeftStr = String.valueOf(ticksLeft);
|
|
||||||
Point canvasPoint = actor.getCanvasTextLocation(graphics, ticksLeftStr, 0);
|
|
||||||
renderTextLocation(graphics, ticksLeftStr, config.textSize(), config.fontStyle().getFont(), tickcolor, canvasPoint);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (config.tpOverlay())
|
|
||||||
{
|
|
||||||
if (plugin.getTeleportTarget() != null)
|
|
||||||
{
|
|
||||||
renderNpcOverlay(graphics, plugin.getTeleportTarget(), new Color(193, 255, 245, 255), 2, 100, 10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void renderNpcOverlay(Graphics2D graphics, Actor actor, Color color, int outlineWidth, int outlineAlpha, int fillAlpha)
|
|
||||||
{
|
|
||||||
int size = 1;
|
|
||||||
LocalPoint lp = actor.getLocalLocation();
|
|
||||||
Polygon tilePoly = Perspective.getCanvasTileAreaPoly(client, lp, size);
|
|
||||||
|
|
||||||
if (tilePoly != null)
|
|
||||||
{
|
|
||||||
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), outlineAlpha));
|
|
||||||
graphics.setStroke(new BasicStroke(outlineWidth));
|
|
||||||
graphics.draw(tilePoly);
|
|
||||||
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), fillAlpha));
|
|
||||||
graphics.fill(tilePoly);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void renderTextLocation(Graphics2D graphics, String txtString, int fontSize, int fontStyle, Color fontColor, Point canvasPoint)
|
|
||||||
{
|
|
||||||
graphics.setFont(new Font("Arial", fontStyle, fontSize));
|
|
||||||
if (canvasPoint != null)
|
|
||||||
{
|
|
||||||
final Point canvasCenterPoint = new Point(
|
|
||||||
canvasPoint.getX(),
|
|
||||||
canvasPoint.getY());
|
|
||||||
final Point canvasCenterPoint_shadow = new Point(
|
|
||||||
canvasPoint.getX() + 1,
|
|
||||||
canvasPoint.getY() + 1);
|
|
||||||
if (config.shadows())
|
|
||||||
{
|
|
||||||
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint_shadow, txtString, Color.BLACK);
|
|
||||||
}
|
|
||||||
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint, txtString, fontColor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void renderTextLocationAbove(Graphics2D graphics, String txtString, int fontSize, int fontStyle, Color fontColor, Point canvasPoint)
|
|
||||||
{
|
|
||||||
graphics.setFont(new Font("Arial", fontStyle, fontSize));
|
|
||||||
if (canvasPoint != null)
|
|
||||||
{
|
|
||||||
final Point canvasCenterPoint = new Point(
|
|
||||||
canvasPoint.getX(),
|
|
||||||
canvasPoint.getY() + 20);
|
|
||||||
final Point canvasCenterPoint_shadow = new Point(
|
|
||||||
canvasPoint.getX() + 1,
|
|
||||||
canvasPoint.getY() + 21);
|
|
||||||
if (config.shadows())
|
|
||||||
{
|
|
||||||
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint_shadow, txtString, Color.BLACK);
|
|
||||||
}
|
|
||||||
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint, txtString, fontColor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-97
@@ -1,97 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2019, lyzrds <https://discord.gg/5eb9Fe>
|
|
||||||
* Copyright (c) 2019, ganom <https://github.com/Ganom>
|
|
||||||
* 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.plugins.coxhelper;
|
|
||||||
|
|
||||||
import java.awt.BasicStroke;
|
|
||||||
import java.awt.Color;
|
|
||||||
import java.awt.Dimension;
|
|
||||||
import java.awt.Graphics2D;
|
|
||||||
import java.awt.Polygon;
|
|
||||||
import javax.inject.Inject;
|
|
||||||
import net.runelite.api.Client;
|
|
||||||
import net.runelite.api.NPC;
|
|
||||||
import net.runelite.client.ui.overlay.Overlay;
|
|
||||||
import net.runelite.client.ui.overlay.OverlayLayer;
|
|
||||||
|
|
||||||
public class VanguardsHighlight extends Overlay
|
|
||||||
{
|
|
||||||
|
|
||||||
private final Client client;
|
|
||||||
private final CoxPlugin plugin;
|
|
||||||
private final CoxConfig config;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
VanguardsHighlight(Client client, CoxPlugin plugin, CoxConfig config)
|
|
||||||
{
|
|
||||||
super(plugin);
|
|
||||||
setLayer(OverlayLayer.ABOVE_MAP);
|
|
||||||
this.client = client;
|
|
||||||
this.plugin = plugin;
|
|
||||||
this.config = config;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Dimension render(Graphics2D graphics)
|
|
||||||
{
|
|
||||||
if (plugin.isRunVanguards())
|
|
||||||
{
|
|
||||||
if (config.vangHighlight())
|
|
||||||
{
|
|
||||||
if (plugin.getRangeVang() != null)
|
|
||||||
{
|
|
||||||
renderNpcOverlay(graphics, plugin.getRangeVang(), "Range", Color.GREEN);
|
|
||||||
}
|
|
||||||
if (plugin.getMageVang() != null)
|
|
||||||
{
|
|
||||||
renderNpcOverlay(graphics, plugin.getMageVang(), "Mage", Color.BLUE);
|
|
||||||
}
|
|
||||||
if (plugin.getMeleeVang() != null)
|
|
||||||
{
|
|
||||||
renderNpcOverlay(graphics, plugin.getMeleeVang(), "Melee", Color.RED);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void renderNpcOverlay(Graphics2D graphics, NPC actor, String name, Color color)
|
|
||||||
{
|
|
||||||
Polygon objectClickbox = actor.getConvexHull();
|
|
||||||
renderPoly(graphics, color, objectClickbox);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void renderPoly(Graphics2D graphics, Color color, Polygon polygon)
|
|
||||||
{
|
|
||||||
if (polygon != null)
|
|
||||||
{
|
|
||||||
graphics.setColor(color);
|
|
||||||
graphics.setStroke(new BasicStroke(2));
|
|
||||||
graphics.draw(polygon);
|
|
||||||
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), 20));
|
|
||||||
graphics.fill(polygon);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-84
@@ -1,84 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2019, lyzrds <https://discord.gg/5eb9Fe>
|
|
||||||
* Copyright (c) 2019, ganom <https://github.com/Ganom>
|
|
||||||
* 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.plugins.coxhelper;
|
|
||||||
|
|
||||||
import java.awt.Color;
|
|
||||||
import java.awt.Dimension;
|
|
||||||
import java.awt.Graphics2D;
|
|
||||||
import javax.inject.Inject;
|
|
||||||
import net.runelite.client.ui.overlay.Overlay;
|
|
||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
|
||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
|
||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
|
||||||
import net.runelite.client.ui.overlay.components.table.TableAlignment;
|
|
||||||
import net.runelite.client.ui.overlay.components.table.TableComponent;
|
|
||||||
import net.runelite.client.util.ColorUtil;
|
|
||||||
|
|
||||||
public class VanguardsOverlay extends Overlay
|
|
||||||
{
|
|
||||||
|
|
||||||
private final CoxPlugin plugin;
|
|
||||||
private final CoxConfig config;
|
|
||||||
private final PanelComponent panelComponent = new PanelComponent();
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
VanguardsOverlay(CoxPlugin plugin, CoxConfig config)
|
|
||||||
{
|
|
||||||
super(plugin);
|
|
||||||
setPosition(OverlayPosition.DYNAMIC);
|
|
||||||
setPosition(OverlayPosition.DETACHED);
|
|
||||||
this.plugin = plugin;
|
|
||||||
this.config = config;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Dimension render(Graphics2D graphics)
|
|
||||||
{
|
|
||||||
if (plugin.isRunVanguards())
|
|
||||||
{
|
|
||||||
panelComponent.getChildren().clear();
|
|
||||||
|
|
||||||
if (config.vangHealth())
|
|
||||||
{
|
|
||||||
panelComponent.getChildren().add(TitleComponent.builder()
|
|
||||||
.text("Vanguards")
|
|
||||||
.color(Color.pink)
|
|
||||||
.build());
|
|
||||||
|
|
||||||
TableComponent tableComponent = new TableComponent();
|
|
||||||
tableComponent.setColumnAlignments(TableAlignment.LEFT, TableAlignment.RIGHT);
|
|
||||||
|
|
||||||
tableComponent.addRow(ColorUtil.prependColorTag("Range", Color.GREEN), Integer.toString(plugin.getRangeVangHP()));
|
|
||||||
tableComponent.addRow(ColorUtil.prependColorTag("Mage", Color.BLUE), Integer.toString(plugin.getMageVangHP()));
|
|
||||||
tableComponent.addRow(ColorUtil.prependColorTag("Melee", Color.RED), Integer.toString(plugin.getMeleeVangHP()));
|
|
||||||
|
|
||||||
panelComponent.getChildren().add(tableComponent);
|
|
||||||
|
|
||||||
return panelComponent.render(graphics);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+12
-1
@@ -42,6 +42,7 @@ import net.runelite.api.Actor;
|
|||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.Constants;
|
import net.runelite.api.Constants;
|
||||||
import net.runelite.api.DecorativeObject;
|
import net.runelite.api.DecorativeObject;
|
||||||
|
import net.runelite.api.DynamicObject;
|
||||||
import net.runelite.api.GameObject;
|
import net.runelite.api.GameObject;
|
||||||
import net.runelite.api.GraphicsObject;
|
import net.runelite.api.GraphicsObject;
|
||||||
import net.runelite.api.GroundObject;
|
import net.runelite.api.GroundObject;
|
||||||
@@ -54,6 +55,7 @@ import net.runelite.api.Perspective;
|
|||||||
import net.runelite.api.Player;
|
import net.runelite.api.Player;
|
||||||
import net.runelite.api.Point;
|
import net.runelite.api.Point;
|
||||||
import net.runelite.api.Projectile;
|
import net.runelite.api.Projectile;
|
||||||
|
import net.runelite.api.Renderable;
|
||||||
import net.runelite.api.Scene;
|
import net.runelite.api.Scene;
|
||||||
import net.runelite.api.Tile;
|
import net.runelite.api.Tile;
|
||||||
import net.runelite.api.WallObject;
|
import net.runelite.api.WallObject;
|
||||||
@@ -78,6 +80,7 @@ class DevToolsOverlay extends Overlay
|
|||||||
private static final Font FONT = FontManager.getRunescapeFont().deriveFont(Font.BOLD, 16);
|
private static final Font FONT = FontManager.getRunescapeFont().deriveFont(Font.BOLD, 16);
|
||||||
private static final Color RED = new Color(221, 44, 0);
|
private static final Color RED = new Color(221, 44, 0);
|
||||||
private static final Color GREEN = new Color(0, 200, 83);
|
private static final Color GREEN = new Color(0, 200, 83);
|
||||||
|
private static final Color TURQOISE = new Color(0, 200, 157);
|
||||||
private static final Color ORANGE = new Color(255, 109, 0);
|
private static final Color ORANGE = new Color(255, 109, 0);
|
||||||
private static final Color YELLOW = new Color(255, 214, 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 CYAN = new Color(0, 184, 212);
|
||||||
@@ -306,9 +309,17 @@ class DevToolsOverlay extends Overlay
|
|||||||
if (gameObject != null)
|
if (gameObject != null)
|
||||||
{
|
{
|
||||||
if (player.getLocalLocation().distanceTo(gameObject.getLocalLocation()) <= MAX_DISTANCE)
|
if (player.getLocalLocation().distanceTo(gameObject.getLocalLocation()) <= MAX_DISTANCE)
|
||||||
|
{
|
||||||
|
Renderable renderable = gameObject.getRenderable();
|
||||||
|
if (renderable instanceof DynamicObject)
|
||||||
|
{
|
||||||
|
OverlayUtil.renderTileOverlay(graphics, gameObject, "ID: " + gameObject.getId() + " Anim: " + ((DynamicObject) renderable).getAnimationID(), TURQOISE);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
OverlayUtil.renderTileOverlay(graphics, gameObject, "ID: " + gameObject.getId(), GREEN);
|
OverlayUtil.renderTileOverlay(graphics, gameObject, "ID: " + gameObject.getId(), GREEN);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Draw a polygon around the convex hull
|
// Draw a polygon around the convex hull
|
||||||
// of the model vertices
|
// of the model vertices
|
||||||
@@ -417,7 +428,7 @@ class DevToolsOverlay extends Overlay
|
|||||||
}
|
}
|
||||||
|
|
||||||
int projectileId = projectile.getId();
|
int projectileId = projectile.getId();
|
||||||
Actor projectileInteracting = null;
|
Actor projectileInteracting = projectile.getInteracting();
|
||||||
|
|
||||||
String infoString = "";
|
String infoString = "";
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ package net.runelite.client.plugins.emojis;
|
|||||||
|
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import joptsimple.internal.Strings;
|
import joptsimple.internal.Strings;
|
||||||
@@ -52,6 +54,8 @@ import net.runelite.client.util.ImageUtil;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class EmojiPlugin extends Plugin
|
public class EmojiPlugin extends Plugin
|
||||||
{
|
{
|
||||||
|
private static final Pattern TAG_REGEXP = Pattern.compile("<[^>]*>");
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
@@ -128,7 +132,8 @@ public class EmojiPlugin extends Plugin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final String message = chatMessage.getMessage();
|
final MessageNode messageNode = chatMessage.getMessageNode();
|
||||||
|
final String message = messageNode.getValue();
|
||||||
final String updatedMessage = updateMessage(message);
|
final String updatedMessage = updateMessage(message);
|
||||||
|
|
||||||
if (updatedMessage == null)
|
if (updatedMessage == null)
|
||||||
@@ -136,7 +141,6 @@ public class EmojiPlugin extends Plugin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final MessageNode messageNode = chatMessage.getMessageNode();
|
|
||||||
messageNode.setRuneLiteFormatMessage(updatedMessage);
|
messageNode.setRuneLiteFormatMessage(updatedMessage);
|
||||||
chatMessageManager.update(messageNode);
|
chatMessageManager.update(messageNode);
|
||||||
client.refreshChat();
|
client.refreshChat();
|
||||||
@@ -169,7 +173,9 @@ public class EmojiPlugin extends Plugin
|
|||||||
boolean editedMessage = false;
|
boolean editedMessage = false;
|
||||||
for (int i = 0; i < messageWords.length; i++)
|
for (int i = 0; i < messageWords.length; i++)
|
||||||
{
|
{
|
||||||
final Emoji emoji = Emoji.getEmoji(messageWords[i]);
|
// Remove tags except for <lt> and <gt>
|
||||||
|
final String trigger = removeTags(messageWords[i]);
|
||||||
|
final Emoji emoji = Emoji.getEmoji(trigger);
|
||||||
|
|
||||||
if (emoji == null)
|
if (emoji == null)
|
||||||
{
|
{
|
||||||
@@ -178,7 +184,7 @@ public class EmojiPlugin extends Plugin
|
|||||||
|
|
||||||
final int emojiId = modIconsStart + emoji.ordinal();
|
final int emojiId = modIconsStart + emoji.ordinal();
|
||||||
|
|
||||||
messageWords[i] = "<img=" + emojiId + ">";
|
messageWords[i] = messageWords[i].replace(trigger, "<img=" + emojiId + ">");
|
||||||
editedMessage = true;
|
editedMessage = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,4 +196,29 @@ public class EmojiPlugin extends Plugin
|
|||||||
|
|
||||||
return Strings.join(messageWords, " ");
|
return Strings.join(messageWords, " ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove tags, except for <lt> and <gt>
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private static String removeTags(String str)
|
||||||
|
{
|
||||||
|
StringBuffer stringBuffer = new StringBuffer();
|
||||||
|
Matcher matcher = TAG_REGEXP.matcher(str);
|
||||||
|
while (matcher.find())
|
||||||
|
{
|
||||||
|
matcher.appendReplacement(stringBuffer, "");
|
||||||
|
String match = matcher.group(0);
|
||||||
|
switch (match)
|
||||||
|
{
|
||||||
|
case "<lt>":
|
||||||
|
case "<gt>":
|
||||||
|
stringBuffer.append(match);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
matcher.appendTail(stringBuffer);
|
||||||
|
return stringBuffer.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+12
@@ -133,6 +133,17 @@ public interface EntityHiderConfig extends Config
|
|||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 10,
|
position = 10,
|
||||||
|
keyName = "hideNPCsNames",
|
||||||
|
name = "Hide NPCs Names",
|
||||||
|
description = "Configures which NPCs to hide"
|
||||||
|
)
|
||||||
|
default String hideNPCsNames()
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
position = 11,
|
||||||
keyName = "hideProjectiles",
|
keyName = "hideProjectiles",
|
||||||
name = "Hide Projectiles",
|
name = "Hide Projectiles",
|
||||||
description = "Configures whether or not projectiles are hidden"
|
description = "Configures whether or not projectiles are hidden"
|
||||||
@@ -141,4 +152,5 @@ public interface EntityHiderConfig extends Config
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -94,6 +94,7 @@ public class EntityHiderPlugin extends Plugin
|
|||||||
|
|
||||||
client.setNPCsHidden(config.hideNPCs());
|
client.setNPCsHidden(config.hideNPCs());
|
||||||
client.setNPCsHidden2D(config.hideNPCs2D());
|
client.setNPCsHidden2D(config.hideNPCs2D());
|
||||||
|
client.setNPCsNames(config.hideNPCsNames());
|
||||||
|
|
||||||
client.setAttackersHidden(config.hideAttackers());
|
client.setAttackersHidden(config.hideAttackers());
|
||||||
|
|
||||||
|
|||||||
+7
-7
@@ -199,26 +199,26 @@ public class ExaminePlugin extends Plugin
|
|||||||
log.debug("Got examine for {} {}: {}", pendingExamine.getType(), pendingExamine.getId(), event.getMessage());
|
log.debug("Got examine for {} {}: {}", pendingExamine.getType(), pendingExamine.getId(), event.getMessage());
|
||||||
|
|
||||||
// If it is an item, show the price of it
|
// If it is an item, show the price of it
|
||||||
final ItemDefinition itemComposition;
|
final ItemDefinition Itemdefinition;
|
||||||
if (pendingExamine.getType() == ExamineType.ITEM || pendingExamine.getType() == ExamineType.ITEM_BANK_EQ)
|
if (pendingExamine.getType() == ExamineType.ITEM || pendingExamine.getType() == ExamineType.ITEM_BANK_EQ)
|
||||||
{
|
{
|
||||||
final int itemId = pendingExamine.getId();
|
final int itemId = pendingExamine.getId();
|
||||||
final int itemQuantity = pendingExamine.getQuantity();
|
final int itemQuantity = pendingExamine.getQuantity();
|
||||||
itemComposition = itemManager.getItemDefinition(itemId);
|
Itemdefinition = itemManager.getItemDefinition(itemId);
|
||||||
|
|
||||||
if (itemComposition != null)
|
if (Itemdefinition != null)
|
||||||
{
|
{
|
||||||
final int id = itemManager.canonicalize(itemComposition.getId());
|
final int id = itemManager.canonicalize(Itemdefinition.getId());
|
||||||
executor.submit(() -> getItemPrice(id, itemComposition, itemQuantity));
|
executor.submit(() -> getItemPrice(id, Itemdefinition, itemQuantity));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
itemComposition = null;
|
Itemdefinition = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't submit examine info for tradeable items, which we already have from the RS item api
|
// Don't submit examine info for tradeable items, which we already have from the RS item api
|
||||||
if (itemComposition != null && itemComposition.isTradeable())
|
if (Itemdefinition != null && Itemdefinition.isTradeable())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ import net.runelite.client.ui.overlay.OverlayPosition;
|
|||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
import net.runelite.client.ui.overlay.components.table.TableComponent;
|
import net.runelite.client.ui.overlay.components.table.TableComponent;
|
||||||
|
import net.runelite.client.ui.overlay.components.table.TableAlignment;
|
||||||
|
|
||||||
class WaveOverlay extends Overlay
|
class WaveOverlay extends Overlay
|
||||||
{
|
{
|
||||||
@@ -97,15 +98,20 @@ class WaveOverlay extends Overlay
|
|||||||
.color(HEADER_COLOR)
|
.color(HEADER_COLOR)
|
||||||
.build());
|
.build());
|
||||||
|
|
||||||
|
|
||||||
TableComponent tableComponent = new TableComponent();
|
TableComponent tableComponent = new TableComponent();
|
||||||
|
tableComponent.setColumnAlignments(TableAlignment.CENTER);
|
||||||
|
|
||||||
for (String line : buildWaveLines(waveContents))
|
for (String line : buildWaveLines(waveContents))
|
||||||
{
|
{
|
||||||
tableComponent.addRow(line);
|
tableComponent.addRow(line);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!tableComponent.isEmpty())
|
||||||
|
{
|
||||||
panelComponent.getChildren().add(tableComponent);
|
panelComponent.getChildren().add(tableComponent);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static Collection<String> buildWaveLines(final Map<WaveMonster, Integer> wave)
|
private static Collection<String> buildWaveLines(final Map<WaveMonster, Integer> wave)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ package net.runelite.client.plugins.inferno;
|
|||||||
import net.runelite.client.config.Config;
|
import net.runelite.client.config.Config;
|
||||||
import net.runelite.client.config.ConfigGroup;
|
import net.runelite.client.config.ConfigGroup;
|
||||||
import net.runelite.client.config.ConfigItem;
|
import net.runelite.client.config.ConfigItem;
|
||||||
|
import java.awt.Color;
|
||||||
|
|
||||||
@ConfigGroup("inferno")
|
@ConfigGroup("inferno")
|
||||||
public interface InfernoConfig extends Config
|
public interface InfernoConfig extends Config
|
||||||
@@ -63,4 +64,26 @@ public interface InfernoConfig extends Config
|
|||||||
{
|
{
|
||||||
return InfernoWaveDisplayMode.BOTH;
|
return InfernoWaveDisplayMode.BOTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
position = 3,
|
||||||
|
keyName = "getWaveOverlayHeaderColor",
|
||||||
|
name = "Wave Header",
|
||||||
|
description = "Color for Wave Header"
|
||||||
|
)
|
||||||
|
default Color getWaveOverlayHeaderColor()
|
||||||
|
{
|
||||||
|
return Color.ORANGE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
position = 4,
|
||||||
|
keyName = "getWaveTextColor",
|
||||||
|
name = "Wave Text Color",
|
||||||
|
description = "Color for Wave Texts"
|
||||||
|
)
|
||||||
|
default Color getWaveTextColor()
|
||||||
|
{
|
||||||
|
return Color.WHITE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+68
-56
@@ -25,17 +25,16 @@
|
|||||||
package net.runelite.client.plugins.inferno;
|
package net.runelite.client.plugins.inferno;
|
||||||
|
|
||||||
import com.google.inject.Provides;
|
import com.google.inject.Provides;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.EnumMap;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.regex.Matcher;
|
|
||||||
import java.util.regex.Pattern;
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import lombok.AccessLevel;
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
import net.runelite.api.Actor;
|
||||||
import net.runelite.api.ChatMessageType;
|
import net.runelite.api.ChatMessageType;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.GameState;
|
import net.runelite.api.GameState;
|
||||||
@@ -65,11 +64,6 @@ import org.apache.commons.lang3.ArrayUtils;
|
|||||||
public class InfernoPlugin extends Plugin
|
public class InfernoPlugin extends Plugin
|
||||||
{
|
{
|
||||||
|
|
||||||
private static final Pattern WAVE_PATTERN = Pattern.compile(".*Wave: (\\d+).*");
|
|
||||||
private static final int MAX_MONSTERS_OF_TYPE_PER_WAVE = 6;
|
|
||||||
private static final int INFERNO_REGION = 9043;
|
|
||||||
static final int MAX_WAVE = 69;
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
@@ -94,9 +88,6 @@ public class InfernoPlugin extends Plugin
|
|||||||
@Inject
|
@Inject
|
||||||
private InfernoConfig config;
|
private InfernoConfig config;
|
||||||
|
|
||||||
@Getter
|
|
||||||
static final List<EnumMap<InfernoWaveMonster, Integer>> WAVES = new ArrayList<>();
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private int currentWave = -1;
|
private int currentWave = -1;
|
||||||
|
|
||||||
@@ -118,46 +109,16 @@ public class InfernoPlugin extends Plugin
|
|||||||
private InfernoJadAttack attack;
|
private InfernoJadAttack attack;
|
||||||
|
|
||||||
private NPC jad;
|
private NPC jad;
|
||||||
|
private static final int INFERNO_REGION = 9043;
|
||||||
|
private int currentWaveNumber;
|
||||||
|
private int nextWaveNumber;
|
||||||
|
private Map<Integer, String> monster;
|
||||||
|
private Map<Integer, int[]> waves;
|
||||||
|
private List<Actor> waveMonsters;
|
||||||
|
|
||||||
|
public InfernoPlugin()
|
||||||
static
|
|
||||||
{
|
{
|
||||||
final InfernoWaveMonster[] waveMonsters = InfernoWaveMonster.values();
|
waveMonsters = new ArrayList<Actor>();
|
||||||
|
|
||||||
// Add wave 1, future waves are derived from its contents
|
|
||||||
final EnumMap<InfernoWaveMonster, Integer> waveOne = new EnumMap<>(InfernoWaveMonster.class);
|
|
||||||
waveOne.put(waveMonsters[0], 1);
|
|
||||||
WAVES.add(waveOne);
|
|
||||||
|
|
||||||
for (int wave = 1; wave < MAX_WAVE; wave++)
|
|
||||||
{
|
|
||||||
final EnumMap<InfernoWaveMonster, Integer> prevWave = WAVES.get(wave - 1).clone();
|
|
||||||
int maxMonsterOrdinal = -1;
|
|
||||||
|
|
||||||
for (int i = 0; i < waveMonsters.length; i++)
|
|
||||||
{
|
|
||||||
final int ordinalMonsterQuantity = prevWave.getOrDefault(waveMonsters[i], 0);
|
|
||||||
|
|
||||||
if (ordinalMonsterQuantity == MAX_MONSTERS_OF_TYPE_PER_WAVE)
|
|
||||||
{
|
|
||||||
maxMonsterOrdinal = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (maxMonsterOrdinal >= 0)
|
|
||||||
{
|
|
||||||
prevWave.remove(waveMonsters[maxMonsterOrdinal]);
|
|
||||||
}
|
|
||||||
|
|
||||||
final int addedMonsterOrdinal = maxMonsterOrdinal >= 0 ? maxMonsterOrdinal + 1 : 0;
|
|
||||||
final InfernoWaveMonster addedMonster = waveMonsters[addedMonsterOrdinal];
|
|
||||||
final int addedMonsterQuantity = prevWave.getOrDefault(addedMonster, 0);
|
|
||||||
|
|
||||||
prevWave.put(addedMonster, addedMonsterQuantity + 1);
|
|
||||||
|
|
||||||
WAVES.add(prevWave);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@@ -174,6 +135,8 @@ public class InfernoPlugin extends Plugin
|
|||||||
overlayManager.add(nibblerOverlay);
|
overlayManager.add(nibblerOverlay);
|
||||||
overlayManager.add(waveOverlay);
|
overlayManager.add(waveOverlay);
|
||||||
overlayManager.add(jadOverlay);
|
overlayManager.add(jadOverlay);
|
||||||
|
monster = InfernoWaveMappings.npcNameMapping();
|
||||||
|
waves = InfernoWaveMappings.waveMapping();
|
||||||
monsters = new HashMap<>();
|
monsters = new HashMap<>();
|
||||||
monsterCurrentAttackMap = new HashMap<>(6);
|
monsterCurrentAttackMap = new HashMap<>(6);
|
||||||
for (int i = 1; i <= 6; i++)
|
for (int i = 1; i <= 6; i++)
|
||||||
@@ -194,6 +157,11 @@ public class InfernoPlugin extends Plugin
|
|||||||
overlayManager.remove(jadOverlay);
|
overlayManager.remove(jadOverlay);
|
||||||
jad = null;
|
jad = null;
|
||||||
attack = null;
|
attack = null;
|
||||||
|
monster = null;
|
||||||
|
monsters = null;
|
||||||
|
waves = null;
|
||||||
|
currentWaveNumber = -1;
|
||||||
|
nextWaveNumber = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
@@ -218,6 +186,11 @@ public class InfernoPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
jad = event.getNpc();
|
jad = event.getNpc();
|
||||||
}
|
}
|
||||||
|
final Actor actor = event.getActor();
|
||||||
|
if (actor != null)
|
||||||
|
{
|
||||||
|
waveMonsters.add(actor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
@@ -242,6 +215,11 @@ public class InfernoPlugin extends Plugin
|
|||||||
jad = null;
|
jad = null;
|
||||||
attack = null;
|
attack = null;
|
||||||
}
|
}
|
||||||
|
final Actor actor = event.getActor();
|
||||||
|
if (actor != null)
|
||||||
|
{
|
||||||
|
waveMonsters.remove(actor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
@@ -261,16 +239,19 @@ public class InfernoPlugin extends Plugin
|
|||||||
@Subscribe
|
@Subscribe
|
||||||
public void onChatMessage(ChatMessage event)
|
public void onChatMessage(ChatMessage event)
|
||||||
{
|
{
|
||||||
final Matcher waveMatcher = WAVE_PATTERN.matcher(event.getMessage());
|
|
||||||
|
|
||||||
if (event.getType() != ChatMessageType.GAMEMESSAGE
|
if (event.getType() != ChatMessageType.GAMEMESSAGE || !inInferno())
|
||||||
|| !inInferno()
|
|
||||||
|| !waveMatcher.matches())
|
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
String message = event.getMessage();
|
||||||
|
if (event.getMessage().contains("Wave:"))
|
||||||
|
{
|
||||||
|
message = message.substring(message.indexOf(": ") + 2);
|
||||||
|
currentWaveNumber = Integer.parseInt(message.substring(0, message.indexOf("<")));
|
||||||
|
nextWaveNumber = ((currentWaveNumber < 63) ? (currentWaveNumber + 1) : -1);
|
||||||
|
}
|
||||||
|
|
||||||
currentWave = Integer.parseInt(waveMatcher.group(1));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
@@ -419,9 +400,40 @@ public class InfernoPlugin extends Plugin
|
|||||||
return ArrayUtils.contains(client.getMapRegions(), INFERNO_REGION);
|
return ArrayUtils.contains(client.getMapRegions(), INFERNO_REGION);
|
||||||
}
|
}
|
||||||
|
|
||||||
static String formatMonsterQuantity(final InfernoWaveMonster monster, final int quantity)
|
public boolean isNotFinalWave()
|
||||||
{
|
{
|
||||||
return String.format("%dx %s", quantity, monster);
|
return currentWaveNumber <= 68;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
InfernoJadAttack getAttack()
|
||||||
|
{
|
||||||
|
return attack;
|
||||||
|
}
|
||||||
|
|
||||||
|
int getCurrentWaveNumber()
|
||||||
|
{
|
||||||
|
return currentWaveNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
int getNextWaveNumber()
|
||||||
|
{
|
||||||
|
return nextWaveNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<Integer, String> getMonster()
|
||||||
|
{
|
||||||
|
return monster;
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<Integer, int[]> getWaves()
|
||||||
|
{
|
||||||
|
return waves;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Actor> getWaveMonsters()
|
||||||
|
{
|
||||||
|
return waveMonsters;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+146
@@ -0,0 +1,146 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2019, Kyleeld <https://github.com/kyleeld>
|
||||||
|
* Copyright (c) 2019, RuneLitePlus <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.
|
||||||
|
*/
|
||||||
|
package net.runelite.client.plugins.inferno;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class InfernoWaveMappings
|
||||||
|
{
|
||||||
|
static Map<Integer, int[]> waveMapping()
|
||||||
|
{
|
||||||
|
return new HashMap<Integer, int[]>()
|
||||||
|
{
|
||||||
|
{
|
||||||
|
put(1, new int[]{32, 32, 32, 85});
|
||||||
|
put(2, new int[]{32, 32, 32, 85, 85});
|
||||||
|
put(3, new int[]{32, 32, 32, 32, 32, 32});
|
||||||
|
put(4, new int[]{32, 32, 32, 165});
|
||||||
|
put(5, new int[]{32, 32, 32, 85, 165});
|
||||||
|
put(6, new int[]{32, 32, 32, 85, 85, 165});
|
||||||
|
put(7, new int[]{32, 32, 32, 165, 165});
|
||||||
|
put(8, new int[]{32, 32, 32, 32, 32, 32});
|
||||||
|
put(9, new int[]{32, 32, 32, 240});
|
||||||
|
put(10, new int[]{32, 32, 32, 85, 240});
|
||||||
|
put(11, new int[]{32, 32, 32, 85, 85, 240});
|
||||||
|
put(12, new int[]{32, 32, 32, 165, 240});
|
||||||
|
put(13, new int[]{32, 32, 32, 85, 165, 240});
|
||||||
|
put(14, new int[]{32, 32, 32, 85, 85, 165, 240});
|
||||||
|
put(15, new int[]{32, 32, 32, 165, 165, 240});
|
||||||
|
put(16, new int[]{32, 32, 32, 240, 240});
|
||||||
|
put(17, new int[]{32, 32, 32, 32, 32, 32});
|
||||||
|
put(18, new int[]{32, 32, 32, 370});
|
||||||
|
put(19, new int[]{32, 32, 32, 85, 370});
|
||||||
|
put(20, new int[]{32, 32, 32, 85, 85, 370});
|
||||||
|
put(21, new int[]{32, 32, 32, 165, 370});
|
||||||
|
put(22, new int[]{32, 32, 32, 85, 165, 370});
|
||||||
|
put(23, new int[]{32, 32, 32, 85, 85, 165, 370});
|
||||||
|
put(24, new int[]{32, 32, 32, 165, 165, 370});
|
||||||
|
put(25, new int[]{32, 32, 32, 240, 370});
|
||||||
|
put(26, new int[]{32, 32, 32, 85, 240, 370});
|
||||||
|
put(27, new int[]{32, 32, 32, 85, 85, 240, 370});
|
||||||
|
put(28, new int[]{32, 32, 32, 165, 240, 370});
|
||||||
|
put(29, new int[]{32, 32, 32, 85, 165, 240, 370});
|
||||||
|
put(30, new int[]{32, 32, 32, 85, 85, 165, 240, 370});
|
||||||
|
put(31, new int[]{32, 32, 32, 165, 165, 240, 370});
|
||||||
|
put(32, new int[]{32, 32, 32, 240, 240, 370});
|
||||||
|
put(33, new int[]{32, 32, 32, 370, 370});
|
||||||
|
put(34, new int[]{32, 32, 32, 32, 32, 32});
|
||||||
|
put(35, new int[]{32, 32, 32, 490});
|
||||||
|
put(36, new int[]{32, 32, 32, 85, 490});
|
||||||
|
put(37, new int[]{32, 32, 32, 85, 85, 490});
|
||||||
|
put(38, new int[]{32, 32, 32, 165, 490});
|
||||||
|
put(39, new int[]{32, 32, 32, 85, 165, 490});
|
||||||
|
put(40, new int[]{32, 32, 32, 85, 85, 165, 490});
|
||||||
|
put(41, new int[]{32, 32, 32, 165, 165, 490});
|
||||||
|
put(42, new int[]{32, 32, 32, 240, 490});
|
||||||
|
put(43, new int[]{32, 32, 32, 85, 240, 490});
|
||||||
|
put(44, new int[]{32, 32, 32, 85, 85, 240, 490});
|
||||||
|
put(45, new int[]{32, 32, 32, 165, 240, 490 });
|
||||||
|
put(46, new int[]{32, 32, 32, 85, 165, 240, 490});
|
||||||
|
put(47, new int[]{32, 32, 32, 85, 85, 165, 240, 490});
|
||||||
|
put(48, new int[]{32, 32, 32, 165, 165, 240, 490});
|
||||||
|
put(49, new int[]{32, 32, 32, 240, 240, 490});
|
||||||
|
put(50, new int[]{32, 32, 32, 370, 490});
|
||||||
|
put(51, new int[]{32, 32, 32, 85, 370, 490});
|
||||||
|
put(52, new int[]{32, 32, 32, 85, 85, 370, 490});
|
||||||
|
put(53, new int[]{32, 32, 32, 165, 370, 490});
|
||||||
|
put(54, new int[]{32, 32, 32, 85, 165, 370, 490});
|
||||||
|
put(55, new int[]{32, 32, 32, 85, 85, 165, 370, 490});
|
||||||
|
put(56, new int[]{32, 32, 32, 165, 165, 370, 490});
|
||||||
|
put(57, new int[]{32, 32, 32, 240, 370, 490});
|
||||||
|
put(58, new int[]{32, 32, 32, 85, 240, 370, 490});
|
||||||
|
put(59, new int[]{32, 32, 32, 85, 85, 240, 370, 490});
|
||||||
|
put(60, new int[]{32, 32, 32, 165, 240, 370, 490});
|
||||||
|
put(61, new int[]{32, 32, 32, 85, 165, 240, 370, 490});
|
||||||
|
put(62, new int[]{32, 32, 32, 85, 85, 165, 240, 370, 490});
|
||||||
|
put(63, new int[]{32, 32, 32, 165, 165, 240, 370, 490});
|
||||||
|
put(64, new int[]{32, 32, 32, 85, 240, 240, 370, 490});
|
||||||
|
put(65, new int[]{32, 32, 32, 85, 370, 370, 490});
|
||||||
|
put(66, new int[]{32, 32, 32, 85, 490, 490});
|
||||||
|
put(67, new int[]{900});
|
||||||
|
put(68, new int[]{900, 900, 900});
|
||||||
|
put(69, new int[]{1400});
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<Integer, String> npcNameMapping()
|
||||||
|
{
|
||||||
|
return new HashMap<Integer, String>()
|
||||||
|
{
|
||||||
|
{
|
||||||
|
put(32, "Jal-Nib - Level 32");
|
||||||
|
put(85, " Jal-MejRah - Level 85");
|
||||||
|
put(165, "Jal-Ak - Level 165");
|
||||||
|
put(240, "Jal-ImKot - Level 240");
|
||||||
|
put(370, "Jal-Xil - Level 370");
|
||||||
|
put(490, "Jal-Zek - Level 490");
|
||||||
|
put(900, "JalTok-Jad - Level 900");
|
||||||
|
put(1400, "TzKal-Zuk - Level 1400");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
static HashMap intArrayToHashmap(int inputArray[])
|
||||||
|
{
|
||||||
|
HashMap<Integer, Integer> elementCountMap = new HashMap<Integer, Integer>();
|
||||||
|
for (int i : inputArray)
|
||||||
|
{
|
||||||
|
if (elementCountMap.containsKey(i))
|
||||||
|
{
|
||||||
|
elementCountMap.put(i, elementCountMap.get(i) + 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
elementCountMap.put(i, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return elementCountMap;
|
||||||
|
}
|
||||||
|
}
|
||||||
+34
-92
@@ -1,127 +1,69 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2018, Jordan Atwood <jordan.atwood423@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.plugins.inferno;
|
package net.runelite.client.plugins.inferno;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.util.HashMap;
|
||||||
import java.awt.Dimension;
|
|
||||||
import java.awt.Graphics2D;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import javax.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import net.runelite.client.ui.ColorScheme;
|
|
||||||
import net.runelite.client.ui.overlay.Overlay;
|
|
||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
|
||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
|
||||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||||
import net.runelite.client.ui.overlay.components.table.TableComponent;
|
import java.awt.Graphics2D;
|
||||||
|
import net.runelite.client.ui.overlay.OverlayPriority;
|
||||||
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
|
import net.runelite.api.Client;
|
||||||
|
import net.runelite.client.ui.overlay.Overlay;
|
||||||
|
|
||||||
class InfernoWaveOverlay extends Overlay
|
public class InfernoWaveOverlay extends Overlay
|
||||||
{
|
{
|
||||||
private static final Color HEADER_COLOR = ColorScheme.BRAND_ORANGE;
|
private final Client client;
|
||||||
|
|
||||||
private final InfernoConfig config;
|
|
||||||
private final InfernoPlugin plugin;
|
private final InfernoPlugin plugin;
|
||||||
|
private final InfernoConfig config;
|
||||||
private final PanelComponent panelComponent = new PanelComponent();
|
private PanelComponent panelComponent;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private InfernoWaveOverlay(InfernoConfig config, InfernoPlugin plugin)
|
InfernoWaveOverlay(final Client client, final InfernoPlugin plugin, final InfernoConfig config)
|
||||||
{
|
{
|
||||||
setPosition(OverlayPosition.TOP_RIGHT);
|
(this.panelComponent = new PanelComponent()).setPreferredSize(new Dimension(150, 0));
|
||||||
this.config = config;
|
this.setPosition(OverlayPosition.TOP_RIGHT);
|
||||||
|
this.setPriority(OverlayPriority.HIGH);
|
||||||
|
this.client = client;
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
|
this.config = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public Dimension render(final Graphics2D graphics)
|
||||||
public Dimension render(Graphics2D graphics)
|
|
||||||
{
|
{
|
||||||
if (!plugin.inInferno()
|
if (!plugin.inInferno() || plugin.getCurrentWaveNumber() == 0)
|
||||||
|| plugin.getCurrentWave() < 0)
|
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
panelComponent.getChildren().clear();
|
panelComponent.getChildren().clear();
|
||||||
|
|
||||||
final int currentWave = plugin.getCurrentWave();
|
|
||||||
final int waveIndex = currentWave - 1;
|
|
||||||
|
|
||||||
if (config.waveDisplay() == InfernoWaveDisplayMode.CURRENT
|
if (config.waveDisplay() == InfernoWaveDisplayMode.CURRENT
|
||||||
|| config.waveDisplay() == InfernoWaveDisplayMode.BOTH)
|
|| config.waveDisplay() == InfernoWaveDisplayMode.BOTH)
|
||||||
{
|
{
|
||||||
final Map<InfernoWaveMonster, Integer> waveContents = InfernoPlugin.getWAVES().get(waveIndex);
|
renderWave("Current Wave (Wave " + plugin.getCurrentWaveNumber() + ")", plugin.getCurrentWaveNumber());
|
||||||
|
|
||||||
addWaveInfo("Wave " + plugin.getCurrentWave(), waveContents);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((config.waveDisplay() == InfernoWaveDisplayMode.NEXT
|
if ((config.waveDisplay() == InfernoWaveDisplayMode.NEXT
|
||||||
|| config.waveDisplay() == InfernoWaveDisplayMode.BOTH)
|
|| config.waveDisplay() == InfernoWaveDisplayMode.BOTH)
|
||||||
&& currentWave != InfernoPlugin.MAX_WAVE)
|
&& plugin.isNotFinalWave())
|
||||||
{
|
{
|
||||||
final Map<InfernoWaveMonster, Integer> waveContents = InfernoPlugin.getWAVES().get(waveIndex + 1);
|
renderWave("Next Wave (Wave " + plugin.getNextWaveNumber() + ")", plugin.getCurrentWaveNumber());
|
||||||
|
|
||||||
addWaveInfo("Next wave", waveContents);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return panelComponent.render(graphics);
|
return panelComponent.render(graphics);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addWaveInfo(final String headerText, final Map<InfernoWaveMonster, Integer> waveContents)
|
private void renderWave(final String header, final int waveNumber)
|
||||||
{
|
{
|
||||||
panelComponent.getChildren().add(TitleComponent.builder()
|
panelComponent.getChildren().add(TitleComponent.builder().text(header).color(config.getWaveOverlayHeaderColor()).build());
|
||||||
.text(headerText)
|
final HashMap<Integer, Integer> waveMap = (HashMap<Integer, Integer>) InfernoWaveMappings.intArrayToHashmap(plugin.getWaves().get(waveNumber));
|
||||||
.color(HEADER_COLOR)
|
for (final Map.Entry<Integer, Integer> entry : waveMap.entrySet())
|
||||||
.build());
|
|
||||||
|
|
||||||
TableComponent tableComponent = new TableComponent();
|
|
||||||
|
|
||||||
for (String line : buildWaveLines(waveContents))
|
|
||||||
{
|
{
|
||||||
tableComponent.addRow(line);
|
final int monsterID = entry.getKey();
|
||||||
}
|
final int quantity = entry.getValue();
|
||||||
|
if (quantity <= 0)
|
||||||
panelComponent.getChildren().add(tableComponent);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static Collection<String> buildWaveLines(final Map<InfernoWaveMonster, Integer> wave)
|
|
||||||
{
|
{
|
||||||
final List<Map.Entry<InfernoWaveMonster, Integer>> monsters = new ArrayList<>(wave.entrySet());
|
continue;
|
||||||
monsters.sort(Map.Entry.comparingByKey());
|
}
|
||||||
final List<String> outputLines = new ArrayList<>();
|
panelComponent.getChildren().add(TitleComponent.builder().text(quantity + "x " + plugin.getMonster().get(monsterID)).color(config.getWaveTextColor()).build());
|
||||||
|
|
||||||
for (Map.Entry<InfernoWaveMonster, Integer> monsterEntry : monsters)
|
|
||||||
{
|
|
||||||
final InfernoWaveMonster monster = monsterEntry.getKey();
|
|
||||||
final int quantity = monsterEntry.getValue();
|
|
||||||
final String line = InfernoPlugin.formatMonsterQuantity(monster, quantity);
|
|
||||||
|
|
||||||
outputLines.add(line);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return outputLines;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+87
@@ -0,0 +1,87 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2019 Hydrox6 <ikada@protonmail.ch>
|
||||||
|
* 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.plugins.interfacestyles;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import static net.runelite.api.SpriteID.*;
|
||||||
|
import net.runelite.client.game.SpriteOverride;
|
||||||
|
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
enum HealthbarOverride implements SpriteOverride
|
||||||
|
{
|
||||||
|
BACK_30PX(HEALTHBAR_DEFAULT_BACK_30PX, "back_30px.png"),
|
||||||
|
BACK_50PX(HEALTHBAR_DEFAULT_BACK_50PX, "back_30px.png"),
|
||||||
|
BACK_60PX(HEALTHBAR_DEFAULT_BACK_60PX, "back_30px.png"),
|
||||||
|
BACK_80PX(HEALTHBAR_DEFAULT_BACK_80PX, "back_90px.png"),
|
||||||
|
BACK_100PX(HEALTHBAR_DEFAULT_BACK_100PX, "back_90px.png"),
|
||||||
|
BACK_120PX(HEALTHBAR_DEFAULT_BACK_120PX, "back_90px.png"),
|
||||||
|
BACK_140PX(HEALTHBAR_DEFAULT_BACK_140PX, "back_90px.png"),
|
||||||
|
BACK_160PX(HEALTHBAR_DEFAULT_BACK_160PX, "back_90px.png"),
|
||||||
|
|
||||||
|
FRONT_30PX(HEALTHBAR_DEFAULT_FRONT_30PX, "front_30px.png"),
|
||||||
|
FRONT_50PX(HEALTHBAR_DEFAULT_FRONT_50PX, "front_30px.png"),
|
||||||
|
FRONT_60PX(HEALTHBAR_DEFAULT_FRONT_60PX, "front_30px.png"),
|
||||||
|
FRONT_80PX(HEALTHBAR_DEFAULT_FRONT_80PX, "front_90px.png"),
|
||||||
|
FRONT_100PX(HEALTHBAR_DEFAULT_FRONT_100PX, "front_90px.png"),
|
||||||
|
FRONT_120PX(HEALTHBAR_DEFAULT_FRONT_120PX, "front_90px.png"),
|
||||||
|
FRONT_140PX(HEALTHBAR_DEFAULT_FRONT_140PX, "front_90px.png"),
|
||||||
|
FRONT_160PX(HEALTHBAR_DEFAULT_FRONT_160PX, "front_90px.png");
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
private final int spriteId;
|
||||||
|
|
||||||
|
private final String fileName;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
private int padding = 1;
|
||||||
|
|
||||||
|
private static final Map<Integer, HealthbarOverride> MAP;
|
||||||
|
|
||||||
|
static
|
||||||
|
{
|
||||||
|
ImmutableMap.Builder<Integer, HealthbarOverride> builder = new ImmutableMap.Builder<>();
|
||||||
|
|
||||||
|
for (HealthbarOverride override : values())
|
||||||
|
{
|
||||||
|
builder.put(override.spriteId, override);
|
||||||
|
}
|
||||||
|
|
||||||
|
MAP = builder.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
static HealthbarOverride get(int spriteID)
|
||||||
|
{
|
||||||
|
return MAP.get(spriteID);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getFileName()
|
||||||
|
{
|
||||||
|
return Skin.AROUND_2010.toString() + "/healthbar/" + this.fileName;
|
||||||
|
}
|
||||||
|
}
|
||||||
+18
-32
@@ -32,8 +32,6 @@ import javax.inject.Inject;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.HealthBar;
|
import net.runelite.api.HealthBar;
|
||||||
import net.runelite.api.HealthBarOverride;
|
|
||||||
import net.runelite.api.NodeCache;
|
|
||||||
import net.runelite.api.SpriteID;
|
import net.runelite.api.SpriteID;
|
||||||
import net.runelite.api.Sprite;
|
import net.runelite.api.Sprite;
|
||||||
import net.runelite.api.events.BeforeMenuRender;
|
import net.runelite.api.events.BeforeMenuRender;
|
||||||
@@ -71,8 +69,6 @@ public class InterfaceStylesPlugin extends Plugin
|
|||||||
@Inject
|
@Inject
|
||||||
private SpriteManager spriteManager;
|
private SpriteManager spriteManager;
|
||||||
|
|
||||||
private HealthBarOverride healthBarOverride;
|
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
InterfaceStylesConfig provideConfig(ConfigManager configManager)
|
InterfaceStylesConfig provideConfig(ConfigManager configManager)
|
||||||
{
|
{
|
||||||
@@ -92,10 +88,7 @@ public class InterfaceStylesPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
restoreWidgetDimensions();
|
restoreWidgetDimensions();
|
||||||
removeGameframe();
|
removeGameframe();
|
||||||
healthBarOverride = null;
|
restoreHealthBars();
|
||||||
client.setHealthBarOverride(null);
|
|
||||||
NodeCache heathBarCache = client.getHealthBarCache();
|
|
||||||
heathBarCache.reset(); // invalidate healthbar cache so padding resets
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,19 +110,19 @@ public class InterfaceStylesPlugin extends Plugin
|
|||||||
@Subscribe
|
@Subscribe
|
||||||
public void onPostHealthBar(PostHealthBar postHealthBar)
|
public void onPostHealthBar(PostHealthBar postHealthBar)
|
||||||
{
|
{
|
||||||
if (healthBarOverride == null || !config.hdHealthBars())
|
if (!config.hdHealthBars())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
HealthBar healthBar = postHealthBar.getHealthBar();
|
HealthBar healthBar = postHealthBar.getHealthBar();
|
||||||
Sprite frontSprite = healthBar.getHealthBarFrontSprite();
|
HealthbarOverride override = HealthbarOverride.get(healthBar.getHealthBarFrontSpriteId());
|
||||||
|
|
||||||
// Check if this is the health bar we are replacing
|
// Check if this is the health bar we are replacing
|
||||||
if (frontSprite == healthBarOverride.getFrontSprite() || frontSprite == healthBarOverride.getFrontSpriteLarge())
|
if (override != null)
|
||||||
{
|
{
|
||||||
// Increase padding to show some more green at very low hp percentages
|
// Increase padding to show some more green at very low hp percentages
|
||||||
healthBar.setPadding(1);
|
healthBar.setPadding(override.getPadding());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,7 +155,7 @@ public class InterfaceStylesPlugin extends Plugin
|
|||||||
if (skin == config.skin())
|
if (skin == config.skin())
|
||||||
{
|
{
|
||||||
String file = config.skin().toString() + "/" + spriteOverride.getSpriteID() + ".png";
|
String file = config.skin().toString() + "/" + spriteOverride.getSpriteID() + ".png";
|
||||||
Sprite spritePixels = getFileSprite(file);
|
Sprite spritePixels = getFileSpritePixels(file);
|
||||||
|
|
||||||
if (spriteOverride.getSpriteID() == SpriteID.COMPASS_TEXTURE)
|
if (spriteOverride.getSpriteID() == SpriteID.COMPASS_TEXTURE)
|
||||||
{
|
{
|
||||||
@@ -194,7 +187,7 @@ public class InterfaceStylesPlugin extends Plugin
|
|||||||
if (widgetOverride.getSkin() == config.skin())
|
if (widgetOverride.getSkin() == config.skin())
|
||||||
{
|
{
|
||||||
String file = config.skin().toString() + "/widget/" + widgetOverride.getName() + ".png";
|
String file = config.skin().toString() + "/widget/" + widgetOverride.getName() + ".png";
|
||||||
Sprite spritePixels = getFileSprite(file);
|
Sprite spritePixels = getFileSpritePixels(file);
|
||||||
|
|
||||||
if (spritePixels != null)
|
if (spritePixels != null)
|
||||||
{
|
{
|
||||||
@@ -218,7 +211,7 @@ public class InterfaceStylesPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Sprite getFileSprite(String file)
|
private Sprite getFileSpritePixels(String file)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -272,31 +265,24 @@ public class InterfaceStylesPlugin extends Plugin
|
|||||||
|
|
||||||
private void overrideHealthBars()
|
private void overrideHealthBars()
|
||||||
{
|
{
|
||||||
// Reset health bar cache to reset applied padding
|
|
||||||
NodeCache healthBarCache = client.getHealthBarCache();
|
|
||||||
healthBarCache.reset();
|
|
||||||
|
|
||||||
if (config.hdHealthBars())
|
if (config.hdHealthBars())
|
||||||
{
|
{
|
||||||
String fileBase = Skin.AROUND_2010.toString() + "/healthbar/";
|
spriteManager.addSpriteOverrides(HealthbarOverride.values());
|
||||||
|
// Reset health bar caches to apply the override
|
||||||
Sprite frontSprite = getFileSprite(fileBase + "front.png");
|
clientThread.invokeLater(client::resetHealthBarCaches);
|
||||||
Sprite backSprite = getFileSprite(fileBase + "back.png");
|
|
||||||
|
|
||||||
Sprite frontSpriteLarge = getFileSprite(fileBase + "front_large.png");
|
|
||||||
Sprite backSpriteLarge = getFileSprite(fileBase + "back_large.png");
|
|
||||||
|
|
||||||
HealthBarOverride override = new HealthBarOverride(frontSprite, backSprite, frontSpriteLarge, backSpriteLarge);
|
|
||||||
healthBarOverride = override;
|
|
||||||
client.setHealthBarOverride(override);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
healthBarOverride = null;
|
restoreHealthBars();
|
||||||
client.setHealthBarOverride(null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void restoreHealthBars()
|
||||||
|
{
|
||||||
|
spriteManager.removeSpriteOverrides(HealthbarOverride.values());
|
||||||
|
clientThread.invokeLater(client::resetHealthBarCaches);
|
||||||
|
}
|
||||||
|
|
||||||
private void restoreWidgetDimensions()
|
private void restoreWidgetDimensions()
|
||||||
{
|
{
|
||||||
for (WidgetOffset widgetOffset : WidgetOffset.values())
|
for (WidgetOffset widgetOffset : WidgetOffset.values())
|
||||||
|
|||||||
+12
@@ -27,6 +27,7 @@ package net.runelite.client.plugins.inventorygrid;
|
|||||||
import net.runelite.client.config.Config;
|
import net.runelite.client.config.Config;
|
||||||
import net.runelite.client.config.ConfigGroup;
|
import net.runelite.client.config.ConfigGroup;
|
||||||
import net.runelite.client.config.ConfigItem;
|
import net.runelite.client.config.ConfigItem;
|
||||||
|
import net.runelite.client.config.Range;
|
||||||
|
|
||||||
@ConfigGroup("inventorygrid")
|
@ConfigGroup("inventorygrid")
|
||||||
public interface InventoryGridConfig extends Config
|
public interface InventoryGridConfig extends Config
|
||||||
@@ -60,4 +61,15 @@ public interface InventoryGridConfig extends Config
|
|||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "dragDelay",
|
||||||
|
name = "Drag Delay",
|
||||||
|
description = "Time in ms to wait after item press before showing grid"
|
||||||
|
)
|
||||||
|
@Range(min = 100)
|
||||||
|
default int dragDelay()
|
||||||
|
{
|
||||||
|
return 100;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -34,6 +34,7 @@ import java.awt.Point;
|
|||||||
import java.awt.Rectangle;
|
import java.awt.Rectangle;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
|
import net.runelite.api.Constants;
|
||||||
import net.runelite.api.widgets.Widget;
|
import net.runelite.api.widgets.Widget;
|
||||||
import net.runelite.api.widgets.WidgetInfo;
|
import net.runelite.api.widgets.WidgetInfo;
|
||||||
import net.runelite.api.widgets.WidgetItem;
|
import net.runelite.api.widgets.WidgetItem;
|
||||||
@@ -45,7 +46,6 @@ import net.runelite.client.ui.overlay.OverlayPosition;
|
|||||||
class InventoryGridOverlay extends Overlay
|
class InventoryGridOverlay extends Overlay
|
||||||
{
|
{
|
||||||
private static final int INVENTORY_SIZE = 28;
|
private static final int INVENTORY_SIZE = 28;
|
||||||
private static final int DRAG_DELAY = 5;
|
|
||||||
|
|
||||||
private static final Color HIGHLIGHT = new Color(0, 255, 0, 45);
|
private static final Color HIGHLIGHT = new Color(0, 255, 0, 45);
|
||||||
private static final Color GRID = new Color(255, 255, 255, 45);
|
private static final Color GRID = new Color(255, 255, 255, 45);
|
||||||
@@ -72,7 +72,7 @@ class InventoryGridOverlay extends Overlay
|
|||||||
final Widget inventoryWidget = client.getWidget(WidgetInfo.INVENTORY);
|
final Widget inventoryWidget = client.getWidget(WidgetInfo.INVENTORY);
|
||||||
|
|
||||||
if (if1DraggingWidget == null || if1DraggingWidget != inventoryWidget
|
if (if1DraggingWidget == null || if1DraggingWidget != inventoryWidget
|
||||||
|| client.getItemPressedDuration() < DRAG_DELAY)
|
|| client.getItemPressedDuration() < config.dragDelay() / Constants.CLIENT_TICK_LENGTH)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-9
@@ -32,6 +32,7 @@ import java.awt.image.BufferedImage;
|
|||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.swing.JOptionPane;
|
import javax.swing.JOptionPane;
|
||||||
@@ -102,7 +103,7 @@ public class InventorySetupPlugin extends Plugin
|
|||||||
|
|
||||||
private InventorySetupPluginPanel panel;
|
private InventorySetupPluginPanel panel;
|
||||||
|
|
||||||
private HashMap<String, InventorySetup> inventorySetups;
|
private Map<String, InventorySetup> inventorySetups = new HashMap<>();
|
||||||
|
|
||||||
private NavigationButton navButton;
|
private NavigationButton navButton;
|
||||||
|
|
||||||
@@ -270,7 +271,7 @@ public class InventorySetupPlugin extends Plugin
|
|||||||
final String json = configManager.getConfiguration(CONFIG_GROUP, CONFIG_KEY);
|
final String json = configManager.getConfiguration(CONFIG_GROUP, CONFIG_KEY);
|
||||||
if (json == null || json.isEmpty())
|
if (json == null || json.isEmpty())
|
||||||
{
|
{
|
||||||
inventorySetups = new HashMap<>();
|
inventorySetups.clear();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -280,7 +281,8 @@ public class InventorySetupPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
|
|
||||||
}.getType();
|
}.getType();
|
||||||
inventorySetups = gson.fromJson(json, type);
|
inventorySetups.clear();
|
||||||
|
inventorySetups.putAll(gson.fromJson(json, type));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (final String key : inventorySetups.keySet())
|
for (final String key : inventorySetups.keySet())
|
||||||
@@ -288,7 +290,6 @@ public class InventorySetupPlugin extends Plugin
|
|||||||
panel.addInventorySetup(key);
|
panel.addInventorySetup(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
highlightDifference = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
@@ -333,17 +334,20 @@ public class InventorySetupPlugin extends Plugin
|
|||||||
// set the highlighting off if login screen shows up
|
// set the highlighting off if login screen shows up
|
||||||
case LOGIN_SCREEN:
|
case LOGIN_SCREEN:
|
||||||
highlightDifference = false;
|
highlightDifference = false;
|
||||||
final String setupName = panel.getSelectedInventorySetup();
|
|
||||||
if (!setupName.isEmpty())
|
|
||||||
{
|
|
||||||
panel.setCurrentInventorySetup(setupName);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// set highlighting
|
// set highlighting
|
||||||
case LOGGED_IN:
|
case LOGGED_IN:
|
||||||
highlightDifference = config.getHighlightDifferences();
|
highlightDifference = config.getHighlightDifferences();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
final String setupName = panel.getSelectedInventorySetup();
|
||||||
|
if (!setupName.isEmpty())
|
||||||
|
{
|
||||||
|
panel.setCurrentInventorySetup(setupName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-3
@@ -34,12 +34,14 @@ import java.awt.Rectangle;
|
|||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
|
import net.runelite.api.Constants;
|
||||||
import net.runelite.api.InventoryID;
|
import net.runelite.api.InventoryID;
|
||||||
import net.runelite.api.Item;
|
import net.runelite.api.Item;
|
||||||
import net.runelite.api.ItemDefinition;
|
import net.runelite.api.ItemDefinition;
|
||||||
import net.runelite.api.ItemContainer;
|
import net.runelite.api.ItemContainer;
|
||||||
import net.runelite.api.VarClientInt;
|
import net.runelite.api.VarClientInt;
|
||||||
import net.runelite.client.game.ItemManager;
|
import net.runelite.client.game.ItemManager;
|
||||||
|
import static net.runelite.client.plugins.lootingbagviewer.LootingBagViewerOverlay.PLACEHOLDER_WIDTH;
|
||||||
import net.runelite.client.ui.overlay.Overlay;
|
import net.runelite.client.ui.overlay.Overlay;
|
||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
import net.runelite.client.ui.overlay.components.ComponentConstants;
|
import net.runelite.client.ui.overlay.components.ComponentConstants;
|
||||||
@@ -51,9 +53,8 @@ import net.runelite.client.ui.overlay.components.TitleComponent;
|
|||||||
class InventoryViewerOverlay extends Overlay
|
class InventoryViewerOverlay extends Overlay
|
||||||
{
|
{
|
||||||
private static final int INVENTORY_SIZE = 28;
|
private static final int INVENTORY_SIZE = 28;
|
||||||
private static final int PLACEHOLDER_WIDTH = 36;
|
private static final ImageComponent PLACEHOLDER_IMAGE = new ImageComponent(
|
||||||
private static final int PLACEHOLDER_HEIGHT = 32;
|
new BufferedImage(Constants.ITEM_SPRITE_WIDTH, Constants.ITEM_SPRITE_HEIGHT, BufferedImage.TYPE_4BYTE_ABGR));
|
||||||
private static final ImageComponent PLACEHOLDER_IMAGE = new ImageComponent(new BufferedImage(PLACEHOLDER_WIDTH, PLACEHOLDER_HEIGHT, BufferedImage.TYPE_4BYTE_ABGR));
|
|
||||||
|
|
||||||
private final Client client;
|
private final Client client;
|
||||||
private final ItemManager itemManager;
|
private final ItemManager itemManager;
|
||||||
|
|||||||
+7
@@ -35,6 +35,8 @@ import net.runelite.client.ui.overlay.Overlay;
|
|||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
import net.runelite.client.ui.overlay.components.ImageComponent;
|
import net.runelite.client.ui.overlay.components.ImageComponent;
|
||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
|
import net.runelite.client.ui.overlay.components.table.TableAlignment;
|
||||||
|
import net.runelite.client.ui.overlay.components.table.TableComponent;
|
||||||
|
|
||||||
class ItemRecoilOverlay extends Overlay
|
class ItemRecoilOverlay extends Overlay
|
||||||
{
|
{
|
||||||
@@ -55,6 +57,9 @@ class ItemRecoilOverlay extends Overlay
|
|||||||
@Override
|
@Override
|
||||||
public Dimension render(Graphics2D graphics)
|
public Dimension render(Graphics2D graphics)
|
||||||
{
|
{
|
||||||
|
TableComponent tableComponent = new TableComponent();
|
||||||
|
tableComponent.setColumnAlignments(TableAlignment.LEFT, TableAlignment.RIGHT);
|
||||||
|
|
||||||
this.imagePanelComponent.getChildren().clear();
|
this.imagePanelComponent.getChildren().clear();
|
||||||
if (config.showrecoil())
|
if (config.showrecoil())
|
||||||
{
|
{
|
||||||
@@ -64,6 +69,8 @@ class ItemRecoilOverlay extends Overlay
|
|||||||
imagePanelComponent.setBackgroundColor(plugin
|
imagePanelComponent.setBackgroundColor(plugin
|
||||||
.isRingOfRecoilEquipped() ? ACTIVATED_BACKGROUND_COLOR : NOT_ACTIVATED_BACKGROUND_COLOR);
|
.isRingOfRecoilEquipped() ? ACTIVATED_BACKGROUND_COLOR : NOT_ACTIVATED_BACKGROUND_COLOR);
|
||||||
imagePanelComponent.getChildren().add(new ImageComponent(recoilImage));
|
imagePanelComponent.getChildren().add(new ImageComponent(recoilImage));
|
||||||
|
|
||||||
|
imagePanelComponent.getChildren().add(tableComponent);
|
||||||
return imagePanelComponent.render(graphics);
|
return imagePanelComponent.render(graphics);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-2
@@ -29,6 +29,7 @@ import java.awt.Dimension;
|
|||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
|
import net.runelite.api.Constants;
|
||||||
import net.runelite.api.InventoryID;
|
import net.runelite.api.InventoryID;
|
||||||
import net.runelite.api.Item;
|
import net.runelite.api.Item;
|
||||||
import net.runelite.api.ItemDefinition;
|
import net.runelite.api.ItemDefinition;
|
||||||
@@ -194,6 +195,7 @@ class ItemPricesOverlay extends Overlay
|
|||||||
int gePrice = 0;
|
int gePrice = 0;
|
||||||
int haPrice = 0;
|
int haPrice = 0;
|
||||||
int haProfit = 0;
|
int haProfit = 0;
|
||||||
|
final int itemHaPrice = Math.round(itemDef.getPrice() * Constants.HIGH_ALCHEMY_MULTIPLIER);
|
||||||
|
|
||||||
if (config.showGEPrice())
|
if (config.showGEPrice())
|
||||||
{
|
{
|
||||||
@@ -203,9 +205,9 @@ class ItemPricesOverlay extends Overlay
|
|||||||
{
|
{
|
||||||
haPrice = itemManager.getAlchValue(id);
|
haPrice = itemManager.getAlchValue(id);
|
||||||
}
|
}
|
||||||
if (gePrice > 0 && haPrice > 0 && config.showAlchProfit())
|
if (gePrice > 0 && itemHaPrice > 0 && config.showAlchProfit())
|
||||||
{
|
{
|
||||||
haProfit = calculateHAProfit(haPrice, gePrice);
|
haProfit = calculateHAProfit(itemHaPrice, gePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gePrice > 0 || haPrice > 0)
|
if (gePrice > 0 || haPrice > 0)
|
||||||
|
|||||||
+65
@@ -0,0 +1,65 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2018, TheStonedTurtle <https://github.com/TheStonedTurtle>
|
||||||
|
* 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.plugins.itemskeptondeath;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableMap;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
import net.runelite.api.ItemID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Certain Items receive a white outline by Jagex as they are always lost on death. This is sometimes incorrectly
|
||||||
|
* added to Items by Jagex as the item is actually kept in non-pvp areas of the game, such as the Rune Pouch.
|
||||||
|
*
|
||||||
|
* The white outline will be added to these items when they are lost on death.
|
||||||
|
*/
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Getter
|
||||||
|
enum AlwaysLostItem
|
||||||
|
{
|
||||||
|
RUNE_POUCH(ItemID.RUNE_POUCH, true),
|
||||||
|
LOOTING_BAG(ItemID.LOOTING_BAG, false),
|
||||||
|
CLUE_BOX(ItemID.CLUE_BOX, false);
|
||||||
|
|
||||||
|
private final int itemID;
|
||||||
|
private final boolean keptOutsideOfWilderness;
|
||||||
|
|
||||||
|
private static final ImmutableMap<Integer, AlwaysLostItem> ID_MAP;
|
||||||
|
|
||||||
|
static
|
||||||
|
{
|
||||||
|
final ImmutableMap.Builder<Integer, AlwaysLostItem> map = ImmutableMap.builder();
|
||||||
|
for (final AlwaysLostItem p : values())
|
||||||
|
{
|
||||||
|
map.put(p.itemID, p);
|
||||||
|
}
|
||||||
|
ID_MAP = map.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
static AlwaysLostItem getByItemID(final int itemID)
|
||||||
|
{
|
||||||
|
return ID_MAP.get(itemID);
|
||||||
|
}
|
||||||
|
}
|
||||||
+111
@@ -0,0 +1,111 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2018, TheStonedTurtle <https://github.com/TheStonedTurtle>
|
||||||
|
* 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.plugins.itemskeptondeath;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableSet;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import net.runelite.api.ItemID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Some non tradeable items are kept on death inside low level wilderness (1-20) but are turned into a broken variant.
|
||||||
|
*
|
||||||
|
* The non-broken variant will be shown inside the interface.
|
||||||
|
*/
|
||||||
|
@AllArgsConstructor
|
||||||
|
enum BrokenOnDeathItem
|
||||||
|
{
|
||||||
|
// Capes
|
||||||
|
FIRE_CAPE(ItemID.FIRE_CAPE),
|
||||||
|
FIRE_MAX_CAPE(ItemID.FIRE_MAX_CAPE),
|
||||||
|
INFERNAL_CAPE(ItemID.INFERNAL_CAPE),
|
||||||
|
INFERNAL_MAX_CAPE(ItemID.INFERNAL_MAX_CAPE),
|
||||||
|
AVAS_ASSEMBLER(ItemID.AVAS_ASSEMBLER),
|
||||||
|
ASSEMBLER_MAX_CAPE(ItemID.ASSEMBLER_MAX_CAPE),
|
||||||
|
|
||||||
|
// Defenders
|
||||||
|
BRONZE_DEFENDER(ItemID.BRONZE_DEFENDER),
|
||||||
|
IRON_DEFENDER(ItemID.IRON_DEFENDER),
|
||||||
|
STEEL_DEFENDER(ItemID.STEEL_DEFENDER),
|
||||||
|
BLACK_DEFENDER(ItemID.BLACK_DEFENDER),
|
||||||
|
MITHRIL_DEFENDER(ItemID.MITHRIL_DEFENDER),
|
||||||
|
ADAMANT_DEFENDER(ItemID.ADAMANT_DEFENDER),
|
||||||
|
RUNE_DEFENDER(ItemID.RUNE_DEFENDER),
|
||||||
|
DRAGON_DEFENDER(ItemID.DRAGON_DEFENDER),
|
||||||
|
AVERNIC_DEFENDER(ItemID.AVERNIC_DEFENDER),
|
||||||
|
|
||||||
|
// Void
|
||||||
|
VOID_MAGE_HELM(ItemID.VOID_MAGE_HELM),
|
||||||
|
VOID_RANGER_HELM(ItemID.VOID_RANGER_HELM),
|
||||||
|
VOID_MELEE_HELM(ItemID.VOID_MELEE_HELM),
|
||||||
|
VOID_KNIGHT_TOP(ItemID.VOID_KNIGHT_TOP),
|
||||||
|
VOID_KNIGHT_ROBE(ItemID.VOID_KNIGHT_ROBE),
|
||||||
|
VOID_KNIGHT_GLOVES(ItemID.VOID_KNIGHT_GLOVES),
|
||||||
|
VOID_KNIGHT_MACE(ItemID.VOID_KNIGHT_MACE),
|
||||||
|
ELITE_VOID_TOP(ItemID.ELITE_VOID_TOP),
|
||||||
|
ELITE_VOID_ROBE(ItemID.ELITE_VOID_ROBE),
|
||||||
|
|
||||||
|
// Barb Assault
|
||||||
|
FIGHTER_HAT(ItemID.FIGHTER_HAT),
|
||||||
|
RANGER_HAT(ItemID.RANGER_HAT),
|
||||||
|
HEALER_HAT(ItemID.HEALER_HAT),
|
||||||
|
FIGHTER_TORSO(ItemID.FIGHTER_TORSO),
|
||||||
|
PENANCE_SKIRT(ItemID.PENANCE_SKIRT),
|
||||||
|
|
||||||
|
// Castle Wars
|
||||||
|
SARADOMIN_HALO(ItemID.SARADOMIN_HALO),
|
||||||
|
ZAMORAK_HALO(ItemID.ZAMORAK_HALO),
|
||||||
|
GUTHIX_HALO(ItemID.GUTHIX_HALO),
|
||||||
|
DECORATIVE_MAGIC_HAT(ItemID.DECORATIVE_ARMOUR_11898),
|
||||||
|
DECORATIVE_MAGIC_ROBE_TOP(ItemID.DECORATIVE_ARMOUR_11896),
|
||||||
|
DECORATIVE_MAGIC_ROBE_LEGS(ItemID.DECORATIVE_ARMOUR_11897),
|
||||||
|
DECORATIVE_RANGE_TOP(ItemID.DECORATIVE_ARMOUR_11899),
|
||||||
|
DECORATIVE_RANGE_BOTTOM(ItemID.DECORATIVE_ARMOUR_11900),
|
||||||
|
DECORATIVE_RANGE_QUIVER(ItemID.DECORATIVE_ARMOUR_11901),
|
||||||
|
GOLD_DECORATIVE_HELM(ItemID.DECORATIVE_HELM_4511),
|
||||||
|
GOLD_DECORATIVE_BODY(ItemID.DECORATIVE_ARMOUR_4509),
|
||||||
|
GOLD_DECORATIVE_LEGS(ItemID.DECORATIVE_ARMOUR_4510),
|
||||||
|
GOLD_DECORATIVE_SKIRT(ItemID.DECORATIVE_ARMOUR_11895),
|
||||||
|
GOLD_DECORATIVE_SHIELD(ItemID.DECORATIVE_SHIELD_4512),
|
||||||
|
GOLD_DECORATIVE_SWORD(ItemID.DECORATIVE_SWORD_4508);
|
||||||
|
|
||||||
|
private final int itemID;
|
||||||
|
|
||||||
|
private static final ImmutableSet<Integer> ID_SET;
|
||||||
|
|
||||||
|
static
|
||||||
|
{
|
||||||
|
final ImmutableSet.Builder<Integer> set = new ImmutableSet.Builder<>();
|
||||||
|
for (final BrokenOnDeathItem p : values())
|
||||||
|
{
|
||||||
|
set.add(p.itemID);
|
||||||
|
}
|
||||||
|
ID_SET = set.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
static boolean isBrokenOnDeath(final int itemID)
|
||||||
|
{
|
||||||
|
return ID_SET.contains(itemID);
|
||||||
|
}
|
||||||
|
}
|
||||||
+91
@@ -0,0 +1,91 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2019, Adam <Adam@sigterm.info>
|
||||||
|
* Copyright (c) 2019, TheStonedTurtle <https://github.com/TheStonedTurtle>
|
||||||
|
* 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.plugins.itemskeptondeath;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
import net.runelite.api.ItemID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Some items have a fixed price that is added to its default value when calculating death prices.
|
||||||
|
* These are typically imbued items, such as Berserker ring (i), to help it protect over the non-imbued variants.
|
||||||
|
*/
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Getter
|
||||||
|
enum FixedPriceItem
|
||||||
|
{
|
||||||
|
IMBUED_BLACK_MASK_I(ItemID.BLACK_MASK_I, 5000),
|
||||||
|
IMBUED_BLACK_MASK_1_I(ItemID.BLACK_MASK_1_I, 5000),
|
||||||
|
IMBUED_BLACK_MASK_2_I(ItemID.BLACK_MASK_2_I, 5000),
|
||||||
|
IMBUED_BLACK_MASK_3_I(ItemID.BLACK_MASK_3_I, 5000),
|
||||||
|
IMBUED_BLACK_MASK_4_I(ItemID.BLACK_MASK_4_I, 5000),
|
||||||
|
IMBUED_BLACK_MASK_5_I(ItemID.BLACK_MASK_5_I, 5000),
|
||||||
|
IMBUED_BLACK_MASK_6_I(ItemID.BLACK_MASK_6_I, 5000),
|
||||||
|
IMBUED_BLACK_MASK_7_I(ItemID.BLACK_MASK_7_I, 5000),
|
||||||
|
IMBUED_BLACK_MASK_8_I(ItemID.BLACK_MASK_8_I, 5000),
|
||||||
|
IMBUED_BLACK_MASK_9_I(ItemID.BLACK_MASK_9_I, 5000),
|
||||||
|
IMBUED_BLACK_MASK_10_I(ItemID.BLACK_MASK_10_I, 5000),
|
||||||
|
|
||||||
|
IMBUED_SLAYER_HELMET_I(ItemID.SLAYER_HELMET_I, 1000),
|
||||||
|
IMBUED_BLACK_SLAYER_HELMET_I(ItemID.BLACK_SLAYER_HELMET_I, 1000),
|
||||||
|
IMBUED_PURPLE_SLAYER_HELMET_I(ItemID.PURPLE_SLAYER_HELMET_I, 1000),
|
||||||
|
IMBUED_RED_SLAYER_HELMET_I(ItemID.RED_SLAYER_HELMET_I, 1000),
|
||||||
|
IMBUED_GREEN_SLAYER_HELMET_I(ItemID.GREEN_SLAYER_HELMET_I, 1000),
|
||||||
|
IMBUED_TURQUOISE_SLAYER_HELMET_I(ItemID.TURQUOISE_SLAYER_HELMET_I, 1000),
|
||||||
|
IMBUED_HYDRA_SLAYER_HELMET_I(ItemID.HYDRA_SLAYER_HELMET_I, 1000),
|
||||||
|
|
||||||
|
IMBUED_ARCHERS_RING_I(ItemID.ARCHERS_RING_I, 2000),
|
||||||
|
IMBUED_BERSERKER_RING_I(ItemID.BERSERKER_RING_I, 2000),
|
||||||
|
IMBUED_SEERS_RING_I(ItemID.SEERS_RING_I, 2000),
|
||||||
|
|
||||||
|
IMBUED_RING_OF_THE_GODS_I(ItemID.RING_OF_THE_GODS_I, 2000),
|
||||||
|
IMBUED_TREASONOUS_RING_I(ItemID.TREASONOUS_RING_I, 2000),
|
||||||
|
IMBUED_TYRANNICAL_RING_I(ItemID.TYRANNICAL_RING_I, 2000);
|
||||||
|
|
||||||
|
private final int itemId;
|
||||||
|
private final int offset;
|
||||||
|
|
||||||
|
private static final Map<Integer, FixedPriceItem> FIXED_ITEMS;
|
||||||
|
|
||||||
|
static
|
||||||
|
{
|
||||||
|
final ImmutableMap.Builder<Integer, FixedPriceItem> map = ImmutableMap.builder();
|
||||||
|
for (final FixedPriceItem p : values())
|
||||||
|
{
|
||||||
|
map.put(p.itemId, p);
|
||||||
|
}
|
||||||
|
FIXED_ITEMS = map.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
static FixedPriceItem find(int itemId)
|
||||||
|
{
|
||||||
|
return FIXED_ITEMS.get(itemId);
|
||||||
|
}
|
||||||
|
}
|
||||||
+610
@@ -0,0 +1,610 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2018, TheStonedTurtle <https://github.com/TheStonedTurtle>
|
||||||
|
* Copyright (c) 2019, Adam <Adam@sigterm.info>
|
||||||
|
* 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.plugins.itemskeptondeath;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.EnumSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.runelite.api.Client;
|
||||||
|
import net.runelite.api.Constants;
|
||||||
|
import net.runelite.api.FontID;
|
||||||
|
import net.runelite.api.InventoryID;
|
||||||
|
import net.runelite.api.Item;
|
||||||
|
import net.runelite.api.ItemDefinition;
|
||||||
|
import net.runelite.api.ItemContainer;
|
||||||
|
import net.runelite.api.ItemID;
|
||||||
|
import net.runelite.api.ScriptID;
|
||||||
|
import net.runelite.api.SkullIcon;
|
||||||
|
import net.runelite.api.SpriteID;
|
||||||
|
import net.runelite.api.Varbits;
|
||||||
|
import net.runelite.api.WorldType;
|
||||||
|
import net.runelite.api.events.ScriptCallbackEvent;
|
||||||
|
import net.runelite.api.vars.AccountType;
|
||||||
|
import net.runelite.api.widgets.Widget;
|
||||||
|
import net.runelite.api.widgets.WidgetInfo;
|
||||||
|
import net.runelite.api.widgets.WidgetType;
|
||||||
|
import net.runelite.client.eventbus.Subscribe;
|
||||||
|
import net.runelite.client.game.ItemManager;
|
||||||
|
import net.runelite.client.plugins.Plugin;
|
||||||
|
import net.runelite.client.plugins.PluginDescriptor;
|
||||||
|
import net.runelite.client.util.StackFormatter;
|
||||||
|
|
||||||
|
@PluginDescriptor(
|
||||||
|
name = "Items Kept on Death",
|
||||||
|
description = "Updates the Items Kept on Death interface to be more accurate",
|
||||||
|
enabledByDefault = false
|
||||||
|
)
|
||||||
|
@Slf4j
|
||||||
|
public class ItemsKeptOnDeathPlugin extends Plugin
|
||||||
|
{
|
||||||
|
private static final int DEEP_WILDY = 20;
|
||||||
|
private static final Pattern WILDERNESS_LEVEL_PATTERN = Pattern.compile("^Level: (\\d+).*");
|
||||||
|
|
||||||
|
// Item Container helpers
|
||||||
|
private static final int MAX_ROW_ITEMS = 8;
|
||||||
|
private static final int ITEM_X_OFFSET = 5;
|
||||||
|
private static final int ITEM_Y_OFFSET = 25;
|
||||||
|
private static final int ITEM_X_STRIDE = 38;
|
||||||
|
private static final int ITEM_Y_STRIDE = 38;
|
||||||
|
private static final int ORIGINAL_LOST_HEIGHT = 209;
|
||||||
|
private static final int ORIGINAL_LOST_Y = 107;
|
||||||
|
|
||||||
|
// Information panel text helpers
|
||||||
|
private static final String LINE_BREAK = "<br>";
|
||||||
|
private static final int INFORMATION_CONTAINER_HEIGHT = 183;
|
||||||
|
private static final int FONT_COLOR = 0xFF981F;
|
||||||
|
|
||||||
|
// Button Images
|
||||||
|
private static final int PROTECT_ITEM_SPRITE_ID = SpriteID.PRAYER_PROTECT_ITEM;
|
||||||
|
private static final int SKULL_SPRITE_ID = SpriteID.PLAYER_KILLER_SKULL_523;
|
||||||
|
private static final int SWORD_SPRITE_ID = SpriteID.MULTI_COMBAT_ZONE_CROSSED_SWORDS;
|
||||||
|
private static final int SKULL_2_SPRITE_ID = SpriteID.FIGHT_PITS_WINNER_SKULL_RED;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Client client;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private ItemManager itemManager;
|
||||||
|
|
||||||
|
private WidgetButton deepWildyButton;
|
||||||
|
private WidgetButton lowWildyButton;
|
||||||
|
|
||||||
|
private boolean isSkulled;
|
||||||
|
private boolean protectingItem;
|
||||||
|
private int wildyLevel;
|
||||||
|
|
||||||
|
@Subscribe
|
||||||
|
public void onScriptCallbackEvent(ScriptCallbackEvent event)
|
||||||
|
{
|
||||||
|
if (event.getEventName().equals("itemsKeptOnDeath"))
|
||||||
|
{
|
||||||
|
// The script in charge of building the Items Kept on Death interface has finished running.
|
||||||
|
// Make all necessary changes now.
|
||||||
|
|
||||||
|
// Players inside Safe Areas (POH/Clan Wars) or playing DMM see the default interface
|
||||||
|
if (isInSafeArea() || client.getWorldType().contains(WorldType.DEADMAN))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
syncSettings();
|
||||||
|
createWidgetButtons();
|
||||||
|
rebuildItemsKeptOnDeathInterface();
|
||||||
|
|
||||||
|
final Widget keptText = client.getWidget(WidgetInfo.ITEMS_KEPT_ON_DEATH_TEXT);
|
||||||
|
keptText.setText("Items you will keep on death:");
|
||||||
|
|
||||||
|
final Widget lostText = client.getWidget(WidgetInfo.ITEMS_LOST_ON_DEATH_TEXT);
|
||||||
|
lostText.setText("Items you will lose on death:");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sync user settings
|
||||||
|
private void syncSettings()
|
||||||
|
{
|
||||||
|
final SkullIcon s = client.getLocalPlayer().getSkullIcon();
|
||||||
|
// Ultimate iron men deaths are treated like they are always skulled
|
||||||
|
isSkulled = s == SkullIcon.SKULL || isUltimateIronman();
|
||||||
|
protectingItem = client.getVar(Varbits.PRAYER_PROTECT_ITEM) == 1;
|
||||||
|
syncWildernessLevel();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void syncWildernessLevel()
|
||||||
|
{
|
||||||
|
if (client.getVar(Varbits.IN_WILDERNESS) != 1)
|
||||||
|
{
|
||||||
|
// if they are in a PvP world and not in a safe zone act like in lvl 1 wildy
|
||||||
|
if (isInPvpWorld() && !isInPvPSafeZone())
|
||||||
|
{
|
||||||
|
wildyLevel = 1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
wildyLevel = -1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Widget wildernessLevelWidget = client.getWidget(WidgetInfo.PVP_WILDERNESS_LEVEL);
|
||||||
|
if (wildernessLevelWidget == null)
|
||||||
|
{
|
||||||
|
wildyLevel = -1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final String wildernessLevelText = wildernessLevelWidget.getText();
|
||||||
|
final Matcher m = WILDERNESS_LEVEL_PATTERN.matcher(wildernessLevelText);
|
||||||
|
if (!m.matches())
|
||||||
|
{
|
||||||
|
wildyLevel = -1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
wildyLevel = Integer.parseInt(m.group(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isInPvpWorld()
|
||||||
|
{
|
||||||
|
final EnumSet<WorldType> world = client.getWorldType();
|
||||||
|
return world.contains(WorldType.PVP);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isProtectItemAllowed()
|
||||||
|
{
|
||||||
|
return !client.getWorldType().contains(WorldType.HIGH_RISK)
|
||||||
|
&& !isUltimateIronman();
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isInPvPSafeZone()
|
||||||
|
{
|
||||||
|
final Widget w = client.getWidget(WidgetInfo.PVP_WORLD_SAFE_ZONE);
|
||||||
|
return w != null && !w.isHidden();
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isInSafeArea()
|
||||||
|
{
|
||||||
|
final Widget w = client.getWidget(WidgetInfo.ITEMS_KEPT_SAFE_ZONE_CONTAINER);
|
||||||
|
return w != null && !w.isHidden();
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isUltimateIronman()
|
||||||
|
{
|
||||||
|
return client.getAccountType() == AccountType.ULTIMATE_IRONMAN;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int getDefaultItemsKept()
|
||||||
|
{
|
||||||
|
final int count = isSkulled ? 0 : 3;
|
||||||
|
return count + (protectingItem ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void rebuildItemsKeptOnDeathInterface()
|
||||||
|
{
|
||||||
|
final Widget lost = client.getWidget(WidgetInfo.ITEMS_LOST_ON_DEATH_CONTAINER);
|
||||||
|
final Widget kept = client.getWidget(WidgetInfo.ITEMS_KEPT_ON_DEATH_CONTAINER);
|
||||||
|
if (lost == null || kept == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
lost.deleteAllChildren();
|
||||||
|
kept.deleteAllChildren();
|
||||||
|
|
||||||
|
// Grab all items on player
|
||||||
|
final ItemContainer inventory = client.getItemContainer(InventoryID.INVENTORY);
|
||||||
|
final Item[] inv = inventory == null ? new Item[0] : inventory.getItems();
|
||||||
|
final ItemContainer equipment = client.getItemContainer(InventoryID.EQUIPMENT);
|
||||||
|
final Item[] equip = equipment == null ? new Item[0] : equipment.getItems();
|
||||||
|
|
||||||
|
final List<Item> items = new ArrayList<>();
|
||||||
|
Collections.addAll(items, inv);
|
||||||
|
Collections.addAll(items, equip);
|
||||||
|
|
||||||
|
// Sort by item price
|
||||||
|
items.sort(Comparator.comparing(this::getDeathPrice).reversed());
|
||||||
|
|
||||||
|
boolean hasAlwaysLost = false;
|
||||||
|
int keepCount = getDefaultItemsKept();
|
||||||
|
|
||||||
|
final List<Widget> keptItems = new ArrayList<>();
|
||||||
|
final List<Widget> lostItems = new ArrayList<>();
|
||||||
|
for (final Item i : items)
|
||||||
|
{
|
||||||
|
final int id = i.getId();
|
||||||
|
int itemQuantity = i.getQuantity();
|
||||||
|
|
||||||
|
if (id == -1)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
final ItemDefinition c = itemManager.getItemDefinition(i.getId());
|
||||||
|
|
||||||
|
// Bonds are always kept and do not count towards the limit.
|
||||||
|
if (id == ItemID.OLD_SCHOOL_BOND || id == ItemID.OLD_SCHOOL_BOND_UNTRADEABLE)
|
||||||
|
{
|
||||||
|
final Widget itemWidget = createItemWidget(kept, itemQuantity, c);
|
||||||
|
itemWidget.setOnOpListener(ScriptID.DEATH_KEEP_ITEM_EXAMINE, 1, itemQuantity, c.getName());
|
||||||
|
keptItems.add(itemWidget);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Certain items are always lost on death and have a white outline which we need to add
|
||||||
|
final AlwaysLostItem alwaysLostItem = AlwaysLostItem.getByItemID(i.getId());
|
||||||
|
if (alwaysLostItem != null)
|
||||||
|
{
|
||||||
|
// Some of these items are kept on death (outside wildy), like the Rune pouch. Ignore them
|
||||||
|
if (!alwaysLostItem.isKeptOutsideOfWilderness() || wildyLevel > 0)
|
||||||
|
{
|
||||||
|
final Widget itemWidget = createItemWidget(lost, itemQuantity, c);
|
||||||
|
itemWidget.setOnOpListener(ScriptID.DEATH_KEEP_ITEM_EXAMINE, 0, itemQuantity, c.getName());
|
||||||
|
itemWidget.setBorderType(2); // white outline
|
||||||
|
lostItems.add(itemWidget);
|
||||||
|
hasAlwaysLost = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// the rune pouch is "always lost" but its kept outside of pvp, and does not count towards your keep count
|
||||||
|
}
|
||||||
|
else if (keepCount > 0)
|
||||||
|
{
|
||||||
|
// Keep most valuable items regardless of trade-ability.
|
||||||
|
if (i.getQuantity() > keepCount)
|
||||||
|
{
|
||||||
|
final Widget itemWidget = createItemWidget(kept, keepCount, c);
|
||||||
|
itemWidget.setOnOpListener(ScriptID.DEATH_KEEP_ITEM_EXAMINE, 1, keepCount, c.getName());
|
||||||
|
keptItems.add(itemWidget);
|
||||||
|
itemQuantity -= keepCount;
|
||||||
|
keepCount = 0;
|
||||||
|
// Fall through to below to drop the rest of the stack
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
final Widget itemWidget = createItemWidget(kept, itemQuantity, c);
|
||||||
|
itemWidget.setOnOpListener(ScriptID.DEATH_KEEP_ITEM_EXAMINE, 1, itemQuantity, c.getName());
|
||||||
|
keptItems.add(itemWidget);
|
||||||
|
keepCount -= i.getQuantity();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Items are kept if:
|
||||||
|
// 1) is not tradeable
|
||||||
|
// 2) is under the deep wilderness line
|
||||||
|
// 3) is outside of the wilderness, or item has a broken form
|
||||||
|
if (!Pets.isPet(id)
|
||||||
|
&& !isTradeable(c) && wildyLevel <= DEEP_WILDY
|
||||||
|
&& (wildyLevel <= 0 || BrokenOnDeathItem.isBrokenOnDeath(i.getId())))
|
||||||
|
{
|
||||||
|
final Widget itemWidget = createItemWidget(kept, itemQuantity, c);
|
||||||
|
itemWidget.setOnOpListener(ScriptID.DEATH_KEEP_ITEM_EXAMINE, 1, itemQuantity, c.getName());
|
||||||
|
keptItems.add(itemWidget);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Otherwise, the item is lost
|
||||||
|
final Widget itemWidget = createItemWidget(lost, itemQuantity, c);
|
||||||
|
itemWidget.setOnOpListener(ScriptID.DEATH_KEEP_ITEM_EXAMINE, 0, itemQuantity, c.getName());
|
||||||
|
lostItems.add(itemWidget);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int rows = (keptItems.size() + MAX_ROW_ITEMS - 1) / MAX_ROW_ITEMS;
|
||||||
|
// Show an empty row if there isn't anything
|
||||||
|
if (rows > 0)
|
||||||
|
{
|
||||||
|
// ORIGINAL_LOST_Y/HEIGHT includes a row already
|
||||||
|
rows--;
|
||||||
|
}
|
||||||
|
// Adjust items lost container position if new rows were added to kept items container
|
||||||
|
lost.setOriginalY(ORIGINAL_LOST_Y + (rows * ITEM_Y_STRIDE));
|
||||||
|
lost.setOriginalHeight(ORIGINAL_LOST_HEIGHT - (rows * ITEM_Y_STRIDE));
|
||||||
|
positionWidgetItems(kept, keptItems);
|
||||||
|
positionWidgetItems(lost, lostItems);
|
||||||
|
|
||||||
|
updateKeptWidgetInfoText(hasAlwaysLost, keptItems, lostItems);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the price of an item
|
||||||
|
* @param item
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private int getDeathPrice(Item item)
|
||||||
|
{
|
||||||
|
int itemId = item.getId();
|
||||||
|
// Unnote/unplaceholder item
|
||||||
|
int canonicalizedItemId = itemManager.canonicalize(itemId);
|
||||||
|
int exchangePrice = itemManager.getItemPrice(canonicalizedItemId);
|
||||||
|
if (exchangePrice == 0)
|
||||||
|
{
|
||||||
|
final ItemDefinition c1 = itemManager.getItemDefinition(canonicalizedItemId);
|
||||||
|
exchangePrice = c1.getPrice();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Some items have artifically applied death prices - such as ring imbues
|
||||||
|
// which are +2k over the non imbues. Check if the item has a fixed price.
|
||||||
|
FixedPriceItem fixedPrice = FixedPriceItem.find(canonicalizedItemId);
|
||||||
|
if (fixedPrice != null)
|
||||||
|
{
|
||||||
|
// Apply fixed price offset
|
||||||
|
exchangePrice += fixedPrice.getOffset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return exchangePrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Position a list of widget items in the parent container
|
||||||
|
*/
|
||||||
|
private static void positionWidgetItems(final Widget parent, final List<Widget> widgets)
|
||||||
|
{
|
||||||
|
int startingIndex = 0;
|
||||||
|
for (final Widget w : widgets)
|
||||||
|
{
|
||||||
|
final int originalX = ITEM_X_OFFSET + ((startingIndex % MAX_ROW_ITEMS) * ITEM_X_STRIDE);
|
||||||
|
final int originalY = ITEM_Y_OFFSET + ((startingIndex / MAX_ROW_ITEMS) * ITEM_Y_STRIDE);
|
||||||
|
|
||||||
|
w.setOriginalX(originalX);
|
||||||
|
w.setOriginalY(originalY);
|
||||||
|
w.revalidate();
|
||||||
|
|
||||||
|
++startingIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
parent.revalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the text to be displayed in the right side of the interface based on current selections
|
||||||
|
*/
|
||||||
|
private String getInfoText(final boolean hasAlwaysLost)
|
||||||
|
{
|
||||||
|
final StringBuilder sb = new StringBuilder();
|
||||||
|
if (isUltimateIronman())
|
||||||
|
{
|
||||||
|
sb.append("You are an <col=FFFFFF>UIM<col=FF981F> which means <col=FFFFFF>0<col=FF981F> items are protected by default");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sb.append("<col=FFFFFF>3<col=FF981F> items protected by default");
|
||||||
|
|
||||||
|
if (isSkulled)
|
||||||
|
{
|
||||||
|
sb.append(LINE_BREAK)
|
||||||
|
.append("<col=ff3333>PK skull<col=ff981f> -3");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (protectingItem)
|
||||||
|
{
|
||||||
|
sb.append(LINE_BREAK)
|
||||||
|
.append("<col=ff3333>Protect Item prayer<col=ff981f> +1");
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.append(LINE_BREAK)
|
||||||
|
.append(String.format("Actually protecting <col=FFFFFF>%s<col=FF981F> items", getDefaultItemsKept()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (wildyLevel < 1)
|
||||||
|
{
|
||||||
|
sb.append(LINE_BREAK)
|
||||||
|
.append(LINE_BREAK)
|
||||||
|
.append("You will have 1 hour to retrieve your lost items.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hasAlwaysLost)
|
||||||
|
{
|
||||||
|
sb.append(LINE_BREAK)
|
||||||
|
.append(LINE_BREAK)
|
||||||
|
.append("Items with a <col=ffffff>white outline<col=ff981f> will always be lost.");
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.append(LINE_BREAK)
|
||||||
|
.append(LINE_BREAK)
|
||||||
|
.append("Untradeable items are kept on death in non-pvp scenarios.");
|
||||||
|
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the information panel based on the item containers
|
||||||
|
*/
|
||||||
|
private void updateKeptWidgetInfoText(final boolean hasAlwaysLost, final List<Widget> keptItems, final List<Widget> lostItems)
|
||||||
|
{
|
||||||
|
// Add Information text widget
|
||||||
|
final Widget textWidget = findOrCreateInfoText();
|
||||||
|
textWidget.setText(getInfoText(hasAlwaysLost));
|
||||||
|
textWidget.revalidate();
|
||||||
|
|
||||||
|
// Update Items lost total value
|
||||||
|
long total = 0;
|
||||||
|
for (final Widget w : lostItems)
|
||||||
|
{
|
||||||
|
int cid = itemManager.canonicalize(w.getItemId());
|
||||||
|
int price = itemManager.getItemPrice(cid);
|
||||||
|
if (price == 0)
|
||||||
|
{
|
||||||
|
// Default to alch price
|
||||||
|
price = (int) (itemManager.getItemDefinition(cid).getPrice() * Constants.HIGH_ALCHEMY_MULTIPLIER);
|
||||||
|
}
|
||||||
|
total += (long) price * w.getItemQuantity();
|
||||||
|
}
|
||||||
|
final Widget lostValue = client.getWidget(WidgetInfo.ITEMS_LOST_VALUE);
|
||||||
|
lostValue.setText(StackFormatter.quantityToStackSize(total) + " gp");
|
||||||
|
|
||||||
|
// Update Max items kept
|
||||||
|
final Widget max = client.getWidget(WidgetInfo.ITEMS_KEPT_MAX);
|
||||||
|
final int keptQty = keptItems.stream().mapToInt(Widget::getItemQuantity).sum();
|
||||||
|
max.setText(String.format("<col=ffcc33>Max items kept on death:<br><br><col=ffcc33>~ %d ~", keptQty));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if an item is tradeable to another player
|
||||||
|
*
|
||||||
|
* @param c The item
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private static boolean isTradeable(final ItemDefinition c)
|
||||||
|
{
|
||||||
|
// ItemDefinition:: isTradeable checks if they are traded on the grand exchange, some items are trade-able but not via GE
|
||||||
|
if (c.getNote() != -1
|
||||||
|
|| c.getLinkedNoteId() != -1
|
||||||
|
|| c.isTradeable())
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int id = c.getId();
|
||||||
|
switch (id)
|
||||||
|
{
|
||||||
|
case ItemID.COINS_995:
|
||||||
|
case ItemID.PLATINUM_TOKEN:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Widget findOrCreateInfoText()
|
||||||
|
{
|
||||||
|
// The text was on the ITEMS_KEPT_INFORMATION_CONTAINER widget - but now that it is a layer,
|
||||||
|
// we need to create a child widget to hold the text
|
||||||
|
final Widget parent = client.getWidget(WidgetInfo.ITEMS_KEPT_INFORMATION_CONTAINER);
|
||||||
|
|
||||||
|
// Use the text TEXT widget if it already exists. It should be the last child of the parent
|
||||||
|
final Widget[] children = parent.getChildren();
|
||||||
|
if (children != null && children.length > 0)
|
||||||
|
{
|
||||||
|
final Widget w = parent.getChild(children.length - 1);
|
||||||
|
if (w != null && w.getType() == WidgetType.TEXT)
|
||||||
|
{
|
||||||
|
log.debug("Reusing old text widget");
|
||||||
|
return w;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
log.debug("Creating new text widget");
|
||||||
|
|
||||||
|
final Widget w = parent.createChild(-1, WidgetType.TEXT);
|
||||||
|
// Position under buttons taking remaining space
|
||||||
|
w.setOriginalWidth(parent.getOriginalWidth());
|
||||||
|
w.setOriginalHeight(INFORMATION_CONTAINER_HEIGHT - parent.getOriginalHeight());
|
||||||
|
w.setOriginalY(parent.getOriginalHeight());
|
||||||
|
|
||||||
|
w.setFontId(FontID.PLAIN_11);
|
||||||
|
w.setTextShadowed(true);
|
||||||
|
w.setTextColor(FONT_COLOR);
|
||||||
|
|
||||||
|
// Need to adjust parent height so text is visible
|
||||||
|
parent.setOriginalHeight(INFORMATION_CONTAINER_HEIGHT);
|
||||||
|
parent.revalidate();
|
||||||
|
|
||||||
|
return w;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createWidgetButtons()
|
||||||
|
{
|
||||||
|
final Widget parent = client.getWidget(WidgetInfo.ITEMS_KEPT_INFORMATION_CONTAINER);
|
||||||
|
// Change the information container from a text widget to a layer
|
||||||
|
parent.setType(WidgetType.LAYER);
|
||||||
|
parent.deleteAllChildren();
|
||||||
|
|
||||||
|
// Ultimate Iron men are always skulled and can't use the protect item prayer
|
||||||
|
WidgetButton protectItemButton = isProtectItemAllowed()
|
||||||
|
? new WidgetButton(parent, "Protect Item Prayer", PROTECT_ITEM_SPRITE_ID, protectingItem, selected ->
|
||||||
|
{
|
||||||
|
protectingItem = selected;
|
||||||
|
rebuildItemsKeptOnDeathInterface();
|
||||||
|
}) : null;
|
||||||
|
|
||||||
|
WidgetButton skulledButton = !isUltimateIronman()
|
||||||
|
? new WidgetButton(parent, "Skulled", SKULL_SPRITE_ID, isSkulled, selected ->
|
||||||
|
{
|
||||||
|
isSkulled = selected;
|
||||||
|
rebuildItemsKeptOnDeathInterface();
|
||||||
|
}) : null;
|
||||||
|
|
||||||
|
lowWildyButton = new WidgetButton(parent, "Low Wildy (1-20)", SWORD_SPRITE_ID, wildyLevel > 0 && wildyLevel <= DEEP_WILDY, selected ->
|
||||||
|
{
|
||||||
|
if (!selected)
|
||||||
|
{
|
||||||
|
syncWildernessLevel();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
wildyLevel = 1;
|
||||||
|
deepWildyButton.setSelected(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
rebuildItemsKeptOnDeathInterface();
|
||||||
|
});
|
||||||
|
|
||||||
|
deepWildyButton = new WidgetButton(parent, "Deep Wildy (21+)", SKULL_2_SPRITE_ID, wildyLevel > DEEP_WILDY, selected ->
|
||||||
|
{
|
||||||
|
if (!selected)
|
||||||
|
{
|
||||||
|
syncWildernessLevel();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
wildyLevel = DEEP_WILDY + 1;
|
||||||
|
lowWildyButton.setSelected(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
rebuildItemsKeptOnDeathInterface();
|
||||||
|
});
|
||||||
|
|
||||||
|
parent.revalidate();
|
||||||
|
WidgetButton.layoutButtonsToContainer(parent, protectItemButton, skulledButton, lowWildyButton, deepWildyButton);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an Item Widget for use inside the Kept on Death Interface
|
||||||
|
*
|
||||||
|
* @param qty Amount of item
|
||||||
|
* @param c Items Composition
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private static Widget createItemWidget(final Widget parent, final int qty, final ItemDefinition c)
|
||||||
|
{
|
||||||
|
final Widget itemWidget = parent.createChild(-1, WidgetType.GRAPHIC);
|
||||||
|
itemWidget.setItemId(c.getId());
|
||||||
|
itemWidget.setItemQuantity(qty);
|
||||||
|
itemWidget.setHasListener(true);
|
||||||
|
itemWidget.setOriginalWidth(Constants.ITEM_SPRITE_WIDTH);
|
||||||
|
itemWidget.setOriginalHeight(Constants.ITEM_SPRITE_HEIGHT);
|
||||||
|
itemWidget.setBorderType(1);
|
||||||
|
|
||||||
|
itemWidget.setAction(1, String.format("Item: <col=ff981f>%s", c.getName()));
|
||||||
|
|
||||||
|
return itemWidget;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2018 Abex
|
||||||
|
* 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.plugins.itemskeptondeath;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableSet;
|
||||||
|
import java.util.Set;
|
||||||
|
import static net.runelite.api.ItemID.*;
|
||||||
|
|
||||||
|
final class Pets
|
||||||
|
{
|
||||||
|
private Pets()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Set<Integer> PETS = ImmutableSet.of(
|
||||||
|
BABY_MOLE,
|
||||||
|
PRINCE_BLACK_DRAGON,
|
||||||
|
PET_CORPOREAL_CRITTER, PET_DARK_CORE,
|
||||||
|
JALNIBREK, TZREKZUK,
|
||||||
|
KALPHITE_PRINCESS, KALPHITE_PRINCESS_12654,
|
||||||
|
LIL_ZIK,
|
||||||
|
SKOTOS,
|
||||||
|
PET_SNAKELING, PET_SNAKELING_12939, PET_SNAKELING_12940,
|
||||||
|
TZREKJAD,
|
||||||
|
VORKI,
|
||||||
|
|
||||||
|
OLMLET, PUPPADILE, TEKTINY, VANGUARD, VASA_MINIRIO, VESPINA,
|
||||||
|
|
||||||
|
PET_DAGANNOTH_PRIME, PET_DAGANNOTH_REX, PET_DAGANNOTH_SUPREME,
|
||||||
|
|
||||||
|
PET_GENERAL_GRAARDOR, PET_KRIL_TSUTSAROTH, PET_KREEARRA, PET_ZILYANA,
|
||||||
|
|
||||||
|
ABYSSAL_ORPHAN,
|
||||||
|
HELLPUPPY,
|
||||||
|
PET_KRAKEN,
|
||||||
|
MIDNIGHT, NOON,
|
||||||
|
PET_SMOKE_DEVIL, PET_SMOKE_DEVIL_22663,
|
||||||
|
IKKLE_HYDRA, IKKLE_HYDRA_22748, IKKLE_HYDRA_22750, IKKLE_HYDRA_22752,
|
||||||
|
|
||||||
|
CALLISTO_CUB,
|
||||||
|
PET_CHAOS_ELEMENTAL,
|
||||||
|
SCORPIAS_OFFSPRING,
|
||||||
|
VENENATIS_SPIDERLING,
|
||||||
|
VETION_JR, VETION_JR_13180,
|
||||||
|
|
||||||
|
BABY_CHINCHOMPA, BABY_CHINCHOMPA_13324, BABY_CHINCHOMPA_13325, BABY_CHINCHOMPA_13326,
|
||||||
|
BEAVER,
|
||||||
|
GIANT_SQUIRREL,
|
||||||
|
HERON,
|
||||||
|
RIFT_GUARDIAN, RIFT_GUARDIAN_20667, RIFT_GUARDIAN_20669, RIFT_GUARDIAN_20671, RIFT_GUARDIAN_20673, RIFT_GUARDIAN_20675,
|
||||||
|
RIFT_GUARDIAN_20677, RIFT_GUARDIAN_20679, RIFT_GUARDIAN_20681, RIFT_GUARDIAN_20683, RIFT_GUARDIAN_20685, RIFT_GUARDIAN_20687,
|
||||||
|
RIFT_GUARDIAN_20689, RIFT_GUARDIAN_20691, RIFT_GUARDIAN_21990,
|
||||||
|
ROCK_GOLEM, ROCK_GOLEM_21187, ROCK_GOLEM_21188, ROCK_GOLEM_21189, ROCK_GOLEM_21190, ROCK_GOLEM_21191, ROCK_GOLEM_21192,
|
||||||
|
ROCK_GOLEM_21193, ROCK_GOLEM_21194, ROCK_GOLEM_21195, ROCK_GOLEM_21196, ROCK_GOLEM_21197, ROCK_GOLEM_21340, ROCK_GOLEM_21358,
|
||||||
|
ROCK_GOLEM_21359, ROCK_GOLEM_21360,
|
||||||
|
ROCKY,
|
||||||
|
TANGLEROOT,
|
||||||
|
|
||||||
|
PET_KITTEN, PET_KITTEN_1556, PET_KITTEN_1557, PET_KITTEN_1558, PET_KITTEN_1559, PET_KITTEN_1560,
|
||||||
|
PET_CAT, PET_CAT_1562, PET_CAT_1563, PET_CAT_1564, PET_CAT_1565, PET_CAT_1566, PET_CAT_1567, PET_CAT_1568, PET_CAT_1569,
|
||||||
|
PET_CAT_1570, PET_CAT_1571, PET_CAT_1572,
|
||||||
|
LAZY_CAT, LAZY_CAT_6550, LAZY_CAT_6551, LAZY_CAT_6552, LAZY_CAT_6553, LAZY_CAT_6554,
|
||||||
|
WILY_CAT, WILY_CAT_6556, WILY_CAT_6557, WILY_CAT_6558, WILY_CAT_6559, WILY_CAT_6560,
|
||||||
|
OVERGROWN_HELLCAT, HELL_CAT, HELLKITTEN, LAZY_HELL_CAT, WILY_HELLCAT,
|
||||||
|
|
||||||
|
BLOODHOUND,
|
||||||
|
CHOMPY_CHICK,
|
||||||
|
HERBI,
|
||||||
|
PET_PENANCE_QUEEN,
|
||||||
|
PHOENIX
|
||||||
|
);
|
||||||
|
|
||||||
|
public static boolean isPet(int id)
|
||||||
|
{
|
||||||
|
return PETS.contains(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
+163
@@ -0,0 +1,163 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2018, TheStonedTurtle <https://github.com/TheStonedTurtle>
|
||||||
|
* 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.plugins.itemskeptondeath;
|
||||||
|
|
||||||
|
import net.runelite.api.ScriptEvent;
|
||||||
|
import net.runelite.api.SpriteID;
|
||||||
|
import net.runelite.api.widgets.JavaScriptCallback;
|
||||||
|
import net.runelite.api.widgets.Widget;
|
||||||
|
import net.runelite.api.widgets.WidgetType;
|
||||||
|
|
||||||
|
class WidgetButton
|
||||||
|
{
|
||||||
|
private static final int ICON_HEIGHT = 26;
|
||||||
|
private static final int ICON_WIDTH = 26;
|
||||||
|
private static final int BACKGROUND_HEIGHT = 32;
|
||||||
|
private static final int BACKGROUND_WIDTH = 32;
|
||||||
|
private static final int PADDING = 5;
|
||||||
|
private static final int ICON_PADDING = (BACKGROUND_HEIGHT - ICON_HEIGHT) / 2;
|
||||||
|
|
||||||
|
private static final int BACKGROUND_SPRITE_ID = SpriteID.EQUIPMENT_SLOT_TILE;
|
||||||
|
private static final int SELECTED_BACKGROUND_SPRITE_ID = SpriteID.EQUIPMENT_SLOT_SELECTED;
|
||||||
|
|
||||||
|
@FunctionalInterface
|
||||||
|
public interface WidgetButtonCallback
|
||||||
|
{
|
||||||
|
void run(boolean newState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private final Widget parent;
|
||||||
|
private final String name;
|
||||||
|
private final int spriteID;
|
||||||
|
private boolean selected;
|
||||||
|
private final WidgetButtonCallback callback;
|
||||||
|
|
||||||
|
private Widget icon;
|
||||||
|
private Widget background;
|
||||||
|
|
||||||
|
WidgetButton(
|
||||||
|
final Widget parent,
|
||||||
|
final String name,
|
||||||
|
final int spriteID,
|
||||||
|
final boolean selectedStartState,
|
||||||
|
final WidgetButtonCallback callback)
|
||||||
|
{
|
||||||
|
this.parent = parent;
|
||||||
|
this.name = name;
|
||||||
|
this.spriteID = spriteID;
|
||||||
|
this.selected = selectedStartState;
|
||||||
|
this.callback = callback;
|
||||||
|
createBackgroundWidget();
|
||||||
|
createIconWidget();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createBackgroundWidget()
|
||||||
|
{
|
||||||
|
background = createWidget();
|
||||||
|
background.setOriginalWidth(BACKGROUND_WIDTH);
|
||||||
|
background.setOriginalHeight(BACKGROUND_HEIGHT);
|
||||||
|
syncBackgroundSprite();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createIconWidget()
|
||||||
|
{
|
||||||
|
icon = createWidget();
|
||||||
|
icon.setAction(1, "Toggle:");
|
||||||
|
icon.setOnOpListener((JavaScriptCallback) this::onButtonClicked);
|
||||||
|
icon.setOnMouseRepeatListener((JavaScriptCallback) e -> e.getSource().setOpacity(120));
|
||||||
|
icon.setOnMouseLeaveListener((JavaScriptCallback) e -> e.getSource().setOpacity(0));
|
||||||
|
icon.setHasListener(true);
|
||||||
|
icon.setSpriteId(spriteID);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Widget createWidget()
|
||||||
|
{
|
||||||
|
final Widget w = parent.createChild(-1, WidgetType.GRAPHIC);
|
||||||
|
w.setOriginalWidth(ICON_WIDTH);
|
||||||
|
w.setOriginalHeight(ICON_HEIGHT);
|
||||||
|
w.setName("<col=ff981f>" + this.name);
|
||||||
|
return w;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSelected(boolean selected)
|
||||||
|
{
|
||||||
|
this.selected = selected;
|
||||||
|
syncBackgroundSprite();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void syncBackgroundSprite()
|
||||||
|
{
|
||||||
|
background.setSpriteId(selected ? SELECTED_BACKGROUND_SPRITE_ID : BACKGROUND_SPRITE_ID);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds the collection of WidgetButtons to the container overriding any existing children.
|
||||||
|
*
|
||||||
|
* @param container Widget to add buttons too
|
||||||
|
* @param buttons buttons to add
|
||||||
|
*/
|
||||||
|
static void layoutButtonsToContainer(final Widget container, final WidgetButton... buttons)
|
||||||
|
{
|
||||||
|
// Each button has two widgets, Icon and Background
|
||||||
|
final int xIncrement = BACKGROUND_WIDTH + PADDING;
|
||||||
|
final int yIncrement = BACKGROUND_HEIGHT + PADDING;
|
||||||
|
int maxRowItems = container.getWidth() / xIncrement;
|
||||||
|
// Ensure at least 1 button per row
|
||||||
|
maxRowItems = maxRowItems < 1 ? 1 : maxRowItems;
|
||||||
|
|
||||||
|
int index = 0;
|
||||||
|
for (final WidgetButton w : buttons)
|
||||||
|
{
|
||||||
|
if (w == null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int originalX = ((index % maxRowItems) * xIncrement);
|
||||||
|
final int originalY = ((index / maxRowItems) * yIncrement);
|
||||||
|
w.background.setOriginalX(originalX);
|
||||||
|
w.background.setOriginalY(originalY);
|
||||||
|
w.background.revalidate();
|
||||||
|
|
||||||
|
// Icon must be padded to center inside image
|
||||||
|
w.icon.setOriginalX(originalX + ICON_PADDING);
|
||||||
|
w.icon.setOriginalY(originalY + ICON_PADDING);
|
||||||
|
w.icon.revalidate();
|
||||||
|
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int numButtons = index;
|
||||||
|
final int rows = 1 + (numButtons > maxRowItems ? numButtons / maxRowItems : 0);
|
||||||
|
container.setOriginalHeight(yIncrement * rows);
|
||||||
|
container.revalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onButtonClicked(ScriptEvent scriptEvent)
|
||||||
|
{
|
||||||
|
setSelected(!selected);
|
||||||
|
callback.run(selected);
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
@@ -92,6 +92,16 @@ public interface ItemStatConfig extends Config
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "showWeight",
|
||||||
|
name = "Show Weight",
|
||||||
|
description = "Show weight in tooltip"
|
||||||
|
)
|
||||||
|
default boolean showWeight()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "colorBetterUncapped",
|
keyName = "colorBetterUncapped",
|
||||||
name = "Better (Uncapped)",
|
name = "Better (Uncapped)",
|
||||||
|
|||||||
+3
@@ -189,7 +189,10 @@ public class ItemStatOverlay extends Overlay
|
|||||||
private String buildStatBonusString(ItemStats s)
|
private String buildStatBonusString(ItemStats s)
|
||||||
{
|
{
|
||||||
final StringBuilder b = new StringBuilder();
|
final StringBuilder b = new StringBuilder();
|
||||||
|
if (config.showWeight())
|
||||||
|
{
|
||||||
b.append(getChangeString("Weight", s.getWeight(), true, false));
|
b.append(getChangeString("Weight", s.getWeight(), true, false));
|
||||||
|
}
|
||||||
|
|
||||||
ItemStats other = null;
|
ItemStats other = null;
|
||||||
final ItemEquipmentStats currentEquipment = s.getEquipment();
|
final ItemEquipmentStats currentEquipment = s.getEquipment();
|
||||||
|
|||||||
+3
-2
@@ -35,6 +35,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
|
import net.runelite.api.Constants;
|
||||||
import net.runelite.api.FontID;
|
import net.runelite.api.FontID;
|
||||||
import net.runelite.api.InventoryID;
|
import net.runelite.api.InventoryID;
|
||||||
import net.runelite.api.Item;
|
import net.runelite.api.Item;
|
||||||
@@ -232,8 +233,8 @@ public class ItemStatPlugin extends Plugin
|
|||||||
Widget icon = invContainer.createChild(-1, WidgetType.GRAPHIC);
|
Widget icon = invContainer.createChild(-1, WidgetType.GRAPHIC);
|
||||||
icon.setOriginalX(8);
|
icon.setOriginalX(8);
|
||||||
icon.setOriginalY(yPos);
|
icon.setOriginalY(yPos);
|
||||||
icon.setOriginalWidth(36);
|
icon.setOriginalWidth(Constants.ITEM_SPRITE_WIDTH);
|
||||||
icon.setOriginalHeight(32);
|
icon.setOriginalHeight(Constants.ITEM_SPRITE_HEIGHT);
|
||||||
icon.setItemId(id);
|
icon.setItemId(id);
|
||||||
icon.setItemQuantityMode(0);
|
icon.setItemQuantityMode(0);
|
||||||
icon.setBorderType(1);
|
icon.setBorderType(1);
|
||||||
|
|||||||
+11
@@ -74,4 +74,15 @@ public interface LearnToClickConfig extends Config
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
position = 5,
|
||||||
|
keyName = "hideOrbs",
|
||||||
|
name = "Hide Orbs",
|
||||||
|
description = "Completely hides the world map and special attack orbs"
|
||||||
|
)
|
||||||
|
default boolean hideOrbs()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+55
-3
@@ -10,13 +10,18 @@
|
|||||||
|
|
||||||
package net.runelite.client.plugins.learntoclick;
|
package net.runelite.client.plugins.learntoclick;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.inject.Provides;
|
import com.google.inject.Provides;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.MenuEntry;
|
import net.runelite.api.MenuEntry;
|
||||||
|
import net.runelite.api.events.ConfigChanged;
|
||||||
import net.runelite.api.events.MenuEntryAdded;
|
import net.runelite.api.events.MenuEntryAdded;
|
||||||
import net.runelite.api.events.MenuShouldLeftClick;
|
import net.runelite.api.events.MenuShouldLeftClick;
|
||||||
|
import net.runelite.api.events.WidgetLoaded;
|
||||||
|
import net.runelite.api.widgets.WidgetID;
|
||||||
|
import net.runelite.api.widgets.WidgetInfo;
|
||||||
import net.runelite.client.config.ConfigManager;
|
import net.runelite.client.config.ConfigManager;
|
||||||
import net.runelite.client.eventbus.Subscribe;
|
import net.runelite.client.eventbus.Subscribe;
|
||||||
import net.runelite.client.plugins.Plugin;
|
import net.runelite.client.plugins.Plugin;
|
||||||
@@ -36,6 +41,9 @@ import org.apache.commons.lang3.ArrayUtils;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class LearnToClickPlugin extends Plugin
|
public class LearnToClickPlugin extends Plugin
|
||||||
{
|
{
|
||||||
|
private static final ImmutableList<WidgetInfo> ORB_WIDGETS = ImmutableList.of(WidgetInfo.MINIMAP_WORLDMAP_ORB,
|
||||||
|
WidgetInfo.MINIMAP_SPEC_ORB);
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private LearnToClickConfig config;
|
private LearnToClickConfig config;
|
||||||
private boolean forceRightClickFlag;
|
private boolean forceRightClickFlag;
|
||||||
@@ -51,13 +59,44 @@ public class LearnToClickPlugin extends Plugin
|
|||||||
@Override
|
@Override
|
||||||
protected void startUp() throws Exception
|
protected void startUp() throws Exception
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown() throws Exception
|
||||||
{
|
{
|
||||||
forceRightClickFlag = false;
|
forceRightClickFlag = false;
|
||||||
|
hideOrbWidgets(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Subscribe
|
||||||
|
public void onConfigChanged(ConfigChanged event)
|
||||||
|
{
|
||||||
|
if (!event.getGroup().equals("learntoclick") && !event.getKey().equals("hideOrbs"))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (config.hideOrbs())
|
||||||
|
{
|
||||||
|
hideOrbWidgets(true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hideOrbWidgets(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Subscribe
|
||||||
|
public void onWidgetLoaded(WidgetLoaded event)
|
||||||
|
{
|
||||||
|
if (!config.hideOrbs())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (event.getGroupId() == WidgetID.MINIMAP_GROUP_ID)
|
||||||
|
{
|
||||||
|
hideOrbWidgets(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
@@ -71,7 +110,10 @@ public class LearnToClickPlugin extends Plugin
|
|||||||
MenuEntry[] menuEntries = client.getMenuEntries();
|
MenuEntry[] menuEntries = client.getMenuEntries();
|
||||||
for (MenuEntry entry : menuEntries)
|
for (MenuEntry entry : menuEntries)
|
||||||
{
|
{
|
||||||
if ((entry.getOption().equals("Floating") && config.shouldRightClickMap()) || (entry.getOption().equals("Hide") && config.shouldRightClickXp()) || (entry.getOption().equals("Show") && config.shouldRightClickXp()) || (entry.getOption().equals("Auto retaliate") && config.shouldRightClickRetaliate()))
|
if ((entry.getOption().equals("Floating") && config.shouldRightClickMap()) ||
|
||||||
|
(entry.getOption().equals("Hide") && config.shouldRightClickXp()) || (entry.getOption().equals("Show")
|
||||||
|
&& config.shouldRightClickXp()) || (entry.getOption().equals("Auto retaliate")
|
||||||
|
&& config.shouldRightClickRetaliate()))
|
||||||
{
|
{
|
||||||
event.setForceRightClick(true);
|
event.setForceRightClick(true);
|
||||||
return;
|
return;
|
||||||
@@ -82,7 +124,9 @@ public class LearnToClickPlugin extends Plugin
|
|||||||
@Subscribe
|
@Subscribe
|
||||||
public void onMenuEntryAdded(MenuEntryAdded event)
|
public void onMenuEntryAdded(MenuEntryAdded event)
|
||||||
{
|
{
|
||||||
if ((event.getOption().equals("Floating") && config.shouldRightClickMap()) || (event.getOption().equals("Hide") && config.shouldRightClickXp()) || (event.getOption().equals("Show") && config.shouldRightClickXp()) || (event.getOption().equals("Auto retaliate") && config.shouldRightClickRetaliate()))
|
if ((event.getOption().equals("Floating") && config.shouldRightClickMap()) || (event.getOption().equals("Hide")
|
||||||
|
&& config.shouldRightClickXp()) || (event.getOption().equals("Show") && config.shouldRightClickXp()) ||
|
||||||
|
(event.getOption().equals("Auto retaliate") && config.shouldRightClickRetaliate()))
|
||||||
{
|
{
|
||||||
forceRightClickFlag = true;
|
forceRightClickFlag = true;
|
||||||
}
|
}
|
||||||
@@ -99,6 +143,14 @@ public class LearnToClickPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
client.setMenuEntries(entries);
|
client.setMenuEntries(entries);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Toggles hiding the World map and special attack orb widgets
|
||||||
|
* @param hidden - hides the Widgets if true, un-hides them if false
|
||||||
|
*/
|
||||||
|
private void hideOrbWidgets(boolean hidden)
|
||||||
|
{
|
||||||
|
ORB_WIDGETS.forEach(widgetInfo -> client.getWidget(widgetInfo).setHidden(hidden));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -41,10 +41,10 @@ import net.runelite.client.ui.overlay.components.ComponentOrientation;
|
|||||||
import net.runelite.client.ui.overlay.components.ImageComponent;
|
import net.runelite.client.ui.overlay.components.ImageComponent;
|
||||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||||
|
|
||||||
class LootingBagViewerOverlay extends Overlay
|
public class LootingBagViewerOverlay extends Overlay
|
||||||
{
|
{
|
||||||
private static final int INVENTORY_SIZE = 28;
|
private static final int INVENTORY_SIZE = 28;
|
||||||
private static final int PLACEHOLDER_WIDTH = 36;
|
public static final int PLACEHOLDER_WIDTH = 36;
|
||||||
private static final int PLACEHOLDER_HEIGHT = 32;
|
private static final int PLACEHOLDER_HEIGHT = 32;
|
||||||
private static final ImageComponent PLACEHOLDER_IMAGE = new ImageComponent(new BufferedImage(PLACEHOLDER_WIDTH, PLACEHOLDER_HEIGHT, BufferedImage.TYPE_4BYTE_ABGR));
|
private static final ImageComponent PLACEHOLDER_IMAGE = new ImageComponent(new BufferedImage(PLACEHOLDER_WIDTH, PLACEHOLDER_HEIGHT, BufferedImage.TYPE_4BYTE_ABGR));
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user