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.

Satire's Cammy Teleporter with source code

Featured Replies

Basic script, haven't tested it (don't have 45 magic) but I think it'll work lmao.

Requested by @Twisted Staff

If anyone want's to supply some photo's so I can add it to the thread, that'll be grateful.

Download: Link

 

Source code

 

 

 



import org.osbot.rs07.api.ui.Skill;
import org.osbot.rs07.api.ui.Spells;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import org.osbot.rs07.utility.ConditionalSleep;

import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.geom.AffineTransform;
import java.awt.geom.Arc2D;
import java.io.IOException;
import java.net.URL;
import java.util.concurrent.TimeUnit;
import java.util.function.Predicate;
import java.util.stream.Collectors;


@ScriptManifest(author = "Satire", info = "A simple Teleporter", name = "sCammyTeleporter", version = 0, logo = "")

    public class Main extends Script{
    private long timeBegan;
    private long timeRan;
    private int beginningMagicXp;
    private int begginingLevelMagic;
    private int currentMagicXp;
    private int xpToNextLevelMagic;
    private int currentLevelMagic;
    private int xpPerHourMagic;
    private int levelsGainedMagic;
    private int xpGainedMagic;

    private int mX, mY;


    private final Image mousePointer = getImage("http://i.imgur.com/kGJ88Xg.png");


    private Image getImage(String url) {
        try {
            return ImageIO.read(new URL(url));
        } catch (IOException e) {
        }
        return null;
    }

    @Override
    public void onStart() {
        timeBegan = System.currentTimeMillis();
        beginningMagicXp = skills.getExperience(Skill.MAGIC);
        begginingLevelMagic = skills.getStatic(Skill.MAGIC);


    }

    @Override
    public int onLoop() throws InterruptedException {

        if(getMagic().canCast(Spells.NormalSpells.CAMELOT_TELEPORT)){
            new ConditionalSleep(3000, 100) {
                @Override
                public boolean condition() throws InterruptedException {
                    return getMagic().castSpell(Spells.NormalSpells.CAMELOT_TELEPORT);
                }
            }.sleep();

            new ConditionalSleep(1500, 100) {
                @Override
                public boolean condition() throws InterruptedException {
                    return !myPlayer().isAnimating();
                }
            }.sleep();


        }else{
            log("Ran out of runes, logging off");
            new ConditionalSleep(2000) {
                @Override
                public boolean condition() throws InterruptedException {
                    return !myPlayer().isAnimating(); // Wait for anim to finish so we can log off
                }
            }.sleep();
            stop(true);
        }

        return random(500,100);
    }



    @Override
    public void onExit(){
        log("Successfully exited!");
    }

    public int xpToNextLevel(final Skill skill) {
        return skills.experienceToLevel(skill);
    }


    public void onPaint(Graphics2D g){
        Graphics2D gr = g;
        g.setColor(Color.WHITE);
        mX = getMouse().getPosition().x;
        mY = getMouse().getPosition().y;
        g.drawImage(mousePointer, mX - 15, mY - 15, null);
        timeRan = System.currentTimeMillis() - this.timeBegan;
        g.setFont(new Font("SANS_SERIF", Font.BOLD, 12));
        currentLevelMagic = this.skills.getStatic(Skill.MAGIC);
        currentMagicXp = this.skills.getExperience(Skill.MAGIC);
        levelsGainedMagic = currentLevelMagic - begginingLevelMagic;
        xpToNextLevelMagic = xpToNextLevel(Skill.MAGIC);
        xpGainedMagic =  currentMagicXp - beginningMagicXp;
        xpPerHourMagic = (int) (this.xpGainedMagic * 3600000.0 / (System.currentTimeMillis() - this.timeBegan));
        g.setColor(Color.WHITE);
        g.drawString(begginingLevelMagic  + "/" + currentLevelMagic + "(" + levelsGainedMagic + ")" + "  XP Gained: " + xpGainedMagic + "      XP Needed: " + xpToNextLevelMagic
        + "     XP/hr: " + xpPerHourMagic, 14, 329);
        g.setColor(Color.WHITE);

    }




    private String ft(long duration) {
        String res = "";
        long days = TimeUnit.MILLISECONDS.toDays(duration);
        long hours = TimeUnit.MILLISECONDS.toHours(duration) - TimeUnit.DAYS.toHours(TimeUnit.MILLISECONDS.toDays(duration));
        long minutes = TimeUnit.MILLISECONDS.toMinutes(duration) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(duration));
        long seconds = TimeUnit.MILLISECONDS.toSeconds(duration) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(duration));

        if (days == 0) {
            if(hours <=9 && minutes <=9){
                res = ("0" + hours + ":" + "0" + minutes + ":" + seconds);
                return res;
            }else if(hours <=9 && minutes <=9){res = ("0" + hours + ":" + "0" +  minutes + ":" + seconds); return res;}
            else{
                res = (hours + ":"  +  minutes + ":" + seconds);
            }

        }else{
            res = (days + ":" + hours + ":" + minutes + ":" + seconds);
        }

        return res;
    }

}

 

Edited by Satire

if(getMagic().canCast(Spells.NormalSpells.CAMELOT_TELEPORT)){
            if (new ConditionalSleep(3000, 100) {
                @Override
                public boolean condition() throws InterruptedException {
                    return getMagic().castSpell(Spells.NormalSpells.CAMELOT_TELEPORT);
                }
            }.sleep()) {
                new ConditionalSleep(1500, 100) {
                    @Override
                    public boolean condition() throws InterruptedException {
                        return !myPlayer().isAnimating();
                    }
                }.sleep();
            }
        }else{
            log("Ran out of runes, logging off");
            new ConditionalSleep(2000) {
                @Override
                public boolean condition() throws InterruptedException {
                    return !myPlayer().isAnimating(); // Wait for anim to finish so we can log off
                }
            }.sleep();
            stop(true);
        }

        return random(500,1000);

 

Create an account or sign in to comment

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.