Jump to content

thepecher

Members
  • Posts

    895
  • Joined

  • Last visited

  • Feedback

    100%

Posts posted by thepecher

  1. First off, thanks for explaining the logic of such a path handling method and his obstacle class

    //list is made with positions you want to reach and obstacles you want to handle
    public void TraversePath(Script sI, ArrayList list) throws InterruptedException {
    		sI=this.sI;
    		
    		int entry=findEntry(sI,list);
    		for (int i = entry; i < (list.size());) {
    
    		sI.log("Tackling path/obstacle number: " +i);
    		if(list.get(i) instanceof Position ){
    			sI.log("Instance position");
    			if(sI.map.canReach((Position)list.get(i)) && sI.myPlayer().getPosition() != list.get(i)){
    				sI.log("CanReach is true, first if()");
    				sI.localWalker.walk((Position) list.get(i));
    				clickMiniMapPosition((Position) list.get(i));
    				i++;
    			} else{
    				sI.log("CanReach is false, second if()");
    				i--;
    				
    				}
    			
    		}
    		else if(list.get(i) instanceof Obstacle){
    			
    			sI.log("Instance Obstacle");
    			String obstacleName=((Obstacle)list.get(i)).getName();
    			RS2Object obstacleObject=sI.objects.closest(obstacleName);
    			
    		
    			
    			if(sI.map.canReach(((Obstacle)list.get(i)).getPosition()) && sI.myPlayer().getPosition() != ((Obstacle)list.get(i)).getPosition()){
    				sI.log("CanReach is true, first if()");
    				sI.localWalker.walk(((Obstacle)list.get(i)).getPosition());
    				clickMiniMapPosition(((Obstacle)list.get(i)).getPosition());
    				i++;
    			} else if(obstacleObject !=null && obstacleObject.exists() && (obstacleObject.hasAction(((Obstacle)list.get(i)).getAction()) || obstacleName=="Trapdoor")){
    			
    				sI.log("CanReach is false, second if()");
    				
    				if(obstacleObject.getOrientation()==0 || obstacleObject.getOrientation()==2){
    					sI.camera.moveYaw(MethodProvider.random(246,300));
    				} else{sI.camera.moveYaw(MethodProvider.random(150,200));}
    				//^for broken interaction, thanks OsBot
    
    				obstacleObject.interact(((Obstacle) list.get(i)).getAction());		
    				
    					i++;
    			} else{
    				i--;
    			}
    			}
    		sI.sleep(MethodProvider.random(1000,1500));
    		if(i==list.size()+1){
    			i=0;
    		}
    		if(i==-1){
    			i=list.size();
    		}
    	
    	}
    	}
    
    public static int findEntry(Script script, ArrayList path) {
    		int index = -1;
    		for (int i = 0; i < path.size(); i++) {
    			Object o = path.get(i);
    			if (o instanceof Position && script.getMap().canReach(((Position) o))) {
    				index = i;
    			}
    		}
    		return index;
    	}
    
    
    public boolean clickMiniMapPosition(Position position) throws InterruptedException {
    		return sI.mouse.click(new MiniMapTileDestination(sI.bot, position), false);
    	}
    
     
    public class Obstacle {
    	
    	
            private final String name;
            private final String action;
            private final Position position;
           
            public Obstacle(final String name, final String action, final Position position) {
                    this.name = name;
                    this.action = action;
                    this.position = position;
            }
            
            public Position getPosition()
            {
                return this.position;
            }
            public String getAction()
            {
            	return this.action;
            }
            public String getName()
            {
            	return this.name;
            }
         
    }
    
    • Like 1
  2. ...people think he means cigarettes.

     

    lol

     

     

    do you mean a cigarette after sex or how a faggot feels after sex?

     

     

    Or is he saying he feels like a faggot after sex? 

     

     

    doesn't he mean that he's a faggot looking for sex?

     

    So many questions left unanswered

×
×
  • Create New...