Help finding objects like doors and stairs
Hello! So my script is coming along very well! I got my initial setup of what I'm doing working, my banking working, and my walking working. Along with those I have to climb up two stairs and open a door to continue to the bank.
Right now I'm using this to find the door:
Simba Code:
Procedure OpenDoor1;
begin
MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
If FindObjCustom(x, y, ['pen'], [2012657], 2) then
begin
Wait(randomRange(100, 250));
ClickMouse2(Mouse_Left);
If DidRedclick then
Wait(RandomRange(3000, 4000));
exit end else exit;
end;
Though this works, it doesn't always pick up the door so it will skip to the next step and mess up the whole script.
So I considered using R_OpenDoor(Point(265, 205), 'S'); and I'm not sure if I have this typed 100% correctly or if it's just not working on a large door but it didn't even attempt to find the door.
Now for the stairs, this seems to always work. But I would like something a bit more reliable.
Here's how I'm finding the stairs:
Simba Code:
Procedure FindStairs1;
begin
MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
If FindObjCustom(x, y, ['-up'], [5261641], 2) then
begin
Wait(randomRange(100, 250));
ClickMouse2(Mouse_Left);
If DidRedclick then
Wait(RandomRange(3000, 4000));
exit end else exit;
end;
Well that's that! I'm wondering if anyone would suggest the best option for me to finding the doors and the stairs and maybe something to setup to where it will keep trying to find it and complete the task before moving on? Thanks in advance!