Help Getting Errors With Script!

Discussion in 'Archives' started by Sithling, May 27, 2007.

Help Getting Errors With Script!
  1. Unread #1 - May 27, 2007 at 8:03 AM
  2. Sithling
    Joined:
    Jan 23, 2007
    Posts:
    419
    Referrals:
    1
    Sythe Gold:
    0

    Sithling Forum Addict
    Banned

    Help Getting Errors With Script!

    Im using Draynor Oak Banker Final and im getting an error

    Code:
    {   CHARMZ AUTO RESPONDER IS IN HERE (GoF's Edit) ...  NOT mine.
                ----------------------------------------------------
                                    Instructions
                       1. Fill out DeclarePlayers lines 40 +
                       2. Make sure your player is in Draynor
                          bank and that you have Vbright setting
                          on.
                       3. Make sure you have axe wielded or in 1st
                          inventory spot.
                -----------------------------------------------------
    This script will chop oaks in Draynor and bank them.
    
    
    Note : If it doesn't walk to bank or trees... get the number.
           'Found #3' is an example.
    }
    Program DraynorOakBanker;
    {.include SRL\SRL.SCAR}
    {.include SRL\SRL\Skill\Woodcutting.SCAR}
    {.include SRL\SRL\Extended\XBank.SCAR}
    
    Var
      LoadNumber : Integer;
      LogDTM, BrokenAxeDTM, AxeHandleDTM, RegularAxeDTM, CloserTo, WalkToBit, WalkToBit3 : Integer;
      StartXP, EndXP, TotalXP, ExactTree, TotalLogs, BankTrips, WalkBank, WalkToBit2 : Integer;
      frmDesign : TForm;
      Label1 : TLabel;
      Label2 : TLabel;
      Label3 : TLabel;
      Edit1 : TEdit;
      Edit2 : TEdit;
      Edit3 : TEdit;
      Button1 : TButton;
      TheTreeName : String;
      AmmountOfLoads, FResponds : Integer;
      TreeColor   : Integer;
      LX, LY, BankedLoggs : Integer;
    
    //->Declare Players<-//
    Procedure DeclarePlayers;
    begin
      Status('Loading Players')
    
      HowManyPlayers  := 4;
      NumberOfPlayers( HowManyPlayers );
      CurrentPlayer := 0;
    
         Players[0].Name      := 'Username';
         Players[0].Pass      := 'Password';
         Players[0].Nick      := 'Nickname'; // 2-4 letters of username
         Players[0].Active    := True;
    
         Players[1].Name      := 'Username';
         Players[1].Pass      := 'Password';
         Players[1].Nick      := 'Nickname'; // 2-4 letters of username
         Players[1].Active    := True;
    
         Players[2].Name      := 'Username';
         Players[2].Pass      := 'Password';
         Players[2].Nick      := 'Nickname'; // 2-4 letters of username
         Players[2].Active    := True;
    
         Players[3].Name      := 'Username';
         Players[3].Pass      := 'Password';
         Players[3].Nick      := 'Nickname'; // 2-4 letters of username
         Players[3].Active    := True;
    end;
    
    Const
      AutoResp   = True;
      WantedL    = 3; // Loads you want to do? (Random Loads are added.)
    //-----------------------\\
      VersionNum = '1.2 Final';
    
    procedure SafeInitForm;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('InitForm', v);
    end;
    
    procedure ShowFormModal;
    begin
      frmDesign.ShowModal;
    end;
    
    procedure SafeShowFormModal;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('ShowFormModal', v);
    end;
    
    Procedure InitForm;
    Begin
    Status('Form Is Up')
    frmDesign := CreateForm;
    frmDesign.Left := 306;
    frmDesign.Top := 367;
    frmDesign.Width := 428;
    frmDesign.Height := 207;
    frmDesign.Caption := 'Setup';
    frmDesign.Color := clBtnFace;
    frmDesign.Font.Color := clWindowText;
    frmDesign.Font.Height := -11;
    frmDesign.Font.Name := 'MS Sans Serif';
    frmDesign.Font.Style := [];
    frmDesign.Visible := False;;
    frmDesign.PixelsPerInch := 96;
    Label1 := TLabel.Create(frmDesign);
    Label1.Parent := frmDesign;
    Label1.Left := 3;
    Label1.Top := 20;
    Label1.Width := 258;
    Label1.Height := 20;
    Label1.Caption := 'Loads For Player Before Logging Off';
    Label1.Font.Color := clWindowText;
    Label1.Font.Height := -17;
    Label1.Font.Name := 'MS Sans Serif';
    Label1.Font.Style := [];
    Label1.ParentFont := False;
    Label2 := TLabel.Create(frmDesign);
    Label2.Parent := frmDesign;
    Label2.Left := 3;
    Label2.Top := 50;
    Label2.Width := 78;
    Label2.Height := 20;
    Label2.Caption := 'Tree Name';
    Label2.Font.Color := clWindowText;
    Label2.Font.Height := -17;
    Label2.Font.Name := 'MS Sans Serif';
    Label2.Font.Style := [];
    Label2.ParentFont := False;
    Label3 := TLabel.Create(frmDesign);
    Label3.Parent := frmDesign;
    Label3.Left := 3;
    Label3.Top := 80;
    Label3.Width := 73;
    Label3.Height := 20;
    Label3.Caption := 'Tree Color';
    Label3.Font.Color := clWindowText;
    Label3.Font.Height := -17;
    Label3.Font.Name := 'MS Sans Serif';
    Label3.Font.Style := [];
    Label3.ParentFont := False;
    Edit1 := TEdit.Create(frmDesign);
    Edit1.Parent := frmDesign;
    Edit1.Left := 269;
    Edit1.Top := 20;
    Edit1.Width := 24;
    Edit1.Height := 21;
    Edit1.TabOrder := 8;
    Edit1.Text := IntToStr(WantedL);
    Edit2 := TEdit.Create(frmDesign);
    Edit2.Parent := frmDesign;
    Edit2.Left := 87;
    Edit2.Top := 50;
    Edit2.Width := 58;
    Edit2.Height := 21;
    Edit2.TabOrder := 9;
    Edit2.Text := 'Oak';
    Edit3 := TEdit.Create(frmDesign);
    Edit3.Parent := frmDesign;
    Edit3.Left := 87;
    Edit3.Top := 79;
    Edit3.Width := 69;
    Edit3.Height := 21;
    Edit3.TabOrder := 10;
    Edit3.Text := '876624';
    Button1 := TButton.Create(frmDesign);
    Button1.Parent := frmDesign;
    Button1.Left := 172;
    Button1.Top := 133;
    Button1.Width := 75;
    Button1.Height := 25;
    Button1.Caption := 'OK GO';
    Button1.ModalResult := 1;
    Button1.TabOrder := 11;
    end;
    
    Procedure Convert2;
    Begin
    TheTreeName    := Edit2.text
    AmmountOfLoads := StrToInt(Edit1.text)
    TreeColor      := StrToInt(Edit3.text)
    end;
    
    
    //->Load Dtm's<-//
    Procedure LoadDTMs;
    
    begin
      Status('Loading DTM''s')
    
      LogDTM := DTMFromString('78DA632C666260E0646440067921460CFF813' +
           '448F43F103066314179C880118904D2354035FF19F0AB2905AA11' +
           '22604E23500D0F0135C94035DCF8D50000507909F5');
    
      BrokenAxeDTM := DTMFromString('78DA633CCAC4C090C1C8800C9A127919FE036' +
           '990E87F2060BC0C54938CAA06220B2381F445A09A04026A8E01D5' +
           'C41050B31FA8A698809AB384CD0100CBBD0D20');
    
      AxeHandleDTM := DTMFromString('78DA637CCFC4C0E0C6C8800CCA227819FE036' +
           '990E87F2060FC06546389AA06220B2381F473A09A00026ADE00D5' +
           'F81350F316A8C685809A97403541F8D50000D0090D3C');
    
      RegularAxeDTM := DTMFromString('78DA637461626060676440060DF1BC0CFF813' +
           '448F43F10300601D5FC6740038C482490F604AAF94D408D13500D' +
           '2B237E35F640358204D4F813618E1F50CD1F02EE0906AA61C26F0' +
           'E0099720B7E');
    
      WalkToBit  := DTMFromString('78DA638C676260506740012A0CEC0C5C409A1' +
           '188FF030123488D1AAA9A2C3B690611A81A10608CC13407434D22' +
           '116AE2806A34F0AB01006D340A3E');
           
      WalkToBit2 := DTMFromString('78DA636464666098CC80024C1938195280342' +
           '310FF0702C67F4C186AE2D5381934A06A4080919999B01A06A09A' +
           '4944A899825F0D0030C20B70');
    
      WalkToBit3 := DTMFromString('78DA636C626260306040010ECCEC0C1C409A1' +
           '188FF0301633DA69A440B760611A81A10606C25420DC82E4322D4' +
           'E8E3570300B6030AAD');
    
      WalkBank   := DTMFromString('78DA63DCC6C4C0A0C980027881425C409A118' +
           '8FF030123488D1AAA9A78356E0639A81A1000ABD126A0663BA65D' +
           '186AB612560300E9920B3C');
           
      CloserTo  := DTMFromString('78DA6364606660D8CC800292A2A3C1342394C' +
           'F0852B30D55CD9F3F4CA86AFE03F9BB08A80199B30EBF1A00F5B3' +
           '0AEA');
    
      ExactTree  := DTMFromString('78DA63EC63626088604001828E0C0C5C409A1' +
           '188FF03016313A61AA91046B81A10606C03AA71C5AF06001F4407' +
           'E2');
    end;
    
    //->Walk Back To Trees<-//
    Var
      CC, YY : Integer;
    Procedure WalkBackTree;
    Begin
      MakeCompass('N')
      If FindDtm(WalkToBit3, CC, YY, MMX1, MMY1, MMX2, MMY2) then
      Begin
        WriteLn('Found # 3')
        Mouse(CC + 46, YY + 44, 0, 0, True)
        flag;
      end else
      If FindDtm(WalkToBit, CC, YY, MMX1, MMY1, MMX2, MMY2) then
      Begin
        WriteLn('Found # 1')
        Mouse(CC + 46, YY + 44, 0, 0, True)
        flag;
      end else
      If FindDtm(WalkToBit2, CC, YY, MMX1, MMY1, MMX2, MMY2) then
      Begin
        WriteLn('Found # 2')
        Mouse(CC + 46, YY + 44, 0, 0, True)
        flag;
      end else
      Begin
        WriteLn('Could not find anything to locate tree area.')
        LogOut;
        Wait(60000 + Random (60000))
        NextPlayer(False)
        Exit;
      end;
      MakeCompass('S')
      Wait(10)
      MakeCompass('N')
      If FindDtm(ExactTree, CC, YY, MMX1, MMY1, MMX2, MMY2) then
      Begin
        WriteLn('Found the exact tree.')
        Mouse(CC - 3, YY + 3, 0, 0, True)
        flag;
      end else
      WriteLn('Couldn''t find exact tree.')
    end;
    
    //->Walk To Bank<-//
    
    Procedure WalkToBank;
    Var
      CCX, YYY : Integer;
    Begin
      MakeCompass('N')
      If FindSymbol(CCX, YYY, 'Bank') then
      Begin
        WriteLn('Found Bank Symbol.')
        Mouse(CCX, YYY, 4, 4, True)
        flag;
      end else
      If FindDtm(WalkToBit3, CCX, YYY, MMX1, MMY1, MMX2, MMY2) then
      Begin
        WriteLn('Found # 3')
        Mouse(CCX + 2, YYY + 40, 0, 0, True)
        flag;
      end else
      If FindDtm(WalkToBit, CCX, YYY, MMX1, MMY1, MMX2, MMY2) then
      Begin
        WriteLn('Found # 1')
        Mouse(CCX + 2, YYY + 40, 0, 0, True)
        flag;
      end else
      If FindDtm(WalkToBit2, CCX, YYY, MMX1, MMY1, MMX2, MMY2) then
      Begin
        WriteLn('Found # 2')
        Mouse(CCX + 2, YYY + 40, 0, 0, True)
        flag;
      end else
      Begin
        WriteLn('Could not find anything to locate the bank.')
        LogOut;
        Wait(60000 + Random (60000))
        NextPlayer(False)
        Exit;
      end;
    end;
    
    //->In Lumby?<-//
    Procedure InLumby;
    Begin
      If FindSymbol(x, y, 'Tutorial') or
         FindSymbol(x, y, 'Water')    then
      begin
        Status('In Lumby')
        LogOut;
        Wait(60000+Random(60000))
        NextPlayer(False)
        exit;
      end;
    end;
    
    
    //->Setup<-//
    Procedure MySetupScript;
    Begin
      Status('Set-Up')
      SetupSRL;
      DeclarePlayers;
      LoadDTMs;
    end;
    
    
    //->GetRandomLoad-//
    Var
      RandomLoad : Integer;
    
    Procedure GetRandomLoad;
    Begin
      RandomLoad := (AmmountOfLoads + Random (3))
    end;
    
    
    //->Anti Randoms<-//
    Procedure TheAntiRandoms;
    Begin
      Status('Random Check')
      FindNormalRandoms;
      wait(10)
      FindTalk;
      wait(10)
      if (FindFight) then
      begin
        Status('Running From a fight.')
        RunAwayDirection('W');
        Wait(8500 + random(3500));
        RunBack;
        Wait(1000+Random(100))
        WalkBackTree;
      end;
      Wait(10);
      FindTalk;
    end;
    
    Procedure StoreStuff;
    Begin
      If InventoryCount > 1 then
      Begin
        Repeat
         ClickItemColorTol(65536, 10, False)
         Wait(10)
         ChooseOption(x, y, 'All')
         Wait(1000 + Random(1000))
        Until InventoryCount = 0
        Wait(1000 + Random (1000))
        Repeat
         If FindDtm(RegularAxeDTM, X, Y, MSX1, MSY1, MSX2, MSY2) then
         Begin
           Mouse(X, Y, 1, 1, True)
           Wait(1000 + Random(1000))
         end;
        Until InventoryCount = 1
      end;
    end;
    
    //--CHARMZ AUTO RESPONDER--//
    
    Function GetChatMessage(Text: String): Boolean;
    Var
    TX, TY: Integer;
    Chat: String;
    Begin
    
      If(IsTextInAreaEx(40, 415, 130, 415, TX, TY, ':', 0, SmallChars, False, True, 0, 0, 0))then
       Begin
        Chat:= Lowercase(Trim(GetTextAtEx(TX + 8, 415, 0, SmallChars, False, False, 0, 1, 16711680, 40, False, TR_AllChars)));
    
         If(Pos(Text, Chat) <> 0)then
          Begin
           Result:= True;
          End
    
       End
    
    End;
    
    Function GetChatName(Name: String): Boolean;
    Var
    I : Integer;
    ChatName : String;
    Begin
    
      ChatName := Lowercase(Trim(GetTextAtEx(21, 415, 0, SmallChars, False, False, 0, 0, 0, 50, False, TR_AllChars)));
    
      I:= Pos(':', ChatName);
      If(I <> 0)then
       Begin
         Delete(ChatName, I, I);
       End
    
      If(Pos(Name, ChatName) <> 0)then
       Begin
         Result:= True;
       End
    
    End;
    
    Function AutoRespond: Boolean;
    Var
    Responce, Lvl: String;
    RandomReply: Integer;
    Chat,Name,ChatName: String;
    Begin
    
    if(AutoResp=False)then
     begin
     Exit;
    end;
    
    if(AutoResp)then
    begin
    
      OldLine:= TheLine;
      TheLine:= Lowercase(Trim(GetTextAtEx(20, 415, 0, SmallChars, False, False, 0, 1, 16711680, 40, False, TR_AllChars)));
      NewLine:= TheLine;
    
     If(GetChatName(Players[CurrentPlayer].Name))then
      Begin
       Exit;
      End
    
     If(OldLine=NewLine)then
      Begin
       Exit;
      End
    
      If(GetChatMessage(Players[CurrentPlayer].Name)) or (GetChatMessage(Players[CurrentPlayer].Nick))then
       Begin
         WriteLn(''+ChatName+': '+Chat);
         RandomReply:= Random(10)+1;
        Case (RandomReply) of
          0 : Responce:= ('?');
          1 : Responce:= ('what');
          2 : Responce:= ('yes');
          3 : Responce:= ('no');
          4 : Responce:= ('what do you want');
          5 : Responce:= ('me?');
          6 : Responce:= ('Yah?');
          7 : Responce:= ('who?');
          8 : Responce:= ('wha?');
          9 : Responce:= ('?');
          10 : Responce:= ('???');
        End
       TypeSend(Responce+' '+Name);
       Result:= True;
       FResponds := FResponds + 1
      End
    
      If(GetChatMessage('lol')) or (GetChatMessage('lmao')) or (GetChatMessage('rofl')) or (GetChatMessage('haha'))then
       Begin
        WriteLn(''+ChatName+': '+Chat);
        RandomReply:= Random(24)+1;
        Case (RandomReply) of
         0 : Responce:= ('heh');
         1 : Responce:= ('loll');
         2 : Responce:= ('lol');
         3 : Responce:= ('haha');
         4 : Responce:= ('hihi');
         5 : Responce:= ('ehe');
         6 : Responce:= ('lmao');
         7 : Responce:= ('lmfao');
         8 : Responce:= ('rofls');
         9 : Responce:= ('fun');
         10 : Responce:= ('nice');
         11 : Responce:= ('lolz');
         12 : Responce:= ('yep');
         13 : Responce:= ('hola');
         14 : Responce:= ('wow');
         15 : Responce:= ('i bet');
         16 : Responce:= ('rofl');
         17 : Responce:= ('ghehehghehighhe');
         18 : Responce:= ('cool');
         19 : Responce:= ('...');
         20 : Responce:= ('???');
         21 : Responce:= ('wow');
         22 : Responce:= ('grr..');
         23 : Responce:= ('rowr');
         24 : Responce:= ('lolololololol');
         25 : Responce:= ('ha ha ha!!!');
        End
       TypeSend(Responce);
       Result:= True;
       FResponds := FResponds + 1
      End
    
    
      If(GetChatMessage('wc')) or (GetChatMessage('woodcutting')) or (GetChatMessage('woodcuttin')) And
        (GetChatMessage('lvl')) or (GetChatMessage('level')) or (GetChatMessage('lvls')) or (GetChatMessage('levels'))then
       Begin
        WriteLn(''+ChatName+': '+Chat);
        Lvl:= IntToStr(GetSkillLevel('woodcutting'));
        RandomReply:= Random(5)+1;
         Case (RandomReply) of
          0 : Responce:= ('i''m lvl '+Lvl+' woodcuttin');
          1 : Responce:= ('level '+Lvl+' wc');
          2 : Responce:= ('lvl '+Lvl+' woodcut!');
          3 : Responce:= (+Lvl);
          4 : Responce:= ('i''m level '+lvl);
          5 : Responce:= (+Lvl+' here :P');
         End
        TypeSend(Responce);
        Result:= True;
        FResponds := FResponds + 1
       End
    
      If(GetChatMessage('wat')) or (GetChatMessage('what')) and (GetChatMessage('doin')) or (GetChatMessage('doing'))then
       Begin
       WriteLn(''+ChatName+': '+Chat);
       RandomReply:= Random(9)+1;
        Case RandomReply of
         0 : Responce:= ('not much');
         1 : Responce:= ('nothing');
         2 : Responce:= ('bored');
         3 : Responce:= ('aye?');
         4 : Responce:= ('emmm..nothin');
         5 : Responce:= ('nope');
         6 : Responce:= ('booo');
         7 : Responce:= ('no ty');
         8 : Responce:= ('what');
         9 : Responce:= ('....');
         10 : Responce:= ('nothin');
        End;
       TypeSend(Responce);
       Result:= True;
       FResponds := FResponds + 1
      End;
    
      If(GetChatMessage('hey')) or (GetChatMessage('hi')) or (GetChatMessage('hello')) or (GetChatMessage('wats up')) or (GetChatMessage('whats up')) or (GetChatMessage('yo'))then
       Begin
       WriteLn(''+ChatName+': '+Chat);
       RandomReply:= random(9)+1;
        Case RandomReply of
          0 : Responce:= ('hello');
          1 : Responce:= ('wassup');
          2 : Responce:= ('yo');
          3 : Responce:= ('whats up everyone');
          4 : Responce:= ('whats up');
          5 : Responce:= ('welcome');
          6 : Responce:= ('hello hello');
          7 : Responce:= ('wat up');
          8 : Responce:= ('yo');
          9 : Responce:= ('sup?');
          10 : Responce:= ('whats up');
        end
       TypeSend(Responce);
       Result:= True;
       FResponds := FResponds + 1
      end
     end;
    end;
    
    
    //->Get Axe Colors<-//
    Procedure GetAxeColors;
    Begin
      Wait(100)
      MakeCompass('S')
      GameTab(4)
      FindAxeHeadColor;
      MakeCompass('N')
    end;
    
    
    //->Check for Broken Axe<-//
    Var
      BX, BY, NX, NY : integer;
    
    Procedure IsAxeBroken;
    Begin
      Status('Checking for broken axe')
      GameTab(4)
      Wait(400 + Random (100))
      If (Not(FindDTM(BrokenAxeDTM, BX, BY, MIX1, MIY1, MIX2, MIY2 ))) then
      Begin
        Status('Axe Not Broken')
        Exit;
      end;
      Begin
        If (FindDTM(BrokenAxeDTM, BX, BY, MIX1, MIY1, MIX2, MIY2 )) or
           (FindDTM(AxeHandleDTM, BX, BY, MIX1, MIY1, MIX2, MIY2 )) and
           (Not(FindDTM(RegularAxeDTM, NX, NY, MIX1, MIY1, MIX2, MIY2))) then
           Begin
             WalkToBank;
             Wait(1000 + Random(1000))
             MakeCompass('E')
             Wait(10)
             OpenBank3;
             Wait(2000 + Random(1000))
             QuickFixBank;
             end else
             Begin
               LogOut;
               NextPlayer(False)
             end;
               StoreStuff;
               CloseBank;
               MakeCompass('N')
               WalkBackTree;
               HighestAngle;
           end;
          LoadNumber := Loadnumber + 1
          BankTrips  := BankTrips  + 1
        end;
    
    
    //->Axe Head Finder<-//
    Procedure TheFindAxe;
    Begin
      FindHead;
    end;
    
    //->Everything Put Together2<-//
    Procedure CompleteFix2;
    Begin
      TheAntiRandoms;
      Wait(10)
      TheFindAxe;
      Wait(10)
      AutoRespond;
    end;
    
    //->Ent Finder<-// Yohojo8
    Var
      EX, EY : integer;
      FX, FY : integer;
      SafeEntWait : LongInt;
    Procedure EntChecker;
    Begin
      Status('Checking For Ent')
      If (FindObjMultiText(EX, EY, TheTreeName, TheTreeName, TheTreeName, Treecolor, 4)) then
      Begin
        MMouse(EX, EY, 0, 0)
        If FindColorTolerance( FX, FY, 55769, 85, 15, 115, 15, 20) then
        Begin
          Status('Ent Found');
          MouseFindFlag(645, 83, 2, 2);
          MarkTime(SafeEntWait)
          Repeat
            CompleteFix2;
            Wait(10)
            If Random(100) = 80 then
            Begin
              RandomRClick;
            end;
          Until TimeFromMark(SafeEntWait) > 18000 + Random(10000)
          EntsAvoided := EntsAvoided + 1
        end;
      end;
    end;
    
    //->Everything Put Together<-//
    Procedure CompleteFix;
    Begin
      TheAntiRandoms;
      Wait(10)
      //InLumby;
      Wait(10)
      EntChecker;
      Wait(10)
      TheFindAxe;
      Wait(10)
      AutoRespond;
    end;
    
    //->Start Chopping<-//
    Var
      TX, TY : Integer;
      TreeTime, SafeWaiting : LongInt;
      
    
    Procedure StartChopping;
    Begin
      MakeCompass('N')
      MarkTime(TreeTime)
      If ( Not (LoggedIn) ) Then
      Begin
        NextPlayer (False)
        Exit;
      end;
      Repeat
      Begin
        IsAxeBroken;
        Status('Looking for ' + TheTreeName)
        If (InvFull) then
        Begin
          Exit;
        end;
        EntChecker;
        MakeCompass('W')
        If (FindObjMultiText(TX, TY, TheTreeName, TheTreeName, TheTreeName, Treecolor, 4)) then
        Begin
          Mouse(TX, TY, 1, 1, True)
          Wait( 1400 + Random (200))
          MarkTime(SafeWaiting)
          Repeat
            CompleteFix;
            If InvFull then
            Begin
              Exit;
            end;
            Wait(10)
          Until (TimeFromMark(SafeWaiting) > 5000 + Random(1000))
        end;
      end;
     Until (InvFull) or (TimeFromMark(TreeTime)>60000 * 7)
    end;
    
    
    //->Bank Procedure<-//
    Var
      BankMark : LongInt;
    
    Procedure StartBanking;
      Begin
        If (InvFull) or
        (TimeFromMark(TreeTime)>60000 * 7) then
        Begin
          If ( Not (LoggedIn) ) Then
          Begin
            NextPlayer (False)
            Exit;
          end;
          MakeCompass('W')
          HighestAngle;
          Wait(100+Random(100))
          GameTab(4)
        end;
        WalkToBank;
        MarkTime(BankMark)
        MakeCompass('W')
        HighestAngle;
        Wait(10)
        HighestAngle;
        Repeat
         OpenBank3;
        Until (BankScreen) or (TimeFromMark(BankMark)>60000 + Random(60000))
        Wait(2000+Random(1000))
        QuickFixBank;
        If (TimeFromMark(BankMark)>60000) then
        Begin
          WriteLn('Couldn''t do banking.')
          LogOut;
          NextPlayer(False)
          Exit;
        end;
        Repeat
         If FindDTM(LogDTM, LX, LY, MIX1, MIY1, MIX2, MIY2) then
         Begin
           BankedLoggs := CountItemDtm(LogDTM) + 6
           Mouse(LX, LY, 6, 6, False)
           ChooseOption(x, y, 'All')
           Wait(1000+Random(1000))
         end;
        Until (Not(FindDTM(LogDTM, LX, LY, MIX1, MIY1, MIX2, MIY2)))
        Wait(100+Random(100))
        StoreStuff;
        CloseBank;
        BankTrips  := BankTrips + 1
        LoadNumber := LoadNumber + 1
        WalkBackTree;
    end;
    
    //->Progress<-//
    Procedure FProgress;
    Begin
      WriteLn('|Fours Draynor Oak Banker  v ' + VersionNum + '|')
      WriteLn('------------------------------------------------')
      WriteLn('>Time Running : ' + TimeRunning                  )
      WriteLn('>Logs Banked  : ' + IntToStr(TotalLogs)          )
      WriteLn('>Total Banks  : ' + IntToStr(BankTrips)          )
      WriteLn('>XP Gained    : ' + IntToStr(TotalXp)            )
      If EntsAvoided > 0 then
      Begin
        WriteLn('>Ents Avoided : ' + IntToStr(EntsAvoided)      )
      end;
      If FResponds > 0 then
      Begin
        WriteLn('>Talk Backs   : ' + IntToStr(FResponds)        )
      end;
      WriteLn('------------------------------------------------')
    end;
    
    //->Main Stuff<-//
    Begin
      wait(1200)
      MySetupScript;
      UseSandwichSolver := True;
      UseBoxSolver := True;
      SafeInitForm;
      SafeShowFormModal;
      Convert2;
      ClearDebug;
      WriteLn('Starting Script')
      Wait(3000)
      ClearDebug;
      Begin
        If (Not(LoggedIn)) then
        Begin
          Status('Logging In')
          Loginplayer;
        end;
      end;
      GetRandomLoad;
      HighestAngle;
      MakeCompass('N')
      Repeat
       Repeat
        StartXP := GetXp('Woodcutting')
       Until StartXP > 0
       GetAxeColors;
       WalkBackTree;
       Repeat
        If ( Not (LoggedIn) ) Then
        Begin
          NextPlayer (False)
          Exit;
        end;
        DisguiseScar('[' + IntToStr(LoadNumber) + '/' +IntToStr(RandomLoad) + '] ' +(Players[CurrentPlayer].name) + '')
        StartChopping;
        StartBanking;
        Repeat
         EndXP := GetXp('Woodcutting')
        Until EndXP > 0
        TotalLogs := TotalLogs + BankedLoggs
        TotalXP := (EndXP - StartXP) + (TotalXP)
        FProgress;
        GetAxeColors;
       Until (LoadNumber >= RandomLoad)
       LogOut;
       NextPlayer(True);
       LoadNumber := 0
       GetRandomLoad;
       HighestAngle;
       MakeCompass('S')
      Until False;
    End.
    
    It says im getting error on Line 384 here is what it says

    Code:
    Failed when compiling
    Line 384: [Error] (15372:1): Unknown identifier 'ClickItemColorTol' in script
    Help please?
     
  3. Unread #2 - May 27, 2007 at 12:24 PM
  4. Sean
    Joined:
    May 26, 2005
    Posts:
    1,029
    Referrals:
    3
    Sythe Gold:
    10

    Sean Guru
    Banned

    Help Getting Errors With Script!

    That's a script error, if i tried to solve it another error will pop-up ect.
     
  5. Unread #3 - May 27, 2007 at 12:32 PM
  6. Town
    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5

    Town Grand Master
    Scar Programmers

    Help Getting Errors With Script!

< need firecaper fast!!!!!!!!! | Help a mayjor noob :P (Please and thankyou) >

Users viewing this thread
1 guest


 
 
Adblock breaks this site