SRL Archive - General

Door Code


jdb

2008-12-26 21:23:55

hy all, im makin a script but i've run into a problem

i have to get past a door on route. and this door randomly closes about every 4-5mins


anyone know a function or have an idea to take care of this?

i'm thinking Reflections could do it but i don't know of any commands, or hooks, for it as of yet.


help would be nice

ty all

TViYH

2008-12-26 22:25:39

You could start by reading a tutorial, posting on the right sub-forum, and using the search button :)

Wizzup?

2008-12-27 05:29:03

From: TViYH
You could start by reading a tutorial, posting on the right sub-forum, and using the search button :)


I think people in general shouldn't always point to the search button.

jdb: Try to find it, hover over it with your mouse. If the uptext is 'closed', then open the door again, and continue on your way. :)

jdb

2008-12-27 11:31:22

ah, Hadn't thought of that TYVM!!!


i'll try it thanx

m8!

jdb

2008-12-29 09:43:41

From: Wizzup?
I think people in general shouldn't always point to the search button.

jdb: Try to find it, hover over it with your mouse. If the uptext is 'closed', then open the door again, and continue on your way. :)



thanx for getting me started.. here's the script i wrote for my door check.


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// <—Check to see if door is open
// by Chipy
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function CheckDoorOpen: boolean;
var tP : Tpoint;
begin

MakeCompass('n');
tP := TileToMS(Point(3684, 3476), 2);
MMouse(tP.x, tP.y, 8, 12);
wait(100+random(100));
if IsUpText('pen') then
begin
result := false;
exit;
end;

MakeCompass('n');
tP := TileToMS(Point(3684, 3477), 2);
MMouse(tP.x, tP.y, 8, 12);
wait(100+random(100));
if IsUpText('pen') then
begin
result := false;
exit;
end;
result:=true;
end;