Merge pull request #1 from runelite-extended/master

build update
This commit is contained in:
se7enAte9
2019-06-10 17:19:38 -04:00
committed by GitHub
76 changed files with 2218 additions and 1243 deletions

View File

@@ -83,7 +83,7 @@ import org.slf4j.LoggerFactory;
@Slf4j
public class RuneLite
{
public static final String RUNELIT_VERSION = "0.1.2";
public static final String RUNELIT_VERSION = "2.0.0";
public static final File RUNELITE_DIR = new File(System.getProperty("user.home"), ".runelite");
public static final File PROFILES_DIR = new File(RUNELITE_DIR, "profiles");
public static final File PLUGIN_DIR = new File(RUNELITE_DIR, "plugins");

View File

@@ -94,7 +94,7 @@ public class SessionManager
// Check if session is still valid
AccountClient accountClient = new AccountClient(session.getUuid());
if (!accountClient.sesssionCheck())
if (!accountClient.sessionCheck())
{
log.debug("Loaded session {} is invalid", session.getUuid());
return;

View File

@@ -98,7 +98,7 @@ public class AnagramClue extends ClueScroll implements TextClueScroll, NpcClueSc
new AnagramClue("HE DO POSE. IT IS CULTRRL, MK?", "Riki the sculptor's model", new WorldPoint(2904, 10206, 0), "East Keldagrim, south of kebab seller."),
new AnagramClue("HEORIC", "Eohric", new WorldPoint(2900, 3565, 0), "Top floor of Burthorpe Castle", "36"),
new AnagramClue("HIS PHOR", "Horphis", new WorldPoint(1639, 3812, 0), "Arceuus Library, Zeah", "1"),
new AnagramClue("I AM SIR", "Marisi", new WorldPoint(1813, 3488, 0), "Allotment patch, South coast Zeah", "5"),
new AnagramClue("I AM SIR", "Marisi", new WorldPoint(1737, 3557, 0), "Allotment patch, South of Hosidius chapel", "5"),
new AnagramClue("ICY FE", "Fycie", new WorldPoint(2630, 2997, 0), "East Feldip Hills"),
new AnagramClue("I DOOM ICON INN", "Dominic Onion", new WorldPoint(2609, 3116, 0), "Nightmare Zone", "9,500"),
new AnagramClue("I EAT ITS CHART HINTS DO U", "Shiratti the Custodian", new WorldPoint(3427, 2927, 0), "North of fountain, Nardah"),

View File

@@ -166,6 +166,7 @@ public class CoordinateClue extends ClueScroll implements TextClueScroll, Locati
.put(new WorldPoint(3380, 3963, 0), "Wilderness. North of Volcano.")
.put(new WorldPoint(3051, 3736, 0), "East of the Wilderness Obelisk in 28 Wilderness.")
.put(new WorldPoint(2316, 3814, 0), "West of Neitiznot, near the bridge.")
.put(new WorldPoint(2872, 3937, 0), "Weiss.")
// Master
.put(new WorldPoint(2178, 3209, 0), "South of Elf Camp.")
.put(new WorldPoint(2155, 3100, 0), "South of Port Tyras (BJS).")
@@ -181,7 +182,7 @@ public class CoordinateClue extends ClueScroll implements TextClueScroll, Locati
.put(new WorldPoint(3085, 3569, 0), "Wilderness. Obelisk of Air.")
.put(new WorldPoint(2934, 2727, 0), "Eastern shore of Crash Island.")
.put(new WorldPoint(1451, 3695, 0), "West side of Lizardman Canyon with Lizardman shaman.")
.put(new WorldPoint(2538, 3739, 0), "Waterbirth Island.")
.put(new WorldPoint(2538, 3739, 0), "Waterbirth Island. Bring a pet rock and rune thrownaxe.")
.put(new WorldPoint(1698, 3792, 0), "Arceuus church.")
.put(new WorldPoint(2951, 3820, 0), "Wilderness. Chaos Temple (level 38).")
.put(new WorldPoint(2202, 3825, 0), "Pirates' Cove, between Lunar Isle and Rellekka.")

View File

@@ -62,7 +62,7 @@ public class SceneOverlay extends Overlay
private static final int MAP_SQUARE_SIZE = CHUNK_SIZE * CHUNK_SIZE; // 64
private static final int CULL_CHUNK_BORDERS_RANGE = 16;
private static final int STROKE_WIDTH = 4;
private static final int CULL_LINE_OF_SIGHT_RANGE = 10;
private static final int CULL_LINE_OF_SIGHT_RANGE = 20;
private static final int INTERACTING_SHIFT = -16;
private static final Polygon ARROW_HEAD = new Polygon(

View File

@@ -53,7 +53,7 @@ enum DiscordGameEventType
TRAINING_COOKING(Skill.COOKING),
TRAINING_WOODCUTTING(Skill.WOODCUTTING),
TRAINING_FLETCHING(Skill.FLETCHING),
TRAINING_FISHING(Skill.FISHING),
TRAINING_FISHING(Skill.FISHING, 1),
TRAINING_FIREMAKING(Skill.FIREMAKING),
TRAINING_CRAFTING(Skill.CRAFTING),
TRAINING_SMITHING(Skill.SMITHING),

View File

@@ -0,0 +1,53 @@
package net.runelite.client.plugins.implings;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.util.Map;
import javax.inject.Inject;
import net.runelite.api.Client;
import net.runelite.client.ui.overlay.Overlay;
import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.components.table.TableAlignment;
import net.runelite.client.ui.overlay.components.table.TableComponent;
import net.runelite.client.ui.overlay.components.PanelComponent;
public class ImplingCounterOverlay extends Overlay
{
private final Client client;
private final ImplingsPlugin plugin;
private final ImplingsConfig config;
private final PanelComponent panelComponent = new PanelComponent();
@Inject
public ImplingCounterOverlay(Client client, ImplingsConfig config, ImplingsPlugin plugin)
{
this.client = client;
this.config = config;
this.plugin = plugin;
setPosition(OverlayPosition.TOP_LEFT);
}
@Override
public Dimension render(Graphics2D graphics)
{
if (!config.showCounter() || plugin.getImplings().isEmpty())
return null;
panelComponent.getChildren().clear();
TableComponent tableComponent = new TableComponent();
tableComponent.setColumnAlignments(TableAlignment.LEFT, TableAlignment.RIGHT);
for (Map.Entry<ImplingType, Integer> entry : plugin.getImplingCounterMap().entrySet())
{
if (plugin.showImplingType(entry.getKey()) && entry.getValue() != 0)
{
tableComponent.addRow(entry.getKey().getName(), entry.getValue().toString());
}
}
panelComponent.getChildren().add(tableComponent);
return panelComponent.render(graphics);
}
}

View File

@@ -320,4 +320,15 @@ public interface ImplingsConfig extends Config
{
return Color.WHITE;
}
@ConfigItem(
position = 26,
keyName = "showCounter",
name = "Show impling counter overlay",
description = "Shows how many of each impling there is nearby"
)
default boolean showCounter()
{
return false;
}
}

View File

@@ -30,11 +30,13 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import javax.inject.Inject;
import lombok.AccessLevel;
import lombok.Getter;
import net.runelite.api.GameState;
import net.runelite.api.NPC;
import net.runelite.api.events.GameTick;
import net.runelite.api.events.GameStateChanged;
import net.runelite.api.events.NpcDespawned;
import net.runelite.api.events.NpcSpawned;
@@ -58,6 +60,9 @@ public class ImplingsPlugin extends Plugin
private static final int DYNAMIC_SPAWN_ECLECTIC = 1633;
private static final int DYNAMIC_SPAWN_BABY_ESSENCE = 1634;
@Getter
private Map<ImplingType, Integer> implingCounterMap = new HashMap<>();
@Getter(AccessLevel.PACKAGE)
private final List<NPC> implings = new ArrayList<>();
@@ -67,6 +72,10 @@ public class ImplingsPlugin extends Plugin
@Inject
private ImplingsOverlay overlay;
@Inject
private ImplingCounterOverlay implingCounterOverlay;
@Inject
private OverlayManager overlayManager;
@@ -91,6 +100,7 @@ public class ImplingsPlugin extends Plugin
overlayManager.add(overlay);
overlayManager.add(minimapOverlay);
overlayManager.add(implingCounterOverlay);
}
@Override
@@ -98,6 +108,27 @@ public class ImplingsPlugin extends Plugin
{
overlayManager.remove(overlay);
overlayManager.remove(minimapOverlay);
overlayManager.remove(implingCounterOverlay);
}
@Subscribe
public void onGameTick(GameTick event)
{
implingCounterMap.clear();
for (NPC npc : implings)
{
Impling impling = Impling.findImpling(npc.getId());
ImplingType type = impling.getImplingType();
if (implingCounterMap.containsKey(type))
{
implingCounterMap.put(type, implingCounterMap.get(type) + 1);
}
else
{
implingCounterMap.put(type, 1);
}
}
}
@Subscribe
@@ -118,6 +149,7 @@ public class ImplingsPlugin extends Plugin
if (event.getGameState() == GameState.LOGIN_SCREEN || event.getGameState() == GameState.HOPPING)
{
implings.clear();
implingCounterMap.clear();
}
}
@@ -131,6 +163,7 @@ public class ImplingsPlugin extends Plugin
NPC npc = npcDespawned.getNpc();
implings.remove(npc);
}
boolean showNpc(NPC npc)
@@ -183,7 +216,12 @@ public class ImplingsPlugin extends Plugin
return null;
}
switch (impling.getImplingType())
return typeToColor(impling.getImplingType());
}
Color typeToColor(ImplingType type)
{
switch (type)
{
case BABY:

View File

@@ -0,0 +1,55 @@
/*
* Copyright (c) 2019, Jacky <liangj97@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.plugins.inferno;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
@ConfigGroup("inferno")
public interface InfernoConfig extends Config
{
@ConfigItem(
position = 0,
keyName = "Nibbler Overlay",
name = "Nibbler Overlay",
description = "Shows if there are any Nibblers left"
)
default boolean displayNibblerOverlay()
{
return false;
}
@ConfigItem(
position = 1,
keyName = "Prayer Helper",
name = "Prayer Helper",
description = "Tells you what to flick in how many ticks"
)
default boolean showPrayerHelp()
{
return false;
}
}

View File

@@ -0,0 +1,78 @@
/*
* Copyright (c) 2019, Jacky <liangj97@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.plugins.inferno;
import java.awt.Dimension;
import java.awt.Graphics2D;
import javax.inject.Inject;
import net.runelite.api.Client;
import net.runelite.client.ui.overlay.Overlay;
import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.components.table.TableAlignment;
import net.runelite.client.ui.overlay.components.table.TableComponent;
import net.runelite.client.ui.overlay.components.PanelComponent;
public class InfernoInfobox extends Overlay
{
private final Client client;
private final InfernoPlugin plugin;
private final InfernoConfig config;
private final PanelComponent panelComponent = new PanelComponent();
@Inject
public InfernoInfobox(Client client, InfernoConfig config, InfernoPlugin plugin)
{
this.client = client;
this.config = config;
this.plugin = plugin;
setPosition(OverlayPosition.TOP_LEFT);
}
@Override
public Dimension render(Graphics2D graphics)
{
if (!config.showPrayerHelp() || client.getMapRegions()[0] != 9043) return null;
panelComponent.getChildren().clear();
TableComponent tableComponent = new TableComponent();
tableComponent.setColumnAlignments(TableAlignment.LEFT, TableAlignment.RIGHT);
for (int i = plugin.getPriorityNPC().length; i > 0; i--)
{
if (plugin.getPriorityNPC()[i - 1] == null)
{
tableComponent.addRow(Integer.toString(i), "-");
}
else
{
tableComponent.addRow(plugin.getPriorityNPC()[i - 1].getName(), plugin.getPriorityNPC()[i - 1 ].getAttackstyle().getName());
}
}
panelComponent.getChildren().add(tableComponent);
return panelComponent.render(graphics);
}
}

View File

@@ -0,0 +1,185 @@
/*
* Copyright (c) 2019, Jacky <liangj97@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.plugins.inferno;
import java.awt.Color;
import lombok.Getter;
import lombok.Setter;
import net.runelite.api.NPC;
import net.runelite.api.NpcID;
public class InfernoNPC
{
public enum Attackstyle
{
MAGE("Mage", Color.CYAN),
RANGE("Range", Color.GREEN),
MELEE("Melee", Color.WHITE),
RANDOM("Random", Color.ORANGE);
@Getter
private String name = "";
@Getter
private Color color;
Attackstyle(String s, Color c)
{
this.name = s;
this.color = c;
}
}
@Getter
private NPC npc;
@Getter
private String name;
@Getter
@Setter
private Attackstyle attackstyle;
@Getter
private int attackTicks;
@Getter
private int priority;
@Getter
@Setter
private int ticksTillAttack = -1;
@Getter
@Setter
private boolean attacking = false;
@Getter
private int attackAnimation;
@Getter
private boolean isMidAttack = false;
@Getter
@Setter
private int distanceToPlayer = 0;
@Getter
int textLocHeight;
public InfernoNPC(NPC npc)
{
this.npc = npc;
textLocHeight = npc.getLogicalHeight() + 40;
switch (npc.getId())
{
case NpcID.JALAKREKKET:
attackTicks = 4;
name = "lil mel";
attackAnimation = 7582;
attackstyle = Attackstyle.MELEE;
priority = 7;
break;
case NpcID.JALAKREKXIL:
attackTicks = 4;
name = "lil range";
attackAnimation = 7583;
attackstyle = Attackstyle.RANGE;
priority = 6;
break;
case NpcID.JALAKREKMEJ:
attackTicks = 4;
name = "lil mage";
attackAnimation = 7581;
attackstyle = Attackstyle.MAGE;
priority = 5;
break;
case NpcID.JALMEJRAH:
attackTicks = 3;
name = "bat";
attackAnimation = 7578;
attackstyle = Attackstyle.RANGE;
priority = 4;
break;
case NpcID.JALAK:
attackTicks = 6;
name = "blob";
attackAnimation = 7583; // also 7581
attackstyle = Attackstyle.RANDOM;
priority = 3;
break;
case NpcID.JALIMKOT:
attackTicks = 4;
name = "meleer";
attackAnimation = 7597;
attackstyle = Attackstyle.MELEE;
priority = 2;
break;
case NpcID.JALXIL:
attackTicks = 4;
name = "ranger";
attackAnimation = 7605;
attackstyle = Attackstyle.RANGE;
priority = 1;
break;
case NpcID.JALZEK:
attackTicks = 4;
name = "mager";
attackAnimation = 7610;
attackstyle = Attackstyle.MAGE;
priority = 0;
break;
default:
attackTicks = 0;
}
}
public String info()
{
String info = "";
if (attacking)
{
info += ticksTillAttack;
}
//info += " D: " + distanceToPlayer;
return info;
}
public void attacked()
{
ticksTillAttack = attackTicks;
attacking = true;
}
}

View File

@@ -0,0 +1,71 @@
/*
* Copyright (c) 2019, Jacky <liangj97@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.plugins.inferno;
import java.awt.Dimension;
import java.awt.Graphics2D;
import javax.inject.Inject;
import net.runelite.api.Client;
import net.runelite.client.ui.overlay.Overlay;
import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.components.PanelComponent;
import net.runelite.client.ui.overlay.components.table.TableAlignment;
import net.runelite.client.ui.overlay.components.table.TableComponent;
public class InfernoNibblerOverlay extends Overlay
{
private final Client client;
private final InfernoPlugin plugin;
private final InfernoConfig config;
private final PanelComponent panelComponent = new PanelComponent();
@Inject
public InfernoNibblerOverlay(Client client, InfernoConfig config, InfernoPlugin plugin)
{
this.client = client;
this.config = config;
this.plugin = plugin;
setPosition(OverlayPosition.TOP_LEFT);
}
@Override
public Dimension render(Graphics2D graphics)
{
if (!config.displayNibblerOverlay() || plugin.getNibblers().size() == 0 || client.getMapRegions()[0] != 9043)
return null;
panelComponent.getChildren().clear();
TableComponent tableComponent = new TableComponent();
tableComponent.setColumnAlignments(TableAlignment.LEFT, TableAlignment.RIGHT);
tableComponent.addRow("Nibblers Left: ", Integer.toString(plugin.getNibblers().size()));
panelComponent.getChildren().add(tableComponent);
return panelComponent.render(graphics);
}
}

View File

@@ -0,0 +1,109 @@
/*
* Copyright (c) 2019, Jacky <liangj97@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.plugins.inferno;
import com.google.common.base.Strings;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics2D;
import javax.inject.Inject;
import net.runelite.api.Client;
import net.runelite.api.NPC;
import net.runelite.api.Perspective;
import net.runelite.api.Point;
import net.runelite.api.coords.LocalPoint;
import net.runelite.client.ui.overlay.Overlay;
import net.runelite.client.ui.overlay.OverlayLayer;
import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.components.PanelComponent;
public class InfernoOverlay extends Overlay
{
private final Client client;
private final InfernoPlugin plugin;
private final InfernoConfig config;
private final PanelComponent panelComponent = new PanelComponent();
@Inject
public InfernoOverlay(Client client, InfernoConfig config, InfernoPlugin plugin)
{
setPosition(OverlayPosition.DYNAMIC);
setLayer(OverlayLayer.ABOVE_SCENE);
this.client = client;
this.config = config;
this.plugin = plugin;
}
@Override
public Dimension render(Graphics2D graphics)
{
if (!client.isInInstancedRegion() || client.getMapRegions()[0] != 9043) return null;
for (InfernoNPC monster : plugin.getMonsters().values())
{
NPC npc = monster.getNpc();
//if (npc == null || !config.showPrayer()) return;
LocalPoint lp = npc.getLocalLocation();
if (lp != null)
{
Point point = Perspective.localToCanvas(client, lp, client.getPlane(), npc.getLogicalHeight());
if (point != null)
{
if (monster.getTicksTillAttack() == 1 || (monster.getName().equals("blob") && monster.getTicksTillAttack() <= 3))
{
renderTextLocation(graphics, monster, monster.info(), Color.GREEN);
}
else
{
renderTextLocation(graphics, monster, monster.info(), Color.RED);
}
}
}
}
return null;
}
// renders text location
public static void renderTextLocation(Graphics2D graphics, InfernoNPC actor, String text, Color color)
{
graphics.setFont(new Font("Arial", Font.BOLD, 15));
Point textLocation = actor.getNpc().getCanvasTextLocation(graphics, text, actor.textLocHeight + 40);
if (Strings.isNullOrEmpty(text))
{
return;
}
int x = textLocation.getX();
int y = textLocation.getY();
graphics.setColor(Color.BLACK);
graphics.drawString(text, x + 1, y + 1);
graphics.setColor(color);
graphics.drawString(text, x, y);
}
}

View File

@@ -0,0 +1,275 @@
/*
* Copyright (c) 2019, Jacky <liangj97@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.plugins.inferno;
import com.google.inject.Provides;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.inject.Inject;
import lombok.Getter;
import net.runelite.api.Client;
import net.runelite.api.HeadIcon;
import net.runelite.api.NPC;
import net.runelite.api.NpcID;
import net.runelite.api.events.GameTick;
import net.runelite.api.events.NpcDespawned;
import net.runelite.api.events.NpcSpawned;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginType;
import net.runelite.client.ui.overlay.OverlayManager;
@PluginDescriptor(
name = "Inferno",
description = "Inferno helper",
tags = {"combat", "overlay", "pve", "pvm"},
type = PluginType.PVM
)
public class InfernoPlugin extends Plugin
{
@Inject
private Client client;
@Inject
private OverlayManager overlayManager;
@Inject
private InfernoOverlay infernoOverlay;
@Inject
private InfernoInfobox infernoInfobox;
@Inject
private InfernoNibblerOverlay nibblerOverlay;
@Inject
private InfernoConfig config;
@Getter
private Map<NPC, InfernoNPC> monsters;
@Getter
private Map<Integer, ArrayList<InfernoNPC>> monsterCurrentAttackMap;
@Getter
private List<NPC> nibblers;
@Getter
private InfernoNPC[] priorityNPC;
@Provides
InfernoConfig provideConfig(ConfigManager configManager)
{
return configManager.getConfig(InfernoConfig.class);
}
@Override
protected void startUp() throws Exception
{
overlayManager.add(infernoOverlay);
overlayManager.add(infernoInfobox);
overlayManager.add(nibblerOverlay);
monsters = new HashMap<>();
monsterCurrentAttackMap = new HashMap<>(6);
for (int i = 1; i <= 6; i++)
{
monsterCurrentAttackMap.put(i, new ArrayList<>());
}
nibblers = new ArrayList<>();
priorityNPC = new InfernoNPC[4];
}
@Override
protected void shutDown() throws Exception
{
overlayManager.remove(infernoInfobox);
overlayManager.remove(infernoOverlay);
overlayManager.remove(nibblerOverlay);
}
@Subscribe
public void onNpcSpawned(NpcSpawned event)
{
if (client.getMapRegions()[0] != 9043) return;
NPC npc = event.getNpc();
if (isValidInfernoMob(npc))
{
monsters.put(npc, new InfernoNPC(npc));
System.out.println(monsters.size());
}
if (npc.getId() == NpcID.JALNIB)
{
nibblers.add(npc);
}
}
@Subscribe
public void onNpcDespawned(NpcDespawned event)
{
if (client.getMapRegions()[0] != 9043) return;
NPC npc = event.getNpc();
if (monsters.containsKey(npc))
{
monsters.remove(npc);
System.out.println(monsters.size());
}
if (npc.getId() == NpcID.JALNIB)
{
nibblers.remove(npc);
}
}
@Subscribe
public void onGameTick(GameTick event)
{
if (client.getMapRegions()[0] != 9043) return;
clearMapAndPriority();
for (InfernoNPC monster : monsters.values())
{
calculateDistanceToPlayer(monster);
NPC npc = monster.getNpc();
// if they are not attacking but are still attacking
if (monster.isAttacking())
{
monster.setTicksTillAttack(monster.getTicksTillAttack() - 1);
// sets the blobs attack style
if (monster.getName().equals("blob") && monster.getTicksTillAttack() == 3 && monster.getDistanceToPlayer() <= 15)
{
if (client.getLocalPlayer().getOverheadIcon() == null)
{
monster.setAttackstyle(InfernoNPC.Attackstyle.RANDOM);
}
else if (client.getLocalPlayer().getOverheadIcon().equals(HeadIcon.MAGIC))
{
monster.setAttackstyle(InfernoNPC.Attackstyle.RANGE);
}
else if (client.getLocalPlayer().getOverheadIcon().equals(HeadIcon.RANGED))
{
monster.setAttackstyle(InfernoNPC.Attackstyle.MAGE);
}
}
// we know the monster is not attacking because it should have attacked and is idling
if (monster.getTicksTillAttack() == 0)
{
if (npc.getAnimation() == -1)
{
monster.setAttacking(false);
}
else
{
// want to reset the monsters attack back to attacking
monster.attacked();
}
}
}
else
{
// they've just attacked
if (npc.getAnimation() == monster.getAttackAnimation() || npc.getAnimation() == 7581) // special case for blob
{
monster.attacked();
}
}
if (monster.getTicksTillAttack() >= 1)
{
monsterCurrentAttackMap.get(monster.getTicksTillAttack()).add(monster);
}
}
calculatePriorityNPC();
}
private void calculatePriorityNPC()
{
for (int i = 0; i < priorityNPC.length; i++)
{
ArrayList<InfernoNPC> monsters = monsterCurrentAttackMap.get(i + 1);
if ( monsters.size() == 0) continue;
int priority = monsters.get(0).getPriority();
InfernoNPC infernoNPC = monsters.get(0);
for (InfernoNPC npc : monsters)
{
if (npc.getPriority() < priority)
{
priority = npc.getPriority();
infernoNPC = npc;
}
}
priorityNPC[i] = infernoNPC;
System.out.println("i: " + i + " " + infernoNPC.getName());
}
}
// TODO: blob calculator
private void calculateDistanceToPlayer(InfernoNPC monster)
{
monster.setDistanceToPlayer(client.getLocalPlayer().getWorldLocation().distanceTo(monster.getNpc().getWorldArea()));
}
private void clearMapAndPriority()
{
for (List<InfernoNPC> l : monsterCurrentAttackMap.values())
{
l.clear();
}
for (int i = 0; i < priorityNPC.length; i++)
{
priorityNPC[i] = null;
}
}
public boolean isValidInfernoMob(NPC npc)
{
// we only want the bat, blob, melee, ranger and mager
if (npc.getId() == NpcID.JALMEJRAH ||
npc.getId() == NpcID.JALAK ||
npc.getId() == NpcID.JALIMKOT ||
npc.getId() == NpcID.JALXIL ||
npc.getId() == NpcID.JALZEK) return true;
return false;
}
}

View File

@@ -107,7 +107,10 @@ class KeyRemappingListener extends MouseAdapter implements KeyListener
}
}
if (config.fkeyRemap())
// In addition to the above checks, the F-key remapping shouldn't
// activate when dialogs are open which listen for number keys
// to select options
if (config.fkeyRemap() && !plugin.isDialogOpen())
{
if (ONE.matches(e))
{
@@ -188,23 +191,18 @@ class KeyRemappingListener extends MouseAdapter implements KeyListener
switch (e.getKeyCode())
{
case KeyEvent.VK_ENTER:
case KeyEvent.VK_ESCAPE:
plugin.setTyping(false);
clientThread.invoke(plugin::lockChat);
break;
case KeyEvent.VK_ESCAPE:
plugin.setTyping(false);
clientThread.invoke(() ->
{
client.setVar(VarClientStr.CHATBOX_TYPED_TEXT, "");
plugin.lockChat();
});
break;
case KeyEvent.VK_BACK_SPACE:
// Only lock chat on backspace when the typed text is now empty
if (Strings.isNullOrEmpty(client.getVar(VarClientStr.CHATBOX_TYPED_TEXT)))
{
plugin.setTyping(false);
clientThread.invoke(plugin::lockChat);
}
break;
}
}
}

View File

@@ -135,6 +135,26 @@ public class KeyRemappingPlugin extends Plugin
return true;
}
/**
* Check if a dialog is open that will grab numerical input, to prevent F-key remapping
* from triggering.
*
* @return
*/
boolean isDialogOpen()
{
// Most chat dialogs with numerical input are added without the chatbox or its key listener being removed,
// so chatboxFocused() is true. The chatbox onkey script uses the following logic to ignore key presses,
// so we will use it too to not remap F-keys.
return isHidden(WidgetInfo.CHATBOX_MESSAGES) || isHidden(WidgetInfo.CHATBOX_TRANSPARENT_LINES);
}
private boolean isHidden(WidgetInfo widgetInfo)
{
Widget w = client.getWidget(widgetInfo);
return w == null || w.isSelfHidden();
}
@Subscribe
public void onScriptCallbackEvent(ScriptCallbackEvent scriptCallbackEvent)
{
@@ -163,31 +183,25 @@ public class KeyRemappingPlugin extends Plugin
void lockChat()
{
Widget chatboxParent = client.getWidget(WidgetInfo.CHATBOX_PARENT);
if (chatboxParent != null && chatboxParent.getOnKeyListener() != null)
Widget chatboxInput = client.getWidget(WidgetInfo.CHATBOX_INPUT);
if (chatboxInput != null)
{
Widget chatboxInput = client.getWidget(WidgetInfo.CHATBOX_INPUT);
if (chatboxInput != null)
{
chatboxInput.setText(getPlayerNameWithIcon() + ": " + PRESS_ENTER_TO_CHAT);
}
chatboxInput.setText(getPlayerNameWithIcon() + ": " + PRESS_ENTER_TO_CHAT);
// Typed text can be non-empty on plugin start, so clear it now
client.setVar(VarClientStr.CHATBOX_TYPED_TEXT, "");
}
}
void unlockChat()
{
Widget chatboxParent = client.getWidget(WidgetInfo.CHATBOX_PARENT);
if (chatboxParent != null)
Widget chatboxInput = client.getWidget(WidgetInfo.CHATBOX_INPUT);
if (chatboxInput != null)
{
Widget chatboxInput = client.getWidget(WidgetInfo.CHATBOX_INPUT);
if (chatboxInput != null)
if (client.getGameState() == GameState.LOGGED_IN)
{
if (client.getGameState() == GameState.LOGGED_IN)
{
final boolean isChatboxTransparent = client.isResized() && client.getVar(Varbits.TRANSPARENT_CHATBOX) == 1;
final Color textColor = isChatboxTransparent ? JagexColors.CHAT_TYPED_TEXT_TRANSPARENT_BACKGROUND : JagexColors.CHAT_TYPED_TEXT_OPAQUE_BACKGROUND;
chatboxInput.setText(getPlayerNameWithIcon() + ": " + ColorUtil.wrapWithColorTag(client.getVar(VarClientStr.CHATBOX_TYPED_TEXT) + "*", textColor));
}
final boolean isChatboxTransparent = client.isResized() && client.getVar(Varbits.TRANSPARENT_CHATBOX) == 1;
final Color textColor = isChatboxTransparent ? JagexColors.CHAT_TYPED_TEXT_TRANSPARENT_BACKGROUND : JagexColors.CHAT_TYPED_TEXT_OPAQUE_BACKGROUND;
chatboxInput.setText(getPlayerNameWithIcon() + ": " + ColorUtil.wrapWithColorTag(client.getVar(VarClientStr.CHATBOX_TYPED_TEXT) + "*", textColor));
}
}
}

View File

@@ -43,6 +43,8 @@ import static net.runelite.api.ObjectID.ROCKS_11374;
import static net.runelite.api.ObjectID.ROCKS_11375;
import static net.runelite.api.ObjectID.ROCKS_11376;
import static net.runelite.api.ObjectID.ROCKS_11377;
import static net.runelite.api.ObjectID.ROCKS_11386;
import static net.runelite.api.ObjectID.ROCKS_11387;
enum Rock
{
@@ -65,7 +67,9 @@ enum Rock
}
},
SILVER(Duration.ofMinutes(1), ROCKS_11369),
SANDSTONE(Duration.ofMillis(5400), ROCKS_11386),
GOLD(Duration.ofMinutes(1), ROCKS_11370, ROCKS_11371),
GRANITE(Duration.ofMillis(5400), ROCKS_11387),
MITHRIL(Duration.ofMinutes(2), ROCKS_11372, ROCKS_11373)
{
@Override

View File

@@ -448,9 +448,7 @@ public class SpellbookPlugin extends Plugin
}
// CHECKSTYLE:OFF
Collection<Spell> gson = GSON.fromJson(cfg, new TypeToken<List<Spell>>()
{
}.getType());
Collection<Spell> gson = GSON.fromJson(cfg, new TypeToken<List<Spell>>() {}.getType());
// CHECKSTYLE:ON
gson.stream().filter(Objects::nonNull).forEach(s -> spells.put(s.getWidget(), s));
@@ -465,7 +463,7 @@ public class SpellbookPlugin extends Plugin
private void saveSpells()
{
if (spells.isEmpty())
if (spells.isEmpty() || tmp == null || tmp.isEmpty())
{
return;
}

View File

@@ -222,7 +222,7 @@ public class ClientLoader
if (rs instanceof Client)
{
log.info("client-patch {}", "420 blaze it RL pricks");
log.info("client-patch 420 blaze it RL pricks");
}
return rs;
@@ -274,7 +274,7 @@ public class ClientLoader
{
FileOutputStream fileOutputStream = new FileOutputStream(INJECTED_CLIENT);
fileOutputStream.getChannel()
.transferFrom(readableByteChannel, 0, Long.MAX_VALUE);
.transferFrom(readableByteChannel, 0, Integer.MAX_VALUE);
}
catch (IOException e)
{

View File

@@ -130,7 +130,7 @@ public class RuneLiteSplashScreen
panel.add(version, versionConstraints);
// version
final JLabel litVersion = new JLabel("Plus Version : PRE-" + RuneLite.RUNELIT_VERSION);
final JLabel litVersion = new JLabel("Plus Version : " + RuneLite.RUNELIT_VERSION);
litVersion.setForeground(Color.GREEN);
litVersion.setFont(FontManager.getRunescapeSmallFont());
litVersion.setForeground(litVersion.getForeground().darker());

View File

@@ -1,10 +1,9 @@
package net.runelite.client.util.bootstrap;
public class Artifact {
String hash;
String name;
String path;
String size;
public class Artifact
{
String hash;
String name;
String path;
String size;
}

View File

@@ -1,328 +1,345 @@
package net.runelite.client.util.bootstrap;
import net.runelite.http.api.RuneLiteAPI;
import sun.misc.BASE64Encoder;
import javax.xml.bind.DatatypeConverter;
import java.io.BufferedInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.security.DigestInputStream;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import javax.xml.bind.DatatypeConverter;
import net.runelite.http.api.RuneLiteAPI;
public class Bootstrap {
public class Bootstrap
{
Artifact[] artifacts = getArtifacts();
Client client = new Client();
String[] clientJvm9Arguments = new String[]{
"-XX:+DisableAttachMechanism",
"-Xmx512m",
"-Xss2m",
"-XX:CompileThreshold=1500",
"-Djna.nosys=true"
};
String[] clientJvmArguments = new String[]{
"-XX:+DisableAttachMechanism",
"-Xmx512m",
"-Xss2m",
"-XX:CompileThreshold=1500",
"-Xincgc",
"-XX:+UseConcMarkSweepGC",
"-XX:+UseParNewGC",
"-Djna.nosys=true"};
String[] dependencyHashes;
String[] launcherArguments = new String[]{
"-XX:+DisableAttachMechanism",
"-Drunelite.launcher.nojvm=true",
"-Xmx512m",
"-Xss2m",
"-XX:CompileThreshold=1500",
"-Xincgc",
"-XX:+UseConcMarkSweepGC",
"-XX:+UseParNewGC",
"-Djna.nosys=true"};
Artifact[] artifacts = getArtifacts();
Client client = new Client();
String[] clientJvm9Arguments = new String[]{
"-XX:+DisableAttachMechanism",
"-Xmx512m",
"-Xss2m",
"-XX:CompileThreshold=1500",
"-Djna.nosys=true"
};
String[] clientJvmArguments = new String[]{
"-XX:+DisableAttachMechanism",
"-Xmx512m",
"-Xss2m",
"-XX:CompileThreshold=1500",
"-Xincgc",
"-XX:+UseConcMarkSweepGC",
"-XX:+UseParNewGC",
"-Djna.nosys=true"};
String[] dependencyHashes;
String[] launcherArguments = new String[]{
"-XX:+DisableAttachMechanism",
"-Drunelite.launcher.nojvm=true",
"-Xmx512m",
"-Xss2m",
"-XX:CompileThreshold=1500",
"-Xincgc",
"-XX:+UseConcMarkSweepGC",
"-XX:+UseParNewGC",
"-Djna.nosys=true"};
public Bootstrap()
{
}
public Bootstrap(){}
public static String getChecksumObject(Serializable object) throws IOException, NoSuchAlgorithmException
{
ByteArrayOutputStream baos = null;
ObjectOutputStream oos = null;
try
{
baos = new ByteArrayOutputStream();
oos = new ObjectOutputStream(baos);
oos.writeObject(object);
MessageDigest md = MessageDigest.getInstance("MD5");
byte[] thedigest = md.digest(baos.toByteArray());
return DatatypeConverter.printHexBinary(thedigest);
}
finally
{
oos.close();
baos.close();
}
}
public Artifact[] getArtifacts() {
try {
artifacts = new Artifact[42];
private static String getChecksumFile(String filepath) throws IOException
{
System.out.println("Generating Hash for " + filepath);
MessageDigest md = null;
try
{
md = MessageDigest.getInstance("SHA-256");
}
catch (Exception e)
{
e.printStackTrace();
}
try (DigestInputStream dis = new DigestInputStream(new FileInputStream(filepath), md))
{
while (dis.read() != -1)
{
//empty loop to clear the data
}
md = dis.getMessageDigest();
}
catch (Exception e)
{
e.printStackTrace();
}
//Static artifacts
artifacts[0] = new Artifact();
artifacts[0].hash = "b12331da8683e5f107d294adeebb83ecf9124abc1db533554d2a8d3c62832d75";
artifacts[0].name = "asm-all-6.0_BETA.jar";
artifacts[0].path = "https://mvn.runelite.net/org/ow2/asm/asm-all/6.0_BETA/asm-all-6.0_BETA.jar";
artifacts[0].size = "265176";
artifacts[1] = new Artifact();
artifacts[1].hash = "37abf0103ce5318bfda004fabc004c75ed0dc6d392a8459175692ab7eac97083";
artifacts[1].name = "naturalmouse-2.0.0.jar";
artifacts[1].path = "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/artifacts/naturalmouse-2.0.0.jar";
artifacts[1].size = "3168921";
artifacts[2] = new Artifact();
artifacts[2].hash = "50d1e07f11827672249dee9ce8a23691fc59f663deed084bb7b52a4f778d5fbc";
artifacts[2].name = "jcl-core-2.9-SNAPSHOT.jar";
artifacts[2].path = "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/artifacts/jcl-core-2.9-SNAPSHOT.jar";
artifacts[2].size = "3168921";
artifacts[4] = new Artifact();
artifacts[4].hash = "18c4a0095d5c1da6b817592e767bb23d29dd2f560ad74df75ff3961dbde25b79";
artifacts[4].name = "slf4j-api-1.7.25.jar";
artifacts[4].path = "https://mvn.runelite.net/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar";
artifacts[4].size = "41203";
artifacts[5] = new Artifact();
artifacts[5].hash = "fb53f8539e7fcb8f093a56e138112056ec1dc809ebb020b59d8a36a5ebac37e0";
artifacts[5].name = "logback-classic-1.2.3.jar";
artifacts[5].path = "https://mvn.runelite.net/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar";
artifacts[5].size = "290339";
artifacts[6] = new Artifact();
artifacts[6].hash = "5946d837fe6f960c02a53eda7a6926ecc3c758bbdd69aa453ee429f858217f22";
artifacts[6].name = "logback-core-1.2.3.jar";
artifacts[6].path = "https://mvn.runelite.net/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar";
artifacts[6].size = "471901";
artifacts[7] = new Artifact();
artifacts[7].hash = "9f0c8d50fa4b79b6ff1502dbec8502179d6b9497cacbe17a13074001aed537ec";
artifacts[7].name = "jopt-simple-5.0.1.jar";
artifacts[7].path = "https://mvn.runelite.net/net/sf/jopt-simple/jopt-simple/5.0.1/jopt-simple-5.0.1.jar";
artifacts[7].size = "78826";
artifacts[8] = new Artifact();
artifacts[8].hash = "5be9a7d05ba0ccd74708bc8018ae412255f85843c0b92302e9b9befa6ed52564";
artifacts[8].name = "guava-23.2-jre.jar";
artifacts[8].path = "https://mvn.runelite.net/com/google/guava/guava/23.2-jre/guava-23.2-jre.jar";
artifacts[8].size = "2649860";
artifacts[9] = new Artifact();
artifacts[9].hash = "905721a0eea90a81534abb7ee6ef4ea2e5e645fa1def0a5cd88402df1b46c9ed";
artifacts[9].name = "jsr305-1.3.9.jar";
artifacts[9].path = "https://mvn.runelite.net/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar";
artifacts[9].size = "33015";
artifacts[10] = new Artifact();
artifacts[10].hash = "cb4cfad870bf563a07199f3ebea5763f0dec440fcda0b318640b1feaa788656b";
artifacts[10].name = "error_prone_annotations-2.0.18.jar";
artifacts[10].path = "https://mvn.runelite.net/com/google/errorprone/error_prone_annotations/2.0.18/error_prone_annotations-2.0.18.jar";
artifacts[10].size = "12078";
artifacts[11] = new Artifact();
artifacts[11].hash = "2994a7eb78f2710bd3d3bfb639b2c94e219cedac0d4d084d516e78c16dddecf6";
artifacts[11].name = "j2objc-annotations-1.1.jar";
artifacts[11].path = "https://mvn.runelite.net/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar";
artifacts[11].size = "8782";
artifacts[12] = new Artifact();
artifacts[12].hash = "2068320bd6bad744c3673ab048f67e30bef8f518996fa380033556600669905d";
artifacts[12].name = "animal-sniffer-annotations-1.14.jar";
artifacts[12].path = "https://mvn.runelite.net/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar";
artifacts[12].size = "3482";
artifacts[13] = new Artifact();
artifacts[13].hash = "9264c6931c431e928dc64adc842584d5f57d17b2f3aff29221f2b3fdea673dad";
artifacts[13].name = "guice-4.1.0-no_aop.jar";
artifacts[13].path = "https://mvn.runelite.net/com/google/inject/guice/4.1.0/guice-4.1.0-no_aop.jar";
artifacts[13].size = "428603";
artifacts[14] = new Artifact();
artifacts[14].hash = "91c77044a50c481636c32d916fd89c9118a72195390452c81065080f957de7ff";
artifacts[14].name = "javax.inject-1.jar";
artifacts[14].path = "https://mvn.runelite.net/javax/inject/javax.inject/1/javax.inject-1.jar";
artifacts[14].size = "2497";
artifacts[15] = new Artifact();
artifacts[15].hash = "0addec670fedcd3f113c5c8091d783280d23f75e3acb841b61a9cdb079376a08";
artifacts[15].name = "aopalliance-1.0.jar";
artifacts[15].path = "https://mvn.runelite.net/aopalliance/aopalliance/1.0/aopalliance-1.0.jar";
artifacts[15].size = "4467";
artifacts[16] = new Artifact();
artifacts[16].hash = "233a0149fc365c9f6edbd683cfe266b19bdc773be98eabdaf6b3c924b48e7d81";
artifacts[16].name = "gson-2.8.5.jar";
artifacts[16].path = "https://mvn.runelite.net/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar";
artifacts[16].size = "241622";
artifacts[17] = new Artifact();
artifacts[17].hash = "0467d25f408428824d5c9c09ec60ee1f0bc341d9bf48971a77fd14939a826c83";
artifacts[17].name = "substance-8.0.02.jar";
artifacts[17].path = "https://repo.runelite.net/net/runelite/pushingpixels/substance/8.0.02/substance-8.0.02.jar";
artifacts[17].size = "1589195";
artifacts[18] = new Artifact();
artifacts[18].hash = "3214e1c23d549d5d67c91da4da1ef33c5248470bb824f91cbe8f9e0beea59eef";
artifacts[18].name = "trident-1.5.00.jar";
artifacts[18].path = "https://repo.runelite.net/net/runelite/pushingpixels/trident/1.5.00/trident-1.5.00.jar";
artifacts[18].size = "79726";
artifacts[19] = new Artifact();
artifacts[19].hash = "d4a57bbc1627da7c391308fd0fe910b83170fb66afd117236a5b111d2db1590b";
artifacts[19].name = "commons-text-1.2.jar";
artifacts[19].path = "https://mvn.runelite.net/org/apache/commons/commons-text/1.2/commons-text-1.2.jar";
artifacts[19].size = "136544";
artifacts[20] = new Artifact();
artifacts[20].hash = "6e8dc31e046508d9953c96534edf0c2e0bfe6f468966b5b842b3f87e43b6a847";
artifacts[20].name = "commons-lang3-3.7.jar";
artifacts[20].path = "https://mvn.runelite.net/org/apache/commons/commons-lang3/3.7/commons-lang3-3.7.jar";
artifacts[20].size = "499634";
artifacts[21] = new Artifact();
artifacts[21].hash = "e74603dc77b4183f108480279dbbf7fed3ac206069478636406c1fb45e83b31a";
artifacts[21].name = "jogl-all-2.3.2.jar";
artifacts[21].path = "https://mvn.runelite.net/org/jogamp/jogl/jogl-all/2.3.2/jogl-all-2.3.2.jar";
artifacts[21].size = "3414448";
artifacts[22] = new Artifact();
artifacts[22].hash = "8c53b1884cef19309d34fd10a94b010136d9d6de9a88c386f46006fb47acab5d";
artifacts[22].name = "jogl-all-2.3.2-natives-windows-amd64.jar";
artifacts[22].path = "https://mvn.runelite.net/org/jogamp/jogl/jogl-all/2.3.2/jogl-all-2.3.2-natives-windows-amd64.jar";
artifacts[22].size = "240721";
artifacts[23] = new Artifact();
artifacts[23].hash = "507a0e6bd1ee4e81c3dfb287783af93775864eec742988d4162f98ce0cbac9d6";
artifacts[23].name = "jogl-all-2.3.2-natives-windows-i586.jar";
artifacts[23].path = "https://mvn.runelite.net/org/jogamp/jogl/jogl-all/2.3.2/jogl-all-2.3.2-natives-windows-i586.jar";
artifacts[23].size = "209445";
artifacts[24] = new Artifact();
artifacts[24].hash = "82637302ae9effdf7d6f302e1050ad6aee3b13019914ddda5b502b9faa980216";
artifacts[24].name = "jogl-all-2.3.2-natives-linux-amd64.jar";
artifacts[24].path = "https://mvn.runelite.net/org/jogamp/jogl/jogl-all/2.3.2/jogl-all-2.3.2-natives-linux-amd64.jar";
artifacts[24].size = "224010";
artifacts[25] = new Artifact();
artifacts[25].hash = "f474ef2ef01be24ec811d3858b0f4bc5659076975f4a58ddd79abd787e9305c7";
artifacts[25].name = "jogl-all-2.3.2-natives-linux-i586.jar";
artifacts[25].path = "https://mvn.runelite.net/org/jogamp/jogl/jogl-all/2.3.2/jogl-all-2.3.2-natives-linux-i586.jar";
artifacts[25].size = "217274";
artifacts[26] = new Artifact();
artifacts[26].hash = "084844543b18f7ff71b4c0437852bd22f0cb68d7e44c2c611c1bbea76f8c6fdf";
artifacts[26].name = "gluegen-rt-2.3.2.jar";
artifacts[26].path = "https://mvn.runelite.net/org/jogamp/gluegen/gluegen-rt/2.3.2/gluegen-rt-2.3.2.jar";
artifacts[26].size = "345605";
artifacts[27] = new Artifact();
artifacts[27].hash = "3474017422eff384db466bdb56c96c61220c43133a9da6329cf1781bea16c6b6";
artifacts[27].name = "gluegen-rt-2.3.2-natives-windows-amd64.jar";
artifacts[27].path = "https://mvn.runelite.net/org/jogamp/gluegen/gluegen-rt/2.3.2/gluegen-rt-2.3.2-natives-windows-amd64.jar";
artifacts[27].size = "8159";
artifacts[28] = new Artifact();
artifacts[28].hash = "4eeed9fc2ebea5b9dc48a342b9478d127e989a2e1aa7129b512a98ec75cde338";
artifacts[28].name = "gluegen-rt-2.3.2-natives-windows-i586.jar";
artifacts[28].path = "https://mvn.runelite.net/org/jogamp/gluegen/gluegen-rt/2.3.2/gluegen-rt-2.3.2-natives-windows-i586.jar";
artifacts[28].size = "7577";
artifacts[29] = new Artifact();
artifacts[29].hash = "f2dfd1800202059cf7e0294db5d57755147304e6eb220a9277526dbe6842bde2";
artifacts[29].name = "gluegen-rt-2.3.2-natives-linux-amd64.jar";
artifacts[29].path = "https://mvn.runelite.net/org/jogamp/gluegen/gluegen-rt/2.3.2/gluegen-rt-2.3.2-natives-linux-amd64.jar";
artifacts[29].size = "4149";
artifacts[30] = new Artifact();
artifacts[30].hash = "1365d463f98c0abec92f3ad6b35aa4b53a9599a517800cf99fdabea6712ca7ec";
artifacts[30].name = "gluegen-rt-2.3.2-natives-linux-i586.jar";
artifacts[30].path = "https://mvn.runelite.net/org/jogamp/gluegen/gluegen-rt/2.3.2/gluegen-rt-2.3.2-natives-linux-i586.jar";
artifacts[30].size = "4130";
artifacts[31] = new Artifact();
artifacts[31].hash = "7b7ae00e2aa98c3b2b5ac76e793e2c9b752bf51c86c54654dbd473843a25f1aa";
artifacts[31].name = "jbsdiff-1.0.jar";
artifacts[31].path = "https://mvn.runelite.net/io/sigpipe/jbsdiff/1.0/jbsdiff-1.0.jar";
artifacts[31].size = "24589";
artifacts[32] = new Artifact();
artifacts[32].hash = "55bbfe26cee9296fd5b7c0d47ce6a00ea4dd572e235b63e9bb4eaf6f802315e4";
artifacts[32].name = "commons-compress-1.5.jar";
artifacts[32].path = "https://mvn.runelite.net/org/apache/commons/commons-compress/1.5/commons-compress-1.5.jar";
artifacts[32].size = "256241";
artifacts[33] = new Artifact();
artifacts[33].hash = "fbc9de96a0cc193a125b4008dbc348e9ed54e5e13fc67b8ed40e645d303cc51b";
artifacts[33].name = "jna-4.5.1.jar";
artifacts[33].path = "https://mvn.runelite.net/net/java/dev/jna/jna/4.5.1/jna-4.5.1.jar";
artifacts[33].size = "1440662";
artifacts[34] = new Artifact();
artifacts[34].hash = "84c8667555ee8dd91fef44b451419f6f16f71f727d5fc475a10c2663eba83abb";
artifacts[34].name = "jna-platform-4.5.1.jar";
artifacts[34].path = "https://mvn.runelite.net/net/java/dev/jna/jna-platform/4.5.1/jna-platform-4.5.1.jar";
artifacts[34].size = "2327547";
artifacts[38] = new Artifact();
artifacts[38].hash = "f55abda036da75e1af45bd43b9dfa79b2a3d90905be9cb38687c6621597a8165";
artifacts[38].name = "okhttp-3.7.0.jar";
artifacts[38].path = "https://mvn.runelite.net/com/squareup/okhttp3/okhttp/3.7.0/okhttp-3.7.0.jar";
artifacts[38].size = "394987";
artifacts[39] = new Artifact();
artifacts[39].hash = "bfe7dfe483c37137966a1690f0c7d0b448ba217902c1fed202aaffdbba3291ae";
artifacts[39].name = "okio-1.12.0.jar";
artifacts[39].path = "https://mvn.runelite.net/com/squareup/okio/okio/1.12.0/okio-1.12.0.jar";
artifacts[39].size = "81088";
artifacts[40] = new Artifact();
artifacts[40].hash = "9d4924588d6280c7516db3a4b7298306db5b6f0d1cdf568ce738309b5660f008";
artifacts[40].name = "commons-csv-1.4.jar";
artifacts[40].path = "https://mvn.runelite.net/org/apache/commons/commons-csv/1.4/commons-csv-1.4.jar";
artifacts[40].size = "39978";
artifacts[41] = new Artifact();
artifacts[41].hash = "7e26a8d043418f2f22d5f6a3083a9a131817009ee8cd72c004e83b50d1849a7c";
artifacts[41].name = "discord-1.1.jar";
artifacts[41].path = "https://repo.runelite.net/net/runelite/discord/1.1/discord-1.1.jar";
artifacts[41].size = "617294";
return bytesToHex(md.digest());
//Dynamic artifacts
artifacts[3] = new Artifact();
artifacts[3].name = "client-"+ RuneLiteAPI.getVersion()+".jar";
artifacts[3].hash = getChecksumFile("./runelite-client/target/"+artifacts[3].name);
artifacts[3].path = "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/"+artifacts[3].name;
artifacts[3].size = Long.toString(getFileSize("./runelite-client/target/"+artifacts[3].name));
artifacts[35] = new Artifact();
artifacts[35].name = "runelite-api-"+ RuneLiteAPI.getVersion()+".jar";
artifacts[35].hash = getChecksumFile("./runelite-api/target/"+artifacts[35].name);
artifacts[35].path = "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/"+artifacts[35].name;
artifacts[35].size = Long.toString(getFileSize("./runelite-api/target/"+artifacts[35].name));
artifacts[36] = new Artifact();
artifacts[36].name = "runescape-api-"+ RuneLiteAPI.getVersion()+".jar";
artifacts[36].hash = getChecksumFile("./runescape-api/target/"+artifacts[36].name);
artifacts[36].path = "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/"+artifacts[36].name;
artifacts[36].size = Long.toString(getFileSize("./runescape-api/target/"+artifacts[36].name));
artifacts[37] = new Artifact();
artifacts[37].name = "http-api-"+ RuneLiteAPI.getVersion()+".jar";
artifacts[37].hash = getChecksumFile("./http-api/target/"+artifacts[37].name);
artifacts[37].path = "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/"+artifacts[37].name;
artifacts[37].size = Long.toString(getFileSize("./http-api/target/"+artifacts[37].name));
} catch (IOException e) {
e.printStackTrace();
}
return artifacts;
}
}
private static String bytesToHex(byte[] hashInBytes)
{
StringBuilder sb = new StringBuilder();
for (byte b : hashInBytes)
{
sb.append(String.format("%02x", b));
}
return sb.toString();
public static String getChecksumObject(Serializable object) throws IOException, NoSuchAlgorithmException {
ByteArrayOutputStream baos = null;
ObjectOutputStream oos = null;
try {
baos = new ByteArrayOutputStream();
oos = new ObjectOutputStream(baos);
oos.writeObject(object);
MessageDigest md = MessageDigest.getInstance("MD5");
byte[] thedigest = md.digest(baos.toByteArray());
return DatatypeConverter.printHexBinary(thedigest);
} finally {
oos.close();
baos.close();
}
}
private static String getChecksumFile(String filepath) throws IOException {
System.out.println("Generating Hash for "+filepath);
MessageDigest md = null;
try {
md = MessageDigest.getInstance("SHA-256");
} catch (Exception e) {
e.printStackTrace();
}
try (DigestInputStream dis = new DigestInputStream(new FileInputStream(filepath), md)) {
while (dis.read() != -1) ; //empty loop to clear the data
md = dis.getMessageDigest();
} catch (Exception e) {
e.printStackTrace();
}
}
return bytesToHex(md.digest());
public Artifact[] getArtifacts()
{
try
{
artifacts = new Artifact[42];
}
//Static artifacts
artifacts[0] = new Artifact();
artifacts[0].hash = "b12331da8683e5f107d294adeebb83ecf9124abc1db533554d2a8d3c62832d75";
artifacts[0].name = "asm-all-6.0_BETA.jar";
artifacts[0].path = "https://mvn.runelite.net/org/ow2/asm/asm-all/6.0_BETA/asm-all-6.0_BETA.jar";
artifacts[0].size = "265176";
artifacts[1] = new Artifact();
artifacts[1].hash = "37abf0103ce5318bfda004fabc004c75ed0dc6d392a8459175692ab7eac97083";
artifacts[1].name = "naturalmouse-2.0.0.jar";
artifacts[1].path = "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/artifacts/naturalmouse-2.0.0.jar";
artifacts[1].size = "3168921";
artifacts[2] = new Artifact();
artifacts[2].hash = "50d1e07f11827672249dee9ce8a23691fc59f663deed084bb7b52a4f778d5fbc";
artifacts[2].name = "jcl-core-2.9-SNAPSHOT.jar";
artifacts[2].path = "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/artifacts/jcl-core-2.9-SNAPSHOT.jar";
artifacts[2].size = "3168921";
artifacts[4] = new Artifact();
artifacts[4].hash = "18c4a0095d5c1da6b817592e767bb23d29dd2f560ad74df75ff3961dbde25b79";
artifacts[4].name = "slf4j-api-1.7.25.jar";
artifacts[4].path = "https://mvn.runelite.net/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar";
artifacts[4].size = "41203";
artifacts[5] = new Artifact();
artifacts[5].hash = "fb53f8539e7fcb8f093a56e138112056ec1dc809ebb020b59d8a36a5ebac37e0";
artifacts[5].name = "logback-classic-1.2.3.jar";
artifacts[5].path = "https://mvn.runelite.net/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar";
artifacts[5].size = "290339";
artifacts[6] = new Artifact();
artifacts[6].hash = "5946d837fe6f960c02a53eda7a6926ecc3c758bbdd69aa453ee429f858217f22";
artifacts[6].name = "logback-core-1.2.3.jar";
artifacts[6].path = "https://mvn.runelite.net/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar";
artifacts[6].size = "471901";
artifacts[7] = new Artifact();
artifacts[7].hash = "9f0c8d50fa4b79b6ff1502dbec8502179d6b9497cacbe17a13074001aed537ec";
artifacts[7].name = "jopt-simple-5.0.1.jar";
artifacts[7].path = "https://mvn.runelite.net/net/sf/jopt-simple/jopt-simple/5.0.1/jopt-simple-5.0.1.jar";
artifacts[7].size = "78826";
artifacts[8] = new Artifact();
artifacts[8].hash = "5be9a7d05ba0ccd74708bc8018ae412255f85843c0b92302e9b9befa6ed52564";
artifacts[8].name = "guava-23.2-jre.jar";
artifacts[8].path = "https://mvn.runelite.net/com/google/guava/guava/23.2-jre/guava-23.2-jre.jar";
artifacts[8].size = "2649860";
artifacts[9] = new Artifact();
artifacts[9].hash = "905721a0eea90a81534abb7ee6ef4ea2e5e645fa1def0a5cd88402df1b46c9ed";
artifacts[9].name = "jsr305-1.3.9.jar";
artifacts[9].path = "https://mvn.runelite.net/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar";
artifacts[9].size = "33015";
artifacts[10] = new Artifact();
artifacts[10].hash = "cb4cfad870bf563a07199f3ebea5763f0dec440fcda0b318640b1feaa788656b";
artifacts[10].name = "error_prone_annotations-2.0.18.jar";
artifacts[10].path = "https://mvn.runelite.net/com/google/errorprone/error_prone_annotations/2.0.18/error_prone_annotations-2.0.18.jar";
artifacts[10].size = "12078";
artifacts[11] = new Artifact();
artifacts[11].hash = "2994a7eb78f2710bd3d3bfb639b2c94e219cedac0d4d084d516e78c16dddecf6";
artifacts[11].name = "j2objc-annotations-1.1.jar";
artifacts[11].path = "https://mvn.runelite.net/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar";
artifacts[11].size = "8782";
artifacts[12] = new Artifact();
artifacts[12].hash = "2068320bd6bad744c3673ab048f67e30bef8f518996fa380033556600669905d";
artifacts[12].name = "animal-sniffer-annotations-1.14.jar";
artifacts[12].path = "https://mvn.runelite.net/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar";
artifacts[12].size = "3482";
artifacts[13] = new Artifact();
artifacts[13].hash = "9264c6931c431e928dc64adc842584d5f57d17b2f3aff29221f2b3fdea673dad";
artifacts[13].name = "guice-4.1.0-no_aop.jar";
artifacts[13].path = "https://mvn.runelite.net/com/google/inject/guice/4.1.0/guice-4.1.0-no_aop.jar";
artifacts[13].size = "428603";
artifacts[14] = new Artifact();
artifacts[14].hash = "91c77044a50c481636c32d916fd89c9118a72195390452c81065080f957de7ff";
artifacts[14].name = "javax.inject-1.jar";
artifacts[14].path = "https://mvn.runelite.net/javax/inject/javax.inject/1/javax.inject-1.jar";
artifacts[14].size = "2497";
artifacts[15] = new Artifact();
artifacts[15].hash = "0addec670fedcd3f113c5c8091d783280d23f75e3acb841b61a9cdb079376a08";
artifacts[15].name = "aopalliance-1.0.jar";
artifacts[15].path = "https://mvn.runelite.net/aopalliance/aopalliance/1.0/aopalliance-1.0.jar";
artifacts[15].size = "4467";
artifacts[16] = new Artifact();
artifacts[16].hash = "233a0149fc365c9f6edbd683cfe266b19bdc773be98eabdaf6b3c924b48e7d81";
artifacts[16].name = "gson-2.8.5.jar";
artifacts[16].path = "https://mvn.runelite.net/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar";
artifacts[16].size = "241622";
artifacts[17] = new Artifact();
artifacts[17].hash = "0467d25f408428824d5c9c09ec60ee1f0bc341d9bf48971a77fd14939a826c83";
artifacts[17].name = "substance-8.0.02.jar";
artifacts[17].path = "https://repo.runelite.net/net/runelite/pushingpixels/substance/8.0.02/substance-8.0.02.jar";
artifacts[17].size = "1589195";
artifacts[18] = new Artifact();
artifacts[18].hash = "3214e1c23d549d5d67c91da4da1ef33c5248470bb824f91cbe8f9e0beea59eef";
artifacts[18].name = "trident-1.5.00.jar";
artifacts[18].path = "https://repo.runelite.net/net/runelite/pushingpixels/trident/1.5.00/trident-1.5.00.jar";
artifacts[18].size = "79726";
artifacts[19] = new Artifact();
artifacts[19].hash = "d4a57bbc1627da7c391308fd0fe910b83170fb66afd117236a5b111d2db1590b";
artifacts[19].name = "commons-text-1.2.jar";
artifacts[19].path = "https://mvn.runelite.net/org/apache/commons/commons-text/1.2/commons-text-1.2.jar";
artifacts[19].size = "136544";
artifacts[20] = new Artifact();
artifacts[20].hash = "6e8dc31e046508d9953c96534edf0c2e0bfe6f468966b5b842b3f87e43b6a847";
artifacts[20].name = "commons-lang3-3.7.jar";
artifacts[20].path = "https://mvn.runelite.net/org/apache/commons/commons-lang3/3.7/commons-lang3-3.7.jar";
artifacts[20].size = "499634";
artifacts[21] = new Artifact();
artifacts[21].hash = "e74603dc77b4183f108480279dbbf7fed3ac206069478636406c1fb45e83b31a";
artifacts[21].name = "jogl-all-2.3.2.jar";
artifacts[21].path = "https://mvn.runelite.net/org/jogamp/jogl/jogl-all/2.3.2/jogl-all-2.3.2.jar";
artifacts[21].size = "3414448";
artifacts[22] = new Artifact();
artifacts[22].hash = "8c53b1884cef19309d34fd10a94b010136d9d6de9a88c386f46006fb47acab5d";
artifacts[22].name = "jogl-all-2.3.2-natives-windows-amd64.jar";
artifacts[22].path = "https://mvn.runelite.net/org/jogamp/jogl/jogl-all/2.3.2/jogl-all-2.3.2-natives-windows-amd64.jar";
artifacts[22].size = "240721";
artifacts[23] = new Artifact();
artifacts[23].hash = "507a0e6bd1ee4e81c3dfb287783af93775864eec742988d4162f98ce0cbac9d6";
artifacts[23].name = "jogl-all-2.3.2-natives-windows-i586.jar";
artifacts[23].path = "https://mvn.runelite.net/org/jogamp/jogl/jogl-all/2.3.2/jogl-all-2.3.2-natives-windows-i586.jar";
artifacts[23].size = "209445";
artifacts[24] = new Artifact();
artifacts[24].hash = "82637302ae9effdf7d6f302e1050ad6aee3b13019914ddda5b502b9faa980216";
artifacts[24].name = "jogl-all-2.3.2-natives-linux-amd64.jar";
artifacts[24].path = "https://mvn.runelite.net/org/jogamp/jogl/jogl-all/2.3.2/jogl-all-2.3.2-natives-linux-amd64.jar";
artifacts[24].size = "224010";
artifacts[25] = new Artifact();
artifacts[25].hash = "f474ef2ef01be24ec811d3858b0f4bc5659076975f4a58ddd79abd787e9305c7";
artifacts[25].name = "jogl-all-2.3.2-natives-linux-i586.jar";
artifacts[25].path = "https://mvn.runelite.net/org/jogamp/jogl/jogl-all/2.3.2/jogl-all-2.3.2-natives-linux-i586.jar";
artifacts[25].size = "217274";
artifacts[26] = new Artifact();
artifacts[26].hash = "084844543b18f7ff71b4c0437852bd22f0cb68d7e44c2c611c1bbea76f8c6fdf";
artifacts[26].name = "gluegen-rt-2.3.2.jar";
artifacts[26].path = "https://mvn.runelite.net/org/jogamp/gluegen/gluegen-rt/2.3.2/gluegen-rt-2.3.2.jar";
artifacts[26].size = "345605";
artifacts[27] = new Artifact();
artifacts[27].hash = "3474017422eff384db466bdb56c96c61220c43133a9da6329cf1781bea16c6b6";
artifacts[27].name = "gluegen-rt-2.3.2-natives-windows-amd64.jar";
artifacts[27].path = "https://mvn.runelite.net/org/jogamp/gluegen/gluegen-rt/2.3.2/gluegen-rt-2.3.2-natives-windows-amd64.jar";
artifacts[27].size = "8159";
artifacts[28] = new Artifact();
artifacts[28].hash = "4eeed9fc2ebea5b9dc48a342b9478d127e989a2e1aa7129b512a98ec75cde338";
artifacts[28].name = "gluegen-rt-2.3.2-natives-windows-i586.jar";
artifacts[28].path = "https://mvn.runelite.net/org/jogamp/gluegen/gluegen-rt/2.3.2/gluegen-rt-2.3.2-natives-windows-i586.jar";
artifacts[28].size = "7577";
artifacts[29] = new Artifact();
artifacts[29].hash = "f2dfd1800202059cf7e0294db5d57755147304e6eb220a9277526dbe6842bde2";
artifacts[29].name = "gluegen-rt-2.3.2-natives-linux-amd64.jar";
artifacts[29].path = "https://mvn.runelite.net/org/jogamp/gluegen/gluegen-rt/2.3.2/gluegen-rt-2.3.2-natives-linux-amd64.jar";
artifacts[29].size = "4149";
artifacts[30] = new Artifact();
artifacts[30].hash = "1365d463f98c0abec92f3ad6b35aa4b53a9599a517800cf99fdabea6712ca7ec";
artifacts[30].name = "gluegen-rt-2.3.2-natives-linux-i586.jar";
artifacts[30].path = "https://mvn.runelite.net/org/jogamp/gluegen/gluegen-rt/2.3.2/gluegen-rt-2.3.2-natives-linux-i586.jar";
artifacts[30].size = "4130";
artifacts[31] = new Artifact();
artifacts[31].hash = "7b7ae00e2aa98c3b2b5ac76e793e2c9b752bf51c86c54654dbd473843a25f1aa";
artifacts[31].name = "jbsdiff-1.0.jar";
artifacts[31].path = "https://mvn.runelite.net/io/sigpipe/jbsdiff/1.0/jbsdiff-1.0.jar";
artifacts[31].size = "24589";
artifacts[32] = new Artifact();
artifacts[32].hash = "55bbfe26cee9296fd5b7c0d47ce6a00ea4dd572e235b63e9bb4eaf6f802315e4";
artifacts[32].name = "commons-compress-1.5.jar";
artifacts[32].path = "https://mvn.runelite.net/org/apache/commons/commons-compress/1.5/commons-compress-1.5.jar";
artifacts[32].size = "256241";
artifacts[33] = new Artifact();
artifacts[33].hash = "fbc9de96a0cc193a125b4008dbc348e9ed54e5e13fc67b8ed40e645d303cc51b";
artifacts[33].name = "jna-4.5.1.jar";
artifacts[33].path = "https://mvn.runelite.net/net/java/dev/jna/jna/4.5.1/jna-4.5.1.jar";
artifacts[33].size = "1440662";
artifacts[34] = new Artifact();
artifacts[34].hash = "84c8667555ee8dd91fef44b451419f6f16f71f727d5fc475a10c2663eba83abb";
artifacts[34].name = "jna-platform-4.5.1.jar";
artifacts[34].path = "https://mvn.runelite.net/net/java/dev/jna/jna-platform/4.5.1/jna-platform-4.5.1.jar";
artifacts[34].size = "2327547";
artifacts[38] = new Artifact();
artifacts[38].hash = "f55abda036da75e1af45bd43b9dfa79b2a3d90905be9cb38687c6621597a8165";
artifacts[38].name = "okhttp-3.7.0.jar";
artifacts[38].path = "https://mvn.runelite.net/com/squareup/okhttp3/okhttp/3.7.0/okhttp-3.7.0.jar";
artifacts[38].size = "394987";
artifacts[39] = new Artifact();
artifacts[39].hash = "bfe7dfe483c37137966a1690f0c7d0b448ba217902c1fed202aaffdbba3291ae";
artifacts[39].name = "okio-1.12.0.jar";
artifacts[39].path = "https://mvn.runelite.net/com/squareup/okio/okio/1.12.0/okio-1.12.0.jar";
artifacts[39].size = "81088";
artifacts[40] = new Artifact();
artifacts[40].hash = "9d4924588d6280c7516db3a4b7298306db5b6f0d1cdf568ce738309b5660f008";
artifacts[40].name = "commons-csv-1.4.jar";
artifacts[40].path = "https://mvn.runelite.net/org/apache/commons/commons-csv/1.4/commons-csv-1.4.jar";
artifacts[40].size = "39978";
artifacts[41] = new Artifact();
artifacts[41].hash = "7e26a8d043418f2f22d5f6a3083a9a131817009ee8cd72c004e83b50d1849a7c";
artifacts[41].name = "discord-1.1.jar";
artifacts[41].path = "https://repo.runelite.net/net/runelite/discord/1.1/discord-1.1.jar";
artifacts[41].size = "617294";
private static String bytesToHex(byte[] hashInBytes) {
//Dynamic artifacts
artifacts[3] = new Artifact();
artifacts[3].name = "client-" + RuneLiteAPI.getVersion() + ".jar";
artifacts[3].hash = getChecksumFile("./runelite-client/target/" + artifacts[3].name);
artifacts[3].path = "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/" + artifacts[3].name;
artifacts[3].size = Long.toString(getFileSize("./runelite-client/target/" + artifacts[3].name));
artifacts[35] = new Artifact();
artifacts[35].name = "runelite-api-" + RuneLiteAPI.getVersion() + ".jar";
artifacts[35].hash = getChecksumFile("./runelite-api/target/" + artifacts[35].name);
artifacts[35].path = "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/" + artifacts[35].name;
artifacts[35].size = Long.toString(getFileSize("./runelite-api/target/" + artifacts[35].name));
artifacts[36] = new Artifact();
artifacts[36].name = "runescape-api-" + RuneLiteAPI.getVersion() + ".jar";
artifacts[36].hash = getChecksumFile("./runescape-api/target/" + artifacts[36].name);
artifacts[36].path = "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/" + artifacts[36].name;
artifacts[36].size = Long.toString(getFileSize("./runescape-api/target/" + artifacts[36].name));
artifacts[37] = new Artifact();
artifacts[37].name = "http-api-" + RuneLiteAPI.getVersion() + ".jar";
artifacts[37].hash = getChecksumFile("./http-api/target/" + artifacts[37].name);
artifacts[37].path = "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/" + artifacts[37].name;
artifacts[37].size = Long.toString(getFileSize("./http-api/target/" + artifacts[37].name));
}
catch (IOException e)
{
e.printStackTrace();
}
return artifacts;
}
StringBuilder sb = new StringBuilder();
for (byte b : hashInBytes) {
sb.append(String.format("%02x", b));
}
return sb.toString();
}
private long getFileSize(String fileLocation) {
File f = new File(fileLocation);
return f.length();
}
private long getFileSize(String fileLocation)
{
File f = new File(fileLocation);
return f.length();
}
}

View File

@@ -2,24 +2,24 @@ package net.runelite.client.util.bootstrap;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
public class Bootstrapper {
public class Bootstrapper
{
public static void main(String[] args) {
Gson gson = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting().create();
try {
FileWriter fw = new FileWriter("./bootstrap.json");
gson.toJson(new Bootstrap(), fw);
fw.close();
} catch (Exception e) {
e.printStackTrace();
}
public static void main(String[] args)
{
Gson gson = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting().create();
try
{
FileWriter fw = new FileWriter("./bootstrap.json");
gson.toJson(new Bootstrap(), fw);
fw.close();
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
}

View File

@@ -1,11 +1,12 @@
package net.runelite.client.util.bootstrap;
public class Client {
public class Client
{
String artifactId = "client";
String classifier = "";
String extension = "jar";
String groupId = "net.runelite";
String properties = "";
String version = "1.5.27";
String artifactId = "client";
String classifier = "";
String extension = "jar";
String groupId = "net.runelite";
String properties = "";
String version = "1.5.27";
}