Raids scouting plugin
This commit is contained in:
@@ -124,6 +124,8 @@ public interface Client extends GameEngine
|
||||
|
||||
int[] getMapRegions();
|
||||
|
||||
int[][][] getInstanceTemplateChunks();
|
||||
|
||||
int[][] getXteaKeys();
|
||||
|
||||
int[] getSettings();
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Kamiel
|
||||
* 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.api;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@AllArgsConstructor
|
||||
public enum InstanceTemplates
|
||||
{
|
||||
RAIDS_LOBBY(3264, 5184, 0, 96, 32),
|
||||
RAIDS_START(3264, 5696, 0, 96, 32),
|
||||
RAIDS_END(3264, 5152, 0, 64, 32),
|
||||
RAIDS_SCAVENGERS(3264, 5216, 0, 96, 32),
|
||||
RAIDS_SHAMANS(3264, 5248, 0, 96, 32),
|
||||
RAIDS_VASA(3264, 5280, 0, 96, 32),
|
||||
RAIDS_VANGUARDS(3264, 5312, 0, 96, 32),
|
||||
RAIDS_ICE_DEMON(3264, 5344, 0, 96, 32),
|
||||
RAIDS_THIEVING(3264, 5376, 0, 96, 32),
|
||||
RAIDS_FARMING(3264, 5440, 0, 96, 32),
|
||||
RAIDS_SCAVENGERS2(3264, 5216, 1, 96, 32),
|
||||
RAIDS_MUTTADILES(3264, 5312, 1, 96, 32),
|
||||
RAIDS_MYSTICS(3264, 5248, 1, 96, 32),
|
||||
RAIDS_TEKTON(3264, 5280, 1, 96, 32),
|
||||
RAIDS_TIGHTROPE(3264, 5344, 1, 96, 32),
|
||||
RAIDS_FARMING2(3264, 5440, 1, 96, 32),
|
||||
RAIDS_GUARDIANS(3264, 5248, 2, 96, 32),
|
||||
RAIDS_VESPULA(3264, 5280, 2, 96, 32),
|
||||
RAIDS_CRABS(3264, 5344, 2, 96, 32);
|
||||
|
||||
@Getter
|
||||
private final int baseX;
|
||||
|
||||
@Getter
|
||||
private final int baseY;
|
||||
|
||||
@Getter
|
||||
private final int plane;
|
||||
|
||||
@Getter
|
||||
private final int width;
|
||||
|
||||
@Getter
|
||||
private final int height;
|
||||
|
||||
public static InstanceTemplates findMatch(int chunkData)
|
||||
{
|
||||
int rotation = chunkData >> 1 & 0x3; //unused, but shows us the rotation of the chunk
|
||||
int y = (chunkData >> 3 & 0x7FF) * 8;
|
||||
int x = (chunkData >> 14 & 0x3FF) * 8;
|
||||
int plane = chunkData >> 24 & 0x3;
|
||||
|
||||
for (InstanceTemplates template : InstanceTemplates.values())
|
||||
{
|
||||
if (plane == template.getPlane()
|
||||
&& x >= template.getBaseX() && x < template.getBaseX() + template.getWidth()
|
||||
&& y >= template.getBaseY() && y < template.getBaseY() + template.getHeight())
|
||||
{
|
||||
return template;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,9 @@ public enum Setting
|
||||
ATTACK_STYLE(43),
|
||||
|
||||
SPECIAL_ATTACK_PERCENT(300),
|
||||
SPECIAL_ATTACK_ENABLED(301);
|
||||
SPECIAL_ATTACK_ENABLED(301),
|
||||
|
||||
IN_RAID_PARTY(1427);
|
||||
|
||||
private final int id;
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ public class WidgetID
|
||||
public static final int QUEST_COMPLETED_GROUP_ID = 277;
|
||||
public static final int CLUE_SCROLL_REWARD_GROUP_ID = 73;
|
||||
public static final int BARROWS_REWARD_GROUP_ID = 155;
|
||||
public static final int RAIDS_GROUP_ID = 513;
|
||||
public static final int MOTHERLODE_MINE_GROUP_ID = 382;
|
||||
public static final int EXPERIENCE_DROP_GROUP_ID = 122;
|
||||
public static final int PUZZLE_BOX_GROUP_ID = 306;
|
||||
@@ -272,6 +273,11 @@ public class WidgetID
|
||||
static final int NAME_TEXT = 2;
|
||||
}
|
||||
|
||||
static class Raids
|
||||
{
|
||||
static final int POINTS_INFOBOX = 3;
|
||||
}
|
||||
|
||||
static class ExperienceDrop
|
||||
{
|
||||
static final int DROP_1 = 15;
|
||||
|
||||
@@ -175,6 +175,8 @@ public enum WidgetInfo
|
||||
|
||||
NIGHTMARE_ZONE(WidgetID.NIGHTMARE_ZONE_GROUP_ID, 1),
|
||||
|
||||
RAIDS_POINTS_INFOBOX(WidgetID.RAIDS_GROUP_ID, WidgetID.Raids.POINTS_INFOBOX),
|
||||
|
||||
BLAST_FURNACE_COFFER(WidgetID.BLAST_FURNACE_GROUP_ID, 0);
|
||||
|
||||
private final int groupId;
|
||||
|
||||
Reference in New Issue
Block a user