Results 1 to 19 of 19

Thread: Fletching function problems

  1. #1
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default Fletching function problems

    Sorted, sorry to all who spent there time trying to fix it, to find it was purely a bad browser...

    I have this problem with a fletching function I'm making, where it activates the client fine, but doesn't move the mouse anywhere (like it should do by the coords defined).

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}

    {*******************************************************************************
    Function FletchingInterface: Boolean;
    By: Richard
    Description: Returns true if the fletching interface is in the chatbox
    *******************************************************************************}

    Function FletchingInterface: Boolean;
    Begin
      Result := (GetColor(370, 462) = 0) or (GetColor(421, 446) = 0);
    end;

    {*******************************************************************************
    Function: MakeBow(BowType: String; Amount: Integer): Boolean;
    By: Richard
    Description: Clicks on the correct bow, and makes the desired amount
    *******************************************************************************}


    Function MakeBow(BowType: String; Amount: Integer): Boolean;
    Var
    BoxPoint: TPoint;
    Begin
      If not(FletchingInterface) then
        Exit;
      BoxPoint.y := 415;
      Begin
        If (GetColor(80, 408) = 734808) then
        Begin
          Case lowercase(BowType) of
            'arrow shafts'   : BoxPoint.x := 75;
            'short bow'      : BoxPoint.x := 197;
            'long bow'       : BoxPoint.x := 317;
            'crossbow stock' : BoxPoint.x := 437;
          else
            srl_Warn('MakeBow', BowType+ ' is not a valid bow type', warn_AllVersions);
          end;
        end else
        Begin
          Case lowercase(BowType) of
            'short bow'      : BoxPoint.x := 109;
            'long bow'       : BoxPoint.x := 260;
            'crossbow stock' : BoxPoint.x := 406;
          else
            srl_Warn('MakeBow', BowType+ ' is not a valid bow type', warn_AllVersions);
          end;
        end;
      end;
      Mouse(BoxPoint.x, BoxPoint.y, 10, 10, False);
      If InStrArr(IntToStr(Amount), ['1', '5', '10'], True) Then
        Result := ChooseOption('ake ' + IntToStr(Amount))
      else
      Begin
        Result := ChooseOption('ake X');
        TypeSend(IntToStr(Amount));
      end;
    end;

    begin
      SetupSRL;
      ActivateClient;
      Wait(3000);
      MakeBow('short bow', 1);
    end.

    Thanks all.
    Last edited by Richard; 05-26-2009 at 07:07 AM.

  2. #2
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  3. #3
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Quote Originally Posted by Shuttleu View Post
    try taking
    SCAR Code:
    If not(FletchingInterface) then
        Exit;
    out and see if it works
    if it does then you will know that its to do with the FletchingInterface function

    ~shut
    I tested that by doing a WriteLN, that's not the source of the problem.

  4. #4
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  5. #5
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Quote Originally Posted by Shuttleu View Post
    what about this bit?
    SCAR Code:
    If (GetColor(80, 408) = 734808) then
    try taking that out

    ~shut
    The idea of that is to check whether its using normal logs (which have an extra option of shafts).

    I'll try it nonetheless.

    EDIT: I do:

    SCAR Code:
    BoxPoint.y := 415;

    And that wouldn't be the problem, as it would just default to 0, so go up to the top.
    Last edited by Richard; 05-26-2009 at 07:01 AM.

  6. #6
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  7. #7
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Just found out there was never a problem with my proc, ran the whole thing through SMART and it was fine.

    Note to self: uninstall Google Chrome!

  8. #8
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  9. #9
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You can remove the BoxPoint variable and just use an x variable as an integer.
    No need for a TPoint as you only set the x and the y is the same no matter what.

  10. #10
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Quote Originally Posted by Da 0wner View Post
    You can remove the BoxPoint variable and just use an x variable as an integer.
    No need for a TPoint as you only set the x and the y is the same no matter what.
    What difference would that make? Its still only one var.

  11. #11
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yes, but it is unneeded.

  12. #12
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Doesn't affect the speed, and generally looks nicer.

  13. #13
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nope, doesn't look nicer :/. But whatever, it's your code.

  14. #14
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Richard, lol scar bugs sometimes with client shit etc always run it while you're viewing rs .

    Btw, since when are you making a fletcher???
    I was going to make one to.
    1176 Arrow Shaft(1 log is 5 shafts) Done --> 5
    154 Short Bow Done --> 10
    332 Long Bow Done --> 20
    205 Oak short Done --> 25
    583 Oak Long Bow Done --> 35
    446 Willow Shortbow Done --> 40
    1545 Willow LongBow Done --> 50
    1307 Maple short Done --> 55
    4849 Maple long Done --> 65
    4334 Yew Short Done --> 70
    8323 Yew Long Done --> 80
    15286 Magic Short Done --> 85
    106,840 Magic Long Done --> 99
    Note: this is without stringing, with stringing you need the halve of is these logs.
    ~Hermen

  15. #15
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    I'm not making a fletcher, this is for fletching.scar, look in the SVN.

  16. #16
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ow, okay I might use them but I prefer using my own stuff.
    ~Hermen

  17. #17
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Don't use SRL then Hermpie.

  18. #18
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Da 0wner View Post
    Don't use SRL then Hermpie.
    So are we going to act like a young child?
    You don't even know where I am talking about.

    Did you ever saw my private scripts?
    Nope you didn't, did you saw my released scripts?
    I doubt it.

    I use SRL, but I might do stuff in other ways.
    ~Hermen

  19. #19
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Hermen View Post
    Ow, okay I might use them but I prefer using my own stuff.
    That means you shouldn't use SRL. And yes, I know you use SRL, I'm just saying, you can use other people's stuff...you don't always have to use your own things.

    Why does it matter that I didn't see your scripts? Anyway, I have seen your public ones.

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
  •