• Log in or sign up for an account here: https://www.sythe.org/login

Please help!

ghost700

Member
Joined
Jun 9, 2007
Sythe Gold
0
Messages
49
Code:
{   CHARMZ AUTO RESPONDER IS IN HERE... NOT mine.
            ----------------------------------------------------
                                Instructions
                   1. Fill out DeclarePlayers lines 40-63
                   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 not banking, set colors line 67
       you may also set if you use auto responder or not there.
}
Program DraynorOakBanker;
{.include SRL\SRL.SCAR}
{.include SRL\SRL\Skill\Woodcutting.SCAR}

Var
  LoadNumber : Integer;
  LogDTM, BrokenAxeDTM, AxeHandleDTM, RegularAxeDTM, WalkToBit : Integer;
  StartXP, EndXP, TotalXP, TotalLogs, BankTrips, WalkToBit2 : Integer;
  frmDesign : TForm;
  Label1 : TLabel;
  Label2 : TLabel;
  Label3 : TLabel;
  Edit1 : TEdit;
  Edit2 : TEdit;
  Edit3 : TEdit;
  Button1 : TButton;
  TheTreeName : String;
  AmmountOfLoads       : Integer;
  TreeColor   : Integer;
  LX, LY, XB, YB, MBX, MBY, BankedLoggs : Integer;

//->Declare Players<-//
Procedure DeclarePlayers;
begin
  Status('Loading Players')

  HowManyPlayers  := 5;
  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;
  BankColor1 = 287867;
  BankColor2 = 4895690;

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 := '3';
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('78DA63AC66626030664001511CB20C1A409A1' +
       '188FF030123488D09AA9A700D7EB81A1000AB3122A0A612D32E0C' +
       '357584D50000E3110AF7');

WalkToBit2 := DTMFromString('78DA63FCC5C4C03095010528333031C801694' +
       '620FE0F048C3F30D5245808C0D58000E35F22D480EC9A42B91A00' +
       '853E0F36');
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;
  end;
  Wait(10);
  FindTalk;
end;


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;
  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;
  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;
   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;
  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;
  End
 End;
End;



Var
  CCC, YYY : Integer;
Procedure WalkBackTree;
Begin
  MakeCompass('n')
  If FindDtm(WalkToBit, CCC, YYY, MMX1, MMY1, MMX2, MMY2) then
  Begin
    Mouse(CCC + 50, YYY + 38, 1, 1, True)
    flag;
  end else
  If FindDtm(WalkToBit2, CCC, YYY, MMX1, MMY1, MMX2, MMY2) then
  Begin
    Mouse(CCC + 50, YYY + 38, 1, 1, True)
    flag;
  end else
  Begin
    WriteLn('Couldn''t find ladder DTM, Sorry')
    LogOut;
    Wait(60000 + Random (60000))
    NextPlayer(False)
  end;
end;


//->Get Axe Colors<-//
Procedure GetAxeColors;
Begin
  Wait(100)
  MakeCompass('S')
  GameTab(4)
  FindAxeHeadColor;
  MakeCompass('N')
end;


//->Ent Checker<-//
Var
  EX, EY : integer;
  FX, FY : integer;
Procedure EntChecker;
Begin
  Status('Checking For Ent')
  Flag;
  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(648,83,5,5);
        Wait(15000+Random(5000));
        EntsAvoided := EntsAvoided + 1
      end;
   end;
end;


//->Check for Broken Axe<-//
Var
  BX, BY, NX, NY, HandX, HandY : 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 )) and
       (Not(FindDTM(RegularAxeDTM, NX, NY, MIX1, MIY1, MIX2, MIY2))) then
       Begin
         If FindSymbol(XB, YB, 'Bank') then
         Begin
           Mouse(XB, YB, 1, 1, True)
           Flag;
         end else
         If FindMMColorTol(MBX, MBY, BankColor2, 8) then
         Begin
           Mouse(MBX, MBY, 1, 1, True)
           Flag;
         end else
         If FindMMColorTol(MBX, MBY, BankColor1, 8) then
         Begin
           Mouse(MBX, MBY, 1, 1, True)
           Flag;
         end;
         Repeat
          OpenBank3;
         Until BankScreen;
         If FindDtm(BrokenAxeDTM, HandX, HandY, MIX1, MIY1, MIX2, MIY2) then
         Begin
           Mouse(HandX, HandY, 1, 1, False)
           ChooseOption(x, y, 'All')
           If FindDtm(RegularAxeDTM, X, Y, MSX1, MSY1, MSX2, MSY2) then
           Begin
             Mouse(X, Y, 1, 1, True)
           end;
           CloseBank;
           MakeCompass('N')
           WalkBackTree;
         end else
         NextPlayer(False)
      end;
      LoadNumber := Loadnumber + 1
   end;
end;


//->Axe Head Finder<-//
Procedure TheFindAxe;
Begin
Status ('Looking For Axe')
FindHead;
end;



//->Start Chopping<-//
Var
  TX, TY : Integer;

Procedure StartChopping;
Begin
 Repeat
 Begin
   IsAxeBroken;
   Status('Looking for ' + TheTreeName)
   If (InvFull) then
   Begin
     Exit;
   end;
   If ( Not (LoggedIn) ) Then NextPlayer (False)
   EntChecker;
   If ( Not (LoggedIn) ) Then NextPlayer (False)
   MakeCompass('W')
   If (FindObjMultiText(TX, TY, TheTreeName, TheTreeName, TheTreeName, Treecolor, 4)) then
   Begin
     Mouse(TX, TY, 1, 1, True)
     Wait( 1400 + Random (200))
     EntChecker;
     Wait(10)
     TheFindAxe;
     Wait(10)
     TheAntiRandoms;
     Wait(10)
     TheAntiRandoms;
     Wait(10)
     AutoRespond;
     If ( Not (LoggedIn) ) Then NextPlayer (False)
     Wait(10)
     TheAntiRandoms;
     Wait(10)
     EntChecker;
     Wait(10)
     TheAntiRandoms;
     Wait(10)
     TheFindAxe;
     Wait(4000+Random(1000))
   end;
  end;
 Until (InvFull)
end;


//->Bank Procedure<-//

Procedure StartBanking;
  Begin
    If (InvFull) then
    Begin
      MakeCompass('W')
      HighestAngle;
      Wait(100+Random(100))
      GameTab(4)
    end;
    If FindSymbol(XB, YB, 'Bank') then
    Begin
      WriteLn('Found Bank Symbol')
      Mouse(XB + 6, YB, 1, 1, True)
      Flag;
    end else
    If FindMMColorTol(MBX, MBY, BankColor1, 5) then
    Begin
      WriteLn('Didn''t find bank symbol, found color')
      Mouse(MBX + 6, MBY, 1, 1, True)
      Flag;
    end else
    If FindMMColorTol(MBX, MBY, BankColor2, 5) then
    Begin
      WriteLn('Didn''t find bank symbol, found color')
      Mouse(MBX + 6, MBY, 1, 1, True)
      Flag;
    end else
    Begin
      WriteLn('Did not find bank colors, or symbol, sorry')
      LogOut;
      Wait(60000 + Random(60000))
      NextPlayer(False)
    end;
    Repeat
     OpenBank3;
    Until BankScreen;
    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)))
    CloseBank;
    BankTrips := BankTrips + 1
    LoadNumber := LoadNumber + 1
    WalkBackTree;
end;

Procedure FProgress;
Begin
  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;
  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
    StartXP := GetXp('Woodcutting')
    GetAxeColors;
    WalkBackTree;
    Repeat
      DisguiseScar('[' + IntToStr(LoadNumber) + '/' +IntToStr(RandomLoad) + '] ' +(Players[CurrentPlayer].name) + '')
      StartChopping;
      If ( Not (LoggedIn) ) Then NextPlayer (False)
      StartBanking;
      EndXP := GetXp('Woodcutting')
      TotalLogs := TotalLogs + BankedLoggs
      TotalXP := (EndXP - StartXP) + (TotalXP)
      FProgress;
      GetAxeColors;
    Until (LoadNumber >= RandomLoad)
     LogOut;
     NextPlayer(True);
     LoadNumber := 0
     GetRandomLoad;
     HighestAngle;
     MakeCompass('S')
     If ( Not (LoggedIn) ) Then NextPlayer (False)
    Until False;
end.
ok thats my script i press play and it says

Line 318: [Error] (15089:8): Identifier expected in script C:\Program Files\SCAR 3.04\Scripts\Draynor Oak Banker.scar

Please help i will apreciate it very much thanks !
 
ok now i got Include file C:\Program Files\SCAR 2.03\includes\SRL\SRL.Scar does not exist.
 
Runescape Gamblingrunescape gambling
Back
Top