PDA

View Full Version : Lumbridge



Boreas
01-10-2007, 04:54 AM
I will be very busy for the next month, and pretty busy until May, so most of my projects are on hold. So I'm starting this so that I can add a little bit at a time, and I need testers every step of the way.

This may turn into:
something you run your players on to get ready for another script
something you run noobs on fresh off tutorial island
something that trains multiple skills around lumby

Current situation:
This function is for finding doors on minimap in the checkered room on the first floor of lumby castle. Stick a player in the checkered room and run the script, press F12 after it gets to 1st door, F11 after next, F12 after next. Try it on a couple worlds and tell me how it works please.

Don't worry about the lag. It's looking for up to about 350 bitmaps, doing upto 1600 setpixels. I already have a fix for this that will cut it down to 7 and 32 respectively, but will have a small chance of a false positive. So I will have it try the faster method first, and if it fails it will do the laggier but guaranteed to work version. But first I need to make sure this is guaranteed to work, which is why I need you to test this.


program TestForFindLumbyDoor1st;
{start in middle of checkered room in first floor lumby castle (or outside
if door is open)
should click west, then you press f12
then it click south, then you press f11
then it click east then you press f12
then it click north door
}
{.include SRL/SRL.scar}


{************************************************* ******************************
function FindLumbyDoor1st(Direction:string):boolean;
By: Boreas
Description: Sets x,y to the location of one of the 4 doors in lumbridge
castle 1st floor foyer (the chessboard room)
Direction: 'north','east','south','west'
************************************************** *****************************}
function FindLumbyDoor1st(Direction:string):boolean;
var
xAddToBmp,yAddToBmp:integer;
bmpLD:array [1..7] of integer;
i,dacolor:integer;
daboolean:boolean;
begin
case Direction of
'north':
begin
xAddToBmp:=9+random(4);
yAddToBmp:=1;
end;
'east':
begin
xAddToBmp:=17;
yAddToBmp:=25+random(8);
end;
'south':
begin
xAddToBmp:=10+random(4);
yAddToBmp:=58;
end;
'west':
begin
xAddToBmp:=1;
yAddToBmp:=13+random(8);
end;
end;


bmpLD[1] := BitmapFromString(18, 59, 'z78DAEDD7310D00000803304B5' +
'3817F49BC9CBC90D6C0921D902537D4100018DFE15F16807B AB73' +
'0000B04136EBA0014E51AF1D');
bmpLD[2] := BitmapFromString(13, 59, 'z78DAEDD8210100000803B04A4' +
'F41FF48D86B14628BB1E48B2901000000E0A48F6501490161 1E');
bmpLD[3] := BitmapFromString(18, 30, 'z78DA33301805A360148C82513' +
'00A862A700383E167D7281805A360148C96B700863461AF') ;
bmpLD[4] := BitmapFromString(12, 18, 'z78DA33301878E086040C46C12' +
'81805230C502BEF536E0E00CC34F511');
bmpLD[5] := BitmapFromString(18, 59, 'z78DAEDD7310900000800C14AA' +
'6B07F24C100E2287257E0E78F0000009864FBD70200002E3F C8E6' +
'0E0ADEDDAD0D');
bmpLD[6] := BitmapFromString(18, 30, 'z78DA3330181AC00D09188C825' +
'1300A46C1281805A360148C8251300AE8DE1AA7A75D000A25 61AF' +
'');
bmpLD[7] := BitmapFromString(13, 59, 'z78DAEDD7410900000800B14AA' +
'6B07F24413308225B80FB5F04C067D96ED6000000F63E6814 A4B6' +
'611E');


dacolor:=200;
repeat
dacolor:=dacolor+1;
if not(((dacolor=206)or(dacolor=217)or(dacolor=233)or (dacolor=241)))then
begin
i:=0;
repeat
i:=i+1;
case i of
1:
begin
FastSetPixel(bmpLD[i],10,1,dacolor);
FastSetPixel(bmpLD[i],11,1,dacolor);
FastSetPixel(bmpLD[i],1,16,dacolor);
FastSetPixel(bmpLD[i],1,17,dacolor);
FastSetPixel(bmpLD[i],17,28,dacolor);
FastSetPixel(bmpLD[i],17,29,dacolor);
FastSetPixel(bmpLD[i],11,58,dacolor);
FastSetPixel(bmpLD[i],12,58,dacolor);
end;
2:
begin
FastSetPixel(bmpLD[i],10,1,dacolor);
FastSetPixel(bmpLD[i],11,1,dacolor);
FastSetPixel(bmpLD[i],11,58,dacolor);
FastSetPixel(bmpLD[i],12,58,dacolor);
end;
3:
begin
FastSetPixel(bmpLD[i],1,16,dacolor);
FastSetPixel(bmpLD[i],1,17,dacolor);
FastSetPixel(bmpLD[i],17,28,dacolor);
FastSetPixel(bmpLD[i],17,29,dacolor);
end;
4:
begin
FastSetPixel(bmpLD[i],10,1,dacolor);
FastSetPixel(bmpLD[i],11,1,dacolor);
FastSetPixel(bmpLD[i],1,16,dacolor);
FastSetPixel(bmpLD[i],1,17,dacolor);
end;
5:
begin
FastSetPixel(bmpLD[i],17,28,dacolor);
FastSetPixel(bmpLD[i],17,29,dacolor);
FastSetPixel(bmpLD[i],11,58,dacolor);
FastSetPixel(bmpLD[i],12,58,dacolor);
end;
6:
begin
FastSetPixel(bmpLD[i],10,1,dacolor);
FastSetPixel(bmpLD[i],11,1,dacolor);;
FastSetPixel(bmpLD[i],17,28,dacolor);
FastSetPixel(bmpLD[i],17,29,dacolor);
end;
7:
begin
FastSetPixel(bmpLD[i],1,16,dacolor);
FastSetPixel(bmpLD[i],1,17,dacolor);
FastSetPixel(bmpLD[i],11,58,dacolor);
FastSetPixel(bmpLD[i],12,58,dacolor);
end;
end;
daboolean:=FindBitmapIn(bmpLD[i],x,y,mmx1,mmy1,mmx2,mmy2);
until ((i=7) or (daboolean));
end;
until ((dacolor=254) or (daboolean));
i:=0;
repeat
i:=i+1;
FreeBitmap(bmpLD[i]);
until i=7;
x:=x+xAddToBmp;
y:=y+yAddToBmp;
result:=daboolean;
end;

begin
SetupSRL;
activateclient;
makecompass('n');
FindLumbyDoor1st('west');
mouse(x,y,0,0,true);
repeat
wait(30);
until isfkeydown(12);
FindLumbyDoor1st('south');
mouse(x,y,0,0,true);
repeat
wait(30);
until isfkeydown(11);
FindLumbyDoor1st('east');
mouse(x,y,0,0,true);
repeat
wait(30);
until isfkeydown(12);
FindLumbyDoor1st('north');
mouse(x,y,0,0,true);
end.

solarwind
01-10-2007, 05:21 AM
Alright. I'm with ya, I'll test and try to post progress reports if time allows. I have another set of exams for the other half of my subjects soon.

Boreas
01-10-2007, 05:24 AM
Thanks. I didn't put any debug stuff in this particular function to report, it will either click the doors or not. Good luck with your exams, lol real life always getting in the way...

solarwind
01-10-2007, 05:28 AM
Lol, yeah, I got 95% average on the 4 other ones I did a few weeks ago, so the coming ones should be fine. Anyway, I'll try to add debug stuff to see what's going on. I see you're being innovative and using things not many people dared to use, such as FastSetPixel. That's great.

Boreas
01-10-2007, 05:47 AM
It was either that or 350 bitmaps lol. I didn't want to use tolerance because it can only be certain colors.

I took a bitmap of the checkered room and blacked out everything except the doors. This is the bitmap that those 7 are based on.

http://img150.imageshack.us/img150/9378/lumbydoorsll0.png (http://img150.imageshack.us/img150/9378/lumbydoorsll0.png)

Since they are all based on that, if you were to lay them on top of each other, lining up the top left corner, they all match up. And the top left corner is what the findbitmap returns. So that case statement gives the door positions relative to the top left corner of the bitmap, so the mouse will click the door and not the corner. Basically the bitmaps just find the north west corner of the room, and the case uses that to find the door.

To allow of a little bit of map rotation, each bitmap only has the middle 2 pixels of each door. The first of 7 has all 4, and the other 6 have different combinations of 2 doors, to allow for npcs and player dots blocking. It looks for the one with 4 first, because the others have a potential for false positives, this is part of testing.

At the moment it goes through about 50 possible door colors, sticking them in the bitmaps. If this version works but is laggy, I will find the door color first, and then stick only that color in the 7 bitmaps, which will reduce a lot of lag.

Setpixel works great when you know the shape of something, but not the color. The thing is tolerance usually covers this. However in this case I want to avoid the colors in drop dots.

It's simpler than it looks, and there's only a few places it can mess up. Bitmap being too unique that it can't find it, or so vague that it gets a false positive (maybe by kitchen).

joey0101
01-10-2007, 08:47 PM
I'll happily Test, if you still need them

Boreas
01-10-2007, 09:46 PM
Thank you I always need testers, as this is an 'innocent until proven guilty' situation. Meaning I need people to find situations where it doesn't work, know whether it works or not.

bharat
01-10-2007, 10:22 PM
it works... i tested on all the door... like you said, it got a bit laggy when trying to work out where the door was... wow.. thats a great length of script for such a simple task... i honour you *bows* lol keep up the good work.

Boreas
01-10-2007, 10:59 PM
Thank you. Eh the length is mostly due to bitmaps and setpixels, which allow it to work when dots cover up some doors, and the case allowing it to work for 4 doors. Although I agree this if fairly complicated for just simply clicking something on the minimap.

I will start work on the less laggy version, and post tonight or tomorrow. More testing of this still appreciated though, as I said, innocent until proven guilty...

bullzeye95
01-11-2007, 01:27 AM
First off, I'd like to say that it worked good. But, as you said it would, it lagged alot. To fix this, I just added a wait(1); in the middle of the cases like this 5:
begin
FastSetPixel(bmpLD[i],17,28,dacolor);
FastSetPixel(bmpLD[i],17,29,dacolor);
wait(1);
FastSetPixel(bmpLD[i],11,58,dacolor);
FastSetPixel(bmpLD[i],12,58,dacolor);
end;

It almost fixes the whole lag problem. It takes about one more second at the most however. Ehh use that if you actually mind the lag (which I don't).

Boreas
01-11-2007, 01:42 AM
K I haven't finished this but I'm going out so I'm posting it. Pretty lag free. I will compare it to your method when I get back. This focuses more on reducing the number of bitmaps it searches for by only trying 1 color.

program TestForFindLumbyDoor1st;
{start in middle of checkered room in first floor lumby castle (or outside
if door is open)
should click west, then you press f12
then it click south, then you press f11
then it click east then you press f12
then it click north door
}
{.include SRL/SRL.scar}


{************************************************* ******************************
function FindLumbyDoor1st(Direction:string):boolean;
By: Boreas
Description: Sets x,y to the location of one of the 4 doors in lumbridge
castle 1st floor foyer (the chessboard room)
Direction: 'north','east','south','west'
************************************************** *****************************}
function FindLumbyDoor1st(Direction:string):boolean;
var
xAddToBmp,yAddToBmp:integer;
bmpLD:array [1..7] of integer;
i,dacolor,DoorColor:integer;
daboolean,AutoDoor:boolean;
//CompassBox:Tbox;
begin
//CompassBox:=cBox2(546,3,585,36);
case Direction of
'north':
begin
xAddToBmp:=9+random(4);
yAddToBmp:=1;
end;
'east':
begin
xAddToBmp:=17;
yAddToBmp:=25+random(8);
end;
'south':
begin
xAddToBmp:=10+random(4);
yAddToBmp:=58;
end;
'west':
begin
xAddToBmp:=1;
yAddToBmp:=13+random(8);
end;
end;


bmpLD[1] := BitmapFromString(18, 59, 'z78DAEDD7310D00000803304B5' +
'3817F49BC9CBC90D6C0921D902537D4100018DFE15F16807B AB73' +
'0000B04136EBA0014E51AF1D');
bmpLD[2] := BitmapFromString(13, 59, 'z78DAEDD8210100000803B04A4' +
'F41FF48D86B14628BB1E48B2901000000E0A48F6501490161 1E');
bmpLD[3] := BitmapFromString(18, 30, 'z78DA33301805A360148C82513' +
'00A862A700383E167D7281805A360148C96B700863461AF') ;
bmpLD[4] := BitmapFromString(12, 18, 'z78DA33301878E086040C46C12' +
'81805230C502BEF536E0E00CC34F511');
bmpLD[5] := BitmapFromString(18, 59, 'z78DAEDD7310900000800C14AA' +
'6B07F24C100E2287257E0E78F0000009864FBD70200002E3F C8E6' +
'0E0ADEDDAD0D');
bmpLD[6] := BitmapFromString(18, 30, 'z78DA3330181AC00D09188C825' +
'1300A46C1281805A360148C8251300AE8DE1AA7A75D000A25 61AF' +
'');
bmpLD[7] := BitmapFromString(13, 59, 'z78DAEDD7410900000800B14AA' +
'6B07F24413308225B80FB5F04C067D96ED6000000F63E6814 A4B6' +
'611E');
///////////////auto door color finder//////////////////
dacolor:=200;
repeat
dacolor:=dacolor+1;
if not(((dacolor=206)or(dacolor=217)or(dacolor=233)or (dacolor=241)))then
begin
AutoDoor:=findmmcolor(x,y,dacolor);
end;
until ((dacolor=254) or (AutoDoor));
DoorColor:=dacolor;
writeln(inttostr(dacolor));
if AutoDoor=true then writeln('true');
///////////////////auto door color finder end////////////////////
dacolor:=200;
repeat
dacolor:=dacolor+1;
///////////door color user ////////////////
if AutoDoor then
begin
dacolor:=DoorColor;
AutoDoor:=false;
end;
/////////////door color user end///////////////
if not(((dacolor=206)or(dacolor=217)or(dacolor=233)or (dacolor=241)))then
begin
i:=0;
repeat
i:=i+1;
case i of
1:
begin
FastSetPixel(bmpLD[i],10,1,dacolor);
FastSetPixel(bmpLD[i],11,1,dacolor);
FastSetPixel(bmpLD[i],1,16,dacolor);
FastSetPixel(bmpLD[i],1,17,dacolor);
FastSetPixel(bmpLD[i],17,28,dacolor);
FastSetPixel(bmpLD[i],17,29,dacolor);
FastSetPixel(bmpLD[i],11,58,dacolor);
FastSetPixel(bmpLD[i],12,58,dacolor);
end;
2:
begin
FastSetPixel(bmpLD[i],10,1,dacolor);
FastSetPixel(bmpLD[i],11,1,dacolor);
FastSetPixel(bmpLD[i],11,58,dacolor);
FastSetPixel(bmpLD[i],12,58,dacolor);
end;
3:
begin
FastSetPixel(bmpLD[i],1,16,dacolor);
FastSetPixel(bmpLD[i],1,17,dacolor);
FastSetPixel(bmpLD[i],17,28,dacolor);
FastSetPixel(bmpLD[i],17,29,dacolor);
end;
4:
begin
FastSetPixel(bmpLD[i],10,1,dacolor);
FastSetPixel(bmpLD[i],11,1,dacolor);
FastSetPixel(bmpLD[i],1,16,dacolor);
FastSetPixel(bmpLD[i],1,17,dacolor);
end;
5:
begin
FastSetPixel(bmpLD[i],17,28,dacolor);
FastSetPixel(bmpLD[i],17,29,dacolor);
FastSetPixel(bmpLD[i],11,58,dacolor);
FastSetPixel(bmpLD[i],12,58,dacolor);
end;
6:
begin
FastSetPixel(bmpLD[i],10,1,dacolor);
FastSetPixel(bmpLD[i],11,1,dacolor);;
FastSetPixel(bmpLD[i],17,28,dacolor);
FastSetPixel(bmpLD[i],17,29,dacolor);
end;
7:
begin
FastSetPixel(bmpLD[i],1,16,dacolor);
FastSetPixel(bmpLD[i],1,17,dacolor);
FastSetPixel(bmpLD[i],11,58,dacolor);
FastSetPixel(bmpLD[i],12,58,dacolor);
end;
end;
daboolean:=FindBitmapIn(bmpLD[i],x,y,591,40,mmx2,mmy2);
if daboolean then writeln(inttostr(x)+' '+inttostr(y));
until ((i=7) or (daboolean));
end;
until ((dacolor=254) or (daboolean));
i:=0;
repeat
i:=i+1;
FreeBitmap(bmpLD[i]);
until i=7;
x:=x+xAddToBmp;
y:=y+yAddToBmp;
result:=daboolean;
end;

begin
SetupSRL;
activateclient;
gametab(2);
gametab(4);
makecompass('n');
wait(random(500)+500);
makecompass('n');
FindLumbyDoor1st('west');
mouse(x,y,0,0,true);
repeat
wait(30);
until isfkeydown(12);
FindLumbyDoor1st('south');
mouse(x,y,0,0,true);
repeat
wait(30);
until isfkeydown(11);
FindLumbyDoor1st('east');
mouse(x,y,0,0,true);
repeat
wait(30);
until isfkeydown(12);
FindLumbyDoor1st('north');
mouse(x,y,0,0,true);
end.


------------------------------------------------------------------------------
EDIT: Ok I did some testing and found the reducing the number of bitmap searches with a sort of auto color makes a huge difference, it finds it instantly...when it works.

It worked when I adjusted the compass the angles so that the lines where perfectly horizontal and vertical, which is how I took my bitmaps. If makecompass goes to the same angle everytime, I'll get new bitamps at that angle. If not, I'll make a compass function to get the lines horizontal and vertical.

Now, after adjusting manually, sometimes it didn't work. This is due to minimap shifting, making rectangles look like this:
..._____
..|..........|
..|..........|
..|..........|.....................minimap shift here
.|..........|
.|..........|
.|_____|

Fortunately, there only a few spots where a shift would change the bitmap, so I could make a few more sets of them, like 21 or 28 bitmaps. Although this wouldn't be too bad, especially now that I reduced the number of colors to try, I would prefer a smarter solution. I will settle for making more bitmaps if I have to, but it's like having a whole bunch of 'if this situation, then do that' vs one 'figure it out on your feet' if you know what I mean.

Eh, I'll think about it tomorrow. Any ideas for getting minimap horizontal and vertical, or a quicker way of solving the shift problem are appreciated.

Boreas
01-12-2007, 02:13 PM
OK I had a think about this last night, and have come up with 2 solutions, both of them seem like a huge pain in the ass for something so simple, so if you have better ideas, please do tell.

1) I stick with set pixel and bitmaps. However it needs compass to have the lines straight as possible for a hope of working, this requires writing a special compass function, which will probably need a reliable auto wall color. This would be pretty simple to write, but it's just extra hassle. Then, even with the minimap straight, to allow for shifting, I would have to make extra bitmaps, this is a pain too. The good thing about this method is that I've already got a start, and it's a simple setup, new compass first, then 2 repeats.

2) I drop the bitmaps and setpixels completely and go for FindColorSkipBoxArray, with an analyzing algorithm. I'm thinking this will run faster, but will be more complicated to write than 2 repeats. Also, this will allow for more minimap distortion, and won't need an extra compass function. It will need however, more complicated looping, plus the analyzing. Bear with me, I thought of this while laying in bed last night: it will work by first finding the door color as before, then looking for it with FindColorSkipBoxArray, once it finds the color, it expands a box around it, until it doesn't find the color in the pixels around it. This creates a box that contains the door with at least 1 pixel of non-door-color buffer around it. This box is added to the skip array, and this is repeated until it has a bunch of boxes with a door in each one, that part isn't so bad. Then it will look at the distances and angles between them, to figure out which is which. Figuring out how it decides this so that it works every time will be a pain in the ass like fine tuning a DTM.


I'm leaning towards 2 because I know how to do more of it than 1, although a straight line compass with auto wall color would be useful for other stuff. What do you think?

GoF
01-12-2007, 04:09 PM
Ill test in a while and tell how it goes.

tarajunky
01-12-2007, 05:08 PM
I made a modified compass before that made the lines straight. Pretty much what I did was search for the DTM of a straight horizontal or vertical line.

With the DTM you can set the color tolerance to like 50 so you don't need an exact wall color. (AutoWallColor should be very easy, though)

I wrote it not be EXACTLY accurate by allowing the spots on the DTM to have a small amount of area tolerance.

This is old, conflicts with SRL, and almost certainly doesn't work now, but I'll put it here so you can look at it.


procedure MakeCompass(Direction: string; Straight:boolean);
var
StraightMM:integer;
myAngle, rsAngle: Extended;
begin
ActivateClient;
case LowerCase(Direction) of
'n': myAngle:= 360;
'e': myAngle:= 270;
's': myAngle:= 180;
'w': myAngle:= 90;
end;
rsAngle:= DetectRS2MinimapCompassAngle;
if(rsAngle = -1)then
begin
WriteLn('Could not find angle');
Exit;
end;
If (Straight) then
begin
StraightMM := DTMFromString('78DA63AC616260A8604001CF5EBC669003D 28' +
'C40FC1F0818EBF0AB0101C606FC6AC0B809BF1A2610DD825F 0D33' +
'886EC3AF86058801A9841AFF');
rsAngle:= Abs(-rsAngle div Pi * 180);
if (FindDTM(StraightMM,x,y,515,1,760,160))then begin
WriteIt('Found Straight Line');
FreeDTM(StraightMM);
Exit;
end;
if AngleDistance(myAngle, rsAngle) then
begin
repeat
Wait(10+random(50));
KeyDown(VK_RIGHT);
Wait(3+Random(4));
KeyUp(VK_RIGHT);
rsAngle:= Abs(-DetectRS2MinimapCompassAngle div Pi * 180);
until (FindDTM(StraightMM,x,y,515,1,760,160)) or(rsAngle <= myAngle - 15)or(rsAngle >= myAngle + 15);
If Not(FindDTM(StraightMM,x,y,515,1,760,160)) then
begin
FreeDTM(StraightMM);
MakeCompass(Direction,True);
end else
begin
WriteIt('Found Straight Line');
FreeDTM(StraightMM);
Exit;
end;
end else
begin
repeat
Wait(10+random(50));
KeyDown(VK_LEFT);
Wait(3+random(4));
KeyUp(VK_LEFT);
rsAngle:= Abs(-DetectRS2MinimapCompassAngle div Pi * 180);
until (FindDTM(StraightMM,x,y,515,1,760,160)) or(rsAngle <= myAngle - 15)or(rsAngle >= myAngle + 15);
If Not(FindDTM(StraightMM,x,y,515,1,760,160)) then
begin
FreeDTM(StraightMM);
MakeCompass(Direction,True);
end else
begin
WriteIt('Found Straight Line');
FreeDTM(StraightMM);
Exit;
end;
end;
end else
begin
rsAngle:= Abs(-rsAngle div Pi * 180);
if (rsAngle >= myAngle - 5)and(rsAngle <= myAngle + 5)then
Exit;
if AngleDistance(myAngle, rsAngle) then
begin
KeyDown(VK_RIGHT);
repeat
Wait(15);
rsAngle:= Abs(-DetectRS2MinimapCompassAngle div Pi * 180);
until (rsAngle >= myAngle - 5)and(rsAngle <= myAngle + 5);
KeyUp(VK_RIGHT);
end else
begin
KeyDown(VK_LEFT);
repeat
Wait(15);
rsAngle:= Abs(-DetectRS2MinimapCompassAngle div Pi * 180);
until (rsAngle >= myAngle - 5)and(rsAngle <= myAngle + 5);
KeyUp(VK_LEFT);
end;
end;
end;

Boreas
01-12-2007, 09:23 PM
Thanks. I think I will go for 2 though, as it handle more imperfection and I will set it up so that it can be used for anything, like the diagonal door to diango's shop. I'll have a function that returns the array of boxes/doors, and then the analyzing function will use it in paramaters.

simba49
01-13-2007, 06:17 AM
turn it into a lumby spinner for flax...everyone will love you ;D

joey0101
01-13-2007, 08:55 AM
hmmm
I get this error
File access error
File access error
File access error
File access error
[Runtime Error] : Exception: Access violation at address 0064C975 in module 'scar.exe'. Read of address 00000004 in line 89 in script D:\Program Files\SCAR 2.03\includes\srl\srl\core\Setup.scar
don't know if windows Vista has anything to do with it.

Boreas
01-13-2007, 05:47 PM
simba I probably will add that, but doors first lol

joey does that happen with other scripts or just mine?

joey0101
01-13-2007, 06:21 PM
um... Let me Check my autologin

Boreas
01-13-2007, 06:33 PM
no an srl script, like wizzys powerminer or something

joey0101
01-13-2007, 10:15 PM
God why does Vista require to download Java, actually i think its IE7

joey0101
01-13-2007, 10:17 PM
no an srl script, like wizzys powerminer or something
Ok, ill use DaWu's Pro Autofighter.

joey0101
01-14-2007, 09:39 AM
OK, I checked DaWu's autofighter pro 2.0, its legde and works so it's just your script that gets stuck oddly enough.

Boreas
01-14-2007, 02:32 PM
K I'll try to look into it, although I have no idea why this would happen.

me_ntal
02-11-2007, 11:02 PM
Worked well, tried it on eleven worlds with 4 different characters so all up tested 14 times, every time it found the door.. so im guessing Worked well.. Hey mate anytime you want anything tested give us a yell

Boreas
02-26-2007, 04:24 PM
Great thanks.

I am working on a (hopefully) faster version, that I need freddys help with, so it won't be ready for while. I will post again when its ready for testing.

Edit:

Update on status

Thanks to Freddy fixing his plugin, I can now get the location of every door on the minimap (this is useful for other places too, but especially lumby castle because there are so many. Now I will use the positions of the doors to find my way around. I will post my plans below, tell me what you think about them before I write them.

For all of these
Need compass to be north. Doesn't have to be perfect, but it will be a pain in the ass to do it so that it works with any angle, and even then, I would have to know what the angle is.

I may make a bitmap of the minimap, and count the player dots every so often. And switch worlds if using SCSS and there are too many, as they can mess with the door thing and symbols.


From Respawn Point to Lobby
Find all water symbols by looking in horizontal strips. Find the 2 with the closest X position. Average these Xs and make that an imaginary vertical line.

Ignore all doors on the right of that line

Going from the line to the left, first is the Main Door. Second and third are top and bottom, use y to determine which is which. Fourth is entrance to big room. 5 and 6 are north and south doors of kitchen.

Now click Main Door, use bramble's door opener, and go inside.


From Lobby to Top or bottom rooms
Same as above, as water symbols should still be visible. If all 3 are not, then check if 2 are, and then go from left of the right most one. If only the one in the kitchen is visible, go from left of center, and take into account Main Door isn't included.


From Lower Room to Kitchen
Find 2 most left doors. Find the bottom most of those 2. Thats entrance to kitchen.

Click quest symbol or water symbol closest to middle to get in kitchen.


From Lower Room to middle floor
Need auto ladder finder on minimap!!!

Need something like a door opener except for stairs. Perhaps bitmap slices.


Middle floor
Find all doors.

Second from top is room for quest.

Third from top is spinning wheel.

Switch from other stairs.


Middle floor to top floor
Same as other stairs except with up or down choice in chatbox


Top floor
No doors.

Cannot rely on yellow banker dot, as usually covered

Question mark and bank symbols will get you close, but not always inside

So will need a good bank booth finder that doesn't need to be standing close.



Using the doors that way seems kinda complicated, but it's really not. I think that part should be pretty solid. The symbol finding in strips may be slow though. And the main screen stuff like bank booth and stair finding needs to be good and quick. Not sure how I will do those yet. Not sure how I will do the ladder finding either. It's not the same as the mining guild ladder, but something like Tarajunkys may work just with different numbers.

Seems pretty doable. What do you think?

ReyMen
03-02-2007, 04:28 PM
Yup , it seems that it will be a huge project
So what will it be ?

Boreas
03-02-2007, 04:37 PM
Well the nice thing about this is that can evolve, while I am busy with other things. These are things I may add:

Walk to bank from respawn point
Do above, deposit all, get armor, walk back
Get noob stuff from guides and bank
Bank to cooking spot and back
Bank to spinning spot and back
Light logs on fire by bank
Do the beginning of rune mysteries quest
Train skills around lumbridge
Be the script you run right after tutorial island.

seaking
03-04-2007, 12:29 AM
If you had enough chars you could have them all go get runes from the guide and keep switching lol.

Respawn to bank would be really good, because then you could also program it into the Goblin Scheduler, so right after your char is done with tut island, he goes and banks his stuff then goes and kills goblins to lvl 20+. :D

Boreas
03-04-2007, 12:36 AM
Yup thats the plan :D

RudeBoiAlex
03-04-2007, 01:31 PM
Seems like a big project lol

Boreas
03-04-2007, 08:49 PM
Eh, I'm getting it done bit by bit. Last night I finished a door finder, that returns the location of every door on the minimap, ignoring drop dots. Probably tonight I will write something to find the northern most door etc. Once that's done, I'll need a auto ladder color for the minimap, and a mainscreen stair climber. That will take a littler longer. But once I get those out the way, I can use them to walk around very easily, and the features will start coming in.

RudeBoiAlex
03-04-2007, 08:51 PM
-.- Man u get so good a scripting

Boreas
03-04-2007, 08:54 PM
Hehe the hours of reading tutorials are worth it.

Smartzkid
03-04-2007, 09:05 PM
When you write a door opener, I wanna see how you did it. It took me over 100 lines to make a door-opener procedure.

Boreas
03-04-2007, 09:08 PM
I am writing a click on red on minimap to get close to it. Then I will use brambles
door opener, which is posted somewhere.

Smartzkid
03-04-2007, 09:10 PM
Ohh, I see. If you finish the get-close-to-door procedure sometime soon, could you please PM it to me?

I'll have to investigate that door opener...

EDIT: I think it's in the Member's snippets section...

Boreas
03-04-2007, 09:15 PM
program New;
{.include SRL/SRL.scar}

var doorcolor:integer;

var skippingarray:tboxarray;
AOTPA:array of TpointArray;

vx,f,vy:integer;

function GetDoorColor:integer;
var Color,tmpx,tmpy,MinOfRange:integer;
Length206,Length217,Length233,Length241:integer;
Array206,Array217,Array233,Array241:array of tpoint;
RangeOfOthers206,RangeOfOthers217,RangeOfOthers233 ,RangeOfOthers241:integer;
tmpbool:boolean;
begin
for Color:=200 to 254 do
begin
if not(((Color=206)or(Color=217)or(Color=233)or(Color =241))) then
begin
if FindColor(tmpx,tmpy,Color,mmx1,mmy1,mmx2,mmy2) then
begin
result:=Color;
tmpbool:=true;
end;
end;
if tmpbool then break;
end;
if not(tmpbool) then
begin
//writeln('its a drop dot color');
FindColorsTolerance(Array206,206,mmx1,mmy1,mmx2,mm y2,0);
Length206:=getarraylength(Array206);
FindColorsTolerance(Array217,217,mmx1,mmy1,mmx2,mm y2,0);
Length217:=getarraylength(Array217);
FindColorsTolerance(Array233,233,mmx1,mmy1,mmx2,mm y2,0);
Length233:=getarraylength(Array233);
FindColorsTolerance(Array241,241,mmx1,mmy1,mmx2,mm y2,0);
Length241:=getarraylength(Array241);
RangeOfOthers206:=max(Length233,max(Length217,Leng th241))-min(Length233,min(Length217,Length241));
RangeOfOthers217:=max(Length233,max(Length206,Leng th241))-min(Length233,min(Length206,Length241));
RangeOfOthers233:=max(Length206,max(Length217,Leng th241))-min(Length206,min(Length217,Length241));
RangeOfOthers241:=max(Length233,max(Length217,Leng th206))-min(Length233,min(Length217,Length206));
MinOfRange:=min(RangeOfOthers206,min(RangeOfOthers 217,min(RangeOfOthers233,RangeOfOthers241)));
case MinOfRange of
RangeOfOthers206: result:=206;
RangeOfOthers217: result:=217;
RangeOfOthers233: result:=233;
RangeOfOthers241: result:=241;
end;
end;
end;


function tPtArrayToStr(newTPoint: TPointArray): string;
var
i: Integer;
begin
for i:=0 to GetArrayLength(newTPoint)-1 do
begin
Result := Result + IntToStr(newTPoint[i].x) + ',' +
IntToStr(newTPoint[i].y);
if (not (i = (GetArrayLength(newTPoint) - 1))) then
Result := Result + ' ';
end;
end;

function BoxArrayToArrayOfTPA(Color:integer; Boxes:array of TBox): array of TPointArray;
var i:integer;
begin
setarraylength(result,getarraylength(boxes));
for i:=0 to GetArrayLength(Boxes)-1 do
FindColorsTolerance(result[i],Color,Boxes[i].x1,Boxes[i].y1,Boxes[i].x2,Boxes[i].y2,0);
end;


procedure DisplayPicture(TheBox:tbox);
var
DebugCanvas, ClientCanvas: TCanvas;
w, h, bmp: Integer;

begin
w := Thebox.x2 - Thebox.x1;
h := Thebox.y2 - Thebox.y1;
ActivateClient;
DisplayDebugImgWindow(w, h);
DebugCanvas := GetDebugCanvas;
ClientCanvas := GetClientCanvas;
SafeCopyCanvas(ClientCanvas, DebugCanvas, TheBox.x1,TheBox.y1,TheBox.x2,TheBox.y2, 0, 0, w, h);
//bmp := BitmapFromString(w, h, '');

//CopyClientToBitmap(bmp,Thebox.x1, Thebox.y1, Thebox.x1 + w, Thebox.y1 + h);
//DisplayDebugImgWindow(w, h);
//CopyCanvas(GetBitmapCanvas(bmp), GetDebugCanvas, TheBox.x1,TheBox.y1,TheBox.x2,TheBox.y2, 0, 0, w, h);

end;

function SurroundBox(px,py:integer):Tbox;
var Inner,Outer:Tbox;
PointColor,dx,dy:integer;
begin
PointColor:=GetColor(px,py);
Inner.x1:=px;
Inner.y1:=py;
Inner.x2:=px;
Inner.y2:=py;
Outer.x1:=px-5;
Outer.y1:=py-5;
Outer.x2:=px+5;
Outer.y2:=py+5; {
repeat
// Outer.x1:=Outer.x1-1;
Inner.x1:=Inner.x1-1;
//writeln('test3');
until (not(FindColorSkipBox(dx,dy,PointColor,Outer.x1,Ou ter.y1,Inner.x1,Outer.y2,Inner)));
//writeln('test2');
repeat
// Outer.Y1:=Outer.Y1-1;
Inner.Y1:=Inner.y1-1;
until (not(FindColorSkipBox(dx,dy,PointColor,Outer.x1,Ou ter.y1,Outer.x2,Outer.y2,Inner)));
//writeln('test1');
repeat
//Outer.x2:=Outer.x2+1;
Inner.x2:=Inner.x2+1;
until (not(FindColorSkipBox(dx,dy,PointColor,Outer.x1,Ou ter.y1,Outer.x2,Outer.y2,Inner)));
// writeln('test1');
repeat
// Outer.y2:=Outer.y2+1;
Inner.y2:=Inner.y2+1;
until (not(FindColorSkipBox(dx,dy,PointColor,Outer.x1,Ou ter.y1,Outer.x2,Outer.y2,Inner)));
//writeln('test1');
Result:=inner; }result:=outer;
end;

var arraylength,i,t:integer;
tpa:tpointarray;
function MidPointOfLine(TheArray:array of Tpoint):Tpoint;
//var tmpresult:T:integer;
begin

result:=TheArray[round(getarraylength(TheArray)/2)-1];
end;
function IsTPointInDropDot(TP:Tpoint):boolean;
var color:integer;
begin
color:=getcolor(TP.x,TP.y);
case color of
206:
begin
if (getcolor(TP.x,TP.y-1)=233)
or (getcolor(TP.x-1,TP.y)=241)
or (getcolor(TP.x-2,TP.y+1)=217)then
result:=true;
end;
217:
begin
if (getcolor(TP.x+1,TP.y-1)=241)
or (getcolor(TP.x+2,TP.y-1)=206)
or (getcolor(TP.x+2,TP.y-2)=233)then
result:=true;
end;
233:
begin
if (getcolor(TP.x,TP.y+1)=206)
or (getcolor(TP.x-1,TP.y+1)=241)
or (getcolor(TP.x-2,TP.y+2)=217)then
result:=true;
end;
241:
begin
if (getcolor(TP.x+1,TP.y-1)=233)
or (getcolor(TP.x+1,TP.y)=206)
or (getcolor(TP.x-1,TP.y+1)=217)then
result:=true;
end;
else result:=false;
end;
end;
function IgnoreDropDots(TheList:array of array of tpoint):array of array of tpoint;
var
pTo,pFrom:integer;
pList:integer;
begin
result:=TheList;

for pList :=0 to getarraylength(result)-1 do
begin
pTo:=0-1;
pFrom:=0;
for pFrom:=0 to getarraylength(result[pList])-1 do
begin
if not(IsTPointInDropDot(result[pList][pFrom])) then
begin
pTo:=pTo+1;
result[pList][pTo]:=result[pList][pFrom];
end;
end;
setarraylength(result[pList],pto+1);
end;

pTo:=0-1;
pFrom:=0;
for pFrom:=0 to getarraylength(result)-1 do
begin
if not(getarraylength(result[pFrom])=0) then
begin
pTo:=pTo+1;
result[pTo]:=result[pFrom];
end;
end;
// writeln(inttostr(pto));
setarraylength(result,pto+1);
end;
function FindDoorColor: Integer;
var
arRoughDoorColors, arFineDoorColors: TPointArray;
i, bmpRedDot: Integer;
begin
bmpRedDot := BitmapFromString(2, 2, 'FE2020FC0606FC0606F10000');
FindColorsSpiralTolerance(MMCX, MMCY, arRoughDoorColors, 241, MMX1, MMY1, MMX2, MMY2, 20);
for i := 0 to GetArrayLength(arRoughDoorColors) - 1 do
begin
FindColorsSpiralTolerance(arRoughDoorColors[i].x, arRoughDoorColors[i].y, arFineDoorColors, 241, arRoughDoorColors[i].x - 4, arRoughDoorColors[i].y - 4, arRoughDoorColors[i].x + 4, arRoughDoorColors[i].y + 4, 20);
if(GetArrayLength(arFineDoorColors) = 3)and
(not(FindBitmapToleranceIn(bmpRedDot, x, y, arRoughDoorColors[i].x - 4, arRoughDoorColors[i].y - 4, arRoughDoorColors[i].x + 4, arRoughDoorColors[i].y + 4, 20)))then
begin
Result := GetColor(arRoughDoorColors[i].x, arRoughDoorColors[i].y);
Writeln('Found possible door at x = ' + IntToStr(arRoughDoorColors[i].x) + ' y = ' + IntToStr(arRoughDoorColors[i].y));
FreeBitmap(bmpRedDot);
Exit;
end
end;
FreeBitmap(bmpRedDot);
Writeln('Door color not found.');
end;
begin
SetupSRL;
t:=getsystemtime;
doorcolor:=finddoorcolor;
// DisplayPicture(657,120,671,129);
//mybox:=Surroundbox(myx,myy);
//setarraylength(skippingarray,1);
//skippingarray[0].x1:=0;
//skippingarray[0].y1:=0;
//skippingarray[0].x2:=1;
//skippingarray[0].y2:=1;

//arraylength:=1;
repeat {566,6,730,163}
if FindColorSkipBoxArray(vx,vy,DoorColor,mmx1,mmy1,mm x2,mmy2,skippingarray) then
begin
//writeln('found');
//writeln(inttostr(arraylength));
//arraylength:= getarraylength(skippingarray);
arraylength:=arraylength+1;
setarraylength(skippingarray,arraylength);
skippingarray[arraylength-1]:= Surroundbox(vx,vy);
//writeln('test1');
end;
//writeln(inttostr(arraylength));
wait(1);
until ((isfkeydown(11)) or (not(FindColorSkipBoxArray(vx,vy,DoorColor,mmx1,mm y1,mmx2,mmy2,skippingarray))));
//writeln('done');
{ repeat
repeat
wait(1000);
until isfkeydown(12);
i:=i+1;
DisplayPicture(Skippingarray[i]);
repeat
wait(1000);
until isfkeydown(11);

until i=(arraylength-1); }

AOTPA:=BoxArrayToArrayOfTPA(doorColor,Skippingarra y)
AOTPA:=ignoredropdots(aotpa);
setarraylength(TPA,getarraylength(AOTPA));
for f:= 0 to getarraylength(AOTPA)-1 do
TPA[f]:=MidPointOfLine(AOTPA[f]);
//for f:= 0 to getarraylength(AOTPA)-1 do
//writeln(tPtArrayToStr(AOTPA[f]));
for f:= 0 to getarraylength(AOTPA)-1 do
writeln(inttostr(tpa[f].x)+','+inttostr(tpa[f].y));
writeln(inttostr(getsystemtime-t)+' ms');
end.

It's really messy, I'll clean it up later. Run it on RS and it will spit out the location of each door. I need to write something to pick which door is the right one, also I'll do a better way of making a box around each door.

I'll talk to bramble about releasing door opener.

Bramble
03-05-2007, 02:52 AM
enjoy, tell me how it works for you as i have been the only one to really test it, but when i test stuff, i take my time

program New;
{.include srl/srl.scar}

Function MyOpenDoor(Dir:string):boolean;
var doorfound:string;i:integer;CoX:Array[0..8] of integer;
CoY:Array[0..8] of integer;
begin
Cox[0]:=326;
Coy[0]:=151;
Cox[1]:=246;
Coy[1]:=156;
Cox[2]:=186;
Coy[2]:=156;
Cox[3]:=330;
Coy[3]:=155;
Cox[4]:=273;
Coy[4]:=154;
Cox[5]:=219;
Coy[5]:=153;
Cox[6]:=306;
Coy[6]:=158;
Cox[7]:=281;
Coy[7]:=186;
Cox[8]:=217;
Coy[8]:=155;
keydown(40);
wait(1500);
keyup(40);
wait(500+random(+250));
makecompass(dir);
doorfound := 'no';
repeat
if (doorfound = 'no') then
begin
mmouse(Cox[i],Coy[i],3,3);
if (IsUpTextMulti('Door', 'Doo', 'oor') = true) then
begin
if (IsUpTextMulti('Open', 'Op', 'en') = true) or (isuptextmulti('Ope', 'pen', 'Open') = true) then
begin
GetMousePos(x,y);
mouse(x,y,0,0,true);
Doorfound := 'yes';
end;
if (IsUpTextMulti('Close', 'lo', 'se') = true) then
begin
Doorfound := 'yes';
end;
end;
end;
i:= +1;
until (i = 3) or (doorfound = 'yes');
if (doorfound = 'no') then
begin
keydown(38);
wait(200);
keyup(38);
wait(1000+random(250));
end;
repeat
if (doorfound = 'no') then
begin
mmouse(Cox[i],Coy[i],3,3);
if (IsUpTextMulti('Door', 'Doo', 'oor') = true) then
begin
if (IsUpTextMulti('Open', 'Op', 'en') = true) or (isuptextmulti('Ope', 'pen', 'Open') = true) then
begin
GetMousePos(x,y);
mouse(x,y,0,0,true);
Doorfound := 'yes';
end;
if (IsUpTextMulti('Close', 'lo', 'se') = true) then
begin
Doorfound := 'yes';
end;
end;
end;
i:= +1;
until (i = 6) or (doorfound = 'yes');
if (doorfound = 'no') then
begin
keydown(38);
wait(200);
keyup(38);
wait(1000+random(250));
end;
repeat
if (doorfound = 'no') then
begin
mmouse(Cox[i],Coy[i],3,3);
if (IsUpTextMulti('Door', 'Doo', 'oor') = true) then
begin
if (IsUpTextMulti('Open', 'Op', 'en') = true) or (isuptextmulti('Ope', 'pen', 'Open') = true) then
begin
GetMousePos(x,y);
mouse(x,y,0,0,true);
Doorfound := 'yes';
end;
if (IsUpTextMulti('Close', 'lo', 'se') = true) then
begin
Doorfound := 'yes';
end;
end;
end;
i:= +1;
until (i = 9) or (doorfound = 'yes');
if (doorfound = 'no') then
writeln('Couldnt open door, or door is allready open');
end;

begin
setupsrl;
activateclient;
MyOpenDoor('n');
end.

Boreas
03-19-2007, 01:05 PM
Thanks.

Update: finished function that can sort the Tpoints that the above spits out, can sort by x or y, up or down, and returns whatever part of the array you want (top 2, bottom 3, third thru sixth). Next is auto ladder color finder.


Edit: Update
Auto Ladder Color is finished, works pretty well, looks at RGBs on a canvas. Trees messed it up, so I made HowManyAround to find how many of a color is around a point, which worked for trees because they had less than ladders. However, rock color still messed it up, so I had to do HowManyAround for floor color. So the below script works if you color pick floor and put in constant. I am now working on autocolor for floor, specifically for use in lumbridge castle ground floor. The floor color will change after going up stairs, but the ladder color won't.

Lemme know if it works for you
program ladder;

const
floorcolor=9934498;


function HowManyAround(HalfWidth,ParX,ParY,TheColor:integer ;WhichCanvas:tcanvas):integer;
var MyX,MyY,MyColor,TmpResult:integer;
begin
for MyY:=ParY-(HalfWidth) to ParY+(HalfWidth) do
begin
for MyX:=ParX-(HalfWidth) to ParX+(HalfWidth) do
begin
MyColor:=WhichCanvas.pixels[MyX,MyY];
if MyColor=TheColor then
TmpResult:=TmpResult+1;
end;
end;
result:=TmpResult;
end;



function GetLadderColor(TheFloorColor:integer):integer;
var
TmpBmp,MyX,MyY:integer;
MyColor,TmpInt: integer;
MyCanvas:tcanvas;
TmpBool:boolean;

begin
TmpBmp:= BitmapFromString(100,90,'');
MyCanvas:=GetBitmapCanvas(TmpBmp)

CopyCanvas(GetClientCanvas,MyCanvas,598,39,698,129 ,0,0,100,90)
for MyY:=0 to 99 do
begin
for MyX:=0 to 89 do
begin
MyColor:= MyCanvas.pixels[MyX,MyY];
if not(MyColor=78673)then
if ((MyColor/256) / 256) <20 then
begin
if ((MyColor/256) mod 256) <65 then
begin
if ((MyColor/256) mod 256) >15 then
begin
if (MyColor mod 256) < 105 then
begin
if (MyColor mod 256) > 60 then
begin
TmpInt:=HowManyAround(4,MyX,MyY,TheFloorColor,MyCa nvas);
if TmpInt>30 then
begin
if TmpInt<100 then
TmpBool:=true;
end;

end;
end;
end;
end;
end;
if TmpBool then break;
end;
if TmpBool then break;
end;
result:=MyColor;
end;
var TheLadderColor,t:integer;
begin
t:=getsystemtime;
TheLadderColor:=GetLadderColor(FloorColor);
writeln(inttostr(TheLadderColor));
writeln(inttostr(getsystemtime-t)+'ms');
end.

Cheesehunk
03-19-2007, 08:25 PM
Hehe, maybe this will give me the desire to finish my Cooks Assistant Assistant when it's done. :) Keep up the awesome work Boreas!

Boreas
03-20-2007, 02:14 AM
Hehe, Auto Floor color will take me < 1 hour, I dunno bout stair climber, because I suck at mainscreen. But after that I will have all the pieces and you will be able to go anywhere in lumby castle. After that I'll do bank booth finding, but do you need that for cooks assistant?

Cheesehunk
03-21-2007, 01:06 AM
All I really need is getting out of the castle from the main floor in the center room where you start the quest. I am horrible at door finding/opening. Sounds like you've been putting a lot of effort into this, I say convert it to be able to go anywhere in Runescape? Seems like that's the direction your heading in. :p

Smartzkid
03-21-2007, 01:21 AM
I'm curious...does this have anything to do with the wheatpicker you requested?

whales
03-21-2007, 01:34 AM
I'm curious...does this have anything to do with the wheatpicker you requested?

I'm thinking it probably does ;) Any way this is turning out to be amazing. Good Job!

Boreas
03-21-2007, 02:58 AM
Chessehunk: K that's easy with this stuff. Yea I was hoping to make it universal, but my floor color, which is needed for ladder color, is gonna be only for lumby castle ground floor. Which isn't a problem if you start there, because it doesn't change after going upstairs. The door stuff can be used anywhere though, and the ladder to a lesser extent.

Smartz: I wasn't planning for that specifically, just that it would be a multi skill thing. But now that you mention it, yea I may add a flour thing.

Whales: thanks

RudeBoiAlex
03-24-2007, 01:58 PM
tarajunkys L.A.M.E u could add that in if he gives permission

Boreas
03-24-2007, 02:22 PM
Hmm perhaps I will do something to


All you have to do is make sure there are no air or mind runes in your bank.

and tarajunky can add that, since at the moment I'm concentrating on walking around the building. Thanks for the suggestion.

RudeBoiAlex
03-24-2007, 02:29 PM
np

Boreas
03-25-2007, 05:20 AM
Made some improvements on the door thing. Check it out.

Smartzkid
03-25-2007, 05:35 AM
Testin...

Might wanna change line 253 from:
bmpBlankMap:= LoadBitmap(AppPath+'test.bmp');

to

bmpBlankMap:= LoadBitmap(ScriptPath+'test.bmp');

EDIT:

[Runtime Error] : Exception: in line 270 in script C:\Program Files\SCAR 2.03\Scripts\doorsplitdisplay.scar

Boreas
03-25-2007, 01:12 PM
Thanks, I misunderstood how scps work. New script is attached.




http://www.villavu.com/forum/showthread.php?t=6330?t=7328
Get that for the getpixelsd error. Remember to close all scars before putting in new plugin

bullzeye95
03-25-2007, 04:00 PM
Works great :)

No errors whatsoever.

Boreas
03-26-2007, 05:49 PM
Ok now I think I totally pwned door finding.

Handles the 'door color can be the same as drop dot color' issue
Handles multiple door colors (when a door is diagonal it is different color)
Knows the color of each door
Can return 1 point for each door, or all of them
Knows the slope of the doors, ie east-west, north-south etc



The only thing I could think of to make this better is making get data, wait for people dots to move out of the way, and do it again, but for now I'm satisfied.


Edit: bug in include. overwrite the one in the package with the other one

Geo
03-29-2007, 01:29 AM
lol this is crazy soon we won't even have to play the game and all we will se is noob defaults and *mods* in runescape and u will just peave it on 24/7 lol this is crazy :spot: :spot: :spot:

but yea the first one of your scripts on pg 1 all it did for me was it started and then said

o
error detecting compass angle

and lagged out(h)

Boreas
03-29-2007, 02:51 AM
Yea it's gotten much better hehe. The first one was more dependent on the compass rotation, and didn't account for drop dots or secondary door colors :p

Ejjman
03-29-2007, 11:56 PM
Gimme the latest version of DoorProfiles (unless its the one I have) and I'll standardize it. I need the pulses for team Freddy1990.com :)

Boreas
03-30-2007, 01:37 AM
I believe the latest is in the Doors tutorial (link in sig), which may be the same as the one you have.

JokeAss
03-31-2007, 12:22 PM
A door solver! o_O

rkroxpunk
04-02-2007, 02:51 PM
Yay exactly what I'm gonna need for my Miner/Smelter. Did you say you were gonna make stairs/ladders and bank as well cos that would be sweet. Make my job so so much easier :D

RudeBoiAlex
04-04-2007, 10:59 AM
hey boreas u sed the first script u run wont it be an account maker or a tut runner the first 1 u run :P

Boreas
04-04-2007, 02:15 PM
There are no 100% tut runners, and I don't use acct creators. But if it makes you happy;

One of the first scripts you run after getting off tut island.

RudeBoiAlex
04-24-2007, 08:04 PM
yup lol i wnted this script to go bk to the top >.< how mucj percent is it now 30% still?

Boreas
04-24-2007, 10:19 PM
I guess it's more than that, because I have been working on lower level subsystems for it that can also be used for other things, but I haven't worked directly on the script in a while.

Been working on:

A FindSymbol that is designed to work when there are lots of player dots in the way (look for it in SRL 4.0+)

A FindSymbols that will tell me where both water symbols are (look for it in SRL 3.7+).

Doors- gives me info about all the doors on the minimap, most notably location, without getting messed up by drop dots, or dual door colors (look for it in link in sig)

B4- handles withdrawing/depositing and more. Hopefully will be in SRL 4.0, but it will be done when it's done. BlackLists are a part of B4, and you can check out those in link in sig

Finished auto ladder and floor color.

Finished a script that will look at screenies and tell me what color/tolerance to use. Will probably use this for mainscreen stair finding.



When I have finished enough to release something to be tested, I will update sig % and bump this thread. For now, just wait patiently lol.

RudeBoiAlex
04-25-2007, 04:05 PM
kk lol

omfg2007
04-26-2007, 11:40 PM
well this might find it self to be really usfull im gana try a few thens but thx in advance

Lalaji
04-30-2007, 08:25 PM
Yeah helps in opening doors in edge yews + banker