Results 1 to 9 of 9

Thread: Dropping

  1. #1
    Join Date
    Oct 2007
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Dropping

    I need help on my first script, it is a power miner.
    Could someone please help me script the dropping part, thank you.

    SCAR Code:
    program RockSmasher;

    {.include SRL/SRL.scar}

    Const
    Rockcolor1= 7960964;
    Rockcolor2= 4342344;

    var x,y,randomm: integer;

      Procedure DeclarePlayers;
    begin
         HowManyPlayers  :=1;               // Set Number of Players here.
         NumberOfPlayers(HowManyPlayers);   // Sets the Players Array Length;
         CurrentPlayer:=0;                // CurrentPlayer = Array Index

         Players[0].Name :='username'; //UserName
         Players[0].Pass :='pass'; //PassWord
         Players[0].Nick :='nick'; //NickName
         Players[0].Active:=True;


    end;

         
     Procedure Randoms;
     Begin
     FindTalk;
     FindNormalRandoms;
     solveChatRandom;
     FindLamp ('Mining') //Uses lamp on that skill
     SolvePinball;
     DwarfItem;
     If (FindFight)Then
     Begin
     MakeCompass ('N')
     RunTo('E', True)
     Wait(7000 +Random(3000));
     RunTo('W', True);
     End;
     End;
     

     procedure antiban;
    begin
     randomm := Random(4)
      case randomm of


      0:                begin

                        Wait(3591+(random(287)));
                        RandomRClick;
                        Wait(3591+(random(287)));
                        Randoms
                       end;

      1:     begin
             Wait(3694+(random(791)));
             GameTab(random(13)+1);
             Randoms;
             Wait(3694+(random(791)));
             GameTab(4);
             end;

      2:                begin
                        Wait(3294+(random(873)));

                        Randoms;
                        HoverSkill('Woodcutting' ,false);

                        Wait(3294+(random(873)));

                        end;

      3:     begin
              Wait(3694+(random(791)));
              GameTab(random(13)+1);
              Randoms;
              Wait(3694+(random(791)));
              GameTab(4);
              end;
    end;
    end;



     Procedure MineRocks;
     Begin


      repeat
      if FindObjCustom(x, y, ['Min', 'ine'], [rockcolor1, rockcolor2], 7) then
      begin
     
      Mouse(x,y,0,0,false);
          Wait(500+(random(150)));

            ChooseOption('ine')
            randoms
            antiban;
            writeln('found rock');

              end else
              writeln('couldnt find rock');
              randoms;
              antiban;
              antiban;
              antiban;

                until( InvFull )
                end;



     Procedure Drop;
     begin
    If(FindColor(x,y,Rockcolor1,0,0,600,600)) and
    (FindColor(x,y,Rockcolor2,0,0,600,600)) then
    begin

  2. #2
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Procedure DropOres;
    var
      i : Integer;
    begin
      if invfull then
      begin
        for i := 2 to 28 do
        begin
          Drop(i);
          Wait(RandomRange(501, 1501));
        end;
      end;
    end;
    This one will drop from the second slot to the last slot.


  3. #3
    Join Date
    Oct 2007
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I tried that and i get Unknown Identifier 'Drop"

  4. #4
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oops, its 'DropItem' srry


  5. #5
    Join Date
    Oct 2007
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok it seems to be working now, thx. Im going to go test it

  6. #6
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Procedure Randoms;
     Begin
       FindTalk; // <--
       FindNormalRandoms; //<-- does basically all of these
       solveChatRandom; <--
       FindLamp ('Mining') //Uses lamp on that skill // <- there is a variable for this
      // something like LampSkill = 'Mining'
      // This wont work because NormalRandoms includes the genie
       SolvePinball;
       DwarfItem;
       If (FindFight)Then
       Begin
         MakeCompass ('N')
         RunTo('E', True)
         Wait(7000 +Random(3000));
         RunTo('W', True);
       End;
     End;

    Dont forget your standards, after every begin, indent the lines 2 spaces (select stuff and click tab will do the trick)

    SCAR Code:
    Procedure MineRocks;
    Begin
      repeat
        if FindObjCustom(x, y, ['Min', 'ine'], [rockcolor1, rockcolor2], 7) then
        begin  
          Mouse(x,y,0,0,false);
          Wait(500+(random(150))); // <- you dont need to wait this long, the rock will already be mined
          ChooseOption('ine')
          randoms
          antiban;
          writeln('found rock');
        end else
          writeln('couldnt find rock'); //<-- this is the only line in the else statement
                             // these lines will be run every loop
        randoms; // <-- you don't need nearly this much randoms or antiban
        antiban;
        antiban;
        antiban;
      until( InvFull ) // this could result in an infinite loop if you get logged out by a random
     // throw in this somewhere
    // if not loggedin then exit;
    end;
    in your case statement just say
    Case Random(4) of
    ~ Metagen

  7. #7
    Join Date
    Oct 2007
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ahhh ok, thx, also can someone test my script, i think its a little buggy

  8. #8
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by trav280 View Post
    ahhh ok, thx, also can someone test my script, i think its a little buggy
    It'd help if ya posted it
    ~ Metagen

  9. #9
    Join Date
    Oct 2007
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program RockSmasher;

    {.include SRL/SRL.scar}

    Const
    Rockcolor1= 7829378;
    Rockcolor2= 6447723;

    var x,y,randomm: integer;


      Procedure DeclarePlayers;
    begin
         HowManyPlayers  :=1;               // Set Number of Players here.
         NumberOfPlayers(HowManyPlayers);   // Sets the Players Array Length;
         CurrentPlayer:=0;                // CurrentPlayer = Array Index

         Players[0].Name :=''; //UserName
         Players[0].Pass :=''; //PassWord
         Players[0].Nick :=''; //NickName
         Players[0].Active:=True;


    end;

         
     Procedure Randoms;
     Begin
     FindTalk;
     FindNormalRandoms;
     solveChatRandom;
     FindLamp ('Mining') //Uses lamp on that skill
     SolvePinball;
     DwarfItem;
     If (FindFight)Then
     Begin
     MakeCompass ('N')
     RunTo('E', True)
     Wait(7000 +Random(3000));
     RunTo('W', True);
     End;
     End;
     

     procedure antiban;
    begin
     randomm := Random(4)
      case randomm of


      0:                begin

                        Wait(3591+(random(287)));
                        RandomRClick;
                        Wait(3591+(random(287)));
                        Randoms
                       end;

      1:     begin
             Wait(3694+(random(791)));
             GameTab(random(13)+1);
             Randoms;
             Wait(3694+(random(791)));
             GameTab(4);
             end;

      2:                begin
                        Wait(3294+(random(873)));

                        Randoms;
                        HoverSkill('Woodcutting' ,false);

                        Wait(3294+(random(873)));

                        end;

      3:     begin
              Wait(3694+(random(791)));
              GameTab(random(13)+1);
              Randoms;
              Wait(3694+(random(791)));
              GameTab(4);
              end;
    end;
    end;



     Procedure MineRocks;
     Begin


      repeat
      if FindObjCustom(x, y, ['Min', 'ine'], [rockcolor1, rockcolor2], 7) then
      begin
     
      Mouse(x,y,0,0,false);
          Wait(500+(random(150)));

            ChooseOption('ine')
            randoms
            antiban;
            writeln('found rock');

              end else
              writeln('couldnt find rock');
              randoms;
              antiban;
              antiban;
              antiban;

                until( InvFull )
                end;



     Procedure DropOres;
    var
      i : Integer;
    begin
      if invfull then
      begin
        for i := 2 to 28 do
        begin
          DropItem(i);
          Wait(RandomRange(501, 1501));
        end;
      end;
    end;
     
     Begin
      SetupSRL;
       DeclarePlayers;
           LoginPlayer;
            repeat
             MineRocks;
              DropOres;
               until (IsFKeyDown(3));
               
               End.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help with dropping
    By dallas574 in forum OSR Help
    Replies: 3
    Last Post: 07-24-2008, 05:13 PM
  2. Dropping By DTM
    By ammo2006 in forum OSR Help
    Replies: 2
    Last Post: 09-17-2007, 12:11 AM
  3. Dropping
    By hardman in forum RS3 Outdated / Broken Scripts
    Replies: 10
    Last Post: 08-01-2007, 02:47 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
  •