Results 1 to 5 of 5

Thread: WaitSlotCount

  1. #1
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default WaitSlotCount

    This is useful when picking up or collecting items that stack in one slot (as opposed to WaitInvCount). I made it for picking up charms because sometimes the player runs around objects before picking up.

    Simba Code:
    {------------------------------------------------------------------------------)
     Function: WaitSlotCount
     By: The Mayor
     Description: Waits for an exact item count in an inventory slot.
    (------------------------------------------------------------------------------}


    Function WaitSlotCount(Count, Slot, MaxTime: Integer): boolean;
    Var
      T: integer;
    Begin
      If Not(BankScreen) Then
        If Not FTab(tab_Inv) Then exit;

      Result := False;
      T := (GetSystemTime + MaxTime);

      While (GetSystemTime < T) Do
      Begin
        If GetAmountBox(InvBox(Slot)) =  Count Then  Result := True;
        If Result Then Exit;
      End;
    End;

  2. #2
    Join Date
    Jul 2006
    Posts
    189
    Mentioned
    1 Post(s)
    Quoted
    19 Post(s)

    Default

    Quote Originally Posted by The Mayor View Post
    This is useful when picking up or collecting items that stack in one slot (as opposed to WaitInvCount). I made it for picking up charms because sometimes the player runs around objects before picking up.

    Simba Code:
    {------------------------------------------------------------------------------)
     Function: WaitSlotCount
     By: The Mayor
     Description: Waits for an exact item count in an inventory slot.
    (------------------------------------------------------------------------------}


    Function WaitSlotCount(Count, Slot, MaxTime: Integer): boolean;
    Var
      T: integer;
    Begin
      If Not(BankScreen) Then
        If Not FTab(tab_Inv) Then exit;

      Result := False;
      T := (GetSystemTime + MaxTime);

      While (GetSystemTime < T) Do
      Begin
        If GetAmountBox(InvBox(Slot)) =  Count Then  Result := True;
        If Result Then Exit;
      End;
    End;
    Why Is this not in the official includes? I haven't tried it yet so can't confirm if it still works or not but I been searching for something like this for over an hour because the official includes don't work correctly. HTYA

  3. #3
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by hello to you all View Post
    Why Is this not in the official includes? I haven't tried it yet so can't confirm if it still works or not but I been searching for something like this for over an hour because the official includes don't work correctly. HTYA
    This won't work with SRL6. Check my GAO script for one that does.

  4. #4
    Join Date
    Jul 2006
    Posts
    189
    Mentioned
    1 Post(s)
    Quoted
    19 Post(s)

    Default

    Quote Originally Posted by The Mayor View Post
    This won't work with SRL6. Check my GAO script for one that does.
    I was hoping to use it with osr script but maybe it won't work? I'll give it a try anyway HTYA

  5. #5
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by hello to you all View Post
    I was hoping to use it with osr script but maybe it won't work? I'll give it a try anyway HTYA
    This may be compatible with SRL-OSR, but I'm not sure as I haven't used SRL5 style code in so long. Don't you wish the OSR include was written exactly the same as SRL6 so then you could use RS3 tutorials!!

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
  •