Results 1 to 13 of 13

Thread: Script logs out

  1. #1
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default Script logs out

    Hi my catherby/seers maple chopper script is playing up as when all then maples have been cut it logs out!

    SCAR Code:
    program ProjectS;


    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/WoodCutting.scar}



    const
    //-->Loads<--\\

    Loads = 10; //How many loads per player before switching

    //--->SRL ID<---\\
    YourSRLId = '5840';
    YourSRLPassword ='234324';

    //--->Pin - Make same for ALL chars. If no Pin, leave blank<---\\
    YourPin = '';



    {-------------------------------------------------------
                           Player Setup
    --------------------------------------------------------}


    procedure DeclarePlayers;
    begin

         HowManyPlayers := 1;
         NumberOfPlayers(HowManyPlayers);
         CurrentPlayer:= 0

         Players[0].Name   := '';
         Players[0].Pass   := '';
         Players[0].Nick   := 'estl';
         Players[0].Active := True;

    end;



    {----------------------------Do Not Edit Below This----------------------------}
    var x, y, LoadsNum, LoadsNum2: integer;



    //-----------------------------AntiRandoms/AntiBan----------------------------\\

    Procedure AntiRandoms;
    begin
      If(FindFight)then
      RunAway('N', True,1,15000);
      FindNormalRandoms;
      FindLamp('Woodcutting');
    end;

    procedure AntiBan;
    begin
      if not LoggedIn then Exit;
      case Random(30) of
        1: RandomRClick;
        2: HoverSkill('Woodcutting', False);
        3: RandomMovement;
        4: BoredHuman;
        6: DoEmote(400 +Random(90));
      end;
    end;


      //---------------------------------ChopTree-----------------------------------\\

    procedure ChopTree;
    var
      CuttingTime: Integer;
      Tries: Integer;
    begin
      MarkTime(CuttingTime);
      MakeCompass('S');
      repeat
        if FindObjTPA(X, Y, 2571369, 14, 2, 15, 30, 5, ['hop', 'aple']) then
        begin
           MMouse(X, Y, 3, 3);
           Wait(150);
           if(IsUpText('aple'))then
           begin
             Mouse(X, Y, 3, 3, False);
             Wait(150 + Random(75));
             ChooseOption('hop')
             FFlag(0);
             AntiBan;
             X := MSCX;
             Y := MSCY;
             FindObjTPA(X, Y, 2571369, 14, 2, 15, 30, 5, ['hop', 'aple']);
             MMouse(X, Y, 3, 3);
             MarkTime(CuttingTime);
             repeat
               AntiBan;
               Wait(75 + Random(25));
               FindNormalRandoms;
               Wait(50 + Random(50));
               MMouse(X, Y, 3, 3);
             until (TimeFromMark(CuttingTime) > 400000+random(20000)) or not IsUpText('aple');
           end;
        end
        else
        begin
          Tries := Tries + 1;
          if (Tries >= 20) then
          begin
            LogOut;
            NextPlayer(False);
            Exit;
          end;
        end;
      until (InvFull) or not (LoggedIn)
    end;

       //----------------------Walking from maples to Bank--------------------------\\

    function WalkToBank : Boolean;
    var
      BankDTM, X, Y:Integer;
    begin
       BankDTM := DTMFromString('78DA63CC676260F06000037608C5F0E70F138' +
           '300906604E2FF40C0980754E3C58006189148200D32C79B809A02' +
           '22D41412B60B00174E09C5');
      if (DTMRotated(BankDTM, X, Y, MMX1, MMY1, MMX2, MMY2)) then
      begin
        Mouse(X, Y, 1, 1, True);
        Wait(450 + Random(115));
        FFlag(0);
        WriteLn('Player has successfully walked to the Maple Trees.');
        Result := True;
      end
      else
      begin
        WriteLn('Player could not find the bank using DTM.');
        FindSymbol(X, Y, 'Bank');
        Mouse(X, Y, 1, 1, True);
        FFlag(0);
        Wait(730 + Random(525));
        if (not (FindSymbol(X, Y, 'Bank'))) then
        begin
          WriteLn('Failed to find the Bank');
          LogOut;
          Exit;
        end;
      end;
      FreeDTM(BankDTM);
    end;

    //--------------------------------Banking-------------------------------------\\



    function Banking : Boolean;
    var
      MapleDTM, BX, BY, MX, MY: Integer;
    begin
      if (not (InvFull)) or (not (LoggedIn)) then
        Exit;
      if (InvFull) then
      begin
        MapleDTM := DTMFromString('78DA639CC1C4C060CEC8800C621D78C0344C9' +
                  '4713A508D1EAA1A982C5C4D3B508D25013593806A9C09A8590C54' +
                  '634740CD02A01A1D026ABA816A0CF0AB0100C6F60664');
        FindObjTPA(BX, BY, 7699838, 15, -1, 15, 15, 3, ['ank','Ban', 'Bank']);
        Wait(1210 + Random(895));
        MMouse(BX, BY, 0, 0);
        if (IsUpText('Banker')) then
        begin
          Mouse(BX, BY, 1, 1, False);
          ChooseOption('Bank');
          FFlag(0);
        end
        else
        Mouse(BX, BY, 1, 1, False);
        Wait(115 + Random(65));
        ChooseOption('Use-quickly');
        FFlag(0);
        Wait(900 + Random(620));
        if (PinScreen) then
          InPin(YourPin);
        Wait(1000 + Random(150));
        if (BankScreen) then
        begin
          FindDTM(MapleDTM, MX, MY, MIX1, MIY1, MIX2, MIY2);
          Deposit(2, 28, True);
          FreeDTM(MapleDTM);
          Wait(285 + Random(110));
          LoadsNum := LoadsNum + 1;
          LoadsNum2 := LoadsNum2 + 1;
          ReportVars[1] := ReportVars[1] + 1;
          SendSRLReport;
          Result := True;
          Wait(2500 + Random(1240));
        end
        else
        begin
          WriteLn('Could not find the Bank or the Banker.');
          LogOut;
        end;
      end;
    end;


    //Willows to Bank\\

    function WalkToMaple : Boolean;
    var
      WalkMDTM, X, Y: Integer;
    begin
      if (not (LoggedIn)) or (InvFull) then
        Exit;
      AntiRandoms;
      WalkMDTM := DTMFromString('78DA636C636260706400035608C5F0F4CD4B8' +
           '687409A1188FF03016326508D3B030AF8F74F984112AA060418EB' +
           '8850D34E849A22A01A6FFC6A0071791418');
      if (DTMRotated(WalkMDTM, X, Y, MMX1, MMY1, MMX2, MMY2)) then
      begin
        FreeDTM(WalkMDTM);
        Mouse(X, Y, 5, 5, True);
        FFlag(0);
        Result := True;
        Mouse(MMCX, MMCY - 10, 5, 5, True);
        FFlag(5);
      end
      else
      begin
        FreeDTM(WalkMDTM);
        WriteLn('Player failed to walk into the Maple Trees.');
        FindSymbolIn(X, Y, 'Tree', 595, 30, 665, 80);
        Mouse(X, Y, 5, 5, True);
        Result := True;
      end;
      Exit;
    end;
    //SetupScript\\

    procedure SetupScript;
    begin
      SRLId := YourSRLId;
      SRLPassword:= YourSRLPassword;
      SetupSRL;
      ScriptID:= '687';
      DeclarePlayers;
    end;

    //THE MAIN LOOPAGE!\\

    begin
      SetupScript;
      repeat
       WalkToMaple;
       ChopTree;
       AntiBan;
       WalkToBank;
       Banking;
       if (LoadsNum2=Loads) then
        begin
           NextPlayer(True);
           LoadsNum2 := 0;
           MakeCompass('S')
           Writeln('Players Switched successfully')
        end;
      until (false)
    end.



    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  2. #2
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Set tries to 0 after each succesful loop
    ~ Metagen

  3. #3
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default

    So just chnage all tries- to 0?
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  4. #4
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    nooo, every time you loop and dont findobj you set tries to tries +1 and then if tries = 20 then u logout... if it finds it succesffuly put tries back to 0 again
    ~ Metagen

  5. #5
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default

    erm i dont understand what i have to change!
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  6. #6
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    procedure ChopTree;
    var
      CuttingTime: Integer;
      Tries: Integer;
    begin
      MarkTime(CuttingTime);
      MakeCompass('S');
      repeat
        if FindObjTPA(X, Y, 2571369, 14, 2, 15, 30, 5, ['hop', 'aple']) then
        begin
           tries := 0; // <--- that
           MMouse(X, Y, 3, 3);
           Wait(150);
           if(IsUpText('aple'))then
           begin
             Mouse(X, Y, 3, 3, False);
             Wait(150 + Random(75));
             ChooseOption('hop')
             FFlag(0);
             AntiBan;
             X := MSCX;
             Y := MSCY;
             FindObjTPA(X, Y, 2571369, 14, 2, 15, 30, 5, ['hop', 'aple']);
             MMouse(X, Y, 3, 3);
             MarkTime(CuttingTime);
             repeat
               AntiBan;
               Wait(75 + Random(25));
               FindNormalRandoms;
               Wait(50 + Random(50));
               MMouse(X, Y, 3, 3);
             until (TimeFromMark(CuttingTime) > 400000+random(20000)) or not IsUpText('aple');
           end;
        end
        else
        begin
          Tries := Tries + 1;
          if (Tries >= 20) then
          begin
            LogOut;
            NextPlayer(False);
            Exit;
          end;
        end;
      until (InvFull) or not (LoggedIn)
    end;
    ~ Metagen

  7. #7
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default

    nope still logged out man!
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  8. #8
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    procedure ChopTree;
    var
    CuttingTime: Integer;
    Tries: Integer;
    begin
    MarkTime(CuttingTime);
    MakeCompass('S');
    repeat
    if FindObjTPA(X, Y, 2571369, 14, 2, 15, 30, 5, ['hop', 'aple']) then
    begin
    MMouse(X, Y, 3, 3);
    Wait(150);
    if(IsUpText('aple'))then
    begin
    Mouse(X, Y, 3, 3, False);
    Wait(150 + Random(75));
    ChooseOption('hop')
    FFlag(0);
    AntiBan;
    X := MSCX;
    Y := MSCY;
    FindObjTPA(X, Y, 2571369, 14, 2, 15, 30, 5, ['hop', 'aple']);
    MMouse(X, Y, 3, 3);
    MarkTime(CuttingTime);
    repeat
    AntiBan;
    Wait(75 + Random(25));
    FindNormalRandoms;
    Wait(50 + Random(50));
    MMouse(X, Y, 3, 3);
    until (TimeFromMark(CuttingTime) > 400000+random(20000)) or not IsUpText('aple');
    end;
    end;
    until (InvFull) or not (LoggedIn)
    end;

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

    Default

    change it to this
    SCAR Code:
    procedure ChopTree;
    var
      CuttingTime: Integer;
      Tries: Integer;
    begin
      MarkTime(CuttingTime);
      MakeCompass('S');
      repeat
        if FindObjTPA(X, Y, 2571369, 14, 2, 15, 30, 5, ['hop', 'aple']) then
        begin
           MMouse(X, Y, 3, 3);
           Wait(150);
           if(IsUpText('aple'))then
           begin
             Mouse(X, Y, 3, 3, False);
             Wait(150 + Random(75));
             ChooseOption('hop')
             FFlag(0);
             AntiBan;
             X := MSCX;
             Y := MSCY;
             FindObjTPA(X, Y, 2571369, 14, 2, 15, 30, 5, ['hop', 'aple']);
             MMouse(X, Y, 3, 3);
             MarkTime(CuttingTime);
             repeat
               AntiBan;
               Wait(75 + Random(25));
               FindNormalRandoms;
               Wait(50 + Random(50));
               MMouse(X, Y, 3, 3);
             until (TimeFromMark(CuttingTime) > 400000+random(20000)) or not IsUpText('aple');
           end;
        end
        else
        begin
          Tries := Tries + 1;
          if (Tries >= 20) then
          begin
            Writeln('Tried more than 20 times');
            LogOut;
            NextPlayer(False);
            Exit;
          end;
        end;
      until (InvFull) or not (LoggedIn)
    end;
    then if it is the last part that is messing up then it will say something

    ~shut

  10. #10
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default

    Lol 3 diff choices lol thats what i get when i hassle people thanks guys

    Problem is when i get full invo it just moves mouse slighty but rapidly over tree instead of banking!

    EDIT

    The script dosnt log in i have ro do it myself ? (it starts looking for trees een before it has logged in, have i missed login function lol?)
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  11. #11
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default

    Lol 3 diff choices lol thats what i get when i hassle people thanks guys

    Problem is when i get full invo it just moves mouse slighty but rapidly over tree instead of banking!
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  12. #12
    Join Date
    Jun 2008
    Posts
    0
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i did try it to and it log out...

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

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. AHHH!!! Script logs out!!!
    By Richard in forum OSR Help
    Replies: 6
    Last Post: 02-13-2008, 05:54 PM
  2. Replies: 11
    Last Post: 11-04-2007, 12:42 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
  •