Update Scripts to 2021-11-24

This commit is contained in:
RuneLite Cache-Code Autoupdater
2021-11-23 07:50:23 -07:00
committed by Max Weber
parent 0b4976b87b
commit 084edbffb6
19 changed files with 1549 additions and 917 deletions

View File

@@ -127,7 +127,8 @@ public class CommandManager
int intStackCount = client.getIntStackSize();
final String typedText = stringStack[stringStackCount - 1];
final int chatType = intStack[intStackCount - 1];
final int chatType = intStack[intStackCount - 2];
final int clanTarget = intStack[intStackCount - 1];
ChatboxInput chatboxInput = new ChatboxInput(typedText, chatType)
{
@@ -142,7 +143,7 @@ public class CommandManager
}
resumed = true;
clientThread.invoke(() -> sendChatboxInput(chatType, typedText));
clientThread.invoke(() -> sendChatboxInput(typedText, chatType, clanTarget));
}
};
boolean stop = false;
@@ -198,12 +199,12 @@ public class CommandManager
}
}
private void sendChatboxInput(int chatType, String input)
private void sendChatboxInput(String input, int chatType, int clanTarget)
{
sending = true;
try
{
client.runScript(ScriptID.CHATBOX_INPUT, chatType, input);
client.runScript(ScriptID.CHAT_SEND, input, chatType, clanTarget, 0, -1);
}
finally
{

View File

@@ -57,8 +57,6 @@ import net.runelite.client.util.ColorUtil;
public class KeyRemappingPlugin extends Plugin
{
private static final String PRESS_ENTER_TO_CHAT = "Press Enter to Chat...";
private static final String SCRIPT_EVENT_SET_CHATBOX_INPUT = "setChatboxInput";
private static final String SCRIPT_EVENT_BLOCK_CHAT_INPUT = "blockChatInput";
@Inject
private Client client;
@@ -160,14 +158,14 @@ public class KeyRemappingPlugin extends Plugin
{
switch (scriptCallbackEvent.getEventName())
{
case SCRIPT_EVENT_SET_CHATBOX_INPUT:
case "setChatboxInput":
Widget chatboxInput = client.getWidget(WidgetInfo.CHATBOX_INPUT);
if (chatboxInput != null && !typing)
{
setChatboxWidgetInput(chatboxInput, PRESS_ENTER_TO_CHAT);
}
break;
case SCRIPT_EVENT_BLOCK_CHAT_INPUT:
case "blockChatInput":
if (!typing)
{
int[] intStack = client.getIntStack();