Results 1 to 6 of 6

Thread: I made a function :D

  1. #1
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default I made a function :D

    I actually made a working function I'm all so happy

    Anyways, here it is. I always found it annoying, having to type in the coords everytime when I wanted to search for something in the inventory

    SCAR Code:
    {*******************************************************************************
    function FindInvColor(var x, y: Integer; Color: Integer) : Boolean;
    By: Jason2gs
    Description: Finds color in the Inventory.
    *******************************************************************************}


    function FindInvColor(var x, y: Integer; Color: Integer) : Boolean;
    begin
     if(FindColor(x, y, Color, 553, 204, 740, 476))then
      Result := True;
    end;

    Not the best function, but I'm happy

    Edit: I just hope there's not already something like this. I looked, and didn't find anything.

  2. #2
    Join Date
    Jan 2007
    Posts
    248
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hey, hate to burst your bubble but something of this sort already exists.

    It's the main global coordinate variables, like MSX1 MSXY1, but then for the inventory. Im not sure when the abbr. for it is though

  3. #3
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Aw dang =/

    It's still a pretty function

  4. #4
    Join Date
    Jan 2007
    Posts
    248
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    and i firgured them out, MIX1, MIY1, and so on

  5. #5
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Alright, ty

  6. #6
    Join Date
    Jun 2006
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You can shorten it like this:
    SCAR Code:
    result := FindColor(x,y,col,x1,y1,x2,y2);
    or w/e

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. AddTPAs function that I made not working
    By FreakyMonkey in forum OSR Help
    Replies: 2
    Last Post: 12-28-2008, 11:09 PM
  2. this function i made for munk killer
    By jhildy in forum OSR Help
    Replies: 8
    Last Post: 08-12-2007, 11:14 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
  •