Brandon
07-11-2011, 07:08 AM
GateObj:= GetObjectByID(13182, 0, 52);
if(FindRSObject(GateObj)) then
Repeat
GatePoint:= TileToMSEx(GateObj.Tile, 0, 0, 50);
WalkToTile(GateObj.Tile, 0, 1);
wait(RandomRange(500, 1000));
writeln('DistanceFrom Object: ' +tostr(DistanceFrom(GateObj.Tile)));
Until(Not FindRSObject(GateObj) or (DistanceFrom(GateObj.Tile) < 10));
AltarDoor:= GetObjectByID(13119, 1, 3);
if(FindRSObject(AltarDoor)) then
Repeat
AltarPoint:= TileToMSEx(AltarDoor.Tile, 0, 0, 0);
Mouse(AltarPoint.X, AltarPoint.Y, 0, 0, true);
wait(RandomRange(500, 1000));
Until(Not FindRSObject(AltarDoor));
This is what I have.. It find the altar, tries to walk to it.. the door blocks the way. The altar is South of me when I enter the Portal so what happens is that it tries to click the door but instead clicks one tile south of the door.. if I rotate the camera, it will click the door..
I've really tried changing the height because I don't know the height, I put something like 100.. and it didn't work. So how Do I find Player Direction so that I can turn the compass to face the door to open it?
if(FindRSObject(GateObj)) then
Repeat
GatePoint:= TileToMSEx(GateObj.Tile, 0, 0, 50);
WalkToTile(GateObj.Tile, 0, 1);
wait(RandomRange(500, 1000));
writeln('DistanceFrom Object: ' +tostr(DistanceFrom(GateObj.Tile)));
Until(Not FindRSObject(GateObj) or (DistanceFrom(GateObj.Tile) < 10));
AltarDoor:= GetObjectByID(13119, 1, 3);
if(FindRSObject(AltarDoor)) then
Repeat
AltarPoint:= TileToMSEx(AltarDoor.Tile, 0, 0, 0);
Mouse(AltarPoint.X, AltarPoint.Y, 0, 0, true);
wait(RandomRange(500, 1000));
Until(Not FindRSObject(AltarDoor));
This is what I have.. It find the altar, tries to walk to it.. the door blocks the way. The altar is South of me when I enter the Portal so what happens is that it tries to click the door but instead clicks one tile south of the door.. if I rotate the camera, it will click the door..
I've really tried changing the height because I don't know the height, I put something like 100.. and it didn't work. So how Do I find Player Direction so that I can turn the compass to face the door to open it?