SRL Archive - Extensions

Hooks


ssh0rty4

2011-08-07 16:00:15

guys, first off sorry for making a useless thread :P

I tried to run imadan's strongholder and it gives me an error or more ''notice'' when i run the script

[Reflection] You're using outdated hooks (version 659.4); updating you to version 660.1!
[Reflection] If you manually fixed your hooks, please make sure hookrevision values are greater than or equal to the online hooks to prevent overwriting.
[Reflection] Updated you to 660.1; please restart your script!

Now i do not now what this means! And believe me i've searched te forum for reflection and SIMBA but i couldn't get any answers from them :(

could you please help me?:redface:

Silent

2011-08-07 16:04:00

Just restart your script. It was updating the Reflection hooks, which is how the script ID's everything in RS. It's just something that happens :)

EDIT:

Also next time you have a question about something with reflection (you can tell by the [reflection] tag it gave) post it in the reflection help section, and look there first too. :)

Reflection help

bolshak25

2011-08-07 16:35:34

you have to open up reflection.simba in reflection 2 subfolder, and change line 93 to where it is, most people just have to add a 2 after reflection because thats the subfolder.

Silent

2011-08-08 02:22:44

From: bolshak25
you have to open up reflection.simba in reflection 2 subfolder, and change line 93 to where it is, most people just have to add a 2 after reflection because thats the subfolder.


He isn't getting an error though, it's just updating his hooks to a newer version. As far as I know, no action is required on his part.

Echo_

2011-08-08 03:16:00

From: Silent SPY
He isn't getting an error though, it's just updating his hooks to a newer version. As far as I know, no action is required on his part.


^This, all he has to do is restart the script.

bolshak25

2011-08-08 10:22:07

From: Silent SPY
He isn't getting an error though, it's just updating his hooks to a newer version. As far as I know, no action is required on his part.


true, but if its updating his hooks, and his reflection2 is in a subfolder named reflection 2, then itll update the given path which right now is reflection. im assuming if he keeps doing it it keeps doing that. other people have mentioned the same thing. i might be wrong, but if i am hopefully if others search with that issue, then theyll find it

Smarter Child

2011-08-08 10:48:53

From: bolshak25
true, but if its updating his hooks, and his reflection2 is in a subfolder named reflection 2, then itll update the given path which right now is reflection. im assuming if he keeps doing it it keeps doing that. other people have mentioned the same thing. i might be wrong, but if i am hopefully if others search with that issue, then theyll find it


err, he would always run R_UpdateHooks(); , no?

bolshak25

2011-08-08 10:53:42

if he does and his reflection2 is in its own folder within includes, so includes has reflection and reflection2, then the hook updater will update in the path Includes/Reflection/Reflection.simba, but the reflection2 hooks are in Includes/Reflection2/Reflection.simba. then itll constantly give him that debug unless he manually updates it or changes line 95 in Includes/Reflection2/Reflection.simba to where reflection2 hooks are, which is just adding a 2

Silent

2011-08-08 15:08:59

From: bolshak25
if he does and his reflection2 is in its own folder within includes, so includes has reflection and reflection2, then the hook updater will update in the path Includes/Reflection/Reflection.simba, but the reflection2 hooks are in Includes/Reflection2/Reflection.simba. then itll constantly give him that debug unless he manually updates it or changes line 95 in Includes/Reflection2/Reflection.simba to where reflection2 hooks are, which is just adding a 2


I see your point now, never thought of that. If that's the path though, won't it look there for the new hooks anyway? I have my ref2 named reflection, so this has never been a problem for me, but my reflection 1 is just that, reflection1, I've used several scripts and after they update hooks, r1 and r2, they seem to work without another worry. Idk!

Harry

2011-08-08 15:15:48

I don't think he is using Ref2 though, you're just confusing him. Just re-run your script and it should work fine.

Silent

2011-08-08 23:06:41

From: Harry
I don't think he is using Ref2 though, you're just confusing him. Just re-run your script and it should work fine.


Well, I don't think he was either, but the script he is trying to run requires it. :rolleyes:

ssh0rty4

2011-08-09 15:29:59

Got it working, with a lot of hassle though ( for me :P ).

Anyways kinda sucks that the hooks you guys were arguing about is outdated now :(

Bixby Sayz

2011-08-09 20:14:41

From: ssh0rty4
Anyways kinda sucks that the hooks you guys were arguing about is outdated now :(


I feel your pain. Every time I actually get a few minutes spare time to sit down and mess around a bit with coding a script RS updates and the hooks remain broken until I am again too busy.

Every single freaking time. Fagex hates me. I just know it.

tarajunky

2011-08-09 20:24:22

From: Bixby Sayz
I feel your pain. Every time I actually get a few minutes spare time to sit down and mess around a bit with coding a script RS updates and the hooks remain broken until I am again too busy.

Every single freaking time. Fagex hates me. I just know it.


Simple solution…

Have a good color script alternative to run until reflection is working properly. Preferably one that can be used without drastically changing the position of your characters.

Bixby Sayz

2011-08-09 20:37:21

From: tarajunky
Simple solution…

Have a good color script alternative to run until reflection is working properly. Preferably one that can be used without drastically changing the position of your characters.


Not much help when trying to develop a reflection script. I know a lot of you love your color scripts.

But from my point of view if I can code something more accurate in 10% of the time then I'm willing to put up with the hooks being out of date occasionally. I'm not bashing color, it is just not for me; I simply do not have the time. If we had a library of bitmaps, dtms, colors for objects/ncps then it would become usable.

Everybody has their preferences. I suspect a lot of would be scripters start to write scripts and are put off by the sheer amount of background "not actually coding" work (bitmaps, dtms, finding colors that work) involved and give up. Or move on to reflection. Just my opinion; flame me in private chat rather than derail this thread if ya want take a swing at me. ;)

Smarter Child

2011-08-09 23:08:57

From: Bixby Sayz
Not much help when trying to develop a reflection script. I know a lot of you love your color scripts.

But from my point of view if I can code something more accurate in 10% of the time then I'm willing to put up with the hooks being out of date occasionally. I'm not bashing color, it is just not for me; I simply do not have the time. If we had a library of bitmaps, dtms, colors for objects/ncps then it would become usable.

Everybody has their preferences. I suspect a lot of would be scripters start to write scripts and are put off by the sheer amount of background "not actually coding" work (bitmaps, dtms, finding colors that work) involved and give up. Or move on to reflection. Just my opinion; flame me in private chat rather than derail this thread if ya want take a swing at me. ;)


It doesn't take that long to write a colour script. Not to mention, the SRL include is quite extensive as it is. ;)

tarajunky

2011-08-09 23:48:16

I never said WRITE a color script to use…

<.<

Reflection scripts may be easier to write, but hitting Start is just as easy for a color script.

I run reflection scripts when the hooks are working. But after updates I have 3+ great color scripts (NONE of which I wrote myself) that I use until the hooks are back up.

Bixby Sayz

2011-08-10 18:15:49

From: Smarter Child
It doesn't take that long to write a colour script. Not to mention, the SRL include is quite extensive as it is. ;)


It is getting better but it still has a long way to go.

When I first stumbled upon this place I thought "I used to do commercial development in Delphi and C++ Builder, and this stuff uses Pascal. Should be a breeze." WRONG!

I had my first script finished in a couple hours, with the only thing missing being the object finding colors and the walking. I then spent days trying to get just the right colors and just the right dtms for walking.

What kept going through my head was "this is far more complicated than it needs to be. This community has been running for how many years? and still the really basic things have to be recreated from scratch by everyone??? every time??? Something is wrong with this picture."

I still feel that way. It has improved but still has a long way to go. Quick…where is the list of the reflection ids for all the objects, npcs, and interfaces maintained by the community that you can quickly reference? The list of working colors for common trees/npcs? The dtms for common objects?

Those would be truly useful. And yet every time someone mentions starting such a list they get shouted down by the senior members as not wanting to spoil people. Wrong attitude.

My 2 cents.

tarajunky

2011-08-10 22:16:38

In the past there has been a sense that we don't want to make highly customized procedures (like PlayVarrock), for several reasons. One, because complex functions are more likely to break at multiple places on game updates, making debugging more difficult. Two, because we wanted people to be creative in their own scripts. If there was one single function for X, people might not bother developing X 2.0.

I'm not going to pretend like there is some big master plan to encourage people to contribute new ideas or new code to the community. But when people are promoted it's often because they've contributed something on their own that wasn't necessarily supported from the top down. It shows that someone is a self-starter and motivated, which are important qualities for future Devs, Mods, etc.

There are plenty of people that have an idea but never follow through or get easily discouraged. Those that rise above that and create something without constant praise stand out.

mormonman

2011-08-10 22:39:58

From: Bixby Sayz
It is getting better but it still has a long way to go.

When I first stumbled upon this place I thought "I used to do commercial development in Delphi and C++ Builder, and this stuff uses Pascal. Should be a breeze." WRONG!

I had my first script finished in a couple hours, with the only thing missing being the object finding colors and the walking. I then spent days trying to get just the right colors and just the right dtms for walking.

What kept going through my head was "this is far more complicated than it needs to be. This community has been running for how many years? and still the really basic things have to be recreated from scratch by everyone??? every time??? Something is wrong with this picture."

I still feel that way. It has improved but still has a long way to go. Quick…where is the list of the reflection ids for all the objects, npcs, and interfaces maintained by the community that you can quickly reference? The list of working colors for common trees/npcs? The dtms for common objects?

Those would be truly useful. And yet every time someone mentions starting such a list they get shouted down by the senior members as not wanting to spoil people. Wrong attitude.

My 2 cents.


SPS for walking and tpa's for objects.

Smarter Child

2011-08-11 02:31:23

I understand where you are coming from and a DTM database would be a great idea. :)

However, a colour database is hardly necessary, we have a colour picker. Not to mention, the colour picker is a very easy and simple to use tool. As far as object finding, there ARE function that are specific, such as FindObj/FindObjTPA.

In addition, Fighting.scar there is a function called 'FightNPC' which literally all you have to do is input the colours, tolerance and a wait time and it will fight you NPCs. It's definitely a great function, however when people write their own Fighting functions they can be creative and ultimately create a better fighting function. In Fishing.scar there is the function 'FindFishSpot' which requires NO colours, simply an x/y var and string var to input which spot you will be finding. This is a very EASY and UNCOMPLICATED function to use if you want to find a fishing spot.

I could go on about the various functions in SRL that are very basic and easy. Clearly, there is a lot of simple functions in SRL and frankly imo as someone who has written scripts, functions like FightNPC, FindFishSpot spoil the fun [:p] in writing it. Any ways, just my $0.02 :)

Aftermath

2011-11-30 12:50:16

You'll (as a community) accomplish so much less if you spend your time re-writing the same piece of code - it's not fun or even challenging, just tedious. If someone has a better idea, they can choose to use it in their own script or make it public for inclusion, but forcing people who don't want to deal with this to deal with it needlessly adds barriers to scripting. The reason that BCEL/reflection bots had a lot of scripts (and the reason why graphics bots e.g. DirectX and OpenGL will too) is that there was a universal method to locate a NPC - just FindNPC(NPC_ID) and you're set.

This is a bit harder to do with the color/DTM/bitmap approach (side note, do you guys have proper template matching (e.g. SSD) as opposed to just bitmap searching?), but the set of NPCs of interest is also very small.