SRL Archive - Reflection Help

Need help with Interfaces, MSN Please.


YoHoJo

2011-04-08 02:59:30

Working on my very first reflection script. I want to learn how to use interfaces properly.
I know/guess color would be a lot easier for this I bet, but I'd still like to know how to go about clicking through interface stuff with reflection functions, so anyone who's good with interfaces just hop on to MSN and IM me anytime I'm on!

<3

E: Speciically I just need to click through some questions/answers/talking with NPCs that takes place down in the chatbox. Shouldn't be too difficult after understanding how to get one to work/an initial example I should have it down.

YoHoJo

2011-04-08 19:43:50

Screw it, too much hassle.
function FindNPCChatText(txt: string; Action: (ClickLeft,ClickRight,Move,Nothing)): Boolean;  

Yago

2011-04-08 19:45:31

Lol… Practically.

Jakkle

2011-04-25 14:44:51

I would really like to know how to do interfaces using Reflection.

From: YoHoJo
Screw it, too much hassle.
function FindNPCChatText(txt: string; Action: (ClickLeft,ClickRight,Move,Nothing)): Boolean;  


Is there a function like this, say ( FindInterfaceButtons(WitchButton: String; Action: (ClickLeft,ClickRight,Move,Nothing)): Boolean; ) Or something like that lol.

Home

2011-04-25 15:02:32

From: whacko999
I would really like to know how to do interfaces using Reflection.



Is there a function like this, say ( FindInterfaceButtons(WitchButton: String; Action: (ClickLeft,ClickRight,Move,Nothing)): Boolean; ) Or something like that lol.


We can't get Interfaces Coordinates at the moment. But soon (i hope).
So we can't do like this.

If Find ClickToContinueInterface(x, y) Then Click Interface(x, y);

But what we can do is.
Validinterface (Is Interface on Mainscreen).


~Home

HarryJames

2011-04-25 15:09:39

We can get the coordinates!
Hang on, i'll grab the code I have!

 
if ValidInterface(382) then
begin
x := GetInterfaceComponentRelativeX(382, 19);
y := GetInterfaceComponentRelativeY(382, 19);
Mouse(x + 43, y + 40, 30, 15, True);
end;

Echo_

2011-04-25 15:16:49

I posted functions for this, you will have to test whether they work on a case to case basis.

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

footballjds

2011-04-25 15:31:17

Download powerbot. Get on a shit account.
They have an interface explorer script pre-compiled with the bot. Thats what i use to find the interfaces.
It's searchable as well :D

Jakkle

2011-04-25 15:34:30

From: Home
We can't get Interfaces Coordinates at the moment. But soon (i hope).
So we can't do like this.
If Find ClickToContinueInterface(x, y) Then Click Interface(x, y);

But what we can do is.
Validinterface (Is Interface on Mainscreen).


~Home


I hope so to lol. Yeah I know I can do that.

From: HarryJames
We can get the coordinates!
Hang on, i'll grab the code I have!

 
if ValidInterface(382) then
begin
x := GetInterfaceComponentRelativeX(382, 19);
y := GetInterfaceComponentRelativeY(382, 19);
Mouse(x + 43, y + 40, 30, 15, True);
end;


So all i need to do is copy and paste that then type the interface ID ?

From: Echo_
I posted functions for this, you will have to test whether they work on a case to case basis.

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


Do i just need the (parentIndex, childIndex) for that to work ?

Echo_

2011-04-25 15:36:06

From: whacko999
I hope so to lol. Yeah I know I can do that.



So all i need to do is copy and paste that then type the interface ID ?



Do i just need the (parentIndex, childIndex) for that to work ?


Yeah, like football said, you can find the IDs using powerbot's interface explorer. The parent index on their explorer is the Interface ID, and the child index in their explorer is the Component ID.

HarryJames

2011-04-25 15:36:31

You'd also need to change it to the correct component ID!

Echo_

2011-04-25 15:46:39

Keep in mind that my snippets rely upon relative coordinates, getting the absolute x and y coordinates requires fooling around with the client cache and a bunch of other stuff I don't currently know how to do.

Jakkle

2011-04-25 15:56:27

From: Echo_
Yeah, like football said, you can find the IDs using powerbot's interface explorer. The parent index on their explorer is the Interface ID, and the child index in their explorer is the Component ID.


Thanks alot for the explanation to whats what I needed to know that :) and thanks to all that have replied to help out. I will go through everything and see what i can come up with :D

TomTuff

2011-04-25 21:33:32

if you still need help, [email]tommyk1995@gmail.com[/email] add me