diff --git a/README.md b/README.md index d63298d308..70f1c15b43 100644 --- a/README.md +++ b/README.md @@ -3,27 +3,33 @@ # RuneLitePlus -[![forthebadge](https://forthebadge.com/images/badges/built-by-developers.svg)](https://forthebadge.com) - -[![Build Status](https://travis-ci.org/runelite-extended/runelite.svg?branch=master)](https://travis-ci.org/runelite-extended/runelite) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![HitCount](http://hits.dwyl.io/runelite-extended/runelite.svg)](http://hits.dwyl.io/runelite-extended/runelite) [![saythanks](https://img.shields.io/badge/say-thanks-32cd32.svg)](https://www.patreon.com/RuneLitePlus) - -[RuneLitePlus](https://runelitepl.us) is an extended version of [RuneLite](https://github.com/runelite/runelite) that provides more functionality and less restrictions while staying more open-source. - - +[![Build Status](https://travis-ci.org/runelite-extended/runelite.svg?branch=master)](https://travis-ci.org/runelite-extended/runelite) +[![HitCount](http://hits.dwyl.io/runelite-extended/runelite.svg)](http://hits.dwyl.io/runelite-extended/runelite) +[RuneLitePlus](https://runelitepl.us) is an extended version of [RuneLite](https://github.com/runelite/runelite) that provides more functionality and less restrictions while staying more open-source. We are not affiliated with RuneLite. ## Discord -![[Discord]](https://discordapp.com/api/guilds/373382904769675265/widget.png?style=banner2) +[![Discord](https://img.shields.io/discord/373382904769675265.svg)](https://discord.gg/HN5gf3m) ## Project Layout - [cache](cache/src/main/java/net/runelite/cache) - Libraries used for reading/writing cache files, as well as the data in it +- [deobfuscator](deobfuscator/src/main/java/net/runelite/deob) - Can decompile and cleanup gamepacks as well as map updates to newer revs - [http-api](http-api/src/main/java/net/runelite/http/api) - API for runelite and runeliteplus - [http-service](http-service/src/main/java/net/runelite/http/service) - Service for https://api.runelitepl.us +- [injector-plugin](injector-plugin/src/main/java/net/runelite/injector) - Tool for implementing our modifications to the gamepack - [runelite-api](runelite-api/src/main/java/net/runelite/api) - RuneLite API, interfaces for accessing the client -- [runelite-mixins](runelite-mixins/src/main/java/net/runelite) - Mixins which are injected into the vanilla client's classes +- [runelite-mixins](runelite-mixins/src/main/java/net/runelite) - Classes containing the Objects to be injected using the injector-plugin - [runescape-api](runescape-api/src/main/java/net/runelite) - Mappings correspond to these interfaces, runelite-api is a subset of this - [runelite-client](runelite-client/src/main/java/net/runelite/client) - Game client with plugins +## Private Servers +Currently we support RSMod which can be found at: https://github.com/Tomm0017/rsmod +``` +Use -local-injected and -private-server args. +Replace modulus in RSBufferMixin. +Set codebase in PrivateRSAppletStub. +Disable Default World plugin if you have it enabled, this causes issues with codebase. +``` ## License RuneLitePlus is licensed under the BSD 2-clause license. See the license header in the respective file to be sure. diff --git a/live/bootstrap.json b/live/bootstrap.json index e372264b28..94cd3c7a1b 100644 --- a/live/bootstrap.json +++ b/live/bootstrap.json @@ -56,10 +56,10 @@ "size": "3168921" }, { - "hash": "d982191ebbd930b573e6d2242cdfefefdf1c610f1f046e204866749eefde1c5f", + "hash": "e25ba84d1b376ed44b9ecdc72a23db55e2127c1079507ab79d0d2d2e3cae7d0d", "name": "client-1.5.30-SNAPSHOT.jar", "path": "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/client-1.5.30-SNAPSHOT.jar", - "size": "6280727" + "size": "6287131" }, { "hash": "18c4a0095d5c1da6b817592e767bb23d29dd2f560ad74df75ff3961dbde25b79", @@ -248,10 +248,10 @@ "size": "2327547" }, { - "hash": "c0a81abdd6a7486851ef7f0df2ce70d7e362fb033eb5c4267a4a476e35a1824a", + "hash": "62e5ffeaef627f96c08f7ba203ac15bec1e6d1bc975e43f94b9fd0affe8fc53a", "name": "runelite-api-1.5.30-SNAPSHOT.jar", "path": "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/runelite-api-1.5.30-SNAPSHOT.jar", - "size": "1033784" + "size": "1033835" }, { "hash": "e8e743c2eb9e59f2990a5bdc48f061b7138890f065c0d603ecb8cdf0b0b158f7", @@ -260,7 +260,7 @@ "size": "58398" }, { - "hash": "fea59d29ac883248bcc77a5f05b0cefebc226583d291f52d377e39db06fe7d19", + "hash": "d6fd6564dcbbaa68259d675a6f4928cf44394f04963917f08d2c1c179eee829d", "name": "http-api-1.5.30-SNAPSHOT.jar", "path": "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/http-api-1.5.30-SNAPSHOT.jar", "size": "139678" @@ -290,10 +290,10 @@ "size": "617294" }, { - "hash": "9f5333cb045ebd90b1ee457f1ceafc1a085265232926a24fb582ff1960bef703", + "hash": "efeddd377fb52fcb8298d016277299316b4637be9e52a51cc2bea980610c6b1b", "name": "injected-client-1.5.30-SNAPSHOT.jar", "path": "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/injected-client-1.5.30-SNAPSHOT.jar", - "size": "2253443" + "size": "2253211" }, { "hash": "21b5cac673a156cd8d6cf9efe15ff267b6353eeb129678aa4b39542683ba0dc2", @@ -308,7 +308,7 @@ "size": "27750" }, { - "hash": "830a08b9d5c20ab8e2033c16fc6ee067e6ffcd0c730f303d648aadfa81210d62", + "hash": "cc09ab0b140e0d0496c2165d4b32ce24f4d6446c0a26c5dc77b06bdf99ee8fae", "name": "reactive-streams-1.0.2.jar", "path": "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/artifacts/reactive-streams-1.0.2.jar", "size": "27750" diff --git a/params.txt b/params.txt new file mode 100644 index 0000000000..f6a66a22f3 --- /dev/null +++ b/params.txt @@ -0,0 +1,24 @@ +Created at Thu Jul 18 15:08:02 CDT 2019 + +codebase=http://oldschool14.runescape.com/ +mainclass=client.class + +param=1=1 +param=2=https://payments.jagex.com/operator/v1/ +param=3=true +param=4=59193 +param=5=1 +param=6=0 +param=7=0 +param=8=true +param=9=ElZAIrq5NpKN6D3mDdihco3oPeYN2KFy2DCquj7JMmECPmLrDP3Bnw +param=10=5 +param=11=https://auth.jagex.com/ +param=12=314 +param=13=.runescape.com +param=14=0 +param=15=0 +param=16=false +param=17=http://www.runescape.com/g=oldscape/slr.ws?order=LPWM +param=18= +param=19=196515767263-1oo20deqm6edn7ujlihl6rpadk9drhva.apps.googleusercontent.com diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml index 2313bd41fc..1363d27664 100644 --- a/runelite-client/pom.xml +++ b/runelite-client/pom.xml @@ -199,12 +199,6 @@ ${project.version} runtime - - net.runelite - injected-client - ${project.version} - runtime - net.runelite http-api diff --git a/runelite-client/src/main/java/net/runelite/client/RuneLite.java b/runelite-client/src/main/java/net/runelite/client/RuneLite.java index 250b90f877..3cc75969f1 100644 --- a/runelite-client/src/main/java/net/runelite/client/RuneLite.java +++ b/runelite-client/src/main/java/net/runelite/client/RuneLite.java @@ -82,7 +82,7 @@ import org.slf4j.LoggerFactory; @Slf4j public class RuneLite { - public static final String RUNELIT_VERSION = "2.0.4"; + public static final String RUNELIT_VERSION = "2.0.5"; 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"); @@ -181,6 +181,7 @@ public class RuneLite parser.accepts("debug", "Show extra debugging output"); parser.accepts("no-splash", "Do not show the splash screen"); parser.accepts("local-injected", "Use local injected-client"); + parser.accepts("private-server", "Use a non official server to play"); final ArgumentAcceptingOptionSpec proxyInfo = parser .accepts("proxy") @@ -251,6 +252,13 @@ public class RuneLite } } + final boolean privateServer = options.has("private-server"); + + if (privateServer) + { + ClientLoader.usePrivateServer = true; + } + PROFILES_DIR.mkdirs(); if (options.has("debug")) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/chattranslation/ChatTranslationConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/chattranslation/ChatTranslationConfig.java index b0c4a1f580..d50a6b18ca 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/chattranslation/ChatTranslationConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chattranslation/ChatTranslationConfig.java @@ -51,7 +51,7 @@ public interface ChatTranslationConfig extends Config @ConfigItem( keyName = "publicTargetLanguage", name = "Target Language", - description = "Language to translate messages too.", + description = "Language to translate messages to.", position = 2, group = "Chat Translation", hidden = true, @@ -77,7 +77,7 @@ public interface ChatTranslationConfig extends Config @ConfigItem( keyName = "playerTargetLanguage", name = "Target Language", - description = "Language to translate messages too.", + description = "Language to translate messages to.", position = 4, group = "Player Message Translation", hidden = true, diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/grandexchange/GrandExchangePlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/grandexchange/GrandExchangePlugin.java index afd9b1de9a..3f06041e24 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/grandexchange/GrandExchangePlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/grandexchange/GrandExchangePlugin.java @@ -35,6 +35,7 @@ import java.awt.image.BufferedImage; import java.io.InputStream; import java.io.InputStreamReader; import java.util.Map; +import java.util.Objects; import java.util.concurrent.ScheduledExecutorService; import javax.inject.Inject; import javax.inject.Singleton; @@ -60,6 +61,7 @@ import net.runelite.api.events.ChatMessage; import net.runelite.api.events.ConfigChanged; import net.runelite.api.events.FocusChanged; import net.runelite.api.events.GameStateChanged; +import net.runelite.api.events.GameTick; import net.runelite.api.events.GrandExchangeOfferChanged; import net.runelite.api.events.MenuEntryAdded; import net.runelite.api.events.ScriptCallbackEvent; @@ -98,20 +100,18 @@ import net.runelite.http.api.osbuddy.OSBGrandExchangeClient; @Singleton public class GrandExchangePlugin extends Plugin { + static final String SEARCH_GRAND_EXCHANGE = "Search Grand Exchange"; + private static final int OFFER_TYPE = 18; private static final int OFFER_CONTAINER_ITEM = 21; private static final int OFFER_DEFAULT_ITEM_ID = 6512; private static final OSBGrandExchangeClient CLIENT = new OSBGrandExchangeClient(); private static final String OSB_GE_TEXT = "
OSBuddy Actively traded price: "; - - private static final String BUY_LIMIT_GE_TEXT = "Buy limit: "; - private static final String AFFORD_GE_TEXT = "
Afford: "; + private static final String AFFORD_GE_TEXT = "
Can Afford: "; + private static final String BUY_LIMIT_GE_TEXT = "
Buy limit: "; private static final Gson GSON = new Gson(); private static final TypeToken> BUY_LIMIT_TOKEN = new TypeToken>() { }; - - static final String SEARCH_GRAND_EXCHANGE = "Search Grand Exchange"; - @Getter(AccessLevel.PACKAGE) private NavigationButton button; @@ -162,17 +162,26 @@ public class GrandExchangePlugin extends Plugin private EventBus eventBus; private Widget grandExchangeText; + private Widget grandExchangeOfferType; private Widget grandExchangeItem; private Map itemGELimits; private GrandExchangeClient grandExchangeClient; private int coins = 0; - private int lastAmount = -1; - private int lastItem = -1; + private boolean quickLookup; + private boolean enableNotifications; + private boolean enableOsbPrices; + private boolean enableGELimits; + private boolean enableAfford; - private int osbItem = -1; - private String osbText = ""; + private static Map loadGELimits() + { + final InputStream geLimitData = GrandExchangePlugin.class.getResourceAsStream("ge_limits.json"); + final Map itemGELimits = GSON.fromJson(new InputStreamReader(geLimitData), BUY_LIMIT_TOKEN.getType()); + log.debug("Loaded {} limits", itemGELimits.size()); + return itemGELimits; + } private SavedOffer getOffer(int slot) { @@ -194,12 +203,6 @@ public class GrandExchangePlugin extends Plugin configManager.unsetConfiguration("geoffer." + client.getUsername().toLowerCase(), Integer.toString(slot)); } - private boolean quickLookup; - private boolean enableNotifications; - private boolean enableOsbPrices; - private boolean enableGELimits; - private boolean enableAfford; - @Provides GrandExchangeConfig provideConfig(ConfigManager configManager) { @@ -250,6 +253,7 @@ public class GrandExchangePlugin extends Plugin keyManager.unregisterKeyListener(inputListener); grandExchangeText = null; grandExchangeItem = null; + grandExchangeOfferType = null; itemGELimits = null; grandExchangeClient = null; } @@ -257,6 +261,7 @@ public class GrandExchangePlugin extends Plugin private void addSubscriptions() { eventBus.subscribe(ConfigChanged.class, this, this::onConfigChanged); + eventBus.subscribe(GameTick.class, this, this::onGameTick); eventBus.subscribe(ChatMessage.class, this, this::onChatMessage); eventBus.subscribe(SessionOpen.class, this, this::onSessionOpen); eventBus.subscribe(SessionClose.class, this, this::onSessionClose); @@ -461,14 +466,14 @@ public class GrandExchangePlugin extends Plugin { switch (event.getGroupId()) { - // Grand exchange was opened. case WidgetID.GRAND_EXCHANGE_GROUP_ID: Widget grandExchangeOffer = client.getWidget(WidgetInfo.GRAND_EXCHANGE_OFFER_CONTAINER); grandExchangeText = client.getWidget(WidgetInfo.GRAND_EXCHANGE_OFFER_TEXT); grandExchangeItem = grandExchangeOffer.getDynamicChildren()[OFFER_CONTAINER_ITEM]; + grandExchangeOfferType = grandExchangeOffer.getDynamicChildren()[OFFER_TYPE]; break; - // Grand exchange was closed (if it was open before). case WidgetID.INVENTORY_GROUP_ID: + grandExchangeOfferType = null; grandExchangeText = null; grandExchangeItem = null; break; @@ -477,11 +482,6 @@ public class GrandExchangePlugin extends Plugin private void onScriptCallbackEvent(ScriptCallbackEvent event) { - if (event.getEventName().equals("geBuilt")) - { - rebuildGeText(); - } - if (!event.getEventName().equals("setGETitle") || !config.showTotal()) { return; @@ -515,14 +515,13 @@ public class GrandExchangePlugin extends Plugin titleBuilder.append(')'); - // Append to title String[] stringStack = client.getStringStack(); int stringStackSize = client.getStringStackSize(); stringStack[stringStackSize - 1] += titleBuilder.toString(); } - public void rebuildGeText() + private void onGameTick(GameTick event) { if (grandExchangeText == null || grandExchangeItem == null || grandExchangeItem.isHidden()) { @@ -530,32 +529,22 @@ public class GrandExchangePlugin extends Plugin } final Widget geText = grandExchangeText; + final String geTextString = geText.getText(); + final String offerType = grandExchangeOfferType.getText(); final int itemId = grandExchangeItem.getItemId(); if (itemId == OFFER_DEFAULT_ITEM_ID || itemId == -1) { - lastAmount = osbItem = lastItem = -1; - // This item is invalid/nothing has been searched for return; } + final int currentItemPrice = client.getVar(Varbits.GRAND_EXCHANGE_PRICE_PER_ITEM); - if (lastItem == itemId && lastAmount == currentItemPrice ) - { - return; - } - - lastItem = itemId; - lastAmount = currentItemPrice; - - String[] texts = geText.getText().split("
"); - String text = texts[0]; - - if (this.enableAfford) + if (this.enableAfford && offerType.equals("Buy offer") && itemGELimits != null && !geTextString.contains(AFFORD_GE_TEXT)) { final ItemContainer itemContainer = client.getItemContainer(InventoryID.INVENTORY); - final Item[] items = itemContainer.getItems(); + final Item[] items = Objects.requireNonNull(itemContainer).getItems(); for (Item item : items) { if (item.getId() == COINS_995) @@ -565,61 +554,55 @@ public class GrandExchangePlugin extends Plugin } } - text += AFFORD_GE_TEXT + StackFormatter.formatNumber(coins / currentItemPrice) + " "; + final String text = geText.getText() + AFFORD_GE_TEXT + StackFormatter.formatNumber(coins / currentItemPrice) + " "; + geText.setText(text); } - if (this.enableGELimits && itemGELimits != null) + + if (this.enableGELimits && itemGELimits != null && !geTextString.contains(BUY_LIMIT_GE_TEXT)) { final Integer itemLimit = itemGELimits.get(itemId); // If we have item buy limit, append it if (itemLimit != null) { - text += (!this.enableAfford ? "
" : "") + BUY_LIMIT_GE_TEXT + StackFormatter.formatNumber(itemLimit); + final String text = geText.getText() + BUY_LIMIT_GE_TEXT + StackFormatter.formatNumber(itemLimit); + geText.setText(text); } } - if (!this.enableOsbPrices) - + if (!this.enableOsbPrices || geTextString.contains(OSB_GE_TEXT)) { - geText.setText(text); + // OSB prices are disabled or price was already looked up, so no need to set it again return; } - geText.setText(text + osbText); - log.debug("Looking up OSB item price {}", itemId); - if (osbItem == lastItem) - { - // OSB Item was already looked up - return; - } - - osbItem = lastItem; - - final String str = text; executorService.submit(() -> { + if (geText.getText().contains(OSB_GE_TEXT)) + { + // If there are multiple tasks queued and one of them have already added the price + return; + } + CLIENT.lookupItem(itemId) .subscribeOn(Schedulers.io()) .observeOn(Schedulers.from(clientThread)) .subscribe( (osbresult) -> { - osbText = OSB_GE_TEXT + StackFormatter.formatNumber(osbresult.getOverall_average()); - geText.setText(str + osbText); + final String text = geText.getText() + OSB_GE_TEXT + StackFormatter.formatNumber(osbresult.getOverall_average()); + if (geText.getText().contains(OSB_GE_TEXT)) + { + // If there are multiple tasks queued and one of them have already added the price + return; + } + geText.setText(text); }, (e) -> log.debug("Error getting price of item {}", itemId, e) ); }); } - - private static Map loadGELimits() - { - final InputStream geLimitData = GrandExchangePlugin.class.getResourceAsStream("ge_limits.json"); - final Map itemGELimits = GSON.fromJson(new InputStreamReader(geLimitData), BUY_LIMIT_TOKEN.getType()); - log.debug("Loaded {} limits", itemGELimits.size()); - return itemGELimits; - } -} \ No newline at end of file +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/playerscouter/Utils.java b/runelite-client/src/main/java/net/runelite/client/plugins/playerscouter/Utils.java index f3dd181ad7..0c5fa3e69d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/playerscouter/Utils.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/playerscouter/Utils.java @@ -42,6 +42,7 @@ import net.runelite.api.ItemDefinition; import net.runelite.api.NPC; import net.runelite.api.Player; import net.runelite.api.Prayer; +import net.runelite.api.Varbits; import net.runelite.api.coords.WorldArea; import net.runelite.api.coords.WorldPoint; import net.runelite.api.kit.KitType; @@ -521,20 +522,9 @@ class Utils } ThumbnailEmbed image = ThumbnailEmbed.builder() - .url("https://oldschool.runescape.wiki/images/a/a1/Skull_(status)_icon.png") - .height(50) - .width(50) + .url(ICONBASEURL + player.getWeapon() + ".png") .build(); - if (player.getPlayer().getSkullIcon() == null) - { - image = ThumbnailEmbed.builder() - .url(ICONBASEURL + player.getWeapon() + ".png") - .height(100) - .width(100) - .build(); - } - fieldList.add(FieldEmbed.builder() .name("Risk") .value(StackFormatter.quantityToRSDecimalStack(player.getRisk())) @@ -552,18 +542,20 @@ class Utils .value(Integer.toString(player.getPlayer().getCombatLevel())) .inline(true) .build()); + if (client.getVar(Varbits.IN_WILDERNESS) == 1) + { + fieldList.add(FieldEmbed.builder() + .name("Wildy Level") + .value(Integer.toString(player.getWildyLevel())) + .inline(true) + .build()); - fieldList.add(FieldEmbed.builder() - .name("Wildy Level") - .value(Integer.toString(player.getWildyLevel())) - .inline(true) - .build()); - - fieldList.add(FieldEmbed.builder() - .name("Location") - .value(player.getLocation()) - .inline(true) - .build()); + fieldList.add(FieldEmbed.builder() + .name("Location") + .value(player.getLocation()) + .inline(true) + .build()); + } fieldList.add(FieldEmbed.builder() .name("Target") @@ -613,7 +605,15 @@ class Utils } } - message(player.getPlayer().getName(), " ", ICONBASEURL + Objects.requireNonNull(getEntry(player.getGear())).getKey() + ".png", image, fieldList, url, discordClient, color); + String icon = ICONBASEURL + Objects.requireNonNull(getEntry(player.getGear())).getKey() + ".png"; + String name = "☠️ " + player.getName() + " ☠️"; + + if (player.getPlayer().getSkullIcon() == null) + { + name = player.getName(); + } + + message(name, " ", icon, image, fieldList, url, discordClient, color); player.setScouted(true); fieldList.clear(); } @@ -633,7 +633,7 @@ class Utils DiscordEmbed discordEmbed = DiscordEmbed.builder() .author(AuthorEmbed.builder() - .icon_url(iconUrl) // Icon of npc / player + .icon_url(iconUrl) .name(name) .build()) .thumbnail(thumbnail) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/reportbutton/ReportButtonPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/reportbutton/ReportButtonPlugin.java index f8d0888375..1cb1ba2b02 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/reportbutton/ReportButtonPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/reportbutton/ReportButtonPlugin.java @@ -219,7 +219,7 @@ public class ReportButtonPlugin extends Plugin private void onConfigChanged(ConfigChanged event) { - if (event.getGroup().equals("regenmeter")) + if (event.getGroup().equals("reportButton")) { this.timeStyle = config.time(); } diff --git a/runelite-client/src/main/java/net/runelite/client/rs/ClientLoader.java b/runelite-client/src/main/java/net/runelite/client/rs/ClientLoader.java index e39b76716d..3cb2672dfe 100644 --- a/runelite-client/src/main/java/net/runelite/client/rs/ClientLoader.java +++ b/runelite-client/src/main/java/net/runelite/client/rs/ClientLoader.java @@ -26,22 +26,31 @@ */ package net.runelite.client.rs; -import java.net.URLClassLoader; import java.applet.Applet; +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileOutputStream; import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; import java.net.URL; +import java.net.URLClassLoader; +import java.net.URLConnection; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; import lombok.extern.slf4j.Slf4j; +import net.runelite.client.RuneLite; +import net.runelite.http.api.RuneLiteAPI; @Slf4j @Singleton public class ClientLoader { + public static boolean useLocalInjected = false; + public static boolean usePrivateServer = false; private final ClientConfigLoader clientConfigLoader; private final ClientUpdateCheckMode updateCheckMode; - public static boolean useLocalInjected = false; @Inject private ClientLoader( @@ -52,6 +61,120 @@ public class ClientLoader this.clientConfigLoader = clientConfigLoader; } + private static Applet loadRLPlus(final RSConfig config) throws ClassNotFoundException, InstantiationException, IllegalAccessException + { + if (useLocalInjected) + { + try + { + URL localInjected = new File("./injected-client/target/injected-client-" + RuneLiteAPI.getVersion() + ".jar").toURI().toURL(); + log.info("Using local injected-client"); + URLClassLoader classLoader = new URLClassLoader(new URL[]{localInjected}); + Class clientClass = classLoader.loadClass("client"); + return loadFromClass(config, clientClass); + } + catch (MalformedURLException e) + { + e.printStackTrace(); + } + } + + try + { + File cachedInjected = new File(RuneLite.RUNELITE_DIR + "/injected-client-" + RuneLiteAPI.getVersion() + ".jar"); + URL remoteInjected = new URL("https://github.com/runelite-extended/maven-repo/raw/master/live/injected-client-" + RuneLiteAPI.getVersion() + ".jar"); + int remoteSize = getFileSize(remoteInjected); + URL cachedInjectedURL = cachedInjected.toURI().toURL(); + int cachedSize = 0; + if (cachedInjected.exists()) + { + cachedSize = getFileSize(cachedInjectedURL); + } + + if (remoteSize != cachedSize) + { + log.info("Injected-client size mismatch, updating."); + try (BufferedInputStream in = new BufferedInputStream(remoteInjected.openStream())) + { + FileOutputStream fileOutputStream = new FileOutputStream(cachedInjected); + byte[] dataBuffer = new byte[1024]; + int bytesRead; + while ((bytesRead = in.read(dataBuffer, 0, 1024)) != -1) + { + fileOutputStream.write(dataBuffer, 0, bytesRead); + } + } + catch (IOException e) + { + e.printStackTrace(); + } + + } + URLClassLoader classLoader = new URLClassLoader(new URL[]{cachedInjectedURL}, RuneLite.class.getClassLoader()); + Class clientClass = classLoader.loadClass("client"); + return loadFromClass(config, clientClass); + } + catch (IOException e) + { + e.printStackTrace(); + } + + log.error("Failed to load injected-client!"); + return null; + } + + private static Applet loadVanilla(final RSConfig config) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException + { + final String codebase = config.getCodeBase(); + final String initialJar = config.getInitialJar(); + final String initialClass = config.getInitialClass(); + final URL url = new URL(codebase + initialJar); + + // Must set parent classloader to null, or it will pull from + // this class's classloader first + final URLClassLoader classloader = new URLClassLoader(new URL[]{url}, null); + final Class clientClass = classloader.loadClass(initialClass); + return loadFromClass(config, clientClass); + } + + private static Applet loadFromClass(final RSConfig config, final Class clientClass) throws IllegalAccessException, InstantiationException + { + final Applet rs = (Applet) clientClass.newInstance(); + if (usePrivateServer) + { + rs.setStub(new PrivateRSAppletStub()); + return rs; + } + rs.setStub(new RSAppletStub(config)); + return rs; + } + + private static int getFileSize(URL url) + { + URLConnection conn = null; + try + { + conn = url.openConnection(); + if (conn instanceof HttpURLConnection) + { + ((HttpURLConnection) conn).setRequestMethod("HEAD"); + } + conn.getInputStream(); + return conn.getContentLength(); + } + catch (IOException e) + { + throw new RuntimeException(e); + } + finally + { + if (conn instanceof HttpURLConnection) + { + ((HttpURLConnection) conn).disconnect(); + } + } + } + public Applet load() { try @@ -84,32 +207,4 @@ public class ClientLoader return null; } } - - private static Applet loadRLPlus(final RSConfig config) throws ClassNotFoundException, InstantiationException, IllegalAccessException - { - // the injected client is a runtime scoped dependency - final Class clientClass = ClientLoader.class.getClassLoader().loadClass(config.getInitialClass()); - return loadFromClass(config, clientClass); - } - - private static Applet loadVanilla(final RSConfig config) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException - { - final String codebase = config.getCodeBase(); - final String initialJar = config.getInitialJar(); - final String initialClass = config.getInitialClass(); - final URL url = new URL(codebase + initialJar); - - // Must set parent classloader to null, or it will pull from - // this class's classloader first - final URLClassLoader classloader = new URLClassLoader(new URL[]{url}, null); - final Class clientClass = classloader.loadClass(initialClass); - return loadFromClass(config, clientClass); - } - - private static Applet loadFromClass(final RSConfig config, final Class clientClass) throws IllegalAccessException, InstantiationException - { - final Applet rs = (Applet) clientClass.newInstance(); - rs.setStub(new RSAppletStub(config)); - return rs; - } } diff --git a/runelite-client/src/main/java/net/runelite/client/rs/PrivateRSAppletStub.java b/runelite-client/src/main/java/net/runelite/client/rs/PrivateRSAppletStub.java new file mode 100644 index 0000000000..9855226b2e --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/rs/PrivateRSAppletStub.java @@ -0,0 +1,115 @@ +package net.runelite.client.rs; + +import java.applet.AppletContext; +import java.applet.AppletStub; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.URL; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Logger; + +public class PrivateRSAppletStub implements AppletStub +{ + + public static final Logger logger = Logger.getLogger(RSAppletStub.class.getSimpleName()); + + private static final HashMap params = new HashMap(); + private static final HashMap cfg = new HashMap(); + private static URL codebase; + + public PrivateRSAppletStub() + { + try + { + parseParams(new FileInputStream(new File("./params.txt"))); + String worldListKey = null; + for (Map.Entry paramEntry : params.entrySet()) + { + String key = paramEntry.getKey(); + String value = paramEntry.getValue(); + if (value.contains("slr.ws")) + { + worldListKey = key; + break; + } + } + codebase = new URL("http://runeliteplus-ps.ddns.net"); //host + params.put(worldListKey, "http://" + codebase.getHost()); + } + catch (IOException e) + { + e.printStackTrace(); + } + } + + private static void parseParams(InputStream stream) throws IOException + { + BufferedReader br = new BufferedReader(new InputStreamReader(stream)); + String line; + while ((line = br.readLine()) != null) + { + int idx = line.indexOf('='); + if (idx != -1) + { + String key = line.substring(0, idx); + String val = line.substring(idx + 1); + if (key.equals("param")) + { + idx = val.indexOf('='); + key = val.substring(0, idx); + val = val.substring(idx + 1); + params.put(key, val); + } + else + { + cfg.put(key, val); + } + } + } + } + + public static void log(String format, Object... params) + { + System.out.printf(format + "\n", params); + } + + @Override + public boolean isActive() + { + return false; + } + + @Override + public URL getDocumentBase() + { + return codebase; + } + + @Override + public URL getCodeBase() + { + return codebase; + } + + @Override + public String getParameter(String name) + { + return params.get(name); + } + + @Override + public AppletContext getAppletContext() + { + return null; + } + + @Override + public void appletResize(int width, int height) + { + } +} \ No newline at end of file diff --git a/runelite-client/src/main/resources/item_stats.json b/runelite-client/src/main/resources/item_stats.json index a1378a5484..dc2ee9e0e0 100644 --- a/runelite-client/src/main/resources/item_stats.json +++ b/runelite-client/src/main/resources/item_stats.json @@ -13671,7 +13671,7 @@ "acrush": -2, "dslash": 1, "str": 28, - "aspeed": 5 + "aspeed": 4 } }, "3758": { diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/grandexchange/ge_limits.json b/runelite-client/src/main/resources/net/runelite/client/plugins/grandexchange/ge_limits.json index bba7233ee1..330ea4a0d1 100644 --- a/runelite-client/src/main/resources/net/runelite/client/plugins/grandexchange/ge_limits.json +++ b/runelite-client/src/main/resources/net/runelite/client/plugins/grandexchange/ge_limits.json @@ -239,6 +239,8 @@ "660": 150, "662": 150, "664": 150, + "712": 2000, + "740": 150, "751": 150, "753": 15, "800": 7000, @@ -330,6 +332,7 @@ "960": 13000, "962": 50, "970": 13000, + "972": 13000, "973": 13000, "975": 15, "981": 5, @@ -559,11 +562,13 @@ "1456": 11000, "1462": 11000, "1464": 18000, + "1465": 2000, "1470": 11000, "1472": 11000, "1474": 11000, "1476": 11000, "1478": 5, + "1487": 13000, "1511": 15000, "1513": 12000, "1515": 12000, @@ -670,6 +675,7 @@ "1833": 150, "1835": 150, "1837": 150, + "1841": 15, "1854": 18000, "1859": 11000, "1861": 11000, @@ -681,6 +687,7 @@ "1877": 11000, "1879": 11000, "1881": 11000, + "1883": 10000, "1885": 10000, "1887": 40, "1891": 6000, @@ -837,6 +844,8 @@ "2366": 50, "2368": 50, "2370": 13000, + "2389": 13000, + "2390": 13000, "2428": 2000, "2430": 2000, "2432": 2000, @@ -865,6 +874,10 @@ "2481": 11000, "2483": 10000, "2485": 11000, + "2511": 15000, + "2513": 70, + "2514": 15000, + "2516": 13000, "2487": 125, "2489": 70, "2491": 70, @@ -881,6 +894,7 @@ "2522": 150, "2524": 150, "2526": 150, + "2530": 3000, "2550": 10000, "2552": 10000, "2568": 10000, @@ -1023,10 +1037,18 @@ "3140": 70, "3142": 13000, "3144": 10000, + "3147": 10000, "3157": 15, "3159": 15, "3162": 15, + "3179": 3000, + "3180": 3000, + "3181": 3000, + "3182": 3000, "3183": 3000, + "3185": 3000, + "3186": 3000, + "3187": 3000, "3188": 40, "3190": 125, "3192": 125, @@ -1114,6 +1136,7 @@ "3486": 8, "3488": 8, "3678": 40, + "3711": 2000, "3749": 70, "3751": 70, "3753": 70, @@ -1189,11 +1212,21 @@ "4166": 70, "4168": 70, "4170": 70, + "4178": 70, + "4180": 70, "4207": 70, "4212": 70, "4224": 70, "4298": 15, "4300": 15, + "4242": 2000, + "4243": 2000, + "4245": 2000, + "4246": 2000, + "4287": 13000, + "4289": 13000, + "4291": 6000, + "4293": 6000, "4302": 15, "4304": 15, "4306": 15, @@ -1259,20 +1292,25 @@ "4456": 13000, "4458": 13000, "4460": 13000, + "4498": 250, "4517": 6000, "4522": 40, + "4524": 40, "4525": 10000, "4527": 10000, "4529": 40, "4532": 40, "4535": 10000, "4537": 40, + "4539": 40, "4540": 10000, "4542": 10000, "4544": 10000, "4546": 10000, "4548": 10000, "4551": 125, + "4550": 10000, + "4561": 10000, "4580": 8, "4582": 8, "4585": 70, @@ -1285,9 +1323,12 @@ "4627": 2000, "4668": 15, "4675": 70, + "4682": 125, + "4683": 125, "4684": 15, "4687": 15, "4689": 15, + "4692": 11000, "4694": 12000, "4695": 12000, "4696": 12000, @@ -1310,6 +1351,7 @@ "4734": 15, "4736": 15, "4738": 15, + "4703": 11000, "4740": 11000, "4745": 15, "4747": 15, @@ -1342,6 +1384,8 @@ "4844": 2000, "4846": 2000, "4848": 2000, + "4838": 2000, + "4840": 10000, "4850": 3000, "4860": 15, "4866": 15, @@ -1369,6 +1413,7 @@ "4998": 15, "5001": 13000, "5003": 10000, + "5013": 4, "5014": 4, "5016": 4, "5018": 4, @@ -1576,6 +1621,12 @@ "5730": 70, "5734": 8, "5736": 8, + "5601": 40, + "5602": 15, + "5603": 40, + "5605": 40, + "5607": 13000, + "5738": 11000, "5739": 2000, "5741": 2000, "5743": 2000, @@ -1632,6 +1683,7 @@ "5980": 11000, "5982": 11000, "5984": 11000, + "5986": 11000, "5988": 11000, "5992": 11000, "5994": 11000, @@ -1659,6 +1711,7 @@ "6055": 600, "6061": 11000, "6062": 11000, + "6123": 10000, "6128": 70, "6129": 70, "6130": 70, @@ -1684,6 +1737,7 @@ "6169": 11000, "6171": 11000, "6173": 11000, + "6209": 40, "6211": 11000, "6213": 11000, "6215": 125, @@ -1698,8 +1752,11 @@ "6287": 13000, "6289": 13000, "6291": 13000, + "6293": 6000, + "6295": 6000, "6297": 6000, "6299": 6000, + "6303": 6000, "6305": 13000, "6306": 18000, "6311": 5, @@ -1757,6 +1814,16 @@ "6416": 125, "6418": 125, "6420": 125, + "6422": 20000, + "6424": 20000, + "6426": 20000, + "6428": 20000, + "6430": 12000, + "6432": 10000, + "6434": 12000, + "6436": 12000, + "6438": 12000, + "6468": 2000, "6470": 50, "6472": 50, "6474": 50, @@ -1814,6 +1881,7 @@ "6701": 13000, "6703": 13000, "6705": 13000, + "6722": 4, "6724": 8, "6729": 7500, "6731": 8, @@ -1827,11 +1895,18 @@ "6762": 8, "6764": 8, "6794": 6000, + "6797": 40, "6809": 70, "6812": 7500, "6814": 18000, "6889": 15, "6891": 15, + "6893": 125, + "6894": 125, + "6895": 125, + "6896": 13000, + "6897": 70, + "6903": 11000, "6908": 125, "6910": 125, "6912": 70, @@ -1841,8 +1916,10 @@ "6920": 125, "6922": 125, "6924": 125, + "6926": 10000, "6959": 150, "6962": 6000, + "6967": 8, "6971": 100, "6973": 100, "6975": 100, @@ -1872,6 +1949,8 @@ "7110": 150, "7112": 150, "7114": 150, + "7155": 250, + "7156": 40, "7116": 150, "7122": 150, "7124": 150, @@ -1959,6 +2038,18 @@ "7466": 15, "7468": 15, "7521": 6000, + "7523": 6000, + "7524": 6000, + "7525": 6000, + "7526": 6000, + "7548": 600, + "7550": 600, + "7552": 7000, + "7554": 20000, + "7556": 20000, + "7558": 20000, + "7560": 12000, + "7562": 600, "7566": 11000, "7568": 10000, "7650": 13000, @@ -1967,6 +2058,20 @@ "7664": 2000, "7666": 2000, "7668": 8, + "7676": 125, + "7728": 13000, + "7730": 2000, + "7731": 2000, + "7733": 2000, + "7734": 2000, + "7736": 2000, + "7737": 2000, + "7740": 2000, + "7742": 10000, + "7744": 2000, + "7748": 2000, + "7750": 2000, + "7752": 2000, "7754": 500, "7759": 150, "7761": 150, @@ -1975,12 +2080,19 @@ "7767": 150, "7769": 150, "7771": 150, - "7801": 11000, + "7801": 13000, "7919": 10000, + "7928": 50, + "7929": 50, + "7930": 50, + "7931": 50, + "7932": 50, + "7933": 50, "7936": 20000, "7939": 7500, "7944": 13000, "7946": 13000, + "7957": 150, "8007": 10000, "8008": 10000, "8009": 10000, @@ -1996,6 +2108,70 @@ "8019": 10000, "8020": 10000, "8021": 10000, + "8031": 500, + "8032": 500, + "8033": 500, + "8034": 500, + "8035": 500, + "8038": 500, + "8039": 500, + "8040": 500, + "8041": 500, + "8042": 500, + "8043": 500, + "8044": 500, + "8045": 500, + "8046": 500, + "8047": 500, + "8048": 500, + "8049": 500, + "8050": 500, + "8051": 500, + "8052": 500, + "8053": 500, + "8054": 500, + "8108": 500, + "8109": 500, + "8110": 500, + "8111": 500, + "8112": 500, + "8113": 500, + "8114": 500, + "8115": 500, + "8116": 500, + "8117": 500, + "8118": 500, + "8119": 500, + "8120": 500, + "8121": 500, + "8203": 10000, + "8204": 10000, + "8205": 10000, + "8206": 10000, + "8207": 10000, + "8208": 10000, + "8209": 10000, + "8210": 600, + "8214": 600, + "8239": 500, + "8240": 500, + "8241": 2000, + "8243": 2000, + "8247": 500, + "8248": 500, + "8282": 125, + "8283": 10000, + "8310": 500, + "8311": 500, + "8312": 500, + "8313": 500, + "8314": 500, + "8315": 500, + "8320": 500, + "8321": 500, + "8351": 500, + "8352": 500, + "8353": 500, "8417": 10000, "8419": 10000, "8421": 10000, @@ -2031,9 +2207,9 @@ "8514": 500, "8516": 500, "8518": 500, - "8520": 500, + "8520": 2000, + "8524": 2000, "8522": 500, - "8524": 500, "8526": 500, "8528": 500, "8530": 500, @@ -2079,6 +2255,38 @@ "8624": 500, "8626": 500, "8628": 500, + "8714": 70, + "8716": 70, + "8718": 70, + "8720": 70, + "8722": 70, + "8724": 70, + "8726": 70, + "8728": 70, + "8730": 70, + "8732": 70, + "8734": 70, + "8736": 70, + "8738": 70, + "8740": 70, + "8742": 70, + "8744": 70, + "8746": 125, + "8748": 125, + "8750": 125, + "8752": 125, + "8754": 125, + "8756": 125, + "8758": 125, + "8760": 125, + "8762": 125, + "8764": 125, + "8766": 125, + "8768": 125, + "8770": 125, + "8772": 125, + "8774": 125, + "8776": 125, "8778": 13000, "8780": 13000, "8782": 13000, @@ -2102,6 +2310,8 @@ "8926": 150, "8927": 150, "8928": 150, + "8936": 150, + "8938": 150, "9003": 15, "9004": 15, "9026": 13000, @@ -2117,6 +2327,7 @@ "9050": 10000, "9052": 6000, "9075": 10000, + "9086": 13000, "9140": 7000, "9141": 7000, "9142": 7000, @@ -2207,6 +2418,28 @@ "9470": 4, "9472": 4, "9475": 10000, + "9487": 2000, + "9489": 2000, + "9508": 2000, + "9510": 2000, + "9512": 2000, + "9514": 2000, + "9516": 2000, + "9518": 2000, + "9520": 2000, + "9522": 40, + "9524": 40, + "9527": 6000, + "9529": 6000, + "9531": 6000, + "9533": 6000, + "9538": 6000, + "9540": 6000, + "9542": 6000, + "9544": 6000, + "9547": 6000, + "9549": 6000, + "9553": 6000, "9629": 150, "9634": 150, "9636": 150, @@ -2217,6 +2450,11 @@ "9666": 70, "9668": 70, "9670": 70, + "9691": 20000, + "9693": 20000, + "9695": 20000, + "9697": 12000, + "9699": 20000, "9672": 70, "9674": 70, "9676": 70, @@ -2230,6 +2468,23 @@ "9741": 2000, "9743": 2000, "9745": 2000, + "9817": 500, + "9818": 500, + "9819": 500, + "9820": 500, + "9821": 500, + "9826": 500, + "9827": 500, + "9828": 500, + "9829": 500, + "9831": 500, + "9833": 500, + "9834": 500, + "9836": 500, + "9837": 500, + "9838": 500, + "9839": 500, + "9840": 500, "9843": 500, "9844": 500, "9845": 500, @@ -2255,6 +2510,8 @@ "9865": 500, "9866": 500, "9867": 500, + "9976": 7000, + "9977": 7000, "9978": 11000, "9980": 6000, "9986": 11000, @@ -2297,6 +2554,8 @@ "10067": 150, "10069": 125, "10071": 125, + "10073": 125, + "10074": 125, "10075": 8000, "10077": 125, "10079": 125, @@ -2320,6 +2579,7 @@ "10111": 10000, "10113": 10000, "10115": 10000, + "10117": 100, "10119": 10000, "10121": 10000, "10123": 10000, @@ -2438,9 +2698,98 @@ "10472": 8, "10474": 8, "10476": 10000, + "10486": 10000, "10496": 15, "10564": 70, "10589": 70, + "10601": 125, + "10602": 70, + "10603": 70, + "10604": 70, + "10605": 125, + "10606": 70, + "10613": 70, + "10614": 70, + "10618": 125, + "10622": 150, + "10623": 150, + "10624": 150, + "10625": 150, + "10626": 150, + "10627": 150, + "10628": 150, + "10634": 125, + "10636": 70, + "10638": 150, + "10663": 125, + "10664": 125, + "10665": 70, + "10666": 70, + "10667": 70, + "10668": 70, + "10669": 70, + "10670": 70, + "10671": 70, + "10672": 70, + "10673": 70, + "10674": 70, + "10675": 70, + "10676": 70, + "10677": 70, + "10678": 70, + "10679": 70, + "10680": 8, + "10681": 8, + "10688": 8, + "10689": 8, + "10690": 8, + "10691": 8, + "10692": 4, + "10693": 4, + "10694": 4, + "10695": 4, + "10696": 8, + "10697": 8, + "10698": 8, + "10699": 70, + "10700": 70, + "10701": 70, + "10702": 70, + "10703": 70, + "10704": 70, + "10705": 70, + "10706": 70, + "10707": 70, + "10708": 70, + "10709": 70, + "10710": 70, + "10711": 70, + "10712": 70, + "10713": 70, + "10719": 5, + "10731": 4, + "10736": 5, + "10738": 5, + "10740": 4, + "10744": 4, + "10746": 4, + "10758": 4, + "10760": 4, + "10762": 4, + "10764": 4, + "10766": 4, + "10776": 8, + "10780": 8, + "10782": 8, + "10784": 8, + "10786": 8, + "10788": 8, + "10796": 8, + "10798": 8, + "10800": 8, + "10802": 4, + "10804": 4, + "10806": 4, "10808": 11000, "10810": 11000, "10812": 11000, @@ -2466,18 +2815,28 @@ "10978": 13000, "10981": 11000, "10999": 15, + "11027": 50, + "11028": 50, + "11029": 50, + "11030": 50, "11037": 8, + "11046": 250, "11061": 8, "11065": 40, + "11068": 18000, "11069": 18000, + "11071": 10000, "11072": 10000, "11074": 10000, "11076": 10000, + "11078": 10000, "11079": 10000, "11085": 10000, + "11087": 10000, "11088": 10000, "11090": 10000, "11092": 10000, + "11094": 10000, "11095": 10000, "11105": 10000, "11113": 10000, @@ -2486,6 +2845,7 @@ "11126": 10000, "11128": 70, "11130": 10000, + "11132": 10000, "11133": 70, "11200": 50, "11205": 15, @@ -2510,6 +2870,7 @@ "11252": 18000, "11254": 18000, "11256": 18000, + "11283": 8, "11260": 13000, "11280": 150, "11284": 8, @@ -2593,6 +2954,24 @@ "11519": 2000, "11521": 2000, "11523": 2000, + "11686": 20000, + "11687": 20000, + "11688": 20000, + "11689": 20000, + "11690": 12000, + "11691": 12000, + "11692": 10000, + "11693": 12000, + "11694": 12000, + "11695": 12000, + "11696": 12000, + "11697": 10000, + "11698": 10000, + "11699": 10000, + "11700": 7000, + "11701": 7000, + "11702": 7000, + "11703": 7000, "11785": 8, "11787": 8, "11789": 8, @@ -2861,10 +3240,15 @@ "12699": 2000, "12701": 2000, "12746": 18000, + "12756": 18000, "12757": 4, "12759": 4, "12761": 4, "12763": 4, + "12765": 8, + "12766": 8, + "12767": 8, + "12768": 8, "12769": 4, "12771": 4, "12775": 10000, @@ -2881,6 +3265,8 @@ "12798": 50, "12800": 50, "12802": 50, + "12806": 8, + "12807": 8, "12804": 50, "12817": 8, "12819": 5, @@ -2892,6 +3278,7 @@ "12831": 8, "12833": 5, "12846": 5, + "12848": 70, "12849": 50, "12851": 8, "12863": 40, @@ -3047,6 +3434,7 @@ "19481": 8, "19484": 11000, "19486": 11000, + "19492": 10000, "19488": 11000, "19490": 11000, "19493": 11000, @@ -3061,6 +3449,7 @@ "19547": 70, "19550": 10000, "19553": 8, + "19559": 8, "19570": 10000, "19572": 10000, "19574": 10000, @@ -3217,18 +3606,73 @@ "20269": 4, "20272": 125, "20275": 40, + "20278": 40, "20376": 8, "20379": 8, "20382": 8, "20385": 8, + "20388": 11000, + "20393": 2000, + "20394": 2000, + "20395": 2000, + "20396": 2000, + "20401": 18000, + "20402": 70, + "20403": 18000, + "20405": 70, + "20406": 70, + "20407": 70, + "20408": 8, + "20415": 125, + "20416": 125, + "20421": 70, + "20422": 70, + "20425": 125, + "20426": 125, + "20428": 70, + "20429": 70, + "20431": 70, "20433": 4, "20436": 4, "20439": 4, "20442": 4, "20517": 125, "20520": 125, + "20547": 13000, + "20548": 2000, + "20549": 2000, + "20550": 2000, + "20551": 2000, + "20552": 70, + "20553": 125, + "20554": 70, + "20555": 70, + "20556": 125, + "20557": 70, + "20558": 18000, + "20559": 8, + "20560": 70, + "20561": 125, + "20562": 125, + "20568": 70, + "20571": 70, + "20572": 70, + "20573": 70, + "20574": 125, + "20575": 125, + "20576": 8, + "20577": 8, + "20578": 15, + "20579": 125, + "20580": 125, + "20584": 5, + "20585": 125, + "20586": 10000, + "20587": 250, "20590": 5, + "20593": 8, "20595": 125, + "20600": 11000, "20716": 15, "20718": 11000, "20724": 8, @@ -3239,6 +3683,9 @@ "20739": 8, "20749": 11000, "20756": 125, + "20782": 8, + "20784": 8, + "20785": 8, "20849": 11000, "20997": 8, "21000": 8, @@ -3255,6 +3702,7 @@ "21043": 8, "21047": 5, "21049": 5, + "21060": 8, "21079": 5, "21081": 10000, "21084": 10000, @@ -3277,12 +3725,15 @@ "21146": 10000, "21157": 10000, "21160": 10000, - "21163": 10000, + "21163": 200, "21166": 10000, "21177": 10000, "21180": 10000, "21183": 10000, "21202": 50, + "21205": 8, + "21206": 70, + "21207": 11000, "21257": 500, "21270": 8, "21279": 5, @@ -3302,6 +3753,7 @@ "21347": 13000, "21350": 10000, "21352": 10000, + "21387": 100, "21477": 200, "21480": 200, "21483": 600, @@ -3317,11 +3769,14 @@ "21545": 13000, "21555": 30000, "21622": 13000, + "21626": 100, + "21633": 8, "21634": 8, "21637": 5, "21643": 70, "21646": 70, "21649": 125, + "21652": 100, "21684": 13000, "21690": 10000, "21730": 5, @@ -3339,6 +3794,7 @@ "21817": 10000, "21820": 30000, "21838": 125, + "21873": 10000, "21880": 10000, "21882": 8, "21885": 8, @@ -3380,8 +3836,10 @@ "21987": 2000, "21994": 2000, "21997": 2000, + "22002": 8, "22003": 8, "22006": 5, + "22095": 13000, "22097": 50, "22100": 50, "22103": 50, @@ -3389,12 +3847,29 @@ "22111": 8, "22118": 11000, "22121": 40, + "22127": 125, + "22129": 125, + "22131": 125, + "22133": 125, + "22135": 125, + "22137": 125, + "22139": 125, + "22141": 125, + "22143": 125, + "22145": 125, + "22147": 125, + "22149": 125, + "22151": 125, + "22153": 125, + "22155": 125, + "22157": 125, "22124": 7500, "22192": 250, "22195": 250, "22198": 250, "22201": 250, "22204": 250, + "22208": 10000, "22209": 2000, "22212": 2000, "22215": 2000, @@ -3425,6 +3900,8 @@ "22305": 18000, "22324": 8, "22326": 8, + "22405": 13000, + "22408": 10000, "22327": 8, "22328": 8, "22368": 8, @@ -3453,10 +3930,162 @@ "22599": 10000, "22601": 10000, "22603": 10000, + "22665": 8, + "22731": 70, + "22734": 70, + "22743": 70, + "22780": 7500, + "22783": 7500, + "22786": 7500, + "22789": 10000, + "22795": 10000, + "22804": 11000, + "22806": 7000, + "22812": 11000, + "22814": 11000, + "22818": 13000, + "22826": 13000, + "22829": 13000, + "22832": 13000, + "22835": 13000, + "22856": 200, + "22859": 200, + "22866": 200, + "22869": 200, + "22871": 200, + "22873": 200, + "22877": 200, + "22879": 200, + "22887": 600, + "22929": 11000, + "22932": 600, + "22935": 12000, + "22949": 10000, + "22951": 70, + "22954": 70, + "22963": 70, + "22975": 8, + "22978": 8, + "22983": 15, + "22988": 15, + "22999": 50, + "23002": 50, + "23037": 125, + "23047": 70, + "23050": 70, + "23053": 70, + "23056": 70, + "23059": 70, + "23064": 4, + "23110": 70, + "23113": 70, + "23116": 70, + "23119": 70, + "23124": 8, + "23185": 4, + "23206": 8, + "23209": 8, + "23212": 8, + "23215": 8, + "23218": 8, + "23221": 8, + "23224": 8, + "23227": 4, + "23232": 4, + "23237": 4, + "23242": 8, + "23246": 8, + "23252": 4, + "23258": 8, + "23270": 4, + "23273": 4, + "23276": 4, + "23279": 4, + "23285": 4, + "23288": 4, + "23291": 4, + "23294": 4, + "23297": 4, + "23300": 4, + "23309": 4, + "23312": 4, + "23315": 4, + "23318": 4, + "23321": 4, + "23324": 4, + "23327": 4, + "23330": 70, + "23332": 70, + "23334": 70, + "23336": 4, + "23339": 4, + "23342": 8, + "23345": 8, + "23348": 4, + "23351": 8, + "23354": 5, + "23357": 18000, + "23360": 100, + "23363": 8, + "23366": 70, + "23369": 70, + "23372": 70, + "23375": 70, + "23378": 70, + "23381": 8, + "23384": 8, + "23392": 8, + "23395": 8, + "23398": 8, + "23401": 8, + "23404": 8, + "23407": 4, + "23410": 4, + "23413": 4, + "23489": 11000, + "23533": 10000, + "23543": 2000, + "23545": 2000, + "23547": 2000, + "23549": 2000, + "23551": 2000, + "23553": 2000, + "23555": 2000, + "23557": 2000, + "23559": 2000, + "23561": 2000, + "23563": 2000, + "23565": 2000, + "23567": 2000, + "23569": 2000, + "23571": 2000, + "23573": 2000, + "23575": 2000, + "23577": 2000, + "23579": 2000, + "23581": 2000, + "23583": 2000, + "23585": 2000, + "23587": 2000, + "23589": 2000, + "23595": 8, + "23599": 8, + "23601": 70, + "23613": 8, + "23626": 8, + "23628": 8, + "23630": 8, + "23640": 8, + "23642": 8, + "23644": 15, + "23646": 8, + "23648": 11000, + "23649": 11000, + "23654": 8, "22610": 10, "22613": 10, "22622": 10, "22634": 100, "22636": 100, "22647": 10 -} \ No newline at end of file +} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSBufferMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSBufferMixin.java new file mode 100644 index 0000000000..8b6904f942 --- /dev/null +++ b/runelite-mixins/src/main/java/net/runelite/mixins/RSBufferMixin.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2019, Null (zeruth) + * 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.mixins; + +import java.math.BigInteger; +import net.runelite.api.mixins.Copy; +import net.runelite.api.mixins.Inject; +import net.runelite.api.mixins.Mixin; +import net.runelite.api.mixins.Replace; +import net.runelite.rs.api.RSBuffer; + +@Mixin(RSBuffer.class) +public abstract class RSBufferMixin implements RSBuffer +{ + @Inject + private static BigInteger exponent = new BigInteger("10001", 16); + + @Inject + private static BigInteger modulus = new BigInteger("83ff79a3e258b99ead1a70e1049883e78e513c4cdec538d8da9483879a9f81689c0c7d146d7b82b52d05cf26132b1cda5930eeef894e4ccf3d41eebc3aabe54598c4ca48eb5a31d736bfeea17875a35558b9e3fcd4aebe2a9cc970312a477771b36e173dc2ece6001ab895c553e2770de40073ea278026f36961c94428d8d7db", 16); + + @Copy("encryptRsa") + public void rs$encryptRsa(BigInteger var1, BigInteger var2) + { + } + + @Replace("encryptRsa") + public void rl$encryptRsa(BigInteger var1, BigInteger var2) + { + rs$encryptRsa(exponent, modulus); + } +} \ No newline at end of file diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSGameShellMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSGameShellMixin.java index 2f01378803..a75a1d2fd6 100644 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSGameShellMixin.java +++ b/runelite-mixins/src/main/java/net/runelite/mixins/RSGameShellMixin.java @@ -31,6 +31,7 @@ import net.runelite.api.mixins.FieldHook; import net.runelite.api.mixins.Inject; import net.runelite.api.mixins.MethodHook; import net.runelite.api.mixins.Mixin; +import net.runelite.api.mixins.Replace; import net.runelite.api.mixins.Shadow; import net.runelite.rs.api.RSClient; import net.runelite.rs.api.RSGameShell; @@ -97,4 +98,11 @@ public abstract class RSGameShellMixin implements RSGameShell setResizeCanvasNextFrame(true); } } + + @Replace("checkHost") + protected final boolean checkHost() + { + //Always allow host. + return true; + } }