SBoT 1.0 decompiled with CFR 0.152

Full source recovered from SBoT.jar (July 2004) plus the three bundled
example scripts (BoneBury, GuildFish, GuildFisher). Class names are the
original RSC-era single-letter obfuscation (a.java-z.java); mudclient.java
and Script.java kept their real names since those weren't obfuscated.
This commit is contained in:
wes
2026-08-25 13:11:31 -04:00
commit c30e839b64
31 changed files with 90600 additions and 0 deletions
+996
View File
@@ -0,0 +1,996 @@
/*
* Decompiled with CFR 0.152.
*/
public abstract class Script {
protected mudclient a;
private static String[] z;
public Script(mudclient mudclient2) {
this.a = mudclient2;
}
public void start(String string, String[] stringArray) {
}
public String[] getCommands() {
return new String[0];
}
public void init() {
}
public void stop() {
}
public void ServerMessage(String string) {
}
public void Wait(int n2) {
try {
Thread.sleep(n2);
}
catch (InterruptedException interruptedException) {
// empty catch block
}
}
public void DisplayMessage(String string, int n2) {
this.a.b(string, 3);
}
public void SetFightMode(int n2) {
this.WaitForLoad();
this.a.i(n2);
}
public int GetFightMode() {
this.WaitForLoad();
return this.a.Cd;
}
public void AtObject(int n2, int n3) {
block4: {
mudclient mudclient2;
block2: {
block3: {
boolean bl = q.d;
this.WaitForLoad();
mudclient2 = this.a;
if (bl) break block2;
if (mudclient2.d(n2, n3) == -1) break block3;
this.a.h(n2, n3);
if (!bl) break block4;
}
mudclient2 = this.a;
}
mudclient2.b(z[0] + n2 + z[1] + n3, 3);
}
}
public void AtObject(int[] nArray) {
block4: {
mudclient mudclient2;
block2: {
block3: {
boolean bl = q.d;
this.WaitForLoad();
mudclient2 = this.a;
if (bl) break block2;
if (mudclient2.d(nArray[0], nArray[1]) == -1) break block3;
this.a.h(nArray[0], nArray[1]);
if (!bl) break block4;
}
mudclient2 = this.a;
}
mudclient2.b(z[0] + nArray[0] + z[1] + nArray[1], 3);
}
}
public void AtObject2(int n2, int n3) {
block4: {
mudclient mudclient2;
block2: {
block3: {
boolean bl = q.d;
this.WaitForLoad();
mudclient2 = this.a;
if (bl) break block2;
if (mudclient2.d(n2, n3) == -1) break block3;
this.a.i(n2, n3);
if (!bl) break block4;
}
mudclient2 = this.a;
}
mudclient2.b(z[0] + n2 + z[1] + n3, 3);
}
}
public void AtObject2(int[] nArray) {
block4: {
mudclient mudclient2;
block2: {
block3: {
boolean bl = q.d;
this.WaitForLoad();
mudclient2 = this.a;
if (bl) break block2;
if (mudclient2.d(nArray[0], nArray[1]) == -1) break block3;
this.a.i(nArray[0], nArray[1]);
if (!bl) break block4;
}
mudclient2 = this.a;
}
mudclient2.b(z[0] + nArray[0] + z[1] + nArray[1], 3);
}
}
public void Walk(int n2, int n3) {
boolean bl = q.d;
this.WaitForLoad();
while (this.a.pb() != n2) {
mudclient mudclient2 = this.a;
if (!bl) {
if (mudclient2.qb() == n3) break;
this.WaitForLoad();
mudclient2 = this.a;
}
mudclient2.j(n2, n3);
try {
Thread.sleep(1000L);
}
catch (InterruptedException interruptedException) {
if (!bl) continue;
}
}
}
/*
* Unable to fully structure code
*/
public void Walk(int var1_1, int var2_2, int var3_3) {
var5_4 = q.d;
this.WaitForLoad();
while (this.a.pb() != var1_1) {
v0 = this.a.qb();
if (var5_4) ** GOTO lbl11
if (v0 == var2_2) break;
this.WaitForLoad();
this.a.j(var1_1, var2_2);
try {
v0 = var3_3;
lbl11:
// 2 sources
Thread.sleep(v0);
}
catch (InterruptedException var4_5) {
if (!var5_4) continue;
}
}
}
public void WalkNoWait(int n2, int n3) {
this.WaitForLoad();
this.a.j(n2, n3);
}
/*
* Enabled aggressive block sorting
* Lifted jumps to return sites
*/
public void WalkEmpty(int n2, int n3, int n4, int n5) {
block10: {
int n6;
int n7;
int n8;
boolean bl;
block11: {
block9: {
bl = q.d;
this.WaitForLoad();
int n9 = 0;
n8 = n2;
block0: while (true) {
int n10 = n8;
int n11 = n4;
block1: while (n10 <= n11) {
n7 = n3;
if (bl) break block9;
for (n6 = v884283; n6 <= n5; ++n6) {
int n12 = this.a.g(n8, n6);
if (!bl) {
n11 = 1;
if (bl) continue block1;
if (n12 != n11) continue;
n12 = 1;
}
n9 = n12;
if (!bl) continue;
}
++n8;
if (!bl) continue block0;
}
break;
}
n7 = n9;
}
if (bl) break block11;
if (n7 != 1) break block10;
n7 = 0;
}
n8 = n7;
while (n8 == 0) {
int n13;
this.WaitForLoad();
n6 = this.Rand(n2, n4);
if (!this.a.g(n6, n13 = this.Rand(n3, n5))) continue;
this.Walk(n6, n13);
n8 = 1;
if (!bl) {
continue;
}
break block10;
}
return;
}
System.out.println(z[2]);
this.Walk(this.Rand(n2, n4), this.Rand(n3, n5));
}
/*
* Enabled aggressive block sorting
* Lifted jumps to return sites
*/
public void WalkEmptyNoWait(int n2, int n3, int n4, int n5) {
block10: {
int n6;
int n7;
int n8;
boolean bl;
block11: {
block9: {
bl = q.d;
this.WaitForLoad();
int n9 = 0;
n8 = n2;
block0: while (true) {
int n10 = n8;
int n11 = n4;
block1: while (n10 <= n11) {
n7 = n3;
if (bl) break block9;
for (n6 = v884757; n6 <= n5; ++n6) {
int n12 = this.a.g(n8, n6);
if (!bl) {
n11 = 1;
if (bl) continue block1;
if (n12 != n11) continue;
n12 = 1;
}
n9 = n12;
if (!bl) continue;
}
++n8;
if (!bl) continue block0;
}
break;
}
n7 = n9;
}
if (bl) break block11;
if (n7 != 1) break block10;
n7 = 0;
}
n8 = n7;
while (n8 == 0) {
int n13;
this.WaitForLoad();
n6 = this.Rand(n2, n4);
if (!this.a.g(n6, n13 = this.Rand(n3, n5))) continue;
this.a.j(n6, n13);
n8 = 1;
if (!bl) {
continue;
}
break block10;
}
return;
}
System.out.println(z[2]);
this.a.j(this.Rand(n2, n4), this.Rand(n3, n5));
}
public int GetX() {
this.WaitForLoad();
return this.a.pb();
}
public int GetY() {
this.WaitForLoad();
return this.a.qb();
}
public int Rand(int n2, int n3) {
this.WaitForLoad();
return this.a.k(n2, n3);
}
public void Say(String string) {
this.WaitForLoad();
this.a.f(string);
}
public boolean EmptyTile(int n2, int n3) {
this.WaitForLoad();
return this.a.g(n2, n3);
}
public void MagicPlayer(int n2, int n3) {
this.WaitForLoad();
this.a.l(n2, n3);
}
public void UseOnPlayer(int n2, int n3) {
this.WaitForLoad();
this.a.m(n2, n3);
}
public void AttackPlayer(int n2) {
this.WaitForLoad();
this.a.l(n2);
}
public void DuelPlayer(int n2) {
this.WaitForLoad();
this.a.m(n2);
}
public void TradePlayer(int n2) {
this.WaitForLoad();
this.a.n(n2);
}
public void FollowPlayer(int n2) {
this.WaitForLoad();
this.a.o(n2);
}
public void MagicItem(int n2, int n3, int n4, int n5) {
this.WaitForLoad();
this.a.d(n2, n3, n4, n5);
}
public void UseOnItem(int n2, int n3, int n4, int n5) {
this.WaitForLoad();
this.a.e(n2, n3, n4, n5);
}
public void TakeItem(int n2, int n3, int n4) {
this.WaitForLoad();
this.a.e(n2, n3, n4);
}
public void TakeItem(int[] nArray, int n2) {
this.WaitForLoad();
this.a.e(nArray[0], nArray[1], n2);
}
public void MagicNPC(int n2, int n3) {
this.WaitForLoad();
this.a.n(n2, n3);
}
public void UseOnNPC(int n2, int n3) {
this.WaitForLoad();
this.a.o(n2, n3);
}
public void TalkToNPC(int n2) {
this.WaitForLoad();
this.a.q(n2);
}
public void AttackNPC(int n2) {
this.WaitForLoad();
this.a.r(n2);
}
public void ThieveNPC(int n2) {
this.WaitForLoad();
this.a.s(n2);
}
public void MagicDoor(int n2, int n3, int n4, int n5) {
this.WaitForLoad();
this.a.f(n2, n3, n4, n5);
}
public void UseOnDoor(int n2, int n3, int n4, int n5) {
this.WaitForLoad();
this.a.g(n2, n3, n4, n5);
}
public void OpenDoor(int n2, int n3, int n4) {
this.WaitForLoad();
this.a.f(n2, n3, n4);
}
public void CloseDoor(int n2, int n3, int n4) {
this.WaitForLoad();
this.a.g(n2, n3, n4);
}
public void MagicObject(int n2, int n3, int n4) {
this.WaitForLoad();
this.a.h(n2, n3, n4);
}
public void UseOnObject(int n2, int n3, int n4) {
this.WaitForLoad();
this.a.i(n2, n3, n4);
}
public void Magic(int n2) {
this.WaitForLoad();
this.a.t(n2);
}
public boolean QuestMenu() {
this.WaitForLoad();
return this.a.tf;
}
public void Answer(int n2) {
this.WaitForLoad();
this.a.u(n2);
}
public void MagicInventory(int n2, int n3) {
this.WaitForLoad();
this.a.q(n2, n3);
}
public void UseWithInventory(int n2, int n3) {
this.WaitForLoad();
this.a.r(n2, n3);
}
public void Remove(int n2) {
this.WaitForLoad();
this.a.v(n2);
}
public void Wield(int n2) {
this.WaitForLoad();
this.a.w(n2);
}
public void Use(int n2) {
this.WaitForLoad();
this.a.x(n2);
}
public void Drop(int n2) {
this.WaitForLoad();
this.a.y(n2);
}
public void Deposit(int n2, int n3) {
this.WaitForLoad();
this.a.s(n2, n3);
}
public void Withdraw(int n2, int n3) {
this.WaitForLoad();
this.a.t(n2, n3);
}
public int InvCount(int n2) {
this.WaitForLoad();
return this.a.f(n2);
}
public int InvCount() {
this.WaitForLoad();
return this.a.f(0);
}
public void Logout() {
this.WaitForLoad();
this.a.V();
}
public int[] GetNearestObject(int n2) {
this.WaitForLoad();
int[] nArray = new int[]{n2};
return new int[]{this.a.a(nArray, true, 0, 0, 9999, 9999), this.a.a(nArray, false, 0, 0, 9999, 9999)};
}
public int[] GetNearestObject(int[] nArray) {
this.WaitForLoad();
return new int[]{this.a.a(nArray, true, 0, 0, 9999, 9999), this.a.a(nArray, false, 0, 0, 9999, 9999)};
}
public int[] GetNearestObject(int n2, int n3, int n4, int n5, int n6) {
this.WaitForLoad();
int[] nArray = new int[]{n2};
return new int[]{this.a.a(nArray, true, n3, n4, n5, n6), this.a.a(nArray, false, n3, n4, n5, n6)};
}
public int[] GetNearestObject(int[] nArray, int n2, int n3, int n4, int n5) {
this.WaitForLoad();
return new int[]{this.a.a(nArray, true, n2, n3, n4, n5), this.a.a(nArray, false, n2, n3, n4, n5)};
}
public int GetNearestNPC(int n2) {
this.WaitForLoad();
int[] nArray = new int[]{n2};
return this.a.a(nArray, 0, 0, 9999, 9999);
}
public int GetNearestNPC(int[] nArray) {
this.WaitForLoad();
return this.a.a(nArray, 0, 0, 9999, 9999);
}
public int GetNearestNPC(int n2, int n3, int n4, int n5, int n6) {
this.WaitForLoad();
int[] nArray = new int[]{n2};
return this.a.a(nArray, n3, n6, n5, n6);
}
public int GetNearestNPC(int[] nArray, int n2, int n3, int n4, int n5) {
this.WaitForLoad();
return this.a.a(nArray, n4, n3, n4, n5);
}
public int[] GetNearestItem(int n2) {
this.WaitForLoad();
return new int[]{this.a.a(n2, true), this.a.a(n2, false)};
}
public void CloseShop() {
this.WaitForLoad();
this.a.tb();
}
public void CloseBank() {
this.WaitForLoad();
this.a.sb();
}
public void Buy(int n2) {
this.WaitForLoad();
this.a.A(n2);
}
public void Sell(int n2) {
this.WaitForLoad();
this.a.F(n2);
}
public boolean Bank() {
this.WaitForLoad();
return this.a.af;
}
public boolean Shop() {
this.WaitForLoad();
return this.a.Zg;
}
public void Sex0rPR4Y() {
this.a.Hb = true;
}
public int DoorAt(int n2, int n3, int n4) {
this.WaitForLoad();
return this.a.j(n2, n3, n4);
}
public int ObjectAt(int n2, int n3) {
this.WaitForLoad();
return this.a.u(n2, n3);
}
public int PlayerByName(String string) {
this.WaitForLoad();
return this.a.g(string);
}
public int GetCurrentStat(int n2) {
this.WaitForLoad();
return this.a.M(n2);
}
public int GetStat(int n2) {
this.WaitForLoad();
return this.a.N(n2);
}
public int PlayerHP(int n2) {
this.WaitForLoad();
return this.a.H(n2);
}
public boolean InCombat() {
this.WaitForLoad();
return this.a.ub();
}
public boolean PlayerInCombat(int n2) {
this.WaitForLoad();
return this.a.G(n2);
}
public int PlayerX(int n2) {
this.WaitForLoad();
return this.a.I(n2);
}
public int PlayerY(int n2) {
this.WaitForLoad();
return this.a.J(n2);
}
public int PlayerDestX(int n2) {
this.WaitForLoad();
return this.a.K(n2);
}
public int PlayerDestY(int n2) {
this.WaitForLoad();
return this.a.L(n2);
}
public String LastServerMessage() {
this.WaitForLoad();
return this.a.Lb;
}
public void ResetLastServerMessage() {
this.WaitForLoad();
this.a.Lb = null;
}
public void WaitForServerMessage(int n2) {
this.a.Jb = false;
this.a.Kb = true;
long l2 = System.currentTimeMillis();
while (!this.a.Jb && System.currentTimeMillis() - l2 <= (long)n2) {
this.Wait(10);
if (!q.d) continue;
}
}
public boolean InLastServerMessage(String string) {
boolean bl = this.a.Lb.indexOf(string);
if (!q.d) {
if (bl >= false) {
return true;
}
bl = false;
}
return bl;
}
public int FindInv(int n2) {
this.WaitForLoad();
return this.a.j(n2);
}
public boolean Running() {
this.WaitForLoad();
return this.a.Bb;
}
public void CheckFighters(boolean bl) {
this.WaitForLoad();
this.a.Cb = bl;
}
public void SleepWord() {
this.WaitForLoad();
this.a.rb();
}
public boolean Sleeping() {
this.WaitForLoad();
return this.a.dg;
}
public int Fatigue() {
this.WaitForLoad();
return this.a.Ih * 100 / 750;
}
/*
* Enabled force condition propagation
* Lifted jumps to return sites
*/
public boolean Loading() {
boolean bl = q.d;
int n2 = this.a.Gi;
if (!bl) {
if (n2 != 0) {
this.a.Eg.q = false;
return true;
}
n2 = this.a.bh;
}
if (!bl) {
if (n2 != 1) {
return true;
}
n2 = this.a.vi;
}
int n3 = n2;
int n4 = this.a.wi;
this.a.Dd = false;
n4 += this.a.jd;
int n5 = this.a.ld;
if (bl) return n5 != 0;
if (n5 != this.a.Wg) return 0 != 0;
n5 = n3 += this.a.id;
if (bl) return n5 != 0;
if (n5 <= this.a.yd) return 0 != 0;
n5 = n3;
if (bl) return n5 != 0;
if (n5 >= this.a.Ad) return 0 != 0;
n5 = n4;
if (bl) return n5 != 0;
if (n5 <= this.a.zd) return 0 != 0;
n5 = n4;
if (bl) return n5 != 0;
if (n5 >= this.a.Bd) return 0 != 0;
this.a.Eg.q = true;
return true;
}
public void WaitForLoad() {
while (this.Loading()) {
this.Wait(10);
if (!q.d) continue;
}
}
public void PrayerOn(int n2) {
this.WaitForLoad();
this.a.C(n2);
}
public void PrayerOff(int n2) {
this.WaitForLoad();
this.a.D(n2);
}
public boolean Prayer(int n2) {
this.WaitForLoad();
return this.a.E(n2);
}
public int ShopCount(int n2) {
this.WaitForLoad();
return this.a.B(n2);
}
public void SetWorld(int n2) {
z.a(n2);
}
public int LastPlayerAttacked() {
return this.a.Pb;
}
public void ResetLastPlayerAttacked() {
this.a.Pb = -1;
}
public void Login(String string, String string2) {
this.a.a(string, string2, false);
}
public boolean LoggedIn() {
boolean bl = this.a.bh;
if (!q.d) {
if (bl) {
return true;
}
bl = false;
}
return bl;
}
/*
* Handled impossible loop by duplicating code
* Enabled aggressive block sorting
*/
static {
char[] cArray;
String[] stringArray;
block32: {
int n2;
int n3;
char[] cArray2;
int n4;
block31: {
char[] cArray3;
Object var0;
block30: {
int n5;
int n6;
char[] cArray4;
block29: {
char[] cArray5;
block28: {
int n7;
int n8;
char[] cArray6;
block27: {
stringArray = new String[3];
var0 = null;
char[] cArray7 = "9vu\nC<VB!QC$P\u0019k\u0010D^\u0001#\u0016fz\u000b`\r$v\u0001v\u0017`0\u000fwC$P\u0017f\u0015D".toCharArray();
n4 = 0;
int n9 = cArray7.length;
cArray6 = cArray7;
n8 = n9;
if (n9 <= 1) break block27;
cArray5 = cArray6;
n7 = n8;
if (n8 <= n4) break block28;
}
do {
char[] cArray8 = cArray6;
char[] cArray9 = cArray6;
int n10 = n4;
while (true) {
int n11;
char c2 = cArray8[n10];
switch (n4 % 5) {
case 0: {
n11 = 121;
break;
}
case 1: {
n11 = 4;
break;
}
case 2: {
n11 = 16;
break;
}
case 3: {
n11 = 110;
break;
}
default: {
n11 = 3;
}
}
cArray8[n10] = (char)(c2 ^ n11);
++n4;
cArray6 = cArray9;
n8 = n8;
if (n8 != 0) break;
cArray9 = cArray6;
n7 = n8;
n10 = n8;
cArray8 = cArray6;
}
cArray5 = cArray6;
n7 = n8;
} while (n8 > n4);
}
stringArray[0] = new String(cArray5).intern();
var0 = null;
char[] cArray10 = "U$".toCharArray();
n4 = 0;
int n12 = cArray10.length;
cArray4 = cArray10;
n6 = n12;
if (n12 <= 1) break block29;
cArray3 = cArray4;
n5 = n6;
if (n6 <= n4) break block30;
}
do {
char[] cArray11 = cArray4;
char[] cArray12 = cArray4;
int n13 = n4;
while (true) {
int n14;
char c3 = cArray11[n13];
switch (n4 % 5) {
case 0: {
n14 = 121;
break;
}
case 1: {
n14 = 4;
break;
}
case 2: {
n14 = 16;
break;
}
case 3: {
n14 = 110;
break;
}
default: {
n14 = 3;
}
}
cArray11[n13] = (char)(c3 ^ n14);
++n4;
cArray4 = cArray12;
n6 = n6;
if (n6 != 0) break;
cArray12 = cArray4;
n5 = n6;
n13 = n6;
cArray11 = cArray4;
}
cArray3 = cArray4;
n5 = n6;
} while (n6 > n4);
}
stringArray[1] = new String(cArray3).intern();
var0 = null;
char[] cArray13 = ".eb\u0000j\u0017c*NM\u0016$U\u0003s\r}0:j\u0015acNE\u0016q~\n".toCharArray();
n4 = 0;
int n15 = cArray13.length;
cArray2 = cArray13;
n3 = n15;
if (n15 <= 1) break block31;
cArray = cArray2;
n2 = n3;
if (n3 <= n4) break block32;
}
do {
char[] cArray14 = cArray2;
char[] cArray15 = cArray2;
int n16 = n4;
while (true) {
int n17;
char c4 = cArray14[n16];
switch (n4 % 5) {
case 0: {
n17 = 121;
break;
}
case 1: {
n17 = 4;
break;
}
case 2: {
n17 = 16;
break;
}
case 3: {
n17 = 110;
break;
}
default: {
n17 = 3;
}
}
cArray14[n16] = (char)(c4 ^ n17);
++n4;
cArray2 = cArray15;
n3 = n3;
if (n3 != 0) break;
cArray15 = cArray2;
n2 = n3;
n16 = n3;
cArray14 = cArray2;
}
cArray = cArray2;
n2 = n3;
} while (n3 > n4);
}
stringArray[2] = new String(cArray).intern();
z = stringArray;
}
}