Results 1 to 2 of 2

Thread: need help...getting error

  1. #1
    Join Date
    Dec 2008
    Location
    valrico fl
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default need help...getting error

    SCAR Code:
    {.Script Info:
    # ScriptName  = Ultimate Fletcher
    # Author      = Footballjds
    # Description = A Fletcher
    # Version     = 8.4
    # Date        =
    # Comments    = Fixed PC banking... :D
    /Script Info}

    program UltimateFletcher;
    //{.include srl/srl/misc/Smart.scar}
    {.include srl/srl.scar}
    {.include srl/srl/misc/Users.scar}
    {=========================================================================]
    [           NAME        : Ultimate Fletcher                               ]
    [           WRITER      : Footballjds                                     ]
    [           CATEGORY    : Fletching                                       ]
    [           DESCRIPTION : Fletches Longbows and banks em                  ]
    [           USAGE       : To Raise Your Fletching Level                   ]
    [           AUTOCOLOR   : Yes                                             ]
    [           CONTACT     : Post on t3h forumz or PM Footballjds2000 on AIM ]
    [=========================================================================]
    [                           Instructions.                                 ]
    [=========================================================================]
    [ 1. USE Runescape With Low Detail, Very Bright.                          ]
    [ 2. Set your Screen To 32 bit TRUE color.                                ]
    [ 3. Position Players In Bank                                             ]
    [ 4. Drag The Cross Hair Over Runescape, Hit Play, And Enjoy!             ]
    [=========================================================================}

    {Banks are:
    *******************************************************************************
    'akb' = Al Kharid | 'lb' = Lumbridge | 'veb' = Varrock East | 'vwb' = Varrock West
    'feb' = Falador East | 'fwb' = Falador West | 'db' = Draynor | 'eb' = Edgeville Bank
    'pc' = pest control
    *******************************************************************************}

    {Logs are: 'normal' | 'oak' | 'willow' | 'maple' | 'yew' | 'magic'}
    const
      UseSmart = False;  //Use Smart?
      MBX1     = 23;
      MBY1     = 45;
      MBX2     = 496;
      MBY2     = 293;
    var
      KnifeDTM, Log, bows, LogClr, x, y, Loads, Sleepy, LevelsGained, EXPFactor, Responded, rspnce,
      LRT, TimesSleepted, AntiBanned : integer;
      Doned : boolean;
      WhatBank, bow, logs : string;
      box : TBox;
      Errorses, Errorses2 : array of string;
    ////////////////////////////////////////////////////////////////////////////////
    //[]PLAYER SETUP[]\\
    procedure PlayerSetup;
    var LBU, SBU, MagicLog, normLogs : string;
    begin
      LBU := '78DA63EC676060E862400175E53A0CBF80342' +
             '310FF0702C63E4C3510591809A42712A1663A90984940CD342031' +
             '9D08353308A89949580D00AF0E0E34';
      SBU := '78DA637466626078C68002CA02F919C480342' +
             '310FF07024613A09A370C6880118904D2BE40353708A8F106AA79' +
             '4C408D1D50CD6B026A02806A6EE1570300E3880BF5';
      MagicLog := '78DA63CC67626078C6800292A32D181818C18' +
           '8E13F10302603D53C81C83143D5E8AC9EC7C0CF005103028C0940' +
           '35AF08A84905AA7947404D1550CD5B54353059981A0023841041';
      NormLogs := '78DA639CC9C4C0F088010514FAF2318832323' +
             '00011C37F2060EC06AA79CC800618914820DD0154F386809A5940' +
             '35EF08A8590254F38A809AC940351FF0AB0100D0AD0DF2'
      SRLPlayerForm(True, ['Use Sleeps', 'Use Responder', 'Longbows'],
        ['Loads', 'Sleep How Often[mins]', 'How Long To Sleep[mins]'],
        ['Which Bank', 'Bank Pin[if any]', 'Type Of Logs', 'SRL ID', 'SRL PASSWORD'], []);
      WhatBank := Lowercase(players[0].Strings[0]);
      case Lowercase(Players[0].Strings[2]) of
        'normal' : EXPFactor := 10;
        'oak'    : EXPFactor := 25;
        'willow' : EXPFactor := 41;
        'maple'  : EXPFactor := 58;
        'yew'    : EXPFactor := 75;
        'magic'  : EXPFactor := 91;
        else EXPFactor := 91;
      end;
      if EXPFactor = 91 then
      begin
        logs := MagicLog;
        if Players[0].Booleans[2] = false then
        begin
          bow := SBU;
          Box := IntToBox(106, 393, 197, 450);
        end else
        begin
          bow := LBU;
          Box := IntToBox(357, 392, 408, 444);
        end;
      end else
      begin
        logs := NormLogs;
        if EXPFactor = 10 then
        begin
          if (Players[0].Booleans[2] = false) then
          begin
            bow := SBU;
            Box := IntToBox(170, 382, 223, 442)
          end else
          begin
            bow := LBU;
            Box := IntToBox(298, 383, 339, 446);
          end;
        end else if Players[0].Booleans[2] then
        begin
          bow := LBU;
          Box := IntToBox(215, 384, 300, 441);
        end else
        begin
          bow := SBU;
          Box := IntToBox(55, 396, 146, 432);
        end;
      end;
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    procedure StatusReport(What, SecondWhat : string);
    begin
      Status(What + ' --- ' + SecondWhat + ' /been running for ' + TimeRunning + ' \');
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    procedure Setup;
    begin
      if (not(LoggedIn)) Then
        EXIT;
      StatusReport('Setting Up PlayerFor Autoing', 'Just Logged In, Waiting 4 seconds');
      wait(2000 + random(2000));
      GameTab(4);
      wait(189+random(90));
      SetAngle(True);
      MakeCompass('N');
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    procedure Error(what : string; fatel : boolean);
    begin
      SetArrayLength(Errorses2, GetArrayLength(Errorses2) + 1);
      CloseWindow;
      if fatel then
      begin
        SetArrayLength(Errorses2, GetArrayLength(Errorses2) - 1);
        SetArrayLength(Errorses, GetArrayLength(Errorses) + 1);
        Errorses[GetArrayLength(Errorses) - 1] := what + '| Fatel = True';
        Writeln('Logged in is: ' + BoolToStr(LoggedIn));
        Players[CurrentPlayer].Active := False;
        LogOut;
        MarkTime(Sleepy);
      end else Errorses2[GetArrayLength(Errorses2) - 1] := what + '| Fatel = False';
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    procedure MouseBox2(bx : TBox; n1 : integer);
    begin
      MouseBox(bx.x1, bx.y1, bx.x2, bx.y2, n1);
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    procedure LoadDTMS(WhichDTM : string);
    begin
      case WhichDTM of
        'knife' : KnifeDTM := DTMFromString('78DA632C676460F06540015585850C22401A2' +
                                '8C3F01F08184B812C3F0634C0884402E92A22D4E401595104D414' +
                                '11560300CA4A0963');
        'log' : Log := DTMFromString(Logs);
        'bow' : bows := DTMFromString(bow);
        'inv' : begin
                  Log := DTMFromString(Logs);
                  KnifeDTM := DTMFromString('78DA632C676460F06540015585850C22401A2' +
                                '8C3F01F08184B812C3F0634C0884402E92A22D4E401595104D414' +
                                '11560300CA4A0963');
                end;
      end;
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    procedure FreeDTMS(WhichDTM : string);
    begin
      case WhichDTM of
        'knife' : FreeDTM(knifeDTM);
        'log' : FreeDTM(log);
        'bows' : FreeDTM(bows);
        'inv' : begin
                  FreeDTM(log);
                  FreeDTM(knifeDTM);
                end;
      end;
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    function ItemCoordsDtm(area: string; dtm: Integer): TPointArray;
    var
      startx, starty, rowsize, colsize, colnumber, rownumber, col, row: Integer;
      x1, y1, x2, y2: Integer;
      itemx, itemy: Integer;
      i: Integer;
    begin
      SetArrayLength(Result, 0);
      if (CheckArea(area)) then
      begin
        AreaInfo(area, startx, starty, rowsize, colsize, colnumber, rownumber);
        for row := 0 to rownumber - 1 do
          for col := 0 to colnumber - 1 do
          begin
            x1 := startx + col * colsize;
            y1 := starty + row * rowsize;
            x2 := x1 + colsize;
            y2 := y1 + rowsize;
            if (FindDTM(dtm, itemx, itemy, x1, y1, x2, y2)) then
            begin
              i := GetArrayLength(Result);
              SetArrayLength(Result, i + 1);
              Result[i].x := x1;
              Result[i].y := y1;
            end;
          end;
      end;
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    function AmountDtm(area: string; dtm: Integer): Integer;
    //counts stacks
    var
      coords: TPointArray;
      i: Integer;
    begin
      Result := 0;
      coords := ItemCoordsDtm(area, dtm);
      for i := 0 to GetArrayLength(coords) - 1 do
        Result := Result + GetAmount(coords[i].x, coords[i].y);
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    function CountItemsDtm(area: string; dtm: Integer): Integer;
    var
      coords: TPointArray;
    begin
      coords := ItemCoordsDtm(area, dtm);
      Result := GetArrayLength(coords);
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    function CountDTM(Area, WhatDTM : string; Stack, LoadThem : boolean) : integer;
    var
      DTM : integer;
    begin
      if LoadThem then LoadDTMS(WhatDTM);
      case WhatDTM of
        'knife' : DTM := knifeDTM;
        'log' : DTM := log;
        'bow' : DTM := bows;
      end;
      if Stack then Result := AmountDTM(Area, DTM)
      else Result := CountItemsDtm(Area, DTM);
      if LoadThem then FreeDTMS(WhatDTM);
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    function ColorDTM(DTMd : string; var color : integer) : boolean;
    var
      DTM : integer;
    begin
      case DTMd of
        'bow' : DTM := bows;
        'log' : DTM := log;
      end;
      if not(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2)) then EXIT;
      color := GetColor(x, y);
      Result := True;
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    function ItemCoordsColor(area: string; color, tol: Integer): TPointArray;
    var
      startx, starty, rowsize, colsize, colnumber, rownumber, col, row: Integer;
      x1, y1, x2, y2: Integer;
      itemx, itemy: Integer;
      i: Integer;
    begin
      SetArrayLength(Result, 0);
      if (CheckArea(area)) then
      begin
        AreaInfo(area, startx, starty, rowsize, colsize, colnumber, rownumber);
        for row := 0 to rownumber - 1 do
          for col := 0 to colnumber - 1 do
          begin
            x1 := startx + col * colsize;
            y1 := starty + row * rowsize;
            x2 := x1 + colsize;
            y2 := y1 + rowsize;
            if (FindColorTolerance(itemx, itemy, color, x1, y1, x2, y2, tol)) then
            begin
              i := GetArrayLength(Result);
              SetArrayLength(Result, i + 1);
              Result[i].x := x1;
              Result[i].y := y1;
            end;
          end;
      end;
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    function CountItemsColor(area: string; color, tol: Integer): Integer;
    var
      coords: TPointArray;
    begin
      coords := ItemCoordsColor(area, color, tol);
      Result := GetArrayLength(coords);
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    function IsOption(txt: string): Boolean;
    var
      x1, y1, x2, y2, LeftCorner, RightCorner, x, y: Integer;
    begin
      Result := False;
      LeftCorner := BitmapFromString(4, 4, 'z78DA33753135313137C5' +
        '411A600064715CEA914500CACE13F0');
      RightCorner := BitmapFromString(4, 4, 'z78DA33753135313137' +
        'C5200D30002E35F8C501C9C013F0');
      if (FindBitmap(LeftCorner, x1, y1)) and (FindBitmap(RightCorner, x2, y2)) then
      begin
        FreeBitmap(LeftCorner);
        FreeBitmap(RightCorner);
        if (FindText(x, y, txt, upchars, x1, y1, x2, 502)) then
        begin
          Result := True;
        end
        else
         begin
             MMouse(x1 - 50, y1 - 50, 40, y2-y1);
             Wait(200 + Random(100));
         end;
      end;
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    function ClickItem(Item, OffSetX, OfSetY : integer; left, WaitColor : boolean) : boolean;
    var
      TB: TBox;
      i : integer;
    begin
      if not(ExistsItem(Item)) then
      begin
        Writeln('Error, There is nothing in inventory slot ' + IntToStr(Item));
        EXIT;
      end;
      GetInvItemBounds(Item, TB);
      for I := 0 to 5 do
      begin
        if WaitColor and FindColor(x, y, 16777215, MIX1, MIY1, MIX2, MIY2) then break;
        Mouse((TB.x1 + TB.x2)/2, (TB.y1 + TB.y2)/2, OffSetX, OfSetY, left);
        Wait(75 + random(20));
        if not(WaitColor) then break;
      end;
      Result := (I <= 4);
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    function UseItemWithItem2(Item1, Item2 : integer; left : boolean) : boolean;
    var
      I : integer;
    begin
      Result := False;
      I := 0;
      if (CountDTM('Inv', 'bow', false, True) = 27) or
        (CountDTM('Inv', 'log', false, True) = 0) then
      begin
        Doned := True;
        EXIT;
      end;
      if left then ClickItem(Item1, 7, 7, True, True)else
      begin
        ClickItem(Item1, 7, 7, False, True);
        while not(ChooseOption('se')) and not(I >=400) do
        begin
          wait(55 + random(23));
          inc(I);
        end;
        if I >= 400 then EXIT;
        I := 0;
      end;
      wait(224 + random(242));
      if left then
      begin
        Result := ClickItem(Item2, 5, 5, True, False);
      end else
      begin
        ClickItem(Item2, 7, 7, False, False);
        while not(ChooseOption('se')) and not(I >=400) do
        begin
          wait(55 + random(23));
          inc(I);
        end;
        Result := (I < 400);
      end;
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    function FindPcBank : TPointArray;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL, tempx, tempy: Integer;
      Xxx, Yyy, Zzz: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.26, 0.81);

      FindColorsSpiralTolerance(MSCX, MSCY, arP, 11779529, MSX1, MSY1, MSX2, MSY2, 3);
      if (Length(arP) = 0) then
      begin
        Writeln('Failed to find the color, no result.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;
      arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);
      for i := 0 to arL do
      begin
        ColorToXYZ(arC[i], Xxx, Yyy, Zzz);
        if (Xxx >= 47.06) and (Xxx <= 53.92) and (Yyy >= 48.51) and (Yyy <= 55.78) and (Zzz >= 46.90) and (Zzz <= 53.28) then
        begin
          FindColorsSpiralTolerance(tempx, tempy, result, arC[i], msx1, msy1, msx2, msy2, 0);
        end;
      end;
      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);
    end;
    ////////////////////////////////////////////////////////////////////////////////


    ////////////////////////////////////////////////////////////////////////////////
    function OpenPCBank : boolean;
    var
      x, y, i : integer;
      BankPnts: TPointArray;
    begin
      MakeCompass('n');
      BankPnts := FindPcBank;
      For i := 0 to high(bankPnts) do
      begin
        MMouse(bankPnts[i].x, bankPnts[i].y, 3, 3);
        wait(600 + random(400));
        if IsUpTextMultiCustom(['ank', 'ooth']) then
        begin
          getMousePos(x, y);
          Mouse(x, y, 0, 0, false);
          wait(600 + random(600));
          if ChooseOption('uick') then
          begin
            wait(600);
            FFlag(0);
            break;
          end;
        end;
      end;
      Result := BankScreen;
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    function OpenUpBank : boolean;
    Var
      Tries : Integer;
    begin
      Result := False;
      if not (LoggedIn) then Error('Not Logged In When Opening Bank', true);
      if (FindNormalRandoms) then SRLRandomsReport;
      StatusReport('Opening The Bank:' , WhatBank);
      repeat
        if LowerCase(WhatBank) = 'pc' then OpenPCBank
          else OpenBankFast(WhatBank);
        wait(250 + random(140));
        if BankScreen or PinScreen then break;
        Tries := Tries + 1;
        FindNormalRandoms;
      until (Tries >= 5);
      If Tries > 4 Then
      begin
        Error('Opening ' + WhatBank + ' Bank Error', True);
        EXIT;
      end;
      Tries := 0;
      if PinScreen Then
        InPin(Players[CurrentPlayer].Strings[1]);
      FixBank;
      Result := BankScreen;
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    function WithdrawFromBank : boolean;
    var
      Waited, TempX, TempY : integer;
    begin
      Result := False;
      if not(BankScreen) then if not OpenUpBank then
      begin
        Error('Bank Screen Not Open.', False);
        EXIT;
      end;
      StatusReport('Banking' , 'Starting load ' + IntToStr(Loads + 1));
      wait(200+random(50));
      Deposit(2, 28, true);
      LoadDTMS('log');
      if not(FindDTM(log, TempX, TempY, MBX1, MBY1, MBX2, MBY2)) then
      begin
        Error('No Logs Found In Bank!', True);
        EXIT;
      end;
      FreeDTMS('log');
      Mouse(TempX, TempY, 10, 10, False);
      GetMousePos(x, y);
      wait(223 + random(145));
      if not(IsOption('ogs')) then
      begin
        repeat
          Mouse(x, y, 2, 2, False);
          wait(240 + random(200));
          if(IsOption('ogs')) and ChooseOption('All') then BREAK;
          inc(Waited);
        until(Waited >= 5);
        if Waited >= 5 then
        begin
          Error('Error, Withdrawing From Bank', False);
          EXIT;
        end;
      end else ChooseOption('All');
      Waited := 0;
      wait(150+random(76));
      for Waited := 0 to 11 do
      begin
        if BankScreen then CloseBank else BREAK;
        wait(124 + random(123));
      end;
      result := True;
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    function FletchThem(RRange1, RRange2 : integer) : boolean;
    var
      Tries, Item, I : integer;
    begin
      Result := False;
      StatusReport('Fletching load', IntToStr(loads + 1));
      GameTab(4);
      LoadDTMS('log');
      repeat
        wait(50+random(50));
        inc(Tries);
        if (CountDTM('Inv', 'bow', False, True) = 27) then
        begin
          Result := True;
          EXIT;
        end;
      until FindDTM(log, x, y, MIX1, MIY1, MIX2, MIY2) or (Tries >= 300);
      if (Tries >= 300) then
      begin
        FreeDTMS('log');
        Error('No Logs Found In Inventory', False);
        EXIT;
      end;
      ColorDTM('log', LogClr);
      FreeDTMS('log');
      for I := 0 to 2 do
      begin
        if FindColor(x, y, 128, 159, 369, 159, 369) then break;
        Item := RandomRange(RRange1, RRange2);
        if random(20) > 1 then UseItemWithItem2(1, Item, True) else
          UseItemWithItem2(1, Item, False);
        wait(65+random(34));
        if doned then
        begin
          Result := True;
          EXIT;
        end;
        repeat
          wait(50 + random(50));
          Tries := Tries + 1;
        until(FindColor(x, y, 128, 159, 369, 159, 369)) Or (Tries >= 400);
        if not(Tries >= 400) then
        begin
          I := 0;
          break;
        end;
      end;
      if (I >= 2) then
      begin
        Error('Error While Waiting For Fletch Bows Option', False);
        EXIT;
      end;
      MouseBox2(box, 2);
      wait(200+random(100));
      if not ChooseOption('X') then EXIT;
      repeat
        wait(20+random(30));
        inc(I);
      until FindColor (x, y, 8388608, 259, 429, 259, 429) or (I >= 400);
      if I >= 400 then
      begin
        Error('Error While Waiting To Type In X Amount', False);
        EXIT;
      end;
      wait(random(200));
      TypeSend(IntToStr(RandomRange(100, 1001)));
      wait(250+random(600));
      Result := not(FindColor(x, y, 8388608, 233, 424, 284, 435));
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    function LogoutSleepLogin(SleepTimeInMin : integer): boolean;
    var
      RandSleepTime : integer;
    begin
      Result := False;
      RandSleepTime := random(60000);
      if (Logout) then
      begin
        StatusReport('Sleeping...', 'ZZZZZZzzz.....');
        Writeln('Logged Out');
        Writeln('Waiting: ' + (IntToStr(SleepTimeInMin)) + 'Minutes Plus Random: ' + (IntToStr(RandSleepTime)) + ' mills');
        wait(60000 * SleepTimeInMin + RandSleepTime);
        LogInPlayer;
        Result := LoggedIn;
        if result then inc(TimesSleepted);
      end else
      begin
        Writeln('Error Occured While Logging Out, Script Terminated');
        TerminateScript;
      end;
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    procedure LevelRespond;
    var
      Chats : TStringArray;
      I, L: Integer;
    begin
      if not (Players[CurrentPlayer].Booleans[1]) then EXIT;
      Chats := ['tching l', 'hing lv', 'hing le', 'tchin lvl', 'etch lv'];
      for I := 0 to 4 do
      begin
        if InChat(Chats[i]) then
        begin
          inc(Responded);
          L := GetSkillInfo('fletching', False);
          case Random(9) of
            0: TypeSend(IntToStr(L));
            1: TypeSend('Me '+IntToStr(L));
            2: TypeSend(IntToStr(L) + ' here');
            3: TypeSend('...'+IntToStr(L));
            4: TypeSend('Im ' + IntToStr(L));
            5: TypeSend('only ' + IntToStr(L));
            6: TypeSend('Pfft, only ' + IntToStr(L));
            7: begin
                 TypeSend('onky ' + IntToStr(L));
                 TypeSend('only*');
               end;
            8: TypeSend('My Fletching is only ' + IntToStr(L) + ' ...lol');
          end;
          wait(1000 + Random(500));
          Exit;
        end;
      end;
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    procedure Responds;
    Var
      Chats, Responce : TStringArray;
      I : Integer;
    begin
      if not (Players[CurrentPlayer].Booleans[1]) then EXIT;
      Chats := ['respond', 'hi', 'auto'];
      Responce := ['why, "Hello there", :p', 'hello loser :D', 'gah, shut up?'];
      for I := 0 to 2 do
      begin
        if InChat(Chats[i]) then
        begin
          inc(Responded);
          case Random(4) of
            0: TypeSend('hi?');
            1: TypeSend('OK...');
            2: TypeSend('yes...?');
            3: begin
                 TypeSend(Responce[rspnce]);
                 inc(rspnce);
               end;
          end;
          wait(1000 + Random(500));
          Exit;
        end;
      end;
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    procedure AntiBanRandom;
    begin
      inc(AntiBanned)
      case random(700) of
        1, 2, 3: begin
                   KeyDown(VK_Down);
                   Wait(random(1000));
                   KeyUp(VK_Down);
                   KeyDown(VK_Up);
                   Wait(500 + random(1000));
                   KeyUp(VK_Up);
                   MakeCompass('n');
                 end;
        5, 6, 7: begin
                   KeyDown(VK_Left);
                   Wait(random(1000));
                   KeyUp(VK_Left);
                   KeyDown(VK_Right);
                   Wait(random(1000));
                   KeyUp(VK_Right);
                   MakeCompass('n');
                 end;
        9, 10, 11: begin
                     KeyDown(VK_Left);
                     Wait(random(1000));
                     KeyUp(VK_Left);
                     KeyDown(VK_Right);
                     Wait(random(1000));
                     KeyUp(VK_Right);
                     MakeCompass('n');
                   end;
        13, 14, 15: begin
                      KeyDown(VK_Up);
                      KeyDown(VK_Left);
                      Wait(random(1000));
                      KeyUp(VK_Up);
                      Wait(random(800));
                      KeyUp(VK_Left);
                      MakeCompass('n');
                    end;
        17: HoverSkill('random', False);
        19, 20, 21, 22: PickUpMouse;
        26: BoredHuman;
        28, 29, 30, 31: HoverSkill('fletching', False);
        else AntiBanned := AntiBanned - 1;
      end;
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    procedure ProgressReport(clear : boolean);
    Begin
      if clear then ClearDebug;
      Writeln('==========================================');
      Writeln('=§  Ultimate Fletcher By:  FootBalljds  Â§=');
      Writeln('==========================================');
      Writeln('Been Fletching For: ' + TimeRunning);
      Writeln('Gained ' + IntToStr(Loads*27*EXPFactor) + ' Exp');
      Writeln('Fletched ' + IntToStr(Loads*27) + ' ' + Players[0].Strings[2] + ' Longbows(u)');
      Writeln('Did ' + IntToStr(Loads) + ' Loads');
      if AntiBanned > 0 then
        Writeln('Performed Anti Ban ' + IntToStr(AntiBanned) + ' Times');
      if (LevelsGained > 0) then
        Writeln('Gained ' + IntToStr(LevelsGained) + ' Levels');
      if (Responded > 0 ) then
        Writeln('Responded ' + IntToStr(Responded) + ' Times');
      if (TimesSleepted > 0) then
        Writeln('Slepted ' + IntToStr(TimesSleepted) + ' Times');
      Writeln('==========================================');
      If LRT >= 301000 Then
      Begin
        SendSRLReport;
        MarkTime(LRT);
      end;
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    function WaitWhileFletching : boolean;
    var
      LastTime, utoh : integer;
      ToLong : boolean;
    begin
      repeat
        LastTime := CountItemsColor('Inv', LogClr, 0);;
        StatusReport('Fletching load ' + intToStr(loads + 1) , IntToStr(LastTime) + ' Left To Fletch');
        wait(800 + Random(250));
        AntiBanRandom;
        LevelRespond;
        Responds;
        if not(LastTime > CountItemsColor('Inv', LogClr, 0)) then Inc(utoh)
        else utoh := 0;
        if utoh >= 4 then ToLong := True;
        if ToLong then
        begin
          ToLong := False;
          utoh := 0;
          if FindNpcChatText('letching', nothing) then
          begin
            inc(LevelsGained);
            ClickToContinue;
            wait(200+random(100));
            clickToContinue;
          end;
          FletchThem(28, 29);
        end;
        if FindFight then
        begin
          StatusReport('Found Fight' , 'Runing North From it!');
          RunAway('N', True, 1, 5000);
          SRLRandomsReport;
          wait(200+random(100));
          FletchThem(28, 29);
        end;
        if FindNormalRandoms then
        begin
          SRLRandomsReport;
          wait(200+random(100));
          FletchThem(28, 29);
        end;
      until (CountItemsColor('Inv', LogClr, 0) = 0) or (not(LoggedIn));
      if (not(LoggedIn)) then
      begin
        LoginPlayer;
        If FindSymbol(x, y, 'Bank') then else Error('Logged Out While Fletching?', True);
      end;
      Loads := Loads + 1;
      StatusReport('Just Completed Load' , IntToStr(Loads));
      ReportVars[0] := ReportVars[0] + 27;
      ReportVars[1] := ReportVars[1] + (EXPFactor * 27);
      ProgressReport(True);
      if (TimeFromMark(Sleepy) >= (Players[CurrentPlayer].Integers[1] * 60000 + Random(60000))) and (not(Loads >= Players[CurrentPlayer].Integers[0]))
        and Players[CurrentPlayer].Booleans[0] then
      begin
        LogoutSleepLogin(Players[CurrentPlayer].Integers[2]);
        MarkTime(Sleepy);
      end;
      Result := True;
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    procedure ScriptTerminate;
    var
      I : integer;
    begin
      SendSRLReport;
      ProgressReport(False);
      if GetArrayLength(Errorses) > 0 then
      begin
        for I := 0 to GetArrayLength(Errorses) - 1  do
          Writeln('Error ' + IntToStr(i + 1) + ' |' + Errorses[i]);
        Writeln('Please Report The Above ERrors :D');
      end;
      if GetArrayLength(Errorses2) > 0 then
      begin
        for I := 0 to GetArrayLength(Errorses2) - 1 do
          AddToReport('Error ' + IntToStr(i) + ' |' + Errorses2[i]);
      end;
    end;
    ////////////////////////////////////////////////////////////////////////////////


    ////////////////////////////////////////////////////////////////////////////////
    procedure MainLoop;
    begin
      if PlayersActive = 0 then TERMINATESCRIPT;
      if not LoggedIn then
      begin
        Writeln('Player started logged out, attempting to log in.');
        LoginPlayer;
        if (GetColor(212, 327) = 238301) then    //At Click To Play screen
        begin
          Wait(400 + Random(400));
          MouseBox(227, 337, 555, 364, 1);
          Wait(400 + Random(400));
        end;
        Wait(100);
        if not LoggedIn then TERMINATESCRIPT;
        Setup;
      end;
      Setup;
      repeat
        MouseSpeed := 16 + random(3) - Random(2);
        if (not(LoggedIn)) or (Players[CurrentPlayer].Active = false) then
        begin
          CurrentPlayer := 0;
          Players[CurrentPlayer].Active := False;
          while Players[CurrentPlayer].Active = False do
          begin
            CurrentPlayer := CurrentPlayer + 1;
            if CurrentPlayer > HowManyPlayers - 1 then
            begin
              Writeln('No More Active Players');
              Writeln('Terminating');
              TerminateScript;
            end;
          end;
          LoginPlayer;
          Setup;
        end;
        if (OpenUpBank) then
        begin
          wait(100+random(50));
          if (WithdrawFromBank) then
          begin
            wait(100+random(50));
            if FletchThem(15, 29) then WaitWhileFletching;
          end;
        end;
      until (Loads >= Players[CurrentPlayer].Integers[0]);
      Writeln('Finished All The Loads For Player' + IntToStr(CurrentPlayer));
      If LoggedIn Then
      begin
        LogOut;
      end;
      Players[CurrentPlayer].Active := False;
    end;
    ////////////////////////////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////////////////////////
    procedure SmartySetup;
    begin
      {if not UseSmart then EXIT;
      SmartSetupEx(90, true, true, false);
      wait(10000);
      SetTargetDC(SmartGetDC);
      repeat
        wait(100);
      until(SmartGetColor(253, 233)<>1118604);}

    end;
    ////////////////////////////////////////////////////////////////////////////////

    begin
      SetupSRL;
      SmartySetup;
      PlayerSetup;
      ScriptID := '616';
      SRLID := Players[0].Strings[3];
      SRLPassword := Players[0].Strings[4];                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if (SRLID = '') or (SRLPassword = '') then begin SRLID := '3546'; SRLPassword := 'NXXtVWa8v9'; end;
      wait(300+random(400));
      ActivateClient;
      wait(600+random(400));
      MarkTime(Sleepy);
      MarkTime(LRT);
      while(true) do MainLoop;
    end.





    i did not make this script. this is Footballjds script.
    when i play the script i get this error.


    Failed when compiling
    Line 46: [Error] (258:11): Unknown identifier 'CreateTPAFromBMP' in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/Math.scar

  2. #2
    Join Date
    Dec 2007
    Location
    Wizzup?'s boat
    Posts
    1,013
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    the script has no DeclarePlayers procedure

    its trying to log in the player, but has no info to do it
    Project: Welcome To Rainbow

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Line 135: [Error] (14845:1): Syntax error in script
    By AbsTrACt'^.| in forum OSR Help
    Replies: 16
    Last Post: 05-23-2008, 01:14 PM
  2. Replies: 5
    Last Post: 02-26-2008, 04:14 PM
  3. Smart error and Some kind of Math.scar error
    By FagetHax0r in forum OSR Help
    Replies: 6
    Last Post: 02-24-2008, 10:43 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
  •