SRL Archive - Reflection Discussion

Do trees have any sort of ID?


Pure1993

2008-08-08 16:57:46

Hi,
Well, sorry for posting something reflection related in the srl help section, but I was wondering if there is any variable defining if a tree is up or chopped down, and if there is a function which actually detects trees on the minimap (Well, i am quite sure there isn't such a function, but I would also be happy with any variables from the runescape client on which I can base those functions). The main reason for this is that I don't want to walk to every willow tree (draynor village for example), then hover my mouse over them, just to see if they are there or not, and if not, then it would be too detectable if they walked to the next one, move the mouse over the position, etc.. Also, it is easier to have a wait loop until one of these trees exits, rather than walking back and forth…
Also, are the hooks and variables in the "hooks" notepad file all of them, or just the one's used for the essential walking and people functions?
Thanks,
-Pure1993

Edit: and if they do have something like an ID, how is it possible to find it, becasue trees obviously don't count as NPCs…

Method

2008-08-08 17:05:21

There's currently no way to detect objects (trees, rocks, etc.) using SMART because we don't have any functions created for it. I'd stick with color finding (FindObjRecord maybe), then checking your player's animation to see when the tree is chopped down.

n3ss3s had a thread about object finding, though he was unsuccessful at it. Try searching and you can see how he attempted to do it.

Timer

2008-08-08 17:18:48

Well you can use a npc for the ent, Object finding with smart is almost completed… (N3ss3s and Bobarkenator)

Bobarkinator

2008-08-08 19:07:34

Pure1993, when n3ss3s and I finish object finding, you will have the ability to check if a tree ID is existing on the mainscreen so you will be able figure out if their is a tree to cut. We can also make a function that will search in an area to see if their is a certain ID rather easily.

MylesMadness

2008-08-08 20:48:26

Until then you can just get the tile coords and use TileToMS

Daniel

2008-08-08 22:17:01

Hmm, this'll be weird, reflection :p

Since, all you'll need for a good script is FindObjReflection(ID) etc, then for the anti randoms, FindNPC(ID) :p

Bobarkinator

2008-08-09 02:20:27

[QUOTE=Dan's The Man;445825]Hmm, this'll be weird, reflection :p

Since, all you'll need for a good script is FindObjReflection(ID) etc, then for the anti randoms, FindNPC(ID) :p

Wizzup doesn't want Anti-randoms by reflection

Pure1993

2008-08-09 03:33:15

Alright, thanks for all the replies, I guess i will simply wait then until the object finding with reflection is released ^^

Daniel

2008-08-09 06:44:18

From: Bobarkinator
Wizzup doesn't want Anti-randoms by reflection

Why not? Just because Reflection wasn't created by him.

Reflection is a great idea, and it can help in the development of SRL and SCAR greatly.

Bonfield

2008-08-09 06:50:41

[QUOTE=Dan's The Man;446013]Why not? Just because Reflection wasn't created by him.

Reflection is a great idea, and it can help in the development of SRL and SCAR greatly.

because then pretty much all of SRL would be outdated when the hooks update… just like a java bot also SRL would not be as 'flexible' if it was dependent on reflection

n3ss3s

2008-08-09 06:57:02

Wizzup for sure hasn't got anything against you making custom anti-randoms into your scripts, but the official SRL antirandoms won't use reflection, for now.

Daniel

2008-08-09 06:58:07

From: Bonfield
because then pretty much all of SRL would be outdated when the hooks update… just like a java bot also SRL would not be as 'flexible' if it was dependent on reflection

Hmm, never thought of that :p

Besides, couldn't you have a back-up or something?

function FindEnt: Boolean;
begin
Result:=FindNPC('tree');
if(Result) then
blah;
end;

Bonfield

2008-08-09 07:02:26

[QUOTE=Dan's The Man;446023]Hmm, never thought of that :p[/quote]

lol yeah thats just how i think about it… it might not have anything to do with what wizzup thinks about it :)

[quote]Besides, couldn't you have a back-up or something?

function FindEnt: Boolean;
begin
Result:=FindNPC('tree');
if(Result) then
blah;
end;


yeah that is what icefire posted his example had like 7 failsafes and he ranked them in order of most succesful to least, so yeah reflection is a good thing

Twisted

2008-08-10 02:05:31

Only problem with that is if it finds anywhere on the ms.

Pure1993

2008-08-10 06:08:08

well, just combine that ent thing with a good old fashion wait time and check if we lost health, and the thing is done. :)