Results 1 to 8 of 8

Thread: Drop Procedure mucking up =[

  1. #1
    Join Date
    Oct 2007
    Location
    if(FindMyHouse(x,y,'ous',MyPlace,15))then
    Posts
    97
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Drop Procedure mucking up =[

    SCAR Code:
    //////////////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////////
    //////////                    SUBMERSAL'S POWERWHACKER                       /////////
    //////////                                                                   /////////
    //////////                          Version 2.0                              /////////
    //////////                                                                   /////////
    //////////                        -ADDED FEATURES-                           /////////
    //////////                          EntFinding                               /////////
    //////////                     Better Random Finding                         /////////
    //////////                            AntiBan                                /////////
    //////////                          MULTIPLAYER!                             /////////
    //////////                                                                   /////////
    //////////                         -NEXT VERSION-                            /////////
    //////////                          Axe-Checking                             /////////
    //////////                           SRLreports                              /////////
    //////////////////////////////////////////////////////////////////////////////////////
    //////////                         INSTRUCTIONS                              /////////
    ////////// - 1. Colour pick the tree you want to powercut (MUST BE NORMAL,   /////////
    //////////        UNLESS YOU WANT TO DTM THE LOG AND CHANGE SOME STUFF       /////////
    //////////                                                                   /////////
    ////////// - 2. Target the RS window ( using the (+) ) and stand in an area  /////////
    //////////                   with a hell load of trees.                      /////////
    //////////                                                                   /////////
    ////////// - 3. RUN THE SCRIPT (CTRL + ALT + R) - ENJOY YOUR WHACKING!       /////////
    //////////////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////////

    program PowerCutter;
    {.include srl/srl.scar}

    const
      TreeColor = 2836802; //colour pick the tree that you want to start on to powerwhack(HAS to be normal)
     
    procedure DeclarePlayers;
    begin
      HowManyPlayers:= 6;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:= 0;

      Players[0].Name        := 'Username'; //UserName
      Players[0].Pass        := 'Password'; //Password
      Players[0].Nick        := 'Nick'; //2-4 letters of username
      Players[0].Integers[1] := 10; //Number of loads before switching
      Players[0].Active      := True; //Active

      Players[1].Name        := 'Username'; //UserName
      Players[1].Pass        := 'Password'; //Password
      Players[1].Nick        := 'Nick'; //2-4 letters of username
      Players[1].Integers[1] := 10; //Number of loads before switching
      Players[1].Active      := True;

      Players[2].Name        := 'Username'; //UserName
      Players[2].Pass        := 'Password'; //Password
      Players[2].Nick        := 'Nick'; //2-4 letters of username
      Players[2].Integers[1] := 10; //Number of loads before switching
      Players[2].Active      := True; //Active

      Players[3].Name        := 'Username'; //UserName
      Players[3].Pass        := 'Password'; //Password
      Players[3].Nick        := 'Nick'; //2-4 letters of username
      Players[3].Integers[1] := 10; //Number of loads before switching
      Players[3].Active      := True; //Active

      Players[4].Name        := 'Username'; //UserName
      Players[4].Pass        := 'Password'; //Password
      Players[4].Nick        := 'Nick'; //2-4 letters of username
      Players[4].Integers[1] := 10; //Number of loads before switching
      Players[4].Active      := True; //Active

      Players[5].Name        := 'Username'; //UserName
      Players[5].Pass        := 'Password'; //Password
      Players[5].Nick        := 'Nick'; //2-4 letters of username
      Players[5].Integers[1] := 10; //Number of loads before switching
      Players[5].Active      := True; //Active
    end;

    function FindFastRandoms: Boolean; //Thank you very much to the scripter who wrote this
    var
      i: Integer;
    begin
      for i:=1 to 10 do
      begin
        case I of
         1:  If FindDead then
               Result := True;
         2:  If FindMod then
               Result := True;
         3:  If FindMime then
               Result := True;
         4:  If FindMaze then
               Result := True;
         5:  If FindQuiz then
               Result := True;
         6:  If FindDemon then
               Result := True;
         7: begin
               if NoGameTab then
               begin
                 Result := True;
                 Players[CurrentPlayer].loc := 'No GameTab';
                 Logout;
                 Exit;
               end;
             end;
         8: begin
               if InBlack then
               begin
                 Result := True;
                 Players[CurrentPlayer].loc := 'InBlack';
                 Logout;
                 Exit;
               end;
             end;
           9: RC;
           10: Respond;
        end;
        wait(1);
      end;
    end;

    procedure FindRandoms; //And this
    begin
      FindTalk;
      FindFastRandoms;
      FindNormalRandoms;
      FindLamp('Woodcutting');
      SolvePinball;
      if (FindFight) then
      begin
        MakeCompass('N');
        RunTo('N', True);
        Wait(7000 +Random(3000));
        RunBack;
      end;
    end;

    procedure AntiBan;
    begin
      if (not(LoggedIn)) then
      Exit;
      case Random(8) of

        0: RandomRClick;
        1: HoverSkill('Woodcutting', False);
        2: RandomMovement;
        3: BoredHuman;
        4: PickUpMouse;
        5: AlmostLogout;
        6: DoEmote(1 +Random(20));
        7: begin
             GameTab(1 +Random(12));
             wait(2000 +Random(1500));
             GameTab(4);
           end;
        end;
    end;

    procedure EntFinder; // Big Thanks to YoHoJo. Modded by Bobbohobbo - No way I could have wrote this myself
    var
      EX, EY: integer;
      FX, FY: integer;
      SafeEntWait: LongInt;
    begin
      if (not (LoggedIn)) then
      Exit;
      begin
        Status('Checking For Ent')
          if
          (FindObjCustom(EX, EY, ['Tree'], [4690821], 5)) then
        begin
          MMouse(EX, EY, 0, 0)
            if FindColorTolerance(FX, FY, 55769, 85, 15, 115, 15, 20) then
          begin
            Status('Ent Found');
            MouseFindFlag(645, 83, 2, 2);
            MarkTime(SafeEntWait)
              repeat
              FTWait(5)
                FindNormalRandoms;
              if not (LoggedIn) then
                NextPlayer(False);
            until TimeFromMark(SafeEntWait) > 29000 + Random(10000)
          end;
        end;
      end;
    end;

    var
      x, y: Integer;

    procedure Cut;
    var C:integer;
    begin
      if(FindObj(x,y,'ree',TreeColor,15))then
      begin
        Mouse(x,y,5,5,True);
        Writeln('Walking to Tree');
        Flag;
        Writeln('Cutting Tree');
        C:= InvCount;
        repeat
          wait(250);
          if not(LoggedIn)then
            Exit;
            MakeCompass('N');
            HighestAngle;
            EntFinder;
        until(InvCount > C);
      end;
    end;

    procedure Drop;
    var Logs:integer;
    begin
      Logs := DTMFromString('78DA637466626078CA8002527C74C1342394C' +
           'FE80354F390010D30A2AA0900AA794D408D1D50CD47026AAC816A' +
           'EE1050E30E54730B55859BA91CAA1A63A09A17F8CD01006FA409A' +
           'A');
      if(FindDTM(Logs,x,y,MIX1,MIY1,MIX2,MIY2))then
      begin
        Mouse(x,y,5,5,False);
        if(ClickOption('rop',2))then
        begin
          wait(1000+random(650));
          Writeln('Dropped');
        end else
        begin
          ArrangeInv;
        end;
        end else
        begin
          ArrangeInv;
        end;
      end;

    procedure Signature;
    begin
    ClearDebug;
      Writeln('           _                                   _ ');
      Writeln('          | |                                 | |');
      Writeln(' ___ _   _| |__  _ __ ___   ___ _ __ ___  __ _| |');
      Writeln('/ __| | | |  _ \|  _   _ \ / _ \  __/ __|/ _` | |');
      Writeln('\__ \ |_| | |_) | | | | | |  __/ |  \__ \ (_| | |');
      Writeln('|___/\__,_|_.__/|_| |_| |_|\___|_|  |___/\__,_|_|');
      Writeln('                                                 ');
      Writeln('                                                 ');
      Writeln('      AnyWhere NormalTree PowerWhacker! [V2]     ');
      Writeln('-------------------------------------------------');
      Writeln('-------------------------------------------------');
    end;

    var Logs:integer;
    begin
      Signature;
      SetupSRL;
      DeclarePlayers;
      if (not (loggedIn)) then
      begin
        LoginPlayer;
      end;
      repeat
        repeat
          if not(LoggedIn)then
            Exit;
          Cut;
        until(InvFull)
        repeat
          if not(LoggedIn)then
           Exit;
           Drop;
        until(FindDTM(Logs,x,y,MIX1,MIY1,MIX2,MIY2));
      until(False)
    end.

    (It cuts and when there is a full inventory the char just stands there....isn't frozen but nothing happens.)

    Everything else seems to work right.

    I actually wanted to try and figure this out myself but I couldn't =[


    http://i224.photobucket.com/albums/d...iton/buxto.jpg

    WORKING Free RS Membership! (Click on the Bux.to sig!)


  2. #2
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

    Default

    Your problem is:

    SCAR Code:
    repeat
          if not(LoggedIn)then
           Exit;
           Drop;
        until(FindDTM(Logs,x,y,MIX1,MIY1,MIX2,MIY2));

    Your saying to repeat dropping until it finds the Log...

    Do this:

    SCAR Code:
    repeat
          if not(LoggedIn)then
           Exit;
           Drop;
        until not(FindDTM(Logs,x,y,MIX1,MIY1,MIX2,MIY2));

    Should fix it. Or you did your DTM wrong.

    Heres my DTM for a log, try it if yours doesnt work.

    SCAR Code:
    Logs := DTMFromString('78DA63E465616058CAC80002109281A125D59' +
        '6E12194FF1F081839806AE6C3646100550FA310116AA4816AE612' +
        '50230F54B39C801A39A09AF504D48802D56C24A0861BA8660B013' +
        '520BF6F20A08609A8661501356C4035CBF0AB010069480E46');

  3. #3
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    You could also do:

    SCAR Code:
    repeat
          if not(LoggedIn)then
           Exit;
           Drop;
        until (invcount = 0)

    Just as long its nothing but logs in the inventory.

    Edit:
    Also in your main loop I would do this :
    SCAR Code:
    var Logs:integer;
    begin
      Signature;
      SetupSRL;
      DeclarePlayers;
      repeat
        if (not (loggedIn)) then LoginPlayer; //<- move the loginplayer to the repeat loop
        repeat
          if not(LoggedIn)then Exit;//I would change this somehow, maybe to 'loginplayer'
          Cut;
        until(InvFull)
        repeat
          if not(LoggedIn)then Exit;//as above, otherwise it might exit script
           Drop;
        until(invcount = 0) //changed this to drop until your inventory count is 0
      until(False)
    end.
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

  4. #4
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    SCAR Code:
    Function DropItems(S, E: Integer): Integer;
    Var
      I: Integer;
      Item: TPoint;
    Begin
      For I:= S To E Do
      Begin
        If(not Loggedin)Then Exit;
        GameTab(4);
        If(ExistsItem(I))Then
        Begin
          Item := ItemCoords(I);
          Mouse(Item.X, Item.Y, 5, 5, False);
          If(ChooseOption('rop'))Then
            Result := Result + 1;
        End;
      End;
    End;

    try that

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  5. #5
    Join Date
    Oct 2007
    Location
    if(FindMyHouse(x,y,'ous',MyPlace,15))then
    Posts
    97
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wow, all seem like they'll work, but the one that look different to the others was JukKa's.

    Mind explaining it all to me? Or don't you have the time?

    I'll let you guys know how the edits go (later, about to head off to school.)


    http://i224.photobucket.com/albums/d...iton/buxto.jpg

    WORKING Free RS Membership! (Click on the Bux.to sig!)


  6. #6
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    SCAR Code:
    Function DropItems(S, E: Integer): Integer;
    Var
      I: Integer;
      Item: TPoint;
    Begin
      For I:= S To E Do //A typical loop like repeat...until..
      Begin //repeats until "I" equals "E"
        If(not Loggedin)Then Exit; //if it isnt loggedin it jumps of the procedure
        GameTab(4); //goes to inventory
        If(ExistsItem(I))Then //if item exists at "I", I = inventory number 1 2 3 4 etc
        Begin
          Item := ItemCoords(I); //gives the TPOINT (basically a integer) the inventory cordinates
          Mouse(Item.X, Item.Y, 5, 5, False); //Moves the mouse to the coords, TPoint is a integer which has: NormalInteger.X, NormalInteger.Y, read a tut on that its really simple.
          If(ChooseOption('rop'))Then //if it chooses "Drop" see rop is actually "Drop"
            Result := Result + 1; //It adds +1 to the result as u can see its a function it returns
        End;
      End;
    End;

    To drop ur WHOLE inventory use it like this:
    SCAR Code:
    Writeln('Dropped: ' + IntToStr(Dropitems(1, 28)) + ' Items');
    //Or only
    Dropitems(1, 28)

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  7. #7
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Jukkas way would work the best, but if you use that it will drop everything in inventory. Your way can work, but Jukka's is guaranteed.

    If you want to get fancy you could use this function I like to use:
    SCAR Code:
    function MouseInvText(istextup, option:string; leftclick: Boolean; inv1, inv2, waitfor, xtimes:integer): Boolean; //by Narcle
    var
    i,x,y, times:integer;
    begin
    gametab(4);
    for i := inv1 to inv2 do
    if (ExistsItem(i)) then
      begin
      MMouseItem(i);
      GetMousePos(x, y);
      wait(100+random(50));
      if (pos(istextup, rs_GetUpText) > 0) then
        begin
          if (leftclick = true) then
            begin
              Mouse(x,y,5,5,true);
              result := true;
              times := times + 1;
            end else
            begin
              Mouse(x,y,5,5,false);
              if Chooseoption(option) then
              begin
                result := true;
                times := times + 1;
              end;
            end;
          end;
        wait(waitfor+random(100));
        if (times = xtimes) then exit;
      end else
      result := false;
      exit;
    end;

    MouseInvText('Log', 'rop',false, 1, 28, 200, 28)
    //This will search through inventory 1-28 and drop "Log" up to 28 times.
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

  8. #8
    Join Date
    Oct 2007
    Location
    if(FindMyHouse(x,y,'ous',MyPlace,15))then
    Posts
    97
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok I think I've got enough time to try JuKKa's procedure.

    16 minutes exactly.


    http://i224.photobucket.com/albums/d...iton/buxto.jpg

    WORKING Free RS Membership! (Click on the Bux.to sig!)


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Drop Procedure
    By HempLord in forum OSR Help
    Replies: 12
    Last Post: 04-16-2008, 06:18 PM
  2. Drop procedure?
    By iambowling247 in forum OSR Help
    Replies: 16
    Last Post: 12-09-2007, 04:35 PM
  3. Easiest Drop procedure lol
    By destroyface in forum Research & Development Lounge
    Replies: 25
    Last Post: 08-31-2007, 09:20 PM
  4. Drop All Procedure?
    By Rune Hacker in forum OSR Help
    Replies: 13
    Last Post: 04-08-2007, 02:11 AM
  5. Drop Procedure
    By TheGodfather in forum OSR Help
    Replies: 6
    Last Post: 02-13-2007, 06:59 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
  •