diff --git a/runescape-client/src/main/java/Canvas.java b/runescape-client/src/main/java/Canvas.java index 9f34fbbd37..b3e2f4efd7 100644 --- a/runescape-client/src/main/java/Canvas.java +++ b/runescape-client/src/main/java/Canvas.java @@ -10,6 +10,7 @@ import net.runelite.mapping.Implements; import net.runelite.mapping.ObfuscatedGetter; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("ao") @Implements("Canvas") @@ -118,7 +119,7 @@ public final class Canvas extends java.awt.Canvas { int var3; int var4; Widget var6; - if (var0 == 100) { + if (var0 == ScriptOpcodes.CC_CREATE) { RouteStrategy.Interpreter_intStackSize -= 3; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; @@ -162,19 +163,19 @@ public final class Canvas extends java.awt.Canvas { } } else { Widget var5; - if (var0 == 101) { + if (var0 == ScriptOpcodes.CC_DELETE) { var5 = var2 ? WorldMapIcon1.field1030 : class12.field1111; var6 = Huffman.getWidget(var5.id); var6.children[var5.childIndex] = null; class22.method295(var6); return 1; - } else if (var0 == 102) { + } else if (var0 == ScriptOpcodes.CC_DELETEALL) { var5 = Huffman.getWidget(Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]); var5.children = null; class22.method295(var5); return 1; - } else if (var0 != 200) { - if (var0 == 201) { + } else if (var0 != ScriptOpcodes.CC_FIND) { + if (var0 == ScriptOpcodes.IF_FIND) { var5 = Huffman.getWidget(Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]); if (var5 != null) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = 1; diff --git a/runescape-client/src/main/java/Decimator.java b/runescape-client/src/main/java/Decimator.java index c063c4d198..47aadf498d 100644 --- a/runescape-client/src/main/java/Decimator.java +++ b/runescape-client/src/main/java/Decimator.java @@ -3,6 +3,7 @@ import net.runelite.mapping.Implements; import net.runelite.mapping.ObfuscatedGetter; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("dp") @Implements("Decimator") @@ -237,7 +238,7 @@ public class Decimator { garbageValue = "-858740470" ) static int method2492(int var0, Script var1, boolean var2) { - if (var0 == 5630) { + if (var0 == ScriptOpcodes.LOGOUT) { Client.field175 = 250; return 1; } else { diff --git a/runescape-client/src/main/java/DynamicObject.java b/runescape-client/src/main/java/DynamicObject.java index 905d5408e6..45781a3bb1 100644 --- a/runescape-client/src/main/java/DynamicObject.java +++ b/runescape-client/src/main/java/DynamicObject.java @@ -6,6 +6,7 @@ import net.runelite.mapping.Implements; import net.runelite.mapping.ObfuscatedGetter; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("cf") @Implements("DynamicObject") @@ -208,10 +209,10 @@ public class DynamicObject extends Entity { garbageValue = "-83" ) static int method2223(int var0, Script var1, boolean var2) { - if (var0 == 5000) { + if (var0 == ScriptOpcodes.CHAT_GETFILTER_PUBLIC) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.publicChatMode; return 1; - } else if (var0 == 5001) { + } else if (var0 == ScriptOpcodes.CHAT_SETFILTER) { RouteStrategy.Interpreter_intStackSize -= 3; Client.publicChatMode = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; IndexCacheLoader.field512 = WorldMapElement.method4783(Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]); @@ -230,7 +231,7 @@ public class DynamicObject extends Entity { String var3; int var4; int var5; - if (var0 == 5002) { + if (var0 == ScriptOpcodes.CHAT_SENDABUSEREPORT) { var3 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; RouteStrategy.Interpreter_intStackSize -= 2; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; @@ -244,7 +245,7 @@ public class DynamicObject extends Entity { return 1; } else { Message var11; - if (var0 == 5003) { + if (var0 == ScriptOpcodes.CHAT_GETHISTORY_BYTYPEANDLINE) { RouteStrategy.Interpreter_intStackSize -= 2; var5 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; @@ -266,7 +267,7 @@ public class DynamicObject extends Entity { } return 1; - } else if (var0 == 5004) { + } else if (var0 == ScriptOpcodes.CHAT_GETHISTORY_BYUID) { var5 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var11 = NetCache.method4708(var5); if (var11 != null) { @@ -286,7 +287,7 @@ public class DynamicObject extends Entity { } return 1; - } else if (var0 == 5005) { + } else if (var0 == ScriptOpcodes.CHAT_GETFILTER_PRIVATE) { if (IndexCacheLoader.field512 == null) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = -1; } else { @@ -296,7 +297,7 @@ public class DynamicObject extends Entity { return 1; } else { String var6; - if (var0 == 5008) { + if (var0 == ScriptOpcodes.CHAT_SENDPUBLIC) { var3 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; var4 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var6 = var3.toLowerCase(); @@ -423,7 +424,7 @@ public class DynamicObject extends Entity { var9.packetBuffer.method41(var9.packetBuffer.index - var10); Client.packetWriter.method241(var9); return 1; - } else if (var0 == 5009) { + } else if (var0 == ScriptOpcodes.CHAT_SENDPRIVATE) { Interpreter.Interpreter_stringStackSize -= 2; var3 = Interpreter.Interpreter_stringStack[Interpreter.Interpreter_stringStackSize]; var6 = Interpreter.Interpreter_stringStack[Interpreter.Interpreter_stringStackSize + 1]; @@ -435,30 +436,30 @@ public class DynamicObject extends Entity { var7.packetBuffer.method40(var7.packetBuffer.index - var8); Client.packetWriter.method241(var7); return 1; - } else if (var0 != 5015) { - if (var0 == 5016) { + } else if (var0 != ScriptOpcodes.CHAT_PLAYERNAME) { + if (var0 == ScriptOpcodes.CHAT_GETFILTER_TRADE) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.field138; return 1; - } else if (var0 == 5017) { + } else if (var0 == ScriptOpcodes.CHAT_GETHISTORYLENGTH) { var5 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = WidgetGroupParent.method1174(var5); return 1; - } else if (var0 == 5018) { + } else if (var0 == ScriptOpcodes.CHAT_GETNEXTUID) { var5 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = class12.method161(var5); return 1; - } else if (var0 == 5019) { + } else if (var0 == ScriptOpcodes.CHAT_GETPREVUID) { var5 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = SpriteMask.method4391(var5); return 1; - } else if (var0 == 5020) { + } else if (var0 == ScriptOpcodes.DOCHEAT) { var3 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; BoundaryObject.doCheat(var3); return 1; - } else if (var0 == 5021) { + } else if (var0 == ScriptOpcodes.CHAT_SETMESSAGEFILTER) { Client.field158 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize].toLowerCase().trim(); return 1; - } else if (var0 == 5022) { + } else if (var0 == ScriptOpcodes.CHAT_GETMESSAGEFILTER) { Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = Client.field158; return 1; } else if (var0 == 5023) { diff --git a/runescape-client/src/main/java/FontName.java b/runescape-client/src/main/java/FontName.java index acb0e22e88..9bb25b8305 100644 --- a/runescape-client/src/main/java/FontName.java +++ b/runescape-client/src/main/java/FontName.java @@ -2,6 +2,7 @@ import net.runelite.mapping.Export; import net.runelite.mapping.Implements; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("kx") @Implements("FontName") @@ -96,7 +97,7 @@ public class FontName { garbageValue = "-1336396061" ) static int method5639(int var0, Script var1, boolean var2) { - if (var0 == 3600) { + if (var0 == ScriptOpcodes.FRIEND_COUNT) { if (WorldMapArea.friendSystem.field357 == 0) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = -2; } else if (WorldMapArea.friendSystem.field357 == 1) { @@ -108,7 +109,7 @@ public class FontName { return 1; } else { int var3; - if (var0 == 3601) { + if (var0 == ScriptOpcodes.FRIEND_GETNAME) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; if (WorldMapArea.friendSystem.method99() && var3 >= 0 && var3 < WorldMapArea.friendSystem.friendsList.size()) { Friend var6 = (Friend)WorldMapArea.friendSystem.friendsList.get(var3); @@ -120,7 +121,7 @@ public class FontName { } return 1; - } else if (var0 == 3602) { + } else if (var0 == ScriptOpcodes.FRIEND_GETWORLD) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; if (WorldMapArea.friendSystem.method99() && var3 >= 0 && var3 < WorldMapArea.friendSystem.friendsList.size()) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = ((Buddy)WorldMapArea.friendSystem.friendsList.get(var3)).world0; @@ -129,7 +130,7 @@ public class FontName { } return 1; - } else if (var0 == 3603) { + } else if (var0 == ScriptOpcodes.FRIEND_GETRANK) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; if (WorldMapArea.friendSystem.method99() && var3 >= 0 && var3 < WorldMapArea.friendSystem.friendsList.size()) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = ((Buddy)WorldMapArea.friendSystem.friendsList.get(var3)).rank; @@ -140,33 +141,33 @@ public class FontName { return 1; } else { String var4; - if (var0 == 3604) { + if (var0 == ScriptOpcodes.FRIEND_SETRANK) { var4 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; int var8 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; method5638(var4, var8); return 1; - } else if (var0 == 3605) { + } else if (var0 == ScriptOpcodes.FRIEND_ADD) { var4 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; - WorldMapArea.friendSystem.method103(var4); + WorldMapArea.friendSystem.addFriend(var4); return 1; - } else if (var0 == 3606) { + } else if (var0 == ScriptOpcodes.FRIEND_DEL) { var4 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; WorldMapArea.friendSystem.removeFriend(var4); return 1; - } else if (var0 == 3607) { + } else if (var0 == ScriptOpcodes.IGNORE_ADD) { var4 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; - WorldMapArea.friendSystem.method105(var4); + WorldMapArea.friendSystem.addIgnore(var4); return 1; - } else if (var0 == 3608) { + } else if (var0 == ScriptOpcodes.IGNORE_DEL) { var4 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; WorldMapArea.friendSystem.removeIgnore(var4); return 1; - } else if (var0 == 3609) { + } else if (var0 == ScriptOpcodes.FRIEND_TEST) { var4 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; var4 = NPCDefinition.method5161(var4); Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = WorldMapArea.friendSystem.isFriended(new Username(var4, KeyHandler.loginType), false) ? 1 : 0; return 1; - } else if (var0 == 3611) { + } else if (var0 == ScriptOpcodes.CLAN_GETCHATDISPLAYNAME) { if (PacketWriter.clanChat != null) { Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = PacketWriter.clanChat.name; } else { @@ -174,7 +175,7 @@ public class FontName { } return 1; - } else if (var0 == 3612) { + } else if (var0 == ScriptOpcodes.CLAN_GETCHATCOUNT) { if (PacketWriter.clanChat != null) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = PacketWriter.clanChat.size(); } else { @@ -182,7 +183,7 @@ public class FontName { } return 1; - } else if (var0 == 3613) { + } else if (var0 == ScriptOpcodes.CLAN_GETCHATUSERNAME) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; if (PacketWriter.clanChat != null && var3 < PacketWriter.clanChat.size()) { Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = PacketWriter.clanChat.get(var3).username().getName(); @@ -191,7 +192,7 @@ public class FontName { } return 1; - } else if (var0 == 3614) { + } else if (var0 == ScriptOpcodes.CLAN_GETCHATUSERWORLD) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; if (PacketWriter.clanChat != null && var3 < PacketWriter.clanChat.size()) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = ((Buddy)PacketWriter.clanChat.get(var3)).world(); @@ -200,7 +201,7 @@ public class FontName { } return 1; - } else if (var0 == 3615) { + } else if (var0 == ScriptOpcodes.CLAN_GETCHATUSERRANK) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; if (PacketWriter.clanChat != null && var3 < PacketWriter.clanChat.size()) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = ((Buddy)PacketWriter.clanChat.get(var3)).rank; @@ -209,24 +210,24 @@ public class FontName { } return 1; - } else if (var0 == 3616) { + } else if (var0 == ScriptOpcodes.CLAN_GETCHATMINKICK) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = PacketWriter.clanChat != null ? PacketWriter.clanChat.field96 : 0; return 1; - } else if (var0 == 3617) { + } else if (var0 == ScriptOpcodes.CLAN_KICKUSER) { var4 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; IndexStoreActionHandler.method4655(var4); return 1; - } else if (var0 == 3618) { + } else if (var0 == ScriptOpcodes.CLAN_GETCHATRANK) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = PacketWriter.clanChat != null ? PacketWriter.clanChat.rank : 0; return 1; - } else if (var0 == 3619) { + } else if (var0 == ScriptOpcodes.CLAN_JOINCHAT) { var4 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; class31.method574(var4); return 1; - } else if (var0 == 3620) { + } else if (var0 == ScriptOpcodes.CLAN_LEAVECHAT) { class12.method158(); return 1; - } else if (var0 == 3621) { + } else if (var0 == ScriptOpcodes.IGNORE_COUNT) { if (!WorldMapArea.friendSystem.method99()) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = -1; } else { @@ -234,7 +235,7 @@ public class FontName { } return 1; - } else if (var0 == 3622) { + } else if (var0 == ScriptOpcodes.IGNORE_GETNAME) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; if (WorldMapArea.friendSystem.method99() && var3 >= 0 && var3 < WorldMapArea.friendSystem.ignoreList.size()) { Ignored var7 = (Ignored)WorldMapArea.friendSystem.ignoreList.get(var3); @@ -246,12 +247,12 @@ public class FontName { } return 1; - } else if (var0 == 3623) { + } else if (var0 == ScriptOpcodes.IGNORE_TEST) { var4 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; var4 = NPCDefinition.method5161(var4); Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = WorldMapArea.friendSystem.isIgnored(new Username(var4, KeyHandler.loginType)) ? 1 : 0; return 1; - } else if (var0 == 3624) { + } else if (var0 == ScriptOpcodes.CLAN_ISSELF) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; if (PacketWriter.clanChat != null && var3 < PacketWriter.clanChat.size() && PacketWriter.clanChat.get(var3).username().equals(Canvas.localPlayer.username)) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = 1; @@ -260,7 +261,7 @@ public class FontName { } return 1; - } else if (var0 == 3625) { + } else if (var0 == ScriptOpcodes.CLAN_GETCHATOWNERNAME) { if (PacketWriter.clanChat != null && PacketWriter.clanChat.owner != null) { Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = PacketWriter.clanChat.owner; } else { @@ -268,7 +269,7 @@ public class FontName { } return 1; - } else if (var0 == 3626) { + } else if (var0 == ScriptOpcodes.CLAN_ISFRIEND) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; if (PacketWriter.clanChat != null && var3 < PacketWriter.clanChat.size() && ((ClanMate)PacketWriter.clanChat.get(var3)).isFriend()) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = 1; @@ -277,7 +278,7 @@ public class FontName { } return 1; - } else if (var0 != 3627) { + } else if (var0 != ScriptOpcodes.CLAN_ISIGNORE) { if (var0 == 3628) { WorldMapArea.friendSystem.friendsList.removeComparator(); return 1; diff --git a/runescape-client/src/main/java/Formatting.java b/runescape-client/src/main/java/Formatting.java index 789f058734..77227fd4ca 100644 --- a/runescape-client/src/main/java/Formatting.java +++ b/runescape-client/src/main/java/Formatting.java @@ -2,6 +2,7 @@ import net.runelite.mapping.Export; import net.runelite.mapping.Implements; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("cy") @Implements("Formatting") @@ -22,10 +23,10 @@ public class Formatting { ) static int method2023(int var0, Script var1, boolean var2) { Widget var3 = var2 ? WorldMapIcon1.field1030 : class12.field1111; - if (var0 == 1700) { + if (var0 == ScriptOpcodes.CC_GETINVOBJECT) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.itemId; return 1; - } else if (var0 == 1701) { + } else if (var0 == ScriptOpcodes.CC_GETINVCOUNT) { if (var3.itemId != -1) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.itemQuantity; } else { @@ -33,7 +34,7 @@ public class Formatting { } return 1; - } else if (var0 == 1702) { + } else if (var0 == ScriptOpcodes.CC_GETID) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.childIndex; return 1; } else { @@ -51,7 +52,7 @@ public class Formatting { int var4; int var5; EnumDefinition var9; - if (var0 == 3400) { + if (var0 == ScriptOpcodes.ENUM_STRING) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; @@ -72,8 +73,8 @@ public class Formatting { } return 1; - } else if (var0 != 3408) { - if (var0 == 3411) { + } else if (var0 != ScriptOpcodes.ENUM) { + if (var0 == ScriptOpcodes.ENUM_GETOUTPUTCOUNT) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var9 = Interpreter.getEnum(var3); Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var9.size(); diff --git a/runescape-client/src/main/java/FriendSystem.java b/runescape-client/src/main/java/FriendSystem.java index 911b82db63..010faa6967 100644 --- a/runescape-client/src/main/java/FriendSystem.java +++ b/runescape-client/src/main/java/FriendSystem.java @@ -3,6 +3,7 @@ import net.runelite.mapping.Implements; import net.runelite.mapping.ObfuscatedGetter; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("bh") @Implements("FriendSystem") @@ -129,13 +130,14 @@ public class FriendSystem { signature = "(Ljava/lang/String;I)V", garbageValue = "-1721017960" ) - final void method103(String var1) { + @Export("addFriend") + final void addFriend(String var1) { if (var1 != null) { Username var2 = new Username(var1, this.loginType); if (var2.hasCleanName()) { StringBuilder var3; String var4; - if (this.method104()) { + if (this.canAddFriend()) { var3 = null; var4 = "Your friend list is full. Max of 200 for free users, and 400 for members"; WorldMapIcon1.method219(30, "", var4); @@ -174,7 +176,8 @@ public class FriendSystem { signature = "(B)Z", garbageValue = "57" ) - final boolean method104() { + @Export("canAddFriend") + final boolean canAddFriend() { return this.friendsList.isFull() || this.friendsList.size() >= 200 && Client.field209 != 1; } @@ -183,13 +186,14 @@ public class FriendSystem { signature = "(Ljava/lang/String;B)V", garbageValue = "30" ) - final void method105(String var1) { + @Export("addIgnore") + final void addIgnore(String var1) { if (var1 != null) { Username var2 = new Username(var1, this.loginType); if (var2.hasCleanName()) { StringBuilder var3; String var4; - if (this.method106()) { + if (this.canAddIgnore()) { var3 = null; var4 = "Your ignore list is full. Max of 100 for free users, and 400 for members"; WorldMapIcon1.method219(30, "", var4); @@ -225,7 +229,8 @@ public class FriendSystem { signature = "(B)Z", garbageValue = "120" ) - final boolean method106() { + @Export("canAddIgnore") + final boolean canAddIgnore() { return this.ignoreList.isFull() || this.ignoreList.size() >= 100 && Client.field209 != 1; } @@ -302,7 +307,7 @@ public class FriendSystem { var3 = var2 ? WorldMapIcon1.field1030 : class12.field1111; } - if (var0 == 1927) { + if (var0 == ScriptOpcodes.CC_CALLONRESIZE) { if (Interpreter.field425 >= 10) { throw new RuntimeException(); } else if (var3.field975 == null) { diff --git a/runescape-client/src/main/java/GrandExchangeEvent.java b/runescape-client/src/main/java/GrandExchangeEvent.java index c4665c6534..0e2a1ebe00 100644 --- a/runescape-client/src/main/java/GrandExchangeEvent.java +++ b/runescape-client/src/main/java/GrandExchangeEvent.java @@ -3,6 +3,7 @@ import net.runelite.mapping.Implements; import net.runelite.mapping.ObfuscatedGetter; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("l") @Implements("GrandExchangeEvent") @@ -190,38 +191,38 @@ public class GrandExchangeEvent { } } else if (var13 == 0) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var6[var4]; - } else if (var13 == 1) { + } else if (var13 == ScriptOpcodes.GET_VARP) { var11 = var6[var4]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Varps.Varps_main[var11]; - } else if (var13 == 2) { + } else if (var13 == ScriptOpcodes.SET_VARP) { var11 = var6[var4]; Varps.Varps_main[var11] = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; IndexCache.method4703(var11); - } else if (var13 == 3) { + } else if (var13 == ScriptOpcodes.SCONST) { Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = var3.stringOperands[var4]; - } else if (var13 == 6) { + } else if (var13 == ScriptOpcodes.JUMP) { var4 += var6[var4]; - } else if (var13 == 7) { + } else if (var13 == ScriptOpcodes.IF_ICMPNE) { RouteStrategy.Interpreter_intStackSize -= 2; if (Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize] != Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]) { var4 += var6[var4]; } - } else if (var13 == 8) { + } else if (var13 == ScriptOpcodes.IF_ICMPEQ) { RouteStrategy.Interpreter_intStackSize -= 2; if (Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize] == Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]) { var4 += var6[var4]; } - } else if (var13 == 9) { + } else if (var13 == ScriptOpcodes.IF_ICMPLT) { RouteStrategy.Interpreter_intStackSize -= 2; if (Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize] < Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]) { var4 += var6[var4]; } - } else if (var13 == 10) { + } else if (var13 == ScriptOpcodes.IF_ICMPGT) { RouteStrategy.Interpreter_intStackSize -= 2; if (Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize] > Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]) { var4 += var6[var4]; } - } else if (var13 == 21) { + } else if (var13 == ScriptOpcodes.RETURN) { if (Interpreter.Interpreter_frameDepth == 0) { return; } @@ -233,47 +234,47 @@ public class GrandExchangeEvent { var4 = var30.pc; Username.Interpreter_intLocals = var30.intLocals; Interpreter.Interpreter_stringLocals = var30.stringLocals; - } else if (var13 == 25) { + } else if (var13 == ScriptOpcodes.GET_VARBIT) { var11 = var6[var4]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = WorldMapSection2.getVarbit(var11); - } else if (var13 == 27) { + } else if (var13 == ScriptOpcodes.SET_VARBIT) { var11 = var6[var4]; PendingSpawn.method1695(var11, Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]); - } else if (var13 == 31) { + } else if (var13 == ScriptOpcodes.IF_ICMPLE) { RouteStrategy.Interpreter_intStackSize -= 2; if (Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize] <= Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]) { var4 += var6[var4]; } - } else if (var13 == 32) { + } else if (var13 == ScriptOpcodes.IF_ICMPGE) { RouteStrategy.Interpreter_intStackSize -= 2; if (Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize] >= Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]) { var4 += var6[var4]; } - } else if (var13 == 33) { + } else if (var13 == ScriptOpcodes.ILOAD) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Username.Interpreter_intLocals[var6[var4]]; - } else if (var13 == 34) { + } else if (var13 == ScriptOpcodes.ISTORE) { Username.Interpreter_intLocals[var6[var4]] = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; - } else if (var13 == 35) { + } else if (var13 == ScriptOpcodes.SLOAD) { Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = Interpreter.Interpreter_stringLocals[var6[var4]]; - } else if (var13 == 36) { + } else if (var13 == ScriptOpcodes.SSTORE) { Interpreter.Interpreter_stringLocals[var6[var4]] = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; - } else if (var13 == 37) { + } else if (var13 == ScriptOpcodes.JOIN_STRING) { var11 = var6[var4]; Interpreter.Interpreter_stringStackSize -= var11; String var29 = class277.method5356(Interpreter.Interpreter_stringStack, Interpreter.Interpreter_stringStackSize, var11); Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = var29; - } else if (var13 == 38) { + } else if (var13 == ScriptOpcodes.POP_INT) { --RouteStrategy.Interpreter_intStackSize; - } else if (var13 == 39) { + } else if (var13 == ScriptOpcodes.POP_STRING) { --Interpreter.Interpreter_stringStackSize; } else { int var15; - if (var13 != 40) { - if (var13 == 42) { + if (var13 != ScriptOpcodes.INVOKE) { + if (var13 == ScriptOpcodes.GET_VARC_INT) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = class196.varcs.getInt(var6[var4]); - } else if (var13 == 43) { + } else if (var13 == ScriptOpcodes.SET_VARC_INT) { class196.varcs.setInt(var6[var4], Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]); - } else if (var13 == 44) { + } else if (var13 == ScriptOpcodes.DEFINE_ARRAY) { var11 = var6[var4] >> 16; var14 = var6[var4] & 65535; int var28 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; @@ -290,7 +291,7 @@ public class GrandExchangeEvent { for (var15 = 0; var15 < var28; ++var15) { Interpreter.Interpreter_arrays[var11][var15] = var33; } - } else if (var13 == 45) { + } else if (var13 == ScriptOpcodes.GET_ARRAY_INT) { var11 = var6[var4]; var14 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; if (var14 < 0 || var14 >= Interpreter.Interpreter_arrayLengths[var11]) { @@ -298,7 +299,7 @@ public class GrandExchangeEvent { } Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Interpreter.Interpreter_arrays[var11][var14]; - } else if (var13 == 46) { + } else if (var13 == ScriptOpcodes.SET_ARRAY_INT) { var11 = var6[var4]; RouteStrategy.Interpreter_intStackSize -= 2; var14 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; @@ -307,22 +308,22 @@ public class GrandExchangeEvent { } Interpreter.Interpreter_arrays[var11][var14] = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; - } else if (var13 == 47) { + } else if (var13 == ScriptOpcodes.GET_VARC_STRING_OLD) { var12 = class196.varcs.getStringOld(var6[var4]); if (var12 == null) { var12 = "null"; } Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = var12; - } else if (var13 == 48) { + } else if (var13 == ScriptOpcodes.SET_VARC_STRING_OLD) { class196.varcs.setStringOld(var6[var4], Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]); - } else if (var13 == 49) { + } else if (var13 == ScriptOpcodes.GET_VARC_STRING) { var12 = class196.varcs.getString(var6[var4]); Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = var12; - } else if (var13 == 50) { + } else if (var13 == ScriptOpcodes.SET_VARC_STRING) { class196.varcs.setString(var6[var4], Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]); } else { - if (var13 != 60) { + if (var13 != ScriptOpcodes.SWITCH) { throw new IllegalStateException(); } diff --git a/runescape-client/src/main/java/GrandExchangeEvents.java b/runescape-client/src/main/java/GrandExchangeEvents.java index a880043184..f801e63adf 100644 --- a/runescape-client/src/main/java/GrandExchangeEvents.java +++ b/runescape-client/src/main/java/GrandExchangeEvents.java @@ -7,6 +7,7 @@ import net.runelite.mapping.Implements; import net.runelite.mapping.ObfuscatedGetter; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("g") @Implements("GrandExchangeEvents") @@ -109,43 +110,43 @@ public class GrandExchangeEvents { ) static int method75(int var0, Script var1, boolean var2) { Widget var3 = Huffman.getWidget(Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]); - if (var0 == 2600) { + if (var0 == ScriptOpcodes.IF_GETSCROLLX) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.scrollX; return 1; - } else if (var0 == 2601) { + } else if (var0 == ScriptOpcodes.IF_GETSCROLLY) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.scrollY; return 1; - } else if (var0 == 2602) { + } else if (var0 == ScriptOpcodes.IF_GETTEXT) { Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = var3.text; return 1; - } else if (var0 == 2603) { + } else if (var0 == ScriptOpcodes.IF_GETSCROLLWIDTH) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.scrollWidth; return 1; - } else if (var0 == 2604) { + } else if (var0 == ScriptOpcodes.IF_GETSCROLLHEIGHT) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.scrollHeight; return 1; - } else if (var0 == 2605) { + } else if (var0 == ScriptOpcodes.IF_GETMODELZOOM) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.modelZoom; return 1; - } else if (var0 == 2606) { + } else if (var0 == ScriptOpcodes.IF_GETMODELANGLE_X) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.modelAngleX; return 1; - } else if (var0 == 2607) { + } else if (var0 == ScriptOpcodes.IF_GETMODELANGLE_Z) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.modelAngleZ; return 1; - } else if (var0 == 2608) { + } else if (var0 == ScriptOpcodes.IF_GETMODELANGLE_Y) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.modelAngleY; return 1; - } else if (var0 == 2609) { + } else if (var0 == ScriptOpcodes.IF_GETTRANS) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.transparency; return 1; } else if (var0 == 2610) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.field960; return 1; - } else if (var0 == 2611) { + } else if (var0 == ScriptOpcodes.IF_GETCOLOUR) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.color; return 1; - } else if (var0 == 2612) { + } else if (var0 == ScriptOpcodes.IF_GETFILLCOLOUR) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.color2; return 1; } else if (var0 == 2613) { diff --git a/runescape-client/src/main/java/LoginType.java b/runescape-client/src/main/java/LoginType.java index c00ed82f4c..b7bff3b2b6 100644 --- a/runescape-client/src/main/java/LoginType.java +++ b/runescape-client/src/main/java/LoginType.java @@ -1,3 +1,4 @@ +import net.runelite.mapping.Export; import net.runelite.mapping.Implements; import net.runelite.mapping.ObfuscatedGetter; import net.runelite.mapping.ObfuscatedName; @@ -73,7 +74,8 @@ public class LoginType { } @ObfuscatedName("toString") - public String method166() { + @Export("toString") + public String toString() { return this.field489; } diff --git a/runescape-client/src/main/java/OwnWorldComparator.java b/runescape-client/src/main/java/OwnWorldComparator.java index 4914d77bed..db30ccb06f 100644 --- a/runescape-client/src/main/java/OwnWorldComparator.java +++ b/runescape-client/src/main/java/OwnWorldComparator.java @@ -3,6 +3,7 @@ import net.runelite.mapping.Export; import net.runelite.mapping.Implements; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("bj") @Implements("OwnWorldComparator") @@ -51,7 +52,7 @@ public class OwnWorldComparator implements Comparator { ) static int method1285(int var0, Script var1, boolean var2) { int var3; - if (var0 == 5504) { + if (var0 == ScriptOpcodes.CAM_FORCEANGLE) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; int var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; @@ -61,13 +62,13 @@ public class OwnWorldComparator implements Comparator { } return 1; - } else if (var0 == 5505) { + } else if (var0 == ScriptOpcodes.CAM_GETANGLE_XA) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.cameraPitchTarget; return 1; - } else if (var0 == 5506) { + } else if (var0 == ScriptOpcodes.CAM_GETANGLE_YA) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.minimapOrientation; return 1; - } else if (var0 == 5530) { + } else if (var0 == ScriptOpcodes.CAM_SETFOLLOWHEIGHT) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; if (var3 < 0) { var3 = 0; @@ -75,7 +76,7 @@ public class OwnWorldComparator implements Comparator { Client.cameraFollowHeight = var3; return 1; - } else if (var0 == 5531) { + } else if (var0 == ScriptOpcodes.CAM_GETFOLLOWHEIGHT) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.cameraFollowHeight; return 1; } else { diff --git a/runescape-client/src/main/java/ScriptEvent.java b/runescape-client/src/main/java/ScriptEvent.java index 2238fe002f..e2df568bf8 100644 --- a/runescape-client/src/main/java/ScriptEvent.java +++ b/runescape-client/src/main/java/ScriptEvent.java @@ -3,6 +3,7 @@ import net.runelite.mapping.Implements; import net.runelite.mapping.ObfuscatedGetter; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("by") @Implements("ScriptEvent") @@ -113,43 +114,43 @@ public class ScriptEvent extends Node { ) static int method1185(int var0, Script var1, boolean var2) { Widget var3 = var2 ? WorldMapIcon1.field1030 : class12.field1111; - if (var0 == 1600) { + if (var0 == ScriptOpcodes.CC_GETSCROLLX) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.scrollX; return 1; - } else if (var0 == 1601) { + } else if (var0 == ScriptOpcodes.CC_GETSCROLLY) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.scrollY; return 1; - } else if (var0 == 1602) { + } else if (var0 == ScriptOpcodes.CC_GETTEXT) { Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = var3.text; return 1; - } else if (var0 == 1603) { + } else if (var0 == ScriptOpcodes.CC_GETSCROLLWIDTH) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.scrollWidth; return 1; - } else if (var0 == 1604) { + } else if (var0 == ScriptOpcodes.CC_GETSCROLLHEIGHT) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.scrollHeight; return 1; - } else if (var0 == 1605) { + } else if (var0 == ScriptOpcodes.CC_GETMODELZOOM) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.modelZoom; return 1; - } else if (var0 == 1606) { + } else if (var0 == ScriptOpcodes.CC_GETMODELANGLE_X) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.modelAngleX; return 1; - } else if (var0 == 1607) { + } else if (var0 == ScriptOpcodes.CC_GETMODELANGLE_Z) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.modelAngleZ; return 1; - } else if (var0 == 1608) { + } else if (var0 == ScriptOpcodes.CC_GETMODELANGLE_Y) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.modelAngleY; return 1; - } else if (var0 == 1609) { + } else if (var0 == ScriptOpcodes.CC_GETTRANS) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.transparency; return 1; } else if (var0 == 1610) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.field960; return 1; - } else if (var0 == 1611) { + } else if (var0 == ScriptOpcodes.CC_GETCOLOUR) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.color; return 1; - } else if (var0 == 1612) { + } else if (var0 == ScriptOpcodes.CC_GETFILLCOLOUR) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.color2; return 1; } else if (var0 == 1613) { @@ -169,88 +170,88 @@ public class ScriptEvent extends Node { garbageValue = "1256509027" ) static int method1187(int var0, Script var1, boolean var2) { - if (var0 == 3300) { + if (var0 == ScriptOpcodes.CLIENTCLOCK) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.cycle; return 1; } else { int var3; int var4; - if (var0 == 3301) { + if (var0 == ScriptOpcodes.INV_GETOBJ) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = class83.method2027(var3, var4); return 1; - } else if (var0 == 3302) { + } else if (var0 == ScriptOpcodes.INV_GETNUM) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = WorldMapLabel.method442(var3, var4); return 1; - } else if (var0 == 3303) { + } else if (var0 == ScriptOpcodes.INV_TOTAL) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = class1.method18(var3, var4); return 1; - } else if (var0 == 3304) { + } else if (var0 == ScriptOpcodes.INV_SIZE) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = WorldMapDecorationType.method4523(var3).size; return 1; - } else if (var0 == 3305) { + } else if (var0 == ScriptOpcodes.STAT) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.currentLevels[var3]; return 1; - } else if (var0 == 3306) { + } else if (var0 == ScriptOpcodes.STAT_BASE) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.levels[var3]; return 1; - } else if (var0 == 3307) { + } else if (var0 == ScriptOpcodes.STAT_XP) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.experience[var3]; return 1; } else { int var5; - if (var0 == 3308) { + if (var0 == ScriptOpcodes.COORD) { var3 = SoundSystem.plane; var4 = (Canvas.localPlayer.x >> 7) + class50.baseX; var5 = (Canvas.localPlayer.y >> 7) + GraphicsObject.baseY; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = (var4 << 14) + var5 + (var3 << 28); return 1; - } else if (var0 == 3309) { + } else if (var0 == ScriptOpcodes.COORDX) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3 >> 14 & 16383; return 1; - } else if (var0 == 3310) { + } else if (var0 == ScriptOpcodes.COORDZ) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3 >> 28; return 1; - } else if (var0 == 3311) { + } else if (var0 == ScriptOpcodes.COORDY) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3 & 16383; return 1; - } else if (var0 == 3312) { + } else if (var0 == ScriptOpcodes.MAP_MEMBERS) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.isMembersWorld ? 1 : 0; return 1; - } else if (var0 == 3313) { + } else if (var0 == ScriptOpcodes.INVOTHER_GETOBJ) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize] + 32768; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = class83.method2027(var3, var4); return 1; - } else if (var0 == 3314) { + } else if (var0 == ScriptOpcodes.INVOTHER_GETNUM) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize] + 32768; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = WorldMapLabel.method442(var3, var4); return 1; - } else if (var0 == 3315) { + } else if (var0 == ScriptOpcodes.INVOTHER_TOTAL) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize] + 32768; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = class1.method18(var3, var4); return 1; - } else if (var0 == 3316) { + } else if (var0 == ScriptOpcodes.STAFFMODLEVEL) { if (Client.rights >= 2) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.rights; } else { @@ -258,19 +259,19 @@ public class ScriptEvent extends Node { } return 1; - } else if (var0 == 3317) { + } else if (var0 == ScriptOpcodes.REBOOTTIMER) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.rebootTimer; return 1; - } else if (var0 == 3318) { + } else if (var0 == ScriptOpcodes.MAP_WORLD) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.worldId; return 1; - } else if (var0 == 3321) { + } else if (var0 == ScriptOpcodes.RUNENERGY_VISIBLE) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.runEnergy; return 1; - } else if (var0 == 3322) { + } else if (var0 == ScriptOpcodes.RUNWEIGHT_VISIBLE) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.weight; return 1; - } else if (var0 == 3323) { + } else if (var0 == ScriptOpcodes.PLAYERMOD) { if (Client.field155) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = 1; } else { @@ -278,10 +279,10 @@ public class ScriptEvent extends Node { } return 1; - } else if (var0 == 3324) { + } else if (var0 == ScriptOpcodes.WORLDFLAGS) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.worldProperties; return 1; - } else if (var0 == 3325) { + } else if (var0 == ScriptOpcodes.MOVECOORD) { RouteStrategy.Interpreter_intStackSize -= 4; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; diff --git a/runescape-client/src/main/java/StructDefinition.java b/runescape-client/src/main/java/StructDefinition.java index 6a9c2c932f..bfbeb96b71 100644 --- a/runescape-client/src/main/java/StructDefinition.java +++ b/runescape-client/src/main/java/StructDefinition.java @@ -2,6 +2,7 @@ import net.runelite.mapping.Export; import net.runelite.mapping.Implements; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("jq") @Implements("StructDefinition") @@ -111,7 +112,7 @@ public class StructDefinition extends DualNode { var4 = var2 ? WorldMapIcon1.field1030 : class12.field1111; } - if (var0 == 1100) { + if (var0 == ScriptOpcodes.CC_SETSCROLLPOS) { RouteStrategy.Interpreter_intStackSize -= 2; var4.scrollX = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; if (var4.scrollX > var4.scrollWidth - var4.width) { @@ -133,40 +134,40 @@ public class StructDefinition extends DualNode { class22.method295(var4); return 1; - } else if (var0 == 1101) { + } else if (var0 == ScriptOpcodes.CC_SETCOLOUR) { var4.color = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; class22.method295(var4); return 1; - } else if (var0 == 1102) { + } else if (var0 == ScriptOpcodes.CC_SETFILL) { var4.fill = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; class22.method295(var4); return 1; - } else if (var0 == 1103) { + } else if (var0 == ScriptOpcodes.CC_SETTRANS) { var4.transparency = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; class22.method295(var4); return 1; - } else if (var0 == 1104) { + } else if (var0 == ScriptOpcodes.CC_SETLINEWID) { var4.lineWid = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; class22.method295(var4); return 1; - } else if (var0 == 1105) { + } else if (var0 == ScriptOpcodes.CC_SETGRAPHIC) { var4.spriteId2 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; class22.method295(var4); return 1; - } else if (var0 == 1106) { + } else if (var0 == ScriptOpcodes.CC_SET2DANGLE) { var4.spriteAngle = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; class22.method295(var4); return 1; - } else if (var0 == 1107) { + } else if (var0 == ScriptOpcodes.CC_SETTILING) { var4.spriteTiling = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; class22.method295(var4); return 1; - } else if (var0 == 1108) { + } else if (var0 == ScriptOpcodes.CC_SETMODEL) { var4.modelType = 1; var4.modelId = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; class22.method295(var4); return 1; - } else if (var0 == 1109) { + } else if (var0 == ScriptOpcodes.CC_SETMODELANGLE) { RouteStrategy.Interpreter_intStackSize -= 6; var4.modelOffsetX = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4.modelOffsetY = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; @@ -178,7 +179,7 @@ public class StructDefinition extends DualNode { return 1; } else { int var5; - if (var0 == 1110) { + if (var0 == ScriptOpcodes.CC_SETMODELANIM) { var5 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; if (var5 != var4.sequenceId) { var4.sequenceId = var5; @@ -188,11 +189,11 @@ public class StructDefinition extends DualNode { } return 1; - } else if (var0 == 1111) { + } else if (var0 == ScriptOpcodes.CC_SETMODELORTHOG) { var4.modelOrthog = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; class22.method295(var4); return 1; - } else if (var0 == 1112) { + } else if (var0 == ScriptOpcodes.CC_SETTEXT) { String var8 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; if (!var8.equals(var4.text)) { var4.text = var8; @@ -200,38 +201,38 @@ public class StructDefinition extends DualNode { } return 1; - } else if (var0 == 1113) { + } else if (var0 == ScriptOpcodes.CC_SETTEXTFONT) { var4.fontId = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; class22.method295(var4); return 1; - } else if (var0 == 1114) { + } else if (var0 == ScriptOpcodes.CC_SETTEXTALIGN) { RouteStrategy.Interpreter_intStackSize -= 3; var4.textXAlignment = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4.textYAlignment = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; var4.textLineHeight = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 2]; class22.method295(var4); return 1; - } else if (var0 == 1115) { + } else if (var0 == ScriptOpcodes.CC_SETTEXTSHADOW) { var4.textShadowed = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; class22.method295(var4); return 1; - } else if (var0 == 1116) { + } else if (var0 == ScriptOpcodes.CC_SETOUTLINE) { var4.outline = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; class22.method295(var4); return 1; - } else if (var0 == 1117) { + } else if (var0 == ScriptOpcodes.CC_SETGRAPHICSHADOW) { var4.spriteShadow = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; class22.method295(var4); return 1; - } else if (var0 == 1118) { + } else if (var0 == ScriptOpcodes.CC_SETVFLIP) { var4.spriteFlipV = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; class22.method295(var4); return 1; - } else if (var0 == 1119) { + } else if (var0 == ScriptOpcodes.CC_SETHFLIP) { var4.spriteFlipH = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; class22.method295(var4); return 1; - } else if (var0 == 1120) { + } else if (var0 == ScriptOpcodes.CC_SETSCROLLSIZE) { RouteStrategy.Interpreter_intStackSize -= 2; var4.scrollWidth = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4.scrollHeight = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; @@ -241,7 +242,7 @@ public class StructDefinition extends DualNode { } return 1; - } else if (var0 == 1121) { + } else if (var0 == ScriptOpcodes.CC_RESUME_PAUSEBUTTON) { TilePaint.method3060(var4.id, var4.childIndex); Client.field127 = var4; class22.method295(var4); @@ -250,7 +251,7 @@ public class StructDefinition extends DualNode { var4.spriteId = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; class22.method295(var4); return 1; - } else if (var0 == 1123) { + } else if (var0 == ScriptOpcodes.CC_SETFILLCOLOUR) { var4.color2 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; class22.method295(var4); return 1; @@ -269,7 +270,7 @@ public class StructDefinition extends DualNode { return 1; } else { boolean var6; - if (var0 == 1126) { + if (var0 == ScriptOpcodes.CC_SETLINEDIRECTION) { var6 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; var4.field961 = var6; return 1; diff --git a/runescape-client/src/main/java/TextureProvider.java b/runescape-client/src/main/java/TextureProvider.java index 347ad0ba62..b6a22d12a5 100644 --- a/runescape-client/src/main/java/TextureProvider.java +++ b/runescape-client/src/main/java/TextureProvider.java @@ -3,6 +3,7 @@ import net.runelite.mapping.Implements; import net.runelite.mapping.ObfuscatedGetter; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("dl") @Implements("TextureProvider") @@ -234,7 +235,7 @@ public class TextureProvider implements TextureLoader { if (var0 == null) { return null; } else if (var0 instanceof byte[]) { - byte[] var5 = (byte[])((byte[])((byte[])var0)); + byte[] var5 = (byte[])var0; if (var1) { int var3 = var5.length; byte[] var4 = new byte[var3]; @@ -329,39 +330,39 @@ public class TextureProvider implements TextureLoader { static int method2752(int var0, Script var1, boolean var2) { int var3; int var4; - if (var0 == 4000) { + if (var0 == ScriptOpcodes.ADD) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3 + var4; return 1; - } else if (var0 == 4001) { + } else if (var0 == ScriptOpcodes.SUB) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3 - var4; return 1; - } else if (var0 == 4002) { + } else if (var0 == ScriptOpcodes.MULTIPLY) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var4 * var3; return 1; - } else if (var0 == 4003) { + } else if (var0 == ScriptOpcodes.DIV) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3 / var4; return 1; - } else if (var0 == 4004) { + } else if (var0 == ScriptOpcodes.RANDOM) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = (int)(Math.random() * (double)var3); return 1; - } else if (var0 == 4005) { + } else if (var0 == ScriptOpcodes.RANDOMINC) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = (int)(Math.random() * (double)(var3 + 1)); return 1; - } else if (var0 == 4006) { + } else if (var0 == ScriptOpcodes.INTERPOLATE) { RouteStrategy.Interpreter_intStackSize -= 5; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; @@ -370,37 +371,37 @@ public class TextureProvider implements TextureLoader { int var12 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 4]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3 + (var12 - var11) * (var4 - var3) / (var6 - var11); return 1; - } else if (var0 == 4007) { + } else if (var0 == ScriptOpcodes.ADDPERCENT) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3 + var3 * var4 / 100; return 1; - } else if (var0 == 4008) { + } else if (var0 == ScriptOpcodes.SETBIT) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3 | 1 << var4; return 1; - } else if (var0 == 4009) { + } else if (var0 == ScriptOpcodes.CLEARBIT) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3 & -1 - (1 << var4); return 1; - } else if (var0 == 4010) { + } else if (var0 == ScriptOpcodes.TESTBIT) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = (var3 & 1 << var4) != 0 ? 1 : 0; return 1; - } else if (var0 == 4011) { + } else if (var0 == ScriptOpcodes.MOD) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3 % var4; return 1; - } else if (var0 == 4012) { + } else if (var0 == ScriptOpcodes.POW) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; @@ -411,7 +412,7 @@ public class TextureProvider implements TextureLoader { } return 1; - } else if (var0 == 4013) { + } else if (var0 == ScriptOpcodes.INVPOW) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; @@ -441,19 +442,19 @@ public class TextureProvider implements TextureLoader { return 1; } - } else if (var0 == 4014) { + } else if (var0 == ScriptOpcodes.AND) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3 & var4; return 1; - } else if (var0 == 4015) { + } else if (var0 == ScriptOpcodes.OR) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3 | var4; return 1; - } else if (var0 == 4018) { + } else if (var0 == ScriptOpcodes.SCALE) { RouteStrategy.Interpreter_intStackSize -= 3; long var5 = (long)Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; long var7 = (long)Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; diff --git a/runescape-client/src/main/java/UserComparator4.java b/runescape-client/src/main/java/UserComparator4.java index 98b1c71cd6..0f5758bf29 100644 --- a/runescape-client/src/main/java/UserComparator4.java +++ b/runescape-client/src/main/java/UserComparator4.java @@ -4,6 +4,7 @@ import net.runelite.mapping.Implements; import net.runelite.mapping.ObfuscatedGetter; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("ev") @Implements("UserComparator4") @@ -56,22 +57,22 @@ public class UserComparator4 implements Comparator { garbageValue = "-2050984400" ) static int method3335(int var0, Script var1, boolean var2) { - if (var0 == 5306) { + if (var0 == ScriptOpcodes.GETWINDOWMODE) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = SpotAnimationDefinition.method4822(); return 1; } else { int var3; - if (var0 == 5307) { + if (var0 == ScriptOpcodes.SETWINDOWMODE) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; if (var3 == 1 || var3 == 2) { GroundItem.method2095(var3); } return 1; - } else if (var0 == 5308) { + } else if (var0 == ScriptOpcodes.GETDEFAULTWINDOWMODE) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = ReflectionCheck.clientPreferences.windowMode; return 1; - } else if (var0 != 5309) { + } else if (var0 != ScriptOpcodes.SETDEFAULTWINDOWMODE) { if (var0 == 5310) { --RouteStrategy.Interpreter_intStackSize; return 1; diff --git a/runescape-client/src/main/java/Varcs.java b/runescape-client/src/main/java/Varcs.java index bd18c01a0c..f7a988efaa 100644 --- a/runescape-client/src/main/java/Varcs.java +++ b/runescape-client/src/main/java/Varcs.java @@ -261,7 +261,6 @@ public class Varcs { void read() { AccessFile var1 = this.getPreferencesFile(false); - label225: { try { byte[] var2 = new byte[(int)var1.length()]; @@ -279,20 +278,18 @@ public class Varcs { } int var5 = var25.readUnsignedByte(); - if (var5 >= 0 && var5 <= 2) { + if (var5 < 0 || var5 > 2) { + return; + } + int var6; int var7; int var8; int var9; if (var5 >= 2) { var9 = var25.readUnsignedShort(); - var6 = 0; - - while (true) { - if (var6 >= var9) { - break label225; - } + for (var6 = 0; var6 < var9; ++var6) { var7 = var25.readUnsignedShort(); var8 = var25.readUnsignedByte(); class3 var10 = (class3)ScriptFrame.findEnumerated(class3.method34(), var8); @@ -300,8 +297,6 @@ public class Varcs { if (this.intsPersistence[var7]) { this.map.put(var7, var11); } - - ++var6; } } else { var9 = var25.readUnsignedShort(); @@ -315,21 +310,13 @@ public class Varcs { } var6 = var25.readUnsignedShort(); - var7 = 0; - - while (true) { - if (var7 >= var6) { - break label225; - } + for (var7 = 0; var7 < var6; ++var7) { var25.readUnsignedShort(); var25.readStringCp1252NullTerminated(); - ++var7; - } } } } catch (Exception var23) { - break label225; } finally { try { var1.close(); @@ -338,9 +325,6 @@ public class Varcs { } - return; - } - this.unwrittenChanges = false; } diff --git a/runescape-client/src/main/java/ViewportMouse.java b/runescape-client/src/main/java/ViewportMouse.java index 57312a18ae..8ca879af33 100644 --- a/runescape-client/src/main/java/ViewportMouse.java +++ b/runescape-client/src/main/java/ViewportMouse.java @@ -3,6 +3,7 @@ import net.runelite.mapping.Implements; import net.runelite.mapping.ObfuscatedGetter; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("dm") @Implements("ViewportMouse") @@ -72,22 +73,22 @@ public class ViewportMouse { ) static int method2983(int var0, Script var1, boolean var2) { Widget var3 = Huffman.getWidget(Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]); - if (var0 == 2500) { + if (var0 == ScriptOpcodes.IF_GETX) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.x; return 1; - } else if (var0 == 2501) { + } else if (var0 == ScriptOpcodes.IF_GETY) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.y; return 1; - } else if (var0 == 2502) { + } else if (var0 == ScriptOpcodes.IF_GETWIDTH) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.width; return 1; - } else if (var0 == 2503) { + } else if (var0 == ScriptOpcodes.IF_GETHEIGHT) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.height; return 1; - } else if (var0 == 2504) { + } else if (var0 == ScriptOpcodes.IF_GETHIDE) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.isHidden ? 1 : 0; return 1; - } else if (var0 == 2505) { + } else if (var0 == ScriptOpcodes.IF_GETLAYER) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.parentId; return 1; } else { diff --git a/runescape-client/src/main/java/WorldComparator.java b/runescape-client/src/main/java/WorldComparator.java index c254ab0fe5..f1ff1fc67c 100644 --- a/runescape-client/src/main/java/WorldComparator.java +++ b/runescape-client/src/main/java/WorldComparator.java @@ -3,6 +3,7 @@ import net.runelite.mapping.Export; import net.runelite.mapping.Implements; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("u") @Implements("WorldComparator") @@ -45,14 +46,14 @@ final class WorldComparator implements Comparator { garbageValue = "108" ) static int method68(int var0, Script var1, boolean var2) { - if (var0 == 3200) { + if (var0 == ScriptOpcodes.SOUND_SYNTH) { RouteStrategy.Interpreter_intStackSize -= 3; Ignored.queueSoundEffect(Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize], Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1], Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 2]); return 1; - } else if (var0 == 3201) { + } else if (var0 == ScriptOpcodes.SOUND_SONG) { AbstractUserComparator.method5437(Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]); return 1; - } else if (var0 == 3202) { + } else if (var0 == ScriptOpcodes.SOUND_JINGLE) { RouteStrategy.Interpreter_intStackSize -= 2; HealthBar.method1994(Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize], Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]); return 1; diff --git a/runescape-client/src/main/java/WorldMapAreaData.java b/runescape-client/src/main/java/WorldMapAreaData.java index 92be204da6..64fff82dd1 100644 --- a/runescape-client/src/main/java/WorldMapAreaData.java +++ b/runescape-client/src/main/java/WorldMapAreaData.java @@ -5,6 +5,7 @@ import net.runelite.mapping.Export; import net.runelite.mapping.Implements; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("ae") @Implements("WorldMapAreaData") @@ -135,7 +136,7 @@ public class WorldMapAreaData extends WorldMapArea { } int var5; - if (var0 == 1300) { + if (var0 == ScriptOpcodes.CC_SETOP) { var5 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] - 1; if (var5 >= 0 && var5 <= 9) { var4.setAction(var5, Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]); @@ -146,28 +147,28 @@ public class WorldMapAreaData extends WorldMapArea { } } else { int var6; - if (var0 == 1301) { + if (var0 == ScriptOpcodes.CC_SETDRAGGABLE) { RouteStrategy.Interpreter_intStackSize -= 2; var5 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var6 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; var4.parent = class204.getWidgetChild(var5, var6); return 1; - } else if (var0 == 1302) { + } else if (var0 == ScriptOpcodes.CC_SETDRAGGABLEBEHAVIOR) { var4.isScrollBar = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; return 1; - } else if (var0 == 1303) { + } else if (var0 == ScriptOpcodes.CC_SETDRAGDEADZONE) { var4.dragZoneSize = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; return 1; - } else if (var0 == 1304) { + } else if (var0 == ScriptOpcodes.CC_SETDRAGDEADTIME) { var4.dragThreshold = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; return 1; - } else if (var0 == 1305) { + } else if (var0 == ScriptOpcodes.CC_SETOPBASE) { var4.dataText = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; return 1; - } else if (var0 == 1306) { + } else if (var0 == ScriptOpcodes.CC_SETTARGETVERB) { var4.spellActionName = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; return 1; - } else if (var0 == 1307) { + } else if (var0 == ScriptOpcodes.CC_CLEAROPS) { var4.actions = null; return 1; } else if (var0 == 1308) { diff --git a/runescape-client/src/main/java/WorldMapDecoration.java b/runescape-client/src/main/java/WorldMapDecoration.java index fd15e8530c..ed14d0ff1f 100644 --- a/runescape-client/src/main/java/WorldMapDecoration.java +++ b/runescape-client/src/main/java/WorldMapDecoration.java @@ -6,8 +6,7 @@ import net.runelite.mapping.ObfuscatedSignature; @ObfuscatedName("v") @Implements("WorldMapDecoration") -public class WorldMapDecoration -{ +public class WorldMapDecoration { @ObfuscatedName("dd") @ObfuscatedSignature( signature = "Lit;" diff --git a/runescape-client/src/main/java/WorldMapSectionType.java b/runescape-client/src/main/java/WorldMapSectionType.java index 9e31cd962e..d0e2ea0201 100644 --- a/runescape-client/src/main/java/WorldMapSectionType.java +++ b/runescape-client/src/main/java/WorldMapSectionType.java @@ -4,6 +4,7 @@ import net.runelite.mapping.Implements; import net.runelite.mapping.ObfuscatedGetter; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("h") @Implements("WorldMapSectionType") @@ -100,22 +101,22 @@ public enum WorldMapSectionType implements Enumerated { ) static int method253(int var0, Script var1, boolean var2) { Widget var3 = var2 ? WorldMapIcon1.field1030 : class12.field1111; - if (var0 == 1500) { + if (var0 == ScriptOpcodes.CC_GETX) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.x; return 1; - } else if (var0 == 1501) { + } else if (var0 == ScriptOpcodes.CC_GETY) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.y; return 1; - } else if (var0 == 1502) { + } else if (var0 == ScriptOpcodes.CC_GETWIDTH) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.width; return 1; - } else if (var0 == 1503) { + } else if (var0 == ScriptOpcodes.CC_GETHEIGHT) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.height; return 1; - } else if (var0 == 1504) { + } else if (var0 == ScriptOpcodes.CC_GETHIDE) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.isHidden ? 1 : 0; return 1; - } else if (var0 == 1505) { + } else if (var0 == ScriptOpcodes.CC_GETLAYER) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.parentId; return 1; } else { diff --git a/runescape-client/src/main/java/class1.java b/runescape-client/src/main/java/class1.java index 3f186cdad6..d1d301d612 100644 --- a/runescape-client/src/main/java/class1.java +++ b/runescape-client/src/main/java/class1.java @@ -1,6 +1,7 @@ import net.runelite.mapping.Export; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("f") final class class1 implements class0 { @@ -86,7 +87,7 @@ final class class1 implements class0 { var4 = var2 ? WorldMapIcon1.field1030 : class12.field1111; } - if (var0 == 1000) { + if (var0 == ScriptOpcodes.CC_SETPOSITION) { RouteStrategy.Interpreter_intStackSize -= 4; var4.rawX = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4.rawY = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; @@ -99,7 +100,7 @@ final class class1 implements class0 { } return 1; - } else if (var0 == 1001) { + } else if (var0 == ScriptOpcodes.CC_SETSIZE) { RouteStrategy.Interpreter_intStackSize -= 4; var4.rawWidth = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4.rawHeight = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; @@ -112,7 +113,7 @@ final class class1 implements class0 { } return 1; - } else if (var0 == 1003) { + } else if (var0 == ScriptOpcodes.CC_SETHIDE) { boolean var5 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; if (var5 != var4.isHidden) { var4.isHidden = var5; @@ -120,7 +121,7 @@ final class class1 implements class0 { } return 1; - } else if (var0 == 1005) { + } else if (var0 == ScriptOpcodes.CC_SETNOCLICKTHROUGH) { var4.noClickThrough = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; return 1; } else if (var0 == 1006) { @@ -138,14 +139,14 @@ final class class1 implements class0 { ) static int method16(int var0, Script var1, boolean var2) { int var3; - if (var0 == 4200) { + if (var0 == ScriptOpcodes.OC_NAME) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = Skills.getItemDefinition(var3).name; return 1; } else { int var4; ItemDefinition var5; - if (var0 == 4201) { + if (var0 == ScriptOpcodes.OC_OP) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; @@ -157,7 +158,7 @@ final class class1 implements class0 { } return 1; - } else if (var0 == 4202) { + } else if (var0 == ScriptOpcodes.OC_IOP) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; @@ -169,17 +170,17 @@ final class class1 implements class0 { } return 1; - } else if (var0 == 4203) { + } else if (var0 == ScriptOpcodes.OC_COST) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Skills.getItemDefinition(var3).price; return 1; - } else if (var0 == 4204) { + } else if (var0 == ScriptOpcodes.OC_STACKABLE) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Skills.getItemDefinition(var3).isStackable == 1 ? 1 : 0; return 1; } else { ItemDefinition var6; - if (var0 == 4205) { + if (var0 == ScriptOpcodes.OC_CERT) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var6 = Skills.getItemDefinition(var3); if (var6.noteTemplate == -1 && var6.note >= 0) { @@ -189,7 +190,7 @@ final class class1 implements class0 { } return 1; - } else if (var0 == 4206) { + } else if (var0 == ScriptOpcodes.OC_UNCERT) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var6 = Skills.getItemDefinition(var3); if (var6.noteTemplate >= 0 && var6.note >= 0) { @@ -199,11 +200,11 @@ final class class1 implements class0 { } return 1; - } else if (var0 == 4207) { + } else if (var0 == ScriptOpcodes.OC_MEMBERS) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Skills.getItemDefinition(var3).isMembersOnly ? 1 : 0; return 1; - } else if (var0 == 4208) { + } else if (var0 == ScriptOpcodes.OC_PLACEHOLDER) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var6 = Skills.getItemDefinition(var3); if (var6.placeholderTemplate == -1 && var6.placeholder >= 0) { @@ -213,7 +214,7 @@ final class class1 implements class0 { } return 1; - } else if (var0 == 4209) { + } else if (var0 == ScriptOpcodes.OC_UNPLACEHOLDER) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var6 = Skills.getItemDefinition(var3); if (var6.placeholderTemplate >= 0 && var6.placeholder >= 0) { @@ -223,14 +224,14 @@ final class class1 implements class0 { } return 1; - } else if (var0 == 4210) { + } else if (var0 == ScriptOpcodes.OC_FIND) { String var7 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; var4 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; class50.method900(var7, var4 == 1); Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = WorldMapSection0.field1055; return 1; - } else if (var0 != 4211) { - if (var0 == 4212) { + } else if (var0 != ScriptOpcodes.OC_FINDNEXT) { + if (var0 == ScriptOpcodes.OC_FINDRESET) { WorldMapDecorationType.field1139 = 0; return 1; } else { diff --git a/runescape-client/src/main/java/class11.java b/runescape-client/src/main/java/class11.java index f6646377ed..fbd4dfcf22 100644 --- a/runescape-client/src/main/java/class11.java +++ b/runescape-client/src/main/java/class11.java @@ -3,6 +3,7 @@ import net.runelite.mapping.Export; import net.runelite.mapping.ObfuscatedGetter; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("k") final class class11 implements Comparator { @@ -120,63 +121,63 @@ final class class11 implements Comparator { var8 = null; } - if (var0 == 1400) { + if (var0 == ScriptOpcodes.CC_SETONCLICK) { var3.onClick = var8; - } else if (var0 == 1401) { + } else if (var0 == ScriptOpcodes.CC_SETONHOLD) { var3.onHold = var8; - } else if (var0 == 1402) { + } else if (var0 == ScriptOpcodes.CC_SETONRELEASE) { var3.onRelease = var8; - } else if (var0 == 1403) { + } else if (var0 == ScriptOpcodes.CC_SETONMOUSEOVER) { var3.onMouseOver = var8; - } else if (var0 == 1404) { + } else if (var0 == ScriptOpcodes.CC_SETONMOUSELEAVE) { var3.onMouseLeave = var8; - } else if (var0 == 1405) { + } else if (var0 == ScriptOpcodes.CC_SETONDRAG) { var3.onDrag = var8; - } else if (var0 == 1406) { + } else if (var0 == ScriptOpcodes.CC_SETONTARGETLEAVE) { var3.onTargetLeave = var8; - } else if (var0 == 1407) { + } else if (var0 == ScriptOpcodes.CC_SETONVARTRANSMIT) { var3.onVarTransmit = var8; var3.varTransmitTriggers = var5; - } else if (var0 == 1408) { + } else if (var0 == ScriptOpcodes.CC_SETONTIMER) { var3.onTimer = var8; - } else if (var0 == 1409) { + } else if (var0 == ScriptOpcodes.CC_SETONOP) { var3.onOp = var8; - } else if (var0 == 1410) { + } else if (var0 == ScriptOpcodes.CC_SETONDRAGCOMPLETE) { var3.onDragComplete = var8; - } else if (var0 == 1411) { + } else if (var0 == ScriptOpcodes.CC_SETONCLICKREPEAT) { var3.onClickRepeat = var8; - } else if (var0 == 1412) { + } else if (var0 == ScriptOpcodes.CC_SETONMOUSEREPEAT) { var3.onMouseRepeat = var8; - } else if (var0 == 1414) { + } else if (var0 == ScriptOpcodes.CC_SETONINVTRANSMIT) { var3.onInvTransmit = var8; var3.invTransmitTriggers = var5; - } else if (var0 == 1415) { + } else if (var0 == ScriptOpcodes.CC_SETONSTATTRANSMIT) { var3.onStatTransmit = var8; var3.statTransmitTriggers = var5; - } else if (var0 == 1416) { + } else if (var0 == ScriptOpcodes.CC_SETONTARGETENTER) { var3.onTargetEnter = var8; - } else if (var0 == 1417) { + } else if (var0 == ScriptOpcodes.CC_SETONSCROLLWHEEL) { var3.onScroll = var8; - } else if (var0 == 1418) { + } else if (var0 == ScriptOpcodes.CC_SETONCHATTRANSMIT) { var3.field970 = var8; - } else if (var0 == 1419) { + } else if (var0 == ScriptOpcodes.CC_SETONKEY) { var3.onKeyListener = var8; - } else if (var0 == 1420) { + } else if (var0 == ScriptOpcodes.CC_SETONFRIENDTRANSMIT) { var3.field971 = var8; - } else if (var0 == 1421) { + } else if (var0 == ScriptOpcodes.CC_SETONCLANTRANSMIT) { var3.field972 = var8; - } else if (var0 == 1422) { + } else if (var0 == ScriptOpcodes.CC_SETONMISCTRANSMIT) { var3.field973 = var8; - } else if (var0 == 1423) { + } else if (var0 == ScriptOpcodes.CC_SETONDIALOGABORT) { var3.onDialogAbortListener = var8; - } else if (var0 == 1424) { + } else if (var0 == ScriptOpcodes.CC_SETONSUBCHANGE) { var3.field974 = var8; - } else if (var0 == 1425) { + } else if (var0 == ScriptOpcodes.CC_SETONSTOCKTRANSMIT) { var3.field976 = var8; } else if (var0 == 1426) { var3.field977 = var8; } else { - if (var0 != 1427) { + if (var0 != ScriptOpcodes.CC_SETONRESIZE) { return 2; } @@ -194,11 +195,11 @@ final class class11 implements Comparator { ) static int method146(int var0, Script var1, boolean var2) { Widget var3; - if (var0 == 2700) { + if (var0 == ScriptOpcodes.IF_GETINVOBJECT) { var3 = Huffman.getWidget(Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]); Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.itemId; return 1; - } else if (var0 == 2701) { + } else if (var0 == ScriptOpcodes.IF_GETINVCOUNT) { var3 = Huffman.getWidget(Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]); if (var3.itemId != -1) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.itemQuantity; @@ -207,7 +208,7 @@ final class class11 implements Comparator { } return 1; - } else if (var0 == 2702) { + } else if (var0 == ScriptOpcodes.IF_HASSUB) { int var4 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; WidgetGroupParent var5 = (WidgetGroupParent)Client.widgetGroupParents.get((long)var4); if (var5 != null) { @@ -217,7 +218,7 @@ final class class11 implements Comparator { } return 1; - } else if (var0 == 2706) { + } else if (var0 == ScriptOpcodes.IF_GETTOP) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.rootWidgetGroup; return 1; } else { diff --git a/runescape-client/src/main/java/class15.java b/runescape-client/src/main/java/class15.java index 0b07ec0546..d8eb31073f 100644 --- a/runescape-client/src/main/java/class15.java +++ b/runescape-client/src/main/java/class15.java @@ -2,6 +2,7 @@ import net.runelite.mapping.Export; import net.runelite.mapping.ObfuscatedGetter; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("z") public class class15 extends class21 { @@ -121,11 +122,11 @@ public class class15 extends class21 { ) static int method182(int var0, Script var1, boolean var2) { Widget var3 = Huffman.getWidget(Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]); - if (var0 == 2800) { + if (var0 == ScriptOpcodes.IF_GETTARGETMASK) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = class211.method4107(class1.getWidgetClickMask(var3)); return 1; - } else if (var0 != 2801) { - if (var0 == 2802) { + } else if (var0 != ScriptOpcodes.IF_GETOP) { + if (var0 == ScriptOpcodes.IF_GETOPBASE) { if (var3.dataText == null) { Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = ""; } else { diff --git a/runescape-client/src/main/java/class16.java b/runescape-client/src/main/java/class16.java index 07eddf838a..6d20c53087 100644 --- a/runescape-client/src/main/java/class16.java +++ b/runescape-client/src/main/java/class16.java @@ -1,6 +1,7 @@ import net.runelite.mapping.Export; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("j") public class class16 { @@ -62,11 +63,11 @@ public class class16 { ) static int method188(int var0, Script var1, boolean var2) { Widget var3 = var2 ? WorldMapIcon1.field1030 : class12.field1111; - if (var0 == 1800) { + if (var0 == ScriptOpcodes.CC_GETTARGETMASK) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = class211.method4107(class1.getWidgetClickMask(var3)); return 1; - } else if (var0 != 1801) { - if (var0 == 1802) { + } else if (var0 != ScriptOpcodes.CC_GETOP) { + if (var0 == ScriptOpcodes.CC_GETOPBASE) { if (var3.dataText == null) { Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = ""; } else { diff --git a/runescape-client/src/main/java/class211.java b/runescape-client/src/main/java/class211.java index dec93d8492..f8254ed9d6 100644 --- a/runescape-client/src/main/java/class211.java +++ b/runescape-client/src/main/java/class211.java @@ -4,6 +4,7 @@ import java.util.TimeZone; import net.runelite.mapping.Export; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("hg") public class class211 { @@ -37,32 +38,32 @@ public class class211 { static int method4103(int var0, Script var1, boolean var2) { String var3; int var4; - if (var0 == 4100) { + if (var0 == ScriptOpcodes.APPEND_NUM) { var3 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; var4 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = var3 + var4; return 1; } else { String var5; - if (var0 == 4101) { + if (var0 == ScriptOpcodes.APPEND) { Interpreter.Interpreter_stringStackSize -= 2; var3 = Interpreter.Interpreter_stringStack[Interpreter.Interpreter_stringStackSize]; var5 = Interpreter.Interpreter_stringStack[Interpreter.Interpreter_stringStackSize + 1]; Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = var3 + var5; return 1; - } else if (var0 == 4102) { + } else if (var0 == ScriptOpcodes.APPEND_SIGNNUM) { var3 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; var4 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = var3 + ByteArrayPool.method4001(var4, true); return 1; - } else if (var0 == 4103) { + } else if (var0 == ScriptOpcodes.LOWERCASE) { var3 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = var3.toLowerCase(); return 1; } else { int var6; int var7; - if (var0 == 4104) { + if (var0 == ScriptOpcodes.FROMDATE) { var7 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; long var14 = ((long)var7 + 11745L) * 86400000L; Interpreter.Interpreter_calendar.setTime(new Date(var14)); @@ -71,12 +72,12 @@ public class class211 { int var16 = Interpreter.Interpreter_calendar.get(1); Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = var6 + "-" + Interpreter.field422[var15] + "-" + var16; return 1; - } else if (var0 != 4105) { - if (var0 == 4106) { + } else if (var0 != ScriptOpcodes.TEXT_GENDER) { + if (var0 == ScriptOpcodes.TOSTRING) { var7 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = Integer.toString(var7); return 1; - } else if (var0 == 4107) { + } else if (var0 == ScriptOpcodes.COMPARE) { Interpreter.Interpreter_stringStackSize -= 2; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = WallDecoration.method3256(AttackOption.method2033(Interpreter.Interpreter_stringStack[Interpreter.Interpreter_stringStackSize], Interpreter.Interpreter_stringStack[Interpreter.Interpreter_stringStackSize + 1], Client.language)); return 1; @@ -84,7 +85,7 @@ public class class211 { int var8; byte[] var9; Font var10; - if (var0 == 4108) { + if (var0 == ScriptOpcodes.PARAHEIGHT) { var3 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; RouteStrategy.Interpreter_intStackSize -= 2; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; @@ -93,7 +94,7 @@ public class class211 { var10 = new Font(var9); Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var10.lineCount(var3, var4); return 1; - } else if (var0 == 4109) { + } else if (var0 == ScriptOpcodes.PARAWIDTH) { var3 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; RouteStrategy.Interpreter_intStackSize -= 2; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; @@ -102,7 +103,7 @@ public class class211 { var10 = new Font(var9); Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var10.lineWidth(var3, var4); return 1; - } else if (var0 == 4110) { + } else if (var0 == ScriptOpcodes.TEXT_SWITCH) { Interpreter.Interpreter_stringStackSize -= 2; var3 = Interpreter.Interpreter_stringStack[Interpreter.Interpreter_stringStackSize]; var5 = Interpreter.Interpreter_stringStack[Interpreter.Interpreter_stringStackSize + 1]; @@ -113,32 +114,32 @@ public class class211 { } return 1; - } else if (var0 == 4111) { + } else if (var0 == ScriptOpcodes.ESCAPE) { var3 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = AbstractFont.escapeBrackets(var3); return 1; - } else if (var0 == 4112) { + } else if (var0 == ScriptOpcodes.APPEND_CHAR) { var3 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; var4 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = var3 + (char)var4; return 1; - } else if (var0 == 4113) { + } else if (var0 == ScriptOpcodes.CHAR_ISPRINTABLE) { var7 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = ChatChannel.method2238((char)var7) ? 1 : 0; return 1; - } else if (var0 == 4114) { + } else if (var0 == ScriptOpcodes.CHAR_ISALPHANUMERIC) { var7 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = VarcInt.isAlphaNumeric((char)var7) ? 1 : 0; return 1; - } else if (var0 == 4115) { + } else if (var0 == ScriptOpcodes.CHAR_ISALPHA) { var7 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = UrlRequest.method3271((char)var7) ? 1 : 0; return 1; - } else if (var0 == 4116) { + } else if (var0 == ScriptOpcodes.CHAR_ISNUMERIC) { var7 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = class159.method3394((char)var7) ? 1 : 0; return 1; - } else if (var0 == 4117) { + } else if (var0 == ScriptOpcodes.STRING_LENGTH) { var3 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; if (var3 != null) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.length(); @@ -147,14 +148,14 @@ public class class211 { } return 1; - } else if (var0 == 4118) { + } else if (var0 == ScriptOpcodes.SUBSTRING) { var3 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; RouteStrategy.Interpreter_intStackSize -= 2; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var8 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = var3.substring(var4, var8); return 1; - } else if (var0 == 4119) { + } else if (var0 == ScriptOpcodes.REMOVETAGS) { var3 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; StringBuilder var11 = new StringBuilder(var3.length()); boolean var12 = false; @@ -172,12 +173,12 @@ public class class211 { Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = var11.toString(); return 1; - } else if (var0 == 4120) { + } else if (var0 == ScriptOpcodes.STRING_INDEXOF_CHAR) { var3 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; var4 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.indexOf(var4); return 1; - } else if (var0 == 4121) { + } else if (var0 == ScriptOpcodes.STRING_INDEXOF_STRING) { Interpreter.Interpreter_stringStackSize -= 2; var3 = Interpreter.Interpreter_stringStack[Interpreter.Interpreter_stringStackSize]; var5 = Interpreter.Interpreter_stringStack[Interpreter.Interpreter_stringStackSize + 1]; diff --git a/runescape-client/src/main/java/class229.java b/runescape-client/src/main/java/class229.java index 6162f555a4..20a523668f 100644 --- a/runescape-client/src/main/java/class229.java +++ b/runescape-client/src/main/java/class229.java @@ -1,6 +1,7 @@ import net.runelite.mapping.Export; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("hz") public class class229 { @@ -36,7 +37,7 @@ public class class229 { garbageValue = "1886084106" ) static int method4513(int var0, Script var1, boolean var2) { - if (var0 == 6200) { + if (var0 == ScriptOpcodes.VIEWPORT_SETFOV) { RouteStrategy.Interpreter_intStackSize -= 2; Client.field130 = (short)class161.method3395(Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]); if (Client.field130 <= 0) { @@ -49,7 +50,7 @@ public class class229 { } return 1; - } else if (var0 == 6201) { + } else if (var0 == ScriptOpcodes.VIEWPORT_SETZOOM) { RouteStrategy.Interpreter_intStackSize -= 2; Client.field150 = (short)Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; if (Client.field150 <= 0) { @@ -62,7 +63,7 @@ public class class229 { } return 1; - } else if (var0 == 6202) { + } else if (var0 == ScriptOpcodes.VIEWPORT_CLAMPFOV) { RouteStrategy.Interpreter_intStackSize -= 4; Client.field135 = (short)Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; if (Client.field135 <= 0) { @@ -89,7 +90,7 @@ public class class229 { } return 1; - } else if (var0 == 6203) { + } else if (var0 == ScriptOpcodes.VIEWPORT_GETEFFECTIVESIZE) { if (Client.viewportWidget != null) { FontName.setViewportShape(0, 0, Client.viewportWidget.width, Client.viewportWidget.height, false); Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.viewportWidth; @@ -100,11 +101,11 @@ public class class229 { } return 1; - } else if (var0 == 6204) { + } else if (var0 == ScriptOpcodes.VIEWPORT_GETZOOM) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.field150; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.field149; return 1; - } else if (var0 == 6205) { + } else if (var0 == ScriptOpcodes.VIEWPORT_GETFOV) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = class30.method571(Client.field130); Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = class30.method571(Client.field131); return 1; diff --git a/runescape-client/src/main/java/class248.java b/runescape-client/src/main/java/class248.java index b3ada630e4..f3e00fb049 100644 --- a/runescape-client/src/main/java/class248.java +++ b/runescape-client/src/main/java/class248.java @@ -2,6 +2,7 @@ import java.util.HashMap; import net.runelite.mapping.ObfuscatedGetter; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("iu") public class class248 { @@ -191,69 +192,69 @@ public class class248 { ) static int method4741(int var0, Script var1, boolean var2) { int var3; - if (var0 == 3903) { + if (var0 == ScriptOpcodes.STOCKMARKET_GETOFFERTYPE) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.grandExchangeOffers[var3].type(); return 1; - } else if (var0 == 3904) { + } else if (var0 == ScriptOpcodes.STOCKMARKET_GETOFFERITEM) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.grandExchangeOffers[var3].id; return 1; - } else if (var0 == 3905) { + } else if (var0 == ScriptOpcodes.STOCKMARKET_GETOFFERPRICE) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.grandExchangeOffers[var3].unitPrice; return 1; - } else if (var0 == 3906) { + } else if (var0 == ScriptOpcodes.STOCKMARKET_GETOFFERCOUNT) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.grandExchangeOffers[var3].totalQuantity; return 1; - } else if (var0 == 3907) { + } else if (var0 == ScriptOpcodes.STOCKMARKET_GETOFFERCOMPLETEDCOUNT) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.grandExchangeOffers[var3].currentQuantity; return 1; - } else if (var0 == 3908) { + } else if (var0 == ScriptOpcodes.STOCKMARKET_GETOFFERCOMPLETEDGOLD) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.grandExchangeOffers[var3].currentPrice; return 1; } else { int var4; - if (var0 == 3910) { + if (var0 == ScriptOpcodes.STOCKMARKET_ISOFFEREMPTY) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var4 = Client.grandExchangeOffers[var3].status(); Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var4 == 0 ? 1 : 0; return 1; - } else if (var0 == 3911) { + } else if (var0 == ScriptOpcodes.STOCKMARKET_ISOFFERSTABLE) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var4 = Client.grandExchangeOffers[var3].status(); Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var4 == 2 ? 1 : 0; return 1; - } else if (var0 == 3912) { + } else if (var0 == ScriptOpcodes.STOCKMARKET_ISOFFERFINISHED) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var4 = Client.grandExchangeOffers[var3].status(); Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var4 == 5 ? 1 : 0; return 1; - } else if (var0 == 3913) { + } else if (var0 == ScriptOpcodes.STOCKMARKET_ISOFFERADDING) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var4 = Client.grandExchangeOffers[var3].status(); Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var4 == 1 ? 1 : 0; return 1; } else { boolean var5; - if (var0 == 3914) { + if (var0 == ScriptOpcodes.TRADINGPOST_SORTBY_NAME) { var5 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; if (FloorDecoration.grandExchangeEvents != null) { FloorDecoration.grandExchangeEvents.sort(GrandExchangeEvents.field373, var5); } return 1; - } else if (var0 == 3915) { + } else if (var0 == ScriptOpcodes.TRADINGPOST_SORTBY_PRICE) { var5 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; if (FloorDecoration.grandExchangeEvents != null) { FloorDecoration.grandExchangeEvents.sort(GrandExchangeEvents.field372, var5); } return 1; - } else if (var0 == 3916) { + } else if (var0 == ScriptOpcodes.TRADINGPOST_SORTFILTERBY_WORLD) { RouteStrategy.Interpreter_intStackSize -= 2; var5 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize] == 1; boolean var13 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1] == 1; @@ -263,41 +264,41 @@ public class class248 { } return 1; - } else if (var0 == 3917) { + } else if (var0 == ScriptOpcodes.TRADINGPOST_SORTBY_AGE) { var5 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; if (FloorDecoration.grandExchangeEvents != null) { FloorDecoration.grandExchangeEvents.sort(GrandExchangeEvents.field371, var5); } return 1; - } else if (var0 == 3918) { + } else if (var0 == ScriptOpcodes.TRADINGPOST_SORTBY_COUNT) { var5 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; if (FloorDecoration.grandExchangeEvents != null) { FloorDecoration.grandExchangeEvents.sort(GrandExchangeEvents.field374, var5); } return 1; - } else if (var0 == 3919) { + } else if (var0 == ScriptOpcodes.TRADINGPOST_GETTOTALOFFERS) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = FloorDecoration.grandExchangeEvents == null ? 0 : FloorDecoration.grandExchangeEvents.events.size(); return 1; } else { GrandExchangeEvent var6; - if (var0 == 3920) { + if (var0 == ScriptOpcodes.TRADINGPOST_GETOFFERWORLD) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var6 = (GrandExchangeEvent)FloorDecoration.grandExchangeEvents.events.get(var3); Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var6.world; return 1; - } else if (var0 == 3921) { + } else if (var0 == ScriptOpcodes.TRADINGPOST_GETOFFERNAME) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var6 = (GrandExchangeEvent)FloorDecoration.grandExchangeEvents.events.get(var3); Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = var6.method119(); return 1; - } else if (var0 == 3922) { + } else if (var0 == ScriptOpcodes.TRADINGPOST_GETOFFERPREVIOUSNAME) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var6 = (GrandExchangeEvent)FloorDecoration.grandExchangeEvents.events.get(var3); Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = var6.method120(); return 1; - } else if (var0 == 3923) { + } else if (var0 == ScriptOpcodes.TRADINGPOST_GETOFFERAGE) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var6 = (GrandExchangeEvent)FloorDecoration.grandExchangeEvents.events.get(var3); long var7 = class203.currentTimeMs() - class15.field1113 - var6.field370; @@ -307,17 +308,17 @@ public class class248 { String var12 = var9 + ":" + var10 / 10 + var10 % 10 + ":" + var11 / 10 + var11 % 10; Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = var12; return 1; - } else if (var0 == 3924) { + } else if (var0 == ScriptOpcodes.TRADINGPOST_GETOFFERCOUNT) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var6 = (GrandExchangeEvent)FloorDecoration.grandExchangeEvents.events.get(var3); Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var6.grandExchangeOffer.totalQuantity; return 1; - } else if (var0 == 3925) { + } else if (var0 == ScriptOpcodes.TRADINGPOST_GETOFFERPRICE) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var6 = (GrandExchangeEvent)FloorDecoration.grandExchangeEvents.events.get(var3); Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var6.grandExchangeOffer.unitPrice; return 1; - } else if (var0 == 3926) { + } else if (var0 == ScriptOpcodes.TRADINGPOST_GETOFFERITEM) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var6 = (GrandExchangeEvent)FloorDecoration.grandExchangeEvents.events.get(var3); Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var6.grandExchangeOffer.id; diff --git a/runescape-client/src/main/java/class31.java b/runescape-client/src/main/java/class31.java index e985580e29..356692fe17 100644 --- a/runescape-client/src/main/java/class31.java +++ b/runescape-client/src/main/java/class31.java @@ -2,6 +2,7 @@ import net.runelite.mapping.Export; import net.runelite.mapping.ObfuscatedGetter; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("ac") public class class31 { @@ -55,12 +56,12 @@ public class class31 { garbageValue = "130306081" ) static int method573(int var0, Script var1, boolean var2) { - if (var0 == 6500) { + if (var0 == ScriptOpcodes.WORLDLIST_FETCH) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = ClientParameter.loadWorlds() ? 1 : 0; return 1; } else { World var3; - if (var0 == 6501) { + if (var0 == ScriptOpcodes.WORLDLIST_START) { var3 = class190.method3672(); if (var3 != null) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.id; @@ -79,7 +80,7 @@ public class class31 { } return 1; - } else if (var0 == 6502) { + } else if (var0 == ScriptOpcodes.WORLDLIST_NEXT) { var3 = Fonts.method5647(); if (var3 != null) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var3.id; @@ -102,7 +103,7 @@ public class class31 { World var4; int var5; int var6; - if (var0 == 6506) { + if (var0 == ScriptOpcodes.WORLDLIST_SPECIFIC) { var6 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var4 = null; @@ -130,7 +131,7 @@ public class class31 { } return 1; - } else if (var0 == 6507) { + } else if (var0 == ScriptOpcodes.WORLDLIST_SORT) { RouteStrategy.Interpreter_intStackSize -= 4; var6 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; boolean var9 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1] == 1; @@ -139,13 +140,13 @@ public class class31 { WorldMapSectionType.method248(var6, var9, var5, var10); return 1; } else if (var0 != 6511) { - if (var0 == 6512) { + if (var0 == ScriptOpcodes.SETFOLLOWEROPSLOWPRIORITY) { Client.followerOpsLowPriority = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; return 1; } else { int var7; ParamKeyDefinition var8; - if (var0 == 6513) { + if (var0 == ScriptOpcodes.NC_PARAM) { RouteStrategy.Interpreter_intStackSize -= 2; var6 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var7 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; @@ -157,7 +158,7 @@ public class class31 { } return 1; - } else if (var0 == 6514) { + } else if (var0 == ScriptOpcodes.LC_PARAM) { RouteStrategy.Interpreter_intStackSize -= 2; var6 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var7 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; @@ -169,7 +170,7 @@ public class class31 { } return 1; - } else if (var0 == 6515) { + } else if (var0 == ScriptOpcodes.OC_PARAM) { RouteStrategy.Interpreter_intStackSize -= 2; var6 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var7 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; @@ -181,7 +182,7 @@ public class class31 { } return 1; - } else if (var0 == 6516) { + } else if (var0 == ScriptOpcodes.STRUCT_PARAM) { RouteStrategy.Interpreter_intStackSize -= 2; var6 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var7 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; @@ -193,10 +194,10 @@ public class class31 { } return 1; - } else if (var0 == 6518) { + } else if (var0 == ScriptOpcodes.ON_MOBILE) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.field162 ? 1 : 0; return 1; - } else if (var0 == 6519) { + } else if (var0 == ScriptOpcodes.CLIENTTYPE) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.clientType & 3; return 1; } else if (var0 == 6520) { @@ -211,13 +212,13 @@ public class class31 { --Interpreter.Interpreter_stringStackSize; --RouteStrategy.Interpreter_intStackSize; return 1; - } else if (var0 == 6524) { + } else if (var0 == ScriptOpcodes.BATTERYLEVEL) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = -1; return 1; - } else if (var0 == 6525) { + } else if (var0 == ScriptOpcodes.BATTERYCHARGING) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = 1; return 1; - } else if (var0 == 6526) { + } else if (var0 == ScriptOpcodes.WIFIAVAILABLE) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = 1; return 1; } else { diff --git a/runescape-client/src/main/java/class32.java b/runescape-client/src/main/java/class32.java index d77052c7ea..d0224db34b 100644 --- a/runescape-client/src/main/java/class32.java +++ b/runescape-client/src/main/java/class32.java @@ -1,6 +1,7 @@ import net.runelite.mapping.Export; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("ay") public class class32 { @@ -28,12 +29,12 @@ public class class32 { } class22.method295(var3); - if (var0 != 1200 && var0 != 1205 && var0 != 1212) { - if (var0 == 1201) { + if (var0 != ScriptOpcodes.CC_SETOBJECT && var0 != ScriptOpcodes.CC_SETOBJECT_NONUM && var0 != ScriptOpcodes.CC_SETOBJECT_ALWAYS_NUM) { + if (var0 == ScriptOpcodes.CC_SETNPCHEAD) { var3.modelType = 2; var3.modelId = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; return 1; - } else if (var0 == 1202) { + } else if (var0 == ScriptOpcodes.CC_SETPLAYERHEAD_SELF) { var3.modelType = 3; var3.modelId = Canvas.localPlayer.appearance.getChatHeadId(); return 1; @@ -53,9 +54,9 @@ public class class32 { var3.modelOffsetX = var6.offsetX2d; var3.modelOffsetY = var6.offsetY2d; var3.modelZoom = var6.zoom2d; - if (var0 == 1205) { + if (var0 == ScriptOpcodes.CC_SETOBJECT_NONUM) { var3.itemQuantityMode = 0; - } else if (var0 == 1212 | 1 == var6.isStackable) { + } else if (var0 == ScriptOpcodes.CC_SETOBJECT_ALWAYS_NUM | 1 == var6.isStackable) { var3.itemQuantityMode = 1; } else { var3.itemQuantityMode = 2; diff --git a/runescape-client/src/main/java/class4.java b/runescape-client/src/main/java/class4.java index 5aae33d902..11a1a4bf22 100644 --- a/runescape-client/src/main/java/class4.java +++ b/runescape-client/src/main/java/class4.java @@ -1,5 +1,6 @@ import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("o") final class class4 implements class0 { @@ -61,15 +62,15 @@ final class class4 implements class0 { ) static int method54(int var0, Script var1, boolean var2) { String var3; - if (var0 == 3100) { + if (var0 == ScriptOpcodes.MES) { var3 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; WorldMapIcon1.method219(0, "", var3); return 1; - } else if (var0 == 3101) { + } else if (var0 == ScriptOpcodes.ANIM) { RouteStrategy.Interpreter_intStackSize -= 2; class234.method4534(Canvas.localPlayer, Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize], Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]); return 1; - } else if (var0 == 3103) { + } else if (var0 == ScriptOpcodes.IF_CLOSE) { if (!Interpreter.field424) { Interpreter.field423 = true; } @@ -78,7 +79,7 @@ final class class4 implements class0 { } else { int var4; PacketBufferNode var5; - if (var0 == 3104) { + if (var0 == ScriptOpcodes.RESUME_COUNTDIALOG) { var3 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; var4 = 0; if (UserComparator4.method3336(var3)) { @@ -89,14 +90,14 @@ final class class4 implements class0 { var5.packetBuffer.writeInt(var4); Client.packetWriter.method241(var5); return 1; - } else if (var0 == 3105) { + } else if (var0 == ScriptOpcodes.RESUME_NAMEDIALOG) { var3 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; var5 = Interpreter.method1915(ClientPacket.field317, Client.packetWriter.isaacCipher); var5.packetBuffer.writeByte(var3.length() + 1); var5.packetBuffer.writeStringCp1252NullTerminated(var3); Client.packetWriter.method241(var5); return 1; - } else if (var0 == 3106) { + } else if (var0 == ScriptOpcodes.RESUME_STRINGDIALOG) { var3 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; var5 = Interpreter.method1915(ClientPacket.field230, Client.packetWriter.isaacCipher); var5.packetBuffer.writeByte(var3.length() + 1); @@ -106,12 +107,12 @@ final class class4 implements class0 { } else { String var6; int var7; - if (var0 == 3107) { + if (var0 == ScriptOpcodes.OPPLAYER) { var7 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var6 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; WorldMapSection2.method583(var7, var6); return 1; - } else if (var0 == 3108) { + } else if (var0 == ScriptOpcodes.IF_DRAGPICKUP) { RouteStrategy.Interpreter_intStackSize -= 3; var7 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; @@ -119,37 +120,37 @@ final class class4 implements class0 { Widget var11 = Huffman.getWidget(var13); Players.clickWidget(var11, var7, var4); return 1; - } else if (var0 == 3109) { + } else if (var0 == ScriptOpcodes.CC_DRAGPICKUP) { RouteStrategy.Interpreter_intStackSize -= 2; var7 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]; Widget var12 = var2 ? WorldMapIcon1.field1030 : class12.field1111; Players.clickWidget(var12, var7, var4); return 1; - } else if (var0 == 3110) { + } else if (var0 == ScriptOpcodes.MOUSECAM) { AbstractRasterProvider.mouseCam = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; return 1; - } else if (var0 == 3111) { + } else if (var0 == ScriptOpcodes.GETREMOVEROOFS) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = ReflectionCheck.clientPreferences.roofsHidden ? 1 : 0; return 1; - } else if (var0 == 3112) { + } else if (var0 == ScriptOpcodes.SETREMOVEROOFS) { ReflectionCheck.clientPreferences.roofsHidden = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; WorldMapSection0.savePreferences(); return 1; } else { boolean var8; - if (var0 == 3113) { + if (var0 == ScriptOpcodes.OPENURL) { var3 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]; var8 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; WorldMapCacheName.method635(var3, var8, false); return 1; - } else if (var0 == 3115) { + } else if (var0 == ScriptOpcodes.RESUME_OBJDIALOG) { var7 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var5 = Interpreter.method1915(ClientPacket.field264, Client.packetWriter.isaacCipher); var5.packetBuffer.writeShort(var7); Client.packetWriter.method241(var5); return 1; - } else if (var0 == 3116) { + } else if (var0 == ScriptOpcodes.BUG_REPORT) { var7 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_stringStackSize -= 2; var6 = Interpreter.Interpreter_stringStack[Interpreter.Interpreter_stringStackSize]; @@ -167,13 +168,13 @@ final class class4 implements class0 { Client.packetWriter.method241(var9); return 1; } - } else if (var0 == 3117) { + } else if (var0 == ScriptOpcodes.SETSHIFTCLICKDROP) { Client.shiftClickDrop = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; return 1; - } else if (var0 == 3118) { + } else if (var0 == ScriptOpcodes.SETSHOWMOUSEOVERTEXT) { Client.showMouseOverText = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; return 1; - } else if (var0 == 3119) { + } else if (var0 == ScriptOpcodes.RENDERSELF) { Client.renderSelf = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; return 1; } else if (var0 == 3120) { @@ -211,16 +212,16 @@ final class class4 implements class0 { } else if (var0 == 3124) { Client.field210 = 0; return 1; - } else if (var0 == 3125) { + } else if (var0 == ScriptOpcodes.SETSHOWMOUSECROSS) { Client.showMouseCross = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; return 1; - } else if (var0 == 3126) { + } else if (var0 == ScriptOpcodes.SETSHOWLOADINGMESSAGES) { Client.showLoadingMessages = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; return 1; - } else if (var0 == 3127) { + } else if (var0 == ScriptOpcodes.SETTAPTODROP) { WorldMapAreaData.method705(Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1); return 1; - } else if (var0 == 3128) { + } else if (var0 == ScriptOpcodes.GETTAPTODROP) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = class206.method4028() ? 1 : 0; return 1; } else if (var0 == 3129) { @@ -234,7 +235,7 @@ final class class4 implements class0 { } else if (var0 == 3131) { --RouteStrategy.Interpreter_intStackSize; return 1; - } else if (var0 == 3132) { + } else if (var0 == ScriptOpcodes.GETCANVASSIZE) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = SoundCache.canvasWidth; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Huffman.canvasHeight; return 1; @@ -264,15 +265,15 @@ final class class4 implements class0 { Client.field151 = 3; Client.field153 = var2 ? WorldMapIcon1.field1030.id : class12.field1111.id; return 1; - } else if (var0 == 3141) { + } else if (var0 == ScriptOpcodes.SETHIDEUSERNAME) { var8 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; ReflectionCheck.clientPreferences.hideUsername = var8; WorldMapSection0.savePreferences(); return 1; - } else if (var0 == 3142) { + } else if (var0 == ScriptOpcodes.GETHIDEUSERNAME) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = ReflectionCheck.clientPreferences.hideUsername ? 1 : 0; return 1; - } else if (var0 == 3143) { + } else if (var0 == ScriptOpcodes.SETREMEMBERUSERNAME) { var8 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; Client.Login_isUsernameRemembered = var8; if (!var8) { @@ -281,7 +282,7 @@ final class class4 implements class0 { } return 1; - } else if (var0 == 3144) { + } else if (var0 == ScriptOpcodes.GETREMEMBERUSERNAME) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.Login_isUsernameRemembered ? 1 : 0; return 1; } else if (var0 == 3145) { diff --git a/runescape-client/src/main/java/class54.java b/runescape-client/src/main/java/class54.java index e4f0932858..c295c9c36d 100644 --- a/runescape-client/src/main/java/class54.java +++ b/runescape-client/src/main/java/class54.java @@ -1,6 +1,7 @@ import net.runelite.mapping.ObfuscatedGetter; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; +import net.runelite.rs.ScriptOpcodes; @ObfuscatedName("bs") public final class class54 { @@ -639,7 +640,7 @@ public final class class54 { return 1; } else { WorldMapArea var4; - if (var0 == 6601) { + if (var0 == ScriptOpcodes.WORLDMAP_GETMAPNAME) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; String var14 = ""; var4 = BufferedFile.worldMap().getMapArea(var3); @@ -649,45 +650,45 @@ public final class class54 { Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = var14; return 1; - } else if (var0 == 6602) { + } else if (var0 == ScriptOpcodes.WORLDMAP_SETMAP) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; BufferedFile.worldMap().setCurrentMapAreaId(var3); return 1; - } else if (var0 == 6603) { + } else if (var0 == ScriptOpcodes.WORLDMAP_GETZOOM) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = BufferedFile.worldMap().getZoomLevel(); return 1; - } else if (var0 == 6604) { + } else if (var0 == ScriptOpcodes.WORLDMAP_SETZOOM) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; BufferedFile.worldMap().setZoomLevel(var3); return 1; - } else if (var0 == 6605) { + } else if (var0 == ScriptOpcodes.WORLDMAP_ISLOADED) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = BufferedFile.worldMap().isCacheLoaded() ? 1 : 0; return 1; } else { TileLocation var5; - if (var0 == 6606) { + if (var0 == ScriptOpcodes.WORLDMAP_JUMPTODISPLAYCOORD) { var5 = new TileLocation(Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]); BufferedFile.worldMap().setWorldMapPositionTarget(var5.x, var5.y); return 1; - } else if (var0 == 6607) { + } else if (var0 == ScriptOpcodes.WORLDMAP_JUMPTODISPLAYCOORD_INSTANT) { var5 = new TileLocation(Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]); BufferedFile.worldMap().method371(var5.x, var5.y); return 1; - } else if (var0 == 6608) { + } else if (var0 == ScriptOpcodes.WORLDMAP_JUMPTOSOURCECOORD) { var5 = new TileLocation(Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]); BufferedFile.worldMap().method372(var5.plane, var5.x, var5.y); return 1; - } else if (var0 == 6609) { + } else if (var0 == ScriptOpcodes.WORLDMAP_JUMPTOSOURCECOORD_INSTANT) { var5 = new TileLocation(Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]); BufferedFile.worldMap().method373(var5.plane, var5.x, var5.y); return 1; - } else if (var0 == 6610) { + } else if (var0 == ScriptOpcodes.WORLDMAP_GETDISPLAYPOSITION) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = BufferedFile.worldMap().method374(); Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = BufferedFile.worldMap().method375(); return 1; } else { WorldMapArea var6; - if (var0 == 6611) { + if (var0 == ScriptOpcodes.WORLDMAP_GETCONFIGORIGIN) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var6 = BufferedFile.worldMap().getMapArea(var3); if (var6 == null) { @@ -697,7 +698,7 @@ public final class class54 { } return 1; - } else if (var0 == 6612) { + } else if (var0 == ScriptOpcodes.WORLDMAP_GETCONFIGSIZE) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var6 = BufferedFile.worldMap().getMapArea(var3); if (var6 == null) { @@ -709,7 +710,7 @@ public final class class54 { } return 1; - } else if (var0 == 6613) { + } else if (var0 == ScriptOpcodes.WORLDMAP_GETCONFIGBOUNDS) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var6 = BufferedFile.worldMap().getMapArea(var3); if (var6 == null) { @@ -725,7 +726,7 @@ public final class class54 { } return 1; - } else if (var0 == 6614) { + } else if (var0 == ScriptOpcodes.WORLDMAP_GETCONFIGZOOM) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var6 = BufferedFile.worldMap().getMapArea(var3); if (var6 == null) { @@ -746,10 +747,10 @@ public final class class54 { } return 1; - } else if (var0 == 6616) { + } else if (var0 == ScriptOpcodes.WORLDMAP_GETCURRENTMAP) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = BufferedFile.worldMap().currentMapAreaId(); return 1; - } else if (var0 == 6617) { + } else if (var0 == ScriptOpcodes.WORLDMAP_GETDISPLAYCOORD) { var5 = new TileLocation(Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]); var6 = BufferedFile.worldMap().getCurrentMapArea(); if (var6 == null) { @@ -801,7 +802,7 @@ public final class class54 { var8 = new TileLocation(Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]); TotalQuantityComparator.method96(var3, var8, true); return 1; - } else if (var0 == 6621) { + } else if (var0 == ScriptOpcodes.WORLDMAP_COORDINMAP) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var8 = new TileLocation(Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1]); @@ -813,7 +814,7 @@ public final class class54 { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var4.containsCoord(var8.plane, var8.x, var8.y) ? 1 : 0; return 1; } - } else if (var0 == 6622) { + } else if (var0 == ScriptOpcodes.WORLDMAP_GETSIZE) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = BufferedFile.worldMap().method377(); Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = BufferedFile.worldMap().method378(); return 1; @@ -841,47 +842,47 @@ public final class class54 { return 1; } else { boolean var9; - if (var0 == 6628) { + if (var0 == ScriptOpcodes.WORLDMAP_PERPETUALFLASH) { var9 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; BufferedFile.worldMap().perpetualFlash(var9); return 1; - } else if (var0 == 6629) { + } else if (var0 == ScriptOpcodes.WORLDMAP_FLASHELEMENT) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; BufferedFile.worldMap().flashElement(var3); return 1; - } else if (var0 == 6630) { + } else if (var0 == ScriptOpcodes.WORLDMAP_FLASHELEMENTCATEGORY) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; BufferedFile.worldMap().flashCategory(var3); return 1; - } else if (var0 == 6631) { + } else if (var0 == ScriptOpcodes.WORLDMAP_STOPCURRENTFLASHES) { BufferedFile.worldMap().stopCurrentFlashes(); return 1; - } else if (var0 == 6632) { + } else if (var0 == ScriptOpcodes.WORLDMAP_DISABLEELEMENTS) { var9 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize] == 1; BufferedFile.worldMap().setElementsEnabled(var9); return 1; } else { boolean var10; - if (var0 == 6633) { + if (var0 == ScriptOpcodes.WORLDMAP_DISABLEELEMENT) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var10 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1] == 1; BufferedFile.worldMap().disableElement(var3, var10); return 1; - } else if (var0 == 6634) { + } else if (var0 == ScriptOpcodes.WORLDMAP_DISABLEELEMENTCATEGORY) { RouteStrategy.Interpreter_intStackSize -= 2; var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize]; var10 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1] == 1; BufferedFile.worldMap().disableCategory(var3, var10); return 1; - } else if (var0 == 6635) { + } else if (var0 == ScriptOpcodes.WORLDMAP_GETDISABLEELEMENTS) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = BufferedFile.worldMap().getElementsEnabled() ? 1 : 0; return 1; - } else if (var0 == 6636) { + } else if (var0 == ScriptOpcodes.WORLDMAP_GETDISABLEELEMENT) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = BufferedFile.worldMap().isElementDisabled(var3) ? 1 : 0; return 1; - } else if (var0 == 6637) { + } else if (var0 == ScriptOpcodes.WORLDMAP_GETDISABLEELEMENTCATEGORY) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = BufferedFile.worldMap().isCategoryDisabled(var3) ? 1 : 0; return 1; @@ -899,7 +900,7 @@ public final class class54 { return 1; } else { AbstractWorldMapIcon var11; - if (var0 == 6639) { + if (var0 == ScriptOpcodes.WORLDMAP_LISTELEMENT_START) { var11 = BufferedFile.worldMap().iconStart(); if (var11 == null) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = -1; @@ -910,7 +911,7 @@ public final class class54 { } return 1; - } else if (var0 == 6640) { + } else if (var0 == ScriptOpcodes.WORLDMAP_LISTELEMENT_NEXT) { var11 = BufferedFile.worldMap().iconNext(); if (var11 == null) { Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = -1; @@ -923,7 +924,7 @@ public final class class54 { return 1; } else { WorldMapElement var12; - if (var0 == 6693) { + if (var0 == ScriptOpcodes.MEC_TEXT) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var12 = ViewportMouse.getWorldMapElement(var3); if (var12.field1021 == null) { @@ -933,12 +934,12 @@ public final class class54 { } return 1; - } else if (var0 == 6694) { + } else if (var0 == ScriptOpcodes.MEC_TEXTSIZE) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var12 = ViewportMouse.getWorldMapElement(var3); Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = var12.textSize; return 1; - } else if (var0 == 6695) { + } else if (var0 == ScriptOpcodes.MEC_CATEGORY) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var12 = ViewportMouse.getWorldMapElement(var3); if (var12 == null) { @@ -948,7 +949,7 @@ public final class class54 { } return 1; - } else if (var0 == 6696) { + } else if (var0 == ScriptOpcodes.MEC_SPRITE) { var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize]; var12 = ViewportMouse.getWorldMapElement(var3); if (var12 == null) { diff --git a/runescape-client/src/main/java/net/runelite/rs/ScriptOpcodes.java b/runescape-client/src/main/java/net/runelite/rs/ScriptOpcodes.java new file mode 100644 index 0000000000..8e3084a0a7 --- /dev/null +++ b/runescape-client/src/main/java/net/runelite/rs/ScriptOpcodes.java @@ -0,0 +1,472 @@ +package net.runelite.rs; + +public class ScriptOpcodes { + public static final int ICONST = 0; + public static final int GET_VARP = 1; + public static final int SET_VARP = 2; + public static final int SCONST = 3; + public static final int JUMP = 6; + public static final int IF_ICMPNE = 7; + public static final int IF_ICMPEQ = 8; + public static final int IF_ICMPLT = 9; + public static final int IF_ICMPGT = 10; + public static final int RETURN = 21; + public static final int GET_VARBIT = 25; + public static final int SET_VARBIT = 27; + public static final int IF_ICMPLE = 31; + public static final int IF_ICMPGE = 32; + public static final int ILOAD = 33; + public static final int ISTORE = 34; + public static final int SLOAD = 35; + public static final int SSTORE = 36; + public static final int JOIN_STRING = 37; + public static final int POP_INT = 38; + public static final int POP_STRING = 39; + public static final int INVOKE = 40; + public static final int GET_VARC_INT = 42; + public static final int SET_VARC_INT = 43; + public static final int DEFINE_ARRAY = 44; + public static final int GET_ARRAY_INT = 45; + public static final int SET_ARRAY_INT = 46; + public static final int GET_VARC_STRING_OLD = 47; + public static final int SET_VARC_STRING_OLD = 48; + public static final int GET_VARC_STRING = 49; + public static final int SET_VARC_STRING = 50; + public static final int SWITCH = 60; + public static final int CC_CREATE = 100; + public static final int CC_DELETE = 101; + public static final int CC_DELETEALL = 102; + public static final int CC_FIND = 200; + public static final int IF_FIND = 201; + public static final int CC_SETPOSITION = 1000; + public static final int CC_SETSIZE = 1001; + public static final int CC_SETHIDE = 1003; + public static final int CC_SETNOCLICKTHROUGH = 1005; + public static final int CC_SETSCROLLPOS = 1100; + public static final int CC_SETCOLOUR = 1101; + public static final int CC_SETFILL = 1102; + public static final int CC_SETTRANS = 1103; + public static final int CC_SETLINEWID = 1104; + public static final int CC_SETGRAPHIC = 1105; + public static final int CC_SET2DANGLE = 1106; + public static final int CC_SETTILING = 1107; + public static final int CC_SETMODEL = 1108; + public static final int CC_SETMODELANGLE = 1109; + public static final int CC_SETMODELANIM = 1110; + public static final int CC_SETMODELORTHOG = 1111; + public static final int CC_SETTEXT = 1112; + public static final int CC_SETTEXTFONT = 1113; + public static final int CC_SETTEXTALIGN = 1114; + public static final int CC_SETTEXTSHADOW = 1115; + public static final int CC_SETOUTLINE = 1116; + public static final int CC_SETGRAPHICSHADOW = 1117; + public static final int CC_SETVFLIP = 1118; + public static final int CC_SETHFLIP = 1119; + public static final int CC_SETSCROLLSIZE = 1120; + public static final int CC_RESUME_PAUSEBUTTON = 1121; + public static final int CC_SETFILLCOLOUR = 1123; + public static final int CC_SETLINEDIRECTION = 1126; + public static final int CC_SETOBJECT = 1200; + public static final int CC_SETNPCHEAD = 1201; + public static final int CC_SETPLAYERHEAD_SELF = 1202; + public static final int CC_SETOBJECT_NONUM = 1205; + public static final int CC_SETOBJECT_ALWAYS_NUM = 1212; + public static final int CC_SETOP = 1300; + public static final int CC_SETDRAGGABLE = 1301; + public static final int CC_SETDRAGGABLEBEHAVIOR = 1302; + public static final int CC_SETDRAGDEADZONE = 1303; + public static final int CC_SETDRAGDEADTIME = 1304; + public static final int CC_SETOPBASE = 1305; + public static final int CC_SETTARGETVERB = 1306; + public static final int CC_CLEAROPS = 1307; + public static final int CC_SETONCLICK = 1400; + public static final int CC_SETONHOLD = 1401; + public static final int CC_SETONRELEASE = 1402; + public static final int CC_SETONMOUSEOVER = 1403; + public static final int CC_SETONMOUSELEAVE = 1404; + public static final int CC_SETONDRAG = 1405; + public static final int CC_SETONTARGETLEAVE = 1406; + public static final int CC_SETONVARTRANSMIT = 1407; + public static final int CC_SETONTIMER = 1408; + public static final int CC_SETONOP = 1409; + public static final int CC_SETONDRAGCOMPLETE = 1410; + public static final int CC_SETONCLICKREPEAT = 1411; + public static final int CC_SETONMOUSEREPEAT = 1412; + public static final int CC_SETONINVTRANSMIT = 1414; + public static final int CC_SETONSTATTRANSMIT = 1415; + public static final int CC_SETONTARGETENTER = 1416; + public static final int CC_SETONSCROLLWHEEL = 1417; + public static final int CC_SETONCHATTRANSMIT = 1418; + public static final int CC_SETONKEY = 1419; + public static final int CC_SETONFRIENDTRANSMIT = 1420; + public static final int CC_SETONCLANTRANSMIT = 1421; + public static final int CC_SETONMISCTRANSMIT = 1422; + public static final int CC_SETONDIALOGABORT = 1423; + public static final int CC_SETONSUBCHANGE = 1424; + public static final int CC_SETONSTOCKTRANSMIT = 1425; + public static final int CC_SETONRESIZE = 1427; + public static final int CC_GETX = 1500; + public static final int CC_GETY = 1501; + public static final int CC_GETWIDTH = 1502; + public static final int CC_GETHEIGHT = 1503; + public static final int CC_GETHIDE = 1504; + public static final int CC_GETLAYER = 1505; + public static final int CC_GETSCROLLX = 1600; + public static final int CC_GETSCROLLY = 1601; + public static final int CC_GETTEXT = 1602; + public static final int CC_GETSCROLLWIDTH = 1603; + public static final int CC_GETSCROLLHEIGHT = 1604; + public static final int CC_GETMODELZOOM = 1605; + public static final int CC_GETMODELANGLE_X = 1606; + public static final int CC_GETMODELANGLE_Z = 1607; + public static final int CC_GETMODELANGLE_Y = 1608; + public static final int CC_GETTRANS = 1609; + public static final int CC_GETCOLOUR = 1611; + public static final int CC_GETFILLCOLOUR = 1612; + public static final int CC_GETINVOBJECT = 1700; + public static final int CC_GETINVCOUNT = 1701; + public static final int CC_GETID = 1702; + public static final int CC_GETTARGETMASK = 1800; + public static final int CC_GETOP = 1801; + public static final int CC_GETOPBASE = 1802; + public static final int CC_CALLONRESIZE = 1927; + public static final int IF_SETPOSITION = 2000; + public static final int IF_SETSIZE = 2001; + public static final int IF_SETHIDE = 2003; + public static final int IF_SETNOCLICKTHROUGH = 2005; + public static final int IF_SETSCROLLPOS = 2100; + public static final int IF_SETCOLOUR = 2101; + public static final int IF_SETFILL = 2102; + public static final int IF_SETTRANS = 2103; + public static final int IF_SETLINEWID = 2104; + public static final int IF_SETGRAPHIC = 2105; + public static final int IF_SET2DANGLE = 2106; + public static final int IF_SETTILING = 2107; + public static final int IF_SETMODEL = 2108; + public static final int IF_SETMODELANGLE = 2109; + public static final int IF_SETMODELANIM = 2110; + public static final int IF_SETMODELORTHOG = 2111; + public static final int IF_SETTEXT = 2112; + public static final int IF_SETTEXTFONT = 2113; + public static final int IF_SETTEXTALIGN = 2114; + public static final int IF_SETTEXTSHADOW = 2115; + public static final int IF_SETOUTLINE = 2116; + public static final int IF_SETGRAPHICSHADOW = 2117; + public static final int IF_SETVFLIP = 2118; + public static final int IF_SETHFLIP = 2119; + public static final int IF_SETSCROLLSIZE = 2120; + public static final int IF_RESUME_PAUSEBUTTON = 2121; + public static final int IF_SETFILLCOLOUR = 2123; + public static final int IF_SETLINEDIRECTION = 2126; + public static final int IF_SETOBJECT = 2200; + public static final int IF_SETNPCHEAD = 2201; + public static final int IF_SETPLAYERHEAD_SELF = 2202; + public static final int IF_SETOBJECT_NONUM = 2205; + public static final int IF_SETOBJECT_ALWAYS_NUM = 2212; + public static final int IF_SETOP = 2300; + public static final int IF_SETDRAGGABLE = 2301; + public static final int IF_SETDRAGGABLEBEHAVIOR = 2302; + public static final int IF_SETDRAGDEADZONE = 2303; + public static final int IF_SETDRAGDEADTIME = 2304; + public static final int IF_SETOPBASE = 2305; + public static final int IF_SETTARGETVERB = 2306; + public static final int IF_CLEAROPS = 2307; + public static final int IF_SETOPKEY = 2350; + public static final int IF_SETOPTKEY = 2351; + public static final int IF_SETOPKEYRATE = 2352; + public static final int IF_SETOPTKEYRATE = 2353; + public static final int IF_SETOPKEYIGNOREHELD = 2354; + public static final int IF_SETOPTKEYIGNOREHELD = 2355; + public static final int IF_SETONCLICK = 2400; + public static final int IF_SETONHOLD = 2401; + public static final int IF_SETONRELEASE = 2402; + public static final int IF_SETONMOUSEOVER = 2403; + public static final int IF_SETONMOUSELEAVE = 2404; + public static final int IF_SETONDRAG = 2405; + public static final int IF_SETONTARGETLEAVE = 2406; + public static final int IF_SETONVARTRANSMIT = 2407; + public static final int IF_SETONTIMER = 2408; + public static final int IF_SETONOP = 2409; + public static final int IF_SETONDRAGCOMPLETE = 2410; + public static final int IF_SETONCLICKREPEAT = 2411; + public static final int IF_SETONMOUSEREPEAT = 2412; + public static final int IF_SETONINVTRANSMIT = 2414; + public static final int IF_SETONSTATTRANSMIT = 2415; + public static final int IF_SETONTARGETENTER = 2416; + public static final int IF_SETONSCROLLWHEEL = 2417; + public static final int IF_SETONCHATTRANSMIT = 2418; + public static final int IF_SETONKEY = 2419; + public static final int IF_SETONFRIENDTRANSMIT = 2420; + public static final int IF_SETONCLANTRANSMIT = 2421; + public static final int IF_SETONMISCTRANSMIT = 2422; + public static final int IF_SETONDIALOGABORT = 2423; + public static final int IF_SETONSUBCHANGE = 2424; + public static final int IF_SETONSTOCKTRANSMIT = 2425; + public static final int IF_SETONRESIZE = 2427; + public static final int IF_GETX = 2500; + public static final int IF_GETY = 2501; + public static final int IF_GETWIDTH = 2502; + public static final int IF_GETHEIGHT = 2503; + public static final int IF_GETHIDE = 2504; + public static final int IF_GETLAYER = 2505; + public static final int IF_GETSCROLLX = 2600; + public static final int IF_GETSCROLLY = 2601; + public static final int IF_GETTEXT = 2602; + public static final int IF_GETSCROLLWIDTH = 2603; + public static final int IF_GETSCROLLHEIGHT = 2604; + public static final int IF_GETMODELZOOM = 2605; + public static final int IF_GETMODELANGLE_X = 2606; + public static final int IF_GETMODELANGLE_Z = 2607; + public static final int IF_GETMODELANGLE_Y = 2608; + public static final int IF_GETTRANS = 2609; + public static final int IF_GETCOLOUR = 2611; + public static final int IF_GETFILLCOLOUR = 2612; + public static final int IF_GETINVOBJECT = 2700; + public static final int IF_GETINVCOUNT = 2701; + public static final int IF_HASSUB = 2702; + public static final int IF_GETTOP = 2706; + public static final int IF_GETTARGETMASK = 2800; + public static final int IF_GETOP = 2801; + public static final int IF_GETOPBASE = 2802; + public static final int IF_CALLONRESIZE = 2927; + public static final int MES = 3100; + public static final int ANIM = 3101; + public static final int IF_CLOSE = 3103; + public static final int RESUME_COUNTDIALOG = 3104; + public static final int RESUME_NAMEDIALOG = 3105; + public static final int RESUME_STRINGDIALOG = 3106; + public static final int OPPLAYER = 3107; + public static final int IF_DRAGPICKUP = 3108; + public static final int CC_DRAGPICKUP = 3109; + public static final int MOUSECAM = 3110; + public static final int GETREMOVEROOFS = 3111; + public static final int SETREMOVEROOFS = 3112; + public static final int OPENURL = 3113; + public static final int RESUME_OBJDIALOG = 3115; + public static final int BUG_REPORT = 3116; + public static final int SETSHIFTCLICKDROP = 3117; + public static final int SETSHOWMOUSEOVERTEXT = 3118; + public static final int RENDERSELF = 3119; + public static final int SETSHOWMOUSECROSS = 3125; + public static final int SETSHOWLOADINGMESSAGES = 3126; + public static final int SETTAPTODROP = 3127; + public static final int GETTAPTODROP = 3128; + public static final int GETCANVASSIZE = 3132; + public static final int SETHIDEUSERNAME = 3141; + public static final int GETHIDEUSERNAME = 3142; + public static final int SETREMEMBERUSERNAME = 3143; + public static final int GETREMEMBERUSERNAME = 3144; + public static final int SOUND_SYNTH = 3200; + public static final int SOUND_SONG = 3201; + public static final int SOUND_JINGLE = 3202; + public static final int CLIENTCLOCK = 3300; + public static final int INV_GETOBJ = 3301; + public static final int INV_GETNUM = 3302; + public static final int INV_TOTAL = 3303; + public static final int INV_SIZE = 3304; + public static final int STAT = 3305; + public static final int STAT_BASE = 3306; + public static final int STAT_XP = 3307; + public static final int COORD = 3308; + public static final int COORDX = 3309; + public static final int COORDZ = 3310; + public static final int COORDY = 3311; + public static final int MAP_MEMBERS = 3312; + public static final int INVOTHER_GETOBJ = 3313; + public static final int INVOTHER_GETNUM = 3314; + public static final int INVOTHER_TOTAL = 3315; + public static final int STAFFMODLEVEL = 3316; + public static final int REBOOTTIMER = 3317; + public static final int MAP_WORLD = 3318; + public static final int RUNENERGY_VISIBLE = 3321; + public static final int RUNWEIGHT_VISIBLE = 3322; + public static final int PLAYERMOD = 3323; + public static final int WORLDFLAGS = 3324; + public static final int MOVECOORD = 3325; + public static final int ENUM_STRING = 3400; + public static final int ENUM = 3408; + public static final int ENUM_GETOUTPUTCOUNT = 3411; + public static final int FRIEND_COUNT = 3600; + public static final int FRIEND_GETNAME = 3601; + public static final int FRIEND_GETWORLD = 3602; + public static final int FRIEND_GETRANK = 3603; + public static final int FRIEND_SETRANK = 3604; + public static final int FRIEND_ADD = 3605; + public static final int FRIEND_DEL = 3606; + public static final int IGNORE_ADD = 3607; + public static final int IGNORE_DEL = 3608; + public static final int FRIEND_TEST = 3609; + public static final int CLAN_GETCHATDISPLAYNAME = 3611; + public static final int CLAN_GETCHATCOUNT = 3612; + public static final int CLAN_GETCHATUSERNAME = 3613; + public static final int CLAN_GETCHATUSERWORLD = 3614; + public static final int CLAN_GETCHATUSERRANK = 3615; + public static final int CLAN_GETCHATMINKICK = 3616; + public static final int CLAN_KICKUSER = 3617; + public static final int CLAN_GETCHATRANK = 3618; + public static final int CLAN_JOINCHAT = 3619; + public static final int CLAN_LEAVECHAT = 3620; + public static final int IGNORE_COUNT = 3621; + public static final int IGNORE_GETNAME = 3622; + public static final int IGNORE_TEST = 3623; + public static final int CLAN_ISSELF = 3624; + public static final int CLAN_GETCHATOWNERNAME = 3625; + public static final int CLAN_ISFRIEND = 3626; + public static final int CLAN_ISIGNORE = 3627; + public static final int STOCKMARKET_GETOFFERTYPE = 3903; + public static final int STOCKMARKET_GETOFFERITEM = 3904; + public static final int STOCKMARKET_GETOFFERPRICE = 3905; + public static final int STOCKMARKET_GETOFFERCOUNT = 3906; + public static final int STOCKMARKET_GETOFFERCOMPLETEDCOUNT = 3907; + public static final int STOCKMARKET_GETOFFERCOMPLETEDGOLD = 3908; + public static final int STOCKMARKET_ISOFFEREMPTY = 3910; + public static final int STOCKMARKET_ISOFFERSTABLE = 3911; + public static final int STOCKMARKET_ISOFFERFINISHED = 3912; + public static final int STOCKMARKET_ISOFFERADDING = 3913; + public static final int TRADINGPOST_SORTBY_NAME = 3914; + public static final int TRADINGPOST_SORTBY_PRICE = 3915; + public static final int TRADINGPOST_SORTFILTERBY_WORLD = 3916; + public static final int TRADINGPOST_SORTBY_AGE = 3917; + public static final int TRADINGPOST_SORTBY_COUNT = 3918; + public static final int TRADINGPOST_GETTOTALOFFERS = 3919; + public static final int TRADINGPOST_GETOFFERWORLD = 3920; + public static final int TRADINGPOST_GETOFFERNAME = 3921; + public static final int TRADINGPOST_GETOFFERPREVIOUSNAME = 3922; + public static final int TRADINGPOST_GETOFFERAGE = 3923; + public static final int TRADINGPOST_GETOFFERCOUNT = 3924; + public static final int TRADINGPOST_GETOFFERPRICE = 3925; + public static final int TRADINGPOST_GETOFFERITEM = 3926; + public static final int ADD = 4000; + public static final int SUB = 4001; + public static final int MULTIPLY = 4002; + public static final int DIV = 4003; + public static final int RANDOM = 4004; + public static final int RANDOMINC = 4005; + public static final int INTERPOLATE = 4006; + public static final int ADDPERCENT = 4007; + public static final int SETBIT = 4008; + public static final int CLEARBIT = 4009; + public static final int TESTBIT = 4010; + public static final int MOD = 4011; + public static final int POW = 4012; + public static final int INVPOW = 4013; + public static final int AND = 4014; + public static final int OR = 4015; + public static final int SCALE = 4018; + public static final int APPEND_NUM = 4100; + public static final int APPEND = 4101; + public static final int APPEND_SIGNNUM = 4102; + public static final int LOWERCASE = 4103; + public static final int FROMDATE = 4104; + public static final int TEXT_GENDER = 4105; + public static final int TOSTRING = 4106; + public static final int COMPARE = 4107; + public static final int PARAHEIGHT = 4108; + public static final int PARAWIDTH = 4109; + public static final int TEXT_SWITCH = 4110; + public static final int ESCAPE = 4111; + public static final int APPEND_CHAR = 4112; + public static final int CHAR_ISPRINTABLE = 4113; + public static final int CHAR_ISALPHANUMERIC = 4114; + public static final int CHAR_ISALPHA = 4115; + public static final int CHAR_ISNUMERIC = 4116; + public static final int STRING_LENGTH = 4117; + public static final int SUBSTRING = 4118; + public static final int REMOVETAGS = 4119; + public static final int STRING_INDEXOF_CHAR = 4120; + public static final int STRING_INDEXOF_STRING = 4121; + public static final int OC_NAME = 4200; + public static final int OC_OP = 4201; + public static final int OC_IOP = 4202; + public static final int OC_COST = 4203; + public static final int OC_STACKABLE = 4204; + public static final int OC_CERT = 4205; + public static final int OC_UNCERT = 4206; + public static final int OC_MEMBERS = 4207; + public static final int OC_PLACEHOLDER = 4208; + public static final int OC_UNPLACEHOLDER = 4209; + public static final int OC_FIND = 4210; + public static final int OC_FINDNEXT = 4211; + public static final int OC_FINDRESET = 4212; + public static final int CHAT_GETFILTER_PUBLIC = 5000; + public static final int CHAT_SETFILTER = 5001; + public static final int CHAT_SENDABUSEREPORT = 5002; + public static final int CHAT_GETHISTORY_BYTYPEANDLINE = 5003; + public static final int CHAT_GETHISTORY_BYUID = 5004; + public static final int CHAT_GETFILTER_PRIVATE = 5005; + public static final int CHAT_SENDPUBLIC = 5008; + public static final int CHAT_SENDPRIVATE = 5009; + public static final int CHAT_PLAYERNAME = 5015; + public static final int CHAT_GETFILTER_TRADE = 5016; + public static final int CHAT_GETHISTORYLENGTH = 5017; + public static final int CHAT_GETNEXTUID = 5018; + public static final int CHAT_GETPREVUID = 5019; + public static final int DOCHEAT = 5020; + public static final int CHAT_SETMESSAGEFILTER = 5021; + public static final int CHAT_GETMESSAGEFILTER = 5022; + public static final int GETWINDOWMODE = 5306; + public static final int SETWINDOWMODE = 5307; + public static final int GETDEFAULTWINDOWMODE = 5308; + public static final int SETDEFAULTWINDOWMODE = 5309; + public static final int CAM_FORCEANGLE = 5504; + public static final int CAM_GETANGLE_XA = 5505; + public static final int CAM_GETANGLE_YA = 5506; + public static final int CAM_SETFOLLOWHEIGHT = 5530; + public static final int CAM_GETFOLLOWHEIGHT = 5531; + public static final int LOGOUT = 5630; + public static final int VIEWPORT_SETFOV = 6200; + public static final int VIEWPORT_SETZOOM = 6201; + public static final int VIEWPORT_CLAMPFOV = 6202; + public static final int VIEWPORT_GETEFFECTIVESIZE = 6203; + public static final int VIEWPORT_GETZOOM = 6204; + public static final int VIEWPORT_GETFOV = 6205; + public static final int WORLDLIST_FETCH = 6500; + public static final int WORLDLIST_START = 6501; + public static final int WORLDLIST_NEXT = 6502; + public static final int WORLDLIST_SPECIFIC = 6506; + public static final int WORLDLIST_SORT = 6507; + public static final int SETFOLLOWEROPSLOWPRIORITY = 6512; + public static final int NC_PARAM = 6513; + public static final int LC_PARAM = 6514; + public static final int OC_PARAM = 6515; + public static final int STRUCT_PARAM = 6516; + public static final int ON_MOBILE = 6518; + public static final int CLIENTTYPE = 6519; + public static final int BATTERYLEVEL = 6524; + public static final int BATTERYCHARGING = 6525; + public static final int WIFIAVAILABLE = 6526; + public static final int WORLDMAP_GETMAPNAME = 6601; + public static final int WORLDMAP_SETMAP = 6602; + public static final int WORLDMAP_GETZOOM = 6603; + public static final int WORLDMAP_SETZOOM = 6604; + public static final int WORLDMAP_ISLOADED = 6605; + public static final int WORLDMAP_JUMPTODISPLAYCOORD = 6606; + public static final int WORLDMAP_JUMPTODISPLAYCOORD_INSTANT = 6607; + public static final int WORLDMAP_JUMPTOSOURCECOORD = 6608; + public static final int WORLDMAP_JUMPTOSOURCECOORD_INSTANT = 6609; + public static final int WORLDMAP_GETDISPLAYPOSITION = 6610; + public static final int WORLDMAP_GETCONFIGORIGIN = 6611; + public static final int WORLDMAP_GETCONFIGSIZE = 6612; + public static final int WORLDMAP_GETCONFIGBOUNDS = 6613; + public static final int WORLDMAP_GETCONFIGZOOM = 6614; + public static final int WORLDMAP_GETCURRENTMAP = 6616; + public static final int WORLDMAP_GETDISPLAYCOORD = 6617; + public static final int WORLDMAP_COORDINMAP = 6621; + public static final int WORLDMAP_GETSIZE = 6622; + public static final int WORLDMAP_PERPETUALFLASH = 6628; + public static final int WORLDMAP_FLASHELEMENT = 6629; + public static final int WORLDMAP_FLASHELEMENTCATEGORY = 6630; + public static final int WORLDMAP_STOPCURRENTFLASHES = 6631; + public static final int WORLDMAP_DISABLEELEMENTS = 6632; + public static final int WORLDMAP_DISABLEELEMENT = 6633; + public static final int WORLDMAP_DISABLEELEMENTCATEGORY = 6634; + public static final int WORLDMAP_GETDISABLEELEMENTS = 6635; + public static final int WORLDMAP_GETDISABLEELEMENT = 6636; + public static final int WORLDMAP_GETDISABLEELEMENTCATEGORY = 6637; + public static final int WORLDMAP_LISTELEMENT_START = 6639; + public static final int WORLDMAP_LISTELEMENT_NEXT = 6640; + public static final int MEC_TEXT = 6693; + public static final int MEC_TEXTSIZE = 6694; + public static final int MEC_CATEGORY = 6695; + public static final int MEC_SPRITE = 6696; +}