Merge branch 'master' into pr/14

This commit is contained in:
xKylee
2019-08-26 00:41:39 +01:00
2644 changed files with 432608 additions and 24206 deletions

View File

@@ -28,7 +28,6 @@ import java.awt.Graphics2D;
import java.awt.Polygon;
import java.awt.image.BufferedImage;
import javax.annotation.Nullable;
import net.runelite.api.annotations.VisibleForDevtools;
import net.runelite.api.coords.LocalPoint;
import net.runelite.api.coords.WorldArea;
import net.runelite.api.coords.WorldPoint;
@@ -36,7 +35,7 @@ import net.runelite.api.coords.WorldPoint;
/**
* Represents a RuneScape actor/entity.
*/
public interface Actor extends Renderable
public interface Actor extends Entity
{
/**
* Gets the combat level of the actor.
@@ -101,10 +100,8 @@ public interface Actor extends Renderable
*/
LocalPoint getLocalLocation();
@VisibleForDevtools
void setIdlePoseAnimation(int animation);
@VisibleForDevtools
void setPoseAnimation(int animation);
/**
@@ -129,7 +126,6 @@ public interface Actor extends Renderable
* @param animation the animation ID
* @see AnimationID
*/
@VisibleForDevtools
void setAnimation(int animation);
/**
@@ -137,7 +133,6 @@ public interface Actor extends Renderable
*
* @param actionFrame the animation frame
*/
@VisibleForDevtools
void setActionFrame(int actionFrame);
/**
@@ -146,13 +141,11 @@ public interface Actor extends Renderable
* @return the graphic of the actor
* @see GraphicID
*/
int getGraphic();
int getSpotAnimation();
@VisibleForDevtools
void setGraphic(int graphic);
void setSpotAnimation(int graphic);
@VisibleForDevtools
void setSpotAnimFrame(int spotAnimFrame);
void setSpotAnimationFrame(int spotAnimFrame);
/**
* Gets the canvas area of the current tile the actor is standing on.
@@ -192,7 +185,7 @@ public interface Actor extends Renderable
* @param zOffset the z-axis offset
* @return the sprite drawing location
*/
Point getCanvasSpriteLocation(SpritePixels sprite, int zOffset);
Point getCanvasSpriteLocation(Sprite sprite, int zOffset);
/**
* Gets a point on the canvas of where this actors mini-map indicator
@@ -240,4 +233,10 @@ public interface Actor extends Renderable
* @param overheadText the overhead text
*/
void setOverheadText(String overheadText);
/**
* Used by the "Tick Counter Plugin
*/
int getActionFrame();
int getActionFrameCycle();
}

View File

@@ -163,12 +163,38 @@ public final class AnimationID
public static final int SAND_COLLECTION = 895;
public static final int PISCARILIUS_CRANE_REPAIR = 7199;
public static final int HOME_MAKE_TABLET = 4067;
public static final int THIEVING_STALL = 832;
public static final int PICKPOCKET_SUCCESS = 881;
//block animations for players and perhaps npcs as well?
public static final int BLOCK_DEFENDER = 4177;
public static final int BLOCK_NO_SHIELD = 420;
public static final int BLOCK_SHIELD = 1156;
public static final int BLOCK_SWORD = 388;
public static final int BLOCK_UNARMED = 424; // Same Animation as failed pickpocked
public static final int DRAGONFIRE_SHIELD_SPECIAL = 6696;
// NPC animations
public static final int TZTOK_JAD_MAGIC_ATTACK = 2656;
public static final int TZTOK_JAD_RANGE_ATTACK = 2652;
public static final int TZTOK_JAD_MELEE_ATTACK = 2655;
public static final int TZTOK_JAD_MAGIC_ATTACK = 2656;
public static final int TOK_XIL_RANGE_ATTACK = 2633;
public static final int TOK_XIL_MELEE_ATTACK = 2628;
public static final int KET_ZEK_MELEE_ATTACK = 2644;
public static final int KET_ZEK_MAGE_ATTACK = 2647;
public static final int MEJ_KOT_MELEE_ATTACK = 2637;
public static final int MEJ_KOT_HEAL_ATTACK = 2639;
public static final int HELLHOUND_DEFENCE = 6566;
public static final int VORKATH_WAKE_UP = 7950;
public static final int VORKATH_DEATH = 7949;
public static final int VORKATH_SLASH_ATTACK = 7951;
public static final int VORKATH_ATTACK = 7952;
public static final int VORKATH_FIRE_BOMB_OR_SPAWN_ATTACK = 7960;
public static final int VORKATH_ACID_ATTACK = 7957;
public static final int BLACKJACK_KO = 838;
public static final int VETION_EARTHQUAKE = 5507;
public static final int ZULRAH_DEATH = 5804;
public static final int ZULRAH_PHASE = 5072;
// Farming
public static final int FARMING_HARVEST_FRUIT_TREE = 2280;
@@ -207,4 +233,110 @@ public final class AnimationID
// POH Animations
public static final int INCENSE_BURNER = 3687;
}
public static final int LOW_LEVEL_MAGIC_ATTACK = 1162;
public static final int HIGH_LEVEL_MAGIC_ATTACK = 1167;
public static final int BLOWPIPE_ATTACK = 5061;
// Tekton
public static final int TEKTON_ANVIL = 7475;
public static final int TEKTON_AUTO1 = 7482;
public static final int TEKTON_AUTO2 = 7483;
public static final int TEKTON_AUTO3 = 7484;
public static final int TEKTON_FAST_AUTO1 = 7478;
public static final int TEKTON_FAST_AUTO2 = 7488;
public static final int TEKTON_ENRAGE_AUTO1 = 7492;
public static final int TEKTON_ENRAGE_AUTO2 = 7493;
public static final int TEKTON_ENRAGE_AUTO3 = 7494;
// Hydra
public static final int HYDRA_POISON_1 = 8234;
public static final int HYDRA_RANGED_1 = 8235;
public static final int HYDRA_MAGIC_1 = 8236;
public static final int HYDRA_1_1 = 8237;
public static final int HYDRA_1_2 = 8238;
public static final int HYDRA_LIGHTNING = 8241;
public static final int HYDRA_RANGED_2 = 8242;
public static final int HYDRA_MAGIC_2 = 8243;
public static final int HYDRA_2_1 = 8244;
public static final int HYDRA_2_2 = 8245;
public static final int HYDRA_FIRE = 8248;
public static final int HYDRA_RANGED_3 = 8249;
public static final int HYDRA_MAGIC_3 = 8250;
public static final int HYDRA_3_1 = 8251;
public static final int HYDRA_3_2 = 8252;
public static final int HYDRA_MAGIC_4 = 8254;
public static final int HYDRA_POISON_4 = 8254;
public static final int HYDRA_RANGED_4 = 8255;
public static final int HYDRA_4_1 = 8257;
public static final int HYDRA_4_2 = 8258;
// INFERNO animations
public static final int JAL_NIB = 7574;
public static final int JAL_MEJRAH = 7578;
public static final int JAL_AK_RANGE_ATTACK = 7581;
public static final int JAL_AK_MELEE_ATTACK = 7582;
public static final int JAL_AK_MAGIC_ATTACK = 7583;
public static final int JAL_IMKOT = 7597;
public static final int JAL_XIL_MELEE_ATTACK = 7604;
public static final int JAL_XIL_RANGE_ATTACK = 7605;
public static final int JAL_ZEK_MAGE_ATTACK = 7610;
public static final int JAL_ZEK_MELEE_ATTACK = 7612;
public static final int JALTOK_JAD_MELEE_ATTACK = 7590;
public static final int JALTOK_JAD_MAGE_ATTACK = 7592;
public static final int JALTOK_JAD_RANGE_ATTACK = 7593;
public static final int TZKAL_ZUK = 7566;
public static final int JAL_MEJJAK = 2858;
//General Graardor
public static final int MINION_AUTO1 = 6154;
public static final int MINION_AUTO2 = 6156;
public static final int MINION_AUTO3 = 7071;
public static final int MINION_AUTO4 = 7073;
public static final int GENERAL_AUTO1 = 7018;
public static final int GENERAL_AUTO2 = 7020;
public static final int GENERAL_AUTO3 = 7021;
//Zammy-poo
public static final int ZAMMY_GENERIC_AUTO = 64;
public static final int KRIL_AUTO = 6948;
public static final int KRIL_SPEC = 6950;
public static final int ZAKL_AUTO = 7077;
public static final int BALFRUG_AUTO = 4630;
//Sara-Poo
public static final int ZILYANA_MELEE_AUTO = 6964;
public static final int ZILYANA_AUTO = 6967;
public static final int ZILYANA_SPEC = 6970;
public static final int STARLIGHT_AUTO = 6376;
public static final int BREE_AUTO = 7026;
public static final int GROWLER_AUTO = 7037;
//Arma-Poo
public static final int KREE_RANGED = 6978;
public static final int SKREE_AUTO = 6955;
public static final int GEERIN_AUTO = 6956;
public static final int GEERIN_FLINCH = 6958;
public static final int KILISA_AUTO = 6957;
//Dag Kings
public static final int DAG_REX = 2853;
public static final int DAG_PRIME = 2854;
public static final int DAG_SUPREME = 2855;
// Lizardman shaman
public static final int LIZARDMAN_SHAMAN_SPAWN = 7157;
// Combat counter
public static final int BARRAGE_ANIMATION = 1979;
public static final int CHIN_ANIMATION = 7618;
// Gauntlet Hunleff
public static final int HUNLEFF_TRAMPLE = 8420;
public static final int HUNLEFF_ATTACK = 8419;
public static final int HUNLEFF_TORNADO = 8418;
//Zalcano
public static final int ZALCANO_KNOCKED_DOWN = 8437;
public static final int ZALCANO_WAKEUP = 8439;
public static final int ZALCANO_ROCK_GLOWING = 8448;
}

View File

@@ -26,12 +26,13 @@ package net.runelite.api;
import java.awt.Canvas;
import java.awt.Dimension;
import java.math.BigInteger;
import java.util.EnumSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import net.runelite.api.annotations.VisibleForDevtools;
import net.runelite.api.coords.LocalPoint;
import net.runelite.api.coords.WorldPoint;
import net.runelite.api.hooks.Callbacks;
@@ -44,7 +45,7 @@ import org.slf4j.Logger;
/**
* Represents the RuneScape client.
*/
public interface Client extends GameEngine
public interface Client extends GameShell
{
/**
* The client invokes these callbacks to communicate to
@@ -61,8 +62,6 @@ public interface Client extends GameEngine
*/
Logger getLogger();
String getBuildID();
/**
* Gets a list of all valid players from the player cache.
*
@@ -253,13 +252,11 @@ public interface Client extends GameEngine
/**
* Gets the canvas height
* @return
*/
int getCanvasHeight();
/**
* Gets the canvas width
* @return
*/
int getCanvasWidth();
@@ -356,7 +353,7 @@ public interface Client extends GameEngine
* @see ItemID
*/
@Nonnull
ItemComposition getItemDefinition(int id);
ItemDefinition getItemDefinition(int id);
/**
* Creates an item icon sprite with passed variables.
@@ -371,7 +368,7 @@ public interface Client extends GameEngine
* @return the created sprite
*/
@Nullable
SpritePixels createItemSprite(int itemId, int quantity, int border, int shadowColor, int stackable, boolean noted, int scale);
Sprite createItemSprite(int itemId, int quantity, int border, int shadowColor, int stackable, boolean noted, int scale);
/**
* Loads and creates the sprite images of the passed archive and file IDs.
@@ -382,7 +379,7 @@ public interface Client extends GameEngine
* @return the sprite image of the file
*/
@Nullable
SpritePixels[] getSprites(IndexDataBase source, int archiveId, int fileId);
Sprite[] getSprites(IndexDataBase source, int archiveId, int fileId);
/**
* Gets the sprite index.
@@ -505,6 +502,12 @@ public interface Client extends GameEngine
*/
int[] getWidgetPositionsY();
/**
* Creates a new widget element
* @return
*/
Widget createWidget();
/**
* Gets the current run energy of the logged in player.
*
@@ -558,6 +561,11 @@ public interface Client extends GameEngine
*/
MenuEntry[] getMenuEntries();
/**
* @return amount of menu entries the client has (same as client.getMenuEntries().size())
*/
int getMenuOptionCount();
/**
* Sets the array of open menu entries.
* <p>
@@ -568,6 +576,12 @@ public interface Client extends GameEngine
*/
void setMenuEntries(MenuEntry[] entries);
/**
* Set the amount of menu entries the client has.
* If you decrement this count, it's the same as removing the last one
*/
void setMenuOptionCount(int count);
/**
* Checks whether a right-click menu is currently open.
*
@@ -644,13 +658,11 @@ public interface Client extends GameEngine
*
* @return local player variables
*/
@VisibleForDevtools
int[] getVarps();
/**
* Gets an array of all client variables.
*/
@VisibleForDevtools
Map<Integer, Object> getVarcMap();
/**
@@ -709,9 +721,8 @@ public interface Client extends GameEngine
* @param varps passed varbits
* @param varbitId the variable ID
* @return the value
* @see Varbits#id
* @see Varbits
*/
@VisibleForDevtools
int getVarbitValue(int[] varps, int varbitId);
/**
@@ -722,7 +733,6 @@ public interface Client extends GameEngine
* @return the value
* @see VarPlayer#id
*/
@VisibleForDevtools
int getVarpValue(int[] varps, int varpId);
/**
@@ -733,7 +743,6 @@ public interface Client extends GameEngine
* @param value the value
* @see VarPlayer#id
*/
@VisibleForDevtools
void setVarpValue(int[] varps, int varpId, int value);
/**
@@ -742,9 +751,8 @@ public interface Client extends GameEngine
* @param varps passed varbits
* @param varbit the variable
* @param value the value
* @see Varbits#id
* @see Varbits
*/
@VisibleForDevtools
void setVarbitValue(int[] varps, int varbit, int value);
/**
@@ -787,8 +795,6 @@ public interface Client extends GameEngine
/**
* Get the total experience of the player
*
* @return
*/
long getOverallExperience();
@@ -842,7 +848,7 @@ public interface Client extends GameEngine
* @return the corresponding object composition
* @see ObjectID
*/
ObjectComposition getObjectDefinition(int objectId);
ObjectDefinition getObjectDefinition(int objectId);
/**
* Gets the NPC composition corresponding to an NPCs ID.
@@ -851,7 +857,7 @@ public interface Client extends GameEngine
* @return the corresponding NPC composition
* @see NpcID
*/
NPCComposition getNpcDefinition(int npcId);
NPCDefinition getNpcDefinition(int npcId);
/**
* Gets an array of all world areas
@@ -872,7 +878,7 @@ public interface Client extends GameEngine
*
* @return all mini-map dots
*/
SpritePixels[] getMapDots();
Sprite[] getMapDots();
/**
* Gets the local clients game cycle.
@@ -888,7 +894,7 @@ public interface Client extends GameEngine
*
* @return the map icons
*/
SpritePixels[] getMapIcons();
Sprite[] getMapIcons();
/**
* Gets an array of mod icon sprites.
@@ -920,7 +926,7 @@ public interface Client extends GameEngine
* @param height the height
* @return the sprite image
*/
SpritePixels createSpritePixels(int[] pixels, int width, int height);
Sprite createSprite(int[] pixels, int width, int height);
/**
* Gets the location of the local player.
@@ -1017,6 +1023,11 @@ public interface Client extends GameEngine
*/
int getKeyboardIdleTicks();
/**
* Returns an array of booleans relating to keys pressed.
*/
boolean[] getPressedKeys();
/**
* Changes how game behaves based on memory mode. Low memory mode skips
* drawing of all floors and renders ground textures in low quality.
@@ -1089,15 +1100,11 @@ public interface Client extends GameEngine
/**
* Gets the clan owner of the currently joined clan chat
*
* @return
*/
String getClanOwner();
/**
* Gets the clan chat name of the currently joined clan chat
*
* @return
*/
String getClanChatName();
@@ -1110,22 +1117,16 @@ public interface Client extends GameEngine
/**
* Gets the number of friends on the friends list.
*
* @return
*/
int getFriendsCount();
/**
* Gets an array of players on the ignore list.
*
* @return
*/
Ignore[] getIgnores();
/**
* Gets the number of ignored players on the ignore list.
*
* @return
*/
int getIgnoreCount();
@@ -1194,7 +1195,7 @@ public interface Client extends GameEngine
* factors towards {@code zero} when stretching.
*
* @param state new integer scaling state
*/
*/
void setStretchedIntegerScaling(boolean state);
/**
@@ -1256,7 +1257,7 @@ public interface Client extends GameEngine
* @param z the plane
* @return the map sprite
*/
SpritePixels drawInstanceMap(int z);
Sprite drawInstanceMap(int z);
/**
* Executes a client script from the cache
@@ -1371,6 +1372,20 @@ public interface Client extends GameEngine
*/
void setInterpolateObjectAnimations(boolean interpolate);
/**
* Checks whether animation smoothing is enabled for widgets.
*
* @return true if widget animation smoothing is enabled, false otherwise
*/
boolean isInterpolateWidgetAnimations();
/**
* Sets the animation smoothing state for widgets.
*
* @param interpolate the new smoothing state
*/
void setInterpolateWidgetAnimations(boolean interpolate);
/**
* Checks whether the logged in player is in an instanced region.
*
@@ -1448,6 +1463,20 @@ public interface Client extends GameEngine
*/
void setNPCsHidden(boolean state);
/**
* Sets which NPCs are hidden
*
* @param names the names of the npcs
*/
void setNPCsNames(List<String> names);
/**
* Sets which NPCs are hidden on death
*
* @param names the names of the npcs
*/
void setNPCsHiddenOnDeath(List<String> names);
/**
* Sets whether 2D sprites (ie. overhead prayers) related to
* the NPCs are hidden.
@@ -1470,6 +1499,13 @@ public interface Client extends GameEngine
*/
void setProjectilesHidden(boolean state);
/**
* Sets whether dead NPCs are hidden.
*
* @param state new NPC hidden state
*/
void setDeadNPCsHidden(boolean state);
/**
* Gets an array of tile collision data.
* <p>
@@ -1480,13 +1516,10 @@ public interface Client extends GameEngine
@Nullable
CollisionData[] getCollisionMaps();
@VisibleForDevtools
int[] getBoostedSkillLevels();
@VisibleForDevtools
int[] getRealSkillLevels();
@VisibleForDevtools
int[] getSkillExperiences();
void queueChangedSkill(Skill skill);
@@ -1497,7 +1530,7 @@ public interface Client extends GameEngine
* The key value in the map corresponds to the ID of the sprite,
* and the value the sprite to replace it with.
*/
Map<Integer, SpritePixels> getSpriteOverrides();
Map<Integer, Sprite> getSpriteOverrides();
/**
* Gets a mapping of widget sprites to override.
@@ -1505,14 +1538,14 @@ public interface Client extends GameEngine
* The key value in the map corresponds to the packed widget ID,
* and the value the sprite to replace the widgets sprite with.
*/
Map<Integer, SpritePixels> getWidgetSpriteOverrides();
Map<Integer, Sprite> getWidgetSpriteOverrides();
/**
* Sets the compass sprite.
*
* @param spritePixels the new sprite
* @param Sprite the new sprite
*/
void setCompass(SpritePixels spritePixels);
void setCompass(Sprite Sprite);
/**
* Returns widget sprite cache, to be used with {@link Client#getSpriteOverrides()}
@@ -1624,14 +1657,11 @@ public interface Client extends GameEngine
/**
* Get the if1 widget whose item is being dragged
*
* @return
*/
Widget getIf1DraggedWidget();
/**
* Get the item index of the item being dragged on an if1 widget
* @return
*/
int getIf1DraggedItemIndex();
@@ -1643,21 +1673,91 @@ public interface Client extends GameEngine
/**
* Returns client item composition cache
*/
NodeCache getItemCompositionCache();
NodeCache getItemDefinitionCache();
/**
* Returns the array of cross sprites that appear and animate when left-clicking
*/
SpritePixels[] getCrossSprites();
Sprite[] getCrossSprites();
EnumComposition getEnum(int id);
EnumDefinition getEnum(int id);
void draw2010Menu();
void resetHealthBarCaches();
boolean getRenderSelf();
void setRenderSelf(boolean enabled);
/**
*
* @param param0 This is SceneX for gameObject, index for items, and 0 for npc.
* @param param1 This is SceneY for gameObject, static for items, and 0 for npc.
* @param type Menu entry Action opcode.
* @param id Targets ID
* @param menuEntry Do these actually matter?
* @param targetString Do these actually matter?
* @param canvasX Canvas X Point
* @param canvasY Canvas Y Point
*/
void invokeMenuAction(int param0, int param1, int type, int id, String menuEntry, String targetString, int canvasX, int canvasY);
MouseRecorder getMouseRecorder();
void setPrintMenuActions(boolean b);
String getSelectedSpellName();
boolean isSpellSelected();
/**
* Set whether or not player attack options will be hidden for friends
*/
void setHideFriendAttackOptions(boolean yes);
/**
* Set whether or not player cast options will be hidden for friends
*/
void setHideFriendCastOptions(boolean yes);
/**
* Set whether or not player attack options will be hidden for clanmates
*/
void setHideClanmateAttackOptions(boolean yes);
/**
* Set whether or not player cast options will be hidden for clanmates
*/
void setHideClanmateCastOptions(boolean yes);
/**
* Set spells excluded from above hiding
*/
void setUnhiddenCasts(Set<String> casts);
/**
* Sorts the current menu entries in the same way the client does this.
* The last entry will be the left click one after this.
*/
void sortMenuEntries();
/**
* Add player to friendlist
*/
void addFriend(String name);
/**
* Remove player from friendlist
*/
void removeFriend(String name);
BigInteger getModulus();
void setModulus(BigInteger modulus);
/*
* Returns the max item index + 1 from cache
*/
int getItemCount();
}
}

View File

@@ -40,7 +40,7 @@ public interface CollisionData
* values can be obtained and used with the {@link CollisionDataFlag} class.
*
* @return all collision flags for the tiles in the scene
* @see Constants#SCENE_SIZE
* @see net.runelite.api.Constants#SCENE_SIZE
*/
int[][] getFlags();
}

View File

@@ -98,6 +98,13 @@ public class Constants
*/
public static final int GAME_TICK_LENGTH = 600;
/**
* High alchemy = shop price * HIGH_ALCHEMY_MULTIPLIER
*
* @see ItemDefinition#getPrice
*/
public static final float HIGH_ALCHEMY_MULTIPLIER = 0.6f;
/**
* Width of a standard item sprite
*/
@@ -107,11 +114,4 @@ public class Constants
* Height of a standard item sprite
*/
public static final int ITEM_SPRITE_HEIGHT = 32;
/**
* High alchemy = shop price * HIGH_ALCHEMY_MULTIPLIER
*
* @see ItemComposition#getPrice
*/
public static final float HIGH_ALCHEMY_MULTIPLIER = .6f;
}

View File

@@ -35,11 +35,21 @@ public interface DecorativeObject extends TileObject
* Gets the convex hull of the objects model.
*
* @return the convex hull
* @see net.runelite.api.model.Jarvis
* @see api.model.Jarvis
*/
Polygon getConvexHull();
Polygon getConvexHull2();
Renderable getRenderable();
Renderable getRenderable2();
Entity getEntity1();
Entity getEntity2();
Model getModel1();
Model getModel2();
int getYOffset();
int getXOffset();
int getOrientation();
}

View File

@@ -0,0 +1,6 @@
package net.runelite.api;
public interface DynamicObject extends Entity
{
int getAnimationID();
}

View File

@@ -27,7 +27,7 @@ package net.runelite.api;
/**
* Represents an object that can be rendered.
*/
public interface Renderable extends Node
public interface Entity extends Node
{
/**
* Gets the model of the object.

View File

@@ -24,7 +24,7 @@
*/
package net.runelite.api;
public interface EnumComposition
public interface EnumDefinition
{
int[] getKeys();

View File

@@ -33,4 +33,17 @@ public final class EnumID
{
public static final int MUSIC_TRACK_NAMES = 812;
public static final int MUSIC_TRACK_IDS = 819;
/**
* Translates spellbook varbit into enum ID
*/
public static final int SPELLBOOKS = 1981;
/**
* key: index in spellbook, value: NullItemID corresponding to spell
*/
public static final int STANDARD_SPELLBOOK = 1982;
public static final int ANCIENT_SPELLBOOK = 1983;
public static final int LUNAR_SPELLBOOK = 1984;
public static final int ARCEUUS_SPELLBOOK = 1985;
}

View File

@@ -29,7 +29,7 @@ package net.runelite.api;
* <p>
* These values are intended for use with the local players equipment
* {@link ItemContainer} corresponding. For obtaining information about equipment
* in the {@link PlayerComposition}, use {@link net.runelite.api.kit.KitType}.
* in the {@link PlayerAppearance}, use {@link net.runelite.api.kit.KitType}.
*
* @see Client#getItemContainer(InventoryID)
* @see InventoryID#EQUIPMENT

View File

@@ -24,8 +24,8 @@
*/
package net.runelite.api;
import java.awt.Polygon;
import net.runelite.api.coords.Angle;
import java.awt.Polygon;
/**
* Represents a game object.
@@ -57,7 +57,7 @@ public interface GameObject extends TileObject
* Gets the convex hull of the actors model.
*
* @return the convex hull
* @see net.runelite.api.model.Jarvis
* @see //net.runelite.api.model.Jarvis
*/
Polygon getConvexHull();
@@ -68,5 +68,9 @@ public interface GameObject extends TileObject
*/
Angle getOrientation();
Renderable getRenderable();
Entity getEntity();
int getRsOrientation();
Model getModel();
}

View File

@@ -24,12 +24,14 @@
*/
package net.runelite.api;
import net.runelite.api.hooks.DrawCallbacks;
import java.awt.Canvas;
import net.runelite.api.hooks.DrawCallbacks;
/**
* Represents the client game engine.
*/
public interface GameEngine
public interface GameShell
{
/**
* Gets the canvas that contains everything.
@@ -52,5 +54,7 @@ public interface GameEngine
*/
boolean isClientThread();
DrawCallbacks getDrawCallbacks();
void resizeCanvas();
}

View File

@@ -24,6 +24,10 @@
*/
package net.runelite.api;
import java.util.Arrays;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
import lombok.Getter;
/**
@@ -69,6 +73,10 @@ public enum GameState
*/
HOPPING(45);
private static final Map<Integer, GameState> stateValueMap =
Arrays.stream(GameState.values())
.collect(Collectors.toMap(gs -> gs.state, Function.identity()));
/**
* The raw state value.
*/
@@ -88,13 +96,6 @@ public enum GameState
*/
public static GameState of(int state)
{
for (GameState gs : GameState.values())
{
if (gs.state == state)
{
return gs;
}
}
return UNKNOWN;
return stateValueMap.getOrDefault(state, UNKNOWN);
}
}

View File

@@ -1,27 +1,3 @@
/*
* Copyright (c) 2017, 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.api;
/**

View File

@@ -1,28 +1,3 @@
/*
* Copyright (c) 2017, 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.api;
/**

View File

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2018, Adam <Adam@sigterm.info>
* Copyright (c) 2019, Ganom <https://github.com/Ganom>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -28,17 +29,21 @@ public class GraphicID
{
public static final int WINE_MAKE = 47;
public static final int SPLASH = 85;
public static final int TELEPORT = 111;
public static final int GREY_BUBBLE_TELEPORT = 86;
public static final int TELEPORT = 111;
public static final int ENTANGLE = 179;
public static final int SNARE = 180;
public static final int BIND = 181;
public static final int POISON_SPLAT = 184;
public static final int ICE_RUSH = 361;
public static final int ICE_BURST = 363;
public static final int ICE_BLITZ = 367;
public static final int ICE_BARRAGE = 369;
public static final int VENGEANCE_OTHER = 725;
public static final int VENGEANCE = 726;
public static final int NPC_CONTACT = 728;
public static final int POT_SHARE = 733;
public static final int BAKE_PIE = 746;
public static final int BOOK_HOME_TELEPORT_1 = 800;
public static final int BOOK_HOME_TELEPORT_2 = 802;
public static final int BOOK_HOME_TELEPORT_3 = 803;
@@ -46,7 +51,11 @@ public class GraphicID
public static final int STAFF_OF_THE_DEAD = 1228;
public static final int IMBUED_HEART = 1316;
public static final int FLYING_FISH = 1387;
public static final int NPC_CONTACT = 728;
public static final int POT_SHARE = 733;
public static final int BAKE_PIE = 746;
public static final int OLM_BURN = 1351;
public static final int OLM_LIGHTNING = 1356;
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 HYDRA_LIGHTNING = 1666;
}

View File

@@ -29,7 +29,7 @@ import net.runelite.api.coords.LocalPoint;
/**
* Represents a graphics object.
*/
public interface GraphicsObject extends Renderable
public interface GraphicsObject extends Entity
{
/**
* The graphics object ID.

View File

@@ -29,5 +29,7 @@ package net.runelite.api;
*/
public interface GroundObject extends TileObject
{
Renderable getRenderable();
Entity getEntity();
Model getModel();
}

View File

@@ -1,27 +1,3 @@
/*
* Copyright (c) 2017, 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.api;
import java.util.Collection;

View File

@@ -26,9 +26,9 @@ package net.runelite.api;
public interface HealthBar
{
SpritePixels getHealthBarFrontSprite();
Sprite getHealthBarFrontSprite();
SpritePixels getHealthBarBackSprite();
Sprite getHealthBarBackSprite();
int getHealthBarFrontSpriteId();

View File

@@ -1,58 +1,58 @@
/*
* Copyright (c) 2018, 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.api;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
/**
* Enum of all official icons that Jagex uses in chat.
*/
@RequiredArgsConstructor
@Getter
public enum IconID
{
PLAYER_MODERATOR(0),
JAGEX_MODERATOR(1),
IRONMAN(2),
ULTIMATE_IRONMAN(3),
DMM_SKULL_5_KEYS(4),
DMM_SKULL_4_KEYS(5),
DMM_SKULL_3_KEYS(6),
DMM_SKULL_2_KEYS(7),
DMM_SKULL_1_KEYS(8),
SKULL(9),
HARDCORE_IRONMAN(10),
NO_ENTRY(11),
CHAIN_LINK(12);
private final int index;
@Override
public String toString()
{
return "<img=" + String.valueOf(this.index) + ">";
}
}
/*
* Copyright (c) 2018, 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.api;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
/**
* Enum of all official icons that Jagex uses in chat.
*/
@RequiredArgsConstructor
@Getter
public enum IconID
{
PLAYER_MODERATOR(0),
JAGEX_MODERATOR(1),
IRONMAN(2),
ULTIMATE_IRONMAN(3),
DMM_SKULL_5_KEYS(4),
DMM_SKULL_4_KEYS(5),
DMM_SKULL_3_KEYS(6),
DMM_SKULL_2_KEYS(7),
DMM_SKULL_1_KEYS(8),
SKULL(9),
HARDCORE_IRONMAN(10),
NO_ENTRY(11),
CHAIN_LINK(12);
private final int index;
@Override
public String toString()
{
return "<img=" + String.valueOf(this.index) + ">";
}
}

View File

@@ -1,27 +1,3 @@
/*
* 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.api;
/**

View File

@@ -53,6 +53,10 @@ public enum InventoryID
* Monkey madness puzzle box inventory.
*/
MONKEY_MADNESS_PUZZLE_BOX(221),
/**
* Looting Bag inventory
*/
LOOTING_BAG(516),
/**
* Kingdom Of Miscellania reward inventory.
*/
@@ -87,4 +91,16 @@ public enum InventoryID
{
return id;
}
}
public static InventoryID getValue(int value)
{
for (InventoryID e: InventoryID.values())
{
if (e.id == value)
{
return e;
}
}
return null;
}
}

View File

@@ -1,33 +1,9 @@
/*
* Copyright (c) 2016-2017, 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.api;
/**
* Represents the template of a specific item type.
*/
public interface ItemComposition
public interface ItemDefinition
{
/**
* Gets the items name.

View File

@@ -36,5 +36,5 @@ public interface MainBufferProvider extends BufferProvider
*
* @return the loaded image
*/
Image getImage();
Image getImage(); //TODO
}

View File

@@ -35,5 +35,5 @@ public interface MapElementConfig
* @param unused unused value
* @return the sprite icon to display on the world map
*/
SpritePixels getMapIcon(boolean unused);
Sprite getMapIcon(boolean unused);
}

View File

@@ -24,12 +24,18 @@
*/
package net.runelite.api;
import lombok.AccessLevel;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import net.runelite.api.util.Text;
/**
* A menu entry in a right-click menu.
*/
@Data
@NoArgsConstructor
public class MenuEntry
{
/**
@@ -42,6 +48,7 @@ public class MenuEntry
* If the option does not apply to any target, this field
* will be set to empty string.
*/
@Setter(AccessLevel.NONE)
private String target;
/**
* An identifier value for the target of the action.
@@ -49,8 +56,9 @@ public class MenuEntry
private int identifier;
/**
* The action the entry will trigger.
* {@link net.runelite.api.MenuOpcode}
*/
private int type;
private int opcode;
/**
* An additional parameter for the action.
*/
@@ -66,4 +74,47 @@ public class MenuEntry
* This is used for shift click
*/
private boolean forceLeftClick;
public MenuEntry(String option, String target, int identifier, int opcode, int param0, int param1, boolean forceLeftClick)
{
this.option = option;
this.target = target;
this.identifier = identifier;
this.opcode = opcode;
this.param0 = param0;
this.param1 = param1;
this.forceLeftClick = forceLeftClick;
}
public static MenuEntry copy(MenuEntry src)
{
return new MenuEntry(
src.getOption(),
src.getTarget(),
src.getIdentifier(),
src.getOpcode(),
src.getParam0(),
src.getParam1(),
src.isForceLeftClick()
);
}
public void setTarget(String target)
{
this.target = target;
this.standardizedTarget = null;
}
@Getter(AccessLevel.NONE)
private String standardizedTarget;
public String getStandardizedTarget()
{
if (standardizedTarget == null)
{
standardizedTarget = Text.standardize(target, true);
}
return standardizedTarget;
}
}

View File

@@ -30,7 +30,7 @@ import java.util.Map;
/**
* An enumeration of right-click menu actions.
*/
public enum MenuAction
public enum MenuOpcode
{
/**
* Menu action for using an item in your inventory on a tile object (GameObject or GroundObject).
@@ -155,6 +155,8 @@ public enum MenuAction
WIDGET_TYPE_5(29),
/**
* Interaction with widget (type 6).
*
* This is the continue button on message boxes
*/
WIDGET_TYPE_6(30),
/**
@@ -279,19 +281,19 @@ public enum MenuAction
public static final int MENU_ACTION_DEPRIORITIZE_OFFSET = 2000;
private static final Map<Integer, MenuAction> map = new HashMap<>();
private static final Map<Integer, MenuOpcode> map = new HashMap<>();
static
{
for (MenuAction menuAction : values())
for (MenuOpcode menuOpcode : values())
{
map.put(menuAction.getId(), menuAction);
map.put(menuOpcode.getId(), menuOpcode);
}
}
private final int id;
MenuAction(int id)
MenuOpcode(int id)
{
this.id = id;
}
@@ -301,7 +303,7 @@ public enum MenuAction
return id;
}
public static MenuAction of(int id)
public static MenuOpcode of(int id)
{
return map.getOrDefault(id, UNKNOWN);
}

View File

@@ -116,4 +116,14 @@ public interface MessageNode
* @param timestamp
*/
void setTimestamp(int timestamp);
/**
* Returns yes if the message is from a friend
*/
boolean isFromFriend();
/**
* Returns yes if the message is from a clanmate
*/
boolean isFromClanMate();
}

View File

@@ -24,14 +24,14 @@
*/
package net.runelite.api;
import java.util.List;
import net.runelite.api.model.Triangle;
import net.runelite.api.model.Vertex;
import java.util.List;
/**
* Represents the model of an object.
*/
public interface Model extends Renderable
public interface Model extends Entity
{
/**
* Gets a list of all vertices of the model.
@@ -103,4 +103,5 @@ public interface Model extends Renderable
int getExtremeZ();
int getXYZMag();
boolean isClickable();
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright (c) 2019, ThatGamerBlue <thatgamerblue@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.api;
public interface MouseRecorder
{
int[] getXs();
int[] getYs();
long[] getMillis();
int getIndex();
}

View File

@@ -35,7 +35,7 @@ public interface NPC extends Actor
* Gets the ID of the NPC.
*
* @return the ID of the NPC
* @see NpcID
* //@see NpcID
*/
int getId();
@@ -59,7 +59,7 @@ public interface NPC extends Actor
*
* @return the composition
*/
NPCComposition getComposition();
NPCDefinition getDefinition();
/**
* Get the composition for this NPC and transform it if required
@@ -67,7 +67,7 @@ public interface NPC extends Actor
* @return the transformed NPC
*/
@Nullable
NPCComposition getTransformedComposition();
NPCDefinition getTransformedDefinition();
/**
* Returns true if this NPC has died
@@ -75,4 +75,6 @@ public interface NPC extends Actor
* @return
*/
boolean isDead();
void onDefinitionChanged(NPCDefinition composition);
}

View File

@@ -24,10 +24,7 @@
*/
package net.runelite.api;
/**
* Represents the template of a specific NPC type.
*/
public interface NPCComposition
public interface NPCDefinition
{
/**
* Gets the name of the NPC.
@@ -99,7 +96,7 @@ public interface NPCComposition
*
* @return the transformed composition
*/
NPCComposition transform();
NPCDefinition transform();
/**
* Gets the size of the NPC.

View File

@@ -27,7 +27,7 @@ package net.runelite.api;
/**
* Represents the template of a specific object.
*/
public interface ObjectComposition
public interface ObjectDefinition
{
/**
* Gets ID for the object.
@@ -78,5 +78,5 @@ public interface ObjectComposition
*
* @return the impostor
*/
ObjectComposition getImpostor();
ObjectDefinition getImpostor();
}

View File

@@ -24,6 +24,8 @@
*/
package net.runelite.api;
import java.awt.geom.Path2D;
import static net.runelite.api.Constants.TILE_FLAG_BRIDGE;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.Polygon;
@@ -36,7 +38,6 @@ import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import static net.runelite.api.Constants.TILE_FLAG_BRIDGE;
import net.runelite.api.coords.LocalPoint;
import net.runelite.api.model.Jarvis;
import net.runelite.api.model.Triangle;
@@ -316,12 +317,6 @@ public class Perspective
final int neX = localLocation.getX() + (size * LOCAL_TILE_SIZE / 2);
final int neY = localLocation.getY() + (size * LOCAL_TILE_SIZE / 2);
final int seX = swX;
final int seY = neY;
final int nwX = neX;
final int nwY = swY;
final byte[][][] tileSettings = client.getTileSettings();
final int sceneX = localLocation.getSceneX();
@@ -339,14 +334,14 @@ public class Perspective
}
final int swHeight = getHeight(client, swX, swY, tilePlane);
final int nwHeight = getHeight(client, nwX, nwY, tilePlane);
final int nwHeight = getHeight(client, neX, swY, tilePlane);
final int neHeight = getHeight(client, neX, neY, tilePlane);
final int seHeight = getHeight(client, seX, seY, tilePlane);
final int seHeight = getHeight(client, swX, neY, tilePlane);
Point p1 = localToCanvas(client, swX, swY, swHeight);
Point p2 = localToCanvas(client, nwX, nwY, nwHeight);
Point p2 = localToCanvas(client, neX, swY, nwHeight);
Point p3 = localToCanvas(client, neX, neY, neHeight);
Point p4 = localToCanvas(client, seX, seY, seHeight);
Point p4 = localToCanvas(client, swX, neY, seHeight);
if (p1 == null || p2 == null || p3 == null || p4 == null)
{
@@ -471,7 +466,7 @@ public class Perspective
public static Point getCanvasSpriteLocation(
@Nonnull Client client,
@Nonnull LocalPoint localLocation,
@Nonnull SpritePixels sprite,
@Nonnull Sprite sprite,
int zOffset)
{
int plane = client.getPlane();
@@ -490,7 +485,7 @@ public class Perspective
}
/**
* You don't want this. Use {@link TileObject#getClickbox()} instead.
* You don't want this. Use {@link //TileObject#getClickbox()} instead.
* <p>
* Get the on-screen clickable area of {@code model} as though it's for the
* object on the tile at ({@code localX}, {@code localY}) and rotated to
@@ -549,13 +544,13 @@ public class Perspective
)
{
int radius = 5;
Area geometry = new Area();
Path2D.Double geometry = new Path2D.Double();
final int tileHeight = getTileHeight(client, point, client.getPlane());
for (Triangle triangle : triangles)
{
Vertex _a = triangle.getA();
net.runelite.api.model.Vertex _a = triangle.getA();
Point a = localToCanvas(client,
point.getX() - _a.getX(),
point.getY() - _a.getZ(),
@@ -607,10 +602,10 @@ public class Perspective
continue;
}
geometry.add(new Area(clickableRect));
geometry.append(clickableRect, false);
}
return geometry;
return new Area(geometry);
}
private static Area getAABB(

View File

@@ -35,12 +35,14 @@ public interface Player extends Actor
@Override
int getCombatLevel();
int getPlayerId();
/**
* Gets the composition of this player.
*
* @return the composition
*/
PlayerComposition getPlayerComposition();
PlayerAppearance getPlayerAppearance();
/**
* Gets the polygons that make up the players model.
@@ -80,7 +82,6 @@ public interface Player extends Actor
/**
* Gets the displayed skull icon of the player.
* Only works on the local player.
*
* @return the skull icon
*/

View File

@@ -24,13 +24,12 @@
*/
package net.runelite.api;
import net.runelite.api.annotations.VisibleForDevtools;
import net.runelite.api.kit.KitType;
/**
* Represents the template of a player.
*/
public interface PlayerComposition
public interface PlayerAppearance
{
/**
* Gets an array of IDs related to equipment slots.
@@ -63,9 +62,7 @@ public interface PlayerComposition
* Update the cached hash value for player equipment
* Used to cache the player models based on equipment.
*/
@VisibleForDevtools
void setHash();
@VisibleForDevtools
void setTransformedNpcId(int id);
}

View File

@@ -104,10 +104,6 @@ public class Point
{
return false;
}
if (this.y != other.y)
{
return false;
}
return true;
return this.y == other.y;
}
}

View File

@@ -24,155 +24,147 @@
*/
package net.runelite.api;
import lombok.AllArgsConstructor;
import lombok.Getter;
import net.runelite.api.widgets.WidgetInfo;
/**
* An enumeration of different prayer spells.
*/
@Getter
@AllArgsConstructor
public enum Prayer
{
/**
* Thick Skin (Level 1, Defence).
*/
THICK_SKIN(Varbits.PRAYER_THICK_SKIN, 5.0),
THICK_SKIN(Varbits.PRAYER_THICK_SKIN, 5.0, WidgetInfo.PRAYER_THICK_SKIN),
/**
* Burst of Strength (Level 4, Strength).
*/
BURST_OF_STRENGTH(Varbits.PRAYER_BURST_OF_STRENGTH, 5.0),
BURST_OF_STRENGTH(Varbits.PRAYER_BURST_OF_STRENGTH, 5.0, WidgetInfo.PRAYER_BURST_OF_STRENGTH),
/**
* Clarity of Thought (Level 7, Attack).
*/
CLARITY_OF_THOUGHT(Varbits.PRAYER_CLARITY_OF_THOUGHT, 5.0),
CLARITY_OF_THOUGHT(Varbits.PRAYER_CLARITY_OF_THOUGHT, 5.0, WidgetInfo.PRAYER_CLARITY_OF_THOUGHT),
/**
* Sharp Eye (Level 8, Ranging).
*/
SHARP_EYE(Varbits.PRAYER_SHARP_EYE, 5.0),
SHARP_EYE(Varbits.PRAYER_SHARP_EYE, 5.0, WidgetInfo.PRAYER_SHARP_EYE),
/**
* Mystic Will (Level 9, Magic).
*/
MYSTIC_WILL(Varbits.PRAYER_MYSTIC_WILL, 5.0),
MYSTIC_WILL(Varbits.PRAYER_MYSTIC_WILL, 5.0, WidgetInfo.PRAYER_MYSTIC_WILL),
/**
* Rock Skin (Level 10, Defence).
*/
ROCK_SKIN(Varbits.PRAYER_ROCK_SKIN, 10.0),
ROCK_SKIN(Varbits.PRAYER_ROCK_SKIN, 10.0, WidgetInfo.PRAYER_ROCK_SKIN),
/**
* Superhuman Strength (Level 13, Strength).
*/
SUPERHUMAN_STRENGTH(Varbits.PRAYER_SUPERHUMAN_STRENGTH, 10.0),
SUPERHUMAN_STRENGTH(Varbits.PRAYER_SUPERHUMAN_STRENGTH, 10.0, WidgetInfo.PRAYER_SUPERHUMAN_STRENGTH),
/**
* Improved Reflexes (Level 16, Attack).
*/
IMPROVED_REFLEXES(Varbits.PRAYER_IMPROVED_REFLEXES, 10.0),
IMPROVED_REFLEXES(Varbits.PRAYER_IMPROVED_REFLEXES, 10.0, WidgetInfo.PRAYER_IMPROVED_REFLEXES),
/**
* Rapid Restore (Level 19, Stats).
*/
RAPID_RESTORE(Varbits.PRAYER_RAPID_RESTORE, 60.0 / 36.0),
RAPID_RESTORE(Varbits.PRAYER_RAPID_RESTORE, 60.0 / 36.0, WidgetInfo.PRAYER_RAPID_RESTORE),
/**
* Rapid Heal (Level 22, Hitpoints).
*/
RAPID_HEAL(Varbits.PRAYER_RAPID_HEAL, 60.0 / 18),
RAPID_HEAL(Varbits.PRAYER_RAPID_HEAL, 60.0 / 18, WidgetInfo.PRAYER_RAPID_HEAL),
/**
* Protect Item (Level 25).
*/
PROTECT_ITEM(Varbits.PRAYER_PROTECT_ITEM, 60.0 / 18),
PROTECT_ITEM(Varbits.PRAYER_PROTECT_ITEM, 60.0 / 18, WidgetInfo.PRAYER_PROTECT_ITEM),
/**
* Hawk Eye (Level 26, Ranging).
*/
HAWK_EYE(Varbits.PRAYER_HAWK_EYE, 10.0),
HAWK_EYE(Varbits.PRAYER_HAWK_EYE, 10.0, WidgetInfo.PRAYER_HAWK_EYE),
/**
* Mystic Lore (Level 27, Magic).
*/
MYSTIC_LORE(Varbits.PRAYER_MYSTIC_LORE, 10.0),
MYSTIC_LORE(Varbits.PRAYER_MYSTIC_LORE, 10.0, WidgetInfo.PRAYER_MYSTIC_LORE),
/**
* Steel Skin (Level 28, Defence).
*/
STEEL_SKIN(Varbits.PRAYER_STEEL_SKIN, 20.0),
STEEL_SKIN(Varbits.PRAYER_STEEL_SKIN, 20.0, WidgetInfo.PRAYER_STEEL_SKIN),
/**
* Ultimate Strength (Level 31, Strength).
*/
ULTIMATE_STRENGTH(Varbits.PRAYER_ULTIMATE_STRENGTH, 20.0),
ULTIMATE_STRENGTH(Varbits.PRAYER_ULTIMATE_STRENGTH, 20.0, WidgetInfo.PRAYER_ULTIMATE_STRENGTH),
/**
* Incredible Reflexes (Level 34, Attack).
*/
INCREDIBLE_REFLEXES(Varbits.PRAYER_INCREDIBLE_REFLEXES, 20.0),
INCREDIBLE_REFLEXES(Varbits.PRAYER_INCREDIBLE_REFLEXES, 20.0, WidgetInfo.PRAYER_INCREDIBLE_REFLEXES),
/**
* Protect from Magic (Level 37).
*/
PROTECT_FROM_MAGIC(Varbits.PRAYER_PROTECT_FROM_MAGIC, 20.0),
PROTECT_FROM_MAGIC(Varbits.PRAYER_PROTECT_FROM_MAGIC, 20.0, WidgetInfo.PRAYER_PROTECT_FROM_MAGIC),
/**
* Protect from Missiles (Level 40).
*/
PROTECT_FROM_MISSILES(Varbits.PRAYER_PROTECT_FROM_MISSILES, 20.0),
PROTECT_FROM_MISSILES(Varbits.PRAYER_PROTECT_FROM_MISSILES, 20.0, WidgetInfo.PRAYER_PROTECT_FROM_MISSILES),
/**
* Protect from Melee (Level 43).
*/
PROTECT_FROM_MELEE(Varbits.PRAYER_PROTECT_FROM_MELEE, 20.0),
PROTECT_FROM_MELEE(Varbits.PRAYER_PROTECT_FROM_MELEE, 20.0, WidgetInfo.PRAYER_PROTECT_FROM_MELEE),
/**
* Eagle Eye (Level 44, Ranging).
*/
EAGLE_EYE(Varbits.PRAYER_EAGLE_EYE, 20.0),
EAGLE_EYE(Varbits.PRAYER_EAGLE_EYE, 20.0, WidgetInfo.PRAYER_EAGLE_EYE),
/**
* Mystic Might (Level 45, Magic).
*/
MYSTIC_MIGHT(Varbits.PRAYER_MYSTIC_MIGHT, 20.0),
MYSTIC_MIGHT(Varbits.PRAYER_MYSTIC_MIGHT, 20.0, WidgetInfo.PRAYER_MYSTIC_MIGHT),
/**
* Retribution (Level 46).
*/
RETRIBUTION(Varbits.PRAYER_RETRIBUTION, 5.0),
RETRIBUTION(Varbits.PRAYER_RETRIBUTION, 5.0, WidgetInfo.PRAYER_RETRIBUTION),
/**
* Redemption (Level 49).
*/
REDEMPTION(Varbits.PRAYER_REDEMPTION, 10.0),
REDEMPTION(Varbits.PRAYER_REDEMPTION, 10.0, WidgetInfo.PRAYER_REDEMPTION),
/**
* Smite (Level 52).
*/
SMITE(Varbits.PRAYER_SMITE, 30.0),
SMITE(Varbits.PRAYER_SMITE, 30.0, WidgetInfo.PRAYER_SMITE),
/**
* Chivalry (Level 60, Defence/Strength/Attack).
*/
CHIVALRY(Varbits.PRAYER_CHIVALRY, 40.0),
CHIVALRY(Varbits.PRAYER_CHIVALRY, 40.0, WidgetInfo.PRAYER_CHIVALRY),
/**
* Piety (Level 70, Defence/Strength/Attack).
*/
PIETY(Varbits.PRAYER_PIETY, 40.0),
PIETY(Varbits.PRAYER_PIETY, 40.0, WidgetInfo.PRAYER_PIETY),
/**
* Preserve (Level 55).
*/
PRESERVE(Varbits.PRAYER_PRESERVE, 60.0 / 18),
PRESERVE(Varbits.PRAYER_PRESERVE, 60.0 / 18, WidgetInfo.PRAYER_PRESERVE),
/**
* Rigour (Level 74, Ranging/Damage/Defence).
*/
RIGOUR(Varbits.PRAYER_RIGOUR, 40.0),
RIGOUR(Varbits.PRAYER_RIGOUR, 40.0, WidgetInfo.PRAYER_RIGOUR),
/**
* Augury (Level 77, Magic/Magic Def./Defence).
*/
AUGURY(Varbits.PRAYER_AUGURY, 40.0);
private final Varbits varbit;
private final double drainRate;
Prayer(Varbits varbit, double drainRate)
{
this.varbit = varbit;
this.drainRate = drainRate;
}
AUGURY(Varbits.PRAYER_AUGURY, 40.0, WidgetInfo.PRAYER_AUGURY);
/**
* Gets the varbit that stores whether the prayer is active or not.
*
* @return the prayer active varbit
*/
public Varbits getVarbit()
{
return varbit;
}
private final Varbits varbit;
/**
* Gets the prayer drain rate (measured in pray points/minute)
*
* @return the prayer drain rate
*/
public double getDrainRate()
{
return drainRate;
}
}
private final double drainRate;
/**
* Gets the widget info for prayer
*/
private final WidgetInfo widgetInfo;
}

View File

@@ -27,7 +27,7 @@ package net.runelite.api;
/**
* Represents a projectile entity (ie. cannonball, arrow).
*/
public interface Projectile extends Renderable
public interface Projectile extends Entity
{
/**
* Gets the ID of the projectile.
@@ -37,6 +37,13 @@ public interface Projectile extends Renderable
*/
int getId();
/**
* Gets the actor that is targeted by this projectile.
*
* @return the target actor, or null if this projectile is an AoE attack
*/
Actor getInteracting();
/**
* Gets the original x-axis coordinate that this projectile started from.
*

View File

@@ -44,14 +44,21 @@ public class ProjectileID
public static final int VASA_RANGED_AOE = 1329;
public static final int TEKTON_METEOR_AOE = 660;
public static final int OLM_FALLING_CRYSTAL_AOE = -1; //please help
public static final int OLM_BURNING_AOE = -1;
public static final int OLM_FALLING_CRYSTAL = 1357;
public static final int OLM_BURNING = 1349;
public static final int OLM_FALLING_CRYSTAL_TRAIL = 1352;
public static final int OLM_ACID_TRAIL = 1354;
public static final int OLM_FIRE_LINE = 1347;
public static final int OLM_MAGE_ATTACK = 1339;
public static final int OLM_RANGE_ATTACK = 1340;
public static final int VORKATH_BOMB_AOE = 1481;
public static final int VORKATH_POISON_POOL_AOE = 1483;
public static final int VORKATH_TICK_FIRE_AOE = 1482;
public static final int VORKATH_SPAWN_AOE = 1484;
public static final int ADDY_DRAG_POISON = 1486;
public static final int GALVEK_MINE = 1495;
public static final int GALVEK_BOMB = 1491;
@@ -60,21 +67,24 @@ public class ProjectileID
public static final int VETION_LIGHTNING = 280;
public static final int CHAOS_FANATIC_AOE = 551; //for lack of a better word
public static final int CHAOS_FANATIC_AOE = 551;
public static final int CORPOREAL_BEAST_AOE = 315;
public static final int CORPOREAL_BEAST_DARK_CORE_AOE = 319;
public static final int WINTERTODT_SNOW_FALL_AOE = 501;
public static final int WINTERTODT_SNOW_FALL_AOE = 1310;
public static final int DEMONIC_GORILLA_RANGED = 1302;
public static final int DEMONIC_GORILLA_MAGIC = 1304;
public static final int DEMONIC_GORILLA_BOULDER = 856;
/**
* missing: marble gargoyle, superior dark beast
*/
public static final int XARPUS_ACID = 1555;
public static final int CERB_FIRE = 1247;
/**
* missing: superior dark beast
*/
public static final int MARBLE_GARGOYLE_AOE = 1453;
/**
* non AOE, regular projectiles
*/
@@ -83,5 +93,25 @@ public class ProjectileID
public static final int VORKATH_MAGIC = 1479;
public static final int VORKATH_PRAYER_DISABLE = 1471;
public static final int VORKATH_VENOM = 1470;
public static final int VORKATH_ICE = 350;
public static final int VORKATH_ICE = 395;
public static final int SOTETSEG_BOMB = 1604;
public static final int SOTETSEG_RANGE = 1607;
public static final int SOTETSEG_MAGE = 1606;
public static final int HYDRA_MAGIC = 1662;
public static final int HYDRA_RANGED = 1663;
public static final int HYDRA_POISON = 1644;
public static final int HYDRA_LIGHTNING = 1664;
public static final int HYDRA_LIGHTNING_2 = 1665;
public static final int DRAKE_BREATH = 1637;
public static final int HUNLLEF_MAGE_ATTACK = 1707;
public static final int HUNLLEF_CORRUPTED_MAGE_ATTACK = 1708;
public static final int HUNLLEF_RANGE_ATTACK = 1711;
public static final int HUNLLEF_CORRUPTED_RANGE_ATTACK = 1712;
public static final int HUNLLEF_PRAYER_ATTACK = 1713;
public static final int HUNLLEF_CORRUPTED_PRAYER_ATTACK = 1714;
public static final int ZALCANO_PROJECTILE = 1728;
}

View File

@@ -25,172 +25,170 @@
package net.runelite.api;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public enum Quest
{
//Free Quests
BLACK_KNIGHTS_FORTRESS(299, "Black Knights' Fortress"),
COOKS_ASSISTANT(300, "Cook's Assistant"),
THE_CORSAIR_CURSE(301, "The Corsair Curse"),
DEMON_SLAYER(302, "Demon Slayer"),
DORICS_QUEST(303, "Doric's Quest"),
DRAGON_SLAYER(304, "Dragon Slayer"),
ERNEST_THE_CHICKEN(305, "Ernest the Chicken"),
GOBLIN_DIPLOMACY(306, "Goblin Diplomacy"),
IMP_CATCHER(307, "Imp Catcher"),
THE_KNIGHTS_SWORD(308, "The Knight's Sword"),
MISTHALIN_MYSTERY(309, "Misthalin Mystery"),
PIRATES_TREASURE(310, "Pirate's Treasure"),
PRINCE_ALI_RESCUE(311, "Prince Ali Rescue"),
THE_RESTLESS_GHOST(312, "The Restless Ghost"),
ROMEO__JULIET(313, "Romeo & Juliet"),
RUNE_MYSTERIES(314, "Rune Mysteries"),
SHEEP_SHEARER(315, "Sheep Shearer"),
SHIELD_OF_ARRAV(316, "Shield of Arrav"),
VAMPIRE_SLAYER(317, "Vampire Slayer"),
WITCHS_POTION(318, "Witch's Potion"),
X_MARKS_THE_SPOT(550, "X Marks the Spot"),
BLACK_KNIGHTS_FORTRESS(299, "Black Knights' Fortress", VarPlayer.QUEST_BLACK_KNIGHTS_FORTRESS),
COOKS_ASSISTANT(300, "Cook's Assistant", VarPlayer.QUEST_COOKS_ASSISTANT),
THE_CORSAIR_CURSE(301, "The Corsair Curse", Varbits.QUEST_THE_CORSAIR_CURSE),
DEMON_SLAYER(302, "Demon Slayer", Varbits.QUEST_DEMON_SLAYER),
DORICS_QUEST(303, "Doric's Quest", VarPlayer.QUEST_DORICS_QUEST),
DRAGON_SLAYER(304, "Dragon Slayer", VarPlayer.QUEST_DRAGON_SLAYER),
ERNEST_THE_CHICKEN(305, "Ernest the Chicken", VarPlayer.QUEST_ERNEST_THE_CHICKEN),
GOBLIN_DIPLOMACY(306, "Goblin Diplomacy", Varbits.QUEST_GOBLIN_DIPLOMACY),
IMP_CATCHER(307, "Imp Catcher", VarPlayer.QUEST_IMP_CATCHER),
THE_KNIGHTS_SWORD(308, "The Knight's Sword", VarPlayer.QUEST_THE_KNIGHTS_SWORD),
MISTHALIN_MYSTERY(309, "Misthalin Mystery", Varbits.QUEST_MISTHALIN_MYSTERY),
PIRATES_TREASURE(310, "Pirate's Treasure", VarPlayer.QUEST_PIRATES_TREASURE),
PRINCE_ALI_RESCUE(311, "Prince Ali Rescue", VarPlayer.QUEST_PRINCE_ALI_RESCUE),
THE_RESTLESS_GHOST(312, "The Restless Ghost", VarPlayer.QUEST_THE_RESTLESS_GHOST),
ROMEO__JULIET(313, "Romeo & Juliet", VarPlayer.QUEST_ROMEO_AND_JULIET),
RUNE_MYSTERIES(314, "Rune Mysteries", VarPlayer.QUEST_RUNE_MYSTERIES),
SHEEP_SHEARER(315, "Sheep Shearer", VarPlayer.QUEST_SHEEP_SHEARER),
SHIELD_OF_ARRAV(316, "Shield of Arrav", VarPlayer.QUEST_SHIELD_OF_ARRAV),
VAMPIRE_SLAYER(317, "Vampire Slayer", VarPlayer.QUEST_VAMPIRE_SLAYER),
WITCHS_POTION(318, "Witch's Potion", VarPlayer.QUEST_WITCHS_POTION),
X_MARKS_THE_SPOT(550, "X Marks the Spot", Varbits.QUEST_X_MARKS_THE_SPOT),
//Members' Quests
ANIMAL_MAGNETISM(331, "Animal Magnetism"),
ANOTHER_SLICE_OF_HAM(332, "Another Slice of H.A.M."),
BETWEEN_A_ROCK(333, "Between a Rock..."),
BIG_CHOMPY_BIRD_HUNTING(334, "Big Chompy Bird Hunting"),
BIOHAZARD(335, "Biohazard"),
CABIN_FEVER(336, "Cabin Fever"),
CLOCK_TOWER(337, "Clock Tower"),
COLD_WAR(338, "Cold War"),
CONTACT(339, "Contact!"),
CREATURE_OF_FENKENSTRAIN(340, "Creature of Fenkenstrain"),
DARKNESS_OF_HALLOWVALE(341, "Darkness of Hallowvale"),
DEATH_PLATEAU(342, "Death Plateau"),
DEATH_TO_THE_DORGESHUUN(343, "Death to the Dorgeshuun"),
THE_DEPTHS_OF_DESPAIR(344, "The Depths of Despair"),
DESERT_TREASURE(345, "Desert Treasure"),
DEVIOUS_MINDS(346, "Devious Minds"),
THE_DIG_SITE(347, "The Dig Site"),
DRAGON_SLAYER_II(348, "Dragon Slayer II"),
DREAM_MENTOR(349, "Dream Mentor"),
DRUIDIC_RITUAL(350, "Druidic Ritual"),
DWARF_CANNON(351, "Dwarf Cannon"),
EADGARS_RUSE(352, "Eadgar's Ruse"),
EAGLES_PEAK(353, "Eagles' Peak"),
ELEMENTAL_WORKSHOP_I(354, "Elemental Workshop I"),
ELEMENTAL_WORKSHOP_II(355, "Elemental Workshop II"),
ENAKHRAS_LAMENT(356, "Enakhra's Lament"),
ENLIGHTENED_JOURNEY(357, "Enlightened Journey"),
THE_EYES_OF_GLOUPHRIE(358, "The Eyes of Glouphrie"),
FAIRYTALE_I__GROWING_PAINS(359, "Fairytale I - Growing Pains"),
FAIRYTALE_II__CURE_A_QUEEN(360, "Fairytale II - Cure a Queen"),
FAMILY_CREST(361, "Family Crest"),
THE_FEUD(362, "The Feud"),
FIGHT_ARENA(363, "Fight Arena"),
FISHING_CONTEST(364, "Fishing Contest"),
FORGETTABLE_TALE(365, "Forgettable Tale..."),
BONE_VOYAGE(366, "Bone Voyage"),
THE_FREMENNIK_ISLES(367, "The Fremennik Isles"),
THE_FREMENNIK_TRIALS(368, "The Fremennik Trials"),
GARDEN_OF_TRANQUILLITY(369, "Garden of Tranquillity"),
GERTRUDES_CAT(370, "Gertrude's Cat"),
GHOSTS_AHOY(371, "Ghosts Ahoy"),
THE_GIANT_DWARF(372, "The Giant Dwarf"),
THE_GOLEM(373, "The Golem"),
THE_GRAND_TREE(374, "The Grand Tree"),
THE_GREAT_BRAIN_ROBBERY(375, "The Great Brain Robbery"),
GRIM_TALES(376, "Grim Tales"),
THE_HAND_IN_THE_SAND(377, "The Hand in the Sand"),
HAUNTED_MINE(378, "Haunted Mine"),
HAZEEL_CULT(379, "Hazeel Cult"),
HEROES_QUEST(380, "Heroes' Quest"),
HOLY_GRAIL(381, "Holy Grail"),
HORROR_FROM_THE_DEEP(382, "Horror from the Deep"),
ICTHLARINS_LITTLE_HELPER(383, "Icthlarin's Little Helper"),
IN_AID_OF_THE_MYREQUE(384, "In Aid of the Myreque"),
IN_SEARCH_OF_THE_MYREQUE(385, "In Search of the Myreque"),
JUNGLE_POTION(386, "Jungle Potion"),
KINGS_RANSOM(387, "King's Ransom"),
LEGENDS_QUEST(388, "Legends' Quest"),
LOST_CITY(389, "Lost City"),
THE_LOST_TRIBE(390, "The Lost Tribe"),
LUNAR_DIPLOMACY(391, "Lunar Diplomacy"),
MAKING_FRIENDS_WITH_MY_ARM(392, "Making Friends with My Arm"),
MAKING_HISTORY(393, "Making History"),
MERLINS_CRYSTAL(394, "Merlin's Crystal"),
MONKEY_MADNESS_I(395, "Monkey Madness I"),
MONKEY_MADNESS_II(396, "Monkey Madness II"),
MONKS_FRIEND(397, "Monk's Friend"),
MOUNTAIN_DAUGHTER(398, "Mountain Daughter"),
MOURNINGS_END_PART_I(399, "Mourning's End Part I"),
MOURNINGS_END_PART_II(400, "Mourning's End Part II"),
MURDER_MYSTERY(401, "Murder Mystery"),
MY_ARMS_BIG_ADVENTURE(402, "My Arm's Big Adventure"),
NATURE_SPIRIT(403, "Nature Spirit"),
OBSERVATORY_QUEST(404, "Observatory Quest"),
OLAFS_QUEST(405, "Olaf's Quest"),
ONE_SMALL_FAVOUR(406, "One Small Favour"),
PLAGUE_CITY(407, "Plague City"),
PRIEST_IN_PERIL(408, "Priest in Peril"),
THE_QUEEN_OF_THIEVES(409, "The Queen of Thieves"),
RAG_AND_BONE_MAN(410, "Rag and Bone Man"),
RAG_AND_BONE_MAN_II(411, "Rag and Bone Man II"),
RATCATCHERS(412, "Ratcatchers"),
RECIPE_FOR_DISASTER(413, "Recipe for Disaster"),
RECRUITMENT_DRIVE(414, "Recruitment Drive"),
REGICIDE(415, "Regicide"),
ROVING_ELVES(416, "Roving Elves"),
ROYAL_TROUBLE(417, "Royal Trouble"),
RUM_DEAL(418, "Rum Deal"),
SCORPION_CATCHER(419, "Scorpion Catcher"),
SEA_SLUG(420, "Sea Slug"),
SHADES_OF_MORTTON(421, "Shades of Mort'ton"),
SHADOW_OF_THE_STORM(422, "Shadow of the Storm"),
SHEEP_HERDER(423, "Sheep Herder"),
SHILO_VILLAGE(424, "Shilo Village"),
THE_SLUG_MENACE(425, "The Slug Menace"),
A_SOULS_BANE(426, "A Soul's Bane"),
SPIRITS_OF_THE_ELID(427, "Spirits of the Elid"),
SWAN_SONG(428, "Swan Song"),
TAI_BWO_WANNAI_TRIO(429, "Tai Bwo Wannai Trio"),
A_TAIL_OF_TWO_CATS(430, "A Tail of Two Cats"),
TALE_OF_THE_RIGHTEOUS(431, "Tale of the Righteous"),
A_TASTE_OF_HOPE(432, "A Taste of Hope"),
TEARS_OF_GUTHIX(433, "Tears of Guthix"),
TEMPLE_OF_IKOV(434, "Temple of Ikov"),
THRONE_OF_MISCELLANIA(435, "Throne of Miscellania"),
THE_TOURIST_TRAP(436, "The Tourist Trap"),
TOWER_OF_LIFE(437, "Tower of Life"),
TREE_GNOME_VILLAGE(438, "Tree Gnome Village"),
TRIBAL_TOTEM(439, "Tribal Totem"),
TROLL_ROMANCE(440, "Troll Romance"),
TROLL_STRONGHOLD(441, "Troll Stronghold"),
UNDERGROUND_PASS(442, "Underground Pass"),
CLIENT_OF_KOUREND(443, "Client of Kourend"),
WANTED(444, "Wanted!"),
WATCHTOWER(445, "Watchtower"),
WATERFALL_QUEST(446, "Waterfall Quest"),
WHAT_LIES_BELOW(447, "What Lies Below"),
WITCHS_HOUSE(448, "Witch's House"),
ZOGRE_FLESH_EATERS(449, "Zogre Flesh Eaters"),
THE_ASCENT_OF_ARCEUUS(542, "The Ascent of Arceuus"),
THE_FORSAKEN_TOWER(543, "The Forsaken Tower"),
SONG_OF_THE_ELVES(603, "Song of the Elves"),
ANIMAL_MAGNETISM(331, "Animal Magnetism", Varbits.QUEST_ANIMAL_MAGNETISM),
ANOTHER_SLICE_OF_HAM(332, "Another Slice of H.A.M.", Varbits.QUEST_ANOTHER_SLICE_OF_HAM),
BETWEEN_A_ROCK(333, "Between a Rock...", Varbits.QUEST_BETWEEN_A_ROCK),
BIG_CHOMPY_BIRD_HUNTING(334, "Big Chompy Bird Hunting", VarPlayer.QUEST_BIG_CHOMPY_BIRD_HUNTING),
BIOHAZARD(335, "Biohazard", VarPlayer.QUEST_BIOHAZARD),
CABIN_FEVER(336, "Cabin Fever", VarPlayer.QUEST_CABIN_FEVER),
CLOCK_TOWER(337, "Clock Tower", VarPlayer.QUEST_CLOCK_TOWER),
COLD_WAR(338, "Cold War", Varbits.QUEST_COLD_WAR),
CONTACT(339, "Contact!", Varbits.QUEST_CONTACT),
CREATURE_OF_FENKENSTRAIN(340, "Creature of Fenkenstrain", VarPlayer.QUEST_CREATURE_OF_FENKENSTRAIN),
DARKNESS_OF_HALLOWVALE(341, "Darkness of Hallowvale", Varbits.QUEST_DARKNESS_OF_HALLOWVALE),
DEATH_PLATEAU(342, "Death Plateau", VarPlayer.QUEST_DEATH_PLATEAU),
DEATH_TO_THE_DORGESHUUN(343, "Death to the Dorgeshuun", Varbits.QUEST_DEATH_TO_THE_DORGESHUUN),
THE_DEPTHS_OF_DESPAIR(344, "The Depths of Despair", Varbits.QUEST_THE_DEPTHS_OF_DESPAIR),
DESERT_TREASURE(345, "Desert Treasure", Varbits.QUEST_DESERT_TREASURE),
DEVIOUS_MINDS(346, "Devious Minds", Varbits.QUEST_DEVIOUS_MINDS),
THE_DIG_SITE(347, "The Dig Site", VarPlayer.QUEST_THE_DIG_SITE),
DRAGON_SLAYER_II(348, "Dragon Slayer II", Varbits.QUEST_DRAGON_SLAYER_II),
DREAM_MENTOR(349, "Dream Mentor", Varbits.QUEST_DREAM_MENTOR),
DRUIDIC_RITUAL(350, "Druidic Ritual", VarPlayer.QUEST_DRUIDIC_RITUAL),
DWARF_CANNON(351, "Dwarf Cannon", Varbits.QUEST_THE_GIANT_DWARF),
EADGARS_RUSE(352, "Eadgar's Ruse", VarPlayer.QUEST_EADGARS_RUSE),
EAGLES_PEAK(353, "Eagles' Peak", Varbits.QUEST_EAGLES_PEAK),
ELEMENTAL_WORKSHOP_I(354, "Elemental Workshop I", VarPlayer.QUEST_ELEMENTAL_WORKSHOP_I),
ELEMENTAL_WORKSHOP_II(355, "Elemental Workshop II", Varbits.QUEST_ELEMENTAL_WORKSHOP_II),
ENAKHRAS_LAMENT(356, "Enakhra's Lament", Varbits.QUEST_ENAKHRAS_LAMENT),
ENLIGHTENED_JOURNEY(357, "Enlightened Journey", Varbits.QUEST_ENLIGHTENED_JOURNEY),
THE_EYES_OF_GLOUPHRIE(358, "The Eyes of Glouphrie", Varbits.QUEST_THE_EYES_OF_GLOUPHRIE),
FAIRYTALE_I__GROWING_PAINS(359, "Fairytale I - Growing Pains", Varbits.QUEST_FAIRYTALE_I_GROWING_PAINS),
FAIRYTALE_II__CURE_A_QUEEN(360, "Fairytale II - Cure a Queen", Varbits.QUEST_FAIRYTALE_II_CURE_A_QUEEN),
FAMILY_CREST(361, "Family Crest", VarPlayer.QUEST_FAMILY_CREST),
THE_FEUD(362, "The Feud", Varbits.QUEST_THE_FEUD),
FIGHT_ARENA(363, "Fight Arena", VarPlayer.QUEST_FIGHT_ARENA),
FISHING_CONTEST(364, "Fishing Contest", VarPlayer.QUEST_FISHING_CONTEST),
FORGETTABLE_TALE(365, "Forgettable Tale...", Varbits.QUEST_FORGETTABLE_TALE),
BONE_VOYAGE(366, "Bone Voyage", Varbits.QUEST_BONE_VOYAGE),
THE_FREMENNIK_ISLES(367, "The Fremennik Isles", Varbits.QUEST_THE_FREMENNIK_ISLES),
THE_FREMENNIK_TRIALS(368, "The Fremennik Trials", VarPlayer.QUEST_THE_FREMENNIK_TRIALS),
GARDEN_OF_TRANQUILLITY(369, "Garden of Tranquillity", Varbits.QUEST_GARDEN_OF_TRANQUILLITY),
GERTRUDES_CAT(370, "Gertrude's Cat", VarPlayer.QUEST_GERTRUDES_CAT),
GHOSTS_AHOY(371, "Ghosts Ahoy", Varbits.QUEST_GHOSTS_AHOY),
THE_GIANT_DWARF(372, "The Giant Dwarf", Varbits.QUEST_THE_GIANT_DWARF),
THE_GOLEM(373, "The Golem", Varbits.QUEST_THE_GOLEM),
THE_GRAND_TREE(374, "The Grand Tree", VarPlayer.QUEST_THE_GRAND_TREE),
THE_GREAT_BRAIN_ROBBERY(375, "The Great Brain Robbery", VarPlayer.QUEST_THE_GREAT_BRAIN_ROBBERY),
GRIM_TALES(376, "Grim Tales", Varbits.QUEST_GRIM_TALES),
THE_HAND_IN_THE_SAND(377, "The Hand in the Sand", Varbits.QUEST_THE_HAND_IN_THE_SAND),
HAUNTED_MINE(378, "Haunted Mine", VarPlayer.QUEST_HAUNTED_MINE),
HAZEEL_CULT(379, "Hazeel Cult", VarPlayer.QUEST_HAZEEL_CULT),
HEROES_QUEST(380, "Heroes' Quest", VarPlayer.QUEST_HEROES_QUEST),
HOLY_GRAIL(381, "Holy Grail", VarPlayer.QUEST_HOLY_GRAIL),
HORROR_FROM_THE_DEEP(382, "Horror from the Deep", Varbits.QUEST_HORROR_FROM_THE_DEEP),
ICTHLARINS_LITTLE_HELPER(383, "Icthlarin's Little Helper", Varbits.QUEST_ICTHLARINS_LITTLE_HELPER),
IN_AID_OF_THE_MYREQUE(384, "In Aid of the Myreque", Varbits.QUEST_IN_AID_OF_THE_MYREQUE),
IN_SEARCH_OF_THE_MYREQUE(385, "In Search of the Myreque", VarPlayer.QUEST_IN_SEARCH_OF_THE_MYREQUE),
JUNGLE_POTION(386, "Jungle Potion", VarPlayer.QUEST_JUNGLE_POTION),
KINGS_RANSOM(387, "King's Ransom", Varbits.QUEST_KINGS_RANSOM),
LEGENDS_QUEST(388, "Legends' Quest", VarPlayer.QUEST_LEGENDS_QUEST),
LOST_CITY(389, "Lost City", VarPlayer.QUEST_LOST_CITY),
THE_LOST_TRIBE(390, "The Lost Tribe", Varbits.QUEST_THE_LOST_TRIBE),
LUNAR_DIPLOMACY(391, "Lunar Diplomacy", Varbits.QUEST_LUNAR_DIPLOMACY),
MAKING_FRIENDS_WITH_MY_ARM(392, "Making Friends with My Arm", Varbits.QUEST_MAKING_FRIENDS_WITH_MY_ARM),
MAKING_HISTORY(393, "Making History", Varbits.QUEST_MAKING_HISTORY),
MERLINS_CRYSTAL(394, "Merlin's Crystal", VarPlayer.QUEST_MERLINS_CRYSTAL),
MONKEY_MADNESS_I(395, "Monkey Madness I", VarPlayer.QUEST_MONKEY_MADNESS_I),
MONKEY_MADNESS_II(396, "Monkey Madness II", Varbits.QUEST_MONKEY_MADNESS_II),
MONKS_FRIEND(397, "Monk's Friend", VarPlayer.QUEST_MONKS_FRIEND),
MOUNTAIN_DAUGHTER(398, "Mountain Daughter", Varbits.QUEST_MOUNTAIN_DAUGHTER),
MOURNINGS_END_PART_I(399, "Mourning's End Part I", VarPlayer.QUEST_MOURNINGS_END_PART_I),
MOURNINGS_END_PART_II(400, "Mourning's End Part II", Varbits.QUEST_MOURNINGS_END_PART_II),
MURDER_MYSTERY(401, "Murder Mystery", VarPlayer.QUEST_MURDER_MYSTERY),
MY_ARMS_BIG_ADVENTURE(402, "My Arm's Big Adventure", Varbits.QUEST_MY_ARMS_BIG_ADVENTURE),
NATURE_SPIRIT(403, "Nature Spirit", VarPlayer.QUEST_NATURE_SPIRIT),
OBSERVATORY_QUEST(404, "Observatory Quest", VarPlayer.QUEST_OBSERVATORY_QUEST),
OLAFS_QUEST(405, "Olaf's Quest", Varbits.QUEST_OLAFS_QUEST),
ONE_SMALL_FAVOUR(406, "One Small Favour", VarPlayer.QUEST_ONE_SMALL_FAVOUR),
PLAGUE_CITY(407, "Plague City", VarPlayer.QUEST_PLAGUE_CITY),
PRIEST_IN_PERIL(408, "Priest in Peril", VarPlayer.QUEST_PRIEST_IN_PERIL),
THE_QUEEN_OF_THIEVES(409, "The Queen of Thieves", Varbits.QUEST_THE_QUEEN_OF_THIEVES),
RAG_AND_BONE_MAN(410, "Rag and Bone Man", VarPlayer.QUEST_RAG_AND_BONE_MAN),
RAG_AND_BONE_MAN_II(411, "Rag and Bone Man II", VarPlayer.QUEST_RAG_AND_BONE_MAN_II),
RATCATCHERS(412, "Ratcatchers", Varbits.QUEST_RATCATCHERS),
RECIPE_FOR_DISASTER(413, "Recipe for Disaster", Varbits.QUEST_RECIPE_FOR_DISASTER),
RECRUITMENT_DRIVE(414, "Recruitment Drive", Varbits.QUEST_RECRUITMENT_DRIVE),
REGICIDE(415, "Regicide", VarPlayer.QUEST_REGICIDE),
ROVING_ELVES(416, "Roving Elves", VarPlayer.QUEST_ROVING_ELVES),
ROYAL_TROUBLE(417, "Royal Trouble", Varbits.QUEST_ROYAL_TROUBLE),
RUM_DEAL(418, "Rum Deal", VarPlayer.QUEST_RUM_DEAL),
SCORPION_CATCHER(419, "Scorpion Catcher", VarPlayer.QUEST_SCORPION_CATCHER),
SEA_SLUG(420, "Sea Slug", VarPlayer.QUEST_SEA_SLUG),
SHADES_OF_MORTTON(421, "Shades of Mort'ton", VarPlayer.QUEST_SHADES_OF_MORTTON),
SHADOW_OF_THE_STORM(422, "Shadow of the Storm", Varbits.QUEST_SHADOW_OF_THE_STORM),
SHEEP_HERDER(423, "Sheep Herder", VarPlayer.QUEST_SHEEP_HERDER),
SHILO_VILLAGE(424, "Shilo Village", VarPlayer.QUEST_SHILO_VILLAGE),
THE_SLUG_MENACE(425, "The Slug Menace", Varbits.QUEST_THE_SLUG_MENACE),
A_SOULS_BANE(426, "A Soul's Bane", Varbits.QUEST_A_SOULS_BANE),
SPIRITS_OF_THE_ELID(427, "Spirits of the Elid", Varbits.QUEST_SPIRITS_OF_THE_ELID),
SWAN_SONG(428, "Swan Song", Varbits.QUEST_SWAN_SONG),
TAI_BWO_WANNAI_TRIO(429, "Tai Bwo Wannai Trio", VarPlayer.QUEST_TAI_BWO_WANNAI_TRIO),
A_TAIL_OF_TWO_CATS(430, "A Tail of Two Cats", Varbits.QUEST_A_TAIL_OF_TWO_CATS),
TALE_OF_THE_RIGHTEOUS(431, "Tale of the Righteous", Varbits.QUEST_TALE_OF_THE_RIGHTEOUS),
A_TASTE_OF_HOPE(432, "A Taste of Hope", Varbits.QUEST_A_TASTE_OF_HOPE),
TEARS_OF_GUTHIX(433, "Tears of Guthix", Varbits.QUEST_TEARS_OF_GUTHIX),
TEMPLE_OF_IKOV(434, "Temple of Ikov", VarPlayer.QUEST_TEMPLE_OF_IKOV),
THRONE_OF_MISCELLANIA(435, "Throne of Miscellania", VarPlayer.QUEST_THRONE_OF_MISCELLANIA),
THE_TOURIST_TRAP(436, "The Tourist Trap", VarPlayer.QUEST_THE_TOURIST_TRAP),
TOWER_OF_LIFE(437, "Tower of Life", Varbits.QUEST_TOWER_OF_LIFE),
TREE_GNOME_VILLAGE(438, "Tree Gnome Village", VarPlayer.QUEST_TREE_GNOME_VILLAGE),
TRIBAL_TOTEM(439, "Tribal Totem", VarPlayer.QUEST_TRIBAL_TOTEM),
TROLL_ROMANCE(440, "Troll Romance", VarPlayer.QUEST_TROLL_ROMANCE),
TROLL_STRONGHOLD(441, "Troll Stronghold", VarPlayer.QUEST_TROLL_STRONGHOLD),
UNDERGROUND_PASS(442, "Underground Pass", VarPlayer.QUEST_UNDERGROUND_PASS),
CLIENT_OF_KOUREND(443, "Client of Kourend", Varbits.QUEST_CLIENT_OF_KOUREND),
WANTED(444, "Wanted!", Varbits.QUEST_WANTED),
WATCHTOWER(445, "Watchtower", VarPlayer.QUEST_WATCHTOWER),
WATERFALL_QUEST(446, "Waterfall Quest", VarPlayer.QUEST_WATERFALL_QUEST),
WHAT_LIES_BELOW(447, "What Lies Below", Varbits.QUEST_WHAT_LIES_BELOW),
WITCHS_HOUSE(448, "Witch's House", VarPlayer.QUEST_WITCHS_HOUSE),
ZOGRE_FLESH_EATERS(449, "Zogre Flesh Eaters", Varbits.QUEST_ZOGRE_FLESH_EATERS),
THE_ASCENT_OF_ARCEUUS(542, "The Ascent of Arceuus", Varbits.QUEST_THE_ASCENT_OF_ARCEUUS),
THE_FORSAKEN_TOWER(543, "The Forsaken Tower", Varbits.QUEST_THE_FORSAKEN_TOWER),
SONG_OF_THE_ELVES(603, "Song of the Elves", Varbits.QUEST_SONG_OF_THE_ELVES),
//Miniquests
ENTER_THE_ABYSS(319, "Enter the Abyss"),
ARCHITECTURAL_ALLIANCE(320, "Architectural Alliance"),
BEAR_YOUR_SOUL(321, "Bear your Soul"),
ALFRED_GRIMHANDS_BARCRAWL(322, "Alfred Grimhand's Barcrawl"),
CURSE_OF_THE_EMPTY_LORD(323, "Curse of the Empty Lord"),
ENCHANTED_KEY(324, "Enchanted Key"),
THE_GENERALS_SHADOW(325, "The General's Shadow"),
SKIPPY_AND_THE_MOGRES(326, "Skippy and the Mogres"),
THE_MAGE_ARENA(327, "The Mage Arena"),
LAIR_OF_TARN_RAZORLOR(328, "Lair of Tarn Razorlor"),
FAMILY_PEST(329, "Family Pest"),
THE_MAGE_ARENA_II(330, "The Mage Arena II"),
IN_SEARCH_OF_KNOWLEDGE(602, "In Search of Knowledge");
ENTER_THE_ABYSS(319, "Enter the Abyss", VarPlayer.QUEST_ENTER_THE_ABYSS),
ARCHITECTURAL_ALLIANCE(320, "Architectural Alliance", Varbits.QUEST_ARCHITECTURAL_ALLIANCE),
BEAR_YOUR_SOUL(321, "Bear your Soul", Varbits.QUEST_BEAR_YOUR_SOUL),
ALFRED_GRIMHANDS_BARCRAWL(322, "Alfred Grimhand's Barcrawl", VarPlayer.QUEST_ALFRED_GRIMHANDS_BARCRAWL),
CURSE_OF_THE_EMPTY_LORD(323, "Curse of the Empty Lord", Varbits.QUEST_CURSE_OF_THE_EMPTY_LORD),
ENCHANTED_KEY(324, "Enchanted Key", Varbits.QUEST_ENCHANTED_KEY),
THE_GENERALS_SHADOW(325, "The General's Shadow", Varbits.QUEST_THE_GENERALS_SHADOW),
SKIPPY_AND_THE_MOGRES(326, "Skippy and the Mogres", Varbits.QUEST_SKIPPY_AND_THE_MOGRES),
THE_MAGE_ARENA(327, "The Mage Arena", VarPlayer.QUEST_THE_MAGE_ARENA),
LAIR_OF_TARN_RAZORLOR(328, "Lair of Tarn Razorlor", Varbits.QUEST_LAIR_OF_TARN_RAZORLOR),
FAMILY_PEST(329, "Family Pest", Varbits.QUEST_FAMILY_PEST),
THE_MAGE_ARENA_II(330, "The Mage Arena II", Varbits.QUEST_THE_MAGE_ARENA_II),
IN_SEARCH_OF_KNOWLEDGE(602, "In Search of Knowledge", Varbits.QUEST_IN_SEARCH_OF_KNOWLEDGE);
@Getter
private final int id;
@@ -198,6 +196,26 @@ public enum Quest
@Getter
private final String name;
private final Varbits varbit;
private final VarPlayer varPlayer;
Quest(int id, String name, Varbits varbit)
{
this.id = id;
this.name = name;
this.varbit = varbit;
this.varPlayer = null;
}
Quest(int id, String name, VarPlayer varPlayer)
{
this.id = id;
this.name = name;
this.varbit = null;
this.varPlayer = varPlayer;
}
public QuestState getState(Client client)
{
client.runScript(ScriptID.QUESTLIST_PROGRESS, id);
@@ -211,4 +229,16 @@ public enum Quest
return QuestState.IN_PROGRESS;
}
}
public int getVar(Client client)
{
if (varbit != null)
{
return client.getVar(varbit);
}
else
{
return client.getVar(varPlayer);
}
}
}

View File

@@ -43,7 +43,7 @@ public interface ScriptEvent
* Gets the widget of the event.
*
* @return the widget
* @see net.runelite.api.widgets.Widget
* @see Widget
*/
Widget getSource();

View File

@@ -26,6 +26,18 @@ package net.runelite.api;
public final class ScriptID
{
/**
* Handles zoom input
*
* Updates the VarClientInts (73, 74) to this same value
* <ul>
* <li> int Reset zoom position </li>
* <li> int Reset zoom position </li>
* </ul>
*/
@ScriptArguments(integer = 2)
public static final int CAMERA_DO_ZOOM = 42;
/**
* Updates the scrollbar handle and container to the new height of the content container
* <ul>
@@ -47,12 +59,6 @@ public final class ScriptID
@ScriptArguments(integer = 1, string = 1)
public static final int CHATBOX_INPUT = 96;
/**
* Rebuilds the chatbox
*/
@ScriptArguments()
public static final int BUILD_CHATBOX = 216;
/**
* Opens the Private Message chat interface
*
@@ -64,6 +70,12 @@ public final class ScriptID
@ScriptArguments(string = 1)
public static final int OPEN_PRIVATE_MESSAGE_INTERFACE = 107;
/**
* Rebuilds the chatbox
*/
@ScriptArguments()
public static final int BUILD_CHATBOX = 216;
/**
* Rebuilds the text input widget inside the chat interface
* <ul>
@@ -73,6 +85,12 @@ public final class ScriptID
@ScriptArguments(string = 1)
public static final int CHAT_TEXT_INPUT_REBUILD = 222;
/**
* Builds the chatbox input widget
*/
@ScriptArguments()
public static final int CHAT_PROMPT_INIT = 223;
/**
* Closes the chatbox input
* <ul>
@@ -94,11 +112,24 @@ public final class ScriptID
public static final int MESSAGE_LAYER_OPEN = 677;
/**
* Builds the chatbox input widget
* Clicking bank pin buttons runs this
*/
@ScriptArguments()
public static final int CHAT_PROMPT_INIT = 223;
@ScriptArguments(integer = 20)
public static final int BANK_PIN_OP = 685;
/**
* Checks the state of the given stash unit.
* <ul>
* <li>int (loc) The stash unit object id</li>
* <li>int Bitpacked stash unit states</li>
* <li>int Bitpacked stash unit states 2</li>
* <li>int Bitpacked stash unit states 3</li>
* </ul>
* <p>
* Returns a pair of booleans indicating if the stash unit is built and if it is filled
*/
@ScriptArguments(integer = 4)
public static final int WATSON_STASH_UNIT_CHECK = 1479;
/**
* Displays the game messages when clicking on an item inside the Items Kept on Death interface
* <ul>
@@ -111,22 +142,19 @@ public final class ScriptID
public static final int DEATH_KEEP_ITEM_EXAMINE = 1603;
/**
* Checks the state of the given stash unit.
* <ul>
* <li>int (loc) The stash unit object id</li>
* <li>int Bitpacked stash unit states</li>
* <li>int Bitpacked stash unit states 2</li>
* <li>int Bitpacked stash unit states 3</li>
* </ul>
* Creates a disabled experience drop
*
* Returns a pair of booleans indicating if the stash unit is built and if it is filled
* <ul>
* <li>int (Skill ordinal) Sets what icon to use</li>
* <li>int Amount of exp to drop</li>
* </ul>
*/
@ScriptArguments(integer = 4)
public static final int WATSON_STASH_UNIT_CHECK = 1479;
@ScriptArguments(integer = 2)
public static final int XPDROP_DISABLED = 2091;
/**
* Queries the completion state of a quest by its struct id
* <ul>
* Queries the completion state of a quest by its struct id
* <li> int (struct) The id of the quest
* </ul>
* Returns
@@ -148,16 +176,10 @@ public final class ScriptID
public static final int DIARY_QUEST_UPDATE_LINECOUNT = 2523;
/**
* Handles zoom input
*
* Updates the VarClientInts (73, 74) to this same value
* <ul>
* <li> int Reset zoom position </li>
* <li> int Reset zoom position </li>
* </ul>
* Rebuilds the Spellbook
*/
@ScriptArguments(integer = 2)
public static final int CAMERA_DO_ZOOM = 42;
@ScriptArguments(integer = 10, string = 2)
public static final int MAGIC_SPELLBOOK_REDRAW = 2611;
/**
* Does nothing
@@ -175,13 +197,15 @@ public final class ScriptID
public static final int PRIVMSG = 10004;
/**
* Creates a disabled experience drop
*
* <ul>
* <li>int (Skill ordinal) Sets what icon to use</li>
* <li>int Amount of exp to drop</li>
* </ul>
* Join a clan, duh
*/
@ScriptArguments(integer = 2)
public static final int XPDROP_DISABLED = 2091;
@ScriptArguments(string = 1)
public static final int CUSTOM_JOIN_CLAN = 10690;
/**
* Send a public message
*/
@ScriptArguments(string = 1)
public static final int PUBLICMSG = 13337;
}

View File

@@ -1,28 +1,3 @@
/*
* Copyright (c) 2016-2017, 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.api;
/**

View File

@@ -30,7 +30,7 @@ import java.awt.image.BufferedImage;
/**
* Represents data about the pixels of a sprite image.
*/
public interface SpritePixels
public interface Sprite
{
int DEFAULT_SHADOW_COLOR = 3153952;
@@ -79,14 +79,14 @@ public interface SpritePixels
void toBufferedImage(BufferedImage img) throws IllegalArgumentException;
/**
* Writes the contents of the SpritePixels with chosen outline to the BufferedImage
* Writes the contents of the Sprite with chosen outline to the BufferedImage
*
* @param color target color
*/
BufferedImage toBufferedOutline(Color color);
/**
* Writes the contents of the SpritePixels with chosen outline to the BufferedImage
* Writes the contents of the Sprite with chosen outline to the BufferedImage
*
* @param img target image
* @param color target color

View File

@@ -431,7 +431,7 @@ public final class SpriteID
public static final int SPELL_FIRE_SURGE_DISABLED = 415;
/* Unmapped: 416, 417, 418 */
public static final int UNKNOWN_STANCE_ICON_1 = 419;
public static final int UNKNOWN_STANCE_ICON_2 = 320;
public static final int UNKNOWN_STANCE_ICON_2 = 420;
public static final int UNKNOWN_STANCE_ICON_3 = 421;
public static final int MINIMAP_DESTINATION_FLAG = 422;
public static final int CHATBOX_BADGE_CROWN_PLAYER_MODERATOR = 423;
@@ -1571,6 +1571,9 @@ public final class SpriteID
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 BIG_ASS_GUTHIX_SPELL = 1774;
public static final int BIG_SUPERHEAT = 1800;
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;

View File

@@ -24,9 +24,9 @@
*/
package net.runelite.api;
import java.util.List;
import net.runelite.api.coords.LocalPoint;
import net.runelite.api.coords.WorldPoint;
import java.util.List;
/**
* Represents a tile in the game.
@@ -52,7 +52,7 @@ public interface Tile
*
* @return the item
*/
ItemLayer getItemLayer();
TileItemPile getItemLayer();
/**
* Gets the object on the ground layer of the tile.
@@ -73,14 +73,14 @@ public interface Tile
*
* @return the paint
*/
SceneTilePaint getSceneTilePaint();
TilePaint getTilePaint();
/**
* Gets the model of the tile in the scene.
*
* @return the tile model
*/
SceneTileModel getSceneTileModel();
TileModel getTileModel();
/**
* Gets the location coordinate of the tile in the world.
@@ -134,8 +134,6 @@ public interface Tile
/**
* Return the tile under this one, if this tile is a bridge
*
* @return
*/
Tile getBridge();
}

View File

@@ -25,9 +25,9 @@
package net.runelite.api;
/**
* Represents an item inside an {@link ItemLayer}.
* Represents an item inside an {@link TileItemPile}.
*/
public interface TileItem extends Renderable
public interface TileItem extends Entity
{
/**
* Gets the items ID.

View File

@@ -27,7 +27,7 @@ package net.runelite.api;
/**
* Represents a pile of items held by a tile.
*/
public interface ItemLayer extends TileObject
public interface TileItemPile extends TileObject
{
/**
* Gets the height of the layer.
@@ -41,19 +41,23 @@ public interface ItemLayer extends TileObject
*
* @return the bottom item
*/
Renderable getBottom();
Entity getBottom();
/**
* Gets the item at the middle of the pile.
*
* @return the middle item
*/
Renderable getMiddle();
Entity getMiddle();
/**
* Gets the item at the top of the pile.
*
* @return the top item
*/
Renderable getTop();
Entity getTop();
Model getModelBottom();
Model getModelMiddle();
Model getModelTop();
}

View File

@@ -27,7 +27,7 @@ package net.runelite.api;
/**
* Represents the model of a tile in the current scene.
*/
public interface SceneTileModel
public interface TileModel
{
/**
* Gets the underlay color of the tile.

View File

@@ -24,12 +24,12 @@
*/
package net.runelite.api;
import net.runelite.api.coords.LocalPoint;
import net.runelite.api.coords.WorldPoint;
import java.awt.Graphics2D;
import java.awt.Polygon;
import java.awt.geom.Area;
import javax.annotation.Nullable;
import net.runelite.api.coords.LocalPoint;
import net.runelite.api.coords.WorldPoint;
/**
* Represents an object that a tile holds.

View File

@@ -27,7 +27,7 @@ package net.runelite.api;
/**
* Represents the paint of a tile in the current scene.
*/
public interface SceneTilePaint
public interface TilePaint
{
/**
* Gets the RGB value of the paint.

View File

@@ -36,10 +36,10 @@ public enum VarClientInt
{
TOOLTIP_TIMEOUT(1),
/**
* 0 = no tooltip displayed
* 1 = tooltip displaying
*/
/**
* 0 = no tooltip displayed
* 1 = tooltip displaying
*/
TOOLTIP_VISIBLE(2),
/**
@@ -50,7 +50,11 @@ public enum VarClientInt
MEMBERSHIP_STATUS(103),
INVENTORY_TAB(171),
/**
* The currently open interface tab
* @see net.runelite.api.vars.InterfaceTab
*/
INTERFACE_TAB(171),
WORLD_MAP_SEARCH_FOCUSED(190);

View File

@@ -34,6 +34,7 @@ import lombok.Getter;
@Getter
public enum VarClientStr
{
DUEL_OPPONENT_NAME(357),
CHATBOX_TYPED_TEXT(335),
INPUT_TEXT(359),
PRIVATE_MESSAGE_TARGET(360),

View File

@@ -34,6 +34,7 @@ import lombok.Getter;
@Getter
public enum VarPlayer
{
DUEL_PENDING(286),
ATTACK_STYLE(43),
QUEST_POINTS(101),
IS_POISONED(102),
@@ -52,6 +53,8 @@ public enum VarPlayer
IN_RAID_PARTY(1427),
NMZ_REWARD_POINTS(1060),
ATTACKING_PLAYER(1075),
/**
* -1 : Poison immune
@@ -162,7 +165,101 @@ public enum VarPlayer
MUSIC_TRACKS_UNLOCKED_16(1009),
MUSIC_TRACKS_UNLOCKED_17(1338),
MUSIC_TRACKS_UNLOCKED_18(1681),
MUSIC_TRACKS_UNLOCKED_19(2065);
MUSIC_TRACKS_UNLOCKED_19(2065),
private final int id;
/**
* f2p Quest varbits, these don't hold the completion value.
*/
QUEST_BLACK_KNIGHTS_FORTRESS(130),
QUEST_COOKS_ASSISTANT(29),
QUEST_DORICS_QUEST(31),
QUEST_DRAGON_SLAYER(176),
QUEST_ERNEST_THE_CHICKEN(32),
QUEST_IMP_CATCHER(160),
QUEST_THE_KNIGHTS_SWORD(122),
QUEST_PIRATES_TREASURE(71),
QUEST_PRINCE_ALI_RESCUE(273),
QUEST_THE_RESTLESS_GHOST(107),
QUEST_ROMEO_AND_JULIET(144),
QUEST_RUNE_MYSTERIES(63),
QUEST_SHEEP_SHEARER(179),
QUEST_SHIELD_OF_ARRAV(145),
QUEST_SHIELD_OF_ARRAV_STATE_146(146),
QUEST_VAMPIRE_SLAYER(178),
QUEST_WITCHS_POTION(67),
/**
* member Quest varbits, these don't hold the completion value.
*/
QUEST_BIG_CHOMPY_BIRD_HUNTING(293),
QUEST_BIOHAZARD(68),
QUEST_CABIN_FEVER(655),
QUEST_CLOCK_TOWER(10),
QUEST_CREATURE_OF_FENKENSTRAIN(399),
QUEST_DEATH_PLATEAU(314),
QUEST_THE_DIG_SITE(131),
QUEST_DRUIDIC_RITUAL(80),
QUEST_DWARF_CANNON(0),
QUEST_EADGARS_RUSE(335),
QUEST_ELEMENTAL_WORKSHOP_I(299),
QUEST_FAMILY_CREST(148),
QUEST_FIGHT_ARENA(17),
QUEST_FISHING_CONTEST(11),
QUEST_THE_FREMENNIK_TRIALS(347),
QUEST_WATERFALL_QUEST(65),
QUEST_GERTRUDES_CAT(180),
QUEST_THE_GRAND_TREE(150),
QUEST_HAUNTED_MINE(382),
QUEST_HAZEEL_CULT(223),
QUEST_HEROES_QUEST(188),
QUEST_HOLY_GRAIL(5),
QUEST_IN_SEARCH_OF_THE_MYREQUE(387),
QUEST_JUNGLE_POTION(175),
QUEST_LEGENDS_QUEST(139),
QUEST_LOST_CITY(147),
QUEST_MERLINS_CRYSTAL(14),
QUEST_MONKEY_MADNESS_I(365),
QUEST_MONKS_FRIEND(30),
QUEST_MOURNINGS_END_PART_I(517),
QUEST_MURDER_MYSTERY(192),
QUEST_NATURE_SPIRIT(307),
QUEST_OBSERVATORY_QUEST(112),
QUEST_ONE_SMALL_FAVOUR(416),
QUEST_PLAGUE_CITY(165),
QUEST_PRIEST_IN_PERIL(302),
QUEST_RAG_AND_BONE_MAN(714),
QUEST_REGICIDE(328),
QUEST_ROVING_ELVES(402),
QUEST_RUM_DEAL(600),
QUEST_SCORPION_CATCHER(76),
QUEST_SEA_SLUG(159),
QUEST_SHADES_OF_MORTTON(339),
QUEST_SHEEP_HERDER(60),
QUEST_SHILO_VILLAGE(116),
QUEST_TAI_BWO_WANNAI_TRIO(320),
QUEST_TEMPLE_OF_IKOV(26),
QUEST_THRONE_OF_MISCELLANIA(359),
QUEST_THE_TOURIST_TRAP(197),
QUEST_WITCHS_HOUSE(226),
QUEST_TREE_GNOME_VILLAGE(111),
QUEST_TRIBAL_TOTEM(200),
QUEST_TROLL_ROMANCE(385),
QUEST_TROLL_STRONGHOLD(317),
QUEST_UNDERGROUND_PASS(161),
QUEST_UNDERGROUND_PASS_STATE_162(162),
QUEST_WATCHTOWER(212),
QUEST_THE_GREAT_BRAIN_ROBBERY(980),
QUEST_RAG_AND_BONE_MAN_II(714),
/**
* mini-quest varbits, these don't hold the completion value.
*/
QUEST_ENTER_THE_ABYSS(492),
QUEST_ALFRED_GRIMHANDS_BARCRAWL(77),
QUEST_ALFRED_GRIMHANDS_BARCRAWL_STATE_76(76),
QUEST_THE_MAGE_ARENA(267);
public final int id;
}

View File

@@ -49,6 +49,11 @@ public enum Varbits
*/
CHAT_SCROLLBAR_ON_LEFT(6374),
/**
* Grand Exchange
*/
GRAND_EXCHANGE_PRICE_PER_ITEM(4398),
/**
* Runepouch
*/
@@ -233,12 +238,12 @@ public enum Varbits
/**
* Blast Furnace Bar Dispenser
*
* <p>
* These are the expected values:
* 0 = No bars being processed
* 1 = Ores are being processed on the conveyor belt, bar dispenser cannot be checked
* 2 = Bars are cooling down
* 3 = Bars can be collected
* 0 = No bars being processed
* 1 = Ores are being processed on the conveyor belt, bar dispenser cannot be checked
* 2 = Bars are cooling down
* 3 = Bars can be collected
*/
BAR_DISPENSER(936),
@@ -250,11 +255,11 @@ public enum Varbits
/**
* Experience tracker
*
* <p>
* EXPERIENCE_TRACKER_POSITION expected values:
* 0 = Right
* 1 = Middle
* 2 = Left
* 0 = Right
* 1 = Middle
* 2 = Left
*/
EXPERIENCE_TRACKER_POSITION(4692),
EXPERIENCE_TRACKER_COUNTER(4697),
@@ -271,7 +276,7 @@ public enum Varbits
TITHE_FARM_SACK_AMOUNT(4900),
TITHE_FARM_SACK_ICON(5370),
TITHE_FARM_POINTS(4893),
/**
* Blast Mine
*/
@@ -293,12 +298,23 @@ public enum Varbits
* Theatre of Blood 1=In Party, 2=Inside/Spectator, 3=Dead Spectating
*/
THEATRE_OF_BLOOD(6440),
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
*/
NMZ_ABSORPTION(3956),
NMZ_POINTS(3949),
NMZ_OVERLOAD(3955),
/**
* Blast Furnace
@@ -328,7 +344,7 @@ public enum Varbits
* Pyramid plunder
*/
PYRAMID_PLUNDER_TIMER(2375),
PYRAMID_PLUNDER_ROOM(2377),
PYRAMID_PLUNDER_ROOM(2374),
/**
* Barrows
@@ -355,6 +371,11 @@ public enum Varbits
*/
MULTICOMBAT_AREA(4605),
/**
* In the Wilderness
*/
IN_THE_WILDERNESS(5963),
/**
* Kingdom Management
*/
@@ -374,12 +395,12 @@ public enum Varbits
DAILY_ESSENCE_COLLECTED(4547),
DAILY_RUNES_COLLECTED(4540),
DAILY_SAND_COLLECTED(4549),
DAILY_FLAX_STATE(4559),
DAILY_ARROWS_STATE(4563),
DAILY_FLAX_STATE(4559),
/**
* This varbit tracks how much bonemeal has been redeemed from Robin
* The player gets 13 for each diary completed above and including Medium, for a maxiumum of 39
*/
*/
DAILY_BONEMEAL_STATE(4543),
DAILY_DYNAMITE_COLLECTED(7939),
@@ -435,11 +456,16 @@ public enum Varbits
*/
ACCOUNT_TYPE(1777),
/**
* Varbit used for Slayer reward points
*/
SLAYER_REWARD_POINTS(4068),
/**
* The varbit that stores the oxygen percentage for player
*/
OXYGEN_LEVEL(5811),
/**
* Corp beast damage
*/
@@ -466,6 +492,14 @@ public enum Varbits
*/
VENGEANCE_COOLDOWN(2451),
/**
* 0 = standard
* 1 = ancients
* 2 = lunars
* 3 = arrceus
**/
SPELLBOOK(4070),
/**
* Amount of items in each bank tab
*/
@@ -486,6 +520,13 @@ public enum Varbits
*/
GE_OFFER_CREATION_TYPE(4397),
/**
* Spells being auto-casted
*/
AUTO_CAST_SPELL(276),
/**
* The active tab within the quest interface
*/
@@ -499,10 +540,156 @@ public enum Varbits
EXPLORER_RING_ALCHS(4554),
EXPLORER_RING_RUNENERGY(4553),
WINTERTODT_TIMER(7980);
/**
* Temple Trekking
*/
TREK_POINTS(1955),
TREK_STARTED(1956),
TREK_EVENT(1958),
TREK_STATUS(6719),
BLOAT_ENTERED_ROOM(6447),
/**
* f2p Quest varbits, these don't hold the completion value.
*/
QUEST_DEMON_SLAYER(2561),
QUEST_GOBLIN_DIPLOMACY(2378),
QUEST_MISTHALIN_MYSTERY(3468),
QUEST_THE_CORSAIR_CURSE(6071),
QUEST_X_MARKS_THE_SPOT(8063),
/**
* member Quest varbits, these don't hold the completion value.
*/
QUEST_ANIMAL_MAGNETISM(3185),
QUEST_BETWEEN_A_ROCK(299),
QUEST_CONTACT(3274),
QUEST_ZOGRE_FLESH_EATERS(487),
QUEST_DARKNESS_OF_HALLOWVALE(2573),
QUEST_DEATH_TO_THE_DORGESHUUN(2258),
QUEST_DESERT_TREASURE(358),
QUEST_DEVIOUS_MINDS(1465),
QUEST_EAGLES_PEAK(2780),
QUEST_ELEMENTAL_WORKSHOP_II(2639),
QUEST_ENAKHRAS_LAMENT(1560),
QUEST_ENLIGHTENED_JOURNEY(2866),
QUEST_THE_EYES_OF_GLOUPHRIE(2497),
QUEST_FAIRYTALE_I_GROWING_PAINS(1803),
QUEST_FAIRYTALE_II_CURE_A_QUEEN(2326),
QUEST_THE_FEUD(334), // 14 = able to pickpocket
QUEST_FORGETTABLE_TALE(822),
QUEST_GARDEN_OF_TRANQUILLITY(961),
QUEST_GHOSTS_AHOY(217),
QUEST_THE_GIANT_DWARF(571),
QUEST_THE_GOLEM(346),
QUEST_HORROR_FROM_THE_DEEP(34),
QUEST_ICTHLARINS_LITTLE_HELPER(418),
QUEST_IN_AID_OF_THE_MYREQUE(1990),
QUEST_THE_LOST_TRIBE(532),
QUEST_LUNAR_DIPLOMACY(2448),
QUEST_MAKING_HISTORY(1383),
QUEST_MOUNTAIN_DAUGHTER(260),
QUEST_MOURNINGS_END_PART_II(1103),
QUEST_MY_ARMS_BIG_ADVENTURE(2790),
QUEST_RATCATCHERS(1404),
QUEST_RECIPE_FOR_DISASTER(1850),
QUEST_RECRUITMENT_DRIVE(657),
QUEST_ROYAL_TROUBLE(2140),
QUEST_THE_SLUG_MENACE(2610),
QUEST_SHADOW_OF_THE_STORM(1372),
QUEST_A_SOULS_BANE(2011),
QUEST_SPIRITS_OF_THE_ELID(1444),
QUEST_SWAN_SONG(2098),
QUEST_A_TAIL_OF_TWO_CATS(1028),
QUEST_TEARS_OF_GUTHIX(451),
QUEST_WANTED(1051),
QUEST_COLD_WAR(3293),
QUEST_THE_FREMENNIK_ISLES(3311),
QUEST_TOWER_OF_LIFE(3337),
QUEST_WHAT_LIES_BELOW(3523),
QUEST_OLAFS_QUEST(3534),
QUEST_ANOTHER_SLICE_OF_HAM(3550),
QUEST_DREAM_MENTOR(3618),
QUEST_GRIM_TALES(2783),
QUEST_KINGS_RANSOM(3888),
QUEST_MONKEY_MADNESS_II(5027),
QUEST_CLIENT_OF_KOUREND(5619),
QUEST_BONE_VOYAGE(5795),
QUEST_THE_QUEEN_OF_THIEVES(6037),
QUEST_THE_DEPTHS_OF_DESPAIR(6027),
QUEST_DRAGON_SLAYER_II(6104),
QUEST_TALE_OF_THE_RIGHTEOUS(6358),
QUEST_A_TASTE_OF_HOPE(6396),
QUEST_MAKING_FRIENDS_WITH_MY_ARM(6528),
QUEST_THE_ASCENT_OF_ARCEUUS(7856),
QUEST_THE_FORSAKEN_TOWER(7796),
//TODO
QUEST_SONG_OF_THE_ELVES(7796),
/**
* mini-quest varbits, these don't hold the completion value.
*/
QUEST_ARCHITECTURAL_ALLIANCE(4982),
QUEST_BEAR_YOUR_SOUL(5078),
QUEST_CURSE_OF_THE_EMPTY_LORD(821),
QUEST_ENCHANTED_KEY(1391),
QUEST_THE_GENERALS_SHADOW(3330),
QUEST_SKIPPY_AND_THE_MOGRES(1344),
QUEST_LAIR_OF_TARN_RAZORLOR(3290),
QUEST_FAMILY_PEST(5347),
QUEST_THE_MAGE_ARENA_II(6067),
//TODO
QUEST_IN_SEARCH_OF_KNOWLEDGE(6067),
/**
* Spellbook filtering (1 = unfiltered, 0 = filtered)
*/
FILTER_SPELLBOOK(6718),
/**
* POH Building mode (1 = yes, 0 = no)
*/
BUILDING_MODE(2176),
WINTERTODT_TIMER(7980),
/**
* 1 if in game, 0 if not
*/
LMS_IN_GAME(5314),
/**
* Amount of pvp kills in current game
*/
LMS_KILLS(5315),
/**
* The x coordinate of the final safespace (world coord)
*/
LMS_SAFE_X(5316),
/**
* Starts at 100, counts down every 10 ticks (6 seconds)
*/
LMS_POISON_PROGRESS(5317),
/**
* The y coordinate of the final safespace (world coord)
*/
LMS_SAFE_Y(5320),
/**
* 1 is true, 0 is false.
*/
GAUNTLET_FINAL_ROOM_ENTERED(9177),
/**
* 1 is true, 0 is false.
*/
GAUNTLET_ENTERED(9178);
/**
* The raw varbit ID.
*/
private final int id;
}
}

View File

@@ -25,36 +25,34 @@
package net.runelite.api;
/**
* Represents one or two walls on a tile
* Represents the wall of a tile, which is an un-passable boundary.
*/
public interface WallObject extends TileObject
{
/**
* A bitfield with the orientation of a wall
* 1 = East
* 2 = North
* 4 = West
* 8 = South
* Gets the first orientation of the wall.
*
* @return the first orientation, 0-2048 where 0 is north
*/
int getOrientationA();
/**
* A bitfield containing the orientation of the second wall on this tile,
* or 0 if there is no second wall.
* @see #getOrientationA
* Gets the second orientation value of the wall.
*
* @return the second orientation, 0-2048 where 0 is north
*/
int getOrientationB();
/**
* A bitfield containing various flags:
* <pre>{@code
* object type id = bits & 0x20
* orientation (0-3) = bits >>> 6 & 3
* supports items = bits >>> 8 & 1
* }</pre>
* Gets the boundary configuration of the wall.
*
* @return the boundary configuration
*/
int getConfig();
Renderable getRenderable1();
Renderable getRenderable2();
Entity getEntity1();
Entity getEntity2();
Model getModelA();
Model getModelB();
}

View File

@@ -1,27 +1,3 @@
/*
* Copyright (c) 2017, 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.api;
/**

View File

@@ -1,29 +1,4 @@
/*
* Copyright (c) 2018, Tomas Slusny <slusnucky@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.api;
import java.util.EnumSet;
/**

View File

@@ -1,27 +1,3 @@
/*
* Copyright (c) 2018, Tomas Slusny <slusnucky@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.api;
import java.util.Collection;
@@ -86,6 +62,40 @@ public enum WorldType
PVP,
SEASONAL_DEADMAN
);
private static final EnumSet<WorldType> DEADMAN_WORLD_TYPES = EnumSet.of(
DEADMAN,
DEADMAN_TOURNAMENT,
SEASONAL_DEADMAN
);
private static final EnumSet<WorldType> HIGHRISK_WORLD_TYPES = EnumSet.of(
HIGH_RISK
);
private static final EnumSet<WorldType> ALL_HIGHRISK_WORLD_TYPES = EnumSet.of(
HIGH_RISK,
DEADMAN,
DEADMAN_TOURNAMENT,
SEASONAL_DEADMAN
);
private static final EnumSet<WorldType> ALL_PVP_WORLD_TYPES = EnumSet.of(
HIGH_RISK,
DEADMAN,
DEADMAN_TOURNAMENT,
PVP,
SEASONAL_DEADMAN
);
private static final EnumSet<WorldType> ALL_PK_WORLD_TYPES = EnumSet.of(
HIGH_RISK,
DEADMAN,
DEADMAN_TOURNAMENT,
PVP,
SEASONAL_DEADMAN,
BOUNTY
);
/**
* Create enum set of world types from mask.
@@ -127,14 +137,39 @@ public enum WorldType
}
/**
* Checks whether a world having a {@link Collection} of {@link WorldType}s is a PVP world.
* Checks whether a world having a {@link Collection} of {@link WorldType}s is a PVP/DEADMAN/HIGHRISK world.
*
* @param worldTypes A {@link Collection} of {@link WorldType}s describing the given world.
* @return True if the given worldtypes of the world are a PVP world, false otherwise.
* @return True if the given worldtypes of the world are a PVP/DEADMAN/HIGHRISK world, false otherwise.
* @see Client#getWorldType()
*/
public static boolean isPvpWorld(final Collection<WorldType> worldTypes)
{
return worldTypes.stream().anyMatch(PVP_WORLD_TYPES::contains);
}
public static boolean isDeadmanWorld(final Collection<WorldType> worldTypes)
{
return worldTypes.stream().anyMatch(DEADMAN_WORLD_TYPES::contains);
}
public static boolean isHighRiskWorld(final Collection<WorldType> worldTypes)
{
return worldTypes.stream().anyMatch(HIGHRISK_WORLD_TYPES::contains);
}
public static boolean isAllHighRiskWorld(final Collection<WorldType> worldTypes)
{
return worldTypes.stream().anyMatch(ALL_HIGHRISK_WORLD_TYPES::contains);
}
public static boolean isAllPvpWorld(final Collection<WorldType> worldTypes)
{
return worldTypes.stream().anyMatch(ALL_PVP_WORLD_TYPES::contains);
}
public static boolean isAllPKWorld(final Collection<WorldType> worldTypes)
{
return worldTypes.stream().anyMatch(ALL_PK_WORLD_TYPES::contains);
}
}

View File

@@ -0,0 +1,105 @@
/*
* Copyright (c) 2018, 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.config;
import java.awt.Dimension;
/**
* A utility class containing constant values.
*/
public class Constants
{
/**
* The original width of the game when running in fixed mode.
*/
public static final int GAME_FIXED_WIDTH = 765;
/**
* The original height of the game when running in fixed mode.
*/
public static final int GAME_FIXED_HEIGHT = 503;
/**
* Dimension representation of the width and height of the game in fixed mode.
*/
public static final Dimension GAME_FIXED_SIZE = new Dimension(GAME_FIXED_WIDTH, GAME_FIXED_HEIGHT);
/**
* The aspect ratio of the game when running in fixed mode.
*/
public static final double GAME_FIXED_ASPECT_RATIO = (double) GAME_FIXED_WIDTH / (double) GAME_FIXED_HEIGHT;
/**
* The default camera zoom value.
*/
public static final int CLIENT_DEFAULT_ZOOM = 512;
/**
* The width and length of a chunk (8x8 tiles).
*/
public static final int CHUNK_SIZE = 8;
/**
* The width and length of a map region (64x64 tiles).
*/
public static final int REGION_SIZE = 64;
/**
* The width and length of the scene (13 chunks x 8 tiles).
*/
public static final int SCENE_SIZE = 104;
/**
* The max allowed plane by the game.
* <p>
* This value is exclusive. The plane is set by 2 bits which restricts
* the plane value to 0-3.
*/
public static final int MAX_Z = 4;
public static final int TILE_FLAG_BRIDGE = 2;
/**
* The number of milliseconds in a client tick.
* <p>
* This is the length of a single frame when the client is running at
* the maximum framerate of 50 fps.
*/
public static final int CLIENT_TICK_LENGTH = 20;
/**
* The number of milliseconds in a server game tick.
* <p>
* This is the length of a single game cycle under ideal conditions.
* All game-play actions operate within multiples of this duration.
*/
public static final int GAME_TICK_LENGTH = 600;
/**
* Used when getting High Alchemy value - multiplied by general store price.
*/
public static final float HIGH_ALCHEMY_CONSTANT = 0.6f;
}

View File

@@ -24,11 +24,11 @@
*/
package net.runelite.api.coords;
import lombok.Value;
import static net.runelite.api.coords.Direction.EAST;
import static net.runelite.api.coords.Direction.NORTH;
import static net.runelite.api.coords.Direction.SOUTH;
import static net.runelite.api.coords.Direction.WEST;
import lombok.Value;
/**
* Represents an in-game orientation that uses fixed point arithmetic.

View File

@@ -25,10 +25,10 @@
*/
package net.runelite.api.coords;
import javax.annotation.Nullable;
import lombok.Value;
import net.runelite.api.Client;
import net.runelite.api.Perspective;
import javax.annotation.Nullable;
import lombok.Value;
/**
* A two-dimensional point in the local coordinate space.

View File

@@ -31,9 +31,9 @@ import lombok.Getter;
import net.runelite.api.Client;
import net.runelite.api.CollisionData;
import net.runelite.api.CollisionDataFlag;
import net.runelite.api.Constants;
import net.runelite.api.Point;
import net.runelite.api.Tile;
import net.runelite.api.Constants;
/**
* Represents an area on the world.
@@ -184,6 +184,25 @@ public class WorldArea
return isInMeleeDistance(new WorldArea(other, 1, 1));
}
/**
* Checks whether this area is within melee distance of another without blocking in-between.
*
* @param client the client to test in
* @param other the other area
* @return true if in melee distance without blocking, false otherwise
*/
public boolean canMelee(Client client, WorldArea other)
{
if (isInMeleeDistance(other))
{
Point p1 = this.getComparisonPoint(other);
Point p2 = other.getComparisonPoint(this);
WorldArea w1 = new WorldArea(p1.getX(), p1.getY() , 1, 1, this.getPlane());
return (w1.canTravelInDirection(client, p2.getX() - p1.getX(), p2.getY() - p1.getY()));
}
return false;
}
/**
* Checks whether this area intersects with another.
*
@@ -208,7 +227,7 @@ public class WorldArea
* Note that this method does not consider other actors as
* a collision, but most non-boss NPCs do check for collision
* with some actors. For actor collision checking, use the
* {@link #canTravelInDirection(Client, int, int, Predicate)} method.
* {@link #canTravelInDirection(Client, int, int, java.util.function.Predicate)} method.
*
* @param client the client to test in
* @param dx the x-axis direction to travel (-1, 0, or 1)
@@ -252,8 +271,16 @@ public class WorldArea
LocalPoint lp = LocalPoint.fromWorld(client, x, y);
int startX = lp.getSceneX() + dx;
int startY = lp.getSceneY() + dy;
int startX = 0;
if (lp != null)
{
startX = lp.getSceneX() + dx;
}
int startY = 0;
if (lp != null)
{
startY = lp.getSceneY() + dy;
}
int checkX = startX + (dx > 0 ? width - 1 : 0);
int checkY = startY + (dy > 0 ? height - 1 : 0);
int endX = startX + width - 1;
@@ -408,11 +435,8 @@ public class WorldArea
}
if (height == 1)
{
if ((collisionDataFlags[checkX - dx][checkY] & yFlags) != 0 &&
extraCondition.test(WorldPoint.fromScene(client, startX, checkY, client.getPlane())))
{
return false;
}
return (collisionDataFlags[checkX - dx][checkY] & yFlags) == 0 ||
!extraCondition.test(WorldPoint.fromScene(client, startX, checkY, client.getPlane()));
}
}

View File

@@ -25,13 +25,13 @@
*/
package net.runelite.api.coords;
import static net.runelite.api.Constants.CHUNK_SIZE;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import lombok.Value;
import net.runelite.api.Client;
import static net.runelite.api.Constants.CHUNK_SIZE;
import net.runelite.api.Perspective;
/**
@@ -305,6 +305,40 @@ public class WorldPoint
return Math.max(Math.abs(getX() - other.getX()), Math.abs(getY() - other.getY()));
}
/**
* Gets the straight-line distance between this point and another.
* <p>
* If the other point is not on the same plane, this method will return
* {@link Float#MAX_VALUE}. If ignoring the plane is wanted, use the
* {@link #distanceTo2DHypotenuse(WorldPoint)} method.
*
* @param other other point
* @return the straight-line distance
*/
public float distanceToHypotenuse(WorldPoint other)
{
if (other.plane != plane)
{
return Float.MAX_VALUE;
}
return distanceTo2DHypotenuse(other);
}
/**
* Find the straight-line distance from this point to another point.
* <p>
* This method disregards the plane value of the two tiles and returns
* the simple distance between the X-Z coordinate pairs.
*
* @param other other point
* @return the straight-line distance
*/
public float distanceTo2DHypotenuse(WorldPoint other)
{
return (float) Math.hypot(getX() - other.getX(), getY() - other.getY());
}
/**
* Converts the passed scene coordinates to a world space
*/
@@ -327,6 +361,23 @@ public class WorldPoint
return ((x >> 6) << 8) | (y >> 6);
}
/**
* Checks if user in within certain zone specified by upper and lower bound
* @param lowerBound
* @param upperBound
* @param userLocation
* @return
*/
public static boolean isInZone(WorldPoint lowerBound, WorldPoint upperBound, WorldPoint userLocation)
{
return userLocation.getX() >= lowerBound.getX()
&& userLocation.getX() <= upperBound.getX()
&& userLocation.getY() >= lowerBound.getY()
&& userLocation.getY() <= upperBound.getY()
&& userLocation.getPlane() >= lowerBound.getPlane()
&& userLocation.getPlane() <= upperBound.getPlane();
}
/**
* Converts the passed region ID and coordinates to a world coordinate
*/

View File

@@ -1,31 +1,7 @@
/*
* Copyright (c) 2016-2017, Abel Briggs
* 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.events;
import lombok.Data;
import net.runelite.api.Actor;
import lombok.Data;
/**
* An event where the {@link Actor} has changed animations.
@@ -41,7 +17,7 @@ import net.runelite.api.Actor;
* @see net.runelite.api.AnimationID
*/
@Data
public class AnimationChanged
public class AnimationChanged implements Event
{
/**
* The actor that has entered a new animation.

View File

@@ -27,7 +27,7 @@ package net.runelite.api.events;
import lombok.Data;
@Data
public class AreaSoundEffectPlayed
public class AreaSoundEffectPlayed implements Event
{
private int soundId;
private int sceneX;

View File

@@ -27,7 +27,7 @@ package net.runelite.api.events;
import lombok.Data;
@Data
public class BeforeMenuRender
public class BeforeMenuRender implements Event
{
private boolean consumed;

View File

@@ -27,6 +27,12 @@ package net.runelite.api.events;
/**
* Posted at the start of every frame
*/
public class BeforeRender
public class BeforeRender implements Event
{
public static final BeforeRender INSTANCE = new BeforeRender();
private BeforeRender()
{
// noop
}
}

View File

@@ -1,51 +1,51 @@
/*
* Copyright (c) 2018, 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.api.events;
import lombok.Data;
import net.runelite.api.Skill;
/**
* An event where a players skill level has been temporarily modified.
* <p>
* Examples of when this event may trigger include:
* <ul>
* <li>Prayer points draining or being restored at an altar or restoration pool</li>
* <li>Positive and negative effects gained from potions (ie. Saradomin brew)</li>
* <li>Earning skill points towards a skill</li>
* <li>Levelling up a skill</li>
* </ul>
* <p>
* Use {@link net.runelite.api.Client#getBoostedSkillLevel(Skill)} in order to
* retrieve the newly boosted skill level.
*/
@Data
public class BoostedLevelChanged
{
/**
* The skill that has had its level modified.
*/
private Skill skill;
}
/*
* Copyright (c) 2018, 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.api.events;
import net.runelite.api.Skill;
import lombok.Data;
/**
* An event where a players skill level has been temporarily modified.
* <p>
* Examples of when this event may trigger include:
* <ul>
* <li>Prayer points draining or being restored at an altar or restoration pool</li>
* <li>Positive and negative effects gained from potions (ie. Saradomin brew)</li>
* <li>Earning skill points towards a skill</li>
* <li>Levelling up a skill</li>
* </ul>
* <p>
* Use {@link net.runelite.api.Client#getBoostedSkillLevel(Skill)} in order to
* retrieve the newly boosted skill level.
*/
@Data
public class BoostedLevelChanged implements Event
{
/**
* The skill that has had its level modified.
*/
private Skill skill;
}

View File

@@ -0,0 +1,38 @@
/*
* Copyright (c) 2019, Davis Cook <https://github.com/daviscook477>
* 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.events;
/**
* an event posted when a cannonball is fired
*/
public class CannonballFired implements Event
{
public static final CannonballFired INSTANCE = new CannonballFired();
private CannonballFired()
{
// noop
}
}

View File

@@ -27,6 +27,12 @@ package net.runelite.api.events;
/**
* An event posted when the canvas size might have changed.
*/
public class CanvasSizeChanged
public class CanvasSizeChanged implements Event
{
public static final CanvasSizeChanged INSTANCE = new CanvasSizeChanged();
private CanvasSizeChanged()
{
// noop
}
}

View File

@@ -24,11 +24,11 @@
*/
package net.runelite.api.events;
import net.runelite.api.ChatMessageType;
import net.runelite.api.MessageNode;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import net.runelite.api.ChatMessageType;
import net.runelite.api.MessageNode;
/**
* An event where a new chat message is received.
@@ -41,7 +41,7 @@ import net.runelite.api.MessageNode;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ChatMessage
public class ChatMessage implements Event
{
/**
* The underlying MessageNode for the message.

View File

@@ -30,7 +30,7 @@ import lombok.Value;
* An event where the client has joined or left a clan chat.
*/
@Value
public class ClanChanged
public class ClanChanged implements Event
{
/**
* Whether or not the client is now in a clan chat.

View File

@@ -24,11 +24,11 @@
*/
package net.runelite.api.events;
import lombok.Value;
import net.runelite.api.ClanMember;
import lombok.Value;
@Value
public class ClanMemberJoined
public class ClanMemberJoined implements Event
{
/**
* The ClanMember that joined

View File

@@ -24,11 +24,11 @@
*/
package net.runelite.api.events;
import lombok.Value;
import net.runelite.api.ClanMember;
import lombok.Value;
@Value
public class ClanMemberLeft
public class ClanMemberLeft implements Event
{
/**
* The ClanMember that left

View File

@@ -27,6 +27,12 @@ package net.runelite.api.events;
/**
* Posted every client tick
*/
public class ClientTick
public class ClientTick implements Event
{
public static final ClientTick INSTANCE = new ClientTick();
private ClientTick()
{
// noop
}
}

View File

@@ -42,7 +42,7 @@ import lombok.Value;
* will set command to "" and arguments to ["hello", "world!"].
*/
@Value
public class CommandExecuted
public class CommandExecuted implements Event
{
/**
* The name of the command entered.

View File

@@ -30,7 +30,7 @@ import lombok.Data;
* An event where a configuration entry has been modified.
*/
@Data
public class ConfigChanged
public class ConfigChanged implements Event
{
/**
* The parent group for the key.

View File

@@ -24,16 +24,16 @@
*/
package net.runelite.api.events;
import lombok.Data;
import net.runelite.api.DecorativeObject;
import net.runelite.api.Tile;
import lombok.Data;
/**
* An event where the {@link DecorativeObject} attached to a {@link Tile}
* has been modified.
*/
@Data
public class DecorativeObjectChanged
public class DecorativeObjectChanged implements Event
{
/**
* The affected tile.

View File

@@ -24,16 +24,16 @@
*/
package net.runelite.api.events;
import lombok.Data;
import net.runelite.api.DecorativeObject;
import net.runelite.api.Tile;
import lombok.Data;
/**
* An event where the {@link DecorativeObject} attached to a {@link Tile}
* is removed.
*/
@Data
public class DecorativeObjectDespawned
public class DecorativeObjectDespawned implements Event
{
/**
* The affected tile.

View File

@@ -24,15 +24,15 @@
*/
package net.runelite.api.events;
import lombok.Data;
import net.runelite.api.DecorativeObject;
import net.runelite.api.Tile;
import lombok.Data;
/**
* An event where a {@link DecorativeObject} is attached to a {@link Tile}.
*/
@Data
public class DecorativeObjectSpawned
public class DecorativeObjectSpawned implements Event
{
/**
* The affected tile.

View File

@@ -31,7 +31,7 @@ import lombok.Data;
* the cursor.
*/
@Data
public class DraggingWidgetChanged
public class DraggingWidgetChanged implements Event
{
/**
* Whether a widget is currently being dragged.

View File

@@ -0,0 +1,16 @@
package net.runelite.api.events;
import lombok.Data;
@Data
public class DynamicObjectAnimationChanged implements Event
{
/**
* The object that has entered a new animation.
*/
private int object;
/**
* The id of the animation animation.
*/
private int animation;
}

View File

@@ -0,0 +1,5 @@
package net.runelite.api.events;
public interface Event
{
}

View File

@@ -25,14 +25,14 @@
package net.runelite.api.events;
import lombok.Data;
import net.runelite.api.Skill;
import lombok.Data;
/**
* An event where the experience level of a {@link Skill} has been modified.
*/
@Data
public class ExperienceChanged
public class ExperienceChanged implements Event
{
/**
* The modified skill.

View File

@@ -37,7 +37,7 @@ import lombok.Data;
* </ul>
*/
@Data
public class FocusChanged
public class FocusChanged implements Event
{
/**
* The new focus state.

View File

@@ -0,0 +1,15 @@
package net.runelite.api.events;
import lombok.Value;
/**
* An event where a request to add a friend is sent to the server.
*/
@Value
public class FriendAdded implements Event
{
/**
* The name of the added friend.
*/
private final String name;
}

View File

@@ -30,7 +30,7 @@ import lombok.Value;
* An event where a request to remove a friend is sent to the server.
*/
@Value
public class RemovedFriend
public class FriendRemoved implements Event
{
/**
* The name of the removed friend.

View File

@@ -32,7 +32,7 @@ import net.runelite.api.Tile;
* An event where a {@link GameObject} on a {@link Tile} has been replaced.
*/
@Data
public class GameObjectChanged
public class GameObjectChanged implements Event
{
/**
* The affected tile.

View File

@@ -24,15 +24,15 @@
*/
package net.runelite.api.events;
import lombok.Data;
import net.runelite.api.GameObject;
import net.runelite.api.Tile;
import lombok.Data;
/**
* An event where a {@link GameObject} on a {@link Tile} is removed.
*/
@Data
public class GameObjectDespawned
public class GameObjectDespawned implements Event
{
/**
* The affected tile.

View File

@@ -24,15 +24,15 @@
*/
package net.runelite.api.events;
import lombok.Data;
import net.runelite.api.GameObject;
import net.runelite.api.Tile;
import lombok.Data;
/**
* An event where a {@link GameObject} is added to a {@link Tile}.
*/
@Data
public class GameObjectSpawned
public class GameObjectSpawned implements Event
{
/**
* The affected tile.

View File

@@ -24,14 +24,14 @@
*/
package net.runelite.api.events;
import lombok.Data;
import net.runelite.api.GameState;
import lombok.Data;
/**
* An event where the clients game state has changed.
*/
@Data
public class GameStateChanged
public class GameStateChanged implements Event
{
/**
* The new game state.

View File

@@ -24,8 +24,6 @@
*/
package net.runelite.api.events;
import lombok.Data;
// The NPC update event seem to run every server tick,
// but having the game tick event after all packets
// have been processed is typically more useful.
@@ -43,7 +41,12 @@ import lombok.Data;
* Note that occurrences that take place purely on the client, such as right
* click menus, are independent of the game tick.
*/
@Data
public class GameTick
public class GameTick implements Event
{
public static final GameTick INSTANCE = new GameTick();
private GameTick()
{
// noop
}
}

View File

@@ -24,25 +24,24 @@
*/
package net.runelite.api.events;
import lombok.Data;
import net.runelite.api.GrandExchangeOffer;
import net.runelite.api.GrandExchangeOfferState;
import lombok.Data;
/**
* An event where a {@link GrandExchangeOffer} has been updated with
* An event where a {GrandExchangeOffer} has been updated with
* new information.
* <p>
* When the client initially logs in, this event is called for all grand
* exchange slots with the {@link GrandExchangeOfferState#EMPTY} state,
* exchange slots with the {GrandExchangeOfferState#EMPTY} state,
* regardless of whether any slots have offers. Once the exchange is
* initialized, the client then updates any offers with items as it
* receives information from the server.
* <p>
* See {@link GrandExchangeOfferState} for potential states an offer
* See {GrandExchangeOfferState} for potential states an offer
* can change into.
*/
@Data
public class GrandExchangeOfferChanged
public class GrandExchangeOfferChanged implements Event
{
/**
* The offer that has been modified.

View File

@@ -1,52 +0,0 @@
/*
* Copyright (c) 2018, 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.api.events;
import lombok.Data;
import net.runelite.api.Actor;
/**
* An event where the graphic of an {@link Actor} has changed.
* <p>
* The graphic the player has changed to can be obtained using
* {@link Actor#getGraphic()}.
* <p>
* Examples of when this event may trigger include:
* <ul>
* <li>Casting a magic spell</li>
* <li>Using a fairy ring</li>
* <li>Breaking a teleport tab</li>
* </ul>
*
* @see net.runelite.api.GraphicID
*/
@Data
public class GraphicChanged
{
/**
* The actor that has had their graphic changed.
*/
private Actor actor;
}

View File

@@ -24,14 +24,14 @@
*/
package net.runelite.api.events;
import lombok.Value;
import net.runelite.api.GraphicsObject;
import lombok.Value;
/**
* An event where a new {@link GraphicsObject} has been created.
*/
@Value
public class GraphicsObjectCreated
public class GraphicsObjectCreated implements Event
{
/**
* The newly created graphics object.

View File

@@ -24,15 +24,15 @@
*/
package net.runelite.api.events;
import lombok.Data;
import net.runelite.api.GroundObject;
import net.runelite.api.Tile;
import lombok.Data;
/**
* An event where the {@link GroundObject} on a {@link Tile} has been changed.
*/
@Data
public class GroundObjectChanged
public class GroundObjectChanged implements Event
{
/**
* The affected tile.

Some files were not shown because too many files have changed in this diff Show More