solemn wishes
2006-03-31 08:21:58
hi,
well these are extracts from my current script " auto rune mysteries quester". checkdoor will open a few doors but ill add more if you guys like the idea, ToTheStaires will locate the stairs and walk towards them then stairs will simply click them and chose the direction that you have stated. :)
well these are extracts from my current script " auto rune mysteries quester". checkdoor will open a few doors but ill add more if you guys like the idea, ToTheStaires will locate the stairs and walk towards them then stairs will simply click them and chose the direction that you have stated. :)
procedure Checkdoor(area : string; x1, y1, x2, y2 : integer);
var doortype : Integer;
begin
case area of
'lumberbridge' :doortype:=BitmapFromString(8, 3, 'z78DA3375333130323425' +
'9E3436B63074219E347134363474249E0400A2081EA9');
'lumberbridge2':doortype:=BitmapFromString(3, 10, 'z78DA333537763674' +
'3345268D8D2D0C5D48269D8D5DD0F412238269232E11036353434' +
'7080900DAF3271F');
'gate':doortype := BitmapFromString(27, 3, 'z78DA337536763174331D25873' +
'50900BEA87147');
end;
if(Findbitmapspiraltolerance(doortype,x,y,246,5,514,338,16))then
begin
Mmouse(x,y,0,0) wait(750)
if(IsUpText('pen'))then
mouse(x,y,0,0,true)
flag;
end;
end;
function ToTheStaires:boolean;
var tries, ladder, tol :integer;
angle : extended;
begin
ladder := DTMFromString('78DA63646560606067C00A186134480D2B116' +
'A5850E5C2B519493607002BCA00B5');
repeat
if(FindDtmRotated(ladder,x,y,578,10,714,158,-1.0, 2.0, 1, Angle))then
begin
mouse(x,y,0,0,true)
flag;
result:=true;
end;
tries:=tries+1;
until (result)or(tries=25)
if not result then
begin
repeat
wait(50)
if(findcolorspiraltolerance(x,y,8026,590,45,676,131,tol))then
begin
mouse(x,y,4,5,true)
flag;
result:=true;
end;
tol:=tol+5;
until(result)or(tol=100)
end;
end;
function stairs(color : integer; direction : string; tol : integer):boolean;
begin
repeat
if(findcolorspiraltolerance(x,y,color,5,5,515,336,tol))then
begin
Mmouse(x,y,4,5)
if(IsUpText('Climb'))then
mouse(x,y,2,2,true)
flag;
end;
begin
if(ClickNpcChatText(direction))then
result:=true;
wait(500+random(250))
end;
if not result then
tol:=tol+1;
until(result)
end;