Results 1 to 3 of 3

Thread: Question about a function.

  1. #1
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default Question about a function.

    Simba Code:
    function CheckToolBeltFor(Category, Tool : string) : Boolean;
    var
      I, catCount : Integer;
    begin
      if(not(toolBeltScreen()))then
        openToolBelt();
      setCategory(Category);

      case(LowerCase(Category))of
        'general', 'crafting' : catCount := 13;
        'fishing' : catCount := 8;
        'farming' : catCount := 5;
      end;

      for I := 1 to catCount do
      begin
        if(not(FindTextTpa(1158880, 9, 167, 146, 352, 161, Tool, SmallChars, Nothing)))then
        begin
          Mouse((375 + 397) / 2, (147 + 163) / 2, 1, 1, True);
          Wait(RandomRange(250, 750))
        end else
          Break;
      end;

      Result := itemSlotFilled;

      Wait(RandomRange(250, 750));
      MouseBox(479, 20, 491, 29, mouse_Left);
    end;


    If I put
    Simba Code:
    CheckToolBeltFor(Fishing, 'Harpoon');
    will that check for a harpoon in the tool belt?
    Finished B.S. Program in Radiology!!

    Projects: A big one! Total secret! hehe

  2. #2
    Join Date
    Jun 2008
    Location
    United States
    Posts
    818
    Mentioned
    60 Post(s)
    Quoted
    90 Post(s)

    Default

    You would need to pass
    Simba Code:
    CheckToolBeltFor('Fishing', 'Harpoon');
    as both parameters are strings.
    [10/14/13:19:03] <BenLand100> this is special relatively, just cleverly disguised with yachts

  3. #3
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    Sweet thanks!
    Finished B.S. Program in Radiology!!

    Projects: A big one! Total secret! hehe

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
  •