SRL Archive - OSR Help

Door opening.


ralfpker

2013-03-15 01:20:28

Almost complete with my port phast ore to cball smither, but there's only one issue. There is a door on the building with the furnace in it, and my script will run fine as long as the door stays open. I was wondering if someone could please let em know the most efficient way to detect if a door is open or not so i can open it. Please help. thank you.

Itankbots

2013-03-15 01:45:49

Use DTM's Or ATPA's to check for the Uptext if it is open /closed before you enter the building. but yes doors are very annoying and there isnt really a perfect solution.. One of those things that have always been so simple yet annoyed me so much.

ralfpker

2013-03-15 02:15:52

Ok cool, thank you i think i have it figured out now. One more question though, does anyone know why simba constantly cannot find mt DTM's? They will work just fine until i hop worlds or something, then it messes up. Any suggestions?

I am finding the furnace DTM

Brid Mayhem

2013-03-15 02:35:59

From: ralfpker
Ok cool, thank you i think i have it figured out now. One more question though, does anyone know why simba constantly cannot find mt DTM's? They will work just fine until i hop worlds or something, then it messes up. Any suggestions?

I am finding the furnace DTM


Add a higher tolerance, the colors change each time you're logged in/out.

ralfpker

2013-03-15 02:36:24

So would there be any way to add a tolerance to mt DTM? Or a way to have it grab the DTM each time the game loads possibly? Because when i use other people's scripts with DTM's in them, regardless of what world i am in they will run every time.

ralfpker

2013-03-15 02:37:49

procedure smelt;
begin
writeln('Starting Smelting');
repeat
begin
Compass;
writeln('Beggining Trip to Furnace');
repeat
sleep(50 + Random(25));
until FindDTM(DTMFURNACE, x, y, P07_MMX1, P07_MMY1, P07_MMX2, P07_MMY2);
writeln('Moving to Furnace');
Mouse(x, y, 0, 3, True);
repeat
sleep(50);
until (not P07_FindMMFlag);
writeln('Arrival At Furnace');
end;

Thats my function for going to the furnace, where would i add the tolerance there?

Brid Mayhem

2013-03-15 03:45:22

From: ralfpker
procedure smelt;
begin
writeln('Starting Smelting');
repeat
begin
Compass;
writeln('Beggining Trip to Furnace');
repeat
sleep(50 + Random(25));
until FindDTM(DTMFURNACE, x, y, P07_MMX1, P07_MMY1, P07_MMX2, P07_MMY2);
writeln('Moving to Furnace');
Mouse(x, y, 0, 3, True);
repeat
sleep(50);
until (not P07_FindMMFlag);
writeln('Arrival At Furnace');
end;

Thats my function for going to the furnace, where would i add the tolerance there?


The first time you grab the dtm, add tolerance for the colored dots in the DTM editor. You'll see a Tolerance box on the right. (Don't change tolerance for black ones.)

litoris

2013-03-15 03:57:47

Use finddtmsrotatedalternating or whatever it is, that will let you search for the DTM in many angles.
Make a DTM of a very small but unique region on the door.(eg. if the door has stripes, take two points from the stripes and two points from the paler colored region)
Load the result of the function above to a TPA, then split it into an ATPA, then sort them by size, and check each section for door uptext.