mirror of
https://github.com/2006-Scape/Parabot-317-API-Minified.git
synced 2026-07-03 00:38:00 +00:00
Added item interaction with stringsi.interact(use); - as example
This commit is contained in:
@@ -167,6 +167,25 @@ public class Menu {
|
||||
sendAction(actionId, item.getSlot(), item.getId(), 3214);
|
||||
}
|
||||
|
||||
public static void interact(Item item, String action){
|
||||
int actionId = 447;
|
||||
switch (action.toLowerCase()){
|
||||
case "use":
|
||||
actionId = 447;
|
||||
break;
|
||||
case "drop":
|
||||
actionId = 847;
|
||||
break;
|
||||
case "examine":
|
||||
actionId = 1125;
|
||||
break;
|
||||
case "cancel":
|
||||
actionId = 1107;
|
||||
break;
|
||||
}
|
||||
sendAction(actionId, item.getSlot(), item.getId(), 3214);
|
||||
}
|
||||
|
||||
/**
|
||||
* Drops an item
|
||||
*
|
||||
|
||||
@@ -3,7 +3,7 @@ package org.rev317.min.api.methods;
|
||||
import org.rev317.min.Loader;
|
||||
|
||||
/**
|
||||
* @author Dane
|
||||
* @author Dane, JKetelaar
|
||||
*/
|
||||
public enum Skill {
|
||||
|
||||
|
||||
@@ -58,6 +58,19 @@ public class Item {
|
||||
Menu.interact(this, i);
|
||||
}
|
||||
|
||||
/**
|
||||
* Interacts with this item
|
||||
* @param s
|
||||
*/
|
||||
public void interact(String s){
|
||||
Menu.interact(this, s);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param actionIndex
|
||||
* @param interfaceParentId
|
||||
*/
|
||||
public void transform(int actionIndex, int interfaceParentId) {
|
||||
Menu.transformItem(this, actionIndex, interfaceParentId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user