SRL Archive - Reflection Discussion

[Theory] Jagex Changing Hooks.


Kasi

2011-05-08 14:31:59

Does Jagex change Runescape Hooks during runtime?

Rich

2011-05-08 14:34:14

From: pur3b100d
Does Jagex change Runescape Hooks during runtime?
I'm not the expert on this topic, but as far as I'm aware, they don't.

Kasi

2011-05-08 14:39:14

About an hour ago i was having problems with this. trouble finding the bank with reflection. the script was okay so i came to the conclusion RS had updated so i checked for a new hook update. there was no hook update but finding the bank is working again. so i came up with this o.O

i luffs yeww

2011-05-08 14:53:20

Sometimes things don't work. That's why it didn't work.

Kasi

2011-05-08 14:59:00

From: i luffs yeww
Sometimes things don't work. That's why it didn't work.


the hooks? i tried restarting Simba and allsorts didnt work? it didnt work for a hour?

Wanted

2011-05-08 15:42:04

From: i luffs yeww
Sometimes things don't work. That's why it didn't work.


Primary reason for not using reflection when unnecessary i.e. R_LoggedIn, R_GameTab, R_GetSkillLevel, R_Flag /other useless crap.

mormonman

2011-05-08 15:52:48

It isn't possible to change the hooks during runtime. You would have to reload the client.

Rich

2011-05-08 16:18:24

From: IceFire908
Primary reason for not using reflection when unnecessary i.e. R_LoggedIn, R_GameTab, R_GetSkillLevel, R_Flag /other useless crap.
I'll have to agree there. As much as I support the use of Reflection, there's no need to use it where colour does the job perfectly, like the examples you gave. Walking, NPC/object finding etc. are completely different matters.

footballjds

2011-05-08 19:25:52

From: i luffs yeww
Sometimes things don't work. That's why it didn't work.


roflmfao, ;)

Coh3n

2011-05-08 21:42:52

Moved to Reflection discussion.

Smartzkid

2011-05-09 01:24:18

From: IceFire908
Primary reason for not using reflection when unnecessary i.e. R_LoggedIn, R_GameTab, R_GetSkillLevel, R_Flag /other useless crap.


IMHO it makes sense to use whichever function runs faster. Not claiming that reflection is faster, but it may be.

Sex

2011-05-09 01:28:58

From: IceFire908
Primary reason for not using reflection when unnecessary i.e. R_LoggedIn, R_GameTab, R_GetSkillLevel, R_Flag /other useless crap.

Iirc, R_GetSkillLevel can check the level without going to the tab I believe. Or am I wrong…?

LolL

2011-05-09 02:01:20

From: Sex
Iirc, R_GetSkillLevel can check the level without going to the tab I believe. Or am I wrong…?
It is 100% possible to check the skill level, inventory items, attack mode, selected prayers, etc. without going to the proper tabs with reflection. IDK if these functions purposely go to the tab but I assume they don't.

Flight

2011-05-09 02:02:59

From: Sex
Iirc, R_GetSkillLevel can check the level without going to the tab I believe. Or am I wrong…?


You're right, that function is useful to have, saves quite a bit of time when it matters in a script. :/

Wanted

2011-05-09 02:39:02

From: Smartzkid
IMHO it makes sense to use whichever function runs faster. Not claiming that reflection is faster, but it may be.


Let's make a few assumptions then.

First assumption, R_LoggedIn is 10x faster than Logged in, we'll say a single iteration is 1ms for R_ and 10ms for LoggedIn.

Assuming that that is even true, lets take into account that regular logged in hasn't required a single tweak in over 100 client builds, in fact, it's been so long no one really knows exactly how long.. just a long time.. but not longer enough to be never. R_ on the other hand requires 2-3 or more hooks to be updated every 4hour-2weeks.

Now that we've looked at maintenance let's move on to reliability.

Reflection's core is pretty reliable right? We have maybe a few active people doing some stuff here and there but do you really think someone goes through every single time a new client build comes out to ensure that these functions still work properly, efficiently, and even quickly? Sure it's possible, but chances are not.

In fact lets assume that we had all the right hooks all of the time (great assumption right?) how about the functions actually working? Sure both color and reflection have hiccups, your screen can lag and skip a frame so it misreads the color on the screen or some weird connection failure returns your reflection data as something impossible or uninterpretable, i.e. null/negative/crazy shit. You get the point.

But let's look at statistics for a moment.

How often do you hear someone say "Shit the game updated, BankScreen doesn't work anymore" ? sure it happens from time to time, but does it ever happen more than once a week? How about once a month? Sometimes its solved once and no one ever hears about it for so long we even forget it ever broke the first time. R_GetSkillLevel for example though you could hear people say it doesn't work so many different times there's no way you could even tell if it works with out logging in and trying it, hell maybe you even need a few other online people to do the same just so you aren't second guessing yourself.

Now here comes the fun part.

So you decided "hey this function is uber fast and shits all over this other function, imma use it and it's gonna make a noticeable difference"

Well unfortunately us humans are pretty horrible at making determinations without first actually recording things, laying them out, and doing long division.

So even if R_ was 10xs faster than non R_ you can't just look at it as multiplicities there's so much more context than that. Saving you 9ms an iteration even if you did thousands of iterations would only add up to a few seconds in the long run.

Sure this can make a HUGE difference when you are working with something that requires quick responding, but what are the odds of that being the case when you are using R_GetSkillLevel ? Pretty close to zero.

Applying to work efficiency is even more of a gimmick.

If it takes 60 seconds to complete a round of air crafting that amounts to 60 loads an hour, and each load earns you 50k gp and 10k experience ( I know, these are ridiculous over exaggerations).

You're talking changing each load by about 0.001% ( a few milliseconds lol) The real life implications are what? $0.75 for 1,000,000 coins. We're talking pretty "small fucking potatoes".

Now lets say that the odds of color working more reliably than reflection is even a 2% greater chance ( I mean seriously, it's probably exponentially more than that, but 2% is a good place to start)

Would it not make every bit of sense to use it if it meant a greater chance that even a single extra load gets finished? When you are talking about a .001% efficiency increase?

I would sure say so.

And that's assuming that reflection R_LoggedIn was even faster to begin with.

From: Sex
Iirc, R_GetSkillLevel can check the level without going to the tab I believe. Or am I wrong…?


Yes it can.

But what good does that do you when humans can't know what level they are with out going to the game tab, or if they memorize it and/or keep track of it via math and mental exp records as well as level ups (all things color can do as well).

Sex

2011-05-09 02:44:50

From: IceFire908
Yes it can.

But what good does that do you when humans can't know what level they are with out going to the game tab, or if they memorize it and/or keep track of it via math and mental exp records as well as level ups (all things color can do as well).
I memorize all of my levels. Now what I don't keep track of is my XP…but I'm talking about just the level.

Smartzkid

2011-05-09 02:47:25

Bro, I think I just accidentally trolled you.

I understand that in many cases the differences are completely negligible; however, if a script already relies on reflection for object detection or walking, it doesn't hurt to use reflection elsewhere, especially if it uses less system resources. I'm not talking about function call blocking time here, I'm talking about CPU ticks. The fewer ticks a function needs, the better. (More applicable in this case: the fewer lines of interpreted code)

Wanted

2011-05-09 02:57:32

From: Sex
I memorize all of my levels. Now what I don't keep track of is my XP…but I'm talking about just the level.


You know, you can determine your level based on initial exp and gained exp, i.e., current exp -> level… and you don't have to open skill tab to check that.

From: Smartzkid
Bro, I think I just accidentally trolled you.


Other way around, lol.

From: Smartzkid
I understand that in many cases the differences are completely negligible; however, if a script already relies on reflection for object detection or walking, it doesn't hurt to use reflection elsewhere, especially if it uses less system resources. I'm not talking about function call blocking time here, I'm talking about CPU ticks. The fewer ticks a function needs, the better. (More applicable in this case: the fewer lines of interpreted code)


That's where you are incorrect.

Assuming that reflection as a whole is just as reliable as any other component. That all hooks are as reliable (during function and after updates) relative to one another.

And even if it was, you have to remember what you are comparing it to. Color walking obviously can not compete, but GetColor for R_LoggedIn can compete and win.

CPU ticks? I would put CPU usage pretty low on my list of priorities, at least below script longevity and reliability.

Markus

2011-05-09 03:38:10

I only found one instance of this where reflection actually has an added value: inventory stacks.
Reflection actually gets exact amount instead of 10k/20k. Too bad it doesn't work when not at inventory tab.
R_LoggedIn is just the biggest waste there is as grabbing one single pixel is faster than using reflection (as it only requires a few clock cycles to grab it from Simba's internal buffer, cmp, return).

Echo_

2011-05-09 07:06:08

They are unable to change the field names in the client during runtime, as mormonman said.

Interesting how this turned into the color/reflection debate :p

Iamadam

2011-05-09 07:45:11

Color verses reflection debates are getting kinda old around here..
They are different things.
Reflection, while updaters are working, is superior by far in terms of both efficiency and reliability - this can not be argued against. (In theory, color can be just as reliable but I've yet to see a pure color script run better than a reflection version of the same thing).
Color on the other hand will live longer because regardless of client changes, it will always work.

Flight

2011-05-09 08:50:54

From: Iamadam
Color verses reflection debates are getting kinda old around here..
They are different things.
Reflection, while updaters are working, is superior by far in terms of both efficiency and reliability - this can not be argued against. (In theory, color can be just as reliable but I've yet to see a pure color script run better than a reflection version of the same thing).
Color on the other hand will live longer because regardless of client changes, it will always work.


Let's leave it at that then.

Although, I'm a fan of scripts that use a balanced combination of both… 'hybrid' scripts maybe? :rolleyes:

NCDS

2011-05-09 11:57:07

From: IceFire908
Let's make a few assumptions then.

First assumption, R_LoggedIn is 10x faster than Logged in, we'll say a single iteration is 1ms for R_ and 10ms for LoggedIn.

Assuming that that is even true, lets take into account that regular logged in hasn't required a single tweak in over 100 client builds, in fact, it's been so long no one really knows exactly how long.. just a long time.. but not longer enough to be never. R_ on the other hand requires 2-3 or more hooks to be updated every 4hour-2weeks.

http://villavu.com/forum/showthread.php?t=63803

Just had to point that out, (it was a ~30 second fix though) but I agree with the rest of the post.

Jakkle

2011-05-17 06:50:46

From: Echo_
Interesting how this turned into the color/reflection debate :p


I also think this is an interesting topic, when I first came to this site and started learning it was only colour and I did a very small colour script witch took me a while and didn't finish it. Since I have been back to this site I have started scripting in reflection, I have found reflection easier to start learning and to put together.

I will deffinately be learning how to do colour again as it will have its benefits, putting the 2 together to make failsafes i think is good.

From: Iamadam
Color verses reflection debates are getting kinda old around here..
They are different things.
Reflection, while updaters are working, is superior by far in terms of both efficiency and reliability - this can not be argued against. (In theory, color can be just as reliable but I've yet to see a pure color script run better than a reflection version of the same thing).
Color on the other hand will live longer because regardless of client changes, it will always work.


I agree :)

Smarter Child

2011-06-20 17:56:12

I don't know about you guys, but I use reflection when I get lazy :p

chitin

2011-06-24 06:06:18

not to be grave digging here and its hardly been long enough, but since im having the most difficult time finding the information im looking for perhaps someone here knows…first of all…
1:who actually updates the hooks?
2:how can i do it myself?
3:since you peeps dont always do it promptly could i contribute these hooks to srl after doing them myself ?

like i found 1 tut explaining what hooks are and how theyre obtained, but not actually who uploads them, where to get the new applet files, or where to upload them to? normally id sit and wait for them without straining myself, but since ive recently been developing some things, I really need those hooks…

-selfish i know, help out when it benefits you…..but then i think about how im human and that pathetic excuse for an excuse lets my mind rest at ease…

so lookin for those 4 answers…^ no i really couldnt find the appropriate thread ok!?

BraK

2011-06-24 06:13:38

Pyroryan, Drags111 and the Ref Devs update the Hooks.

~BraK

masterBB

2011-06-24 07:44:40

From: chitin
not to be grave digging here and its hardly been long enough, but since im having the most difficult time finding the information im looking for perhaps someone here knows…first of all…
1:who actually updates the hooks?
2:how can i do it myself?
3:since you peeps dont always do it promptly could i contribute these hooks to srl after doing them myself ?

like i found 1 tut explaining what hooks are and how theyre obtained, but not actually who uploads them, where to get the new applet files, or where to upload them to? normally id sit and wait for them without straining myself, but since ive recently been developing some things, I really need those hooks…

-selfish i know, help out when it benefits you…..but then i think about how im human and that pathetic excuse for an excuse lets my mind rest at ease…

so lookin for those 4 answers…^ no i really couldnt find the appropriate thread ok!?


Question 2: You need an updater, we once started an open source version. Just search for that, I'm sure you will find it. But note that most people aren capable of retrieving hooks and updating the updaters.

Question 3: Yes.

Link: http://villavu.com/forum/showthread.php?t=62038&highlight=open+source+reflection+updater

Yago

2011-06-24 11:16:40

I think hooks have been down for over 2 days now…

masterBB

2011-06-24 11:18:46

From: Yago
I think hooks have been down for over 2 days now…


And all my bots are still going strong. Color ftw :P

But couldn't we just put some work in the reflection updater? I'm able to make it but I don't got the motivation. Could do a few hooks though..

pyroryan

2011-06-24 13:15:07

From: Yago
I think hooks have been down for over 2 days now…


They've been up for 2 days now…

Yago

2011-06-24 13:57:01

From: pyroryan
They've been up for 2 days now…


That's odd… then for some reason my hooks have been down…

mat_de_b

2011-06-24 16:59:06

Edit: Nevermind I went into simba over to refelction section then, overide update then clicked update reflection

Smarter Child

2011-06-24 17:44:34

So, all the hooks are up to date?

chitin

2011-06-24 18:19:44

yes it turns out the updater had some issues. you can manually update them by finiding hooks.simba file in the reflection folder and pasting the contents of
http://pyroryan.net46.net/reflection/Hooks.simba

on top of that should i now question the effectiveness of the other updaters? well i know msi updates fine cuz it did it twice in the past 2 days….

so big thanks to pyroryan and brak and all the rf devs for making this clear.

pyroryan

2011-06-24 18:39:29

From: Smarter Child
So, all the hooks are up to date?


Well the hooks that are actually used are updated. The ones that aren't updated include object orientation hooks that no one ever uses (I have the rest if you need them, I just don't see the need to push out another revision for unused hooks).

Smarter Child

2011-06-25 20:41:33

From: pyroryan
Well the hooks that are actually used are updated. The ones that aren't updated include object orientation hooks that no one ever uses (I have the rest if you need them, I just don't see the need to push out another revision for unused hooks).


ok, good to know. :)