SRL Archive - OSR Help

Miner & Banker


doom0791

2011-01-20 21:48:36

I'm workin on a reflection miner/banker for Varrock East and I've found that two of the iron rocks have the same id when they're empty as the other two when they're full.

Because of this I'm thinking of coding it to check the object ID on each tile individually when finding if there's ore to be mined or not. Is there a more efficient way of handling this issue?


details:
_______[4]
[2][3]
[1]

Rocks 1&2 share the same "full" and "empty" ID's, and 3&4's "Empty" id are the same as 1&2 "Full" ID.

Thanks in advance!

cycrosism

2011-01-20 21:53:08

Use colour to find the rocks (make a tpa or something) and use reflection for the walking?

TomTuff

2011-01-20 21:59:57

use a combination of tile and object ID checking.
i.e.:
Rock 1:
Full ID: 1234
Mined ID: 5678
Tile: Tile(34, 56)

Rock 2:
Full ID: 1234
Mined ID: 5678
Tile: Tile(78, 90)

Rock 3:
Full ID: 5678
Mined ID: 1234
Tile(12, 34)

Rock 4:
Full ID: 5678
Mined ID: 1234
Tile (54, 65)


If you want to see if Rock 3 is full, get the ID of the objected on tile (12, 34), and if it is 5678, then it must be full; if it's 1234, it must be empty.

It's a bit more work, but can be simpler than color.

doom0791

2011-01-20 22:02:19

I am using color to find the rocks; however, I don't know how to use color to check to see if there is still ore in the rock if I have to walk to the rock. Using reflection to check the animation only works efficiently if you're the only one mining the rock because if two people are mining the same ore, whoever doesn't get it continues the animation for two to four seconds afterwards.

Edit:

That's what I was thinking of doing, TomTuff.

What if I were to use color to find the rocks (I find using color to be faster and more random for clicking) then convert the point that the script clicks into a tile and routinely check the ID of the rock on that tile until it is empty, then continue to the next rock?

Edit2:

Just found out there's no MSToTile function ;). And the fun begins!