Results 1 to 4 of 4

Thread: ItemActivated(Slot: Integer): Boolean;

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

    Default ItemActivated(Slot: Integer): Boolean;

    Checks if we have clicked the item in inventory and "activated" it
    Where to use?
    - In every trade where you have to combine items
    -> firemaking (logs, matches)
    -> crafting (needle, leather, etc)
    -> herblore (potions, herbs)
    -> ???

    SCAR Code:
    function ItemActivated(Slot: Integer): Boolean;
    var
      X, Y: Integer;
      B: TBox;
    begin
      B := InvBox(Slot);
      Result := FindColor(X, Y, 16777215, B.X1, B.Y1, B.X2, B.Y2);
    end;
    Last edited by EvilChicken!; 10-03-2009 at 10:38 PM.

  2. #2
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default

    Very Useful.

    Does it always have a perfect "white" frame though ?
    I thought that would vary ;/

    ~caused

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

    Default

    Quote Originally Posted by caused View Post
    Very Useful.

    Does it always have a perfect "white" frame though ?
    I thought that would vary ;/

    ~caused
    nope, it's always white.

  4. #4
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks, Marpis, I committed this.
    I've thought of adding this a long time ago, but I obviously forgot it.

    Plus, I added function FindActiveItemSlot: TBox; too, inspired by you.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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