Results 1 to 15 of 15

Thread: First script.. need help with invfull

  1. #1
    Join Date
    Sep 2007
    Posts
    52
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default First script.. need help with invfull

    I've tried to make my own script but the "invfull" is not working...

    SCAR Code:
    program VarrockMiner;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Mining.scar}

    const
         Colour = 5951; // color of the rock
    var
     x, y :integer;     // do not touch this

    procedure mining;
    begin
       MouseSpeed := 15
       repeat
          if(FindColor(x, y, Colour, 1, 1, 515, 337)) then
         begin
              Writeln('Found the rock');
              Mouse(x, y, 5, 5, True);
              Wait(3000 + random(1000))
              if InvFull then
                 begin
                 writeln('Full');
              end;
         end;
         until(false)
    end;

    procedure Signature;
    begin
      ClearDebug;
      writeln('Varrock woodcutter');
      wait(3000 + random(750));
    end;

    begin
    Signature;
    mining;
    end.

  2. #2
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You require SetupSRL; in your script.

    SCAR Code:
    program VarrockMiner;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Mining.scar}

    const
      Colour = 5951; // color of the rock
    var
      x, y :integer;     // do not touch this

    procedure mining;
    begin
      MouseSpeed := 15
      repeat
        if(FindColor(x, y, Colour, 1, 1, 515, 337)) then
        begin
          Writeln('Found the rock');
          Mouse(x, y, 5, 5, True);
          Wait(3000 + random(1000))
        end;
      until(InvFull)
    end;

    procedure Signature;
    begin
      ClearDebug;
      writeln('Varrock woodcutter');
      wait(3000 + random(750));
    end;

    begin
      SetupSRL;
      SetupMining;
      Signature;
      mining;
    end.

    The repeat will stop when your inventory is full.

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  3. #3
    Join Date
    Sep 2007
    Posts
    52
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for your reply, but i wanna let it say someting when done ( i will replace it by walk-to bank code)

  4. #4
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program VarrockMiner;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Mining.scar}

    const
      Colour = 5951; // color of the rock
    var
      x, y, a:integer;     // do not touch this

    procedure mining;
    begin
      MouseSpeed := 15
      repeat
        if(FindColor(x, y, Colour, 1, 1, 515, 337)) then
        begin
          Writeln('Found the rock');
          Mouse(x, y, 5, 5, True);
          Wait(3000 + random(1000))
        end;
      until(InvFull)
    end;

    procedure Signature;
    begin
      ClearDebug;
      writeln('Varrock woodcutter');
      wait(3000 + random(750));
    end;

    procedure bank;
    begin
      writeln('Inventory is full, now we start the banking');
      a:=a+1
    end;

    begin
      SetupSRL;
      SetupMining;
      Signature;
      a:=0
      repeat
        mining; //Lets mine!
        bank; // We are full lets bank!
      until(a>10); // Do 10 runs (banks)
    end.

    There, in your main loop you start the mining, once it is finished (full) then it will move onto the bank; procedure.

    Ive added a very small runs calculation that you should make/use.

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  5. #5
    Join Date
    Sep 2007
    Posts
    52
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Tried the script.. It kept mining even when it was full...

  6. #6
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    As it is, it will only say "Inventory is full, now we start the banking" and then start mining again because there is no banking procedure.

    To test it try inserting TerminateScript; in the bank procedure. If the script stops then it works.

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  7. #7
    Join Date
    Dec 2006
    Location
    Florida, U.S.A
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    haven't tested it, but this should work.

    i added a load counter and a TotalLoads const for someone to fill out.
    when the loads var equals the TotalLoads const, then the script will log the player out and then stop.

    SCAR Code:
    program VarrockMiner;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Mining.scar}

    const
      Colour = 5951; // color of the rock
      totalloads = 10; //amount of loads you want to mine.

    var
      loads:integer; // do not touch this


    procedure bank;
    begin
      writeln('Inventory is full, now we start the banking');
    end;

    procedure mining;
    begin
      MouseSpeed := 15
      repeat
        if(FindColor(x, y, Colour, 1, 1, 515, 337)) then
        begin
          Writeln('Found the rock');
          Mouse(x, y, 5, 5, True);
          Wait(3000 + random(1000))
        end;
      until(InvFull)
      loads:=loads+1
      bank
    end;

    procedure Signature;
    begin
      ClearDebug;
      writeln('Varrock woodcutter');
      wait(3000 + random(750));
    end;

    begin
      SetupSRL;
      Signature;
      loads:=0
      repeat
        mining; //Lets mine!
        bank; // We are full lets bank!
      until(loads = totalloads); //repeats the mining procedure until loads = totalloads
      logout;
      terminatescript;
    end.

  8. #8
    Join Date
    Sep 2007
    Posts
    52
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by deoxys505 View Post
    haven't tested it, but this should work.

    i added a load counter and a TotalLoads const for someone to fill out.
    when the loads var equals the TotalLoads const, then the script will log the player out and then stop.

    SCAR Code:
    program VarrockMiner;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Mining.scar}

    const
      Colour = 5951; // color of the rock
      totalloads = 10; //amount of loads you want to mine.

    var
      loads:integer; // do not touch this


    procedure bank;
    begin
      writeln('Inventory is full, now we start the banking');
    end;

    procedure mining;
    begin
      MouseSpeed := 15
      repeat
        if(FindColor(x, y, Colour, 1, 1, 515, 337)) then
        begin
          Writeln('Found the rock');
          Mouse(x, y, 5, 5, True);
          Wait(3000 + random(1000))
        end;
      until(InvFull)
      loads:=loads+1
      bank
    end;

    procedure Signature;
    begin
      ClearDebug;
      writeln('Varrock woodcutter');
      wait(3000 + random(750));
    end;

    begin
      SetupSRL;
      Signature;
      loads:=0
      repeat
        mining; //Lets mine!
        bank; // We are full lets bank!
      until(loads = totalloads); //repeats the mining procedure until loads = totalloads
      logout;
      terminatescript;
    end.
    ok, it worked.. but now, you have any ideas what the best walking "code" should be?

  9. #9
    Join Date
    Dec 2006
    Location
    Florida, U.S.A
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    im sorry. i can't get my script to walk. i just used some code from my powerminer. (unreleased) mine works great, but it doesn't run long enough.(8 loads max)



    a suggestion would be to just get it to run for at least 25 loads without stopping, then worring about the walking procedure.

  10. #10
    Join Date
    Sep 2007
    Posts
    52
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i'm gonna use this script for RSC.. I need the best undetectable walking procedure.. rather with color OR/AND with coordinates.

    Thanks

  11. #11
    Join Date
    Dec 2006
    Location
    Florida, U.S.A
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  12. #12
    Join Date
    Mar 2007
    Posts
    1,223
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    do u still need help with the inv full?

  13. #13
    Join Date
    Sep 2007
    Posts
    52
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by faster789 View Post
    do u still need help with the inv full?
    Well, no that problem is solved.. i'm looking for the best "undetectablest" way to use walk coordinates

  14. #14
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    RadialWalk,

    deoxys505 thats pretty much what i posted.

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  15. #15
    Join Date
    Dec 2006
    Location
    Florida, U.S.A
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    more or less... i just edited it and then made a total loads thing for the kid...

    if you need anymore help either post back or pm me.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. InvFull
    By D1zl3 in forum OSR Help
    Replies: 21
    Last Post: 11-11-2008, 06:16 AM
  2. InvCount + InvFull Broken?
    By Sandstorm in forum OSR Help
    Replies: 7
    Last Post: 10-26-2008, 03:02 AM
  3. InvFull issues
    By spamthis in forum OSR Help
    Replies: 4
    Last Post: 09-21-2008, 03:54 PM
  4. Is there an Option named InvFull?
    By papenco in forum OSR Help
    Replies: 5
    Last Post: 11-30-2007, 07:15 PM
  5. Replies: 8
    Last Post: 10-01-2007, 08: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
  •