mirror of
https://github.com/2006-Scape/Parabot-317-API-Minified.git
synced 2026-07-03 00:38:00 +00:00
Update MenuAction.java
Added in the ActionEvent stuff.
This commit is contained in:
@@ -4,22 +4,30 @@ import org.rev317.min.Loader;
|
||||
import org.rev317.min.accessors.Client;
|
||||
import org.rev317.min.debug.DActions;
|
||||
|
||||
import org.rev317.min.api.events.ActionEvent;
|
||||
|
||||
import org.rev317.min.script.ScriptEngine;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Everel
|
||||
*
|
||||
* @author mat123337
|
||||
*
|
||||
*/
|
||||
public class MenuAction {
|
||||
|
||||
public static void intercept(int index) {
|
||||
if(DActions.debugActions()) {
|
||||
Client client = Loader.getClient();
|
||||
int action1 = client.getMenuAction1()[index];
|
||||
int action2 = client.getMenuAction2()[index];
|
||||
int action3 = client.getMenuAction3()[index];
|
||||
int actionId = client.getMenuActionId()[index];
|
||||
if(DActions.debugActions()) {
|
||||
Client client = Loader.getClient();
|
||||
System.out.println(String.format("[index: %d, action1: %d, action2: %d, action3: %d, id: %d]", index, action1, action2, action3, actionId));
|
||||
}
|
||||
|
||||
final ActionEvent actionEvent = new ActionEvent(actionId,action1,action2,action3,index);
|
||||
ScriptEngine.getInstance().dispatch(actionEvent);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user