Few small updates

This commit is contained in:
Ethan
2019-12-17 06:26:52 -06:00
parent 67e801cf9c
commit cdd2f2e673
8 changed files with 15 additions and 9 deletions
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+5 -5
View File
@@ -494,7 +494,7 @@ public class Client extends GameApplet {
private int anInt1193;
private int splitPrivateChat;
private IndexedImage mapBack;
private String[] menuActionText;
public String[] menuActionText;
private Sprite flameLeftSprite;
private Sprite flameRightSprite;
private int minimapRotation;
@@ -505,7 +505,7 @@ public class Client extends GameApplet {
private int loginScreenCursorPos;
private long aLong1220;
private int hintIconNpcId;
private int inputDialogState;
public int inputDialogState;
private int nextSong;
private boolean fadeMusic;
private CollisionMap[] collisionMaps;
@@ -4762,7 +4762,7 @@ public class Client extends GameApplet {
clicked = selectedMenuActions[index];
}
//System.out.println("First: "+first + " button: "+button + " action: "+action + " clicked: "+clicked+ " actionText: "+menuActionText[index]);
System.out.println("First: "+first + " button: "+button + " action: "+action + " clicked: "+clicked+ " actionText: "+menuActionText[index]);
if (action >= 2000) {
action -= 2000;
}
@@ -5927,7 +5927,7 @@ public class Client extends GameApplet {
if (widget != null && widget.inventoryAmounts[first] >= 0x186a0)
s5 = widget.inventoryAmounts[first] + " x " + itemDef.name;
else if (itemDef.description != null)
s5 = itemDef.description;
s5 = new String(itemDef.description);
else
s5 = "It's a " + itemDef.name + ".";
sendMessage(s5, 0, "");
@@ -6002,7 +6002,7 @@ public class Client extends GameApplet {
ItemDefinition definition = ItemDefinition.lookup(clicked);
String string;
if (definition.description != null)
string = definition.description;
string = new String(definition.description);
else
string = "It's a " + definition.name + ".";
sendMessage(string, 0, "");
+3 -4
View File
@@ -45,7 +45,7 @@ public final class ItemDefinition {
} else if (opcode == 2) {
name = buffer.readString();
} else if (opcode == 3) {
description = buffer.readString();
description = buffer.readBytes();
} else if (opcode == 4) {
modelZoom = buffer.readUShort();
} else if (opcode == 5) {
@@ -92,7 +92,6 @@ public final class ItemDefinition {
}
actions[opcode - 35] = buffer.readString();
} else if (opcode == 40) {
int colors = buffer.readUnsignedByte();
modifiedModelColors = new int[colors];
originalModelColors = new int[colors];
@@ -302,7 +301,7 @@ public final class ItemDefinition {
char c = itemDef_1.name.charAt(0);
if (c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U')
s = "an";
description = ("Swap this note at any bank for " + s + " " + itemDef_1.name + ".");
description = ("Swap this note at any bank for " + s + " " + itemDef_1.name + ".").getBytes();
stackable = true;
}
@@ -528,7 +527,7 @@ public final class ItemDefinition {
public int inventoryModel;
public int equippedMaleModelDialogue1;
public boolean stackable;
public String description;
public byte[] description;
public int unnotedItemId;
private static int cacheIndex;
public int modelZoom;
@@ -2,6 +2,7 @@ package org.rebotted.script;
import org.rebotted.script.scriptdata.ScriptData;
import org.rebotted.script.types.Script;
import org.rebotted.ui.BotFrame;
import org.rebotted.util.Condition;
public class ScriptHandler implements Runnable {
@@ -41,6 +42,7 @@ public class ScriptHandler implements Runnable {
}
} catch (Exception e) {
stop();
e.printStackTrace();
}
}
@@ -79,15 +81,18 @@ public class ScriptHandler implements Runnable {
this.scriptState = State.STOPPED;
this.script.onStop();
this.scriptThread.interrupt();
BotFrame.setStopped();
}
public void pause() {
if (scriptState.equals(State.RUNNING)) {
System.out.println("Script Paused: " + scriptData.getName());
this.scriptState = State.PAUSE;
BotFrame.setPaused();
} else if (scriptState.equals(State.PAUSE)) {
System.out.println("Script resumed: " + scriptData.getName());
this.scriptState = State.RUNNING;
BotFrame.setRunning();
}
}
@@ -3,6 +3,7 @@ package org.rebotted.ui;
import org.rebotted.Client;
import org.rebotted.Configuration;
import org.rebotted.GameApplet;
import org.rebotted.cache.def.ItemDefinition;
import org.rebotted.script.ScriptHandler;
import org.rebotted.script.loader.ScriptLoader;
import org.rebotted.ui.menu.BotMenuBar;
@@ -12,6 +13,7 @@ import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Arrays;
public final class BotFrame extends JFrame implements ActionListener {