Adblock breaks this site

Quick Question About Rsbot

Discussion in 'Archives' started by EliasWhufc, Feb 16, 2009.

Thread Status:
Not open for further replies.
  1. EliasWhufc

    EliasWhufc Active Member
    Banned

    Joined:
    Jan 23, 2009
    Posts:
    116
    Referrals:
    0
    Sythe Gold:
    0
    Quick Question About Rsbot

    When people request scripts and they give them the details in the forum.

    How do i save that info and put it into the Rsbot?

    for instance this :

    import java.awt.*;

    import com.speljohan.rsbot.bot.Bot;
    import com.speljohan.rsbot.event.listeners.PaintListener;
    import com.speljohan.rsbot.script.Script;
    import com.speljohan.rsbot.script.wrappers.*;

    public class Snaper extends Script implements PaintListener {

    public int State = 0;
    public int Runs = 0;
    public int BankID = 11758;
    public int Snape = 231;
    public long startTime = System.currentTimeMillis();
    public long time = System.currentTimeMillis();
    public final RSTile[] Tosnape = {
    new RSTile(3010, 3355),
    new RSTile(3006, 3351),
    new RSTile(3006, 3339),
    new RSTile(3006, 3328),
    new RSTile(3005, 3318),
    new RSTile(2997, 3314),
    new RSTile(2993, 3306),
    new RSTile(2987, 3302),
    new RSTile(2982, 3292),
    new RSTile(2973, 3287),
    new RSTile(2964, 3281),
    new RSTile(2954, 3277),
    new RSTile(2945, 3272),
    new RSTile(2937, 3264),
    new RSTile(2928, 3263),
    new RSTile(2918, 3268),
    new RSTile(2911, 3278),
    new RSTile(2907, 3288),
    new RSTile(2906, 3295)
    };
    public final RSTilePath Snapepath = new RSTilePath(Tosnape, this);
    public RSTile[] Tobank = reversePath(Tosnape);
    public final RSTilePath Bankpath = new RSTilePath(Tobank, this);
    int randomTab[] = new int[] { TAB_ATTACK, TAB_STATS, TAB_QUESTS,
    TAB_INVENTORY, TAB_EQUIPMENT, TAB_PRAYER, TAB_MAGIC, TAB_LOGOUT,
    TAB_FRIENDS, TAB_IGNORE, TAB_CLAN, TAB_OPTIONS, TAB_CONTROLS, TAB_MUSIC };

    public boolean onStart(String[] args) {
    Bot.getEventManager( ).addListener(PaintListener.class, this);
    return true;
    }

    public void onFinish( ) {
    Bot.getEventManager( ).removeListener(PaintListener.class, this);
    }

    int antiBan( ) {
    int GambleInt = random(1, 60);

    if (GambleInt == 11) {
    int x = random(0, 750);
    int y = random(0, 500);
    moveMouse(0, 0, x, y);
    log("Anti-ban, moving mouse.");
    }

    if (GambleInt == 37) {
    openTab(randomTab[random(0, 14)]);
    log("Anti-ban, opening random tab. ");
    }


    return (random(500, 1000));
    }

    public void onRepaint( Graphics g ) {
    if(isLoggedIn()) {
    long millis = System.currentTimeMillis() - startTime;
    long hours = millis / (1000 * 60 * 60);
    millis -= hours * (1000 * 60 * 60);
    long minutes = millis / (1000 * 60);
    millis -= minutes * (1000 * 60);
    long seconds = millis / 1000;
    g.setColor(Color.RED);
    g.drawString("Snaper created by Lancelot074", 9, 275);
    g.drawString("Took " + Runs*28 + " snape grass.", 9, 291);
    g.drawString("Run for: " + hours + " hours " + minutes + " minutes " + seconds + " seconds.", 9, 307);
    g.drawString("Made " + Integer.toString(Runs) + " load(s).", 9, 323);
    g.drawString("Earned: " + Runs*28*385 + "gp.", 9, 339);
    }
    }

    public void Walkthere() {
    setRun( true );
    //Bankpath.walkToEnd();
    walkPathMM(randomizePath(Tobank, 2, 2), 15);
    //while(getMyPlayer().isMoving())
    //antiBan();
    }

    public void Walkback() {
    setRun( true );
    //Snapepath.walkToEnd();
    walkPathMM(randomizePath(Tosnape, 2, 2), 15);
    //while(getMyPlayer().isMoving())
    //antiBan();
    }

    public void Dobanking() {
    RSObject loll = findObject(BankID);
    if (loll != null) {
    atObject(loll, "Use-quickly Bank Booth");
    wait(random(1500,3000));
    if (interfaceExists(INTERFACE_BANK)) {
    atInventoryItem(Snape, "all");
    wait(random(1500,3000));
    if (getInventoryCount() == 0) {
    closeBank();
    Runs++;
    }
    }
    }
    }

    public int loop() {
    if (getInventoryCount() == 28) {
    Walkthere();
    Dobanking();
    } else {
    RSItemTile kk = getGroundItemByID(Snape);
    atTile(kk, "Take Snape grass");
    antiBan();
    }

    if (getInventoryCount() == 0) {
    Walkback();
    }

    return random(800, 1000);
    }

    public String getName() {
    return "Snaper";
    }

    public String getScriptCategory() {
    return "Collecting";
    }

    public String getAuthor() {
    return "Lancelot854";
    }

    public double getVersion() {
    return 1.0;
    }

    }
     
  2. PennyRoyal

    PennyRoyal Guru

    Joined:
    Jul 23, 2008
    Posts:
    1,755
    Referrals:
    2
    Sythe Gold:
    37
    Sythe's 10th Anniversary
    Quick Question About Rsbot

    Nice and simple, save it as:snaper.java the word you have to save it as (filename) is always before extend.

    Gl on botting
     
  3. PennyRoyal

    PennyRoyal Guru

    Joined:
    Jul 23, 2008
    Posts:
    1,755
    Referrals:
    2
    Sythe Gold:
    37
    Sythe's 10th Anniversary
    Quick Question About Rsbot

    Remember you have to save into a note pad and then save in your rsbot. scripts folder.
     
  4. EliasWhufc

    EliasWhufc Active Member
    Banned

    Joined:
    Jan 23, 2009
    Posts:
    116
    Referrals:
    0
    Sythe Gold:
    0
    Quick Question About Rsbot

    Wah, im confused.
     
  5. PennyRoyal

    PennyRoyal Guru

    Joined:
    Jul 23, 2008
    Posts:
    1,755
    Referrals:
    2
    Sythe Gold:
    37
    Sythe's 10th Anniversary
    Quick Question About Rsbot

    Ok are u trying to save that code to use it with your rsbot?
     
  6. EliasWhufc

    EliasWhufc Active Member
    Banned

    Joined:
    Jan 23, 2009
    Posts:
    116
    Referrals:
    0
    Sythe Gold:
    0
    Quick Question About Rsbot

  7. PennyRoyal

    PennyRoyal Guru

    Joined:
    Jul 23, 2008
    Posts:
    1,755
    Referrals:
    2
    Sythe Gold:
    37
    Sythe's 10th Anniversary
    Quick Question About Rsbot

    np done
     
< sharing 93 runecraft (make 1m an hour) | [HELP] RSBot Ben G's Cheese Buyer! v1.1 >
Thread Status:
Not open for further replies.


 
 
Adblock breaks this site