Log in

View Full Version : 2 Questions



Dangerous Garden Tools
09-06-2007, 01:59 AM
The Procedure im using for my yew cutter to cut the yew is....
program New;
{.include srl/srl.scar}

var
x,y : integer;
MyText: Array[0..2] of String;
MyInteger: Array[0..3] of Integer;
Procedure CutTheYew;
begin
MyText[0] := 'Chop'; //texts
MyText[1] := 'Yew';
MyText[2] := 'ew';
MyInteger[0] := 3960935; //colors
MyInteger[1] := 4096373;
MyInteger[2] := 2061927;
MyInteger[3] := 2316108;

If(FindObjCustom(x,y, MyText, MyInteger, 5))then
getmousepos(x,y);
mouse(x,y,6,7,true);
Writeln('Found The Yew :)')
end;


begin
setupsrl;
CutTheYew;
end.

so my first question is how would i get it to cut until the inventory is full?
would i just put it in the main loop and put repeat until(invfull) ???

other question is, how can i find the bank symbol if people are standing on it?:duh:

SKy Scripter
09-06-2007, 02:04 AM
The Procedure im using for my yew cutter to cut the yew is....
program New;
{.include srl/srl.scar}

var
x,y : integer;
MyText: Array[0..2] of String;
MyInteger: Array[0..3] of Integer;
Procedure CutTheYew;
begin
MyText[0] := 'Chop'; //texts
MyText[1] := 'Yew';
MyText[2] := 'ew';
MyInteger[0] := 3960935; //colors
MyInteger[1] := 4096373;
MyInteger[2] := 2061927;
MyInteger[3] := 2316108;

If(FindObjCustom(x,y, MyText, MyInteger, 5))then
getmousepos(x,y);
mouse(x,y,6,7,true);
Writeln('Found The Yew :)')
end;


begin
setupsrl;
CutTheYew;
end.

so my first question is how would i get it to cut until the inventory is full?
would i just put it in the main loop and put repeat until(invfull) ???

other question is, how can i find the bank symbol if people are standing on it?:duh:


well for the repeating tell the inventory is full i would do somthing like.. If findTree then chop
Wait...
until InvCount = 28

and for the bank symbol i would. Find the Bankers instead.


function FindBankers(var mx, my : integer):Boolean;
var
P : TPointArray; // Might only work for my script
i, l : integer;
begin
if (not(LoggedIn)) then exit;
FindColorsSpiralTolerance(x, y, P, 195836, MMX1, MMY1, MMX2, MMY2, 0);
if (GetArrayLength(P)=0) then exit;
l := Length(P);
for i := 0 to GetArrayLength(P)-1 do
if (CountColorTol(195836, P[i].x-10, P[i].y-10,
P[i].x+10, P[i].y+10, 0)>10)and(rs_OnMinimap(P[i].x, P[i].y)) then
begin
mx := mx + P[i].x;
my := my + P[i].y;
end else
L := l - 1;
mx := mx / L;
my := my / L;
Result := True;
end;

Zepix
09-07-2007, 12:57 AM
Ooo, SKy, you are a good scripter!

Smartzkid
09-07-2007, 01:17 AM
If(FindObjCustom(x,y, MyText, MyInteger, 5))then
begin
getmousepos(x,y);
mouse(x,y,6,7,true);
Writeln('Found The Yew :)')
end;

__
Zepix, please don't spam.