i need help on 2 ess mining scripts!

Discussion in 'Scar/Simba Help' started by gr1m, Mar 25, 2007.

i need help on 2 ess mining scripts!
  1. Unread #1 - Mar 25, 2007 at 3:10 AM
  2. gr1m
    Referrals:
    0

    gr1m Guest

    i need help on 2 ess mining scripts!

    can anyone help me? i tryed to use pentti's ess miner becasue i like how if people talk to u it responds back, but it dosnt work. and i would like this one that i know works to be able to talk like the pentti's. so can some one put the code in there for me? becuase i cant figure it out. i was trying forever.

    i need to have the talking capabilitys on the first one, onto the second one.

    basicly take the code that talks back to people on the first one and put it onto the second one!

    Code:
    Pentti's script!
    
    {Start at Varrock East bank. SetUp Player, and GO!}
     
    program EssenceMiner;
    {.include srl/srl.scar}
    {.include srl/srl/extended/xmapwalk.scar}
    {.include srl/srl/skill/mining.scar}
    
    var mined,banked,MiningWaitTime:integer;
        MagicShop,transportation:integer;
        RockColor,CloseBank01,TP,MS:integer;
        LoggingOutMark,LogsO:Integer;
        TotEss,TotalEss:integer;
        Trip,TotRun:integer;
        Teleported:Boolean;
        OutEss:Boolean;
        TotRunStr:string;
        Location:String;
        TotEssStr:string;
        What:string;
        RCol:string;
        const
    {______________________________________}
    {////////////////////\\\\\\\\\\\\\\\\\\}
    {///-------Answering-Set-Up----------\\}
    {////////////////////\\\\\\\\\\\\\\\\\\}
        Answer1='bank';  //Text for answer of BankRuns
        Answer2='esse';  //Text for answer of Mined essences
        Answer3='logs';  //Text for answer of Logs out
        Answer4='loca';  //Text for answer of location
        Answer5='goin';  //Text for answer of happening
        Answer6='hello';
        Answer7='tote';  //Text for answer of total essences
        Answer8='totb';  //Text for answer of total banks
        Answer9='help';  //sends to you all commands what is used for answering
        
    OtherPlayer='';//If Other player who to answer (Remember real font size, first letter with big font)
        
                     {______________________________________}
                     {////////////////////\\\\\\\\\\\\\\\\\\}
                     {///--------------SET-UP-------------\\}
                     {////////////////////\\\\\\\\\\\\\\\\\\}
    BankRuns=        {//Make} 12 {Bank runs}             {\\}                                                                                                                             ;
    EveryXMinutes=   {//Log out every} 15 {minutes}      {\\}                                                                                                                             ;
    ForXMinutes=     {//Stay logged out for} 2 {minutes} {\\}                                                                                                                       ;
                     {////////////////////\\\\\\\\\\\\\\\\\\}
                     
                         
    procedure declareplayers;
      begin
      HowManyPlayers:=1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:=0;
                        {______________________________________}
                        {////////////////////\\\\\\\\\\\\\\\\\\}
                        {///----------PLAYER-SET-UP----------\\}
                        {////////////////////\\\\\\\\\\\\\\\\\\}
    Players[0].Name:=   {//Player Name     =}''                                                                                                                                  ;
    Players[0].Pass:=   {//Player Password =}''                                                                                                                                       ;
    Players[0].Nick:=   {//Player Nickname =}'' //(Remember real font size, first letter with big font)                                                                                                                                ;
                        {////////////////////\\\\\\\\\\\\\\\\\\}
                                            end;
    
    function GoingOn(What:string):boolean;
    begin
    clearreport;
    writeln(What+' ('+TheTime+')')
    status(What+' ('+TheTime+')')
    addtoreport(what+' ('+theTime+')')
    What:=What
    end;
    
    function Answer(FromCommand,WithCommand,ToPlayer:string):boolean;
    var a:string;
        NameBmp:integer;
    begin
    wait(20)
    a:=Lowercase(Trim(GetTextAtEx(84, 415, 45, SmallChars, False, False, 0, 2, 128, 40, True, tr_NormalChars)))
    if(pos(a,FromCommand)<>0)
    then begin
    writeln('Found a command: '+FromCommand)
    GameTab(8)
    NameBmp:=CreateBitMapMaskFromText(ToPlayer,SmallChars)
    if(findbitmapin(NameBmp,x,y,490,185,750,483))
    then begin
    writeln('Answered to '+ToPlayer)
    Mouse(x+5,y+3,1,1,true)
    wait(500)
    Mouse(330,455,5,5,true)
    TypeSend(WithCommand)
    writeln('With command: '+withcommand)
    end;
     end;
      end;
    
    procedure SetAtScriptBrightness;
    begin
    GameTab(11)
    if(not(getcolor(715,230)=2635069))
    then begin
    goingon('Setting right brightness for script')
    Mouse(715,230,1,1,true)
    wait(500)
    end;
     end;
     
    procedure Answers;
    begin
    if(otherplayer='')
    then begin
    exit;
    end;
    Answer(Answer1,'I have mined '+inttostr(mined)+' essences now.',OtherPlayer)
    //Text for answer of BankRuns
    
    Answer(Answer2,'I have banked '+inttostr(banked)+' times now.',OtherPlayer)
    //Text for answer of Mined essences
    
    Answer(Answer3,inttostr(LogsO)+' times logged out.',OtherPlayer)
    //Text for answer of Logs out
    
    Answer(Answer4,'Im in the'+Location,OtherPlayer)
    //Text for answer of Location
    
    Answer(Answer5,'Im doing now: '+What,OtherPlayer)
    //Text for answer of happening
    
    Answer(Answer6,'Hi! :)',OtherPlayer)
    
    Answer(Answer7,'Total essences mined: '+TotEssStr,OtherPlayer)
    //Text for answer of total essences mined
    
    Answer(Answer8,'Total times banked: '+TotrunStr,OtherPlayer)
    //Text for answer of total bank times
    
    answer(Answer9,'Used commands are: '+Answer1+','+Answer2+','+Answer3+','+Answer4+','+Answer5+','+Answer6+','+Answer7+','+Answer8+','+Answer9,OtherPlayer)
    //Text for answer of used commands
    end;
    
    
    {LogOutEvery2 based From SRL, made it to log out for every X MINUTES}
    procedure LogOutEvery2(Minutes, ForXMins: integer);
    var LogsO:integer;
    begin
      if ((TimeFromMark(LogOutMark) / 1000) / 60 >= Minutes) then
      begin
        MarkTime(Loggingoutmark);
          LogOut;
          goingon('Logged out, coming back soon')
          LogsO:=LogsO+1
          goingon('Logged out for ' + inttoStr(forxmins) + 'min(s)')
        goingon('Logging out and coming back in about ' + IntToStr(forxmins) + ' min(s)');
        repeat
          Mmouse(5, 5,1,1)
            Wait(30000 + Random(1000));
          Wait(15 + Random(15) + Random(15))
        until (TimeFromMark(Loggingoutmark) >= forxmins);
        Wait(Random(10000) + Random(5000));
        LoginPlayer;
        Wait(Random(5000) + Random(2500));
      end;
    end;
    
    procedure TalkingToMeTXT;
    begin
     Case Random(10)+1 of
      1: TypeSend('Right...'+chr(13))
      2: TypeSend('What?'+chr(13))
      3: TypeSend('Sorry, i dont understand.'+chr(13))
      4: TypeSend('What do yuo want?'+chr(13))
      5: TypeSend('I have no time'+chr(13))
      6: TypeSend('I dont like you'+chr(13))
      7: TypeSend('You are getting my nervous'+chr(13))
      8: TypeSend('is it possible to be quit for 2 minutes?'+chr(13))
      9: TypeSend('yes? I am.'+chr(13))
     10: TypeSend('No, you again.'+chr(13))
     End;
     end;
    
     procedure TalkingToMe;
    var CUAM:integer;
     begin
     If(not(FindBitmapMaskTolerance(NickNameBmp, x, y, 0, 24, 517, 338, 0, 40))) then begin
     wait(random(10))
     Exit; end;
    If(FindBitmapMaskTolerance(NickNameBmp, x, y, 0, 24, 517, 338, 0, 40)) then
    begin
    TalkingToMeTxt;
    CUAM:=CUAM+1
    Writeln('Your Name has spotted on the screen '+
    'and you  answered.')
    if(CUAM>3) then begin
    TypeSend('Nice to talk, but now gtg. See you! :)')
    LogOut;
    Wait(20000+random(15000))
    LogInPlayer;
    CUAM:=0
    end;
    end;
    wait(500)
    end;
    
    procedure SayLevel(Skill:string);
    var LVLBmp,Lvl:integer;
     begin
      LvlBmp:=createbitmapmaskfromtext(skill,upchars)
    If(FindBitmapMaskTolerance(LvlBmp, x, y, 0, 0, 516, 338, 0, 40))then
    begin
    Lvl:=GetSkillLevel(Skill)
    TypeSend('My '+Skill+' Level is '+inttostr(Lvl)+chr(13))
    goingon('Someone asked your '+Skill+' level. You answered.')
    end;
    end;
    
    function InShop:boolean;
    begin
    if(findsymbol(x,y,'magic shop')=true)
    then begin
    GoingOn('In shop')
    Location:='In Shop'+inttostr(ScriptTime(2))
    result:=true;
    end;
     end;
    
    function AtBank:boolean;
    begin
    if(findsymbol(x,y,'bank')=true)
    then begin
    GoingOn('At bank')
    Location:='At bank'+inttostr(ScriptTime(2))
    Result:=True;
    end;
     end;
    
    function AtEss:boolean;
    begin
    if(findsymbol(x,y,'transportation')=true)
    then begin
    Goingon('At essences')
    Location:='At essences '+inttostr(ScriptTime(2))
    result:=true;
    end;
     end;
    
       procedure NotFindEss;
       begin
       goingon('Couldnt find object, rotating screen and trying again')
       case random(9) of
       0:
        begin
         KeyDown(VK_Left)
         wait(750)
         KEyUp(VK_Left)
         end;
      1:
       begin
         KeyDown(VK_Right)
         wait(750)
         KEyUp(VK_Right)
         end;
       2:
       begin
         KeyDown(VK_Up)
         wait(750)
         KEyUp(VK_Up)
         end;
       3:
       begin
         KeyDown(VK_Down)
         wait(750)
         KEyUp(VK_Down)
         end;
       4:
       begin
       HighestAngle;
       end;
       5:
       begin
       MakeCompass('N')
       end;
       6:
       begin
       MakeCompass('E')
       end;
       7:
       begin
       MakeCompass('S')
       end;
       8:
       begin
       MakeCompass('W')
       end;
      end;
        end;
    
    procedure checkbankcolor;
    var c : integer;
    begin
    c:=0
          repeat
               BankColor:= GetSymbolColor(x,y, 'bank');
               c:= c+1;
               wait(140+random(20))
               writeln('Taken '+inttostr(c)+'/20 tries to find bank')
           until(bankcolor>0)or(c>19)
    
           if(c>19)then
           begin
           c:=0
              GoingOn('Cant find BankSymbol');
              Goingon('Logging out and coming back')
              LogOut;
              wait(200)
              LogInPlayer;
              wait(200+random(500))
              checkbankcolor;
          end;
          writeln('Bank color: '+inttostr(BankColor))
    end;
    
    procedure Walkingways;
     begin
     case random(2) of
     0: begin mouse(681+random(4)-random(4),102+random(4)-random(4),2,2,true)
       SetRun(true)
       MMouse(681,102,2,2)
       wait(200)
       flag;
       mouse(626+random(4)-random(4),118+random(4)-random(4),2,2,true)
       wait(200)
       flag;
        end;
    
    1: begin mouse(612+random(4)-random(4),94+random(4)-random(4),2,2,true)
       SetRun(true)
       MMouse(681,102,2,2)
       wait(400)
       flag;
       mouse(653+random(4)-random(4),120+random(4)-random(4),2,2,true)
       wait(300)
       flag;
       end;
        end;
         end;
    
    procedure walkToAubury;
    begin
    Goingon('Walking to magic shop')
     Walkingways;
     end;
    
     procedure Toshop;
     begin
       MS:=0
       TP:=0
       MagicShop:=0
       Transportation:=0
     Goingon('Finding shop')
            repeat
           MagicShop:=GetSymbolColor(x,y,'magic shop')
           wait(50)
           MS:=MS +1
           writeln('Taken '+inttostr(MS)+'/6 tries to find Magic shop symbol')
           until(MS=6)or (MagicShop>0)
           MS:=0
           if(MagicShop>0)then begin
           Mouse(x+random(2)-random(2),y+9,2,2,true)
           Goingon('Found Magic shop')
           end;
           if(MagicShop=0) then begin
                          writeln(' ')
                       repeat
                       Transportation:=GetSymbolColor(x,y,'transportation')
                       wait(50)
                       TP:=TP +1
                       writeln('Taken '+inttostr(TP)+'/6 tries to find Transportation symbol')
                      until(TP=6)or(Transportation>0)
                      TP:=0
                      writeln('')
                      Goingon('Found magic shop')
                      Mouse(x+random(2)-random(2),y+9,2,2,true)
                       end;
             if(MagicShop=0)and(Transportation=0)
             then begin
             logout;
             loginplayer;
             ToShop;
             end;
        wait(200)
       flag;
       wait(1000)
       MS:=0
       TP:=0
       MagicShop:=0
       Transportation:=0
       end;
    
    procedure ToRocks;
    begin
    if(Teleported=True)
    then begin
    Teleported:=True;
    Exit;
    end;
    Teleported:=False
    Goingon('Finding Aubury')
    mousespeed:=4
    FindObj(x,y,'Aubu',12568519,7)
    wait(50)
    Mouse(x+random(1)-random(1),y+random(1)-random(1),2,2,false)
    if(not(ClickOption('Tele',1)))then begin
    wait(100)
    Clickoption('Cancel',1)
    wait(100)
    if(Teleported=True)
    then begin
    Exit;
    end;
    notfindess;
    if((InShop)=false)
    then begin
    exit;
    end;
    ToRocks;
    end;
    mousespeed:=7
    ClickOption('Tele',1)
    wait(200)
    if(inchat('reach'))
    then begin
    ToRocks;
    end;
    Teleported:=True;
    flag;
    wait(5000+random(1000))
    makecompass('n')
    end;
    
    procedure Roomways;
    begin
     case random(4) of
    
     0: begin
          repeat
          goingon('Walking to S-W room')
     mouse(625+random(10)-random(10),100+random(10)-random(10),6,6,true)
     wait(3000)
     flag;
     until(findsymbol(x,y,'arrow'))
     Mouse(x+10,y,2,2,true)
     wait(200)
     flag;
     Location:='S-W room'+inttostr(ScriptTime(2))
         end;
    
     1: begin
     goingon('Walking to N-W room')
          repeat
     mouse(667+random(10)-random(10),60+random(10)-random(10),6,6,true)
     wait(3000)
     flag;
     until(findsymbol(x,y,'arrow'))
     Mouse(x-20,y+12,2,2,true)
     wait(200)
     flag;
      Location:='N-W room'+inttostr(ScriptTime(2))
           end;
    
     2: begin
     Goingon('Walking to S-E room')
           repeat
     mouse(670+random(10)-random(10),110+random(10)-random(10),6,6,true)
     wait(3000)
     flag;
     until(findsymbol(x,y,'arrow'))
     Mouse(x-15,y,2,2,true)
     wait(200)
     flag;
      Location:='S-E room'+inttostr(ScriptTime(2))
           end;
    
     3: begin
     Goingon('Walking to N-E room')
           repeat
     mouse(624+random(10)-random(10),60+random(10)-random(10),6,6,true)
     wait(3000)
     flag;
     until(findsymbol(x,y,'arrow'))
     Mouse(x+20,y+5,2,2,true)
     wait(200)
     flag;
      Location:='N-E room'+inttostr(ScriptTime(2))
           end;
     end;
      end;
    
    function MiddleRoom:Boolean;
    begin
    if((AtEss)=false)
     then begin
     result:=true;
     writeln('You are in middle room')
    roomways;
     end;
     end;
    
     procedure WhatRoom;
     begin
      if(FindSymbol(x,y,'Anvil'))then
     begin
     TelePorted:=False;
       ToShop;
     ToRocks;
     WhatRoom;
     end;
     goingon('What room is this?')
      if(FindSymbol(x,y,'arrow'))
      then begin
      goingon('This is not middle room')
      exit;
      end;
      if(not(FindSymbol(x,y,'arrow')))
      then begin
      MiddleRoom;
      end;
       end;
    
    
       procedure Randoms;
    begin
    findnormalrandoms;
    wait(10)
    solvepinball;
    wait(200)
    findtalk;
    wait(10)
    SayLevel('Mining')
    wait(10)
    clicktocontinue;
    wait(10)
    answers;
    wait(10)
    findname;
    wait(10)
    antiban;
    GhostSpeak('Mining')
    RandomChatEvery(4)
    {BoredEvery(7)}
    HoverEvery(6+random(2),'Mining')
    FindLamp('Mining')
    wait(10)
    answers;
    wait(10)
    SayLevel('Magic')
    wait(10)
    wait(10)
    FindPick;
    
    if(findfight)then begin
    goingon('Fight found, running away...')
    RunAwayDirection('N')
    wait(10000)
    runback;
    end;
    if(findnewbox)then begin
    Logout;
    Goingon('Found a new box, logged out')
    terminatescript;
    end;
    SRLRandomsReport;
    clicktocontinue;
    end;
    
    procedure whilemining;
    begin
    Randoms;
    wait(20)
    TalkingToMe;
    wait(30)
    Answers;
    wait(10)
    end;
    
    procedure GetRockColor;
    begin
    writeln('')
     if((AtEss)=false)
     then begin
     ToRocks;
     WhatRoom;
    end;
    Goingon('Getting new rock color')
    if(Rcol='')
    then begin
    Rcol:='8487563'
    end;
    RCol:=LoadSetting('Pentti','RColor')
    if(Rcol='')
    then begin
    Rcol:='8487563'
    end;
    Goingon('Old rock color: '+Rcol)
    if(Rcol='')
    then begin
    Rcol:='8487563'
    end;
    RockColor:=strtoint(Rcol)
    if(RockColor=0)then begin
    RockColor:=8487563
    end;
    if(FindObj(x,y,'Esse',RockColor,10))
    then begin
    getmousepos(x,y)
    MMouse(x,y,0,0)
     if(not(isuptext('Esse')))
     then begin
     notfindess;
     GetRockColor;
    end;
     if(isuptext('Esse'))
     then begin
     getmousepos(x,y)
     RockColor:=getcolor(x,y)
      if(RockColor=65535)or(RockColor=0)
      then begin
      notfindess;
      GetRockColor;
     end;
    end;
    end;
    makeCompass('n')
      writeln('Got new rock color: '+inttostr(RockColor))
      writeln('')
      SaveSetting('Pentti','RColor',inttostr(Rockcolor))
    end;
    
    procedure MineClick;
    begin
      case random(2) of
    0:  begin
        MMouse(x,y,1,1)
        if(not(isuptext('Esse')))
        then begin
        MineClick;
        end;
      if(IsUpText('Esse'))
      then begin
         mouse(x+random(1)-random(1),y+random(1)-random(1),2,2,true)
         flag;
         wait(200)
         end;
        end;
    
    1:  begin
        mouse(x+random(1)-random(1),y+random(1)-random(1),2,2,false)
        wait(200)
        if(not(clickoption('ine',1)))
        then begin
        MMouse(10,10,1,1)
        wait(200)
        MineClick;
        end;
        Clickoption('ine',1)
        wait(200)
        flag;
        end;
        end;
        end;
    
     procedure Mine;
     begin
     repeat
     if(FindObj(x,y,'Esse',rockcolor,10))
      then begin
     wait(200)
     getmousepos(x,y)
     MineClick;
     wait(1000)
     Goingon('Mining')
     MarkTime(MiningWaitTime)
     repeat
     wait(1000)
      whilemining;
     until((TimeFrommark(MiningWaitTime)/1000)>25)or(invfull)
     or(not(loggedin))
     if(not(invfull))
     then begin
     Mine;
      end;
     end;
     notfindess;
      until(invfull)
        end;
    
    
     procedure BackShop;
     begin
     if(OutEss=True)
     then begin
     exit;
     end;
     OutEss:=False;
     Goingon('Going back to magic shop')
     SetRun(true)
       repeat
     wait(200)
     FindSymbol(x,y,'arrow')
     until(FindSymbol(x,y,'arrow'))
     mouse(x+4+random(2)-random(2),y+7+random(2)-random(2),2,2,true)
     wait(300)
     flag;
     wait(200)
     MMouse(450+random(50),100+random(25),2,2)
     if(FindObj(x,y,'orta',10010307,7))then begin
     wait(200)
     mouse(x,y,2,2,false)
     wait(1000)
     if(not(Clickoption('Use',1)))then begin
     OutEss:=False;
     BackShop;
     end;
     if(ClickOption('Use',1))then
     begin
     wait(300)
     flag;
     OutEss:=True;
     wait(3500)
     end;
     end;
     wait(1000)
     end;
    
     procedure BankWays;
      begin
        if(TotEssStr='')
       then begin
       TotEssStr:='1'
        end;
      TotEssStr:=LoadSetting('Pentti','TotalEssences')
      if(TotEssStr='')
       then begin
       TotEssStr:='1'
        end;
      Mined:=Mined +28
      writeln('M'+inttostr(Mined))
      ReportVars[1] := Mined;
      TotalEss:=strtoint(TotEssStr)
      if(TotalEss=0)
      then begin
      TotalEss:=1
      end;
      case random(2) of
    
    0:begin
     mouse(662+random(2)-random(2),39+random(2)-random(2),2,2,true)
     wait(1500)
     Flag;
     wait(1500)
     flag;
     checkbankcolor;
     wait(10)
     Mouse(x+3,y+6,2,2,true)
     wait(500)
     flag;
      end;
    
    1:begin
     mouse(610+random(2)-random(2),50+random(2)-random(2),2,2,true)
     wait(500)
     Flag;
     wait(100)
     mouse(653+random(2)-random(2),55+random(2)-random(2),2,2,true)
     wait(500)
     flag;
     checkbankcolor;
     wait(200)
     Mouse(x+3,y+6,2,2,true)
     wait(500)
     flag;
     end;
      end;
       end;
    
     procedure ToBank;
     begin
     Goingon('Walking to bank')
     MakeCompass('N')
     bankways;
     end;
    
     procedure BankEss;
     begin
     MakeCompass('S')
      openbank3;
      wait(50+random(50))
      fixbank;
      fixbank;
      wait(50+random(50))
      Goingon('banking all rune essences')
      deposit(2,28,2);
      deposit(2,28,2);
      if(TotRunStr='')
       then begin
       TotRunStr:='1'
        end;
      TotRunStr:=LoadSetting('Pentti','TotalRuns')
      if(TotRunStr='')
       then begin
       TotRunStr:='1'
        end;
      TotRun:=strtoint(TotRunStr)
      if(TotRun=0)
      then begin
      TotRun:=1
      end;
      TotRun:=TotRun+1
      SaveSetting('Pentti','TotalRuns',inttostr(TotRun))
      banked:=banked+1
      writeln('B'+inttostr(banked))
      ReportVars[0] := Banked;
      wait(1050+random(50))
         repeat
      findbitmap(CloseBank01,x,y)
      wait(1000)
      movemousesmooth(x+7,y+7)
      wait(500)
      mouse(x+7,y+7,4,4,true)
      wait(200)
        until(not(findbitmap(CloseBank01,x,y)))
      wait(1000)
      Makecompass('N')
      wait(500+random(50))
      end;
    
      procedure Report;
      begin
      TotEssstr:=LoadSetting('Pentti','TotalEssences')
      TotRunStr:=LoadSetting('Pentti','TotalRuns')
      cleardebug;
      writeln(' _____________________________________ ')
      writeln('|Essence miner by: Pentti (Report->)  |')
      writeln('|_____________________________________|')
      writeln('| '+inttostr(Banked)+' Banking runs by one script run. |')
      writeln('| Mined '+inttostr(Mined)+' essences by one script run  |')
      writeln('| Script has worked for '+inttostr(ScriptTime(2))+' minutes.   |')
      writeln('| Logged out '+inttostr(LogsO)+' times                  |')
      writeln('| Total essences mined: '+TotEssstr+'           |')
      writeln('| Total bank runs: '+Totrunstr+'                  |')
      writeln('|_____________________________________|')
      end;
    
      procedure LoadBitMaps;
      begin
      CloseBank01 := BitmapFromString(19, 20, 'z78DAC594411283200C4' +
           '5AF244908B29452EE7FA45A7F17CC88347464EAE28D03212F8824' +
           'E6E8C223826E152D33B86A48BA86459D6872DB1AE33C63EDF2C51' +
           '37F76879179F45132472F1239A092D946798A670661D4E4B370CD' +
           'E5FD38F03C3B1A3F6AEC7B2D91B51127FB5B367B550DA3F820EE8' +
           'AE7CC0D5737C3A8B1EFB5ACDDFFD14205B41BCF5EFB2A614E9440' +
           '187137FBBCDAA365EDA8D1728E76E3DE6FF6966077D967BF18D18' +
           '52A36B29D62EC91A3C62B973DBE613C7AEC3CF2C6440AFEC1C8AA' +
           '5EA61B8532118C18C117AE2BB98D878B12A9CB78B7DCB57BF902E' +
           '139DD87');
    
           end;
           
       const Skip=false;
    
    begin
    SetUpSRL;
    SetUpSRLMining;
    ScriptID:='44'
    cleardebug;
    clearreport;
    Report;
    teleported:=False;
    wait(3000)
    clearreport;
    cleardebug;
    if(Skip=False) then begin
    writeln('Going to make '+inttostr(bankRuns)+' bank runs.')
    writeln('Logging out after '+inttostr(EveryXMinutes)+' minutes')
    writeln('For '+inttostr(ForXMinutes)+' minutes')
    wait(3500)
    clearreport;
    cleardebug;
    Writeln('Essence miner     Loading.')
    wait(160)
    cleardebug
    Writeln('Essence miner     Loading..')
    wait(190)
    cleardebug;
    Writeln('Essence miner     Loading...')
    wait(250)
    cleardebug;
    Writeln('Essence miner     Loading....')
    wait(250)
    cleardebug
    Writeln('Essence miner     Loading...')
    wait(190)
    cleardebug;
    Writeln('Essence miner     Loading..')
    wait(160)
    cleardebug;
    Writeln('Essence miner     Loading.')
    wait(1000)
    end;
    cleardebug;
    disguisescar('Corey')
    SymbolAccuracy:=0.8
    mousespeed:= 7
    Benmouse:=true
    LoadBitMaps;
    LoadGhostSpeakWords('Mining')
    declareplayers;
    if(Players[0].Name='')
    then begin
    writeln('[Line 53 missing playername] You must write your PLAYERNAME to start script')
    terminatescript;
    end;
    if(Players[0].Pass='')
    then begin
    writeln('[Line 54 missing player password] You must write your PASSWORD to start script')
    terminatescript;
    end;
    if(Players[0].Nick='')
    then begin
    writeln('[Line 55 missing player nickname] You must write your NICKNAME to start script')
    terminatescript;
    end;
    NickNameBmp:=Createbitmapmaskfromtext(Players[0].Nick,Upchars)
    Activateclient;
    wait(1000)
    if(not(loggedin))then loginplayer;
    FindpickHeadColor;
    if(hc1=0)or(hc2=0)or(hc3=0)or(hc4=0)
    then begin
    writeln('You must have pickaxe to run with this')
    logout;
    writeln('Logged out; [No pickaxe]')
    terminatescript;
    end;
    repeat
    Trip:=trip+1
    writeln('Starting trip number '+inttostr(trip)+'.')
    MakeCompass('N')
    highestangle;
    SetChat('on',1)
    setchat('friends',2)
    setchat('off',3)
    teleported:=False;
    SetAtScriptBrightness
    walkToAubury;
    toshop;
    ToRocks;
    OutEss:=False;
    if(TelePorted=False)
    then begin
    ToShop;
    ToRocks;
    end;
    WhatRoom;
    getrockcolor;
    mine;
    TotalEss:=TotalEss+28
    SaveSetting('Pentti','TotalEssences',inttostr(TotalEss))
    Goingon('Inventory full')
    writeln(inttostr(totaless))
    mousespeed:=7
    makecompass('n')
    highestangle;
    BackShop;
    Tobank;
    bankEss;
    OutEss:=False;
    LogOutEvery2(EveryXMinutes,ForXMinutes)
    Report;
    until(BankRuns=Banked)or(Scripttime(2)>240)
    report;
    SRLRandomsReport;
    end.
    Code:
    Script i know that works!
    
    program EssMiner;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Mining.scar}
    
    {
    "Stars, Hide your fires, Let not light see my black and deep desires.
    The eye wink at the hand; Yet let that be, Which the eye fears when it
    is done to see"
                   Macbeth - Shakespeare
    
    This script Mines and Banks Essence at the Varrock East Bank.
    Position your character at the bank.
    
    Setup:
    
    IF YOU LOAD A NEW WORLD, LOGIN ONCE, THEN LOGOUT!
    
    Now you can run The script.
    It is totally autocolor, so there shouldn't be any problems,
    as long as you log-in and -out once if you load a new world!
    
    You need the globalstats Patch.
    (Or just download the latest SRL with the patch)
    
    }
    
    Const
       StartPlayer = 0; // The Number of the player you wish to start with.
       NumberOfUsers = 6; // The Number of users you use.
       MinutesPerLoad = 5; // No need to change this.
       Loads = 10;    // I liked 10 as loads value.
       VersionNumber = '1.06';  // No need to change this.
       YourSRLDSTATSID   = '';  // Stats ID.  Optional.
       YourSRLDSTATSPASS = ''; // Stats Pass.  Optional.
       YourRCMASTER      = ''; // Remote Control Master.  Optional.
    
    Var
       Position : String;
       EssencePoint : Array [0..4] Of TPoint;
       MiningMark, Abyss, NOAbyss, AuburyText, RuneShopColor,
       RuneEssenceMined, PureEssenceMined, iMark, IdleMark: Integer;
       PortalBool : Boolean;
    
    Procedure DeclarePlayers;
    
      Begin
         HowManyPlayers:= NumberOfUsers;
         NumberOfPlayers( HowManyPlayers );
         CurrentPlayer := StartPlayer;
    
         Players[0].Name :='';
         Players[0].Pass :='';
         Players[0].Nick :='';
         Players[0].Loc  :='Bank';
         Players[0].Active:=True;
         Players[0].Boolean1  := True;       // Is The Pick Equipped?
    
         Players[1].Name :='';
         Players[1].Pass :='';
         Players[1].Nick :='';
         Players[1].Loc  :='Bank';
         Players[1].Active:=True;
         Players[1].Boolean1  := True;       // Is The Pick Equipped?
    
         Players[2].Name :='';
         Players[2].Pass :='';
         Players[2].Nick :='';
         Players[2].Loc  :='Bank';
         Players[2].Active:=True;
         Players[2].Boolean1  := True;       // Is The Pick Equipped?
    
         Players[3].Name :='';
         Players[3].Pass :='';
         Players[3].Nick :='';
         Players[3].Loc  :='Bank';
         Players[3].Active:=True;
         Players[3].Boolean1  := True;       // Is The Pick Equipped?
    
         Players[4].Name :='';
         Players[4].Pass :='';
         Players[4].Nick :='';
         Players[4].Loc  :='Bank';
         Players[4].Active:=True;
         Players[4].Boolean1  := True;       // Is The Pick Equipped?
    
         Players[5].Name :='';
         Players[5].Pass :='';
         Players[5].Nick :='';
         Players[5].Loc  :='Bank';
         Players[5].Active:=True;
         Players[5].Boolean1  := True;       // Is The Pick Equipped?
    
         Writeln( IntToStr ( NumberOfUsers ) + ' Players' );
      End;
    
    Function FindAuburyText: Boolean;  // FindTalk by Renax, but adepted.
    var
      ExitCond, NoMoreYellow: Boolean;
      Yint, Xmin, diff, difflast, Xmax, XmidRec, Xmid: Integer;
      RawMenuText: string;
    begin
      x := 0;
      y := 0;
      Xmid := 0;
      Xmin := 0;
      Xmax := 0;
      NoMoreYellow := False;
      if (FindColor(x, y, 65535, 10, 25, 511, 334)) and (not (FindColor(x, y, 65280, 220, 130, 290, 165))) then
      begin
        Result := False;
        if (not (FindBitmapMaskTolerance(AuburyText, x, y, 0, 0, 516, 338, 0, 40)))
          then
          Exit;
        if (FindColorSpiral(x, y, 65535, x - 10, y - 10, x + 10, y + 10)) then
        begin
          Wait(10);
          if (GetColor(x, y) = 65535) then
          begin
            WriteLn('Spotted aubury text');
            Wait(10);
            NoMoreYellow := False;
            Yint := 0;
            repeat
              Yint := Yint + 1;
              y := y + Yint;
              x := 0;
              repeat
                ExitCond := False;
                x := x + 1;
                Xmin := x;
                if (GetColor(x, y) = 65535) then
                  ExitCond := True;
                if (x > 500) then
                begin
                  x := 0;
                  ExitCond := True;
                  NoMoreYellow := True;
                end;
              until (ExitCond);
              ExitCond := False;
              x := 520;
              while (NoMoreYellow = False) and (ExitCond = False) do
              begin
                x := x - 1;
                Xmax := x;
                if (GetColor(x, y) = 65535) then
                  ExitCond := True;
              end;
              diff := (Xmax - Xmin);
              if (diff > difflast) and (diff > 25) then
              begin
                XmidRec := ((diff / 2) + Xmin);
              end;
              difflast := diff;
            until (NoMoreYellow)
              x := XmidRec;
            MMouse(x, y + 6, 3, 0);
            Wait(100);
            if IsUpTextMulti('Talk', 'lk-to', 'to')  Then
            begin
              GetMousePos(x, y);
              Mouse(x, y + 6, 0, 0, False);
              if (ChooseOptionGetMenuText(RawMenuText, x, y, 'Teleport')) then
              begin
                WriteLn('Found Aubury')
                FFlag(1);
                Wait(1000 + Random(500))
                Result := True;
                Exit;
              end;
            end;
          end;
        end;
      end;
    end;
    
    Function AtMine: Boolean;
    
    Var
      iX, iY: Integer;
    
    Begin
      Result := FindColoredAreaTolerance(iX, iY, 0, MMX1, MMY1, MMX2, MMY2, 100, 0);
    End;
    
    Function ScanMiniMap(iFrom, iTo, Distance: Integer): Integer;
    
    Var
       I, iX,iY: Integer;
    Begin
      For I := iFrom To ITo Do
      Begin
        iX := Round(Distance * Sin(I * Pi / 180)) + 648;
        iY := Round(-Distance * Cos(I * Pi / 180)) + 80;
        If GetColor(iX, iY) = 0 Then
        Begin
          Result := Result + 1;
        End;
      End;
    End;
    
    Function InAbyss: Boolean;
    
    Var
       A : Integer;
    
    Begin
      A := ScanMiniMap(0, 359, 50);
      WriteLn('In Abyss gave '+IntToStr(A)+'.');
      If A = 360 Then
      Begin
        Result := True;
      End
    End;
    
    Function GuessAbyssRandom: Boolean;
    
    Var
       AbyssalMark, iX, iY, I, ChosenColor, Tol, Tries: Integer;
       WeirdColors: Array [0..3] Of Integer;
       Operate: TPoint;
    Begin
      WeirdColors[0] := 13751777;
      WeirdColors[1] := 4953873;
      WeirdColors[2] := 2509833;
      Repeat
        Case Random(4) Of
          0: Begin Operate.X := 252; Operate.Y := 150; End;
          1: Begin Operate.X := 278; Operate.Y := 170; End;
          2: Begin Operate.X := 238; Operate.Y := 200; End;
          3: Begin Operate.X := 215; Operate.Y := 166; End;
        End;
    
        For I := 0 To 2 Do
        Begin
          Tol := 0;
          Repeat
            Tol := Tol + 1;
            iX := MSCX;
            iY := MSCY;
            If FindColorSpiralTolerance(iX, iY, WeirdColors[I], MSX1, MSY1, MSX2, MSY2, Tol) Then
            Begin
              ChosenColor := WeirdColors[I];
              If (Distance (iX, iY, MSCX, MSCY) < 120) Then Break;
            End;
            If ChosenColor <> 0 Then Break;
          Until Tol > 9;
        End;
    
        If ChosenColor <> 0 Then
        Begin
          MMouse(iX, iY, 0, 0);
          Wait(10);
          If IsUpText('perate') Then
          Begin
            GetMousePos(iX, iY);
            Mouse(iX, iY, 0, 0, True);
          End;
        End;
    
        Wait(5000+Random(500));
        If Not InAbyss Then
        Begin
          Abyss := Abyss + 1;
          ReportVars[8] := ReportVars[8] + 1;
          Result := True;
          Wait(1000);
          ClickToContinue;
          SRLRandomsReport;
          Exit;
       End;
        Tries := Tries + 1;
        If TimeFromMark(AbyssalMark) > 60000 * 5 Then Break;
      Until Tries > 30;
    
       Tries := 0;
       If InAbyss Then
       Begin
        Repeat
          Case Random(4) Of
            0: Begin Operate.X := 252; Operate.Y := 150; End;
            1: Begin Operate.X := 278; Operate.Y := 170; End;
            2: Begin Operate.X := 238; Operate.Y := 200; End;
            3: Begin Operate.X := 215; Operate.Y := 166; End;
          End;
          iX := Operate.X;
          iY := Operate.Y;
          If FindColorSpiralTolerance(iX, iY, 3393, MSX1, MSY1, MSX2, MSY2, Tol)
          Or FindColorSpiralTolerance(iX, iY, 2040150, MSX1, MSY1, MSX2, MSY2, Tol) Then
          Begin
            If (Distance (iX, iY, MSCX, MSCY) < 80) Then
            Begin
              MMouse(iX, iY, 0, 0);
              Wait(10);
              If IsUpText('perate') Then
              Begin
                GetMousePos(iX, iY);
                Mouse(iX, iY, 0, 0, True);
                Wait(5000+ Random(500));
                If Not InAbyss Then
                Begin
                  Abyss := Abyss + 1;
                  ReportVars[8] := ReportVars[8] + 1;
                  Result := True;
                  ClickToContinue;
                  SRLRandomsReport;
                  Exit;
                End;
              End;
            End;
          End;
          Tries := Tries + 1;
          Tol := Tol + 2;
          If Tol > 20 Then Tol := 2;
        Until Tries > 50;
      End;
      LogOut;
      NOAbyss := NOAbyss + 1;
      ReportVars[9] := ReportVars[9] + 1;
      Players[CurrentPlayer].Loc := 'Abyss';
      SRLRandomsReport;
      WriteLn('Abyss Random Event.');
    End;
    
    Function GetPositionInMine: String;
    
    Begin
      MakeCompass('N');
      If Not LoggedIn Then Exit;
      If Not FindSymbol(x, y, 'transportation') Then
      Begin
        Result := 'Middle';
        Exit;
      End;
    
      If ScanMiniMap(220, 240, 60) < 15 Then
      Begin
        Result := 'North-East';
        ReportVars[5] := ReportVars[5] + 1;
        EssencePoint[0].X := 340;
        EssencePoint[0].Y := 61;
        EssencePoint[1].X := 295;
        EssencePoint[1].Y := 50;
        EssencePoint[2].X := 395;
        EssencePoint[2].Y := 120;
        Exit;
      End;
    
      If ScanMiniMap(125,155, 60) < 20 Then
      Begin
        Result := 'North-West';
        ReportVars[6] := ReportVars[6] + 1;
        EssencePoint[0].X := 140;
        EssencePoint[0].Y := 115;
        EssencePoint[1].X := 18;
        EssencePoint[1].Y := 70;
        EssencePoint[2].X := 120;
        EssencePoint[2].Y := 150;
        Exit;
      End;
    
      If ScanMiniMap(290,330, 55) < 20 Then
      Begin
        Result := 'South-East';
        ReportVars[7] := ReportVars[7] + 1;
        EssencePoint[0].X := 350;
        EssencePoint[0].Y := 160;
        EssencePoint[1].X := 337;
        EssencePoint[1].Y := 210;
        EssencePoint[2].X := 362;
        EssencePoint[2].Y := 125;
        If (ScanMiniMap(140, 170, 55) <> 31) Then
          Exit;
      End;
    
      Result := 'South-West';
      ReportVars[2] := ReportVars[2] + 1;
      EssencePoint[0].X := 190;
      EssencePoint[0].Y := 60;
      EssencePoint[1].X := 146;
      EssencePoint[1].Y := 94;
      EssencePoint[2].X := 285;
      EssencePoint[2].Y := 54;
    
    End;
    
    Function GetMiddle:String;
    
    Var
       Ex, Ey: Integer;
    Begin
      If Not LoggedIn Then Exit;
      
      If ScanMiniMap(330, 380, 55) < 35 Then
      Begin
        Result := 'MiddleSW';
        ReportVars[4] := ReportVars[4] + 1;
        Ex := 605;
        Ey := 116;
        EssencePoint[0].X := 170;
        EssencePoint[0].Y := 240;
        EssencePoint[1].X := 190;
        EssencePoint[1].Y := 290;
        EssencePoint[2].X := 254;
        EssencePoint[2].Y := 274;
      End
      Else
      Begin
        Result := 'MiddleNE';
        ReportVars[3] := ReportVars[3] + 1;
        Ex := 690;
        Ey := 30;
        EssencePoint[0].X := 360;
        EssencePoint[0].Y := 40;
        EssencePoint[1].X := 450;
        EssencePoint[1].Y := 100;
        EssencePoint[2].X := 390;
        EssencePoint[2].Y := 30;
      End;
      Mouse(Ex, Ey, 2, 2, True);
      Wait(10);
      FFlag(0);
      Wait(100);
    End;
    
    Function FindEssence(Var iX, iY: Integer): Boolean;
    
    Var
      I, Tolerance : Integer;
    Begin
      If Not LoggedIn Then Exit;
      For I := 0 To 2 Do
      Begin
        Tolerance := - 1;
        While Tolerance < 10 Do
        Begin
          Tolerance := Tolerance + 1;
          iX := EssencePoint[I].X;
          iY := EssencePoint[I].Y;
          If FindColorSpiralTolerance(iX, iY, 9539996, MSX1, MSY1, MSX2, MSY2, Tolerance) Then
          Begin
            If Distance(iX, iY, EssencePoint[I].X, EssencePoint[I].Y) < 80 Then
            Begin
              MMouse(iX, iY, 0, 0);
              Wait(10);
              If IsUpTextMulti('Esse', 'une Es', 'ine') Then
              Begin
                GetMousePos(iX, iY);
                Result := True;
                WriteLn('Found Essence');
                Exit;
              End;
            End;
          End;
        End;
      End;
    End;
    
    Function ToPortal: Boolean;
    
    Var
      iX, iY, C : Integer;
      Boolie : Boolean;
    Begin
      If Not LoggedIn Then Exit;
      If FindSymbol(iX, iY, 'transportation') Then
      Begin
        Mouse(iX, iY, 2, 2, True);
        Wait(10);
        FFlag(0);
        FindNormalRandoms;
        iX := MSCX;
        iY := MSCY;
        Repeat
          If Random(4) = 3 Then
            Boolie := True;
          If Boolie Then
          Begin
            Case Random(3) Of
              0: MakeCompass('E');
              1: MakeCompass('S');
              2: MakeCompass('W');
            End;
          End;
          Wait(50);
          C := C + 1;
          If FindObj(iX, iY, 'rtal', 12051688, 9) Then
          Begin
            Mouse(iX, iY, 0, 0, True);
            Wait(10);
            Result := True;
            FFlag(0);
            If Boolie Then MakeCompass('N');
            Exit;
          End;
          Wait(1000);
        Until C > 2;
        If Boolie Then MakeCompass('N');
      End;
    End;
    
    Function RunToPortal: Boolean;
    
    Begin
      MarkTime(iMark);
      Repeat
        If Not LoggedIn Then Break;
        If (TimeFromMark(iMark) > 120000) Then
        Begin
          WriteLn('Portal Took too long..logging');
          LogOut;
          Players[CurrentPlayer].Loc := 'Portal';
        End;
        If ToPortal Then
        Begin
          FFlag(0);
          Wait(6000);
        End
        Else Wait(100);
      Until Not AtMine;
      Result := True;
      PortalBool := True;
    End;
    
    Function OpenDoor : Boolean;
    
    Var iX, iY,DoorClosed : Integer;
    
    Begin
      DoorClosed := DTMFromString('78DA63FCCDC0C0309F01053426CB337001694' +
           '620FE0F048C6F808C7E5435E97E520CFC503520C0C80E644D4055' +
           '13E7218EAAE617A639E86A0097700CBE');
      If Not LoggedIn Then Exit;
    
      If FindDTM(DoorClosed, iX, iY, 140, 90, 425, 325) Then
      Begin
        MMouse(iX, iY, 2, 2);
        GetMousePos(iX, iY);
        If isUpText('pen') Then
          Mouse(iX, iY, 0,0, True);
        Result := True;
      End;
      FreeDTM(DoorClosed);
      If Result Then writeln('The door was closed, but now opened.')
      Else WriteLn('The door is open');
    End;
    
    Function ToBank: Boolean;
    
    Var
       iX, iY, BankDTM, D, WalkMark, aMark : Integer;
       AngleVar : Extended;
    Begin
      If Not LoggedIn Then Exit;
      SetRun(True);
      OpenDoor;
      Mouse(687, 30, 4, 4, True);
      Wait(10);
      MarkTime(aMark);
      Repeat
        If Not FlagPresent Then
        Begin
          OpenDoor;
          Mouse(687, 30, 4, 4, True);
          MarkTime(WalkMark)
          Repeat
            FindColorSpiral(iX, iY, RuneShopColor, MMX1, MMY1, MMX2, MMY2)
            D := Distance(iX, iY, MMCX, MMCY);
            Wait(100);
          Until ((D > 15) Or (TimeFromMark(WalkMark) > 8000));
        End
        Else Break;
        If TimeFromMark(aMark) > 120000 Then
        Begin
          WriteLn('ToBank took too long.. logging.');
          LogOut;
          Players[CurrentPlayer].Loc := 'ToBank';
          Exit;
        End;
      Until D > 15;
      Wait(6000);
      FFlag(10);
      BankDTM:= DTMFromString('78DA636C666260486140016FDEBC61F80FA41' +
           '981F83F1030B603D5E4A0AA79FB96814103AA060418EB816AB251' +
           'D57CFD8AAA0600B6210EA4');
    
      If FindDTMRotated(BankDTM, iX, iY, MMX1, MMY1, MMX2, MMY2, -1.0, 2.0, 1, AngleVar) Then
      Begin
        Result := True;
        Mouse(iX, iY + 1, 0, 0, True);
        Wait(3000);
        FFlag(0);
      End
      Else
      Begin
        LogOut;
        Players[CurrentPlayer].Loc := 'ToBank2';
        WriteLn('Bank not found');
        Exit;
      End;
      FreeDTM(BankDTM);
      SetRun(False);
    End;
    
    Function FindAuburyFloorColor(Var iX, iY: Integer): Boolean;
    
    Var
       Tol, Floor2, Floor3 : Integer;
    Begin
      If Not LoggedIn Then Exit;
      Floor2 := BitmapFromString(2, 2, '7F75487F75487F75487F754' +
           '8');
      Floor3 := BitmapFromString(3, 3, 'z78DA3377333735B1302791' +
           '04004AD80BFE');
    
      If FindColoredAreaTolerance(iX, iY, RuneShopColor, MMX1, MMY1, MMX2, MMY2, 16, 9) Then
      Begin
        RuneShopColor := GetColor(iX , iY);
        WriteLn('RuneShopColor = '+IntToStr(RuneShopColor));
        WriteLn('Found with FindColoredAreaTolerance.');
        Result := True;
      End;
      Tol := 0;
      Repeat
        Wait(10);
        If Result Then Break;
        Tol := Tol + 2;
        iX := 618;
        iY := 127;
        If FindBitMapSpiralTolerance(Floor3, iX, iY, MMX1, MMY1, 650, 150, Tol) Then
        Begin
          RuneShopColor := GetColor(iX , iY);
          WriteLn('RuneShopColor = '+IntToStr(RuneShopColor));
          WriteLn('Found with Floor3 bmp.');
          Result := True;
          Break;
        End;
      Until Tol > 26;
      Tol := 0;
      Repeat
        Wait(10);
        If Result Then Break;
        Tol := Tol + 2;
        iX := 618;
        iY := 127;
        If FindBitMapSpiralTolerance(Floor2, iX, iY, MMX1, MMY1, 650, 150, Tol) Then
        Begin
          RuneShopColor := GetColor(iX , iY);
          WriteLn('RuneShopColor = '+IntToStr(RuneShopColor));
          WriteLn('Found with Floor2 bmp.');
          Result := True;
          Break;
        End;
      Until Tol > 26;
      FreeBitMap(Floor2);
      FreeBitMap(Floor3);
    End;
    
    Function ToDoor: Boolean;
    
    Var
      iX, iY: Integer;
    
    Begin
      If FindColorRightTol(iX, iY, RuneShopColor, MMX1, MMY1, MMX2, MMY2, 0) Then
      Begin
        WriteLn('Door found');
        Result := True;
        Mouse(iX - 8, iY + 20, 0, 0, True);
        FFlag(0);
      End;
    End;
    
    Function SpotAubury: Boolean;
                                        // 10855856, 3005947, 2998011
    Var
      iX, iY, C, Color: Integer;
    
    Begin
      Color := 2998011;
      Repeat
        Wait(50);
        If FindAuburyText Then
        Begin
          Result := True;
          Break;
        End;
        iX := MSCX;
        iY := MSCY;
        If AtMine Then
        Begin
          Result := True;
          Exit;
        End;
        If FindColorSpiralTolerance(iX, iY, Color, MSX1, MSY1, MSX2, MSY2, 4) Then
        Begin
          MMouse(iX, iY, 0, 0);
          Wait(10);
          If IsupTextMulti('Talk','bury','alk-to') Then
          Begin
            Mouse(iX, iY, 0, 0, False);
            Result := ChooseOption(iX, iY,'eleport');
            If Result Then Exit;
          End;
        End;
        C := C + 1;
      Until C > 5;
      Wait(4000);
    
      If Not LoggedIn Then Exit;
    End;
    
    Function PreciseFlag(Var iX, iY: Integer):Boolean;
    
    Begin
      Result := FindColor(iX, iY, 255, 570, 5, 735, 166);
      If Result Then iX := iX + 1;
      If Result Then iY := iY + 14;
    End;
    
    Function ColorAroundFlag(iX, iY: Integer) : Boolean;
    
    Begin
      Result := FindColorSpiral(iX, iY, RuneShopColor, iX - 2, iY - 2, iX + 2, iY + 2)
    End;
    
    Function ToMine: Boolean;
    
    Var
      iX, iY, D, zMark : Integer;
    Begin
    
      If Not LoggedIn Then Exit;
      Mouse(663, 142, 6, 6, True);
      Wait(15000+Random(4000));
      FFlag(5);
    
      If FindAuburyFloorColor(iX, iY) Then
        Begin
          WriteLn('Exact Color Found');
        End
        Else
        Begin
          LogOut;
          WriteLn('Could not get the exact color.'+ Chr(13)+
           'Wizzup, you should tweak your functions!');
           Players[CurrentPlayer].Loc := 'NoColor';
        End;
    
      FindColorSpiral(iX, iY, RuneShopColor, MMX1, MMY1, MMX2, MMY2);
      D := Distance(iX, iY, MMCX, MMCY);
      WriteLn('Distance = '+IntToStr(D));
    
      If D > 15 Then
      Begin
        iX := MMCX;
        iY := MMCY;
        If FindColorSpiral2(iX, iY, RuneShopColor, MMX1, MMY1, MMX2, MMY2) Then
        Begin
          Mouse(iX, iY, 0, 0, True);
          If PreciseFlag(iX, iY) Then
          Begin
            If ColorAroundFlag(iX, iY) Then
            Begin
              WriteLn('Walking INTO the shop now...');
            End;
          End;
          FFlag(0);
        End;
      End;
    
      iX := MMCX;
      iY := MMCY;
      FindColorSpiral(iX, iY, RuneShopColor, MMX1, MMY1, MMX2, MMY2)
    
      If Distance(iX, iY, MMCX, MMCY) > 10 Then
      Begin
        ToDoor;
        OpenDoor;
        If FindColorSpiral2(iX, iY, RuneShopColor, MMX1, MMY1, MMX2, MMY2) Then
        Begin
          Mouse(iX, iY, 0, 0, True);
          If PreciseFlag(iX, iY) Then
          Begin
            If ColorAroundFlag(iX, iY) Then
            Begin
              WriteLn('Walking INTO the shop now...');
            End;
          End;
          FFlag(0);
        End;
      End;
    
      MarkTime(zMark);
      Repeat
        FindNormalRandoms;
        If (TimeFromMark(zMark) > 180000) Then
        Begin
          WriteLn('Aubury Took too long..logging');
          LogOut;
          Players[CurrentPlayer].Loc := 'Aubury';
        End;
    
        If SpotAubury Then
        Begin
          FFlag(0);
          Wait(4000);
        End
        Else
        Begin
          Wait(100);
          ChooseOption(iX, iY, 'ancel');
        End;
        
        If Not LoggedIn Then Break;
      Until AtMine;
    
      Result := True;
      If LoggedIn Then Players[CurrentPlayer].Loc := 'Mine';
    End;
    
    Function MyOpenBank: Boolean;
    
    Begin
      OpenBankGlass('veb',False,False);
      FFlag(0);
      Wait(2000);
      If BankScreen Then
      Begin
        Result := True;
        Exit;
      End;
      If OpenBankQuiet('veb') Then Result := True;
    End;
    
    Function BankStuff: Boolean;
    
    Var
      RuneEss, PureEss: Integer;
    Begin
      If Not BankScreen Then Exit;
      RuneEss := BitmapFromString(8, 12, 'z78DA8DCD3112C3200C44D1' +
           '2BE1B02B9B1288B9FF91222315149107EFCCAFF4B08037BB584F0' +
           'E0E6F9143D724EBAC5F79BE0F1BABF7DDCEB25374B3925858BCC1' +
           '3BBC78E82AA1DBB07EBFAAC8DA3D3130BC1B8A191DFD8F8A6C424' +
           '57515D945E1C685D35564973FA23DD4D48ED5ABACDB560092CED4' +
           'BB9DF73F7ACE7D1F');
      PureEss := BitmapFromString(11, 10, 'z78DAA5CF490E03211003C' +
           '02FB1B56D8E0CCBFF9F1492CC012962B2B5251F4B6E451616192B' +
           'ABC8CEA62CC771F6A120AFA638D39594B213841C342F27151536A' +
           '6994110F214A59DB9D1783032FCE39018E8CCF474BF693434B48F' +
           '9C555B1CBAF98A185050BED0963DE8B8DFA3DF689BEF90E1670EA' +
           '4994F9C65D5D38159B736596763AB5D3A362C5B46B46AF5D4AE57' +
           'BD3837C02891A6');
      FixBank;
      RuneEssenceMined := RuneEssenceMined + CountItemBmpTol(RuneEss, 15);
      PureEssenceMined := PureEssenceMined + CountItemBmpTol(PureEss, 15);
      ReportVars[1] := ReportVars[1] + 1;
      ReportVars[0] := CountItemBmpTol(RuneEss, 15) + CountItemBmpTol(PureEss, 15);
      Players[CurrentPlayer].Integer1 := Players[CurrentPlayer].Integer1 + CountItemBmpTol(PureEss, 15) + CountItemBmpTol(RuneEss, 15);
      ClickAllItemsBmpTolWait('All', RuneEss, 15, 1500);
      ClickAllItemsBmpTolWait('All', PureEss, 15, 1500);
      If EquipPick Then Deposit(1, 28, 2)
      Else Deposit(2, 28, 2);
      FreeBitMap(RuneEss);
      FreeBitMap(PureEss);
      If BankScreen Then CloseBank;
      Players[CurrentPlayer].Banked := Players[CurrentPlayer].Banked + 1;
      Banks := Banks + 1;
      Result := True;
    End;
    
    Procedure PlayerReport;
    
    Var
      Active: String;
      I:Integer;
    
    Begin
      For I  :=  0 to HowManyPlayers - 1 Do
       Begin
         If Players[i].Active=True Then Active := 'T' Else Active := 'F';
         WriteLn( (IntToStr(I))+' : '+Players[I].nick+ ' = '+
         Active+ +'; Loc = '+Players[I].Loc+'; Banked: '+IntToStr(Players[I].Integer1)
         +' Ess; M lvl:'+IntToStr(Players[i].Level[15]));
       End;
    End;
    
    Procedure ProgressReport;
    
    Begin
      WriteLn('----------------------------------------------')
      WriteLn('')
      WriteLn('Essence Miner by Wizzup?.')
      WriteLn('Version: '+VersionNumber)
      WriteLn('')
      WriteLn('Rune Essence Mined and Banked : '+IntToStr(RuneEssenceMined)+'.');
      WriteLn('Pure Essence Mined and Banked : '+IntToStr(PureEssenceMined)+'.');
      WriteLn('Solved '+IntToStr(Abyss)+' Abyssal Random Events.');
      WriteLn('Missed '+IntToStr(NoAbyss)+' Abyssal Random Events.');
      Writeln('Worked for '+ TimeRunning);
      WriteLn('')
      WriteLn('----------------------------------------------')
      WriteLn('')
      PlayerReport;
      SRLRandomsReport;
      WriteLn('')
      WriteLn('----------------------------------------------')
    
    End;
    
    Procedure ClearVars;
    
    Var
      I : Integer;
    Begin
      For I := 1 To 19 Do
      ReportVars[I] := 0;
    End;
    
    Procedure DoChats;
    
    Begin
      SetChat('On', 1);
      SetChat('On', 1);
      SetChat('Friends', 2);
      SetChat('Friends', 2);
      SetChat('On', 3);
      SetChat('On', 3);
    End;
    
    Procedure SetupScript;
    
    Begin
      ClearDebug;
      SetupSRL;
      SetupSRLMining;
      DeclarePlayers;
      RuneShopColor := 4551800; // Temp.
      Rcmaster := YourRCMASTER;
      RcLoc := 'Bank';
      ScriptID := '51';
      ClearVars;
      If YourSRLDSTATSID <> '' Then SRLID := YourSRLDSTATSID;
      If YourSRLDSTATSPASS <> '' Then SRLPassword := YourSRLDSTATSPASS;
      CurrentPlayer := StartPlayer;
      LoginPlayer;
      DoChats;
      FindPickHeadColor;
      EquipPick := Players[CurrentPlayer].Boolean1;
      AuburyText := CreateBitmapMaskFromText('isthine', upchars);
      BenMouse := False;
      GetAllLevels;
    End;
    
    begin
      ActivateClient;
      SetupScript;
      Repeat
        MakeCompass('N');
        If Players[CurrentPlayer].Loc = 'Bank' Then
        Begin
          ToMine;
        End;
    
        If Players[CurrentPlayer].Loc = 'Mine' Then
        Begin
          Wait(500);
          If InAbyss Then
          Begin
            GuessAbyssRandom;
            BoredHuman;
          End;
          Wait(1000);
          FindNormalRandoms;
          SymbolAccuracy := 0.4;
          Position := GetPositionInMine;
          If Position = 'Middle' Then Position := GetMiddle;
          WriteLn('Our position is '+ Position+'.');
          
          Wait(1000);
          If FindEssence(X, Y) Then
          Begin
            Mouse(X, Y, 0, 0, True);
            Wait(10);
            FFlag(0);
          End
          Else
          Begin
            RunToPortal;
          End;
          Wait(1000);
          FindPick;
          MarkTime(IdleMark);
          MarkTime(MiningMark);
          Repeat
            If Not LoggedIn Then Break;
            If PortalBool Then Break;
            If TimeFromMark(IdleMark) > (85000+Random(5000)) Then
            Begin
              BoredHuman;
              MarkTime(IdleMark);
            End;
            Wait(100);
            If FindNormalRandoms Then
              RunToPortal;
            RC;
            Wait(100);
            ClickToContinue;
            If FindFight Then
            Begin
              RunToPortal;
              Break;
            End;
          Until ((InvFull) Or (TimeFromMark(MiningMark) > 1000 * 60 * MinutesPerLoad));
          If Not PortalBool Then
          Begin
            MarkTime(iMark);
            Repeat
              If Not LoggedIn Then Break;
              If (TimeFromMark(iMark) > 120000) Then
              Begin
                WriteLn('Portal Took too long..logging');
                LogOut;
                Players[CurrentPlayer].Loc := 'Portal';
              End;
              If ToPortal Then
              Begin
                FFlag(0);
                Wait(6000);
              End
              Else Wait(100);
            Until Not AtMine;
          End
          WriteLn('Through The portal');
          SymbolAccuracy := 0.8;
          PortalBool := False;
          Wait(500);
          ToBank;
          MyOpenBank;
          BankStuff;
          If LoggedIn Then Players[CurrentPlayer].Loc := 'Bank';
        End;
        ProgressReport;
        If ( LoggedIn And (Players[CurrentPlayer].Banked Mod Loads = 0 )) Then
        Begin
          DoChats;
          LogOut;
          Wait(1000);
          NextPlayer(True);
          EquipPick := Players[CurrentPlayer].Boolean1;
          FindPickHeadColor;
          GetAllLevels;
        End;
    
        If Not LoggedIn Then
        Begin
          DoChats;
          NextPlayer(False);
          EquipPick := Players[CurrentPlayer].Boolean1;
          FindPickHeadColor;
          GetAllLevels;
        End;
      Until False;
    end.
     
  3. Unread #2 - Mar 25, 2007 at 7:25 AM
  4. Gofez0r
    Joined:
    Jan 21, 2007
    Posts:
    1,820
    Referrals:
    1
    Sythe Gold:
    0

    Gofez0r Guru

    i need help on 2 ess mining scripts!

    ... SO what do u need help with?
     
  5. Unread #3 - Mar 25, 2007 at 11:33 AM
  6. gr1m
    Referrals:
    0

    gr1m Guest

    i need help on 2 ess mining scripts!

    i need to have the talking capabilitys on the first one, onto the second one.

    basicly take the code that talks back to peopleon the first one and put it onto the second one!
     
  7. Unread #4 - Mar 25, 2007 at 12:04 PM
  8. the scar noob
    Joined:
    Jan 21, 2007
    Posts:
    620
    Referrals:
    0
    Sythe Gold:
    0

    the scar noob Forum Addict

    i need help on 2 ess mining scripts!

    You are telling like it's stimple, do it by yourself then?
     
  9. Unread #5 - Mar 25, 2007 at 5:35 PM
  10. gr1m
    Referrals:
    0

    gr1m Guest

    i need help on 2 ess mining scripts!

    ive tryed and everytime theres an error and every time i fix it theres another
     
  11. Unread #6 - Jul 9, 2007 at 1:38 PM
  12. CatastrophicDesire
    Referrals:
    0

    CatastrophicDesire Guest

    i need help on 2 ess mining scripts!

    Keep fixing errors until it works, I guess. Eventually, stuff will stop going wrong. Ha.

    Sorry I'm not any more useful than that =P.
     
< wizups ess miner help plz | wizzup ess miner help >

Users viewing this thread
1 guest


 
 
Adblock breaks this site