• Log in or sign up for an account here: https://www.sythe.org/login

OSRS Docks Glassblowing Script

Program

Formerly known as Andy Samberg

Retired Sectional Moderator
Joined
Sep 17, 2015
Sythe Gold
902
Messages
5,003
Script that buys supplies from dock crew members and casts super glass make and then makes orbs and drops them, I also have a version that makes lenses and sells them back. After making the items, it'll hop worlds and repeat the process.

This is my first SytheLib script I wrote and so it's raw and unpolished. It has a lot of cool features like error detection and correction, world hopping with world scrolling, automatic logging back in, and more. For example, say that your client lags and clicks on the ship gangplank, which will happens once in a billion years, it'll click the plank to go back and resume. Or if you can't find supplies for a while and have to log into too many worlds and hit the hop limit and get logged out, it'll log you back in and resume. Many small things like that it is built to recover from.

It's also 100% randomized as far as clicks, so it shouldn't ever have the same clickthrough twice.

I had high hopes to polish it and make it something I could release as a average user script, but it's much too complex to try and collect enough information from users to make this work for everyone with a few inputs, so until we get further along making SytheLib a bit more user friendly I'll let people hack at this.

So use this as a benchmark for what you can accomplish with SytheLib and to learn about how some of the library functions can be used.

Yeah it's a bit messy and not optimized. I'm not interested in a code review, I kind of was just slapping things together to see what did what and how things worked.

If you have questions, feel free to pm me and I'll add you to our Discord group and I'll do my best to help you out.

Shout out to Richard for snippets of this from his script.

Code:
SetVirtualMouseJavaModeOn();

global username = "";
global password = "";

global startTime = Time();

// BrimHaven
// global trader1 = 1397413;
// global trader2 = 3944469;

// Port Sarim
global trader1 = 599628;
global trader2 = 2238540;
global trader3 = 10187793;

// Mos Le Harmless
// global trader1 = 1900544;
// global trader2 = 11568996;

// Musa Point
// global trader1 = 1900544;
// global trader2 = 3950211;
// global trader3 = 3950211;

// Corsair
// global trader1 = 1397413;
// global trader2 = 3950211;
// global trader3 = 9990673;

// Shipyard
// global trader1 = 5966141;
// global trader2 = 13936255;
// global trader3 = 858136;

global moltenGlassColor = 13802118;
global orbColor = 6045717;

global storeBG = 4734515;

global gangplank = 4141085;

// global worlds = ["2", "3", "4", "5", "6", "7", "9", "10", "11", "12", "13", "14", "15", "17"];
// global worlds = ["10", "11", "12", "13", "14", "15", "17", "18", "19", "20", "21", "22", "23", "24", "27", "28", "29", "30"];
// global worlds = ["10", "11", "12", "13", "14", "15", "17", "18", "19", "20", "21", "22", "23", "24"];
// global worlds = ["46", "47", "48", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60"];
global worlds = ["62", "66", "67", "68", "69", "70", "74", "75", "76", "77", "78", "86", "87", "88", "89", "90"];
// global worlds = ["51", "52", "53", "54", "55", "56", "57", "58", "59", "60"];


// global worlds = ["51", "52", "53", "54", "55", "56", "57", "58", "59", "60"];
// global worlds = ["13", "14"];

global reset = false;

global font1 = LoadFontFromBitmap(LoadBitmapFromString(
        "0006!0q_70LRx4sF+o`-Q(69p^U(kguHXRVl1Tsn0MG=!91lqkYyysv05B4pQlF|AB=t!pCYVX" +
        "2)h2*aN}8UdPWxLnl6jJ%>_}#<YMUm-wKGsQs=Eg^#D-)KbxvtDmSwF`?t#to6n2AZ-MNfjWpv" +
        "RtIc{xZVmAA`T-_+vEwW>7>yr?annH-Gie}w9`?p^E+rsyAG}0uaMw4CKk&-5DV<ne%>3gf9b=" +
        "?V}nG$6ILOFj|n@D6x+BEyG-1nW{OQ`kpiYSR9$QhNKw6V6NbuL%Ur1^Q0`OT7&ii>>TFC$(%i" +
        "854~kjs0nAfO`!ht{f6`O;L^$Bcz}<S^}FUgn=z1{nnaL{LzA)qd-*&AAX(^4%-Ta>=Bm$%au(" +
        "O=UClkK^Xv?$`6%v7#o~UT%r82MKpVMRLX0n(UK%baPDkU{8|6Y9g@G4~^Dkag}pp1{>b<1!3o" +
        "IGbEXSBL!Fp!>t`L0Y;WeQ}c>hDrnXE?bL+LtMcZOX=u-TyoIJmGw$+yu8SE3CYo5vYcfa_l9E" +
        "4n0cDVM)x!j_ETU4!?zPb|Br%MVGg4w94PD$3Nf8l1WeJJ2UEQFvKJLr9?Xe)lf|GvSOvN|02P" +
        "8)&ePssOHnEFDNnG0I+Zx_;ZHqs=QO#d9T*YE(WTK-|8r;_^BC=Z+weVleUo~6aqqJ>XD)UapX" +
        "-2WJqeY)}ZOy45W(ug<^K#o}CM$2va=CoksVVf810+SHMgA`2ig2MJ{SW7&00000", 0xff00ff, true),
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:", 0xff00ff);

global font2 = LoadFontFromBitmap(LoadBitmapFromString(
        "0006x0j&TILRx4sF+o`-Q(3=4LO%c%!N4ZK000Ca01yBG0MG^=-~a#s009Fu12h6pRHF>g1tkZ" +
        "SP-RpYR8hxVUB=c^Qj;Yqqb(#*h^PsqM99RXj8ilcXoL(JMnRy=H4F)oLMn=)#v>RqM$sE@+gq" +
        "B(v~5Pl)dfb|7}XU>qhYXOv~9FoV`()dMxwE?sED!>fQcnW)f)t8Hj*haF)EE?Y|UcWwv$DQqi" +
        "mXrO=7X2qKj!Qv}!96sH1F_DAvZJi$z&9TUe_mjgYHi(pZaRi7jkeqM25WM$v6WA)+?1tw~lk(" +
        "X9sCOoXDOBN*7&)L9b2rfs5GWVD$!iYb(nGD;gLl0`eNmXa`Pjf)scN=->csI?)DnPSqBNK#FK" +
        "W)Mq8G_t{xDG3mo!z_s<7^KEaLP@a*g(7H(sgTUr%$1guXd@PB6qFc}G>K~=tYo7wv4V_522B>" +
        "3W`r5GVG;~d8Dk{Gz*L1S%P=BZRMizJV9O+lMN2YRjA+UbQW+9Wu!$OJi5OB;Y=)TyjFCu|A~v" +
        "IIC}lE6iAxhC3Jn>U#w4VhWXlwrOtDPcB}ye3W{nb(L9|q0sU*z|MUvJSDN7?sGb2h<N*a-%P*" +
        "jl;l%~x_3YH5dD$Izaf{+T6X2NNV$RwhHF>5JNjKY)?C6cNQ5@@MPjBTQgQMQQ0Rg|M`LTy<q8" +
        "&Rrev9{RS%>kIDZJ0KyY)Z{c$+Q}1RkEU+L~Pk=lu_|_BvXY63-lx-@Bjb+", 0xff00ff, true),
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:", 0xff00ff);

global font3 =  LoadFontFromBitmap(LoadBitmapFromString(
    "0001Q05|{&LRx4sF+o`-Q&~)QKpX%8$iM)=000260Pq3<C#WD+)wV??7?F_BCT$uplp7NylVfP" +
        "8ji9946m3S0vdBc*G-?nuXf$IOqKhPzB1SB+q9$NtB`DBA2q?h{l!+wGZDO^ni@744C`cwdAPx" +
        "Wk", 0xff00ff, true), "1234567890", 0xff00ff);

global loginButton = LoadBitmapFromString(
    "000I30F?kMLRx4sF+o`-Q(5<{Cu#s7=l=-ONe%`;FqvEYcb&Bf06+i\$2;d6d`|X;gG|B}E1Ko#" +
    "f05s4P0V8pYhC@N1(Vz_g4GbDGM1i0HG5`PpjD|x&pwXZW01XThWhoUKNJBsX&;S4;NfDAX(`f" +
    ")?0iXa7l&L(8B*-418U}&t18Q|\$\$*-Q-uY}xZM#+pt#=-;qh+GI2L_stYMPN{UXb-j!^dt80_o" +
    "lxExNbS_?sH!Ix;=XC?ddY*Fz04D&;Y_HlN^Ob*eWi!n371sMxeUqS|EGkfH~X8ySY}oD*IJ%b" +
    "6S?DDzUW>4j>*vsE5!ij2@3dA5XFlaL2myz\$C`xU9hx(Jd{AvqEe9>q*jUnMF165KwP<U=c08\$" +
    "3w<D}pHM2M9~gV4fuss5fTu+@PLhI*LKILmQnfjDQB`mX5@}foh{~p5q0nh\$fT<#yA{rtjikfI" +
    "7C<-WvN}6hDq9o}N5q5}(yHo}3P!^RD54WMx8bP2RbRf{1V+17?Ov#{hfk@EM=uAj+XHJ0UZ8<" +
    "{{DAtligcRX99<-<monqqIO~?{uz`MGj%rq|{rKd@4qmYFOKpf7(<tJc@IwOWjkgEj9^K5cqbe" +
    "x0M+~FLmW16;#G>2W-(k@*j?bjzxkWon`tS>S{JUJFt1<h#zWF#-d#|~U9lb<2zCU!V+B~RGg;" +
    "7}1zmWh@i`rkvV`KlrxkfH~?Q3J0-zS~A9i4|mGNg5RUrj^fFM3YG(qN*!QFwK%\$BB>Iz\$plb{" +
    "qNp!CFE7o9sr\$RS5{Qwik*Q@#Ac^{z?}PYZ1H=#n{ZRwe-O)7N42Ni^Y1-2`{q8yOoEM\$kfzKu" +
    "*t{kg{%1I}Qx\$(mMypK\$q(!Q(CgU>wYI4jQFr2>n\$r02(Yg2++b&kj8u-GwBtPo8-78=M}GJnT" +
    "_-N@JM>d7N%k=5V@sTzL7`1>QKs<;t_pho3vU5^2@vVe1>cqzb6MFtP-Tk52fl&ysd`qKJ@aL^" +
    "%bMBvG4~4+?3b0SGvRZY5Ofm)&`RF0n@NKofW<36-(WfoUhv5~!&Uoy*NaGQ_HqlBOAS{MPOiQ" +
    "<&nuRk{^n7`1zN%8q=z9PtXS7-T6KQC#8pq!s>NeJ5\$~qq^w#91GY=IdU!-si+Nu2UdK~Fk%u=" +
    "SSrO3NC5>0N(%b#4jv\$strR3lOh!lz=Ar_2d@gK!QHPbvX!+VtsguVyb~~0%q&dWblabm<1<R5" +
    "9\$vc@O%1AZhPavRmazYo{M&~YHFF4!XY2{BmldQN??Prr7b%aK@IYkabI%9WtP9)6)nsTnntU}" +
    ")VxfCQ*?n%h!m=\$t3ket2c!?)1-I@`+Xl2kH>cW?>`M?9kXU`}91y5v0d+%D%`2Xsn06Vi9MBv" +
    "ZtqRaL?\$iu-\$oRg;R|#A?mHpOh8)Q2{lI1>VzAK;wl\$pw&rqf&\$~p6w?giNfaL-;c}c?<e7eG1" +
    "2&rZ_a<H_1xgfSMKx3tDO2pZG0\$I@ICO*6JgZblA`_-hX}hHng>)fAV\$Kv4RW&UjUNENi;(T<u" +
    "hcP)&BsAfvG{T^WvJ\$%cA8&6FN~a46z1`lO2(L;Dloz_?5O4ElyC<}P=\$UKpzSG5gR8@vi(o>y" +
    "Pnk<7r>)%|2<*Vo+690z4f3P+mfC@gv{\$82a\$IU}Sl*YMWF&U9^%}ha2wOk\$CyEn@R\$Jb+=^}Z" +
    "`A_2YKhO(Nw)=Mb(r0FW1)i1T+uGGan-BD+tFAcWpK&VUtECUldOCt!yuUUA8{Q946N3zQC}<d" +
    "ZItTqrJFNhVNHc3p|`iR2D&rfYe`9prB4@xgV4B%P;e!kTAgoC}tsNd+|QOP!RQLcTtE9vvJ#X" +
    "t}i-%xzZGR=x@ziXBeyyaG)HMt79Ff~hEKpPy)sy@G-Gp(K^x4DKEC=~T)tBndYaB!*FPoWruB" +
    "^@W^ac6yZw0!0dyS{7<5x;ZNW4A_U@DjG62Lt\$IAq`v!Bf{6(X)B^LzGb0W|i3R*!\$rRy2L*B5" +
    "Rr~m)}", 0xff00ff, false);

def OnLoginPage() {
    var x = 0; var y = 0; Scrape();
    return FindTextUsingFont(x,y,font1,"ExistingUser",0,20,0,0) || FindTextUsingFont(x,y,font1,"PLAY",0,20,0,0);
}

def PressPlay() {
    var x = 0;
    var y = 0;
    Scrape();
    while (!FindTextUsingFont(x,y,font1,"PLAY",0,20,0,0)){
        Wait();
        Sleep(100);
        Scrape();
    }

    if (FindTextUsingFont(x,y,font1,"PLAY",0,20,0,0)){
        ClickMouse ( x, y, 1 );
        Wait();   
    } 

    Wait();
}

def Login() {
    var x = 0; var y = 0;
    Wait(); while ( OnLoginPage() ) {

        // Click the existing user button if found
        if (FindTextUsingFont(x,y,font1,"ExistingUser",0,20,0,0)){
            ClickMouse ( x, y, 1 );
            Wait();
        }

        // Click the existing user button if found
        if (FindTextUsingFont(x,y,font1,"Login:",0,20,0,0)){
            // Click the login prompt to focus there
            ClickMouse ( x + 40, y, 1 );
            Wait();

            SendKeys ( username );
            Wait();
     
            if (FindTextUsingFont(x,y,font1,"Password:",0,20,0,0)){
                // Click the password prompt to focus there
                ClickMouse ( x + 40, y, 1 );
                Sleep ( 200 );
                SendKeys ( password );
         
                Wait();
                Scrape();
                if (FindBitmap(x,y, loginButton,1,1)){
                    ClickMouse(x + 20, y + 10, 1);
                }
                Wait();

            }

        }


        PressPlay();
        Sleep(1000);
    }

}

def dropAshes() {
    var x = 0;
    var y = 0;
    Sleep(100);
    Scrape();
    while(FindColor(x, y, 12695735, 550, 325, 732, 426, 10)) {
        KeyDown(0x10);
        Sleep(1000);
        ClickMouse(x,y,1);
        Scrape();
        KeyUp(0x10);
    }

    return;
}

def dropBuckets() {
    var x = 0;
    var y = 0;
    Sleep(100);
    Scrape();
    while(FindColor(x, y, 9732948, 550, 207, 737, 353, 10)) {
        KeyDown(0x10);
        Sleep(1000);
        ClickMouse(x,y,1);
        Scrape();
        KeyUp(0x10);
    }

    return;
}

def dropOrbs() {
    var x = RandomInt(563,587);
    var y = RandomInt(255,277);
    KeyDown(0x10);
    Sleep(100);
    for (var i = 0; i < 4; ++i)
    {
        Sleep(100);
        ClickMouse(x,y,1);
        y += 35;
    }

    x = RandomInt(606,630);
    y = RandomInt(220,240);

    for (var i = 0; i < 5; ++i)
    {
        Sleep(100);
        ClickMouse(x,y,1);
        y += 35;
    }

    x = RandomInt(648,674);
    y = RandomInt(220,240);

    for (var i = 0; i < 5; ++i)
    {
        Sleep(100);
        ClickMouse(x,y,1);
        y += 35;
    }

    x = RandomInt(693,713);
    y = RandomInt(220,240);

    for (var i = 0; i < 5; ++i)
    {
        Sleep(100);
        ClickMouse(x,y,1);
        y += 35;
    }
    Sleep(100);
    KeyUp(0x10);
    Scrape();
    while(FindColor(x, y, orbColor, 550, 207, 732, 374, 10)) {
        ClickMouse(x,y,2);
        y += 40;
        ClickMouse(x,y,1);
        Sleep(500);
        Scrape();
    }

    return;
}

if (SetWindow("Old School") == ""){Die("Could not find runescape");}while(SelectInnerWindow("SunAwtCanvas")){}
// SetVirtualInputsOff();
Login();

def HopWorld(world) {
    var x = 0;
    var y = 0;
    KeyDown(121);
    Sleep(10);
    KeyUp(121);

    Sleep(500);
    Scrape();

    print(world);
    if(FindTextUsingFont(x, y, font2, world, 564, 229, 583, 431, 0, 10, 0, 0)) {
        print("found world - no scroll");
        // MoveMouse (x+3, y+3);
        DoubleClickMouse ( x+3, y+3, 1);
    } else {
        print("161");
        Scrape();
        var time = Time();

        while(!FindTextUsingFont(x, y, font2, world, 564, 229, 583, 431, 0, 10, 0, 0)) {
            if(Time() - time > 180) {
                Fix("Hop");
                break;
            }
            print("164");
            if(to_int(OCRUsingFont(x, y, font2, 564, 229, 583, 431, 0, 10, 0, 0)) > to_int(world)) {
                x = RandomInt(722,734);
                y = RandomInt(230,242);
            } else {
                x = RandomInt(722,734);
                y = RandomInt(419,430);
            }

            ClickMouse(x,y,1);
            Scrape(); // need
            Sleep(200);
        }

        if(FindTextUsingFont(x, y, font2, world, 564, 229, 583, 431, 0, 10, 0, 0)) {
            // MoveMouse (x+3, y+3);
            DoubleClickMouse ( x+3, y+3, 1);
        }
    }
    return
}

def MouseMoveTraders() {
    var l = 0;
    var x = 0; var y = 0;
    var s = OCRUsingFont(x, y, font1, 3, 0, 300, 50, 1, 25, 50, 0);
    return Contains(l, "TalkToTrader", s);
}

def ScanScreenFor(name) {
  MoveMouse(0, 0);
  var scanHeight = GetHeight() / 15;
  for(var i = 0; i < 7; ++i) {

    var scanWidth = GetWidth() / 15;
    for(var col = 1; col <= GetWidth() - 200; col += scanWidth) {
      MoveMouse(col, i * scanHeight);

      var x = 0;
      var y = 0;
      Scrape();
      var s = OCRUsingFont(x, y, font1, 1, 1, 300, 100, 1, 30, 50, 0);
      var textFound = Contains(name, s);

      if(textFound) {
        MoveMouse(col - scanWidth, i * scanHeight);
        return true;
      }
    }
    MoveMouse(0, i * scanHeight);
  }
  return false;
}

def TradeCrewMember() {
    var x = GetLastMouseX(); var y = GetLastMouseY();
    var tol = 2;
    var w= GetWidth(); var h = GetHeight();
    Scrape();
    KeyDown(112);
    Sleep(10);
    KeyUp(112);
    print("200");
    var time = Time();
    while(!IsColor(GetColor(474,294),storeBG, 30)) {
        if(Time() - time > 180) {
            Fix("Trade");
            break;
        }
        Scrape();
        print("203");
        if (!IsColor(GetColor(474,294),storeBG, 30) && (MouseMoveTraders() &&
            (IsColor(GetColor(x,y),trader1, tol) || IsColor(GetColor(x,y),trader2, tol) || IsColor(GetColor(x,y),trader3, tol))  ||
            (FindColorSpiral(x, y,  trader1, x-20,y-20,x+20,y+20, tol , true, 0) || FindColorSpiral(x, y,  trader2, x-20,y-20,x+20,y+20, tol , true, 0) || FindColorSpiral(x, y,  trader3, x-20,y-20,x+20,y+20, tol , true, 0)) ||
            (FindColorSpiral(x, y,  trader1,0,0,w-260, h, tol, false, 50) || FindColorSpiral(x, y,  trader2,0,0,w-260, h, tol, false, 50) || FindColorSpiral(x, y,  trader3,0,0,w-260, h, tol, false, 50)))) {
            // MoveMouse (x, y);
            ClickMouse(x,y,2);
            y += 40;

            // MoveMouse (x, y);
            ClickMouse(x,y,1);
            Sleep(2000); print("200-loop slept 2 seconds");
        }
        Sleep(200); // need
    }
    print("200-loop-done");
    return
}

def BuySupplies() {
    var temp1 = 0;
    var temp2 = 0;
    var x = 0;
    var y = 0;
    var xx = 0;
    var yy = 0;
    // var xxx = RandomInt(605, 632);
    // var yyy = RandomInt(217, 240);
    Scrape();
    var buckets = to_int(OCRUsingFont(x, y, font3, 212, 158, 231, 172, 0, 10, 0, 0));
    var seaweed = to_int(OCRUsingFont(xx, yy, font3, 307, 158, 324, 172, 0, 10, 0, 0));
    x = RandomInt(224, 240);
    y = RandomInt(169, 189);
    xx = RandomInt(320, 335);
    yy = RandomInt(173, 186);
    if((buckets > 6) && (seaweed == buckets) && (buckets < 11)) {
        print("239");
        var time = Time();

        print("255");
        while(true) {
            if(Time() - time > 180) {
                Fix("BuyBuckets");
                break;
            }
            ClickMouse(x,y,2);
            y += 80;

            ClickMouse(x,y,1);
            y -= 80;
            Sleep(1000); print("255-loop");
            Scrape();
            if(FindColor(temp1, temp2, 9732948, 550, 206, 735, 247, 10)) {
                break;
            }
        }

        print("271");
        while(true) {
            if(Time() - time > 180) {
                Fix("BuyAsh");
                break;
            }
            ClickMouse(xx,yy,2);
            yy += 80;

            ClickMouse(xx,yy,1);
            yy -= 80;
            Sleep(1000); print("271-loop");
            Scrape();
            if(FindColor(temp1, temp2, 12695735, 550, 325, 732, 353, 10)) {
                break;
            }
        }

        // x = RandomInt(478, 493);
        // y = RandomInt(34, 50);
        // ClickMouse(x,y,1);
        KeyDown(27);
        Sleep(10);
        KeyUp(27);

        return true;
    }

    // x = RandomInt(478, 493);
    // y = RandomInt(34, 50);
    // ClickMouse(x,y,1);
    KeyDown(27);
    Sleep(10);
    KeyUp(27);
    return false;
}

def CastSpell() {
    var x = RandomInt(615,637);
    var y = RandomInt(300,321);

    KeyDown(113);
    Sleep(10);
    KeyUp(113);
    ClickMouse(x,y,1);
    KeyDown(112);
    Sleep(10);
    KeyUp(112);
    Sleep(3000);

    dropAshes();
    dropBuckets();

    return;
}

def MakeLenses() {
    print("MakeLenses Start");
    var temp1 = 0;
    var temp2 = 0;
    var x = RandomInt(565,590);
    var y = RandomInt(215,238);

    print("Click pipe");
    ClickMouse(x,y,1);

    x = RandomInt(564,591);
    y = RandomInt(256,274);

    print("Click molten");
    if(FindColor(temp1, temp2, moltenGlassColor, 550, 210, 726, 408, 10)) {
        ClickMouse(x,y,1);
    } else {
        x = RandomInt(607,632);
        y = RandomInt(223,239);
        ClickMouse(x,y,1);
    }

    x = RandomInt(378,455);
    y = RandomInt(205,285);

    Sleep(1000); print("Slept 1 second")

    print("Right Click make lenses");
    ClickMouse(x,y,2);
    y += 85;


    print("Click make all lenses");
    ClickMouse(x,y,1);
    print("MakeLenses End");
    return;
}

def Fix(origin) {
    reset = true;
    var x = 0;
    var y = 0;
    if(OnLoginPage()) {
        Login();
        Sleep(5000);

        KeyDown(121);
        Sleep(10);
        KeyUp(121);

        Sleep(500);

        ClickMouse(RandomInt(578,704), RandomInt(351,368), 1);
    }

    KeyDown(27);
    Sleep(10);
    KeyUp(27);

    KeyDown(112);
    Sleep(10);
    KeyUp(112);

    Scrape();
    Wait();

    if(FindColor(x, y, moltenGlassColor, 555, 214, 727, 407, 10)){
        x = RandomInt(565,590);
        y = RandomInt(215,238);

        ClickMouse(x,y,1);

        x = RandomInt(564,591);
        y = RandomInt(256,274);

        FindColor(x, y, moltenGlassColor, 555, 214, 727, 407, 10);
        ClickMouse(x,y,1);

        x = RandomInt(378,455);
        y = RandomInt(205,285);

        Sleep(1000); print("Slept 1 second")

        print("Right Click make lenses");
        ClickMouse(x,y,2);
        y += 85;


        print("Click make all lenses");
        ClickMouse(x,y,1);

        Sleep(20000);
    }
    dropOrbs();

    dropAshes();
    dropBuckets();

    if(IsColor(GetColor(641,80),0, 0)) {
        ScanScreenFor("CrossGangplank");
        ClickMouse(GetLastMouseX(), GetLastMouseY(), 1);
    }

    return;
}

def Main() {
    var x = 0;
    var y = 0;
    var time = Time();

    ClickMouse ( 255, 180, 1);

    while(true) {
        if(Time() - startTime > 21600) {
            Exit(5);
        }
        for (var i = 0; i < 14; ++i) {
            reset = false;

            print("made it here1");
            if(!reset) {
                HopWorld(worlds[i]);
                Sleep(6000);
            }

            print("made it here2");
            if(!reset) {
                TradeCrewMember();
            }
            print("made it here3");
            if(!reset) {
                if(BuySupplies()) {
                    print("made it here4");
                    if(!reset) {
                        CastSpell();
                    }
                    if(!reset) {
                        Scrape();
                        time = Time();
                        while(!FindColor(x, y, orbColor, 561, 251, 591, 278, 10)) {
                            if(Time() - time > 180) {
                                Fix("MakeLenses");
                                break;
                            }
                            MakeLenses();
                            print("Waiting 9 Seconds"); Sleep(9000);
                            print("before scrape 402"); Scrape(); print("after scrape 402");
                            print("ended");
                        }
                    }
                    print("before scrape 409"); Scrape(); print("after scrape 409");
                    if(!reset) {
                        time = Time();
                        while(FindColor(x, y, moltenGlassColor, 555, 214, 727, 407, 10)) {
                            if(Time() - time > 180) {
                                Fix("CheckIfDoneGlass");
                                break;
                            }
                            Sleep(1000);
                            Scrape();
                            print("Net Yet");
                        }
                    }
                    dropOrbs();
                    print("Done");
                } else {
                    print("made it here5");
                    continue;
                }
            }
        }
    }
}
Main();
// Fix("");
// dropOrbs();
///EOF
 
Last edited:
Runescape Gamblingrunescape gambling
Back
Top