chore: rev 193
This commit is contained in:
@@ -1,61 +1,446 @@
|
||||
import java.awt.Desktop;
|
||||
import java.awt.Desktop.Action;
|
||||
import java.net.URI;
|
||||
import net.runelite.mapping.Export;
|
||||
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("cd")
|
||||
@ObfuscatedName("cw")
|
||||
@Implements("AttackOption")
|
||||
public enum AttackOption implements Enumerated {
|
||||
@ObfuscatedName("f")
|
||||
@ObfuscatedName("h")
|
||||
@ObfuscatedSignature(
|
||||
descriptor = "Lcd;"
|
||||
descriptor = "Lcw;"
|
||||
)
|
||||
@Export("AttackOption_dependsOnCombatLevels")
|
||||
AttackOption_dependsOnCombatLevels(0),
|
||||
@ObfuscatedName("b")
|
||||
@ObfuscatedName("v")
|
||||
@ObfuscatedSignature(
|
||||
descriptor = "Lcd;"
|
||||
descriptor = "Lcw;"
|
||||
)
|
||||
@Export("AttackOption_alwaysRightClick")
|
||||
AttackOption_alwaysRightClick(1),
|
||||
@ObfuscatedName("l")
|
||||
@ObfuscatedName("x")
|
||||
@ObfuscatedSignature(
|
||||
descriptor = "Lcd;"
|
||||
descriptor = "Lcw;"
|
||||
)
|
||||
@Export("AttackOption_leftClickWhereAvailable")
|
||||
AttackOption_leftClickWhereAvailable(2),
|
||||
@ObfuscatedName("m")
|
||||
@ObfuscatedName("w")
|
||||
@ObfuscatedSignature(
|
||||
descriptor = "Lcd;"
|
||||
descriptor = "Lcw;"
|
||||
)
|
||||
@Export("AttackOption_hidden")
|
||||
AttackOption_hidden(3);
|
||||
|
||||
@ObfuscatedName("v")
|
||||
@ObfuscatedGetter(
|
||||
intValue = 612234901
|
||||
@ObfuscatedName("bl")
|
||||
@ObfuscatedSignature(
|
||||
descriptor = "Lic;"
|
||||
)
|
||||
@Export("loginBoxCenter")
|
||||
static int loginBoxCenter;
|
||||
@ObfuscatedName("z")
|
||||
static StudioGame field1174;
|
||||
@ObfuscatedName("t")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -740751005
|
||||
intValue = -1169656951
|
||||
)
|
||||
@Export("id")
|
||||
final int id;
|
||||
|
||||
AttackOption(int var3) {
|
||||
this.id = var3; // L: 11718
|
||||
} // L: 11719
|
||||
this.id = var3;
|
||||
}
|
||||
|
||||
@ObfuscatedName("m")
|
||||
@ObfuscatedName("x")
|
||||
@ObfuscatedSignature(
|
||||
descriptor = "(B)I",
|
||||
garbageValue = "23"
|
||||
descriptor = "(I)I",
|
||||
garbageValue = "-275768542"
|
||||
)
|
||||
@Export("rsOrdinal")
|
||||
public int rsOrdinal() {
|
||||
return this.id; // L: 11722
|
||||
return this.id;
|
||||
}
|
||||
|
||||
@ObfuscatedName("h")
|
||||
@ObfuscatedSignature(
|
||||
descriptor = "(Ljava/lang/String;ZZI)V",
|
||||
garbageValue = "262935584"
|
||||
)
|
||||
@Export("openURL")
|
||||
public static void openURL(String var0, boolean var1, boolean var2) {
|
||||
if (var1) {
|
||||
if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Action.BROWSE)) {
|
||||
try {
|
||||
Desktop.getDesktop().browse(new URI(var0));
|
||||
return;
|
||||
} catch (Exception var4) {
|
||||
}
|
||||
}
|
||||
|
||||
if (class60.field439.startsWith("win")) {
|
||||
ScriptEvent.method1260(var0, 0);
|
||||
} else if (class60.field439.startsWith("mac")) {
|
||||
class13.method131(var0, 1, "openjs");
|
||||
} else {
|
||||
ScriptEvent.method1260(var0, 2);
|
||||
}
|
||||
} else {
|
||||
ScriptEvent.method1260(var0, 3);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ObfuscatedName("v")
|
||||
@ObfuscatedSignature(
|
||||
descriptor = "(Lbb;II)V",
|
||||
garbageValue = "1453741363"
|
||||
)
|
||||
@Export("runScript")
|
||||
static void runScript(ScriptEvent var0, int var1) {
|
||||
Object[] var2 = var0.args;
|
||||
Script var3;
|
||||
int var17;
|
||||
if (Archive.isWorldMapEvent(var0.type)) {
|
||||
Script.worldMapEvent = (WorldMapEvent)var2[0];
|
||||
WorldMapElement var4 = UserComparator10.WorldMapElement_get(Script.worldMapEvent.mapElement);
|
||||
var3 = TileItem.getWorldMapScript(var0.type, var4.objectId, var4.category);
|
||||
} else {
|
||||
var17 = (Integer)var2[0];
|
||||
var3 = ChatChannel.getScript(var17);
|
||||
}
|
||||
|
||||
if (var3 != null) {
|
||||
VarcInt.Interpreter_intStackSize = 0;
|
||||
Interpreter.Interpreter_stringStackSize = 0;
|
||||
var17 = -1;
|
||||
int[] var5 = var3.opcodes;
|
||||
int[] var6 = var3.intOperands;
|
||||
byte var7 = -1;
|
||||
Interpreter.Interpreter_frameDepth = 0;
|
||||
Interpreter.field1104 = false;
|
||||
|
||||
try {
|
||||
int var10;
|
||||
try {
|
||||
InterfaceParent.Interpreter_intLocals = new int[var3.localIntCount];
|
||||
int var8 = 0;
|
||||
Username.Interpreter_stringLocals = new String[var3.localStringCount];
|
||||
int var9 = 0;
|
||||
|
||||
int var11;
|
||||
String var18;
|
||||
for (var10 = 1; var10 < var2.length; ++var10) {
|
||||
if (var2[var10] instanceof Integer) {
|
||||
var11 = (Integer)var2[var10];
|
||||
if (var11 == -2147483647) {
|
||||
var11 = var0.mouseX;
|
||||
}
|
||||
|
||||
if (var11 == -2147483646) {
|
||||
var11 = var0.mouseY;
|
||||
}
|
||||
|
||||
if (var11 == -2147483645) {
|
||||
var11 = var0.widget != null ? var0.widget.id : -1;
|
||||
}
|
||||
|
||||
if (var11 == -2147483644) {
|
||||
var11 = var0.opIndex;
|
||||
}
|
||||
|
||||
if (var11 == -2147483643) {
|
||||
var11 = var0.widget != null ? var0.widget.childIndex : -1;
|
||||
}
|
||||
|
||||
if (var11 == -2147483642) {
|
||||
var11 = var0.dragTarget != null ? var0.dragTarget.id : -1;
|
||||
}
|
||||
|
||||
if (var11 == -2147483641) {
|
||||
var11 = var0.dragTarget != null ? var0.dragTarget.childIndex : -1;
|
||||
}
|
||||
|
||||
if (var11 == -2147483640) {
|
||||
var11 = var0.keyTyped;
|
||||
}
|
||||
|
||||
if (var11 == -2147483639) {
|
||||
var11 = var0.keyPressed;
|
||||
}
|
||||
|
||||
InterfaceParent.Interpreter_intLocals[var8++] = var11;
|
||||
} else if (var2[var10] instanceof String) {
|
||||
var18 = (String)var2[var10];
|
||||
if (var18.equals("event_opbase")) {
|
||||
var18 = var0.targetName;
|
||||
}
|
||||
|
||||
Username.Interpreter_stringLocals[var9++] = var18;
|
||||
}
|
||||
}
|
||||
|
||||
var10 = 0;
|
||||
Interpreter.field1097 = var0.field569;
|
||||
|
||||
while (true) {
|
||||
++var10;
|
||||
if (var10 > var1) {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
++var17;
|
||||
int var29 = var5[var17];
|
||||
int var20;
|
||||
if (var29 >= 100) {
|
||||
boolean var32;
|
||||
if (var3.intOperands[var17] == 1) {
|
||||
var32 = true;
|
||||
} else {
|
||||
var32 = false;
|
||||
}
|
||||
|
||||
var20 = FaceNormal.method3345(var29, var3, var32);
|
||||
switch(var20) {
|
||||
case 0:
|
||||
return;
|
||||
case 1:
|
||||
default:
|
||||
break;
|
||||
case 2:
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
} else if (var29 == 0) {
|
||||
Interpreter.Interpreter_intStack[++VarcInt.Interpreter_intStackSize - 1] = var6[var17];
|
||||
} else if (var29 == ScriptOpcodes.GET_VARP) {
|
||||
var11 = var6[var17];
|
||||
Interpreter.Interpreter_intStack[++VarcInt.Interpreter_intStackSize - 1] = Varps.Varps_main[var11];
|
||||
} else if (var29 == ScriptOpcodes.SET_VARP) {
|
||||
var11 = var6[var17];
|
||||
Varps.Varps_main[var11] = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize];
|
||||
Script.changeGameOptions(var11);
|
||||
} else if (var29 == ScriptOpcodes.SCONST) {
|
||||
Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = var3.stringOperands[var17];
|
||||
} else if (var29 == ScriptOpcodes.JUMP) {
|
||||
var17 += var6[var17];
|
||||
} else if (var29 == ScriptOpcodes.IF_ICMPNE) {
|
||||
VarcInt.Interpreter_intStackSize -= 2;
|
||||
if (Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize] != Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize + 1]) {
|
||||
var17 += var6[var17];
|
||||
}
|
||||
} else if (var29 == ScriptOpcodes.IF_ICMPEQ) {
|
||||
VarcInt.Interpreter_intStackSize -= 2;
|
||||
if (Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize] == Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize + 1]) {
|
||||
var17 += var6[var17];
|
||||
}
|
||||
} else if (var29 == ScriptOpcodes.IF_ICMPLT) {
|
||||
VarcInt.Interpreter_intStackSize -= 2;
|
||||
if (Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize] < Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize + 1]) {
|
||||
var17 += var6[var17];
|
||||
}
|
||||
} else if (var29 == ScriptOpcodes.IF_ICMPGT) {
|
||||
VarcInt.Interpreter_intStackSize -= 2;
|
||||
if (Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize] > Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize + 1]) {
|
||||
var17 += var6[var17];
|
||||
}
|
||||
} else if (var29 == ScriptOpcodes.RETURN) {
|
||||
if (Interpreter.Interpreter_frameDepth == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
ScriptFrame var34 = Interpreter.Interpreter_frames[--Interpreter.Interpreter_frameDepth];
|
||||
var3 = var34.script;
|
||||
var5 = var3.opcodes;
|
||||
var6 = var3.intOperands;
|
||||
var17 = var34.pc;
|
||||
InterfaceParent.Interpreter_intLocals = var34.intLocals;
|
||||
Username.Interpreter_stringLocals = var34.stringLocals;
|
||||
} else if (var29 == ScriptOpcodes.GET_VARBIT) {
|
||||
var11 = var6[var17];
|
||||
Interpreter.Interpreter_intStack[++VarcInt.Interpreter_intStackSize - 1] = Coord.getVarbit(var11);
|
||||
} else if (var29 == ScriptOpcodes.SET_VARBIT) {
|
||||
var11 = var6[var17];
|
||||
KitDefinition.method4491(var11, Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize]);
|
||||
} else if (var29 == ScriptOpcodes.IF_ICMPLE) {
|
||||
VarcInt.Interpreter_intStackSize -= 2;
|
||||
if (Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize] <= Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize + 1]) {
|
||||
var17 += var6[var17];
|
||||
}
|
||||
} else if (var29 == ScriptOpcodes.IF_ICMPGE) {
|
||||
VarcInt.Interpreter_intStackSize -= 2;
|
||||
if (Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize] >= Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize + 1]) {
|
||||
var17 += var6[var17];
|
||||
}
|
||||
} else if (var29 == ScriptOpcodes.ILOAD) {
|
||||
Interpreter.Interpreter_intStack[++VarcInt.Interpreter_intStackSize - 1] = InterfaceParent.Interpreter_intLocals[var6[var17]];
|
||||
} else if (var29 == ScriptOpcodes.ISTORE) {
|
||||
InterfaceParent.Interpreter_intLocals[var6[var17]] = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize];
|
||||
} else if (var29 == ScriptOpcodes.SLOAD) {
|
||||
Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = Username.Interpreter_stringLocals[var6[var17]];
|
||||
} else if (var29 == ScriptOpcodes.SSTORE) {
|
||||
Username.Interpreter_stringLocals[var6[var17]] = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize];
|
||||
} else if (var29 == ScriptOpcodes.JOIN_STRING) {
|
||||
var11 = var6[var17];
|
||||
Interpreter.Interpreter_stringStackSize -= var11;
|
||||
String var31 = class90.method2125(Interpreter.Interpreter_stringStack, Interpreter.Interpreter_stringStackSize, var11);
|
||||
Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = var31;
|
||||
} else if (var29 == ScriptOpcodes.POP_INT) {
|
||||
--VarcInt.Interpreter_intStackSize;
|
||||
} else if (var29 == ScriptOpcodes.POP_STRING) {
|
||||
--Interpreter.Interpreter_stringStackSize;
|
||||
} else {
|
||||
int var15;
|
||||
if (var29 != ScriptOpcodes.INVOKE) {
|
||||
if (var29 == ScriptOpcodes.GET_VARC_INT) {
|
||||
Interpreter.Interpreter_intStack[++VarcInt.Interpreter_intStackSize - 1] = Varcs.varcs.getInt(var6[var17]);
|
||||
} else if (var29 == ScriptOpcodes.SET_VARC_INT) {
|
||||
Varcs.varcs.setInt(var6[var17], Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize]);
|
||||
} else if (var29 == ScriptOpcodes.DEFINE_ARRAY) {
|
||||
var11 = var6[var17] >> 16;
|
||||
var20 = var6[var17] & 65535;
|
||||
int var21 = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize];
|
||||
if (var21 < 0 || var21 > 5000) {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
Interpreter.Interpreter_arrayLengths[var11] = var21;
|
||||
byte var22 = -1;
|
||||
if (var20 == 105) {
|
||||
var22 = 0;
|
||||
}
|
||||
|
||||
for (var15 = 0; var15 < var21; ++var15) {
|
||||
Interpreter.Interpreter_arrays[var11][var15] = var22;
|
||||
}
|
||||
} else if (var29 == ScriptOpcodes.GET_ARRAY_INT) {
|
||||
var11 = var6[var17];
|
||||
var20 = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize];
|
||||
if (var20 < 0 || var20 >= Interpreter.Interpreter_arrayLengths[var11]) {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
Interpreter.Interpreter_intStack[++VarcInt.Interpreter_intStackSize - 1] = Interpreter.Interpreter_arrays[var11][var20];
|
||||
} else if (var29 == ScriptOpcodes.SET_ARRAY_INT) {
|
||||
var11 = var6[var17];
|
||||
VarcInt.Interpreter_intStackSize -= 2;
|
||||
var20 = Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize];
|
||||
if (var20 < 0 || var20 >= Interpreter.Interpreter_arrayLengths[var11]) {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
Interpreter.Interpreter_arrays[var11][var20] = Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize + 1];
|
||||
} else if (var29 == ScriptOpcodes.GET_VARC_STRING_OLD) {
|
||||
var18 = Varcs.varcs.getStringOld(var6[var17]);
|
||||
if (var18 == null) {
|
||||
var18 = "null";
|
||||
}
|
||||
|
||||
Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = var18;
|
||||
} else if (var29 == ScriptOpcodes.SET_VARC_STRING_OLD) {
|
||||
Varcs.varcs.setStringOld(var6[var17], Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]);
|
||||
} else if (var29 == ScriptOpcodes.GET_VARC_STRING) {
|
||||
var18 = Varcs.varcs.getString(var6[var17]);
|
||||
Interpreter.Interpreter_stringStack[++Interpreter.Interpreter_stringStackSize - 1] = var18;
|
||||
} else if (var29 == ScriptOpcodes.SET_VARC_STRING) {
|
||||
Varcs.varcs.setString(var6[var17], Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize]);
|
||||
} else {
|
||||
if (var29 != ScriptOpcodes.SWITCH) {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
IterableNodeHashTable var33 = var3.switches[var6[var17]];
|
||||
IntegerNode var30 = (IntegerNode)var33.get((long)Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize]);
|
||||
if (var30 != null) {
|
||||
var17 += var30.integer;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
var11 = var6[var17];
|
||||
Script var12 = ChatChannel.getScript(var11);
|
||||
int[] var13 = new int[var12.localIntCount];
|
||||
String[] var14 = new String[var12.localStringCount];
|
||||
|
||||
for (var15 = 0; var15 < var12.intArgumentCount; ++var15) {
|
||||
var13[var15] = Interpreter.Interpreter_intStack[var15 + (VarcInt.Interpreter_intStackSize - var12.intArgumentCount)];
|
||||
}
|
||||
|
||||
for (var15 = 0; var15 < var12.stringArgumentCount; ++var15) {
|
||||
var14[var15] = Interpreter.Interpreter_stringStack[var15 + (Interpreter.Interpreter_stringStackSize - var12.stringArgumentCount)];
|
||||
}
|
||||
|
||||
VarcInt.Interpreter_intStackSize -= var12.intArgumentCount;
|
||||
Interpreter.Interpreter_stringStackSize -= var12.stringArgumentCount;
|
||||
ScriptFrame var19 = new ScriptFrame();
|
||||
var19.script = var3;
|
||||
var19.pc = var17;
|
||||
var19.intLocals = InterfaceParent.Interpreter_intLocals;
|
||||
var19.stringLocals = Username.Interpreter_stringLocals;
|
||||
Interpreter.Interpreter_frames[++Interpreter.Interpreter_frameDepth - 1] = var19;
|
||||
var3 = var12;
|
||||
var5 = var12.opcodes;
|
||||
var6 = var12.intOperands;
|
||||
var17 = -1;
|
||||
InterfaceParent.Interpreter_intLocals = var13;
|
||||
Username.Interpreter_stringLocals = var14;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception var27) {
|
||||
StringBuilder var24 = new StringBuilder(30);
|
||||
var24.append("").append(var3.key).append(" ");
|
||||
|
||||
for (var10 = Interpreter.Interpreter_frameDepth - 1; var10 >= 0; --var10) {
|
||||
var24.append("").append(Interpreter.Interpreter_frames[var10].script.key).append(" ");
|
||||
}
|
||||
|
||||
var24.append("").append(var7);
|
||||
PlayerAppearance.RunException_sendStackTrace(var24.toString(), var27);
|
||||
}
|
||||
} finally {
|
||||
if (Interpreter.field1104) {
|
||||
Interpreter.field1103 = true;
|
||||
ServerPacket.method3664();
|
||||
Interpreter.field1103 = false;
|
||||
Interpreter.field1104 = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ObfuscatedName("x")
|
||||
@ObfuscatedSignature(
|
||||
descriptor = "(Lkj;B)Ljava/lang/String;",
|
||||
garbageValue = "23"
|
||||
)
|
||||
public static String method2135(Buffer var0) {
|
||||
String var1;
|
||||
try {
|
||||
int var2 = var0.readUShortSmart();
|
||||
if (var2 > 32767) {
|
||||
var2 = 32767;
|
||||
}
|
||||
|
||||
byte[] var3 = new byte[var2];
|
||||
var0.offset += class219.huffman.decompress(var0.array, var0.offset, var3, 0, var2);
|
||||
String var4 = Clock.decodeStringCp1252(var3, 0, var2);
|
||||
var1 = var4;
|
||||
} catch (Exception var6) {
|
||||
var1 = "Cabbage";
|
||||
}
|
||||
|
||||
return var1;
|
||||
}
|
||||
|
||||
@ObfuscatedName("gq")
|
||||
@ObfuscatedSignature(
|
||||
descriptor = "(I)V",
|
||||
garbageValue = "1150447373"
|
||||
)
|
||||
static void method2138() {
|
||||
if (PlayerAppearance.localPlayer.x >> 7 == Client.destinationX && PlayerAppearance.localPlayer.y >> 7 == Client.destinationY) {
|
||||
Client.destinationX = 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user