SRL Archive - OSR Help

How to open a door?


ncore

2012-07-09 22:41:14

For some reason, the pixels keep changing up on me, and nothing i can find will help me open a door. The door is literally right in my face when it stops and i can't do jack about it.

I appreciate any help

Olly

2012-07-09 22:43:18

What door are you trying to open?

ncore

2012-07-09 22:45:30

i assumed all doors were the same, but I like the looks of the door to get into the crafting guild

Olly

2012-07-09 22:48:28

What are you currently using to find it?

ncore

2012-07-09 22:51:23

I was hoping this would work:

Function DoorFinder(var x, y: Integer): Boolean;
Var
CTS, I: Integer;
DoorTPA: TPointArray;
ATPA: Array of TPointArray;
ToMine:TPointarray;
Begin
If(Not(LoggedIn))Then Exit;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(4);
SetColorSpeed2Modifiers(0.00, 0.00);
FindColorsSpiralTolerance(MSCX, MSCY, DoorTPA, 601664, MSX1, MSY1, MSX2, MSY2, 0);
ATPA := TPAToATPAEx(DoorTPA, 3, 3);
For I := 0 To High(ATPA) Do
Begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 2, 2);
If(IsUpTextMultiCustom(['pen','oor'])) Then
Begin
GetMousePos(x, y);
Result := True;
Break;
End;
End;
End;

iBlank

2012-07-09 23:10:58

Do you have a function that defines DoorTPA? If so, can you post it as well.

Edit - Also, I have never used a ColorToleranceSpeed of 4. I was under the impression you used 1 or 2. I could be mistaken though!

ncore

2012-07-09 23:30:00

From: alevere4
Do you have a function that defines DoorTPA? If so, can you post it as well.

Edit - Also, I have never used a ColorToleranceSpeed of 4. I was under the impression you used 1 or 2. I could be mistaken though!


i dont think so

and i will try the colortolerancespeed idea

Runaway

2012-07-10 00:13:41

Oh my :o


ColorToleranceSpeed(4);
SetColorSpeed2Modifiers(0.00, 0.00);

There is no such thing as CTS 4, and hue/sat mods can only be used in 2(& 3?). Default is:


ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.1, 0.1);

and to use 2, you should use the AutoColorAid (ACA) tool that is built into Simba to find the right colors and hue/sat mods to use. I'm fairly certain there is a tutorial on it in the scripting tutorials forum.

ncore

2012-07-10 00:45:50

From: Runaway
Oh my :o


ColorToleranceSpeed(4);
SetColorSpeed2Modifiers(0.00, 0.00);

There is no such thing as CTS 4, and hue/sat mods can only be used in 2(& 3?). Default is:


ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.1, 0.1);

and to use 2, you should use the AutoColorAid (ACA) tool that is built into Simba to find the right colors and hue/sat mods to use. I'm fairly certain there is a tutorial on it in the scripting tutorials forum.


I just tried it, but the colors change so damn fast. This whole thing has frustrated me so much, the door would change colors (not visibly to me of course) at least 8 times without me even logging out. Does this happen to everybody else?

Is there an easy way to get past this door?

Element17

2012-07-10 01:55:43

Function DoorFinder(var x, y: Integer): Boolean;
Var
CTS, I: Integer;
DoorTPA: TPointArray;
ATPA: Array of TPointArray;
Begin
If(Not(LoggedIn))Then Exit;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.03, 1.14);
FindColorsSpiralTolerance(MSCX, MSCY, DoorTPA, 1394785, MSX1, MSY1, MSX2, MSY2, 11);
ATPA := TPAToATPAEx(DoorTPA, 15, 15);


For I := 0 To High(ATPA) Do
Begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 2, 2);
If(IsUpTextMultiCustom(['Guild','Open'])) Then
Begin
Writeln('Found Door');
GetMousePos(x, y);
Result := True;
Break;
End;
End;
End;

Should find the door for you. I used it awhile ago so it might not work. Have to make your own clicking function and stuff like…

If DoorFinder(x, y) Then  
//blah blah blah click click

(s)okkr7

2012-07-10 02:22:44

I can maybe assist over teamview if you have that. Or skype, which you'll find in my profile. I had a problem with the cook's guild door awhile back, and now I understand how to do it more effectively.

Kasi

2012-07-10 09:43:42

if 14578's doesn't work, it should do but you can use mine…Straight from ACA (with a bit of editing), it's been tested on different worlds so it shouldn't fail with the color


function FindDoor(var fx, fy: Integer): Boolean;
var
arP: TPointArray;
ararP: T2DPointArray;
i, arL: Integer;
P: TPoint;
begin
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.10, 1.06);
if not(FindColorsTolerance(arP, 870762, MSX1, MSY1, MSX2, MSY2, 11)) then
begin
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
SortTPAFrom(arP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arP, 50, 50);
for i := 0 to High(ararP) do
begin
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if (IsUpText('pen G')) then
begin;
Result := True;
Break;
end;
end;
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Exit;
GetMousePos(fx, fy);
end;

ncore

2012-07-10 10:44:03

I just tried all of them, neither work for opening this door.

The way I set the map walking, the door is in the EXACT same position according to the player every time. So is there any way I can just have it click on that position?

I used ClickMouse and for some reason it didn't work

Kasi

2012-07-10 11:11:32

From: ncore
I just tried all of them, neither work for opening this door.

The way I set the map walking, the door is in the EXACT same position according to the player every time. So is there any way I can just have it click on that position?

I used ClickMouse and for some reason it didn't work


erm, have you set up your smart right? my function should defo work, its been tested like 5-6 times on 3-4 different worlds from different angles..i think you should come on teamviewer..also im sure iv said DONT use click mouse…
if your not testing on smart remember to drag the crosshair onto the rs window

Runaway

2012-07-10 11:20:47

Uh, also make sure you're not using 0 tolerance like in post #5. You won't have any success with mainscreen objects if you aren't using tolerance :p

Chris

2012-07-10 11:34:48

if your in front of the door, you could MMouse to the coords and check for uptext.

Element17

2012-07-10 11:35:08

From: Runaway
Uh, also make sure you're not using 0 tolerance like in post #5. You won't have any success with mainscreen objects if you aren't using tolerance :p


Zing! hahah


But OT: I don't see how either one of them didn't work? Post part of your script?


Also why should he not use Clickmouse2(..)

Kasi

2012-07-10 12:02:27

i always got taught not to use clickmouse, but clickmouse2 is fine, im just saying because Mouse() uses Clickmouse2, but it also uses MMouse which adds human like movement.

Element17

2012-07-10 12:21:36

Ah okay. I wanted to make sure I wasn't doing something risky.

ncore

2012-07-10 12:47:37

pur3b100d, i will try yours again, do I need to make any changes?

And how to I set up smart properly, this is my first script

iraqownz

2012-07-10 13:33:59

sorry bro, but i find this title funny. for the first time i read it, i thought that you meant, "how to open a door" in real life, and i was WTF, does this guy seriously don't know how open a door :P after i clicked at the title, i realized that you meant, in simba. :P. enough about that, and hope you got what you needed :P

Kasi

2012-07-10 16:07:17

From: ncore
pur3b100d, i will try yours again, do I need to make any changes?

And how to I set up smart properly, this is my first script


sorry for the late reply, nope no changes needed, just call it like


Begin
If FindDoor(X, Y) Then
Begin
Mouse(X, Y, 0, 0, False);
Wait(RandomRange(200, 300));
ChooseOption('pen');
End;
End;