mirror of
https://github.com/2006-Scape/Parabot-317-API-Minified.git
synced 2026-07-06 08:39:34 +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);
|
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
|
* Drops an item
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package org.rev317.min.api.methods;
|
|||||||
import org.rev317.min.Loader;
|
import org.rev317.min.Loader;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Dane
|
* @author Dane, JKetelaar
|
||||||
*/
|
*/
|
||||||
public enum Skill {
|
public enum Skill {
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,19 @@ public class Item {
|
|||||||
Menu.interact(this, i);
|
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) {
|
public void transform(int actionIndex, int interfaceParentId) {
|
||||||
Menu.transformItem(this, actionIndex, interfaceParentId);
|
Menu.transformItem(this, actionIndex, interfaceParentId);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user