SRL Archive - OSR Help

Difficulty finding and walking through door!


Cage

2013-09-27 17:54:12

Hello, I am trying to make a tab maker for learning experience. However, I have come across a problem. I want to make my character go from the portal location, to the lectern room to the left. (see pics below) However, the door colours are very similar which makes it tough to use object finding methods. Also, I tried using DDTMs for walking but to no avail..


Any suggestions would be greatly appreciated!




procedure FindDoor;
var x,y:Integer;
begin
makecompass(0 + randomrange( - 1, 1));
MiniWalkToDoor;
FindObjCustom(X, Y, ['Open','or Op','n Doo','Door'], [600628,3036262,1908000,3959683], 10)
MMouse(X, Y, 2, 2);
clickmouse2(mouse_right);
chooseoption('Open');
WriteLn('Opening Door');
sleep(6000 + random(500));
WalkToLecturn;
end;

[ATTACH=CONFIG]22249[/ATTACH]




[ATTACH=CONFIG]22250[/ATTACH]

YoHoJo

2013-09-27 18:00:37

http://youtu.be/98wVrr6GwyU
AutoColorAid might help!

Also, you need to use some if/thens!
Also, Mouse moves the mouse and clicks, instead of MMouse and then ClickMouse2.

procedure FindDoor;
var x,y:Integer;
begin
makecompass(0 + randomrange( - 1, 1));
MiniWalkToDoor;
if FindObjCustom(X, Y, ['Open','or Op','n Doo','Door'], [600628,3036262,1908000,3959683], 10) then
Begin
Mouse(X, Y, 2, 2, False);
chooseoption('Open');
WriteLn('Opening Door');
sleep(6000 + random(500));
End;
WalkToLecturn;
end;

Cage

2013-09-27 18:31:48

From: YoHoJo

AutoColorAid might help!

Also, you need to use some if/thens!
Also, Mouse moves the mouse and clicks, instead of MMouse and then ClickMouse2.

procedure FindDoor;
var x,y:Integer;
begin
makecompass(0 + randomrange( - 1, 1));
MiniWalkToDoor;
if FindObjCustom(X, Y, ['Open','or Op','n Doo','Door'], [600628,3036262,1908000,3959683], 10) then
Begin
Mouse(X, Y, 2, 2, False);
chooseoption('Open');
WriteLn('Opening Door');
sleep(6000 + random(500));
End;
WalkToLecturn;
end;


Thanks, I will give autocoloraid a try! Would you recommend using DDTMs to get to the lectern room? or would you recommend something else?

YoHoJo

2013-09-27 18:53:39

ACA, also learn TPA/ATPAs (a bit advanced, but SUPER powerful).
Wouldn't recommend DTM/DDTM for any main-screen stuff, maybe DDTMs for a bit of MM walking though.

Good Luck!