Results 1 to 18 of 18

Thread: Using Items with each other in inventory

  1. #1
    Join Date
    Nov 2008
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Using Items with each other in inventory

    Is there a code where I specify one of the 28 slots in my inventory, have the mouse left-click, then go to a seperate slot in the inventory (slots specified by coordinates 1-4 for x and 1-7 for y preferably) and have the mouse left-click again?

    I'm positive there must be a rather simple code for this, I just don't know it.

    Thanks!!

  2. #2
    Join Date
    Nov 2008
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    procedure MouseItem(i: Integer; left: Boolean);
    By: WT-Fakawi
    Description:
    Moves Mouse to invin spot then clicks left or right

    More inventory operations in SRL\Core\Inventory.scar

  3. #3
    Join Date
    Nov 2008
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by GreatKhan View Post
    procedure MouseItem(i: Integer; left: Boolean);
    By: WT-Fakawi
    Description:
    Moves Mouse to invin spot then clicks left or right

    More inventory operations in SRL\Core\Inventory.scar
    Thanks a buttload

    SCAR Code:
    procedure ClickFirstInvSlot(i: Integer; left: Boolean);
    var
       x, y: integer;
    begin
      MMouseItem(i:1);
      Mouse(x, y, 0, 0, left);
    end;

    That's definitely the command I need, but once I enter i:1 (for inventory integer) it says it expects a comma in that line. I can't think of where a comma would go, any suggestions?

  4. #4
    Join Date
    Dec 2007
    Posts
    2,112
    Mentioned
    71 Post(s)
    Quoted
    580 Post(s)

    Default

    SCAR Code:
    Function UseItems(item1, item2 : Integer) : Boolean;
    Begin
      MouseItem(Item1, False);
      Wait(RandomRange(500, 1000));
      If ChooseOption('se') Then
      Begin
        MouseItem(Item2, True);
        Result := True;
      End;
    End;

    Clicks First Then It Click Use returns true if succecfull

  5. #5
    Join Date
    Nov 2008
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by pur3b100d View Post
    SCAR Code:
    Function UseItems(item1, item2 : Integer) : Boolean;
    Begin
      MouseItem(Item1, False);
      Wait(RandomRange(500, 1000));
      If ChooseOption('se') Then
      Begin
        MouseItem(Item2, True);
        Result := True;
      End;
    End;

    Clicks First Then It Click Use returns true if succecfull
    Thanks, I'm trying to use it, but I get the error message "Invalid Number of Parameters" and it says the error is in my main loop

    SCAR Code:
    procedure MainLoop;

    begin
        repeat
            withdrawclay;
            useitems;  // <-----This line gets the error
            bankclay;
        until(LodesDone = LodesToDo);
    end;

    All I changed in the function was "item1" and "item2" to integers 1 and 15 repectively (just the inventory slot number right?)

  6. #6
    Join Date
    Feb 2007
    Location
    Toronto, Ontario, Canada
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by arteest90 View Post
    All I changed in the function was "item1" and "item2" to integers 1 and 15 repectively (just the inventory slot number right?)
    Then in that case, change:
    SCAR Code:
    Function UseItems(item1, item2 : Integer) : Boolean;
    to
    SCAR Code:
    Function UseItems : Boolean;

  7. #7
    Join Date
    Nov 2008
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks to all three of you so much!!!!!

    It successfully uses the clay with the bucket of water now

    Now if I want the mouse to move over the Soft Clay image that appears in the text box once you use the bucket and water, would you suggest going to the coordinates where it appears or having the script find colors?

  8. #8
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    maybe use MouseBox function if you do coordinates...less bannable! jw but what is the coordinate word for the dialog box..(ex. mainscreen is msx1,msy1...etc)

  9. #9
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    The reason you were getting the error before Agent posted is because you aren't giving it any parameters.

    Instead of this:

    SCAR Code:
    procedure MainLoop;
     
    begin
        repeat
            withdrawclay;
            useitems;  // <-----This line gets the error
            bankclay;
        until(LodesDone = LodesToDo);
    end;

    Do this:

    SCAR Code:
    procedure MainLoop;
     
    begin
        repeat
            withdrawclay;
            useitems(1, 15);  // <-----This line gets the error
            bankclay;
        until(LodesDone = LodesToDo);
    end;

    Also, if your looking to use the first fourteen items with the last fourteen items, you can do something like this:

    SCAR Code:
    procedure MainLoop;
    Var
     I : Integer;
    begin
        repeat
            withdrawclay;
            For I:=0 To 14 Do
            Begin
            useitems(I, I+14);  // <-----This line gets the error
            End;
            bankclay;
        until(LodesDone = LodesToDo);
    end;

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

    Default

    mcx1,mcy1,mcx2,mcy2. mc =MainChat

    ~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.


  11. #11
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by mormonman View Post
    maybe use MouseBox function if you do coordinates...less bannable! jw but what is the coordinate word for the dialog box..(ex. mainscreen is msx1,msy1...etc)
    MCX1, MCY1, MCX2, MCY2

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

    Default

    Quote Originally Posted by Mylesmadness View Post
    MCX1, MCY1, MCX2, MCY2
    Sorry, but I beat you lol

    ~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.


  13. #13
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    thanks to both of you anyway... can you make a dtm or bitmap of the things in the mainchat? like will they work?

  14. #14
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Text would be more accurate.

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

    Default

    Quote Originally Posted by mormonman View Post
    thanks to both of you anyway... can you make a dtm or bitmap of the things in the mainchat? like will they work?
    Actually you wouldn't want to make a bitmap of the mainchat, it's too big and would hog alot of memory. Use FindNPCchat if you're looking for a chat. I have it in my Range Guilder but I'm not home right now so I can't post exactly what I'm talking about. Sorry. Hope this helps.

    ~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.


  16. #16
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    SCAR Code:
    program New;
    {.include srl\srl.scar}
    begin
    setupsrl;
    FindNPCChatText('oft clay',Clickright);
    ChooseOption('Make X');
    end.

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

    Default

    Boreas, thanks. I knew it was FindNPCChat but I forgot the text part. At least he will have it now and not have to wait.

    ~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.


  18. #18
    Join Date
    Nov 2008
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks to all of you

    Especially for that last part Boreas Probably saved me a good amount of time that would have been spent searching for a much longer, less effective solution.

    And with that my first working script makes its first successful run!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Counting items in inventory?
    By yargo in forum OSR Help
    Replies: 7
    Last Post: 08-14-2008, 05:54 PM
  2. INventory Items with DTM?
    By wtf i sp4nk in forum OSR Help
    Replies: 3
    Last Post: 05-21-2007, 02:38 AM
  3. Items in inventory help
    By wtf i sp4nk in forum OSR Help
    Replies: 2
    Last Post: 05-20-2007, 09:58 PM
  4. Using 1 item with all items in the inventory?
    By Thick As Blood in forum OSR Help
    Replies: 5
    Last Post: 03-28-2007, 10:00 AM

Posting Permissions

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