Results 1 to 4 of 4

Thread: Wc/Fm help

  1. #1
    Join Date
    Mar 2009
    Location
    Illinois
    Posts
    292
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Wc/Fm help

    Alright i'm making a wc/fm script and i guess its going sorta good but whenever i run it it clicks twice in the same spot towards the top right of the screen, even if i adjust the camera. Can anyone find anything wrong?
    SCAR Code:
    program WCFMtrainer;
    //|||||||||||||||||||||||||||||||||||\\
    //  Script made by: All that is man  \\
    //  Start by trees and it should do  \\
    //  the rest :)                      \\
    //                                   \\
    //                                   \\
    //|||||||||||||||||||||||||||||||||||\\
    {.include srl/srl.scar}
    var
    x, y, normallog, normaltree, tinderbox : integer;

    ProceDure Load;
    Begin;
      NormalLog := BitmapFromString(7, 4, 'beNpjYCgLlm1IsWxKsYYjB' +
           'gYGNWYBBgdJ1iQLpgQrIGJwMAAKFgRKpDppAZGDg0aCg0KKkwIDVg' +
           'AAB2YOCg==');
      NormalTree := DTMFromString('78DA633CCEC0C0709001052465D930FC07D28' +
           'C40FC1F0818F70019D751D5D87B4B806946289F713B90588FAAA6' +
           'ACDE1F55CD6D20B115558D899524AA9A5B40E216AA1A497976143' +
           '5008B0F107F');
      TinderBox := BitmapFromString(3, 5, 'beNpjYPBwYPT5z8nwn8HtP' +
           '4fLfw4GBgYHSw4gAjIYDRkcwQwoAADhZwcr');
    End;
    Procedure AntiBan;
    Begin
    case random(12) of
      1: Hoverskill('random', false);
      2, 3: HoverSkill('mining', false);
      4: PickupMouse;
      5: Begin
           MakeCompass('w');
           wait(50+random(124));
           Makecompass('s');
           wait(50+random(124));
           MakeCompass('random');
           wait(50+random(124));
           MakeCompass('n');
         End;
      6: Mmouse(0, 0, 800, 800);
    End;
    End;
    Function LogInInv : Boolean;
    Begin
    If FindBitMapToleranceIn(NormalLog, x, y, MIx1, MIy1, MIx2, MIy2, 500) Then
      Begin
      Result := True;
      End;
    End;
    Function CheckTinderBox : Boolean;
    Begin
    If FindBitMapToleranceIn(Tinderbox, x, y, MIx1, MIy1, MIx2, MIy2, 255) Then
      Begin
      Result := True;
      end else
        Begin
        Writeln('Did not find tinderbox, please get one.');
        TerminateScript;
        End;
    End;
    Procedure ChopDownTree;
    Begin
    If not (LogInInv) Then
      Begin
      If FindDTM(NormalTree, x, y, MSx1, MSy1, MSx2, MSy2) Then
        Begin
        MMouse(x, y, 5, 5);
        Wait(250+Random(166));
        If IsUpText('hop') Then
          Begin
          Mouse(x, y, 5, 5, True);
            Repeat
            Wait(500);
            Until(LogInInv);
          End;
        End;
      End;
    End;
    Procedure LightTheLog;
    Begin
    If FindBitMapToleranceIn(Tinderbox, x, y, MIx1, MIy1, MIx2, MIy2, 255) Then
      Begin
      Mouse(x, y, 5, 5, True);
      If FindBitMapToleranceIn(NormalLog, x, y, MIx1, MIy1, MIx2, MIy2, 255) Then
        Begin
        Mouse(x, y, 5, 5, True);
          Repeat
          Wait(500);
          Until not (LogInInv);
        End;
      End;
    End;
    begin
      ClearDebug;
      ActivateClient;
      SetUpSrl;
      Load;
      ChecktinderBox;
    repeat
      ChopDownTree;
      AntiBan;
      LightTheLog;
      AntiBan;
    until(False);
    end.

  2. #2
    Join Date
    Dec 2006
    Location
    Canada, BC
    Posts
    728
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    erm i dont think useing DTM's to find the tree is a good idea.. that might be it. you could use

    FindObj(x, y, 'tree', color, tolerance);

    Its pretty self explanitory. X, Y wont need to be changed
    'tree' - the name of the tree your useing
    color - the color of the tree
    tolerance - id use 7

    or if your skilled / do tutorials / get someone to help you, you could try using a TPA which would probably be your best bet haha.
    Lance. Da. Pants.

  3. #3
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    As Lance said, you may have a bad DTM which is being found, but then, is hurting you because its not being found in the right place. Try using FindColorTolerance, and moving towards TPAs. TPAs being your best bet.

    Also, you may want to use the InvCount function in LogInInv because your script will only cut one log
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  4. #4
    Join Date
    Mar 2009
    Location
    Illinois
    Posts
    292
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Alright thanks guys but uh I want it to cut one log and then burn it. Hence the "LogInInv" function but thanks.

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
  •