Results 1 to 10 of 10

Thread: My own include!

  1. #1
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default My own include!

    Sorry if this has already been made, but i just wanted to test my skillz ().

    Its called 'InvFinds.scar'
    SCAR Code:
    {*******************************************************************************
                      Check for the faulty rod (misxster05, THANKS!)
    ********************************************************************************}


    Function CheckRod(Var slot: Integer): Boolean;
    Var
      i: Integer;

    Begin
      For i:= 1 To 4 Do
      Begin
        If(ExistsItem(i)) Then
        Begin
          MMouseItem(i);
          If(IsUpText('ishing rod')) and IsUpText('ait') Then
          Begin
            Result:= True;
            slot:= i;
            Exit;
          End;
        End;
      End;
    End;

    {*******************************************************************************
                      Check for a faulty harpoon (misxster05, THANKS!)
    ********************************************************************************}


    Function CheckHarpoon(Var slot: Integer): Boolean;
    Var
      i: Integer;

    Begin
      For i:= 1 To 4 Do
      Begin
        If(ExistsItem(i)) Then
        Begin
          MMouseItem(i);
          If(IsUpText('arpoon')) Then
          Begin
            Result:= True;
            slot:= i;
            Exit;
          End;
        End;
      End;
    End;

    {*******************************************************************************
                      Check for a faulty cage (misxster05, THANKS!)
    ********************************************************************************}


    Function CheckCage(Var slot: Integer): Boolean;
    Var
      i: Integer;

    Begin
      For i:= 1 To 4 Do
      Begin
        If(ExistsItem(i)) Then
        Begin
          MMouseItem(i);
          If(IsUpText('cage')) Then
          Begin
            Result:= True;
            slot:= i;
            Exit;
          End;
        End;
      End;
    End;

    {*******************************************************************************
                      Check for a faulty net (misxster05, THANKS!)
    ********************************************************************************}


    Function CheckNet(Var slot: Integer): Boolean;
    Var
      i: Integer;

    Begin
      For i:= 1 To 4 Do
      Begin
        If(ExistsItem(i)) Then
        Begin
          MMouseItem(i);
          If(IsUpText('ishing')) and IsUpText('net') Then
          Begin
            Result:= True;
            slot:= i;
            Exit;
          End;
        End;
      End;
    End;

    {*******************************************************************************
                                        End
    ********************************************************************************}

    misxsterx06 made the CheckRod, i made these others
    Please post any things that make it better and work 10/10
    Ce ne sont que des gueux


  2. #2
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    You added an extra s to my name >< ahwell. Also might be an idea to make an extra couple of integers to choose where to search (and change the for loop to 'For i:= startSlot to endSlot do'. Another option is to add a string variable so it can be used flexibly (and would be shorter as you'd only need 1) to check for items. Lastly, what is extra 'ait' for on the fishing rod? I was thinking because it says 'bait fishing rod' but not sure. Otherwise it's great, but my view is biased and not worth much
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  3. #3
    Join Date
    Dec 2007
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Checking each slot with the mouse is quite unhuman. Do a DTM-check instead. But other than that it's a good idea.
    This sentence is false.

  4. #4
    Join Date
    Jun 2007
    Posts
    785
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    existItem looks at colors without the mouse....

    [22:20] <[-jesus-]> freddy, go uninstall yourself

  5. #5
    Join Date
    Jul 2007
    Posts
    1,431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    More complex
    SCAR Code:
    Function CheckWhatEver(Var Slot: Integer Item : string): Boolean;
    Var
      i: Integer;
    Begin
      For i:= 1 To 4 Do
      Begin
        If(ExistsItem(i)) Then
        Begin
          MMouseItem(i);
          If pos(item, Rs_GetUpText) > 0 Then
          Begin
            Result:= True;
            slot:= i;
            Exit;
          End;
        End;
      End;
    End;
    [CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]

  6. #6
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    I wanted this, cuz my DTM's failed sometimes, so i use this as failsafe
    Ce ne sont que des gueux


  7. #7
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    There already is a fishing net finding function in SRL, in my Evil Bob solver

    function FishingNetInInv: Boolean;
    I made a new script, check it out!.

  8. #8
    Join Date
    May 2007
    Location
    Ontario
    Posts
    361
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    You should fix your standards in the sense of not capitalizing the bold words.

  9. #9
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Yeh, i know, but mixster05 did that.. (no offence)
    Ce ne sont que des gueux


  10. #10
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Don't Reveal My Overcapitalizing To The World ><
    I just do it from habit (when first learning scar, I got told to capitalize constants, begins etc. and all procedures/functions - it spread to bold words to somehow)
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help with my include
    By fert in forum OSR Help
    Replies: 9
    Last Post: 10-27-2008, 11:12 AM
  2. Include Help, Please?
    By File in forum OSR Help
    Replies: 22
    Last Post: 03-20-2008, 10:55 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
  •