All pastes #2083299 Raw Edit

Auto Alch

public text v1 · immutable
#2083299 ·published 2011-09-27 18:29 UTC
rendered paste body
powerbot
Advanced This topic

    Log in with Facebook Log in with Twitter Log in with OpenID Log in with Windows Live Sign In
    Create Account

    twitter
    facebook
    RSBot
    Forums
    Members
    Store
    Blogs
    Feedback
    Chat
    Gold4Fun

    powerbot
    RSBot
    Scripts
    Magic

    Terms and Conditions
    View New Content

0
RuNnNy Alch [AIO Alcher] [Alch anything!] Free!
Started by RuNnNy, Feb 10 2011 08:24 PM

    Page 1 of 3
    1
    2
    3

    Next

    You cannot reply to this topic
    Go to first unread post

43 replies to this topic
#1
RuNnNy
Posted 10 February 2011 - 08:24 PM

    Member
    Feedback: View
    38 posts

RuNnNy Alch


Hi!
This is my alching script, It can alch anything, anywhere and any time.
just start with a fire staff, nature runes and your item in inventory.
The script is nearly flawless, so please check it out and if you find any bugs/glitches
Please post them and ill fix it ASAP!
And please post some proggies!
Enjoy





The script works best if you only have the category with High alchemy selected and have the item in the first row in your inventory






To do list:
Making the Paint bigger and interactive.
Antiban (Camera rotation and such)
and other bug fixes
Getting the script to work with the newest version of RSBot.
Should be ready in a couple of hours







Proggies:



Thanks to Archer123 for these proggies



Posted Image



Posted Image



Posted Image








Download Precompiled Version



Pastebin




Save as: RuNnNy_Alch.java

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;

import org.rsbot.event.events.MessageEvent;
import org.rsbot.event.listeners.MessageListener;
import org.rsbot.event.listeners.PaintListener;
import org.rsbot.script.Script;
import org.rsbot.script.ScriptManifest;
import org.rsbot.script.wrappers.RSItem;
import org.rsbot.script.wrappers.RSObject;
import org.rsbot.script.wrappers.RSPlayer;
import org.rsbot.script.wrappers.RSTile;
import org.rsbot.script.wrappers.RSTilePath;

import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.imageio.ImageIO;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;

import javax.swing.JFrame;
import javax.swing.JLabel;

import javax.swing.JFrame;
import javax.swing.JLabel;

@ScriptManifest(
    authors = {"RuNnNy"},
    version = 0.1,
    keywords = {"Alch", "banking", "money", "bank"},
    description = "Alch anywhere!",
    name = "RuNnNy_Alch"
        )
        
        
public class RuNnNy_Alch extends Script implements PaintListener, MessageListener {
    
    ScriptManifest props = getClass().getAnnotation(ScriptManifest.class);


        int natureRID = 561;
        int itemID;
        int fireStaffID = 17005;
        int boothID = 0;
        int counter = 0;
        Point click = new Point(573, 372);
        int itemAlched = 0;
        int alchemyAnimation = 9633;
        
        long startTime;
        
        int expGained = 0;
        int startExp = 0;
        int amounthAlched = 0;
        int amountToAlch = 0;

        
        public boolean onStart(){
            log ("Starting RuNnNy_Alch" + props.name() + " v" + props.version() + "!");
            
            AlchGUI g = new AlchGUI();
            g.setVisible(true);
            while (g.isVisible()) sleep(250);
            itemID = Integer.parseInt(g.jTextField1.getText());
            
            mouse.setSpeed(9);
            
            startTime = System.currentTimeMillis();
            startExp = skills.getCurrentExp(skills.MAGIC);
            return true;
        }    
        
        
        
      
    
        
        @Override
        public int loop() {
            if (inventory.contains(itemID)) alch();
            else stopScript();
            return random(150, 600);
        }
        
        public void onFinish()  {
            log ("Thank you for using " + props.name() + " v" + props.version() + "!");
            
        }
        
        
         private final Color color1 = new Color(0, 0, 0, 174);
            private final Color color2 = new Color(0, 0, 0);
            private final Color color3 = new Color(51, 255, 0, 166);

            private final Font font1 = new Font("Arial", 1, 15);
            private final Font font2 = new Font("Arial", 1, 10);
        
        private void alch() {
            RSItem item = inventory.getItem(itemID);
            if (item != null)
            {
                magic.castSpell(59);
                sleep(100, 300);
                item.doClick(true);
                itemAlched++;
                sleep(100, 300);
            }
        }
        




            @Override
            public void messageReceived(MessageEvent e) {
                /*RSPlayer me = getMyPlayer();
                if(me.getAnimation() == alchemyAnimation) {
                    itemAlched++;
                }*/
            }






        @Override
        public void onRepaint(Graphics g) {
            
            Graphics2D g1 = (Graphics2D)g;
            
            expGained = skills.getCurrentExp(skills.MAGIC) - startExp;
            
            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;
            
            float xpsec = 0;
            if ((minutes > 0 || hours > 0 || seconds > 0) && expGained > 0)  {
                xpsec = ((float) expGained)/(float)(seconds + (minutes*60)+ (hours*60*60));
                
            }
            float xpmin = xpsec * 60;
            float xphour = xpmin * 60;
            
            float alchsec = 0;
            if ((minutes > 0 || hours > 0 || seconds > 0) && itemAlched > 0)  {
                alchsec = ((float) itemAlched)/(float)(seconds + (minutes*60)+ (hours*60*60));
                
            }
            
            float alchmin = alchsec * 60;
            float alchhour = alchmin * 60;
            
            g1.setColor(color1);
            g1.fillRect(338, 3, 178, 56);
            g1.setColor(color2);
            g1.drawRect(338, 3, 178, 56);
            g1.setFont(font1);
            g1.setColor(color3);
            g1.drawString("RuNnNy Alcher", 227, 17);
            g1.setFont(font2);
            g1.drawString("Runtime: " + hours + ":" + minutes + ":" + seconds , 341, 31);
            g1.drawString("Experience gained: " + expGained + "    Exp/h: " + (int)xphour, 341, 43);
            g1.drawString("Items alched: " + itemAlched + "     Alch/h: " + (int)alchhour, 341, 55);
            final int percent = skills.getPercentToNextLevel(skills.MAGIC); //change the MINING to the stat u want
            g.drawString("Percent till next level: ", 377, 10);
            g.setColor(Color.red);
            g.fillRoundRect(377, 13, 100, 10, 15, 15); //these must be on same cordinates
            g.setColor(Color.green);
            g.fillRoundRect(377, 13, percent, 10, 15, 15); //these must be on same cordinates
            g.setColor(Color.black);
            g.drawString("" + percent + "%", 423, 22); //this must be on the center of the bar
            g.drawRoundRect(377, 13, 100, 10, 15, 15); //these must be on same cordinates
            g.drawRoundRect(377, 13, percent, 10, 15, 15); //these must be on same cordinates
        }

        /**
         *
         * @author Hlynur
         */
        public class AlchGUI extends javax.swing.JFrame {

            /** Creates new form AlchGUI */
            public AlchGUI() {
                initComponents();
            }

            /** This method is called from within the constructor to
             * initialize the form.
             * WARNING: Do NOT modify this code. The content of this method is
             * always regenerated by the Form Editor.
             */
            @SuppressWarnings("unchecked")
            // <editor-fold defaultstate="collapsed" desc="Generated Code">
            private void initComponents() {

                jLabel1 = new javax.swing.JLabel();
                jLabel2 = new javax.swing.JLabel();
                jTextField1 = new javax.swing.JTextField();
                jButton1 = new javax.swing.JButton();

                setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

                jLabel1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
                jLabel1.setForeground(new java.awt.Color(51, 255, 0));
                jLabel1.setText("RuNnNy Alch");

                jLabel2.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
                jLabel2.setText("Item ID");

                jButton1.setText("Start Script");
                jButton1.addActionListener(new java.awt.event.ActionListener() {
                    public void actionPerformed(java.awt.event.ActionEvent evt) {
                        jButton1ActionPerformed(evt);
                    }
                });

                javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
                getContentPane().setLayout(layout);
                layout.setHorizontalGroup(
                    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(53, 53, 53)
                                .addComponent(jLabel1))
                            .addGroup(layout.createSequentialGroup()
                                .addGap(103, 103, 103)
                                .addComponent(jLabel2))
                            .addGroup(layout.createSequentialGroup()
                                .addGap(84, 84, 84)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jTextField1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 105, Short.MAX_VALUE))))
                        .addContainerGap(62, Short.MAX_VALUE))
                );
                layout.setVerticalGroup(
                    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 33, Short.MAX_VALUE)
                        .addContainerGap())
                );

                pack();
            }// </editor-fold>

            private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

                this.hide();
                
            }

            /**
            * @param args the command line arguments
            */
            public void main(String args[]) {
                java.awt.EventQueue.invokeLater(new Runnable() {
                    public void run() {
                        new AlchGUI().setVisible(true);
                    }
                });
            }

            // Variables declaration - do not modify
            private javax.swing.JButton jButton1;
            private javax.swing.JLabel jLabel1;
            private javax.swing.JLabel jLabel2;
            private javax.swing.JTextField jTextField1;
            // End of variables declaration

        }

}










Thanks to Indigestion and the guys at #RScode for helping me make the script

Edited by RuNnNy, 11 June 2011 - 05:06 PM.

    Back to top

#2
ridethektulu
Posted 12 February 2011 - 03:07 AM

    Member
    Feedback: View
    128 posts

Thanks so much runny. It was great luck that while searching for an alch bot yours was just posted. I tried 3 others rated 5 stars but none worked longer then an hour. I don't know about how human it looks but the script runs great, I've probably used it 5 hours total today, 3 hours on its own once. I forgot to take a screenshot, really sorry but this is great so far. I think it has trouble with some random events though, like the frog one. Also you should tell people what to save the file as if they can't read java code for their life. Thanks! I will try and get a screenshot, I'm running it right now.

    Back to top

#3
dudemanboygu
Posted 12 February 2011 - 04:55 AM

    Member
    Feedback: View
    1 posts

I'd love to use this, but I don't know how to download the script, or whatever I have to do to use it. Could someone explain it for me? Keep in mind I'm not a very tech-savvy :P

    Back to top

#4
here2bot
Posted 12 February 2011 - 06:52 AM

    Restricted
    Feedback: View
    34 posts

will post a proggy doing good atm will post bugs or anything if there is some

    Back to top

#5
prikprai
Posted 12 February 2011 - 07:15 AM

    Member
    Feedback: View
    1 posts

what is the name of the .java ?

    Back to top

#6
ridethektulu
Posted 12 February 2011 - 12:12 PM

    Member
    Feedback: View
    128 posts

RuNnNy_Alch.java

on a side note, i left it to run overnight but it stopped like 20 minutes after I left. It got a random event and then it logged out 5 seconds after it finished. I logged back in where I started, but it didn't do anything after the random.

    Back to top

#7
TylerFlo
Posted 12 February 2011 - 03:05 PM

    Member
    Feedback: View
    121 posts

Yeah I left this on overnight as well, it performed 5000 alches, but then logged out after a random event. Great script, and that's the only flaw I've noticed.

    Back to top

#8
ridethektulu
Posted 12 February 2011 - 05:32 PM

    Member
    Feedback: View
    128 posts

Working for 4 hours straight nicely, even did the maze event.

    Back to top

#9
skimmy08
Posted 13 February 2011 - 11:21 AM

    VIP
    Feedback: View
    2288 posts

seen have some good feedback for this script, thank you... i'll try it

    Back to top

#10
justintag6
Posted 14 February 2011 - 12:21 AM

    Member
    Feedback: View
    72 posts

Nice script bro!!

    Back to top

#11
desi123
Posted 14 February 2011 - 04:56 AM

    Restricted
    Feedback: View
    50 posts

Just go soul wars then..... , unless your not member :P

    Back to top

#12
ibrahim5
Posted 27 February 2011 - 08:17 PM

    Member
    Feedback: View
    2 posts

well i need some help
all the scripts that i write doesn't bank
alches only 27 alches and stops
wtf?

    Back to top

#13
PK_GOLD_PK
Posted 27 February 2011 - 09:23 PM

    Member
    Feedback: View
    76 posts

I have a question. Can this do randoms flawlessly?? How many randoms can it do if any at all??

    Back to top

#14
Chrisabcd
Posted 27 February 2011 - 10:49 PM

    Member
    Feedback: View
    226 posts

so far so good

    Back to top

#15
shelly242
Posted 14 March 2011 - 11:54 PM

    Member
    Feedback: View
    21 posts

i need help with this script it ask me for my item id and a blank box i dont know what to put in there

    Back to top

#16
iUSA
Posted 15 March 2011 - 01:17 AM

    Member
    Feedback: View
    60 posts

does not show up in script.

    Back to top

#17
nimeshboy
Posted 18 March 2011 - 10:11 PM

    Member
    Feedback: View
    36 posts

Amazing script can alch rune arrows without weilding and amazingly fast best alching script out there :)

    Back to top

#18
lindsay111
Posted 20 March 2011 - 07:52 AM

    Restricted
    Feedback: View
    98 posts

keep clicking the spell next to the high alch

    Back to top

#19
Archer123
Posted 23 March 2011 - 03:32 AM

    Member
    Feedback: View
    88 posts

wow i been running and 5 mins and its going so fast!!!! omg dude ily

i will post proggi tomarrowz

    Back to top

#20
RuNnNy
Posted 24 March 2011 - 09:51 PM

    Member
    Feedback: View
    38 posts

shelly242 said:
i need help with this script it ask me for my item id and a blank box i dont know what to put in there


You need to type in the ID of the item you would like to alch... To find out the ID of an item all you have to do is have it in your inventory and in the upper left hand corner you click view and toggle inventory, and the ID should just appear over the item you want to alch. :)

    Back to top

    Page 1 of 3
    1
    2
    3

    Next

Back to Magic  Next Unread Topic ?

Community Forum Software by IP.Board

    RSS Feed
    Change Theme
    English (USA)
    Mark Community Read
    Help