Kept on death plugin (#59)
* Add Kept on Death Plugin Modifies the Items Kept on Death widget to be more accurate * Fix WidgetType import * Account for stackable kept items * Remove WidgetButtonRunnable * Ignore DMM worlds * Add open looting bag to always lost * Update script to the new OpCodes * Add plugin type
This commit is contained in:
@@ -491,6 +491,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.
|
||||
*
|
||||
|
||||
@@ -95,6 +95,16 @@ public final class ScriptID
|
||||
*/
|
||||
public static final int CHAT_PROMPT_INIT = 223;
|
||||
|
||||
/**
|
||||
* Displays the game messages when clicking on an item inside the Items Kept on Death interface
|
||||
* <ul>
|
||||
* <li> int (boolean) Item kept on death </li>
|
||||
* <li> int Item Quantity </li>
|
||||
* <li> String Item Name </li>
|
||||
* </ul>
|
||||
*/
|
||||
public static final int KEPT_LOST_ITEM_EXAMINE = 1603;
|
||||
|
||||
/**
|
||||
* Queries the completion state of a quest by its struct id
|
||||
* <ul>
|
||||
|
||||
@@ -821,4 +821,24 @@ public interface Widget
|
||||
* Can widgets under this widgets be scrolled in this widgets bounding box
|
||||
*/
|
||||
void setNoScrollThrough(boolean noScrollThrough);
|
||||
|
||||
/**
|
||||
* Changes the parent ID for the widget
|
||||
*/
|
||||
void setParentId(int id);
|
||||
|
||||
/**
|
||||
* Changes the ID of the widget
|
||||
*/
|
||||
void setId(int id);
|
||||
|
||||
/**
|
||||
* Sets the index of this element
|
||||
*/
|
||||
void setIndex(int index);
|
||||
|
||||
/**
|
||||
* Seems like this needs to set to true when creating new widgets
|
||||
*/
|
||||
void setIsIf3(boolean isIf3);
|
||||
}
|
||||
|
||||
@@ -134,6 +134,7 @@ public class WidgetID
|
||||
public static final int MUSIC_GROUP_ID = 239;
|
||||
public static final int MUSICTAB_GROUP_ID = 239;
|
||||
public static final int BARROWS_PUZZLE_GROUP_ID = 25;
|
||||
public static final int ITEMS_KEPT_ON_DEATH_GROUP_ID = 4;
|
||||
|
||||
static class WorldMap
|
||||
{
|
||||
@@ -382,6 +383,7 @@ public class WidgetID
|
||||
|
||||
static class ResizableViewport
|
||||
{
|
||||
static final int ITEMS_KEPT_ON_DEATH = 13;
|
||||
static final int CLAN_CHAT_TAB = 35;
|
||||
static final int FRIENDS_TAB = 37;
|
||||
static final int IGNORES_TAB = 36;
|
||||
@@ -987,4 +989,16 @@ static final int WIND_STRIKE = 5;
|
||||
static final int ANSWER3_CONTAINER = 16;
|
||||
static final int ANSWER3 = 17;
|
||||
}
|
||||
|
||||
static class KeptOnDeath
|
||||
{
|
||||
static final int KEPT_ITEMS_CONTAINER = 18;
|
||||
static final int LOST_ITEMS_CONTAINER = 21;
|
||||
static final int LOST_ITEMS_VALUE = 23;
|
||||
static final int INFORMATION_CONTAINER = 29;
|
||||
static final int MAX_ITEMS_KEPT_ON_DEATH = 30;
|
||||
static final int SAFE_ZONE_CONTAINER = 31;
|
||||
|
||||
static final int CUSTOM_TEXT_CONTAINER = 33;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,6 +251,7 @@ public enum WidgetInfo
|
||||
RESIZABLE_VIEWPORT_OPTIONS_ICON(WidgetID.RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX_GROUP_ID, WidgetID.ResizableViewport.OPTIONS_ICON),
|
||||
RESIZABLE_VIEWPORT_EMOTES_ICON(WidgetID.RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX_GROUP_ID, WidgetID.ResizableViewport.EMOTES_ICON),
|
||||
RESIZABLE_VIEWPORT_MUSIC_ICON(WidgetID.RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX_GROUP_ID, WidgetID.ResizableViewport.MUSIC_ICON),
|
||||
RESIZABLE_VIEWPORT_KEPT_ON_DEATH(WidgetID.RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX_GROUP_ID, WidgetID.ResizableViewport.ITEMS_KEPT_ON_DEATH),
|
||||
|
||||
RESIZABLE_VIEWPORT_BOTTOM_LINE(WidgetID.RESIZABLE_VIEWPORT_BOTTOM_LINE_GROUP_ID, WidgetID.Viewport.RESIZABLE_VIEWPORT_BOTTOM_LINE),
|
||||
RESIZABLE_VIEWPORT_BOTTOM_LINE_LOGOUT_BUTTON(WidgetID.RESIZABLE_VIEWPORT_BOTTOM_LINE_GROUP_ID, WidgetID.ResizableViewportBottomLine.LOGOUT_BUTTON_OVERLAY),
|
||||
@@ -562,7 +563,15 @@ public enum WidgetInfo
|
||||
EQUIPMENT_MELEE_STRENGTH(WidgetID.EQUIPMENT_PAGE_GROUP_ID, WidgetID.EquipmentWidgetIdentifiers.MELEE_STRENGTH),
|
||||
EQUIPMENT_RANGED_STRENGTH(WidgetID.EQUIPMENT_PAGE_GROUP_ID, WidgetID.EquipmentWidgetIdentifiers.RANGED_STRENGTH),
|
||||
EQUIPMENT_MAGIC_DAMAGE(WidgetID.EQUIPMENT_PAGE_GROUP_ID, WidgetID.EquipmentWidgetIdentifiers.MAGIC_DAMAGE),
|
||||
EQUIP_YOUR_CHARACTER(WidgetID.EQUIPMENT_PAGE_GROUP_ID, WidgetID.EquipmentWidgetIdentifiers.EQUIP_YOUR_CHARACTER);
|
||||
EQUIP_YOUR_CHARACTER(WidgetID.EQUIPMENT_PAGE_GROUP_ID, WidgetID.EquipmentWidgetIdentifiers.EQUIP_YOUR_CHARACTER),
|
||||
|
||||
ITEMS_KEPT_ON_DEATH_CONTAINER(WidgetID.ITEMS_KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.KEPT_ITEMS_CONTAINER),
|
||||
ITEMS_LOST_ON_DEATH_CONTAINER(WidgetID.ITEMS_KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.LOST_ITEMS_CONTAINER),
|
||||
ITEMS_KEPT_INFORMATION_CONTAINER(WidgetID.ITEMS_KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.INFORMATION_CONTAINER),
|
||||
ITEMS_KEPT_SAFE_ZONE_CONTAINER(WidgetID.ITEMS_KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.SAFE_ZONE_CONTAINER),
|
||||
ITEMS_KEPT_CUSTOM_TEXT_CONTAINER(WidgetID.ITEMS_KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.CUSTOM_TEXT_CONTAINER),
|
||||
ITEMS_LOST_VALUE(WidgetID.ITEMS_KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.LOST_ITEMS_VALUE),
|
||||
ITEMS_KEPT_MAX(WidgetID.ITEMS_KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.MAX_ITEMS_KEPT_ON_DEATH);
|
||||
|
||||
private final int groupId;
|
||||
private final int childId;
|
||||
|
||||
Reference in New Issue
Block a user