in_jeopardy
09-06-2006, 07:55 PM
Ok, currently, I have this, my log cutting script, it works well, but I need two things
An explanation of how to use the SRL login, and currentplayer so that I can use the SRL login rather than my own which isn't all that good.
An explanation of how to impliment antirandoms in this script.
If someone would be kind enough to explain these two things I would be extreemly greatful :)
//---------------------------------------------------------
// In_Jeopardy's
// Normal Log Cutter
//
// *Instructions*
// place character in an area that has lots of normal
// trees, use the crosshair to select the ruenscape
// client, pick the colour of the normal tree and place
// in lines 34 and 35, press play and enjoy, (have your
// axe equipped or it wont work)
//
//
// *Features*
// - will log in
// - will cut a full load of normal logs
// - will drop logs when inventory is full
// - checks for randoms
//
// *Credits*
// By In_Jeopardy
// With help from Sumilion =]
// With some guidance on log dropping from JLewis
//
//
//---------------------------------------------------------
program BasicTreeCutter;
{.include SRL\SRL.scar}
{.include SRL\SRL\skill\WoodCutting.scar}
Var
TempCount, CutMark, Mymark : integer;
frmDesign : TForm;
Button1 : TButton;
const
user =''; //username goes in between quotes.
pass =''; //password goes in between quotes.
procedure Setup;
begin;
SetupSRL;
MouseSpeed := 20;
end;
procedure buttonclick(sender: TObject);
begin
Writeln('**Script Started**');
frmDesign.Caption:= frmDesign.Caption + '.';
frmDesign.ModalResult:= mrOk;
end;
procedure InitForm;
begin
frmDesign := CreateForm;
frmDesign.Left := 100;
frmDesign.Top := 100;
frmDesign.Width := 200;
frmDesign.Height := 180;
frmDesign.Caption := 'frmDesign';
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;
Button1 := TButton.Create(frmDesign);
Button1.OnClick:= @buttonclick;
Button1.Parent := frmDesign;
Button1.Left := 60;
Button1.Top := 60;
Button1.Width := 75;
Button1.Height := 25;
Button1.Caption := 'Begin Script';
Button1.TabOrder := 8;
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;
procedure colourpick0;
begin;
If FindColorSpiralTolerance(x, y, 2246712, 000, 000, 516, 337, 5) Then;
begin;
Mouse(x, y, 3, 5, true);
TempCount := InvCount;
MarkTime(CutMark);
repeat
Wait(200)
Until(InvCount = TempCount +1) Or (TimeFromMark(CutMark) >= 10000)
end;
end;
procedure colourpick1;
begin;
If FindColorSpiralTolerance(x, y, 16777215, 397, 278, 528, 306, 5) Then;
begin;
Mouse(x, y, 3, 5, true);
end;
end;
procedure NameAndPass;
begin
TypeSend(user + chr(13) + pass)
end;
procedure colourpick2;
begin;
If FindColorSpiralTolerance(x, y, 16777215, 237, 308, 366, 334, 5) Then;
begin;
Mouse(x, y, 3, 5, true);
end;
end;
procedure colourpick3;
begin;
If FindColorSpiralTolerance(x, y, 16777215, 278, 298, 495, 375, 5) Then;
begin;
Mouse(x, y, 3, 5, true);
end;
end;
procedure LoginBegin;
begin;
colourpick1
wait(2000)
NameAndPass
wait(2000)
colourpick2
wait(10000)
colourpick3
wait(5000);
end;
begin;
Setup
SafeInitForm
SafeShowFormModal
ActivateClient
If loggedin = false Then
LoginBegin;
IF loggedin = true Then
ChatsOff
wait(2000)
highestangle;
repeat
marktime(mymark);
repeat
colourpick0;
until(InvFull) Or (TimeFromMark(MyMark) >= 150000)
begin;
DropAllLogs;
end;
Until(false);
end.
Thanks.
An explanation of how to use the SRL login, and currentplayer so that I can use the SRL login rather than my own which isn't all that good.
An explanation of how to impliment antirandoms in this script.
If someone would be kind enough to explain these two things I would be extreemly greatful :)
//---------------------------------------------------------
// In_Jeopardy's
// Normal Log Cutter
//
// *Instructions*
// place character in an area that has lots of normal
// trees, use the crosshair to select the ruenscape
// client, pick the colour of the normal tree and place
// in lines 34 and 35, press play and enjoy, (have your
// axe equipped or it wont work)
//
//
// *Features*
// - will log in
// - will cut a full load of normal logs
// - will drop logs when inventory is full
// - checks for randoms
//
// *Credits*
// By In_Jeopardy
// With help from Sumilion =]
// With some guidance on log dropping from JLewis
//
//
//---------------------------------------------------------
program BasicTreeCutter;
{.include SRL\SRL.scar}
{.include SRL\SRL\skill\WoodCutting.scar}
Var
TempCount, CutMark, Mymark : integer;
frmDesign : TForm;
Button1 : TButton;
const
user =''; //username goes in between quotes.
pass =''; //password goes in between quotes.
procedure Setup;
begin;
SetupSRL;
MouseSpeed := 20;
end;
procedure buttonclick(sender: TObject);
begin
Writeln('**Script Started**');
frmDesign.Caption:= frmDesign.Caption + '.';
frmDesign.ModalResult:= mrOk;
end;
procedure InitForm;
begin
frmDesign := CreateForm;
frmDesign.Left := 100;
frmDesign.Top := 100;
frmDesign.Width := 200;
frmDesign.Height := 180;
frmDesign.Caption := 'frmDesign';
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;
Button1 := TButton.Create(frmDesign);
Button1.OnClick:= @buttonclick;
Button1.Parent := frmDesign;
Button1.Left := 60;
Button1.Top := 60;
Button1.Width := 75;
Button1.Height := 25;
Button1.Caption := 'Begin Script';
Button1.TabOrder := 8;
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;
procedure colourpick0;
begin;
If FindColorSpiralTolerance(x, y, 2246712, 000, 000, 516, 337, 5) Then;
begin;
Mouse(x, y, 3, 5, true);
TempCount := InvCount;
MarkTime(CutMark);
repeat
Wait(200)
Until(InvCount = TempCount +1) Or (TimeFromMark(CutMark) >= 10000)
end;
end;
procedure colourpick1;
begin;
If FindColorSpiralTolerance(x, y, 16777215, 397, 278, 528, 306, 5) Then;
begin;
Mouse(x, y, 3, 5, true);
end;
end;
procedure NameAndPass;
begin
TypeSend(user + chr(13) + pass)
end;
procedure colourpick2;
begin;
If FindColorSpiralTolerance(x, y, 16777215, 237, 308, 366, 334, 5) Then;
begin;
Mouse(x, y, 3, 5, true);
end;
end;
procedure colourpick3;
begin;
If FindColorSpiralTolerance(x, y, 16777215, 278, 298, 495, 375, 5) Then;
begin;
Mouse(x, y, 3, 5, true);
end;
end;
procedure LoginBegin;
begin;
colourpick1
wait(2000)
NameAndPass
wait(2000)
colourpick2
wait(10000)
colourpick3
wait(5000);
end;
begin;
Setup
SafeInitForm
SafeShowFormModal
ActivateClient
If loggedin = false Then
LoginBegin;
IF loggedin = true Then
ChatsOff
wait(2000)
highestangle;
repeat
marktime(mymark);
repeat
colourpick0;
until(InvFull) Or (TimeFromMark(MyMark) >= 150000)
begin;
DropAllLogs;
end;
Until(false);
end.
Thanks.