SRL Archive - OSR Help

Detect Lumbridge Castle Bank


Bixby Sayz

2011-11-08 12:15:31

Having "fun" detecting whether player is located on the top floor of Lumbridge Castle by the bank.

Things I've noticed while looking at this:
- The banker dot changes color and position
- The floor and walls change color
- The bank symbol changes position and can be completely obscured by other players on a busy world
- The room with the banker can be completely obscured on the minimap by other players' white dots on a busy world
- The steps can also be obscured on the minimap by other players on a busy world

YoHoJo

2011-11-08 12:43:44

You could think a step back and see if you stair clicking function works and make it a boolean.

Function ClikStairs:Boolean;
Findstairs
Mouse(x , y, 4, 4, true)
If find and click text('go up stairs) then
Result:=True;
Else
Oh no didn't find stairs, log out, next player

So basically if it knows it successfully went up stairs, you know you're at top :)?

Also I think there are functions/tolerances that take care of symbols even when covered, and if not you should still have a symbol check there and if it doesn't find a symbol go on to an alternate method.

Will post later again after loging in and checking out the area.

Flight

2011-11-08 12:44:37


Function TopFloor: Boolean;
begin
Result := (Length(GetMiniMapDots('yellow')) = 1);
end;

YoHoJo

2011-11-08 12:56:31

Lolz is getminimapdpts a function in SRL?

Heavenguard

2011-11-08 13:02:13

Use a dtm for the banker dots or be creative and find something that sticks out, ie the sky

Bixby Sayz

2011-11-08 13:36:09

From: YoHoJo
You could think a step back and see if you stair clicking function works and make it a boolean.

I thought of that, but I also wanted to cleanly handle the case where the script starts with the player already in/near the bank. Which will be the case most times, but not always.

This is why I sooooo loved reflection. Much less ambiguity and you don't spend all your time bogged down in little details.

Flight

2011-11-08 21:02:17

From: YoHoJo
Lolz is getminimapdpts a function in SRL?


Yep, in mapwalk.simba. By the way, have you used what I suggest yet, Bixby Sayz? It works just fine. The top floor (bank) of the castle is the only floor with one NPC (banker).

KingKong

2011-11-08 21:08:08

getminimapdots doesnt work(for npc's anyway), i think the colors need to be updated

Flight

2011-11-08 22:03:26

From: KingKong
getminimapdots doesnt work(for npc's anyway), i think the colors need to be updated


I just tried it myself… I recommend trying things yourself before telling everyone they don't work.

NCDS

2011-11-08 23:29:29

In my old FlaxSpinner when I was walking to the bank I got the color from the ladder off to the west, then used a bit of math to click near the south part of the banking room. Once the char got there I searched for the windows of the bank booth and clicked the banker from there.

Unless the bank there has changed I would imagine that would still work.

KingKong

2011-11-09 00:40:05

From: Flight
I just tried it myself… I recommend trying things yourself before telling everyone they don't work.


Probably something to do with my script then, last time it only detected 2 instead of 4.

Bixby Sayz

2011-11-09 07:18:06

From: Flight
Yep, in mapwalk.simba. By the way, have you used what I suggest yet, Bixby Sayz? It works just fine. The top floor (bank) of the castle is the only floor with one NPC (banker).
Have to confess I looked at that suggestion dismissed it as too simple. Will likely go with this, with some additional checking.

Markus

2011-11-09 07:28:48

DTM of white lines worked for me. Tolerance 25, areasize 2 should do.

Bixby Sayz

2011-11-09 07:33:27

Yeah I suck at making DTMs.