SRL Archive - OSR Help

New guy need help


XARGLES

2013-03-25 20:22:51

Hey guys im new to scripting, i was going to attempt to make a script that runs law runes
Well atleast attempt to anyway
Heres what i have

program LawRun;

{$DEFINE SMART}
{$I SRL\SRL.Simba}
{SI SRL\SRL\Misc\Stats.simba}


Const
SRLStats_Username = ''; // user
SRLStats_password = '': // pass
BreakEvery = 120; // break for mins
BreakFor = 5: //
Version = '1.0'; //
NumbOfplayers= 1;
StartPlayer= 0;


procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[1].BoxRewards := ['mote', 'ostume', 'XP']

with players [0] do
begin
Name := '';
PAss := '';
Nick := '';
Active := True;
Integers[1] := 4;
Integers[2] := 4;
end;

end;

Procedure StatsGuise(wat:String);
Begin
Status (wat);
Disguise( wat);
End;

Function CheckAndClick(UpText, Option:String; X,Y:Integer; RClick:Boolean) :Boolean;
Begin
MMouse (x, y, 5, 5);
If WaitUpText(UpText, 1500+random(500)) Then
Begin
Result:= True
GetMousePos(x, y);
If RClick Then
Begin
Mouse(x, y, 0, 0, False);
Result:= WaitOption(Option, 2000);
If Result Then FFlag(0);
End Else
Begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(50));
FFLag (0);
End;
End;
End;

Function ChopDown;



end.

What have i got to do to Find the bank in draynor, open the bank then withdraw 27 pure essences..

As you can see i have got to the point in the Video tutorial of where he wants to "ChopDown" the tree

Yes i am trying to code for 07Scape if i am doing it wrong, please say, i realise this is very poor work

Someone point me in the right direction please aha cheers
XAR

Rhiot

2013-03-26 07:22:28

Just keep doing what you're doing! I did the exact same! Look at others' scripts and learn from them! It really helps, and keep reading tutorials. You should understand TPAs/ATPAs as they are your best bet to accurately find objects. Try using RadialWalk to walk from bank and back, make use of symbols for location checking, and use ACA(AutoColorAid) to make an AutoColor of Draynor bank.

XARGLES

2013-03-26 08:25:38

From: Rhiot
Just keep doing what you're doing! I did the exact same! Look at others' scripts and learn from them! It really helps, and keep reading tutorials. You should understand TPAs/ATPAs as they are your best bet to accurately find objects. Try using RadialWalk to walk from bank and back, make use of symbols for location checking, and use ACA(AutoColorAid) to make an AutoColor of Draynor bank.


Hey man, thanks for your positive feedback really really appreciate it, the thing is, i really am stuck from this point, i have made an autocolor of the draynor bank, but that is all i can work out how to do
program LawRun;

{$DEFINE SMART8}
{$I SRL\SRL.Simba}
{SI SRL\SRL\Misc\Stats.simba}


Const
SRLStats_Username = ''; // user
SRLStats_password = ''; // pass
BreakEvery = 120; // Break every mins
BreakFor = 5; // Break for mins
Version = '1.0'; //
NumbOfplayers= 1;
StartPlayer= 0;


procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[1].BoxRewards := ['mote', 'ostume', 'XP']

With Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
Integers[1] := 4;
Integers[2] := 4;
end;

end;

Procedure StatsGuise(wat:String);
Begin
Status (wat);
Disguise( wat);
End;

Function CheckAndClick(UpText, Option:String; X,Y:Integer; RClick:Boolean) :Boolean;
Begin
MMouse (x, y, 5, 5);
If WaitUpText(UpText, 1500+random(500)) Then
Begin
Result:= True
GetMousePos(x, y);
If RClick Then
Begin
Mouse(x, y, 0, 0, False);
Result:= WaitOption(Option, 2000);
If Result Then FFlag(0);
End Else
Begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(50));
FFLag (0);
End;
End;
End;

function FindBankTeller(var x, y : Integer) : Boolean;
var
a : Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
MP : TPoint;
tmpCTS : Integer;
Box,SearchArea : TBox;
begin
if not LoggedIn then Exit;
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.33,1.22);
SearchArea := IntToBox((MSCX - 200),(MSCY - 100),(MSCX),(MSCY + 150));
SMART_DrawBoxEx(True,SearchArea,clPurple);
FindColorsSpiralTolerance(MSCX,MSCY,TPA,2313821,MSCX -200,MSCY - 100 ,MSCX,MSCY + 150,9);
SortTPAFrom(TPA,point(MSCX,MSCY));
ATPA := TPAtoATPAEx(TPA,15,15); oBox
for a := 0 to High(ATPA) do
begin
MP := MiddleTPA(ATPA[a]);
Box := IntToBox((MP.x - 20),(MP.y - 20),(MP.x + 20),(MP.y + 20));
SMART_DrawBoxEx(False,Box,clYellow);
MMouse(MP.x,MP.y,4,4);
if(WaitUpText('ank',750))then
begin
While(InvCount > 15) do
begin
x := MP.x; y := MP.y;
Result := True
SMART_ClearCanvas;
Mouse(x,y,0,0,True);
WaitFunc(@BankScreen, 10 + Random(15), 10000);
Deposit(2,28,True);
Writeln('Depotsitied');
Ore := Ore+28
stats_IncVariable('Clay (Mined)',27);
stats_IncVariable('Total Exp Gained',140);
Antiban;
end;
Break;
end;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2,0.2);
end;



end.

It also tells me theres a semicolon expected at line 26 which is "With Players[0] do" which doesn't need a semi colon :/ edit: fixd that

If anyone is willing to help me more in depth add me on skype to chat