Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void ladderOrDoorInteract(String object, String action, int X, int Y, int Z){
- GameObject objectToInteract = getGameObjects().closest(new Filter<GameObject>(){
- public boolean match(GameObject Object){
- if(Object == null || Object.getName() == null) {
- return false;
- }
- if(!Object.getName().equals(object)) {
- return false;
- }
- if(!Object.getTile().equals(new Tile(X,Y,Z))) {
- return false;
- }
- return true;
- }
- });
- if(objectToInteract != null){
- if(objectToInteract.interact(action)){
- sleepUntil(new Condition(){
- public boolean verify(){
- return !objectToInteract.exists();
- }
- },Calculations.random(1400,1700));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement