Merge pull request #84 from runelite-extended/update5
Updated added invokeMenuAction to api, removed example plugin
This commit is contained in:
@@ -1391,6 +1391,7 @@ public interface Client extends GameEngine
|
|||||||
*/
|
*/
|
||||||
void setClanMatesHidden(boolean state);
|
void setClanMatesHidden(boolean state);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets whether the local player is hidden.
|
* Sets whether the local player is hidden.
|
||||||
*
|
*
|
||||||
@@ -1610,4 +1611,7 @@ public interface Client extends GameEngine
|
|||||||
void draw2010Menu();
|
void draw2010Menu();
|
||||||
|
|
||||||
NodeCache getHealthBarCache();
|
NodeCache getHealthBarCache();
|
||||||
|
|
||||||
|
void invokeMenuAction(int var1, int var2, int var3, int var4, String var5, String var6, int var7, int var8);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1001,4 +1001,30 @@ static final int WIND_STRIKE = 5;
|
|||||||
|
|
||||||
static final int CUSTOM_TEXT_CONTAINER = 33;
|
static final int CUSTOM_TEXT_CONTAINER = 33;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class TradeScreen {
|
||||||
|
public static final int SECOND_GROUP_ID = 334;
|
||||||
|
public static final int SECOND_TRADING_WITH = 30;
|
||||||
|
public static final int SECOND_MY_OFFER = 23;
|
||||||
|
public static final int SECOND_THEIR_OFFER = 24;
|
||||||
|
public static final int SECOND_ACCEPT_FUNC = 13;
|
||||||
|
public static final int SECOND_ACCEPT_TEXT = 25;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class DuelConfig {
|
||||||
|
public static final int CONFIG_GROUP_IP = 482;
|
||||||
|
public static final int TITLE = 35;
|
||||||
|
public static final int OPPONENT_ATT = 9;
|
||||||
|
public static final int OPPONENT_STR = 13;
|
||||||
|
public static final int OPPONENT_DEF = 17;
|
||||||
|
public static final int OPPONENT_HP = 21;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class DuelResult {
|
||||||
|
public static final int RESULT_GROUP_ID = 372;
|
||||||
|
public static final int TITLE = 16;
|
||||||
|
public static final int TOTAL_STAKED = 32;
|
||||||
|
public static final int TOTAL_TAX = 39;
|
||||||
|
public static final int WINNINGS = 40;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ import net.runelite.client.config.ConfigManager;
|
|||||||
import net.runelite.client.eventbus.Subscribe;
|
import net.runelite.client.eventbus.Subscribe;
|
||||||
import net.runelite.client.plugins.Plugin;
|
import net.runelite.client.plugins.Plugin;
|
||||||
import net.runelite.client.plugins.PluginDescriptor;
|
import net.runelite.client.plugins.PluginDescriptor;
|
||||||
|
import net.runelite.client.plugins.PluginType;
|
||||||
import net.runelite.client.ui.FontManager;
|
import net.runelite.client.ui.FontManager;
|
||||||
import net.runelite.client.ui.overlay.OverlayManager;
|
import net.runelite.client.ui.overlay.OverlayManager;
|
||||||
import net.runelite.client.util.ImageUtil;
|
import net.runelite.client.util.ImageUtil;
|
||||||
@@ -64,7 +65,8 @@ import net.runelite.client.util.ImageUtil;
|
|||||||
@PluginDescriptor(
|
@PluginDescriptor(
|
||||||
name = "Barbarian Assault",
|
name = "Barbarian Assault",
|
||||||
description = "Show a timer to the next call change and game/wave duration in chat.",
|
description = "Show a timer to the next call change and game/wave duration in chat.",
|
||||||
tags = {"minigame", "overlay", "timer"}
|
tags = {"minigame", "overlay", "timer"},
|
||||||
|
type = PluginType.PVM
|
||||||
)
|
)
|
||||||
public class BarbarianAssaultPlugin extends Plugin {
|
public class BarbarianAssaultPlugin extends Plugin {
|
||||||
private static final int BA_WAVE_NUM_INDEX = 2;
|
private static final int BA_WAVE_NUM_INDEX = 2;
|
||||||
|
|||||||
@@ -1,162 +0,0 @@
|
|||||||
package net.runelite.client.plugins.example;
|
|
||||||
|
|
||||||
import java.awt.Graphics2D;
|
|
||||||
import java.awt.geom.AffineTransform;
|
|
||||||
import java.awt.image.BufferedImage;
|
|
||||||
import java.util.EnumSet;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import javax.inject.Inject;
|
|
||||||
import net.runelite.api.Client;
|
|
||||||
import net.runelite.api.GameState;
|
|
||||||
import net.runelite.api.ItemID;
|
|
||||||
import net.runelite.api.Point;
|
|
||||||
import net.runelite.api.SpriteID;
|
|
||||||
import net.runelite.api.coords.WorldPoint;
|
|
||||||
import net.runelite.client.callback.ClientThread;
|
|
||||||
import net.runelite.client.game.ItemManager;
|
|
||||||
import net.runelite.client.game.SpriteManager;
|
|
||||||
import net.runelite.client.plugins.Plugin;
|
|
||||||
import net.runelite.client.plugins.PluginDescriptor;
|
|
||||||
import net.runelite.client.plugins.cluescrolls.clues.emote.STASHUnit;
|
|
||||||
import net.runelite.client.ui.overlay.arrow.ArrowPoint;
|
|
||||||
import net.runelite.client.ui.overlay.arrow.ArrowPointManager;
|
|
||||||
import net.runelite.client.ui.overlay.arrow.ArrowType;
|
|
||||||
|
|
||||||
@PluginDescriptor(
|
|
||||||
name = "ArrowTest",
|
|
||||||
developerPlugin = true
|
|
||||||
)
|
|
||||||
public class ExamplePlugin extends Plugin
|
|
||||||
{
|
|
||||||
@Inject
|
|
||||||
private ArrowPointManager arrowPointManager;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private SpriteManager spriteManager;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private ItemManager itemManager;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private Client client;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private ClientThread clientThread;
|
|
||||||
|
|
||||||
private boolean firstLogin = true;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void startUp() throws Exception
|
|
||||||
{
|
|
||||||
clientThread.invokeLater(this::loadArrows);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void shutDown()
|
|
||||||
{
|
|
||||||
arrowPointManager.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void loadArrows()
|
|
||||||
{
|
|
||||||
if (client.getGameState() != GameState.LOGGED_IN)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
BufferedImage i = spriteManager.getSprite(SpriteID.MINIMAP_GUIDE_ARROW_YELLOW, 0);
|
|
||||||
|
|
||||||
BufferedImage i3 = spriteManager.getSprite(SpriteID.RED_GUIDE_ARROW, 0);
|
|
||||||
AffineTransform at = new AffineTransform();
|
|
||||||
at.concatenate(AffineTransform.getScaleInstance(1, -1));
|
|
||||||
at.concatenate(AffineTransform.getTranslateInstance(0, -i3.getHeight()));
|
|
||||||
BufferedImage i4 = new BufferedImage(i3.getWidth(), i3.getHeight(), BufferedImage.TYPE_INT_ARGB);
|
|
||||||
Graphics2D g = i4.createGraphics();
|
|
||||||
g.transform(at);
|
|
||||||
g.drawImage(i3, 0, 0, null);
|
|
||||||
g.dispose();
|
|
||||||
|
|
||||||
Point i3Offset = new Point(0, i3.getHeight() / -2);
|
|
||||||
|
|
||||||
ArrowPoint one = ArrowPoint.builder()
|
|
||||||
.worldPoint(new WorldPoint(1554, 3551, 0))
|
|
||||||
.minimapImage(i4)
|
|
||||||
.worldImage(i)
|
|
||||||
.minimapImageOffset(i3Offset)
|
|
||||||
.types(EnumSet.of(ArrowType.MINIMAP, ArrowType.WORLD_POINT))
|
|
||||||
.build();
|
|
||||||
//arrowPointManager.add(this, one);
|
|
||||||
|
|
||||||
ArrowPoint two = ArrowPoint.builder()
|
|
||||||
.worldPoint(new WorldPoint(1544, 3580, 0))
|
|
||||||
.minimapImage(i4)
|
|
||||||
.worldImage(i)
|
|
||||||
.minimapImageOffset(i3Offset)
|
|
||||||
.types(EnumSet.of(ArrowType.MINIMAP, ArrowType.WORLD_POINT))
|
|
||||||
.build();
|
|
||||||
//arrowPointManager.add(this, two);
|
|
||||||
|
|
||||||
ArrowPoint three = ArrowPoint.builder()
|
|
||||||
.worldPoint(new WorldPoint(1571, 3541, 0))
|
|
||||||
.minimapImage(i4)
|
|
||||||
.worldImage(i)
|
|
||||||
.minimapImageOffset(i3Offset)
|
|
||||||
.types(EnumSet.of(ArrowType.MINIMAP, ArrowType.WORLD_POINT))
|
|
||||||
.build();
|
|
||||||
//arrowPointManager.add(this, three);
|
|
||||||
|
|
||||||
HashSet<Integer> NPCs = new HashSet<>();
|
|
||||||
NPCs.add(6910);
|
|
||||||
|
|
||||||
ArrowPoint npcone = ArrowPoint.builder()
|
|
||||||
.worldPoint(new WorldPoint(1545, 3595, 0))
|
|
||||||
.minimapImage(i4)
|
|
||||||
.worldImage(i)
|
|
||||||
.minimapImageOffset(i3Offset)
|
|
||||||
.npcIDs(NPCs)
|
|
||||||
.types(EnumSet.of(ArrowType.MINIMAP, ArrowType.NPC))
|
|
||||||
.build();
|
|
||||||
//arrowPointManager.add(this, npcone);
|
|
||||||
|
|
||||||
HashSet<Integer> NPCs2 = new HashSet<>();
|
|
||||||
NPCs2.add(6889);
|
|
||||||
NPCs2.add(6883);
|
|
||||||
NPCs2.add(6885);
|
|
||||||
|
|
||||||
ArrowPoint npctwo = ArrowPoint.builder()
|
|
||||||
.worldPoint(new WorldPoint(1551, 3561, 0))
|
|
||||||
.minimapImage(i4)
|
|
||||||
.worldImage(i)
|
|
||||||
.minimapImageOffset(i3Offset)
|
|
||||||
.worldImageOffset(new Point(0, -i4.getHeight()))
|
|
||||||
.npcIDs(NPCs2)
|
|
||||||
.types(EnumSet.of(ArrowType.MINIMAP, ArrowType.NPC))
|
|
||||||
.build();
|
|
||||||
//arrowPointManager.add(this, npctwo);
|
|
||||||
|
|
||||||
HashSet<Integer> OBJs = new HashSet<>();
|
|
||||||
OBJs.add(STASHUnit.SHAYZIEN_WAR_TENT);
|
|
||||||
|
|
||||||
ArrowPoint objone = ArrowPoint.builder()
|
|
||||||
.worldPoint(new WorldPoint(1550, 3541, 0))
|
|
||||||
.minimapImage(i4)
|
|
||||||
.worldImage(i)
|
|
||||||
.minimapImageOffset(i3Offset)
|
|
||||||
.worldImageOffset(new Point(0, -i4.getHeight()))
|
|
||||||
.objectIDs(OBJs)
|
|
||||||
.types(EnumSet.of(ArrowType.MINIMAP, ArrowType.OBJECT))
|
|
||||||
.build();
|
|
||||||
arrowPointManager.add(this, objone);
|
|
||||||
|
|
||||||
BufferedImage i5 = itemManager.getImage(ItemID.BONES);
|
|
||||||
|
|
||||||
ArrowPoint four = ArrowPoint.builder()
|
|
||||||
.worldPoint(new WorldPoint(1517, 3553, 0))
|
|
||||||
.minimapImage(i5)
|
|
||||||
.worldImage(i5)
|
|
||||||
.minimapImagePointToTarget(false)
|
|
||||||
.types(EnumSet.of(ArrowType.MINIMAP, ArrowType.WORLD_POINT))
|
|
||||||
.build();
|
|
||||||
//arrowPointManager.add(this, four);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -50,11 +50,13 @@ import net.runelite.client.eventbus.EventBus;
|
|||||||
import net.runelite.client.eventbus.Subscribe;
|
import net.runelite.client.eventbus.Subscribe;
|
||||||
import net.runelite.client.plugins.Plugin;
|
import net.runelite.client.plugins.Plugin;
|
||||||
import net.runelite.client.plugins.PluginDescriptor;
|
import net.runelite.client.plugins.PluginDescriptor;
|
||||||
|
import net.runelite.client.plugins.PluginType;
|
||||||
import net.runelite.client.ui.overlay.OverlayManager;
|
import net.runelite.client.ui.overlay.OverlayManager;
|
||||||
import net.runelite.client.util.Text;
|
import net.runelite.client.util.Text;
|
||||||
|
|
||||||
@PluginDescriptor(
|
@PluginDescriptor(
|
||||||
name = "Quest Helper",
|
name = "Quest Helper",
|
||||||
|
type = PluginType.UTILITY,
|
||||||
description = "Helps you with your quests"
|
description = "Helps you with your quests"
|
||||||
)
|
)
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|||||||
@@ -375,6 +375,9 @@ public interface RSClient extends RSGameEngine, Client
|
|||||||
@Import("createSprite")
|
@Import("createSprite")
|
||||||
RSSpritePixels createItemSprite(int itemId, int quantity, int thickness, int borderColor, int stackable, boolean noted);
|
RSSpritePixels createItemSprite(int itemId, int quantity, int thickness, int borderColor, int stackable, boolean noted);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void invokeMenuAction(int n2, int n3, int n4, int n5, String string, String string2, int n6, int n7);
|
||||||
|
|
||||||
@Import("decodeSprite")
|
@Import("decodeSprite")
|
||||||
void decodeSprite(byte[] data);
|
void decodeSprite(byte[] data);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user