SCAR Code:
program draynorWillowCutta;
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/woodcutting.scar}
const
BankSymbolColor=11250352;
willowcolor1=2902351;
willowcolor2=3686456;
willowcolor3=2971728;
PickWielded=true;
var
logs : integer; Trees : integer; loads : integer; tries : integer;
var
x, y: integer;
var
frmDesign : TForm;
username : TLabel;
password : TLabel;
Shape2 : TShape;
Label1 : TLabel;
UsernameFM : TEdit;
passwordFM : TEdit;
start : TButton;
{.include SRL/SRL.scar}
Procedure declareplayers;
Begin
HowManyPlayers:=1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:=0;
Players[0].Name :=UsernameFM.Text;
Players[0].Pass :=passwordFM.Text;
Players[0].Nick :='';
Players[0].Active:=True;
End;
procedure StartClick(sender: TObject);
begin
frmDesign.ModalResult:= mrOk; // Closes the form
end;
procedure InitForm;
begin
frmDesign := CreateForm;
frmDesign.Left := 360;
frmDesign.Top := 95;
frmDesign.Width := 251;
frmDesign.Height := 351;
frmDesign.Caption := 'Fill';
frmDesign.Color := clSkyBlue;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.Font.Style := [];
frmDesign.Visible := True;
frmDesign.PixelsPerInch := 96;
username := TLabel.Create(frmDesign);
username.Parent := frmDesign;
username.Left := 8;
username.Top := 8;
username.Width := 78;
username.Height := 20;
username.Caption := 'Username:';
username.Font.Color := clWindowText;
username.Font.Height := -16;
username.Font.Name := 'MS Sans Serif';
username.Font.Style := [];
username.ParentFont := False;
password := TLabel.Create(frmDesign);
password.Parent := frmDesign;
password.Left := 8;
password.Top := 40;
password.Width := 73;
password.Height := 20;
password.Caption := 'Password:';
password.Font.Color := clWindowText;
password.Font.Height := -16;
password.Font.Name := 'MS Sans Serif';
password.Font.Style := [];
password.ParentFont := False;
Shape2 := TShape.Create(frmDesign);
Shape2.Parent := frmDesign;
Shape2.Left := 0;
Shape2.Top := 112;
Shape2.Width := 241;
Shape2.Height := 201;
Shape2.Shape := stRoundRect;
Label1 := TLabel.Create(frmDesign);
Label1.Parent := frmDesign;
Label1.Left := 8;
Label1.Top := 88;
Label1.Width := 137;
Label1.Height := 33;
Label1.Caption := 'Instruction:';
Label1.Font.Color := clWindowText;
Label1.Font.Height := -16;
Label1.Font.Name := 'MS Sans Serif';
Label1.Font.Style := [];
Label1.ParentFont := False;
UsernameFM := TEdit.Create(frmDesign);
UsernameFM.Parent := frmDesign;
UsernameFM.Left := 88;
UsernameFM.Top := 8;
UsernameFM.Width := 137;
UsernameFM.Height := 24;
UsernameFM.Hint := 'username here';
UsernameFM.AutoSize := False;
UsernameFM.Font.Color := clWindowText;
UsernameFM.Font.Height := -16;
UsernameFM.Font.Name := 'MS Sans Serif';
UsernameFM.Font.Style := [];
UsernameFM.ParentFont := False;
UsernameFM.TabOrder := 8;
passwordFM := TEdit.Create(frmDesign);
passwordFM.Parent := frmDesign;
passwordFM.Left := 88;
passwordFM.Top := 40;
passwordFM.Width := 137;
passwordFM.Height := 24;
passwordFM.Hint := 'pass here';
passwordFM.AutoSize := False;
passwordFM.Font.Color := clWindowText;
passwordFM.Font.Height := -16;
passwordFM.Font.Name := 'MS Sans Serif';
passwordFM.Font.Style := [];
passwordFM.ParentFont := False;
passwordFM.TabOrder := 9;
start := TButton.Create(frmDesign);
start.Parent := frmDesign;
start.Tag := 1;
start.Left := 104;
start.Top := 72;
start.Width := 105;
start.Height := 25;
start.Caption := 'Go!';
start.DragCursor := crDefault;
start.TabOrder := 10;
start.OnClick := @StartClick
end;
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;
begin
SafeInitForm;
SafeShowFormModal;
end;
procedure LoadDtms;
begin;
Logs:= DTMFromString('78DA63F460626078CA80021C2CC5C1342394C' +
'F180854731B558DAB2D9A9A60A09AD7A86AFC5C2551D53801D5BC' +
'4355939F668BAAC606D33D9E4E68E63802D5DC455563652282A20' +
'60013200B2C');
end;
Procedure ProgressReport;
begin;
Writeln('-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-');
Writeln('Willow cutter in draynor by Dritar progress report:');
Writeln('Cutted '+ IntToStr(trees) + ' Trees');
Writeln('Did '+ intToStr(loads) + ' loads');
Writeln('-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-');
end;
Function FindFastRandoms: Boolean; //By WT-Fakawi.
var
i: Integer;
begin
for i := 1 to 8 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
7: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
8: RC;
end;
wait(1);
end;
end;
Procedure PrepCharacter;
begin
Activateclient;
wait(30)
MakeCompass('N');
wait(30)
setchat('Hide',1)
setchat('friends',2)
setchat('off',3)
highestangle;
end;
procedure ToTrees;
begin
setrun(true)
case random(3) of
0: Mouse(640,125,2,2,true);
1: Mouse(628,126,2,2,true);
2: Mouse(645,144,2,2,true);
3: Mouse(621,117,2,2,true);
end
end;
procedure DoAntiRandoms;
begin
FindTalk;
FindNormalRandoms;
if (FindFight = true) then
begin
RunAwayDirection('N');
Wait(10000 + random(2000));
RunBack;
end;
end;
Procedure Antiban;
begin
case random(7) of // case 7 only
0 : RandomRClick; // start a random case with 0!
1 : GameTab(1 + random(7));
2 : Boredhuman;
3 : Almostlogout;
4 : begin // begin and end;
HoverSkill('woodcutting',false);
Wait(2222+random(333))
end;
5 : PickupMouse; // you forgot the ';'
6 : begin
LowestAngle; //LowestAngle;
Wait(5+random(5))
end;
end
end;
Procedure CutTrees;
begin
wait(6000+random(2000))
repeat // edit
//FindHead; // not found that procedure
If(findcolortolerance(x,y,willowcolor1,25,26,473,310,5))or
(findcolortolerance(x,y,willowcolor2,25,26,473,310,5))or
(findcolortolerance(x,y,willowcolor3,25,26,473,310,5))then
begin
Mmouse(x,y,2,2);
If(IsUpText('illow'))then
begin
Mouse(x,y,2,2,false)
chooseoption('own') // no more x, y,
wait(4000+random(3000))
end
end;
Until(InvFull)
end;
Function InString(Text1, Text2: String): Boolean;
Begin
Result:= (Pos(LowerCase(Text2), LowerCase(Text1)) <> 0);
End;
Function AutoResponder: Boolean;
Var
Responce: Array [0..9] of String;
NewLine: String;
MasterDetected: Boolean;
Label
ResponceLabel;
Begin
If(Not Loggedin)Then Exit;
If(Not UseResponder)Then Exit;
If(TimeFromMark(ResponceTime)<1000)Then Exit;
MarkTime(ResponceTime);
If(Not LastChatter(LastChatterString))Then Exit;
If(InString(LastChatterString, Players[CurrentPlayer].Nick))Then Exit;
OldLine:= TheLine;
GetLastChatText(TheLine);
NewLine:= TheLine;
If(OldLine = TheLine)Then Exit;
If(InString(TheLine, 'hi')) Or (InString(TheLine, 'ello')) Or (InString(TheLine, 'yo') Or (InString(TheLine, 'up')Or (InString(TheLine, 'yo'))Then
Begin
Responce[0]:= 'Hi';
Responce[1]:= 'Hello';
Responce[2]:= 'ello';
Responce[3]:= 'hi lol';
Responce[4]:= 'Hi mate';
Responce[5]:= 'yo';
Responce[6]:= 'hi there!';
Responce[7]:= 'Yo wazzup';
Responce[8]:= 'sup';
Responce[9]:= 'Hi there';
Result:= True;
GoTo ResponceLabel;
End;
If(InString(TheLine, 'wc')) Or (InString(TheLine, 'lev')) Or (InString(TheLine, 'woodcut')Or (InString(TheLine, 'lv'))Then
Begin
Responce[0]:= IntToStr(Players[CurrentPlayer].Level[15]);
Responce[1]:= IntToStr(Players[CurrentPlayer].Level[15]) +', You?';
Responce[2]:= IntToStr(Players[CurrentPlayer].Level[15])+ ' here!';
Responce[3]:= 'Currently ' +IntToStr(Players[CurrentPlayer].Level[15]);
Responce[4]:= 'right now ' +IntToStr(Players[CurrentPlayer].Level[15]);
Responce[5]:= 'soon ' +IntToStr(Players[CurrentPlayer].Level[15]+1);
Responce[6]:= 'very soon ' +IntToStr(Players[CurrentPlayer].Level[15]+1);
Responce[7]:= 'secret';
Responce[9]:= 'ill tell when i get level';
Result:= True;
GoTo ResponceLabel;
End;
If(InString(TheLine, 'lol')) Or (InString(TheLine, 'ha')) Or (InString(TheLine, 'he'))Or
(InString(TheLine, 'lmao')) Or (InString(TheLine, 'rofl')) Or (InString(TheLine, 'omg'))Then
Begin
Responce[0]:= 'lol';
Responce[1]:= 'lmao';
Responce[2]:= 'haha';
Responce[3]:= 'lmfao';
Responce[4]:= 'rofl';
Responce[5]:= 'hehe';
Responce[6]:= 'ahah';
Responce[7]:= 'lmao haha';
Responce[8]:= 'hehe lol';
Responce[9]:= 'haha lol lmao rofl';
Result:= True;
GoTo ResponceLabel;
End;
If(InString(TheLine, 'noob')) Or (InString(TheLine, 'newbie')) Or (InString(TheLine, 'n00b') Or (InString(TheLine, 'froob')Or (InString(TheLine, 'fr00b'))Then
Begin
Responce[0]:= 'Watch your mouth!';
Responce[1]:= 'Look at mirro';
Responce[2]:= 'shut up';
Responce[3]:= 'are you?';
Responce[4]:= 'Really? Watch yourself!';
Responce[5]:= 'Go away!';
Responce[6]:= 'atleast im not **** like you';
Responce[7]:= 'shut up!!';
Responce[8]:= '...and who there is?!';
Responce[9]:= 'Shut up m8';
Result:= True;
GoTo ResponceLabel;
End;
If(InString(TheLine, '*')) Or (InString(TheLine, '**')) Or (InString(TheLine, '***')Or (InString(TheLine, '****'))Then
Begin
Responce[0]:= 'Shut up man';
Responce[1]:= '..Watch at mirror';
Responce[2]:= 'Stfu.';
Result:= True;
GoTo ResponceLabel;
End;
If(InString(TheLine, 'Mac')) Or (InString(TheLine, 'roing')) Or (InString(TheLine, 'bot'))Or
(InString(TheLine, 'auto')) Or (InString(TheLine, 'er')) Or (InString(TheLine, 'noob macro'))Then
Begin
Responce[0]:= 'No im not';
Responce[1]:= 'Mate im person, not an bot';
Responce[2]:= 'Im a person not bot!';
Responce[3]:= 'Im not macroing';
Responce[4]:= 'Whats this?';
Responce[5]:= 'Nah..Im not';
Responce[6]:= 'Why would I?';
Responce[7]:= 'Why do you think so?!';
Responce[8]:= 'Naaaaaaaaaaaaaaa!!!Im not';
Responce[9]:= 'No way mate';
Result:= True;
GoTo ResponceLabel;
End;
If(InString(TheLine, 'Do you like')) Or (InString(TheLine, 'Would you')) Or (InString(TheLine, 'can you'))Or
(InString(TheLine, 'do you use')) Or (InString(TheLine, 'what would you like this')) Or (InString(TheLine, 'would'))Then
Begin
Responce[0]:= 'yes';
Responce[1]:= 'yup';
Responce[2]:= 'yeah';
Responce[3]:= 'this...ehm..';
Responce[4]:= 'no';
Responce[5]:= 'no sorry cant...';
Responce[6]:= 'cannot';
Responce[7]:= 'nope';
Responce[8]:= 'nothing';
Responce[9]:= 'Naaa...im too lazy :p';
Result:= True;
GoTo ResponceLabel;
End;
If(InString(TheLine, 'where are you from')) Or (InString(TheLine, 'where do you live')) Or (InString(TheLine, 'your location?'))Or
(InString(TheLine, 'de donde eres?')) Or (InString(TheLine, 'donde vives?')) Or (InString(TheLine, 'mist oot'))Then
Begin
Responce[0]:= 'USA';
Responce[1]:= 'from USA';
Responce[2]:= 'Im from USA';
Responce[3]:= 'England';
Responce[4]:= 'From England';
Responce[5]:= 'sorry a seret';
Responce[6]:= 'secret';
Responce[7]:= 'In Usa, you?';
Responce[8]:= 'In Englan, you?';
Responce[9]:= 'I will not tell you';
Result:= True;
GoTo ResponceLabel;
End;
ResponceLabel:
If(Result)Then
Begin
If( MasterDetected )Then
Writeln('A Scar Scripter said hi ;)');
Writeln('Responded: '+Responce[CurrentResponce]+' To: '+ TheLine);
TypeSend(Responce[CurrentResponce]);
CurrentResponce:= CurrentResponce + 1;
RespondedTimes:= RespondedTimes + 1;
TRespond:= TRespond + 1;
If(CurrentResponce = 9)Then
CurrentResponce:= 0;
End;
End;
//More will be in ver 2.0
Procedure ToBank;
begin;
If(findSymbol(x,y,'bank'))then
begin
Mouse(x,y,2,2,true)
Wait(5000+random(2000))
end else
begin
If(FindColorTolerance(x,y,banksymbolcolor,582,24,700,125,5))then
Mouse(x,y,2,2,true)
wait(5000+random(2000))
end
end;
Procedure Bank;
begin;
repeat
openbank3
wait(200+random(300));
tries:= tries + 1;
until(tries = 20);
makecompass('w')
repeat
openbank3;
wait(200+random(300))
until(bankscreen)
end;
procedure BankLogs;
begin
If(Pickwielded=true)then
DepositAll;
If(pickwielded=false)then
Deposit(2,28,2)
trees:= trees + 28;
loads:= loads + 1;
end;
begin;
setupsrl;
repeat
toTrees;
CutTrees;
tobank;
opendabank;
bankwillows;
until(loads=loadsperplayer)
ProgressReport;
NextPlayer(false);
end.
Version 2.0 of Draynor willow cutta.
Everything made by Dritar with some help of MasterKill and JuKKa
writeLN('Version 2.0 - DraynorWillowCutta')
writeLN('Made by Dritar 2007 - MasterKill and JuKKa helped alot')
Thanks in advance
begin
end.
SCAR Code:
//-----------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//-- ยป Global Variables --//
//-----------------------------------------------------------------//
// * procedure LoadSRLBitMaps; // * by SRL Dev Team
// * procedure FreeSRLBitMaps; // * by Ron
{ const SRLVersionNumber;
Description: Repository Version Number.
{ var bmpAdmin, bmpMod, Lamp, Box: Integer;
Description: Global Bitmaps. Need to be Global because of SCAR Memory leaks. }
var
bmpAdmin, bmpMod, Lamp, Box: Integer;
{ var RoadColor, WaterColor, BankColor: Integer;
Description: Three variables you will almost always use. :) }
var
RoadColor, WaterColor, BankColor: Integer;
{ var LampSkill: String;
Description: Set Lamp skill. }
var
LampSkill: string;
{ const MMX1, MMY1, MMX2, MMY2;
Description: MiniMap Edge Points. }
const
MMX1 = 570;
MMY1 = 5;
MMX2 = 715;
MMY2 = 160;
{ const MMCX, MMCY;
Description: MiniMap Centre Point. }
const
MMCX = 643;
MMCY = 84;
{ const MSX1, MSY1, MSX2, MSY2;
Description: Main Screen EdgePoints. }
const
MSX1 = 1;
MSY1 = 1;
MSX2 = 516;
MSY2 = 338;
{ const MSCX, MSCY;
Description: Main Screen Centre Points. }
const
MSCX = 259;
MSCY = 170;
{ const MIX1, MIY1, MIX2, MIY2;
Description: Inventory EdgePoints. }
const
MIX1 = 547;
MIY1 = 202;
MIX2 = 737;
MIY2 = 466;
{ const MICX, MICY;
Description: Inventory Centre Points. }
const
MICX = 642;
MICY = 334;
{ const MCX1, MCY1, MCX2, MCY2;
Description: Chat Screen EdgePoints. }
const
MCX1 = 4;
MCY1 = 342;
MCX2 = 496;
MCY2 = 460;
{ const MCCX, MCCY;
Description: Chat Screen Centre Points. }
const
MCCX = 250;
MCCY = 401;
//****************************************************************************//
// * I tried to make these Bitmaps Local, but I got after a couple of hours
// * running scripts, CTB and DB handle errors. So sorry, declared them global
//****************************************************************************//
{*******************************************************************************
procedure LoadSRLBitMaps;
By: SRL Dev Team
Description: Loads SRL Bitmaps into memory.
*******************************************************************************}
procedure LoadSRLBitMaps;
begin
bmpMod := BitmapFromString(9, 6, 'z78DA733472A41B74350041' +
'08DB0009E012B13407414C5DF8D994E8220F0200F59E4633');
bmpAdmin := BitmapFromString(9, 6, 'z78DA7333777333B070A3' +
'0F0904162610B60112C025E26266E96A6488A90B3F9B125DE4910' +
'0A83249DE');
Lamp := BitmapFromString2(False, 'aE3F5378DA558D4B0E8030084' +
'4AFC4670A75D98ABDFF912C5693BA7921330F20226A7582CA3901' +
'C9B9E04A0E9B34C9522A32799C3D2F9489394FBA46D23367CD0BE' +
'CA83637C39B1F1FF9E4DC79ACC5B7957925B4E9F16FBB7666D865' +
'418181415542E2739484E49DCDCDA8C250A8EE5F96530C01D92FE' +
'FEDEEECC9AF059AF6E5DCE2E');
Box := BitmapFromString(6, 6, 'z78DA33300001373030C00B8851' +
'439E4A646040250000B06A2B99');
end;
//* Users
{var FileName: String;
Description: Filename to save and load users from. }
var
FileName: string;
{*******************************************************************************
procedure FreeSRLBitMaps;
By: Ron
Description: Frees SRL Bitmaps into memory.
*******************************************************************************}
procedure FreeSRLBitmaps;
begin
FreeBitmap(bmpMod);
FreeBitmap(bmpAdmin);
FreeBitmap(Lamp);
FreeBitmap(Box);
end;