Superheat script

Discussion in 'Sythe Lib Archive' started by Class, Feb 6, 2018.

Superheat script
  1. Unread #1 - Feb 6, 2018 at 8:50 PM
  2. Class
    Joined:
    Dec 17, 2008
    Posts:
    1,805
    Referrals:
    3
    Sythe Gold:
    11
    <3 n4n0 (3) Gohan has AIDS MushyMuncher

    Class Formerly known as lime soda
    Lime Soda Donor

    Superheat script

    This is being used in rs3 with gold ore but I'm sure it could be easily modified for another setting. I'm loading Bitmaps from a file; you can create your own bitmaps by using Snipping Tool or Paint.

    If anyone can figure out how to get keypresses to register please let me know...



    Code:
    SetVirtualMouseJavaModeOn();
    if (SetWindow("RuneScape") == ""){Die("Could not find runescape");}while(SelectInnerWindow("SunAwtCanvas")){}
    SetVirtualInputsOff();
    
    // def ClickRandom(minX, minY, maxX, maxY){
    //     Click(RandomInt(minX, maxX), RandomInt(minY, maxY));
    // }
    
    def Click(x, y){
        MoveMouse(x, y);
        ClickMouse(x, y, 1);
    }
    
    def ClickRandomOffset(x, y, offset){
        Click(x + RandomInt(-offset, offset),y + RandomInt(-offset, offset));
    }
    
    def FindClickBitmap(bitmap, sleepTime){
        FindClickBitmap(bitmap,sleepTime, 0);
    }
    
    def FindClickBitmap(bitmap, sleepTime, deformation){
        FindClickBitmapRegion(bitmap, 0, 0, GetWidth(), GetHeight(), deformation, sleepTime);
    }   
    
    def FindClickBitmapRegion(bitmap, minX, minY, maxX, maxY, deformation, sleepTime){
        var x = 0; var y = 0; var i = 0;
        while(i < 5){
            i = i + 1;
            Scrape();
            if(FindBitmap(x, y, bitmap, minX, minY, maxX, maxY, 20, deformation, 90, false)){
                ClickRandomOffset(x,y, 10);
                Sleep(RandomInt(sleepTime, sleepTime * 1.1));
                return true;
            } else {
                print("Couldn't find bitmap, retrying");
                Sleep(1000);
            }
        }
        return false;
    }
    
    
    def AutoClick(runTime) {
        var bankChest = LoadBitmapFromFile("bank_chest.bmp", 0xff00ff, false);
        var goldOre = LoadBitmapFromFile("gold_ore_2.bmp", 0xff00ff, false);
        var preset2 = LoadBitmapFromFile("preset_2_2.bmp", 0xff00ff, false);
        var superheat = LoadBitmapFromFile("superheat_2.bmp", 0xff00ff, false);
        var runTimes = runTime;
       
        while (runTimes > 0){
            print(runTimes);
            runTimes = runTimes - 1;
            // Click Bank Chest
            if(!FindClickBitmap(bankChest, 1200)){
                print("can't find bank chest");
                return;
            }
           
            // Click Preset
            if(!FindClickBitmap(preset2, 1200)){
                print("can't find preset");
                return;
            }
    
            var i = 0;
            while(i < 27){
                // Superheat
                if(!FindClickBitmap(superheat, 10)){
                    print("can't find superheat");
                    return;
                }
               
                // Select Gold Ore
                if(!FindClickBitmapRegion(goldOre, 1683, 785, 1747, 835, 0, 800)){
                    print("can't find gold ore");
                    return;
                }
                i = i + 1;
            }
        }
    }
    
    // Superheats x inventories
    // Assumes preset 2 is correctly set up for your ore / nature runes
    AutoClick(100);
     
    ^ Shadyowns1, Fast Coins and Virtus like this.
  3. Unread #2 - May 26, 2018 at 12:46 PM
  4. mahdimeda
    Joined:
    May 23, 2018
    Posts:
    45
    Referrals:
    0
    Sythe Gold:
    44
    Discord Username:
    mahdimeda

    mahdimeda Member

    Superheat script

    Is this superheating with a coal bag? Also is there a specific layout that I need for the screen or presets?
     
< Bunch of stall thiever scripts | >

Users viewing this thread
1 guest


 
 
Adblock breaks this site