[C#][Source] BlackRain - Simple Object Manager Library menu

User Tag List

Page 3 of 14 FirstFirst 1234567 ... LastLast
Results 31 to 45 of 196
  1. #31
    MaiN's Avatar Elite User
    Reputation
    335
    Join Date
    Sep 2006
    Posts
    1,047
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Robske View Post
    Code:
    field *= field; // He's anal.
    Second wat
    This was because of Apoc's fail (he ninja-edited it away, but I quoted it like 4 posts ago!).
    [16:15:41] Cypher: caus the CPU is a dick
    [16:16:07] kynox: CPU is mad
    [16:16:15] Cypher: CPU is all like
    [16:16:16] Cypher: whatever, i do what i want

    [C#][Source] BlackRain - Simple Object Manager Library
  2. #32
    Seifer's Avatar Site Donator
    Reputation
    129
    Join Date
    Apr 2007
    Posts
    270
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for pointing that silly mistake out Robske, I'll fix it in the upcoming revision.

    I used to read the Type that way, but in the habit of using the descriptors I blatantly wrote that out, without double checking it (or even thinking about it) at all.

    Same stuff with the int.MinValue, for some reason I assumed the min value of an int is 0, but I think I mixed it up with uint.MinValue (which actually is 0, int.MinValue is something like -2 million?). Thanks for pointing out the sloppy (and often noobish) mistakes.
    Last edited by Seifer; 04-18-2010 at 04:14 PM.

  3. #33
    l1nk3's Avatar Active Member
    Reputation
    25
    Join Date
    Feb 2008
    Posts
    304
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yay!

    (filler)

  4. #34
    Seifer's Avatar Site Donator
    Reputation
    129
    Join Date
    Apr 2007
    Posts
    270
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    BlackRain updated to 04192010. The objects are now properly loaded and handled, so you should be able to find all objects and their respective types.

    I noticed only now that I haven't added X,Y,Z to units yet, so that's on the to-do list for the next revision. I should manage my shit a bit more properly, honestly.

  5. #35
    l1nk3's Avatar Active Member
    Reputation
    25
    Join Date
    Feb 2008
    Posts
    304
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am not sure why, but I love your naming conventions.

    :O

    Except for WowDynamicObject.

    lol.

  6. #36
    Seifer's Avatar Site Donator
    Reputation
    129
    Join Date
    Apr 2007
    Posts
    270
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by l1nk3 View Post
    I am not sure why, but I love your naming conventions.

    :O

    Except for WowDynamicObject.

    lol.
    That's what they're called, can't help it.

    The only naming I dislike is the double encapsulated ID's, which ReSharper doesn't agree on either.

  7. #37
    Seifer's Avatar Site Donator
    Reputation
    129
    Join Date
    Apr 2007
    Posts
    270
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Updated to 1.0a, 04222010. This is the first release where I'm confident enough to say it's stable. At least, the majority of it, but more on that later on.

    Anyway, changelog:
    04222010 - Revision 9

    - Added X,Y,Z to WowObject and an override on WowGameObject.
    - Rough functionality for Object searching introduced, unstable, and needs testing/fixing.
    The object searching is based on Apoc's method, which works like a charm. The only thing is that, with the introduction of C# 4.0, we're now able to take optional parameters instead of overloads, so I'll be working on getting the object searching to work with C# 4.0 standards, rather than using overloads.

    Stuff like:
    Code:
    /// <summary>
            /// Refreshes the Object Search.
            /// </summary>
            /// <param name="parameters"></param>
            public void Refresh([Optional, DefaultParameterValue(null)]SearchParams @parameters)
            {
                List<T> list = (@parameters == null) ? _objectList = DoSearch<T>(ObjectManager.Objects, Parameters) : _objectList = DoSearch<T>(ObjectManager.Objects, parameters);
            }
    Is way too sloppy and poor written to call it stable, therefore this is an "alpha" release, if you will. I'm also working on making the entire DoSearch() method use LINQ rather than a foreach statement in the end, but that hasn't worked out too well either.

    Anyway, it (finally) has X,Y,Z working now, for WowObject in general, and an override for GameObject (since they're different), so you should be able to get some sort of tool going with it now.

    Oh and Apoc, in your post regarding Object Searching, you search for object specific stuff in WowObject, such as level, health (IsDead) etc. do you actually keep these values in WowObject, or do you pass it - for example - WowUnit? Can't imagine the latter, since you'd end up with null results in the LINQ statement for several objects. Can you clarify this? (Couldn't post in that thread because of necro protection)

    Updated binaries and SVN.

    Last edited by Seifer; 04-22-2010 at 11:17 AM.

  8. #38
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Seifer View Post
    Updated to 1.0a, 04222010. This is the first release where I'm confident enough to say it's stable. At least, the majority of it, but more on that later on.

    Anyway, changelog:


    The object searching is based on Apoc's method, which works like a charm. The only thing is that, with the introduction of C# 4.0, we're now able to take optional parameters instead of overloads, so I'll be working on getting the object searching to work with C# 4.0 standards, rather than using overloads.

    Stuff like:
    Code:
    /// <summary>
            /// Refreshes the Object Search.
            /// </summary>
            /// <param name="parameters"></param>
            public void Refresh([Optional, DefaultParameterValue(null)]SearchParams @parameters)
            {
                List<T> list = (@parameters == null) ? _objectList = DoSearch<T>(ObjectManager.Objects, Parameters) : _objectList = DoSearch<T>(ObjectManager.Objects, parameters);
            }
    Is way too sloppy and poor written to call it stable, therefore this is an "alpha" release, if you will. I'm also working on making the entire DoSearch() method use LINQ rather than a foreach statement in the end, but that hasn't worked out too well either.

    Anyway, it (finally) has X,Y,Z working now, for WowObject in general, and an override for GameObject (since they're different), so you should be able to get some sort of tool going with it now.

    Updated binaries and SVN.

    I actually ditched the entire 'object searching' method, in favor of (faster) LINQ queries.

    Eg:

    Code:
                    possibleTargets = (from o in OnyxWoW.ObjectList
                                       where o is WoWUnit &&
                                             o != OnyxWoW.Me &&
                                             o.Distance <= AreaManager.CurrentArea.TargetingRange &&
                                             o.Position.Distance(AreaManager.CurrentHotspot.Position) <= AreaManager.CurrentHotspot.Range
                                       let u = o.ToUnit()
                                       where !u.Dead &&
                                             !u.PvpFlagged &&
                                             u.Relation != WoWUnitRelation.Friendly &&
                                             u.CreatureType != WoWCreatureType.Critter &&
                                             !u.Tapped &&
                                             u.Level >= MinLevel &&
                                             u.Level <= MaxLevel &&
                                             !u.OnTaxi &&
                                             u.Attackable &&
                                             !AreaManager.CurrentArea.IgnoreFactions.Contains(u.Faction.Id)
                                       orderby o.Distance ascending
                                       select u).ToList();
    Makes it easier to do very fast, easy to understand, searches.

    Also; as a design pattern, nothing in our WoW library returns null unless specifically stated. (99% of the stuff has an 'IsValid' boolean, so you can always be sure whether or not the object is a valid reference or not.)

    And our main ObjectList never contains invalid objects. (They are persistent though)
    Last edited by Apoc; 04-22-2010 at 11:23 AM.

  9. #39
    Opirity's Avatar Contributor
    Reputation
    139
    Join Date
    Apr 2010
    Posts
    462
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    isnt blackrain the crack in iphone? D:

  10. #40
    Seifer's Avatar Site Donator
    Reputation
    129
    Join Date
    Apr 2007
    Posts
    270
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Apoc View Post
    I actually ditched the entire 'object searching' method, in favor of (faster) LINQ queries.

    Eg:

    Code:
                    possibleTargets = (from o in OnyxWoW.ObjectList
                                       where o is WoWUnit &&
                                             o != OnyxWoW.Me &&
                                             o.Distance <= AreaManager.CurrentArea.TargetingRange &&
                                             o.Position.Distance(AreaManager.CurrentHotspot.Position) <= AreaManager.CurrentHotspot.Range
                                       let u = o.ToUnit()
                                       where !u.Dead &&
                                             !u.PvpFlagged &&
                                             u.Relation != WoWUnitRelation.Friendly &&
                                             u.CreatureType != WoWCreatureType.Critter &&
                                             !u.Tapped &&
                                             u.Level >= MinLevel &&
                                             u.Level <= MaxLevel &&
                                             !u.OnTaxi &&
                                             u.Attackable &&
                                             !AreaManager.CurrentArea.IgnoreFactions.Contains(u.Faction.Id)
                                       orderby o.Distance ascending
                                       select u).ToList();
    Makes it easier to do very fast, easy to understand, searches.

    Also; as a design pattern, nothing in our WoW library returns null unless specifically stated. (99% of the stuff has an 'IsValid' boolean, so you can always be sure whether or not the object is a valid reference or not.)

    And our main ObjectList never contains invalid objects. (They are persistent though)
    That's exactly what I was shooting for - Thanks!

    So, for example; if I'm using the above LINQ statement, or the statement you had posted in the ObjectSearching post, where you were searching WoWObjects, and had a check for "bool IsDead" in the LINQ statement, you kept the IsDead property in your WowObject class? That got me a bit confused, as IsDead is not a valid property for all objects that inherit from WowObject, I believe.

    Originally Posted by ephecat View Post
    isnt blackrain the crack in iphone? D:
    It is. Hence the "original naming"
    I felt like this stuff is - in some way, shape or form - similar to jailbraking an iphone, as we allow our own code to run on the WoW baseline (long shot, I know).

  11. #41
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Seifer View Post

    So, for example; if I'm using the above LINQ statement, or the statement you had posted in the ObjectSearching post, where you were searching WoWObjects, and had a check for "bool IsDead" in the LINQ statement, you kept the IsDead property in your WowObject class? That got me a bit confused, as IsDead is not a valid property for all objects that inherit from WowObject, I believe.
    let u = o.ToUnit()
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

  12. #42
    Kryso's Avatar Active Member
    Reputation
    40
    Join Date
    Jul 2009
    Posts
    97
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Seifer View Post
    That's exactly what I was shooting for - Thanks!

    So, for example; if I'm using the above LINQ statement, or the statement you had posted in the ObjectSearching post, where you were searching WoWObjects, and had a check for "bool IsDead" in the LINQ statement, you kept the IsDead property in your WowObject class? That got me a bit confused, as IsDead is not a valid property for all objects that inherit from WowObject, I believe.
    Walkthrough: Writing Queries in C# (LINQ) - let keyword

    possibleTargets = (from o in OnyxWoW.ObjectList
    where o is WoWUnit &&
    o != OnyxWoW.Me &&
    o.Distance <= AreaManager.CurrentArea.TargetingRange &&
    o.Position.Distance(AreaManager.CurrentHotspot.Position) <= AreaManager.CurrentHotspot.Range
    let u = o.ToUnit()
    where !u.Dead &&
    !u.PvpFlagged &&
    u.Relation != WoWUnitRelation.Friendly &&
    u.CreatureType != WoWCreatureType.Critter &&
    !u.Tapped &&
    u.Level >= MinLevel &&
    u.Level <= MaxLevel &&
    !u.OnTaxi &&
    u.Attackable &&
    !AreaManager.CurrentArea.IgnoreFactions.Contains(u.Faction.Id)
    orderby o.Distance ascending
    select u).ToList();
    edit: damn, too slow

  13. #43
    Seifer's Avatar Site Donator
    Reputation
    129
    Join Date
    Apr 2007
    Posts
    270
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Robske View Post
    let u = o.ToUnit()

    Yes, I noted that in this post, but in the post over at:
    http://www.mmowned.com/forums/progra...ml#post1596536

    He has shown us a method like:
    Code:
    IEnumerable<WoWObject> filtered = from o in objects
    where
                                                      Compare.Equal(searchParams.Name, o.Name) &&
                                                      Compare.Equal(searchParams.CanAttack, o.CanAttack) &&
                                                      Compare.Equal(searchParams.Dead, o.IsDead) &&
    And call me a knob, but I can't see how it's converted to a unit there.

    Which got me to believing that IsDead is actually a property of WowObject, unless I'm missing something obvious. (Which I probably am)

  14. #44
    Jackedy129's Avatar Member
    Reputation
    1
    Join Date
    Apr 2009
    Posts
    15
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've copied and pasted your code exactly (apart from readonly, for somereason it won't compile with that there), yet am getting NullReferenceException errors when reading health, wow is open and logged in etc. Any chance of a heads up?

    Code:
    Process[] _wowProc = Process.GetProcessesByName("Wow");
    int pid = _wowProc[0].Id; // Will grab the first WoW process found. (0th element)
    ObjectManager.Initialize(pid);
    int playerHealth = ObjectManager.Me.Health;
    Last edited by Jackedy129; 04-22-2010 at 12:28 PM.

  15. #45
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Seifer View Post

    Yes, I noted that in this post, but in the post over at:
    http://www.mmowned.com/forums/progra...ml#post1596536

    He has shown us a method like:
    Code:
    IEnumerable<WoWObject> filtered = from o in objects
    where
                                                      Compare.Equal(searchParams.Name, o.Name) &&
                                                      Compare.Equal(searchParams.CanAttack, o.CanAttack) &&
                                                      Compare.Equal(searchParams.Dead, o.IsDead) &&
    And call me a knob, but I can't see how it's converted to a unit there.

    Which got me to believing that IsDead is actually a property of WowObject, unless I'm missing something obvious. (Which I probably am)
    ...

    From the post:

    First things first, lets create some quick wrapper stuff to feed our searcher.

    Code:
    namespace ObjectSearcher
    {
        public class WoWObject
        {
            public double Distance;
            public ulong Guid;
            public bool IsDead;
            public bool IsInLineOfSight;
            public string Name;
            public virtual int Type { get { return 1; } }
            public bool CanAttack;
            public int Level;
            public bool IsMe;
        }
    
        public class WoWUnit : WoWObject
        {
            public override int Type { get { return 2; } }
        }
    }
    Again, nothing really functional. That's up to you as the bot writer to implement!
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

Page 3 of 14 FirstFirst 1234567 ... LastLast

Similar Threads

  1. [C#][Source] Radar and Object Manager Tester / Verifier
    By xochi in forum WoW Memory Editing
    Replies: 18
    Last Post: 01-08-2011, 02:04 AM
  2. [Source] WPF Wow Object manager
    By !@^^@! in forum WoW Memory Editing
    Replies: 11
    Last Post: 01-26-2010, 04:13 PM
  3. Mobs missing from object manager.
    By RawrSnarl in forum WoW Memory Editing
    Replies: 23
    Last Post: 12-31-2008, 01:31 PM
  4. Object Manager
    By Shamun in forum WoW Memory Editing
    Replies: 11
    Last Post: 11-28-2008, 02:06 PM
  5. WoW Object Manager ?
    By discorly in forum WoW ME Questions and Requests
    Replies: 4
    Last Post: 07-28-2007, 06:34 PM
All times are GMT -5. The time now is 04:39 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search