can some one help me on this script?

Discussion in 'Scar/Simba Help' started by kanecrichton, May 25, 2008.

can some one help me on this script?
  1. Unread #1 - May 25, 2008 at 3:06 AM
  2. kanecrichton
    Joined:
    May 24, 2008
    Posts:
    167
    Referrals:
    0
    Sythe Gold:
    0

    kanecrichton Active Member

    can some one help me on this script?

    hi dudes, I am really stuck on this script, anyone got a idea of how to work it? Thanks!


    the script:



    {Varrock Miner
    by
    !!!HatlessCow!!!
    edited
    by
    creama
    now it actually walks back to the mine

    -Start in varock south-East Mine
    -Pickaxe in first invin slot
    -other pickaxes in first bank slot
    -go go go
    }
    program VarrockSouthEastMiner;
    {.include sslibrary.txt}
    {.include mri.txt}
    {.include boxbreaker.txt}
    {.include antiford.txt}

    const
    URL = false;//use random logging in and out?
    username = '';
    password = '';
    LampSkill = 'mining';//Skill if get a lamp
    RockType = 3;//1.Copper 2.Tin 3.Iron
    RoadColor = 5592411;
    BankSymbol = 3060683;
    MineSymbol = 4412257;

    var RockColor:integer;
    Mined,sst,cst,wst,wet,awt,awth,srt,tih,tim,tis:integer;
    Stop,GetPick,log1,log2,log3,log4,log5:boolean;

    procedure RandomLog;
    begin
    if(not log1)and((srt/60)>40)and((srt/60)<50)then
    begin
    log1:=true;
    logout;
    wait(45000+random(5000));
    login(username,password);
    end;
    if(not log2)and((srt/60)>100)and((srt/60)<110)then
    begin
    log2:=true;
    logout;
    wait(45000+random(5000));
    login(username,password);
    end;
    if(not log3)and((srt/60)>190)and((srt/60)<200)then
    begin
    log3:=true;
    logout;
    wait(45000+random(5000));
    login(username,password);
    end;
    if(not log4)and((srt/60)>340)and((srt/60)<350)then
    begin
    log4:=true;
    logout;
    wait(45000+random(5000));
    login(username,password);
    end;
    if(not log5)and((srt/60)>420)and((srt/60)<430)then
    begin
    log5:=true;
    logout;
    wait(45000+random(5000));
    login(username,password);
    end;
    end;

    procedure ProgReport;
    begin
    Writeln('-----===Varrock Miner By HatlessCow===-----');
    Writeln('---------=====Progress Report=====---------');
    cst:=getsystemTime;
    srt:=(cst-sst)/1000;
    tih:=srt/3600;
    tim:=(srt/60)-tih*60;
    tis:=srt-tim*60-tih*3600;
    awth:=awth+(wet-wst);
    awt:=awth/Mined;
    Writeln('Worked for '+inttostr(tih)+' Hours '+inttostr(tim)+' Minutes '+inttostr(tis)+' Seconds');
    Writeln('Mining 1 ore every '+inttostr(awt/1000)+' Seconds');
    Writeln('Mined '+inttostr(Mined)+' Ores');
    Writeln('Gained '+inttostr(Mined*35)+' xp');
    if(drfordcnt>0)then writeln('Solved '+inttostr(drfordcnt)+' Dr. Ford random.');
    if(srt>=60)then
    begin
    Writeln('Mining Approximately '+inttostr(Mined/(srt/60))+' Ores Per Minute');
    Writeln('Mining Approximately '+inttostr((Mined/(srt/60))*60)+' Ores Per Hour');
    end;
    Writeln('---------=====Progress Report=====---------');
    end;

    procedure SetRColor;
    begin
    if(RockType=1)then
    RockColor:=4812955;
    if(RockType=2)then
    RockColor:=9013650;
    if(RockType=3)then
    RockColor:=2503250;
    end;

    Procedure MouseFlag(x,y,rx,ry:integer);
    begin
    Mouse(x,y,rx,ry,true);
    Flag;
    end;

    procedure bag;
    begin
    Mouse(651,187,3,3,true);
    end;

    procedure RunFF;
    begin
    Run(true);
    MouseFlag(650,150,0,0);
    wait(6000);
    MouseFlag(642,19,0,0);
    Run(false);
    bag;
    end;

    procedure MiningRandoms;
    begin
    if(Fight)then
    begin
    Stop:=true;
    RunFF;
    end;
    if(HeadGone)then
    Stop:=true;
    if(PickBroke)then
    GetPick:=true;
    findtext;
    eyetest;
    FindBox;
    UseLamp(lampskill);
    FindMiscRandoms;
    if(dead)then
    Logout;
    end;

    procedure Randoms;
    begin
    if(Fight)then
    begin
    runff;
    end
    findtext;
    eyetest;
    FindBox;
    UseLamp(lampskill);
    FindMiscRandoms;
    if(dead)then
    Logout;
    end;

    procedure ToBank;
    var rwalk:integer;
    begin
    randoms;
    Run(true);
    Bag;
    MouseFlag(694,57,2,2);
    for RWalk:=0 to 2 do
    begin
    If(FindColorSpiral(x,y,RoadColor,602,8,679,41))then
    MouseFlag(x,y,1,1);
    end;
    repeat
    If(FindColorSpiral(x,y,RoadColor,602,8,679,41))then
    MouseFlag(x,y,1,1);
    until(FindColorSpiral(x,y,RoadColor,570,19,602,107))
    repeat
    If(FindColorSpiral(x,y,RoadColor,570,19,602,107))then
    MouseFlag(x,y,1,1);
    until(FindColorSpiral(x,y,BankSymbol,572,8,725,160))
    If(FindColorSpiral(x,y,BankSymbol,572,8,725,160))then
    MouseFlag(x,y,1,1);
    end;

    procedure ToMine;
    begin
    randoms;
    Run(true);
    Bag;
    MouseFlag(692,55,3,3);
    MouseFlag(708,89,3,3);
    MouseFlag(675,129,3,3);
    if(FindColorSpiral(x,y,RoadColor,593,24,716,107))then
    MouseFlag(x,y,1,1);
    repeat
    if(FindColorSpiral(x,y,RoadColor,614,115,686,160))then
    MouseFlag(x,y,1,1);
    until(FindColorSpiral(x,y,MineSymbol,572,8,725,160))
    If(FindColorSpiral(x,y,MineSymbol,572,8,725,160))then
    MouseFlag(x,y,1,1);
    end;

    procedure Bank;
    begin
    randoms;
    OpenBank;
    Deposit(1,1,1);
    DepositAll;
    Withdraw(1,1,1);
    CloseWindow;
    randoms;
    end;

    procedure findblack;
    begin
    x:=0
    y:=0
    if(findcolorspiral(x,y,0,40,119,211,264)then
    begin
    eyetest;
    end;
    end;

    Function FindRock:boolean;
    begin
    if(FindObj('Mine',rockcolor,5))and(not(GasFound(rockcolor)))then
    result:=true;
    end;

    procedure MineRock;
    var tx,ty,qx,qy,ifail,itrack:integer;
    begin
    Stop:=false;
    ifail:=0;
    if(FindRock)then
    begin
    Mouse(x,y,4,4,true);
    tx:=x; ty:=y;
    repeat
    wait(100+random(600));
    FindColorSpiralTolerance(tx,ty,RockColor,tx-10,ty-10,tx+10,ty+10,5)
    if(not(FlagPresent))then
    itrack:=itrack+1;
    until(not(FlagPresent))and(itrack>=20)
    repeat
    ifail:=ifail+1;
    wait(150+random(400));
    MiningRandoms;
    until(ifail>45)or(Stop)or(GetPick)or(InventoryCount=28)or(not(FindColorSpiralTolerance(qx,qy,RockColor,tx-10,ty-10,tx+10,ty+10,5)))
    end;
    end;

    begin
    LoadLibrary('Internet Explorer');
    LoadMRI;
    SetRColor;
    Run(false);
    SetBrightness('vbright');
    SetChat('off');
    Bag;
    GetHeadColorPick;
    sst:=getsystemtime;
    repeat
    wst:=getsystemtime;
    repeat
    MiningRandoms;
    findblack;
    MineRock;
    MiningRandoms;
    until(GetPick)or(InventoryCount=28)
    wet:=getsystemtime;
    Mined:=Mined+InventoryCount-1;
    ProgReport;
    randoms;
    ToBank;
    Bank;
    ToMine;
    if(URL)then
    RandomLog;
    until(false)
    end.
     
  3. Unread #2 - May 25, 2008 at 4:44 AM
  4. Macroman
    Joined:
    Jan 21, 2007
    Posts:
    6,919
    Referrals:
    9
    Sythe Gold:
    12

    Macroman Hero
    Do Not Trade

    can some one help me on this script?

    Code:
     URL = false;//use random logging in and out?
    username = '';
    password = '';
    
    
    
    In this part of the script you need to change it to
    Code:
     URL = false;//use random logging in and out?
    username = '[B]USERNAME HERE[/B]';
    password = '[B]PASSWORD HERE'[/B];
    
     
  5. Unread #3 - May 31, 2008 at 7:12 PM
  6. pur3min
    Joined:
    Oct 15, 2007
    Posts:
    189
    Referrals:
    0
    Sythe Gold:
    0

    pur3min Active Member

    can some one help me on this script?

    You need to add more failsafes with the walking, and apply the SRL scripting standards.

    WRONG

    Code:
    pocedure BlahBlah;
    var hello,start:integer
    begin
    DoStuff;
    MakeCompass('n');
    MarkTime(Start);
    end;
    
    RIGHT
    Code:
    pocedure BlahBlah;
    var 
    hello, start: integer;
    begin
      DoStuff;
      MakeCompass('n');
      MarkTime(Start);
    end;
    
     
  7. Unread #4 - Jun 18, 2008 at 7:55 AM
  8. r4ang3 k1ng
    Joined:
    Jun 30, 2007
    Posts:
    60
    Referrals:
    0
    Sythe Gold:
    0

    r4ang3 k1ng Member

    can some one help me on this script?

    you got to fill this in

    URL = false;//use random logging in and out?
    username = '';
    password = '';
     
< Need help! | need help with a scrip for scar pls help >

Users viewing this thread
1 guest


 
 
Adblock breaks this site