duthibaut 0 Posted May 14, 2019 Share Posted May 14, 2019 Hello everyone. I want to make a GetDistance on my nearest object like in the tools : Nearest GameObject informations: Name: Vietérule (Entry: 2041 ) IsBlacklisted = False CreatedBy = 0 DisplayId = 677 FlagsInt = 0 Flags = 0 Position = 4333,47 ; 3002,03 ; 124,227 ; "None" Name = Vietérule GetDistance = 108,2044 --> I want this one ^^ For me I use : wManager.Wow.ObjectManager.ObjectManager.Me.IsGoodInteractDistance; But for an object, i don't know how it's working. Something like : var distance = wManager.Wow.ObjectManager.WoWObject.GetDistance(ObjectID); If someone know that ^^" (I'm beginner in C#) And the other question is : Which class can i use for use gathering ? I want By the distance active gathering the plant with this the nearest ID. If u have the answers, i will love u forever ! Salmo ^^ Link to comment https://wrobot.eu/forums/topic/11223-c-getdistance-gameobject-farmaction/ Share on other sites More sharing options...
duthibaut 0 Posted May 15, 2019 Author Share Posted May 15, 2019 Someone know how to resolv this problem ? Line : ObjectManager.GetWoWGameObjectByEntry(neantineId).First().Entry) Error on compliation pluggin : My usings : using System; using System.ComponentModel; using System.IO; using robotManager; using robotManager.Helpful; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; using wManager.Events; using wManager.Plugin; using wManager.Wow; using wManager.Wow.Bot.States; using wManager.Wow.Bot.Tasks; using wManager.Wow.Enums; using wManager.Wow.Forms; using wManager.Wow.Forms.ProfileMaker; Link to comment https://wrobot.eu/forums/topic/11223-c-getdistance-gameobject-farmaction/#findComment-53638 Share on other sites More sharing options...
Matenia 628 Posted May 15, 2019 Share Posted May 15, 2019 ObjectManager.GetObjectWoWGameObject().Where(o => o.Entry == 1234).OrderBy(o => o.GetDistance).FirstOrDefault(); Link to comment https://wrobot.eu/forums/topic/11223-c-getdistance-gameobject-farmaction/#findComment-53640 Share on other sites More sharing options...
duthibaut 0 Posted May 15, 2019 Author Share Posted May 15, 2019 Thank for this code, but when i want to put this code in pluggin, he don"t find : o.Entry or .Where, .position .GetDistance ... Do u know how to implement this method in pluggins ? Link to comment https://wrobot.eu/forums/topic/11223-c-getdistance-gameobject-farmaction/#findComment-53642 Share on other sites More sharing options...
Matenia 628 Posted May 15, 2019 Share Posted May 15, 2019 You need to add Linq to the using declarations (imports)... Link to comment https://wrobot.eu/forums/topic/11223-c-getdistance-gameobject-farmaction/#findComment-53643 Share on other sites More sharing options...
duthibaut 0 Posted May 15, 2019 Author Share Posted May 15, 2019 Yes it's what I do for the other, but i don"t find the link for .entry ^^" Something like ? wManager.Wow.ObjectManager.WoWObject.Entry Link to comment https://wrobot.eu/forums/topic/11223-c-getdistance-gameobject-farmaction/#findComment-53644 Share on other sites More sharing options...
duthibaut 0 Posted May 15, 2019 Author Share Posted May 15, 2019 Ok i'm fucking idiot, I was trying to apply the Get: for the attribut on my method ... Better way to use it on the object ... Thanks for help ! Link to comment https://wrobot.eu/forums/topic/11223-c-getdistance-gameobject-farmaction/#findComment-53668 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now