Need Help Scripting For RSBot

Discussion in 'RuneScape 3 Cheating' started by HellBomb, Feb 17, 2009.

Need Help Scripting For RSBot
  1. Unread #1 - Feb 17, 2009 at 9:27 PM
  2. HellBomb
    Joined:
    Dec 31, 2008
    Posts:
    42
    Referrals:
    0
    Sythe Gold:
    0

    HellBomb Member
    Banned

    Need Help Scripting For RSBot

    i am having issues with my script. i am making a auto mining script and i am need some help with paint. i can not make a chart that will keep track of what i bank/how long script has been running. can anyone who is experienced help?
     
  3. Unread #2 - Feb 17, 2009 at 10:25 PM
  4. Jimmy
    Joined:
    Jun 24, 2008
    Posts:
    2,421
    Referrals:
    10
    Sythe Gold:
    25

    Jimmy Ghost
    Retired Sectional Moderator $5 USD Donor

    Need Help Scripting For RSBot

    I'll give you a hand :)

    Firstly, add this after your scriptname
    PHP:
    implements PaintListener
    So, for example
    PHP:
    public class SCRIPTNAME extends Script {
    becomes
    PHP:
    public class SCRIPTNAME extends Script implements PaintListener {
    Then, add this to your ints (after you declare the class, but before your methods
    PHP:
    private final long startTime System.currentTimeMillis();
    Finally, add this method to your script
    PHP:
        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(new Color(01000100));
                
    g.setColor(Color.green);
                
    g.drawString("Runtime: " hours "h " minutes "min "
                        
    seconds "sec."200365);
            }
        }
    Once all of this is done, you'll have a basic paint that will display how long the script has been running for. To add extra stuff, simply put
    PHP:
    g.drawString("STUFF HERE"), X,Y;
    but replace the "STUFF HERE" with your text, and replace the X and Y with the X and Y coordinate that you want to start the string on.
     
  5. Unread #3 - Feb 17, 2009 at 10:28 PM
  6. HellBomb
    Joined:
    Dec 31, 2008
    Posts:
    42
    Referrals:
    0
    Sythe Gold:
    0

    HellBomb Member
    Banned

    Need Help Scripting For RSBot

    thx but i am in need of more than just time, i al also looking on how count amount of a certain item banked
     
  7. Unread #4 - Feb 17, 2009 at 10:59 PM
  8. hunter bdb
    Joined:
    Oct 31, 2008
    Posts:
    61
    Referrals:
    1
    Sythe Gold:
    0

    hunter bdb Member

    Need Help Scripting For RSBot

    hiya! I know how to do what you want.




    Lets say coal's ID is 453. If I want to count how much coal I have, I would say int currentcoal = getInventoryCount(453);. Then, whenever I banked my coal I would add this number to the global integer variable that tracks how much coal I have banked so far.

    I wrote something up for you:



    int totalbankedcoal = 0;
    int id_coal = 453;
    public void bankAllMyStuff()
    {
    if(bank.getInterface().isValid())
    {
    int currentcoal = getInventoryCount(id_coal);
    totalbankedcoal += currentcoal;
    bank.depositAllExcept();
    bank.close();
    }
    }
    public void onRepaint(Graphics g)
    {
    g.drawString("Coal Banked: " + totalbankedcoal + ".",15,200);
    }



    I hope that helps! If you need any more help, just let me know.

    -Ben B.
     
  9. Unread #5 - Feb 17, 2009 at 11:05 PM
  10. HellBomb
    Joined:
    Dec 31, 2008
    Posts:
    42
    Referrals:
    0
    Sythe Gold:
    0

    HellBomb Member
    Banned

    Need Help Scripting For RSBot

    o ok, do you know of any websites that have a good tutorial that will help me learn how to write the scrips. well what i mostly need is a list of all the commands like get inventory, get stats, stuff like that. If anyone here knows any guides or would help me get a grasp on it i would really appreciate it.
     
  11. Unread #6 - Feb 17, 2009 at 11:32 PM
  12. hunter bdb
    Joined:
    Oct 31, 2008
    Posts:
    61
    Referrals:
    1
    Sythe Gold:
    0

    hunter bdb Member

    Need Help Scripting For RSBot

    I've written a full, in-depth tutorial for RSBot scripting.

    Go to my website at rsbot2.110mb.com

    Also, you'll find my (incomplete, but still helpful) mining scripting tutorial useful.
     
  13. Unread #7 - Feb 18, 2009 at 3:30 AM
  14. HellBomb
    Joined:
    Dec 31, 2008
    Posts:
    42
    Referrals:
    0
    Sythe Gold:
    0

    HellBomb Member
    Banned

    Need Help Scripting For RSBot

    thank you very much. this is will give me a very good jump start into scripting
     
< [RSBOT] [HELP] walkPathMM doesn't work right? | Lumbridge Dummy >

Users viewing this thread
1 guest


 
 
Adblock breaks this site