mirror of
https://github.com/2006-Scape/Parabot-317-API-Minified.git
synced 2026-07-02 16:49:09 +00:00
[FEATURE] Added dialog input && Set amount
This commit is contained in:
@@ -20,6 +20,8 @@ public interface Client {
|
||||
|
||||
void setInterface(int id);
|
||||
|
||||
void setAmountOrNameInput(int amount);
|
||||
|
||||
int[] getCurrentExp();
|
||||
|
||||
Deque[][][] getGroundItems();
|
||||
@@ -28,6 +30,8 @@ public interface Client {
|
||||
|
||||
int getBackDialogId();
|
||||
|
||||
int getInputDialogState();
|
||||
|
||||
int getPlane();
|
||||
|
||||
int[] getMenuActionId();
|
||||
|
||||
@@ -45,6 +45,14 @@ public class Game {
|
||||
return Loader.getClient().getBackDialogId();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get current input dialog state
|
||||
* @return input dialog state
|
||||
*/
|
||||
public static int getInputDialogState() {
|
||||
return Loader.getClient().getInputDialogState();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets loop cycle
|
||||
*
|
||||
|
||||
@@ -36,6 +36,14 @@ public class Interfaces {
|
||||
Loader.getClient().setInterface(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the int by the given Amount
|
||||
* @param amount Amount to set
|
||||
*/
|
||||
public static void setAmountOrNameInput(int amount) {
|
||||
Loader.getClient().setAmountOrNameInput(amount);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get's the Open Interface ID.
|
||||
* @return The ID of the Open Interface , will be -1 if all Interfaces are closed.
|
||||
|
||||
@@ -296,4 +296,3 @@ public class Inventory {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@ import org.rev317.min.accessors.Client;
|
||||
import org.rev317.min.api.wrappers.Character;
|
||||
import org.rev317.min.api.wrappers.*;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
@@ -320,6 +322,17 @@ public class Menu {
|
||||
|
||||
Client client = Loader.getClient();
|
||||
|
||||
try {
|
||||
Method doAction = client.getClass().getDeclaredMethod("doAction", int.class);
|
||||
doAction.setAccessible(true);
|
||||
|
||||
doAction.invoke(client, 0);
|
||||
|
||||
} catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
client.getMenuAction1()[index] = cmd1;
|
||||
client.getMenuAction2()[index] = cmd2;
|
||||
client.getMenuAction3()[index] = cmd3;
|
||||
|
||||
Reference in New Issue
Block a user