Results 1 to 11 of 11

Thread: Procedure help

  1. #1
    Join Date
    Aug 2009
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Procedure help

    Well i dont see where i have gone wrong it just goes it just says
    [Qoute]New client targeted
    Successfully compiled (6433 ms)
    SRL Compiled in 31 msec
    Successfully executed
    [/Qoute]

    And all i am going is

    SCAR Code:
    begin
    Setup SRL;
    Cutwillows;
    end.

    and Cut Willows is

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}
    Var Failed, x, y, Timer: Integer;
    const

    YourPin = '';




    Procedure Spin;
    begin
    MarkTime(Timer);
    repeat
    Case Random(8) of
    1: begin
       MakeCompass('N');
       end;
    2: begin
       MakeCompass('E');
       end;
    3: begin
       Makecompass('W');
       end;
    4: begin
       MakeCompass('s');
       end;
    end;
       begin
       Wait(250 + random(500));
       end;
    until (TimeFromMark(Timer) > 4000+random(1000))
    end;

    procedure AntiBan;
    begin
      if not (LoggedIn) then
        exit;
      case Random(200) of
        0: HoverSkill('woodcutting', False);
        1: PickUpMouse;
        2: RandomMovement;
        3: BoredHuman;
        4: SleepAndMoveMouse(4000 + Random(3000));
        5: begin
             SetAngle(False);
             Wait(500 + random(500));
             SetAngle(True);
           end;
        6: begin
             MakeCompass('e');
             Wait(500 + random(500));
             MakeCompass('n');
           end;
        7: MMouse(Random(x), Random(y), 1000, 1000);
        8: Spin;
      end;
    end;

    Procedure AntiRandoms;
    begin
      if not (loggedin) then
        exit;

        LampSkill := 'woodcutting';
    end;

    Procedure IfChoping;
    begin
      if not (LoggedIn) then
      exit;
      Wait(2000 + random(2000));
      AntiBan;
      AntiRandoms;
        case random(20) of
        1: Spin;
    //    2: Talk;
        3: AntiBan;
        end;
    end;

    function FWillow: Boolean;
    var
      x, y : Integer;
    begin
      SetRun(True);
      SymbolAccuracy := 0.5;
      Result := FindSymbol(x, y, 'fish');
      if Result then
      begin
        Writeln('Found fishing symbol!');
        Mouse(x, y, 25, 25, True);
      end else
      begin
        Writeln('Couldn''t find the fishing symbol');
      end;
      SymbolAccuracy := 0.8;
    end;

    Procedure CutWillows;
    Var Failed, Clr: Integer;
      begin
        if not(loggedin) then
          exit;
            if (FindObjTPA(x, y, 1982002, 7, 1, 17, 17, 15, ['illow'])) then
              repeat
                AntiBan;
                AntiRandoms;
                FindObjTPA(x, y, 1982002, 7, 1, 17, 17, 15, ['illow'])
                GetMousePos(x,y);
                Wait(50 + random(150));
                  if (random(20) = 5) then
                    begin
                      mouse(x, y, 6, 6, false);
                      Wait(50 + random(150));
                      ChooseOption('hop');
                    end else
                      begin
                        mouse(x, y, 6, 6, true);
                      end;
                        Clr := GetColor(x, y);
                          while Clr = GetColor(x, y) do
                          Wait(100 + Random(100));
                            if not (FindObjTPA(x, y, 1982002, 7, 1, 17, 17, 15, ['illow'])) then
                              FWillow;
                              AntiBan;
                                if not (FindObjTPA(x, y, 1982002, 7, 1, 17, 17, 15, ['illow'])) then
                                  repeat
                                    Inc(Failed);
                                    AntiBan;
                                    Wait(5000 + random(5000));
                                until (FindObjTPA(x, y, 1982002, 7, 1, 17, 17, 15, ['illow'])) or (Failed = 5);
              until not (LoggedIn) or (InvFull);
      end;
                         
     
    Procedure FBank;
    begin
    MakeCompass('N');
      if RadialWalk(65536, 0, 70, 65, -1, 0) then
      begin
      Writeln('found bank');
      end else
       Writeln('cant find bank');
    end;

    Procedure AtBank;
    begin
     OpenBankQuiet('db');
       Wait(1000 + random(1000));
         if (PinScreen) then
           begin
             InPin(YourPin);
       Wait(1000 + random(1000));
           end;
           case lowercase(Players[CurrentPlayer].Strings[1]) of
        'true': begin
                  DepositAll;
                  CloseBank;
                end else
                 begin
                  Deposit(2, 28, True);
                  CloseBank;
                 end;
           end;
    end;


























    begin
    SetupSRL;
    CutWillows;
    end.
    Well thanks
    Last edited by rya; 09-10-2009 at 10:37 PM.
    I see Now, says the blind man

  2. #2
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    1,612
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nice script, I'm not exactly sure what your asking but, it looks human enough to me .

  3. #3
    Join Date
    Oct 2006
    Posts
    500
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Looks like you've got Randomness, good Antiban and Failsafes. Pretty human like to me.

  4. #4
    Join Date
    Oct 2006
    Location
    England
    Posts
    154
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You're not getting him guys, he's having trouble with it.

  5. #5
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Could you please post the entire script?
    Also you have
    SCAR Code:
    if not(loggedin) then
          exit;
    is your character logged in when you start the script?

    One technique to help finding out where a script is messing up is adding a bunch of WriteLns, after each main part put a WriteLn('found tree') or whatever, and whichever writeln it stops at is where your problem is!

  6. #6
    Join Date
    Aug 2009
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    well ive ginda had to stop a bit for school and im finding scar very hard but ive just put it the entire script up altho it does not work and is not finished
    I see Now, says the blind man

  7. #7
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Check out the SRL Scripting Template in SRL>Scripting Tools. That will make sure you do setup player and log in before you check if you're logged in.

  8. #8
    Join Date
    Aug 2009
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Boreas View Post
    Check out the SRL Scripting Template in SRL>Scripting Tools. That will make sure you do setup player and log in before you check if you're logged in.
    thanks but i was logging it in and just checking it cut the willows that it did'nt
    I see Now, says the blind man

  9. #9
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try adding some writeln's as a signifier, like
    SCAR Code:
    else
    if(not(findobjecttpa(jibberish)))then
    writeln('did not find this')
    end;
    If it did not find it or use timefrommark as a fail safe or just use findcolorspiraltolerance. try making a function like....
    SCAR Code:
    function findthewillow :boolean;
    begin
    result:= findobjtpa(jibberish)
    end;
    Then call it as...
    SCAR Code:
    If(not(findthewillow))then
    begin
    writeln('did not find the willow')

    Hope this was useful for you.

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

    Default

    EDIT: lmao read the last post :facepalm: sorry didn't see all the others *is going insane*

  11. #11
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Did you "ActivateClient;"?

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
  •