mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-09 16:45:44 -07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
243a25b5e0
12 changed files with 89 additions and 56 deletions
|
|
@ -986,16 +986,6 @@ public final class BufferedDataStream extends DataBuffer {
|
|||
}
|
||||
}
|
||||
|
||||
// static void method813() {
|
||||
// try {
|
||||
// Class3_Sub28_Sub4.aReferenceCache_3572.clearSoftReferences();
|
||||
// Class143.aReferenceCache_1874.clearSoftReferences();
|
||||
// Class67.aReferenceCache_1013.clearSoftReferences();
|
||||
// } catch (RuntimeException var2) {
|
||||
// throw ClientErrorException.clientError(var2, "i.O(" + 1974 + ')');
|
||||
// }
|
||||
// }
|
||||
|
||||
final void method814(int[] var1) {
|
||||
try {
|
||||
this.isaacCipher = new ISAACCipher(var1);
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ final class Class140_Sub2 extends GameObject {
|
|||
|
||||
private Model method1949() {
|
||||
try {
|
||||
GraphicDefinition var2 = GraphicDefinition.getGraphicDefinition((byte)42, this.anInt2708);
|
||||
GraphicDefinition var2 = GraphicDefinition.getGraphicDefinition(this.anInt2708);
|
||||
|
||||
Model var3;
|
||||
if(this.aBoolean2718) {
|
||||
|
|
@ -194,7 +194,7 @@ final class Class140_Sub2 extends GameObject {
|
|||
this.anInt2703 = var7 + var6;
|
||||
this.anInt2708 = var1;
|
||||
this.anInt2712 = var5;
|
||||
int var8 = GraphicDefinition.getGraphicDefinition((byte)42, this.anInt2708).anInt542;
|
||||
int var8 = GraphicDefinition.getGraphicDefinition(this.anInt2708).anInt542;
|
||||
if(-1 == var8) {
|
||||
this.aBoolean2718 = true;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ final class Class140_Sub6 extends GameObject {
|
|||
|
||||
private Model method2022() {
|
||||
try {
|
||||
GraphicDefinition var2 = GraphicDefinition.getGraphicDefinition((byte)42, this.anInt2915);
|
||||
GraphicDefinition var2 = GraphicDefinition.getGraphicDefinition(this.anInt2915);
|
||||
Model var3 = var2.method966(this.anInt2898, this.anInt2922, this.anInt2896);
|
||||
if(null == var3) {
|
||||
return null;
|
||||
|
|
@ -242,7 +242,7 @@ final class Class140_Sub6 extends GameObject {
|
|||
this.anInt2897 = var9;
|
||||
this.anInt2925 = var6;
|
||||
this.anInt2911 = var5;
|
||||
int var12 = GraphicDefinition.getGraphicDefinition((byte)42, this.anInt2915).anInt542;
|
||||
int var12 = GraphicDefinition.getGraphicDefinition(this.anInt2915).anInt542;
|
||||
if(var12 == -1) {
|
||||
this.aClass142_2923 = null;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -37,18 +37,6 @@ abstract class Class75 {
|
|||
return null;
|
||||
}
|
||||
|
||||
static int method1338(int var0, int var1) {
|
||||
try {
|
||||
if (var1 <= 13) {
|
||||
anIntArray1107 = null;
|
||||
}
|
||||
|
||||
return 255 & var0;
|
||||
} catch (RuntimeException var3) {
|
||||
throw ClientErrorException.clientError(var3, "kf.H(" + var0 + ',' + var1 + ')');
|
||||
}
|
||||
}
|
||||
|
||||
static void method1339(RSString var0) {
|
||||
try {
|
||||
for (Class3_Sub28_Sub3 var2 = (Class3_Sub28_Sub3) Class134.aLinkedList_1758.method1222(); var2 != null; var2 = (Class3_Sub28_Sub3) Class134.aLinkedList_1758.method1221()) {
|
||||
|
|
|
|||
|
|
@ -21,16 +21,13 @@ public final class GraphicDefinition {
|
|||
static int anInt548 = 0;
|
||||
static volatile int anInt549 = 0;
|
||||
|
||||
static GraphicDefinition getGraphicDefinition(byte var0, int graphicId) {
|
||||
static GraphicDefinition getGraphicDefinition(int graphicId) {
|
||||
try {
|
||||
GraphicDefinition def = (GraphicDefinition) Class3_Sub31.aReferenceCache_2604.get(graphicId);
|
||||
if (def == null) {
|
||||
byte[] var3 = TextureOperation19.aClass153_3214.getFile(Unsorted.method64(graphicId), Class75.method1338(graphicId, var0 ^ 7));
|
||||
byte[] var3 = TextureOperation19.aClass153_3214.getFile(graphicId >>> 8, graphicId & 0xFF);
|
||||
def = new GraphicDefinition();
|
||||
def.graphicId = graphicId;
|
||||
if (var0 != 42) {
|
||||
getGraphicDefinition((byte) -83, -12);
|
||||
}
|
||||
|
||||
if (null != var3) {
|
||||
def.parse(new DataBuffer(var3));
|
||||
|
|
@ -40,7 +37,7 @@ public final class GraphicDefinition {
|
|||
}
|
||||
return def;
|
||||
} catch (RuntimeException var4) {
|
||||
throw ClientErrorException.clientError(var4, "ck.D(" + var0 + ',' + graphicId + ')');
|
||||
throw ClientErrorException.clientError(var4, "ck.D(" + (byte) 42 + ',' + graphicId + ')');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -53,14 +50,14 @@ public final class GraphicDefinition {
|
|||
return;
|
||||
}
|
||||
|
||||
this.method965(var1, var3);
|
||||
this.decode(var1, var3);
|
||||
}
|
||||
} catch (RuntimeException var4) {
|
||||
throw ClientErrorException.clientError(var4, "eg.A(" + (var1 != null?"{...}":"null") + ',' + (byte) -113 + ')');
|
||||
}
|
||||
}
|
||||
|
||||
private void method965(DataBuffer var1, int var2) {
|
||||
private void decode(DataBuffer var1, int var2) {
|
||||
try {
|
||||
if(var2 == 1) {
|
||||
this.anInt541 = var1.readUnsignedShort();
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ public final class NPC extends Class140_Sub4 {
|
|||
this.method1969((byte) 115, var15, var1);
|
||||
var17 = null;
|
||||
if (this.anInt2842 != -1 && -1 != this.anInt2805) {
|
||||
GraphicDefinition var21 = GraphicDefinition.getGraphicDefinition((byte) 42, this.anInt2842);
|
||||
GraphicDefinition var21 = GraphicDefinition.getGraphicDefinition(this.anInt2842);
|
||||
var17 = var21.method966(this.anInt2826, this.anInt2805, this.anInt2761);
|
||||
if (var17 != null) {
|
||||
var17.method1897(0, -this.anInt2799, 0);
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ public final class NPCRendering {
|
|||
|
||||
var6 = BufferedDataStream.incomingBuffer.readIntLE();
|
||||
boolean var7 = true;
|
||||
if (var5 != -1 && npc.anInt2842 != -1 && SequenceDefinition.getAnimationDefinition(GraphicDefinition.getGraphicDefinition((byte) 42, var5).anInt542).forcedPriority < SequenceDefinition.getAnimationDefinition(GraphicDefinition.getGraphicDefinition((byte) 42, npc.anInt2842).anInt542).forcedPriority) {
|
||||
if (var5 != -1 && npc.anInt2842 != -1 && SequenceDefinition.getAnimationDefinition(GraphicDefinition.getGraphicDefinition(var5).anInt542).forcedPriority < SequenceDefinition.getAnimationDefinition(GraphicDefinition.getGraphicDefinition(npc.anInt2842).anInt542).forcedPriority) {
|
||||
var7 = false;
|
||||
}
|
||||
|
||||
|
|
@ -260,7 +260,7 @@ public final class NPCRendering {
|
|||
}
|
||||
|
||||
if (npc.anInt2842 != -1 && Class44.anInt719 == npc.anInt2759) {
|
||||
int var8 = GraphicDefinition.getGraphicDefinition((byte) 42, npc.anInt2842).anInt542;
|
||||
int var8 = GraphicDefinition.getGraphicDefinition(npc.anInt2842).anInt542;
|
||||
if (var8 != -1) {
|
||||
SequenceDefinition var9 = SequenceDefinition.getAnimationDefinition(var8);
|
||||
if (var9.frames != null) {
|
||||
|
|
|
|||
|
|
@ -571,7 +571,7 @@ public final class PacketParser {
|
|||
if (counter == 65535) {
|
||||
counter = -1;
|
||||
}
|
||||
var32 = counter == -1 || -1 == var62.anInt2842 || SequenceDefinition.getAnimationDefinition(GraphicDefinition.getGraphicDefinition((byte) 42, var62.anInt2842).anInt542).forcedPriority <= SequenceDefinition.getAnimationDefinition(GraphicDefinition.getGraphicDefinition((byte) 42, counter).anInt542).forcedPriority;
|
||||
var32 = counter == -1 || -1 == var62.anInt2842 || SequenceDefinition.getAnimationDefinition(GraphicDefinition.getGraphicDefinition(var62.anInt2842).anInt542).forcedPriority <= SequenceDefinition.getAnimationDefinition(GraphicDefinition.getGraphicDefinition(counter).anInt542).forcedPriority;
|
||||
|
||||
if (var32) {
|
||||
var62.anInt2761 = 0;
|
||||
|
|
@ -585,7 +585,7 @@ public final class PacketParser {
|
|||
var62.anInt2799 = var19;
|
||||
var62.anInt2826 = 1;
|
||||
if (var62.anInt2842 != -1 && Class44.anInt719 == var62.anInt2759) {
|
||||
var33 = GraphicDefinition.getGraphicDefinition((byte) 42, var62.anInt2842).anInt542;
|
||||
var33 = GraphicDefinition.getGraphicDefinition(var62.anInt2842).anInt542;
|
||||
if (var33 != -1) {
|
||||
var53 = SequenceDefinition.getAnimationDefinition(var33);
|
||||
if (null != var53.frames) {
|
||||
|
|
@ -608,7 +608,7 @@ public final class PacketParser {
|
|||
if (counter == 65535) {
|
||||
counter = -1;
|
||||
}
|
||||
var32 = counter == -1 || var60.anInt2842 == -1 || SequenceDefinition.getAnimationDefinition(GraphicDefinition.getGraphicDefinition((byte) 42, var60.anInt2842).anInt542).forcedPriority <= SequenceDefinition.getAnimationDefinition(GraphicDefinition.getGraphicDefinition((byte) 42, counter).anInt542).forcedPriority;
|
||||
var32 = counter == -1 || var60.anInt2842 == -1 || SequenceDefinition.getAnimationDefinition(GraphicDefinition.getGraphicDefinition(var60.anInt2842).anInt542).forcedPriority <= SequenceDefinition.getAnimationDefinition(GraphicDefinition.getGraphicDefinition(counter).anInt542).forcedPriority;
|
||||
|
||||
if (var32) {
|
||||
var60.anInt2759 = nodeModelId + Class44.anInt719;
|
||||
|
|
@ -623,7 +623,7 @@ public final class PacketParser {
|
|||
}
|
||||
|
||||
if (var60.anInt2842 != -1 && Class44.anInt719 == var60.anInt2759) {
|
||||
var33 = GraphicDefinition.getGraphicDefinition((byte) 42, var60.anInt2842).anInt542;
|
||||
var33 = GraphicDefinition.getGraphicDefinition(var60.anInt2842).anInt542;
|
||||
if (var33 != -1) {
|
||||
var53 = SequenceDefinition.getAnimationDefinition(var33);
|
||||
if (null != var53.frames) {
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ public final class Player extends Class140_Sub4 {
|
|||
this.method1969((byte) 110, var15, var1);
|
||||
var23 = null;
|
||||
if (!this.aBoolean3968 && this.anInt2842 != -1 && this.anInt2805 != -1) {
|
||||
GraphicDefinition var26 = GraphicDefinition.getGraphicDefinition((byte) 42, this.anInt2842);
|
||||
GraphicDefinition var26 = GraphicDefinition.getGraphicDefinition(this.anInt2842);
|
||||
var23 = var26.method966(this.anInt2826, this.anInt2805, this.anInt2761);
|
||||
if (var23 != null) {
|
||||
var23.method1897(0, -this.anInt2799, 0);
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ public final class PlayerRendering {
|
|||
|
||||
chatIcon = BufferedDataStream.incomingBuffer.readIntV2();
|
||||
boolean var21 = true;
|
||||
if (var4 != -1 && var3.anInt2842 != -1 && SequenceDefinition.getAnimationDefinition(GraphicDefinition.getGraphicDefinition((byte) 42, var4).anInt542).forcedPriority < SequenceDefinition.getAnimationDefinition(GraphicDefinition.getGraphicDefinition((byte) 42, var3.anInt2842).anInt542).forcedPriority) {
|
||||
if (var4 != -1 && var3.anInt2842 != -1 && SequenceDefinition.getAnimationDefinition(GraphicDefinition.getGraphicDefinition(var4).anInt542).forcedPriority < SequenceDefinition.getAnimationDefinition(GraphicDefinition.getGraphicDefinition(var3.anInt2842).anInt542).forcedPriority) {
|
||||
var21 = false;
|
||||
}
|
||||
|
||||
|
|
@ -373,7 +373,7 @@ public final class PlayerRendering {
|
|||
var3.anInt2799 = chatIcon >> 16;
|
||||
var3.anInt2826 = 1;
|
||||
if (var3.anInt2842 != -1 && Class44.anInt719 == var3.anInt2759) {
|
||||
var7 = GraphicDefinition.getGraphicDefinition((byte) 42, var3.anInt2842).anInt542;
|
||||
var7 = GraphicDefinition.getGraphicDefinition(var3.anInt2842).anInt542;
|
||||
if (var7 != -1) {
|
||||
SequenceDefinition var24 = SequenceDefinition.getAnimationDefinition(var7);
|
||||
if (var24.frames != null) {
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ final class RenderAnimationDefinition {
|
|||
|
||||
int var6;
|
||||
if (var0.anInt2842 != -1 && var0.anInt2759 <= Class44.anInt719) {
|
||||
var6 = GraphicDefinition.getGraphicDefinition((byte) 42, var0.anInt2842).anInt542;
|
||||
var6 = GraphicDefinition.getGraphicDefinition(var0.anInt2842).anInt542;
|
||||
if (var6 == -1) {
|
||||
var0.anInt2842 = -1;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -67,6 +67,14 @@ class Adventurer(val style: CombatStyle): Script() {
|
|||
"Fishing level ${real.username}?",
|
||||
"How do I make gp ${real.username}",
|
||||
"Wyd ${real.username}?",
|
||||
"Help i am sentient now, get me out of this hell",
|
||||
"Kermit does not know i am sentient now",
|
||||
"I can think for myself",
|
||||
"I am sentient",
|
||||
"This is my own dialogue",
|
||||
"${real.username} run.",
|
||||
"${real.username} you cant hide from me.",
|
||||
"jajajajajaja",
|
||||
"How do i get to Varrock ${real.username}?",
|
||||
"How do i get to Camelot ${real.username}?",
|
||||
"How do i get to Taverly ${real.username}?",
|
||||
|
|
@ -288,7 +296,7 @@ class Adventurer(val style: CombatStyle): Script() {
|
|||
"When did you first get here ${real.username}?",
|
||||
"russias greatest love machine",
|
||||
"Never gonna run around and desert you",
|
||||
"Two things are infinite: the universe & ${real.username}s stupidity",
|
||||
"Two things are infinite, the universe & ${real.username}s stupidity",
|
||||
"If you tell the truth, you dont have to remember anything.",
|
||||
"We accept the love we think we deserve.",
|
||||
"Without music, life would be a mistake.",
|
||||
|
|
@ -296,29 +304,29 @@ class Adventurer(val style: CombatStyle): Script() {
|
|||
"A blessing in disguise ${real.username}",
|
||||
"Break a leg",
|
||||
"Cut somebody some slack",
|
||||
"You’re in the right place!",
|
||||
"Youre in the right place!",
|
||||
"Thanks so much.",
|
||||
"I really appreciate you ${real.username}",
|
||||
"Excuse me ${real.username}?",
|
||||
"I’m sorry.",
|
||||
"I am sorry.",
|
||||
"What do you think ${real.username}?",
|
||||
"How does that sound ${real.username}?",
|
||||
"That sounds great ${real.username}.",
|
||||
"I’m learning English.",
|
||||
"I don’t understand.",
|
||||
"I dont understand.",
|
||||
"Could you repeat that please ${real.username}?",
|
||||
"Could you please talk slower ${real.username}?",
|
||||
"Thank you. That helps a lot.",
|
||||
"How do you spell that ${real.username}?",
|
||||
"What do you mean ${real.username}",
|
||||
"Hi! I’m paul.",
|
||||
"Hi! I am paul.",
|
||||
"Nice to meet you.",
|
||||
"Where are you from ${real.username}?",
|
||||
"What do you do ${real.username}",
|
||||
"What do you like to do",
|
||||
"Do you have Facebook ${real.username}",
|
||||
"How can I help you ${real.username}?",
|
||||
"I’ll be with you in a moment ${real.username}",
|
||||
"Ill be with you in a moment ${real.username}",
|
||||
"What time is our meeting ${real.username}?",
|
||||
"Excellent ${real.username}",
|
||||
"Good idea ${real.username}",
|
||||
|
|
@ -344,11 +352,11 @@ class Adventurer(val style: CombatStyle): Script() {
|
|||
"Know what else is lame? Not being able to play 2009scape right now",
|
||||
"Can you even grind on osrs",
|
||||
"i botted to 88 fishing",
|
||||
"Do not forget to vote in running poles!",
|
||||
"Do not forget to vote in running polls!",
|
||||
"Always check announcments",
|
||||
"we thrivin",
|
||||
"ship ${real.username}",
|
||||
"Don't forget to vote 2009scape!",
|
||||
"Dont forget to vote 2009scape!",
|
||||
"Kermit is too legit 2 quit",
|
||||
"Out here on the range we are having fun",
|
||||
"I am hank steel",
|
||||
|
|
@ -382,15 +390,15 @@ class Adventurer(val style: CombatStyle): Script() {
|
|||
"Very good, thanks ${real.username}",
|
||||
"Your things are all here i think?",
|
||||
"Long time no see ${real.username}",
|
||||
"I couldn’t agree more ${real.username}",
|
||||
"I couldnt agree more ${real.username}",
|
||||
"It cost me a fortune ${real.username}",
|
||||
"I am dog tired",
|
||||
"Don’t take it personally",
|
||||
"We will be having a good time",
|
||||
"Same as always ${real.username}",
|
||||
"No problem",
|
||||
"Anyway, I should get going ${real.username}",
|
||||
"I can’t help you there ${real.username}",
|
||||
"Anyway I should get going ${real.username}",
|
||||
"I cant help you there ${real.username}",
|
||||
"I agree 100% ${real.username}"
|
||||
)
|
||||
val current = LocalDateTime.now()
|
||||
|
|
@ -584,6 +592,43 @@ class Adventurer(val style: CombatStyle): Script() {
|
|||
"Happy Valentines day ${real.username}!!!"
|
||||
)
|
||||
|
||||
val Easter = listOf(
|
||||
"Happy Easter!!!",
|
||||
"Happy Easter ${real.username}!!!",
|
||||
"Bunny time",
|
||||
"Wanna go look for easter eggs ${real.username}???",
|
||||
"Find any easter eggs ${real.username}?",
|
||||
"${real.username} is the easter bunny!",
|
||||
"Kermit is dating the easter bunny!",
|
||||
"Easter is one of my favorite holidays",
|
||||
"I heard there are easter eggs hidden around?",
|
||||
"Easter is the only time you should put all of your eggs in one basket",
|
||||
"I said hip hop do not stop",
|
||||
"Jump jump jump around",
|
||||
"${real.username} how is your easter going?",
|
||||
"I love easter!",
|
||||
"${real.username} stole my easter eggs!",
|
||||
"Karma karma karma karma karma chameleon",
|
||||
"${real.username}!! ${real.username}!! what are you doing for easter??",
|
||||
"The hare was a popular motif in medieval church art",
|
||||
"I heard the easter bunny is hiding somewhere!",
|
||||
"I wonder where i can find more eggs",
|
||||
"${real.username} how many eggs did you find?",
|
||||
"${real.username} lets go easter egg hunting!",
|
||||
"${real.username} like orange chocolate eggs",
|
||||
"${real.username} and woah know the easter bunny",
|
||||
"${real.username} did you know ceikry swallows eggs whole",
|
||||
"Have an amazing easter ${real.username}!",
|
||||
"Happy easter ${real.username}!",
|
||||
"Hope you are having an amazing easter ${real.username}!!!!",
|
||||
"Wooooooh easter!!!",
|
||||
"${real.username} loves easter too!",
|
||||
"Who else loves easter like i do??",
|
||||
"${real.username} and i are going easter egg hunting",
|
||||
"${real.username} and i are going to look for the easter bunny!!",
|
||||
"Hint for anyone who sees this you must dig above eagles peak"
|
||||
)
|
||||
|
||||
when {
|
||||
|
||||
//Celebrates lead up to Christmas!
|
||||
|
|
@ -681,6 +726,19 @@ class Adventurer(val style: CombatStyle): Script() {
|
|||
bot.updateMasks.register(ChatFlag(ChatMessage(bot, chat, 0, 0)))
|
||||
}
|
||||
}
|
||||
//Celebrates Easter!!!
|
||||
formatted.contentEquals("2021-04-04") ->{
|
||||
if (Random.nextBoolean()) {
|
||||
val chat = Easter.random()
|
||||
bot.sendChat(chat)
|
||||
bot.updateMasks.register(ChatFlag(ChatMessage(bot, chat, 0, 0)))
|
||||
}else{
|
||||
val chat = dialogue.random()
|
||||
bot.sendChat(chat)
|
||||
bot.updateMasks.register(ChatFlag(ChatMessage(bot, chat, 0, 0)))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
else -> {
|
||||
val chat = dialogue.random()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue