Results 1 to 3 of 3

Thread: ItemExists and Clicking said item

  1. #1
    Join Date
    Feb 2007
    Posts
    849
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default ItemExists and Clicking said item

    Simba Code:
    Procedure eat;
    var
    currentHealth, i: integer;
    inv: TInvItem;
    Begin
      currentHealth := StrToInt(GetInterfaceText(748, 8));
      if (currentHealth < Players[0].Integers[5]) then
         if(R_ItemExists(Food_To_Eat, inv)) then
         begin
             writeln('We have FOOD!');
         end;
    End;


    So I have this so far, how do I go about pressing the food that's in the inventory?
    As I don't have any coords, I can't used Mouse or Mousebox.

    I remember finding something in Inventory.Simba but I can't remember the same. You would use it like this; Inv(3); to get the third inventory spot. I did not know how to use that properly either, though it may be the solution to the problem.
    ________________________________________
    14:19 < cycrosism> I wonder what she would have done without it
    14:19 < cycrosism> without me*
    Cycrosism is now an it.
    Quote Originally Posted by Dervish View Post
    /Facedesk.

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

    Default

    mouseinv?

  3. #3
    Join Date
    Feb 2007
    Posts
    849
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ahh I found it.
    R_ClickItem
    I've been going through the includes for that past 30 minutes..

    Simba Code:
    Procedure eat;
    var
    currentHealth, i: integer;
    inv: TInvItem;
    Begin
      currentHealth := StrToInt(GetInterfaceText(748, 8));
      if (currentHealth < Players[0].Integers[5]) then
         if(R_ItemExists(Food_To_Eat, inv)) then
         begin
             writeln('We have FOOD!');
             R_ClickItem(i, true, 'at')
         end;
    End;

    This doesn't work, what is the problem here?


    Edit: I found the problem. I was thinking like I still had the loop there. Thanks!
    Last edited by HarryJames; 03-02-2011 at 08:09 PM.
    ________________________________________
    14:19 < cycrosism> I wonder what she would have done without it
    14:19 < cycrosism> without me*
    Cycrosism is now an it.
    Quote Originally Posted by Dervish View Post
    /Facedesk.

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
  •