Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Fletching script

Featured Replies

Hi, this is my first script and It's fletching maple logs to maple longbows.

My question is: is this script safe to use?

Here is the code:

 

 

UPDATE: 2/03/2014

Fixed:

- Typing 28 when bank is still open

- Added more antiban

- Fixed bank error where script stopped

 

TODO:

- Adding more logs & options

- GUI

 

import org.osbot.script.Script;
import org.osbot.script.ScriptManifest;

import org.osbot.script.rs2.ui.Tab;
import org.osbot.script.rs2.utility.Area;
import org.osbot.script.mouse.*;

@ScriptManifest(author = "Jowo", info = "FletchingScript!", name = "Basic Fletcher", version = 1.1)
public class FletchingWillows extends Script {
 
        private static final int[] Knife_ID = { 946};
        private int irandomx;
        private int irandomy;
        private int irandomx2;
        private int irandomy2;
        private int Antibanx;
        private int Antibany;
        private int MouseRandomx;
        private int MouseRandomy;
        
        
        final int[] WBOW_ID = {62};
        final int[] WILLOW_ID = {1517};
        private static final Area Fletching_AREA = new Area(2586,3422, 2586,3418);
        private static final Area BANK_AREA = new Area(2586,3422, 2586,3418);
        private enum State {
            FLETCH, BANK
    };
public void start(){
log("Starting script");
}
 
 
 
private State getState(){
if (client.getInventory().contains(66)&&(!myPlayer().isAnimating())){
return State.BANK;
}
 
else {
 
 
return State.FLETCH;
}
}
 
public int onLoop() throws InterruptedException {
switch (getState()) {
case FLETCH:
     if (!myPlayer().isAnimating()) {
     client.getInventory().interactWithId(946, "Use");
    sleep(random(400, 500));
     client.getInventory().interactWithId(1515, "Use");
     sleep(random(600,2000));
     irandomx=random(191,315);
     irandomy=random(373,403);
     
     client.moveMouseTo(new RectangleDestination(irandomx, irandomy, 10,10), false, true, true);
     sleep(random(500,600));
     irandomx2=random(irandomx-45,irandomx+49);
     irandomy2=random(irandomy+67,irandomy+73);
     client.moveMouseTo(new RectangleDestination(irandomx2, irandomy2, 10,10), false, true, false);
     sleep(random(750,2000));
     if (!myPlayer().isAnimating()&&(!client.getBank().isOpen())) {
     type("28");
     }
     sleep(random(500,3000));
          log("executing fletching");
          if (myPlayer().isAnimating()) {
              log("Entering Antiban system");
              switch(random(1,5)){
              //Antibanx=3;
              //switch (Antibanx) {
          case 1:
          log("Case 1");
          moveMouseOutsideScreen();
          sleep(random(4000,60000));
          log("Leaving antiban system");
          break;
     
          
          case 2:
          log("Case 2");
          client.rotateCameraPitch(random(1,120));
          sleep(random(6000,8000));
              log("Leaving antiban system");
              break;
          case 3:
          log("Case 3");
          openTab(Tab.SKILLS);
          Antibanx=random(611,668);
          Antibany=random(361,389);
          client.moveMouseTo(new RectangleDestination(Antibanx,Antibany, 10,10), false, false, false);
          sleep(random(7000,30000));
          openTab(Tab.INVENTORY);
          log("Leaving antiban system");
          break;
          case 4:
          log("Case 4");
          MouseRandomx=random(10,725);
          MouseRandomy=random(5,490);
          client.moveMouseTo(new RectangleDestination(MouseRandomx,MouseRandomy, 10,10), false, false, false);
          sleep(random(5000,16000));
          log("Leaving antiban system");
          break;
              
          case 5:
          log("Case 5:");
          sleep(random(35000,78000));
          log("Leaving antiban system");
          break;
          
          }
          
          
          
          }
     }
     
          
          
          
 
 
   
     
     
     
     
    break;     
     
 
     
case BANK:
log("Banking");
    RS2Object bank = closestObjectForName("Bank booth");
    if (bank != null) {
            if (bank.interact("Bank")) {
                    while (!client.getBank().isOpen())
                            sleep(random(250,350));
                    if (!client.getBank().isOpen()){
                    bank.interact("Bank");
                    }
                    client.getBank().depositAll(66);
                    sleep(random(200,450));
                    client.getBank().withdrawAll(1515);           
                    sleep(random(500,850));
                    client.getBank().close();
                    sleep(random(250,400));
                    if (client.getBank().isOpen()){
                     client.getBank().close();
                     log("Client bugged! Hersluiten van bank nu");
                    }
                    
                    switch(random(1,5)){
                    case 1:
                     log("Coming into antiban of bank!");
                     client.moveMouseTo(new RectangleDestination(MouseRandomx,MouseRandomy, 10,10), false, false, false);
                     sleep(random(350,700));
                     log("Leaving banking antiban");
                     
                     break;
                    case 2:
                     break;
                    case 3:
                     break;
                     
                    case 4:
                     break;
                    case 5:
                     break;
                     
              
                    }
                         log("Executing bank"); 
            }
    
     
    }
}
return random(250,1000);
}
 
 
 
 
public void onExit(){
log("Thx for using this");
}
}
 


Edited by jowo

If you wrote it, why wouldnt it be safe to use?

  • Author

If you wrote it, why wouldnt it be safe to use?

I am not sure if I wrote enough antiban. It's in the fletching case so everytime my player is fletching he will do an antiban.

My question is: Is this enough or shall i add more randoms/Antibans?

 

 

If you wrote it, why wouldnt it be safe to use?

Edited my post.

I am not sure if I wrote enough antiban. It's in the fletching case so everytime my player is fletching he will do an antiban.

My question is: Is this enough or shall i add more randoms/Antibans?

 

 

Edited my post.

 

With the implementation of the new AntiBot systems, i doubt the level of antiban you're talking about would make even the slightest of difference. Getting banned botting using skills like fletching is hit + miss, you're either lucky or you're not.

 

I say just use the script.

Edited by Divinity

  • Author

I am not sure if I wrote enough antiban. It's in the fletching case so everytime my player is fletching he will do an antiban.

My question is: Is this enough or shall i add more randoms/Antibans?

 

 

Edited my post.

Okay thank you, i'll add more options of wood, a gui and maybe they can put in the sdn :D!

  • Author

hmmm, well the only way to tell is to try it out yourself and post a few proggies of 10+ hour

I'll try if i have enough money to buy tons of yew logs :)

 

+ I'll update my script later on today.

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.