Results 1 to 11 of 11

Thread: Prayer script

  1. #1
    Join Date
    Nov 2008
    Location
    Belgium
    Posts
    254
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Prayer script

    Last week I've made a pretty basic prayer script; (it banks and burys your bones.) Now I would like to know what you people are thinking about it + what kind off improvements it could use or what you think is crucial for a good prayer script...

    SCAR Code:
    program BankBoneBury;
    {.include SRL/SRL/misc/SMART.scar}
    {.include SRL/SRL.scar}


    const
    //SRL
    SRLStatsID = '6785';                  //Stats ID.
    SRLStatsPass  = 'bzFvCL2qxt';         //Stats Password.
    //SMART
    SmartWorld=29;                        //World to bury in.
    Signed=True;                          //Signed or Unsigned.
    //IN-GAME
    WaitTime = 680;                       //Time to wait between each bone.
    RunDirection = 'N';                   //Direction to run when in fight.
    Bank = 'fwb';                         //Bank where you are standing in.
                                          //feb = Falador east bank        fwb = Falador west bank
                                          //veb = Varrock east bank        vwb = Varrock west bank
                                          //akb = al kharid bank           db = draynor bank
                                          //eb = edgeville bank
    LoadsToDo = 50;                       //Total loads of bones you want to do.
    LoadsBeforeLogout= 50;                //Loads to do before taking a break.
    BreakTime=5;                          //Time to break in minutes.
    RandomBreak=5;                        //Random time to break.

    {-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    Most functions are made by myself, only the TakeABreak-function is from Sirlaughsalot
    I made the other functions with help from other SRL-members:
           -TorrentOfFlame
           -RastaMagician
           -Sirlaughsalot
           -99_
           -Much others(can't remember all the names..;)...
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}



    var TheDTM, buriedloads,H, M, S, CurrentLoads, LoadBeforeLogout,TimeBreaking, TotalBreakTime, level,x,y: integer;

    procedure DeclarePlayers;
    begin

      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);

      CurrentPlayer := 0;

      Players[0].Name :='';        //Runescape username
      Players[0].Pass :=''; //Runescape password
      Players[0].Nick :='mpi';    //3 letters from the middle of you Runescape username
      Players[0].Active:=True;        //Do you want to use this player?
      Players[0].Integers[0] := LoadsToDo; //loads of bones
      Players[0].Strings[0] :='bone'; //You want to bury 'bone' or 'bigbone'?
      Players[0].Pin := '';

    {  Players[1].Name :='';
      Players[1].Pass :='';
      Players[1].Nick :='';
      Players[1].Active:=False;
      Players[1].Integers[0] := 10;
      Players[1].Strings[0] :='bone';


      Players[2].Name :='';
      Players[2].Pass :='';
      Players[2].Nick :='';
      Players[2].Active:=False;
      Players[2].Integers[0] := 10;
      Players[2].Strings[0] :='bone';


      Players[3].Name :='';
      Players[3].Pass :='';
      Players[3].Nick :='';
      Players[3].Active:=False;
      Players[3].Integers[0] := 10;
      Players[3].Strings[0] :='bone';


      Players[4].Name :='';
      Players[4].Pass :='';
      Players[4].Nick :='';
      Players[4].Active:=False;
      Players[4].Integers[0] := 10;
      Players[4].Strings[0] :='bone';}



    end;


    procedure LoadDTMs;
    begin
      case lowercase(Players[CurrentPlayer].Strings[0]) of
        'bone' : TheDTM:= DTMFromString('78DA637CC4C8C0300588510023032B986460F' +
          '80F048C4F81AC69986A10249006993393809A2740D61C026AEE01' +
          '59F308A8B905642D24A0E6261176DD00B26610507311C89A4E843' +
          '953F1AB01007E5D12D1');
        'bigbone' : TheDTM:= DTMFromString('78DA637461626078CA800242FDFD186C80342' +
                           '310FF0702466FA09AC70C6880118904D2BE4035AF08A8B101AA79' +
                           '41408D1511763900D53CC4AF06001FF60C38');
        'dragonbone' : TheDTM := DTMFromString('78DA631466606010604001CB66CF626007D28' +
           'C40FC1F081865810C490634C0884402693120214D400D0F901026' +
           'A0860D4888E2570300CE6006B1');

      end;
    end;

    procedure AntiRandoms;
    var i:integer;
    begin
      if not(LoggedIn) then Exit;
      begin
        for i:=1 to 4 do
        case i of
          1: if FindMod then
            begin
            writeln('Found Moderator.');
            Logout;
            end;
          2: FindNormalRandoms;
          3: if FindFight then
            begin
            RunAway(RunDirection, true, 1, 5500+Random(1000));
            end;
          4: if FindDead then
             Logout;
        end;
      end;
    end;

    procedure AntiBan;
    begin
      if not LoggedIn then Exit;
      case random(11) of
        0 : MMouse(0, 0, 700, 500);
        1 : Hoverskill('Prayer', false);
        2 : BoredHuman;
        3 : RandomMovement;
        4 : GameTab(1);
        5 : PickupMouse;
        6 : GameTab(2);
        7 : RandomMovement;
        8 : HoverSkill('random', false);
        9 : begin
            MakeCompass('N');
            Wait(10+random(5));
            MakeCompass('S');
            Wait(10+random(5));
            MakeCompass('N');
            end;
        10:RandomRClick;
      end;
    end;

    procedure Login;
    begin
      ActivateClient;
      if not (Loggedin) then Loginplayer;
      SetAngle(true);
      MakeCompass('N');
      SetAngle(true);
      Gametab(4);
      AntiRandoms;
    end;

    procedure WithdrawBank;
    begin
      if not(Loggedin) then Exit;
      if OpenBankQuiet(Bank)  then
        begin
         Wait(1000 + Random(200));
         InPin(Players[CurrentPlayer].Pin);
         Wait(400 + Random(200));
         DepositAll;
          FixBank;
          if FindDTM(TheDTM,x,y,4,8,509,366) then
            begin
              mouse(x,y,2,2,false);
              ChooseOption('ll');
              CloseBank;
              AntiRandoms;
              AntiBan;
            end
          else
            begin
              writeln('Couldnt find bones');
              NextPlayer(false);
            end;
        end else
        begin
          Wait(1000 + Random(200));
          InPin(Players[CurrentPlayer].Pin);
          Wait(400 + Random(200));
          OpenBankGlass(Bank, true, true);
          DepositAll;
          FixBank;
          if FindDTM(TheDTM,x,y,4,8,509,366) then
            begin
              mouse(x,y,2,2,false);
              ChooseOption('ll');
              CloseBank;
              AntiRandoms;
              AntiBan;
            end else
            begin
              writeln('Couldnt find bones');
              NextPlayer(false);
            end;
        end;
    end;

    procedure Bury;
    var i:integer;
    begin
      if not(Loggedin) then Exit;
      Gametab(4);
      MakeCompass('N');
      if Invcount = 28 then
        begin
          begin
          for i := 1 to 28 do
         Begin
           Case Random(5) Of
             0 : Begin
                   MouseItem(i,true);
                   Wait(WaitTime + Random(200));
                   ChooseOption('ury');
                   MMouse(x, y, 0, 0);
                 end;
              1,2,3,4: Begin
                         MouseItem(i,false);
                         Wait(WaitTime + Random(200));
                        end;
           end;
        end;
          writeln('Buried an inventory');
          Antirandoms;
          AntiBan;
           end;
        end else
        begin
          WithdrawBank;
        end;
      buriedloads:=buriedloads+1;
    end;

    {-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    Function TakeABreak
    By: Sirlaughsalot
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}

    Procedure TakeABreak;
    begin
      if not loggedin then exit;
      TimeBreaking:=RandomRange(BreakTime*60000+RandomBreak*60000,BreakTime*60000-RandomBreak*60000);
      Status ('Taking a break');
      Logout;
      ConvertTime(TimeBreaking,H,M,S);
      Writeln('Breaking '+IntToStr(H)+' Hours '+IntToStr(M)+' Minutes '+IntToStr(S)+' Seconds');
      Wait(TimeBreaking);
      LoginPlayer;
      TotalBreakTime:=TimeBreaking+TotalBreakTime;
      ConvertTime(TotalBreakTime,H,M,S);
      Status('Done with break');
      CurrentLoads:=0;
      LoadBeforeLogout:=RandomRange(LoadsBeforeLogout+LoadsBeforeLogout-5,LoadsBeforeLogout+LoadsBeforeLogout+5);
    end;

    procedure Progress;
    begin
    writeln('__________                __   __________                        ');
    writeln('\______   \_____    ____ |  | _\______   \__ _________ ___.__.   ');
    writeln('|    |  _/\__  \  /    \|  |/ /|    |  _/  |  \_  __ <   |  |    ');
    writeln('|    |   \ / __ \|   |  \    < |    |   \  |  /|  | \/\___  |    ');
    writeln('|______  /(____  /___|  /__|_ \|______  /____/ |__|   / ____|    ');
    writeln('       \/      \/     \/     \/       \/              \/         ');
    writeln('                                          By Impiwimpi           ');
    writeln('----------------------Bank Bone Burier---------------------------');
    writeln('Ran for ' +TimeRunning);
    writeln('Buried ' +IntToStr(buriedloads)+' '+(Players[CurrentPlayer].Strings[0])+' loads of bones');
    writeln('Current prayer level is ' +IntToStr(level));
    writeln('---------------B-B-B---------------');
    SRLrandomsreport;
    end;

    procedure SetupSmart;
    begin
      SmartSetupEx(SmartWorld, False, Signed, False);
      SetTargetDC(SmartGetDC);
      WriteLn('Setting up Smart... ');
      While not(SmartActive) do Wait(100);
    end;

    begin
      SetupSmart;
      repeat
        wait(100);
      until(SmartGetColor(253, 233)<>1118604);
      SetupSRL;
      ScriptID := '1169';
      SRLID := SRLStatsID;
      SRLPassword := SRLStatsPass;
      DeclarePlayers;
      level:=GetSkillLevel('prayer');
      repeat
        Login;
        LoadDTMs;
        repeat
          WithdrawBank;
          Bury;
          Progress;
          if CurrentLoads>=LoadBeforeLogout then
          begin
            Status('Taking a break');
            Writeln('Taking a break');
            TakeABreak;
          end;
        until(buriedloads >= Players[CurrentPlayer].Integers[0]) or not(LoggedIn);
        NextPlayer(False);
        FreeDTM(TheDTM);
      until(false);
    end.

    [EDIT]: Added credits and changed my bury proc. a bit.

  2. #2
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    SCAR Code:
    // This script is not 100% mine but I'll add credits when I've finished it...
    Why not credit now? You can defiantly tell what parts you did and didn't do. Use correct standardization. You never free your DTM's which means memory hog.

    ~Camo
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  3. #3
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    1 thing I have learned since I began scripting is that you should try and avoid declaring Global Variables.

    Add that to what Camo said and its coming along nicely.

  4. #4
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Add failsafes for bank opening, openbankquiet does not work 100%
    SCAR Code:
    if not OpenBankFast then
    if not OpenBankQuiet then
     writeln('Failed opening bank');

  5. #5
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by marpis View Post
    Add failsafes for bank opening, openbankquiet does not work 100%
    SCAR Code:
    if not OpenBankFast then
    if not OpenBankQuiet then
     writeln('Failed opening bank');
    Doesnt the function itself have FailSafes already?

  6. #6
    Join Date
    Nov 2008
    Location
    Belgium
    Posts
    254
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I looked it up in Bank.scar and it has some indeed.
    Do you think my script needs more failsafes? And the place of the antiban and antirandom? Is it placed well?

  7. #7
    Join Date
    Feb 2007
    Location
    South East England
    Posts
    2,906
    Mentioned
    2 Post(s)
    Quoted
    8 Post(s)

    Default

    Im Credited
    Jus' Lurkin'

  8. #8
    Join Date
    Nov 2008
    Location
    Belgium
    Posts
    254
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You are indeed credited...
    Do you also have something to say about the script? What needs improvement perhaps? Have any great ideas for a prayer script?

  9. #9
    Join Date
    Feb 2007
    Location
    South East England
    Posts
    2,906
    Mentioned
    2 Post(s)
    Quoted
    8 Post(s)

    Default

    I dont know. You could do a custom bank opener if ALL else fails. But its a pretty basic script so it doesn't really need much if it works
    Jus' Lurkin'

  10. #10
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ;D I'm credited <3 but I'm not a member

    it looks good

  11. #11
    Join Date
    Mar 2007
    Location
    Helsinki, Finland
    Posts
    102
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    does this actually work? i might buy 11k bones for my def/pray pure so it would be nice to use this ^^
    And also how many does it bury per hour?
    o_O

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. prayer script
    By mark9510 in forum RS3 Outdated / Broken Scripts
    Replies: 7
    Last Post: 10-17-2007, 10:30 PM
  2. grearest prayer script ever
    By mark9510 in forum OSR Help
    Replies: 9
    Last Post: 09-23-2007, 07:12 PM
  3. prayer script
    By stupidlegs13 in forum RS3 Outdated / Broken Scripts
    Replies: 4
    Last Post: 07-27-2007, 02:20 PM
  4. Prayer tab help
    By geerhedd in forum OSR Help
    Replies: 2
    Last Post: 05-25-2007, 05:22 AM
  5. more prayer help plz
    By RudeBoiAlex in forum OSR Help
    Replies: 2
    Last Post: 04-29-2007, 03:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •