Page 1 of 1

vg.MobArray.GetNearest() VB.Net

Posted: September 9th, 2007, 4:30 am
by mdomino69
I am trying to use vg.MobArray.GetNearest() in VB.Net and get a type mismatch when trying to send a MsgBox with the entire array, which is a problem. I am also unable to send a messagebox with the ArrayName.Item(0) syntax as well.

It is giving an error converting a byRef to String. Any ideas on how I can do this to show the entire MobArray, I am working on a new Necro bot.

Thanks

Posted: September 9th, 2007, 2:39 pm
by Tault_admin
well the returned value is a ArrayList which is an object. So you really cant msgbox the array. You have to do a for each or similar and iterate over the array to get out each mob you wish to get info about.

you can do something like this also ((IMob)ReturnedArray[5]).Name

Posted: September 10th, 2007, 12:10 am
by mdomino69
In VB.Net how would I go about declaring IMOB or where do I do that, and also could I get a quick example? Or a place pointing me to one

Because the above code doesn't work and I am trying to get back in the swing of things with including DLLs in my applications.

Posted: September 10th, 2007, 1:36 am
by wyvernx
When you add a reference to the LotrWrapper.dll, it should have all of them defined.

Posted: September 10th, 2007, 5:13 am
by mdomino69
Where is LOTRWrapper? Didnt see it in VGExtreme folder or do I need to DL it separately?

Posted: September 10th, 2007, 5:16 am
by mdomino69
Sorry to spam the forums!

If you meant VGEWrapper I have it included and can do everything except recieve the property of a mob.

Is there any way I could get a copy of the declaration and a quick piece of code to pull the name or HP or something from a mob in my ArrayList (called Mobs)

Thanks again, you're a great help!

Posted: September 10th, 2007, 3:11 pm
by wyvernx
Yes, VGEWrapper....

If you look at the object browser you can find the IMob interface in like VGEWrapper.Interfaces.IMob.