Results 1 to 7 of 7

Thread: How to drop Item in inventory

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

    Default How to drop Item in inventory

    What is the function to drop an item from the inventory??

  2. #2
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Simba Code:
    DropItem(I);

    I is what slot, 1 ~ 28. You can see all of SRL's functions by using the in-built search that Simba has, by the way:

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

    Default

    No i dont know the inventory slot of my item , want to rtclick my item and select select drop

    I am using ChooseOption('Drop') but it doesnot click on Drop after rt clicking????
    Last edited by astoria1112000; 12-01-2011 at 02:33 PM.

  4. #4
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Here, you can study this from my script that I am working on. If you have any questions, feel free to ask.

    Simba Code:
    function DropInventory: Boolean;
    var
      X, Y, I, DTM : Integer;
      Box : TBox;
      M : string;
    begin
      if (not(LoggedIn)) or (not(InvFull)) then Exit;
      FindNormalRandoms;

      M := Players[CurrentPlayer].Strings[MINING];
      case Lowercase(M) of
        'iron' : DTM := DTMFromString('mbQAAAHicY2VgYOhhYmCYA8S1QDwJiFuAWISRgYEf' +
                                      'iGWhmBeITeXFgaqZUDArAyZgxILBAABOugO3');
        'copper' : DTM := DTMFromString('mbQAAAHicY2VgYLjKxMBwE4jPAvF9ID4JxOKMD'  +
                                        'AzcQCwHxPJALAjEu7OtgKqZUDArAyZgxILBAAA'  +
                                        'WYgYa');
        'tin' : DTM := DTMFromString('mbQAAAHicY2VgYNjGxMBwDIi3AvEyIN4AxKKMDAz'   +
                                      '8QKwIxCJAzAnEaYmJQNVMKJiLARMwYsFgAADKOgU9');
      end;

      for I := 1 to 28 do
      begin
        Box := InvBox(I);
        if FindDTM(DTM, X, Y, Box.X1, Box.Y1, Box.X2, Box.Y2) then
        begin
          Mouse(X, Y, 5, 5, False);
          WaitOption('rop', 710);
        end;

        Wait(RandomRange(122, 180));
      end;

      FreeDTM(DTM);

      if (InvFull) then ExitPlayer('We were unable to drop our inventory...');
    end;

    The procedure will search the inventory from slot 1 to slot 28 for a DTM. Every time it finds the DTM, it will drop it. Then it will continue from the slot it left off on.

    If you want a simplified version:
    Simba Code:
    procedure SimpleDrop;
    var X, Y, DTM : Integer;
    begin
      if (not(LoggedIn)) then Exit;
      FindNormalRandoms;

      DTM := DTMFromString('');

      if FindDTM(DTM, X, Y, MIX1, MIY1, MIX2, MIY2) then
      begin
        Mouse(X, Y, 5, 5, False);
        ChooseOption('rop');
      end;

      FreeDTM(DTM);
    end;

    For your edit: You should never use capital letters in your text finding, try it that way. Also make sure everything is updated.

    Quote Originally Posted by astoria1112000 View Post
    No i dont know the inventory slot of my item , want to rtclick my item and select select drop

  5. #5
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Quote Originally Posted by RISK View Post
    For your edit: You should never use capital letters in your text finding, try it that way. Also make sure everything is updated.
    That's not true anymore. That hasn't been necessary for.. years, I believe. We were just so used to it we never changed tutorials or anything, even though there's no real reason to do it. Theoretically it's faster if you do use them, I think, because reading the first three letters is faster than just the lower case letters (which sometimes can be a bit down the line).

    But that's a bit unrelated.

  6. #6
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Try looking up and using chooseoptionmulti but that's odd chooseoption should work just fine.
    Try downloading new Simba from here: http://villavu.com/forum/showthread.php?t=68477

  7. #7
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    Make sure your SRL and Simba are the latest due to the recent font change.

    @RISK
    instead of
    Simba Code:
    for I := 1 to 28 do
      begin
        Box := InvBox(I);
        if FindDTM(DTM, X, Y, Box.X1, Box.Y1, Box.X2, Box.Y2) then
        begin
          Mouse(X, Y, 5, 5, False);
          WaitOption('rop', 710);
        end;

    // I'd Really suggest

    FoundDTM: boolean;

    FoundDTM := FindDTM(DTM, X, Y, MIX1, MIY1, MIX2, MIY2);
    while (FoundDTM) do
    begin
      Mouse(X, Y, 5, 5, False);
      WaitOption('rop', 710);
      FoundDTM := FindDTM(DTM, X, Y, MIX1, MIY1, MIX2, MIY2);
    end;

    Cus that might really save you a lot of DTM searches.

    -RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

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
  •