There are coordinates for different portions of the screen built into the SRL include to make scripting easier. The runescape screen is essentially broken down into 3 parts:
- MainScreen (MS)
- MainInventory (MI)
- MiniMap (MM)
Each of these have coordinates for the 4 corners (X1, Y1, X2, Y2) and a center point (CX, CY).
For example, the coordinates of the MainScreen would be MSX1, MSY1, MSX2, MSY2. The center is written as MSCX, MSCY.
Let's say I wanted to find a colour on the screen, but only search in the inventory. I could use something like:
Simba Code:
FindColorTolerance(x, y, 1342737, MIX1, MIY1, MIX2, MIY2, 45)
This would search for the colour 1342737 (with a tolerance of 45) in the inventory, and save the point where it finds the colour to x and y.