Results 1 to 15 of 15

Thread: ItemFinding.. Help?

  1. #1
    Join Date
    Apr 2009
    Location
    California!
    Posts
    280
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default ItemFinding.. Help?

    Hey everyone,
    Is there a way to make a script find a DTM in a certain inv spot.
    Like. If it's making long bows. Having it cut logs until it finds the dtm(Longbow) in the inv spot 28. Or something along those lines. I have tried many ways to do it, but none are working for me.
    Thanks to everyone who helps, Rep++.
    ~Penguin
    Semi-active
    http://i44.tinypic.com/33vk9aq.jpg
    SELL AUTOED GOODS AT MID-MAX! DON'T LET PRICES FALL AND GIVE US LESS PROFIT. (Put this in your sig)

  2. #2
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yes. Look around in inventory.scar.Just search for it in the tbox of slot 28.

  3. #3
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Whipped this up from my flax spinner:
    SCAR Code:
    Function FindDTMInv(DTM, Spot : Integer): Boolean;
    Var
      x, y : Integer;
      TheSpot : TBox;
    Begin
      If Not LoggedIn Then
        Exit;
      GameTab(4);
      If Spot = 0 Then
      Begin
        If FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2) Then
        Begin
          Result := True;
          Exit;
        End;
      End Else
      Begin
        TheSpot := InvBox(Spot);
        If FindDTM(DTM, x, y, TheSpot.x1, TheSpot.y1, TheSpot.x2, TheSpot.y2) Then
        Begin
          Result := True;
          Exit;
        End;
      End;
    End;
    Ce ne sont que des gueux


  4. #4
    Join Date
    Mar 2008
    Location
    New Jersey
    Posts
    1,673
    Mentioned
    1 Post(s)
    Quoted
    9 Post(s)

    Default

    you could just move the mouse over inventory spot 28 and check uptext, or just do:

    FindDTM(DTM: Integer; var x,y: Integer; x1, y1, x2, y2: Integer): Boolean;

    and put in the coords of the 28th inv spot you wanna search in, in x1, y1, x2, y2.

  5. #5
    Join Date
    Apr 2009
    Location
    California!
    Posts
    280
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Floor66 View Post
    Whipped this up from my flax spinner:
    SCAR Code:
    Function FindDTMInv(DTM, Spot : Integer): Boolean;
    Var
      x, y : Integer;
      TheSpot : TBox;
    Begin
      If Not LoggedIn Then
        Exit;
      GameTab(4);
      If Spot = 0 Then
      Begin
        If FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2) Then
        Begin
          Result := True;
          Exit;
        End;
      End Else
      Begin
        TheSpot := InvBox(Spot);
        If FindDTM(DTM, x, y, TheSpot.x1, TheSpot.y1, TheSpot.x2, TheSpot.y2) Then
        Begin
          Result := True;
          Exit;
        End;
      End;
    End;
    Wow!! Tyvm Floor66!
    That is one awesome function. Credited in my script :
    SCAR Code:
    {*****************************************************
    Function FindDTMInv(DTM, Spot : Integer): Boolean;
    By: Floor66
    Description: If DTM in inventory Spot exists, returns True, else returns False.
    ***********************************************************}


    Function FindDTMInv(DTM, Spot : Integer): Boolean;
    Var
      x, y : Integer;
      TheSpot : TBox;
    Begin
      If Not LoggedIn Then
        Exit;
      GameTab(4);
      If Spot = 0 Then
      Begin
        If FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2) Then
        Begin
          Result := True;
          Exit;
        End;
      End Else
      Begin
        TheSpot := InvBox(Spot);
        If FindDTM(DTM, x, y, TheSpot.x1, TheSpot.y1, TheSpot.x2, TheSpot.y2) Then
        Begin
          Result := True;
          Exit;
        End;
      End;
    End;
    It works like a charm! Rep++
    Also thanks to everyone else who helped Rep+
    ~Penguin
    Semi-active
    http://i44.tinypic.com/33vk9aq.jpg
    SELL AUTOED GOODS AT MID-MAX! DON'T LET PRICES FALL AND GIVE US LESS PROFIT. (Put this in your sig)

  6. #6
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You sure you repped me lol.

  7. #7
    Join Date
    Apr 2009
    Location
    California!
    Posts
    280
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It says, i can't rep you "You must spread some Reputation around before giving it to Da 0wner aka KyleIs1337 again."
    Cause you have been helping me all day. And Getting reps++

    Edit: Can't Rep Floor66 either
    "You must spread some Reputation around before giving it to Floor66 again."

    I'll repp you both as soon as it allows me. Thanks.

    Edit: Dw Da 0wner, you are Credited in my script too
    Last edited by Mystic; 05-10-2009 at 04:10 PM.
    ~Penguin
    Semi-active
    http://i44.tinypic.com/33vk9aq.jpg
    SELL AUTOED GOODS AT MID-MAX! DON'T LET PRICES FALL AND GIVE US LESS PROFIT. (Put this in your sig)

  8. #8
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    function IsDTMInInv(DTM, Spot : integer) : boolean;
    var
      Box : TBox;
      x, y : integer;
    begin
      if ((Spot > 28) or (Spot < 0)) then
        exit;
      GameTab(4);
      if Spot = 0 then
        result := FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2)
      else
      begin
        Box := InvBox(Spot);
        result := FindDTM(DTM, x, y, Box.X1, Box.Y1, Box.X2, Box.Y2);
      end;
    end;

    Better .
    Last edited by Da 0wner; 05-11-2009 at 03:55 AM.

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

    Default

    you could just do it like
    repeat
    crap;
    until(InvFull or not loggedin);

    ?

  10. #10
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    With failsafes of course.

  11. #11
    Join Date
    Apr 2009
    Location
    California!
    Posts
    280
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by marpis View Post
    you could just do it like
    repeat
    crap;
    until(InvFull or not loggedin);

    ?
    But like, if it is cutting logs into longbows or smithing iron ore into iron bars(with a ring of forging... of course), the inv stays full, so it would end without even doing the task. But yea for all other collectors that is the way to go.
    ~Penguin
    Semi-active
    http://i44.tinypic.com/33vk9aq.jpg
    SELL AUTOED GOODS AT MID-MAX! DON'T LET PRICES FALL AND GIVE US LESS PROFIT. (Put this in your sig)

  12. #12
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  13. #13
    Join Date
    Apr 2009
    Location
    California!
    Posts
    280
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Haha
    Edit: WOW! I can't rep you either >.<
    Edit:You must spread some Reputation around before giving it to Shuttleu again.
    ~Penguin
    Semi-active
    http://i44.tinypic.com/33vk9aq.jpg
    SELL AUTOED GOODS AT MID-MAX! DON'T LET PRICES FALL AND GIVE US LESS PROFIT. (Put this in your sig)

  14. #14
    Join Date
    Mar 2008
    Location
    New Jersey
    Posts
    1,673
    Mentioned
    1 Post(s)
    Quoted
    9 Post(s)

    Default

    thanks for rep and good luck with your script, if you want some help PM me or add me on MSN

  15. #15
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Guys, stay on topic. Stop bumping posts that are finished.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

Thread Information

Users Browsing this Thread

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

Posting Permissions

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