SRL Archive - MSI Bugs

Usage of Reflection for more than just walking


TomTuff

2010-11-07 18:54:13

In MSI, Reflection is only used for walking. I think that reflection does have its place, though, and should be used in MSI for more than just walking. Let me give you an example:

When fighting (Camaro is working on the combat branch of MSI :)) in a place where the monsters are aggro or there is multi-way combat, there is no break between monsters where we can detect if we're still in a fight. With reflection, we could track the tile of the monster we're fighting, and then check the HP percentage of the NPC on that tile to count kills and exp. This can also be used to decide when to check for items to be picked up.

That's just one example, and I'm sure there are more. I'm sorry if that wasn't very clear cut, but I just wanted to know what you guys think.

Coh3n

2010-11-07 18:59:27

I'm on the fence about it, just because from the beginning, MSI has been about color. There advantages to using reflection more, though.
  • We can keep using defines, so color scripts will still work.
  • Reflection seems to be the more common choice among new scripters, so that may encourage development.
  • There's probably more I can't think of.
Anyway, I'd like to hear what everyone else thinks.

Also, IIRC, RM was going to use reflection in obstacle handling.

Cstrike

2010-11-07 19:00:19

Reflection is the only thing I do nowadays, I'd be glad to contribute to reflection coding within MSI.
Since reflection can be turned on and off, we can have it separate. As you said Coh3n, MSI should have both, though reflection would give MSI access to somethings color just cannot do, likewise having color gives MSI access to things reflection just can't do.

EDIT: I'd like to re-iterate that I'd be more than willing to help reflection development of MSI in any aspect. I don't mind color but currently it isn't my thing since I', infatuated with reflection, and I know I can do a perfect job with it if anyone is interested in the offer.

Coh3n

2010-11-07 19:03:55

From: cstrike
Reflection is the only thing I do nowadays, I'd be glad to contribute to reflection coding within MSI.
Since reflection can be turned on and off, we can have it separate. As you said Coh3n, MSI should have both, though reflection would give MSI access to somethings color just cannot do, likewise having color gives MSI access to things reflection just can't do.

EDIT: I'd like to re-iterate that I'd be more than willing to help reflection development of MSI in any aspect. I don't mind color but currently it isn't my thing since I', infatuated with reflection, and I know I can do a perfect job with it if anyone is interested in the offer.

Lol you just proved my second point. :p

TomTuff

2010-11-07 19:03:59

From: cstrike
having color gives MSI access to things reflection just can't do


Example?

Wizzup?

2010-11-07 19:06:00

It would be nice to remain colour compatible.

Coh3n

2010-11-07 19:11:43

From: Wizzup?
It would be nice to remain colour compatible.

Yes, it ALWAYS will be. Thanks to Camaro', we actually have several color walking scripts now. :) Including at least one for each skill.

Cstrike

2010-11-07 19:12:32

From: TomTuff
Example?


There a few, the one that pops to my mind most frequently is the game tab problem where it can't detect the gametab texture to see what gametab is present. Its easy if nothing else has been opened but when multiple interfaces are active, it floods the valid interface screen with all of them and then you can't tell what is open or not as they all overlap.

So far I've looked for ways around it but the textureID keeps returning the same whether its active or not.
Might be a Setting(); issue though.

EDIT: To clarify, if everything was set up like RSBot/Java bot hooks, I think reflection could do pretty much everything.

NCDS

2010-11-07 20:27:42

:crying: Really, really not something I want to do, but I feel it's pointless to argue anymore. No one really seeks the challenge anymore.


I would like to enforce the fact that color development will always be priority though. I would just feel like we're developing a java bot if we went with all reflection.

Cstrike

2010-11-07 20:38:44

From: NCDS
:crying: Really, really not something I want to do, but I feel it's pointless to argue anymore. No one really seeks the challenge anymore

I'll be honest I am guilty of going 110% reflection. I find it easier to create a bot that is perfect and then throw in my "look like human" procedures to mess up its perfection rather than do a huge color code. It's so much easier to do it all in one line :)

I think the reason I go all reflection is that I can get great/fast/quick results in very efficient code with reflection, whereas color was always a mega pain for me to make sure it would work every time. Blame society and instant-gratification ;)

I would like to enforce the fact that color development will always be priority though. I would just feel like we're developing a java bot if we went with all reflection.

I agree that it would be bad to make another java bot, luckily reflection can be defined to be turned on and off, and therefore will always have the best of both worlds [making MSI super duper] :D

NCDS

2010-11-07 20:45:11

From: cstrike

I agree that it would be bad to make another java bot, luckily reflection can be defined to be turned on and off, and therefore will always have the best of both worlds [making MSI super duper] :D


That's exactly why I really have no grounds to oppose this, other than the fact with Reflection being the public favorite, I doubt many people turn it off.

I'm also quite sure MSI's intent was to prove color to still be a powerful resource.

Coh3n

2010-11-08 00:12:55

From: NCDS
I'm also quite sure MSI's intent was to prove color to still be a powerful resource.

Exactly.

TomTuff

2010-11-08 00:28:01

From: NCDS
That's exactly why I really have no grounds to oppose this, other than the fact with Reflection being the public favorite, I doubt many people turn it off.

I'm also quite sure MSI's intent was to prove color to still be a powerful resource.


It has, is, and always will be, regardless of what happens to reflection, and the MSI team has proved that already. It's time to make MSI even better, and when/if reflection breaks, we know we have the people to make MSI work again.

marpis

2010-11-08 04:57:16

The more we use reflection, the more dependant we are to hooks.
Now it's ok if reflection interfaces go down, as long as mapwalking works, etc.

Naike

2010-11-08 05:17:54

From: marpis
The more we use reflection, the more dependant we are to hooks.
Now it's ok if reflection interfaces go down, as long as mapwalking works, etc.


Don't you, or anyone dear complain about the hooks.
They've been solid for all the latest updates (almost two months?)

Bad Boy JH

2010-11-08 05:40:59

I am guilty of abbandoning colour, pretty much high and dry when reflection popped up, I am now, however, returning to a hybrid of both, somthing which I consider more powerful than either. I haven't really had a chance to contribute to MSI, or even use it, cause to be frank, I really have those 'odd needs' that no one else would create a script for (ie flour collection)

NCDS

2010-11-08 05:49:25

From: Bad Boy JH
I am guilty of abbandoning colour, pretty much high and dry when reflection popped up, I am now, however, returning to a hybrid of both, somthing which I consider more powerful than either. I haven't really had a chance to contribute to MSI, or even use it, cause to be frank, I really have those 'odd needs' that no one else would create a script for (ie flour collection)


I don't see any real reason why collection scripts wouldn't work in MSI ;)

Might be something to consider.

Gu3st...

2010-11-08 10:29:56

From: NCDS
:crying: Really, really not something I want to do, but I feel it's pointless to argue anymore. No one really seeks the challenge anymore.


I would like to enforce the fact that color development will always be priority though. I would just feel like we're developing a java bot if we went with all reflection.
This is exactly how I feel about this.. I don't think I know exactly how 'good' the reflection is nowadays, but from what I can remember there is a lot of problems and stuff that isn't working (Ground items atm)
If someone could prove otherwise, that would be great :)

Coh3n

2010-11-08 12:25:39

I'd like to point out that reflection is NEVER going to replace color in MSI. It's just being suggested that, if needed, it be used for more than just walking.

Sir R. M8gic1an

2010-11-09 13:38:42

From: Coh3n
I'd like to point out that reflection is NEVER going to replace color in MSI. It's just being suggested that, if needed, it be used for more than just walking.


Thing is, it's not needed.

To counter the example of following the monsters' tile…

just use MSI_TrackObject.

And then use the Object's coords, collected in TrackObject to check for the hp bar.

We also know that our colour methods can hardly be broken.

~RM

Coh3n

2010-11-09 14:43:04

From: Sir R. Magician
Thing is, it's not needed.

To counter the example of following the monsters' tile…

just use MSI_TrackObject.

And then use the Object's coords, collected in TrackObject to check for the hp bar.

We also know that our colour methods can hardly be broken.

~RM

That's exactly what I told Tom on MSN. I wanted him to make this thread to see what other people thought.

But yeah, it's not needed. MSI already has functions for all the hard stuff (MSI_FindObjects, MSI_TrackObject). With the right logic, it can be just as easy as reflection. Sure, it may take some tweaking for it to work just as well, but that's really not a big deal.

I feel like we should keep reflection only for walking for now. Maybe somewhere down the road something will come up that simply can't be done it color, but I don't see that happening any time soon.

Method

2010-11-09 16:28:03

From: Zyt3x
This is exactly how I feel about this.. I don't think I know exactly how 'good' the reflection is nowadays, but from what I can remember there is a lot of problems and stuff that isn't working (Ground items atm)
If someone could prove otherwise, that would be great :)


As far as I know searching for ground items works fine since I fixed the code.

From: Sir R. Magician
Thing is, it's not needed.

To counter the example of following the monsters' tile…

just use MSI_TrackObject.

And then use the Object's coords, collected in TrackObject to check for the hp bar.

We also know that our colour methods can hardly be broken.

~RM


And the methods in reflection can? Unless you're referring to a big engine change like RuneTek5, I don't understand how you could make this claim.

This is assuming you're actually talking about the functions in the reflection include and not the hooks, though, which inevitably need to be updated each time the client updates. That process is easy enough if you have an updater, anyways.

Sir R. M8gic1an

2010-11-09 16:52:51

From: Method

And the methods in reflection can? Unless you're referring to a big engine change like RuneTek5, I don't understand how you could make this claim.

This is assuming you're actually talking about the functions in the reflection include and not the hooks, though, which inevitably need to be updated each time the client updates. That process is easy enough if you have an updater, anyways.


I couldn't make any sense of your post.. :s :p

The claim I made was that MSI's current object 'manipulators' can hardly be broken. Why? Because as far as an object moves left on the screen it will always move left on the screen, no matter the maths / coding behind it.

By saying this I in no manner say that reflection can't do this.
It can, and most likely better. However, we already do this in color.

And my main reason for not wanting to step away from color is that someone has to stick to it. And MSI has an awful lot of good color code.
Putting that code aside would be a complete waste after all it went through in terms of quality control.

(And then yeh, there's always the argument of reflection breaking sooner or later.)

The advantage of color is that is abuses the 'analog hole', something for which the entire world still has to find a solution. Until that solution is found, color will always be a viable option ;)

~RM

Cstrike

2010-11-09 16:59:23

From: Sir R. Magician

The advantage of color is that is abuses the 'analog hole', something for which the entire world still has to find a solution. Until that solution is found, color will always be a viable option ;)

~RM


Whats the analog hole?
:)


I think another potential good use of reflection is for having it carry out the hard tasks like random solving and walking… until color is fully ready to take its place. It can act more like a bandaid to ensure multiple scripts can be run until the final conversion is ready to take place.

Naike

2010-11-09 17:28:05

Just going to point in a note here..

Reflection randoms in MSI is a terrible mistake for now.
Or well, they should be more stable than the SRL ones, but they're not all 100% working!

Just letting you know :)

Coh3n

2010-11-09 18:16:51

From: Naike
Just going to point in a note here..

Reflection randoms in MSI is a terrible mistake for now.
Or well, they should be more stable than the SRL ones, but they're not all 100% working!

Just letting you know :)

Yeah they were disabled shortly after you recommended to do so. Also, it kept detecting a random even though it wasn't in a random, which caused the player to be set to false and logout. So we're just sticking with color until the reflection ones are more stable. :)

Sir R. M8gic1an

2010-11-10 05:08:31

From: cstrike
Whats the analog hole?
:)


http://en.wikipedia.org/wiki/Analog_hole

~RM

Dan Cardin

2010-11-28 19:04:10

I don't see what's the problem with using reflection when color either gets lost or doesn't know what to do. Color fails and reflection kicks in. At the next interval where color can kick back in (say once back in a bank or something) it does so. If color fails x amount of times, reflection stays on. Or vice versa. When hooks are down/reflection fucks up, color kicks in.

Win, win. What's the problem? Imo, redundancy can't hurt other than possibly slowing development (though at least 1 or 2 people have already said that they would help with reflection, and the offer didnt look like it was extending to color, so mayhaps it wouldn't).

Coh3n

2010-11-28 19:51:31

From: Dan Cardin
I don't see what's the problem with using reflection when color either gets lost or doesn't know what to do. Color fails and reflection kicks in. At the next interval where color can kick back in (say once back in a bank or something) it does so. If color fails x amount of times, reflection stays on. Or vice versa. When hooks are down/reflection fucks up, color kicks in.

Win, win. What's the problem? Imo, redundancy can't hurt other than possibly slowing development (though at least 1 or 2 people have already said that they would help with reflection, and the offer didnt look like it was extending to color, so mayhaps it wouldn't).

http://villavu.com/forum/showthread.php?t=60111 ;)