Advertisement
joedezzy1

Untitled

Jul 10th, 2014
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 3.29 KB | None | 0 0
  1. import org.tribot.api.Clicking;
  2. import org.tribot.api.General;
  3. import org.tribot.api.input.Mouse;
  4. import org.tribot.api2007.Skills;
  5. import org.tribot.api2007.Skills.SKILLS;
  6. import org.tribot.api.util.ABCUtil;
  7. import org.tribot.api2007.Camera;
  8. import org.tribot.api2007.GameTab;
  9. import org.tribot.api2007.GameTab.TABS;
  10. import org.tribot.api2007.Interfaces;
  11. import org.tribot.api2007.Inventory;
  12. import org.tribot.api2007.Objects;
  13.  
  14. public class ABC {
  15.        
  16.     private int timeMultiplier = 100;
  17.    
  18.     private long nextFLCheck;
  19.     private long nextXPCheck;
  20.     private long nextRanRight;
  21.     private long nextCamTurn;
  22.     private long currentTime;
  23.  
  24.     //user set
  25.     public static SKILLS skill;
  26.     public static String[] RANDOM_OBJECTS;
  27.     public static int ranFL1 = 0, ranFL2 = 0;
  28.     public static int ranXP1 = 0, ranXP2 = 0;
  29.     public static int ranR1 = 0, ranR2 = 0;
  30.     public static int cam1 = 0, cam2 = 0;
  31.     public static long hoverTime;
  32.     public static long friendsSleep;
  33.     public static boolean turningCamera;
  34.     public static boolean anglingCamera;
  35.     public static int maxCamRotDist;
  36.     public static int maxCamAngle;
  37.     public static int friendsIndex;
  38.    
  39.     public static boolean checkingXP;
  40.     public static boolean checkingFL;
  41.     public static boolean ranRightClicking;
  42.     public static boolean examining;
  43.     public static boolean rightClickingObjects;
  44.  
  45.     public ABC() {}
  46.    
  47.     public void refreshCheck(){
  48.        
  49.         nextFLCheck = (System.currentTimeMillis() * timeMultiplier)
  50.                 + General.random(ranFL1, ranFL2);
  51.        
  52.         nextXPCheck = (System.currentTimeMillis() * timeMultiplier)
  53.                 + General.random(ranXP1, ranXP2);
  54.        
  55.         nextRanRight = (System.currentTimeMillis() * timeMultiplier)
  56.                 + General.random(ranR1, ranR2);
  57.        
  58.         nextCamTurn = (System.currentTimeMillis() * timeMultiplier)
  59.                 + General.random(cam1, cam2);
  60.        
  61.     }
  62.    
  63.     public void refreshTime(){
  64.        
  65.         currentTime = (System.currentTimeMillis() * timeMultiplier);
  66.     }
  67.    
  68.     public void start(){
  69.        
  70.         if(checkingXP){
  71.             checkXP();
  72.            
  73.         }
  74.        
  75.         if(checkingFL){
  76.             checkFL();
  77.            
  78.         }
  79.        
  80.         if(ranRightClicking){
  81.             Mouse.randomRightClick();
  82.            
  83.         }
  84.        
  85.         if(rightClickingObjects){
  86.             randomRightClickObject();
  87.            
  88.         }
  89.        
  90.         if(turningCamera){
  91.             randomCameraRotate();
  92.            
  93.         }
  94.        
  95.         if(anglingCamera){
  96.             randomCameraAngle();
  97.            
  98.         }
  99.  
  100.     }
  101.        
  102.        
  103.     private void randomCameraAngle() {
  104.        
  105.         if(nextCamTurn > currentTime){
  106.             Camera.setCameraAngle(General.random(0, maxCamAngle));
  107.            
  108.         }
  109.     }
  110.  
  111.     private void randomCameraRotate() {
  112.        
  113.         if(nextCamTurn > currentTime){
  114.             Camera.setCameraRotation(General.random(0 , maxCamRotDist));
  115.            
  116.         }
  117.     }
  118.  
  119.     private void randomRightClickObject() {
  120.        
  121.        
  122.         if(currentTime > nextRanRight){
  123.             if(Objects.find(30, RANDOM_OBJECTS).length > 0){
  124.                 if(Objects.find(30, RANDOM_OBJECTS)[0].isOnScreen()){
  125.                     if(examining ? Clicking.click("Examine", Objects.find(30, RANDOM_OBJECTS))
  126.                                     : Clicking.click(Objects.find(30, RANDOM_OBJECTS))){
  127.                         General.sleep(1300, 2100);
  128.                        
  129.                     }
  130.                 }
  131.             }
  132.         }
  133.     }
  134.  
  135.     private void checkFL() {
  136.        
  137.         if(currentTime > nextFLCheck){
  138.             if(Interfaces.get(friendsIndex).click()){
  139.                 General.sleep(friendsSleep);
  140.                
  141.             }
  142.         }
  143.     }
  144.  
  145.     private void checkXP() {
  146.  
  147.         if (currentTime > nextXPCheck) {
  148.             if (GameTab.open(TABS.STATS)) {
  149.                 hover(skill);
  150.                
  151.             }
  152.         }
  153.     }
  154. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement