THANKS! and another question! hostile/friendly/neutral menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 27
  1. #1
    ShoniShilent's Avatar Member
    Reputation
    7
    Join Date
    May 2008
    Posts
    105
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    THANKS! and another question! hostile/friendly/neutral

    First a big THANKS for all the help with them many postings from the members here. There are too many posts and people to mention so thanks to all those who posted info here. I got my bot working again with 3.0.3 (i hadn't messed with it since 2.4.3). In fact it's even better and improved.

    However, I still have a glaring deficiency in my bot. I cannot faithfully determine the 'attitude' of NPC's/MOBS (i.e. hostile, neutral, friendly).

    My bot basically does a loop, cycling through all the units and gathers all their xyz, etc. data. For instance, there is a pointer that points to another pointer that points to the unit's NAME (i.e. [[base+0x9b0]+0x3c] points to address holding string for unit name.

    Is there a pointer that points to data which basically gives you the 'attitude' or 'hostility' value?

    I have been using the FLAGS (base+ 0x3A * 4) with a series of checks:

    If Mobs(i)\friendly > 0

    If Mobs(i)\friendly <> $9200 And Mobs(i)\friendly <> $8000 And Mobs(i)\friendly <> $80800

    etc. to try and do this, but this just isn't the correct way. is there a pointer within each unit/mob's structure that shows it's hostility? i'd prefer it this way then trying to call some sort of function in the actual game code, which would require me to inject .dll or code into the game space and set it up, etc. there has to be a way to determine this from within the objects loop..

    there was this posting in the past:

    http://www.mmowned.com/forums/wow-me...ttacked-2.html

    but i could never divine a way to get to the info from the objects loop via pointers within the unit structs themselves as opposed to the method of calling a wow.exe function from the bot (which i do not want to do for many reasons). i never was able to crack what the code was doing to make the compare, etc.

    thanks again and i look forward to any help-

    ShoniShilent
    Last edited by ShoniShilent; 11-17-2008 at 12:43 AM.

    THANKS! and another question! hostile/friendly/neutral
  2. #2
    kynox's Avatar Member
    Reputation
    830
    Join Date
    Dec 2006
    Posts
    888
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Look at the UnitReaction LUA function.

  3. #3
    ShoniShilent's Avatar Member
    Reputation
    7
    Join Date
    May 2008
    Posts
    105
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the response. a couple things:

    i did a search for UnitReaction and LUA which gave only one location:

    http://www.mmowned.com/forums/wow-me...formation.html

    where in Cypher's post he has the LUA dump and it says:

    [20:49:33]: 0x00564030 -> UnitReaction


    i don't know where to begin here. I have no idea where or what a LUA dump would be showing. If this is a code location of the wow.exe, then 564030 has changed in the 3.0.3 version of the game.

    the small snippet cypher posted only tells me a location (to which i have no idea where this location is, although i am assuming this is the wow.exe). i doesn't show the actual code ther nor does it help to parse how to point to this data from the units base addresses themselves (as i discussed earlier).

    i am not too keen on attaching debuggers to the game and looking at the assembly, although if i knew the correct 3.0.3 address i would do so. i appreciate any responses on this. i have learned alot from kynox and cypher over the weeks but determining the unitreaction or 'hostility' remains a vital part of any hack/bot for this game!

    if i know the object base, is there a series of levels or pointers to get to the hostility rating? i don't think i'll be able to call the wow.exe functions from within my bot/proggie.

    ShoniShilent-

  4. #4
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In the 3.0.3 patch, the LUA functions got offset a little bit. You need to search for a string in IDA to find the new addy for the GetUnitReaction() or whatever it is. That's all that his app does, it goes through the code and searches for the specified string names.

  5. #5
    argh44z's Avatar Member
    Reputation
    19
    Join Date
    Nov 2007
    Posts
    93
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ShoniShilent View Post
    i am not too keen on attaching debuggers to the game and looking at the assembly, although if i knew the correct 3.0.3 address i would do so. i appreciate any responses on this. i have learned alot from kynox and cypher over the weeks but determining the unitreaction or 'hostility' remains a vital part of any hack/bot for this game!
    It takes about 30 seconds to find the new address in IDA (for any Lua CFunction such as UnitReaction). Like most applications that embed Lua, WoW has tables of Lua global name to Lua CFunctions that get lua_register'd.

    You already did most of what you need to do in order to get the new address (do a string search). Highlight the operand (should be something like aUnitreaction or w/e IDA autogenerates) and look at the xrefs. You'll see a xref to the table entry. The second item is the RVA of the CFunction.

    In terms of your specific issue (getting hostility), Shynd posted some C# code a while back which are reversed from two functions that GetReaction calls (er, actually deeper in the chain than that). You'll have to update some of the static addresses he references, as well as of the relative addresses (0x120 and 0x74). The rest of it looks like it hasn't changed in 3.0.x. In order to update those, find the functions that he reversed. It's not hard, keep on seeing what UnitReaction calls.

  6. #6
    ShoniShilent's Avatar Member
    Reputation
    7
    Join Date
    May 2008
    Posts
    105
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can someone please post the assembly of the function for the GetReaction here? or better yet, post a direct way to get the reaction from the playerbase (or unitbase)? i been struggling with this for a long time. i appreciate a descriptive help in this!

  7. #7
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    enum UNIT_REACTION __thiscall CGUnit_C__UnitReaction(struct CGUnit_C *unit)
    0x00666B10

    enum UNIT_REACTION
    {
    UR_UNKNOWN = 0,
    UR_HATED,
    UR_HOSTILE,
    UR_UNFRIENDLY,
    UR_NEUTRAL,
    UR_FRIENDLY,
    UR_HONORED,
    UR_REVERED,
    UR_EXALTED
    };

    You can also retrieve the information via the CreatureInfo cache. That would be the easier method if you're out of process, but I'm not currently using that.

    Example of calling the method I posted above:
    CGLocalPlayer_C * pLocal = pObjectManager->GetLocalPlayer();
    CGUnit_C * pUnit = (CGUnit_C*)(0xDEADBEEF);
    unisnged int ReactionLevel = pUnit->UnitReaction(pLocal);

  8. #8
    hypnodok's Avatar Member
    Reputation
    19
    Join Date
    Nov 2007
    Posts
    65
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  9. #9
    ShoniShilent's Avatar Member
    Reputation
    7
    Join Date
    May 2008
    Posts
    105
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the help so far, especially the link to that thread by hypnodok-

    first, i do not want to inject memory space into the wow game space .exe or touch it at all so calling the actual function from within the .exe isn't how i want to achieve this:

    however, i see the code:

    00666B31 |> 8B83 08010000 MOV EAX,DWORD PTR DS:[EBX+108]
    00666B37 |. 8B88 D0000000 MOV ECX,DWORD PTR DS:[EAX+D0]

    so if EBX is the base address of either the player or the creature/mob, then:

    i can find a value at:

    [[EBX+108]+D0]

    such that substituting basetype for EBX:

    [[PLAYERBASE+108]+DO]== value1
    [[MOBBASE+108]+D0]==value2

    compare value1 to value2 in some way determines the threat/reaction

    is this correct so far?


    also, knowing:

    [[mobbase]+9b0]+3c] == name of mob
    [[objectbase]+1f4]+78]== name of object

    is there a set of pointer levels for other human players that points to the name of the player?

  10. #10
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ShoniShilent View Post
    thanks for the help so far, especially the link to that thread by hypnodok-

    first, i do not want to inject memory space into the wow game space .exe or touch it at all so calling the actual function from within the .exe isn't how i want to achieve this:

    however, i see the code:

    00666B31 |> 8B83 08010000 MOV EAX,DWORD PTR DS:[EBX+108]
    00666B37 |. 8B88 D0000000 MOV ECX,DWORD PTR DS:[EAX+D0]

    so if EBX is the base address of either the player or the creature/mob, then:

    i can find a value at:

    [[EBX+108]+D0]

    such that substituting basetype for EBX:

    [[PLAYERBASE+108]+DO]== value1
    [[MOBBASE+108]+D0]==value2

    compare value1 to value2 in some way determines the threat/reaction

    is this correct so far?


    also, knowing:

    [[mobbase]+9b0]+3c] == name of mob
    [[objectbase]+1f4]+78]== name of object

    is there a set of pointer levels for other human players that points to the name of the player?

    Player names are stored in WoWs cache.

    Hostility is also stored in WoWs cache (afaik). Unsure if it's anywhere else.

  11. #11
    ShoniShilent's Avatar Member
    Reputation
    7
    Join Date
    May 2008
    Posts
    105
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i am just hearing of the WOW cache(s). how do i point to the cache(s), and iterate through them? is there a posting here that shows the structure of the cache list(s) and what types of cache lists there are?

    i need to be able to determine the current number of mobs, iterate through them, draw out their hostility (based on their GUID, i guess?).

    same for players: number of players, iterate through them, draw out their names..

    i DID do a search for this, but there doesn't seem to be any clear code on this, especially for 3.0.3.

    i have been gaining alot of info the last week or two, but still stuck with these last few lingering problems, especially the hostility.

    maybe there is a static pointer that holds the number of mobs, players, etc. and another that points to the beginning of the cache(s) for each of those?

    there must also be a way to parse the list(s) to get the info, similar to how we do with getting the mobs x,y,z, etc.

    thanks again for all the info, etc. and i look forward to more responses-

  12. #12
    UnknOwned's Avatar Legendary
    Reputation
    713
    Join Date
    Nov 2006
    Posts
    583
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    What I did since I don't use injection, was to use the 2 faction indexes.

    Rep Factions
    Rep factions are stored as a index in the memory.
    Currently (3.0.3) they are stored at 0x01176448 what you need to know is:


    • 0x0 - FactionID
    • 0xC - Reputation


    Creature Factions
    Creature factions are stored in memory too but its much easier to just go for the stuff found in the DBC files.


    • FactionNAMEid
    • FactionGNA
    • FactionFightSupport
    • FactionFriend
    • FactionHostile


    For a simple explanation think of it as a 4 byte bitmask


    • 0x1 - Creature
    • 0x2 - Horde
    • 0x3 - Alliance
    • 0x4 - Horde & Alliance (Players)

    So take the Wolfs Northshire Abbey (faction32):

    0000 ;Won't Aid anyone
    0000 ;Not Friends with anyone
    0000 ;Not Hostile towards anyone

    Not friend nor hostile with anyone.

    The Wolfs in the rest of Elwyn Forest (faction 3:

    1000 ;Will aid if someone attacks another faction 38.
    0000 ;Not Friends with anyone
    0001 ;Hostile towards both Alliance and Horde (Players)

    Use stormlib.dll to read from the MPQ's.
    Last edited by UnknOwned; 11-30-2008 at 12:51 PM.

  13. #13
    ShoniShilent's Avatar Member
    Reputation
    7
    Join Date
    May 2008
    Posts
    105
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this is new information to me thanks! i am trying to see how to use this with my program, however.

    are you making a giant list of data from the MPQ's and adding it to your program and then reading from that? or are you reading from the memory at run time to parse the faction info?

    i am already gathering the Faction ID from the linked list when i gather all the mob/objects info. i can see the wolves have the FactionID's you mentioned. how do i read the data you are describing?

    for instance, by knowing the factionID is 32 or 38, how do i get to the point where i have determined (creature, horde, alliance) and how do i get to determine (aids?, friends?, hostile?) while parsing the linkedlist of objects? do i start with location 0x01176448 and use the FactionID to go a certain number of bytes from there?

    i see your masks you are listing, but i am not sure how to convert or check the data to arrive at those values (i.e. 1000, 0000, 0001, etc.) or check/compare. what am i reading to compare to get at those values?

    sorry if this sounds like i am completely clueless but i actually am fairly decent with programmin and etc. it's just that this hostity for whatever reason has been a pain!

    thanks to everyone for the postings so far. hopefully somebody is getting something out of all this except just me-

  14. #14
    UnknOwned's Avatar Legendary
    Reputation
    713
    Join Date
    Nov 2006
    Posts
    583
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ShoniShilent View Post
    this is new information to me thanks! i am trying to see how to use this with my program, however.

    are you making a giant list of data from the MPQ's and adding it to your program and then reading from that? or are you reading from the memory at run time to parse the faction info?

    i am already gathering the Faction ID from the linked list when i gather all the mob/objects info. i can see the wolves have the FactionID's you mentioned. how do i read the data you are describing?

    for instance, by knowing the factionID is 32 or 38, how do i get to the point where i have determined (creature, horde, alliance) and how do i get to determine (aids?, friends?, hostile?) while parsing the linkedlist of objects? do i start with location 0x01176448 and use the FactionID to go a certain number of bytes from there?

    i see your masks you are listing, but i am not sure how to convert or check the data to arrive at those values (i.e. 1000, 0000, 0001, etc.) or check/compare. what am i reading to compare to get at those values?

    sorry if this sounds like i am completely clueless but i actually am fairly decent with programmin and etc. it's just that this hostity for whatever reason has been a pain!

    thanks to everyone for the postings so far. hopefully somebody is getting something out of all this except just me-
    First of all... don't look at 0x01176448 when you look for creatures.
    This is "Rep" factions only.. by "rep" factions I mean factions that you can gain/loose rep with.

    It would be a waste to load all of that data into your app since 99.99% will be useless at all times (you only need a few at a time).
    It all depends on what you want to do and what you feel best with. Now if you go for direct MPQ reading you won't need to update anything, however if you make a local database you will need to run a update every now and then.

    My bot have a list of factions located in a database where I got just the stuff I need. In the header of the database there is a co-respondent WoWVersion tag. If the wow running is higher than the one in the database, the bot will update the database.



    To get to the point of understanding the DBC file try extract: Faction.DBC and FactionTemplate.DBC

    Load up FactionTemplate.DBC
    Example:


    There you got what you need...

  15. #15
    Shynd's Avatar Contributor
    Reputation
    97
    Join Date
    May 2008
    Posts
    393
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I covered both topics for a patch back in June, so you'd probably have to update offsets and pointers, but the basics should work fine. There's a few threads in this forum that go a little bit more in depth, but these links should at least get you started:
    GetUnitReaction « Shynd’s WoW Modification Journal
    Reading Player/Unit Name « Shynd’s WoW Modification Journal

Page 1 of 2 12 LastLast

Similar Threads

  1. [Misc] And another question about quests
    By Laenoar in forum WoW EMU Questions & Requests
    Replies: 6
    Last Post: 07-21-2012, 12:18 PM
  2. PvP Gold and Another Question
    By hax0rz in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 01-22-2009, 07:56 PM
  3. Hello, Thanks and Questions
    By goderion in forum WoW Memory Editing
    Replies: 6
    Last Post: 10-14-2008, 08:51 AM
  4. Shaman Spells skin editting (and another short question)
    By mordar in forum WoW ME Questions and Requests
    Replies: 6
    Last Post: 04-05-2008, 06:43 PM
All times are GMT -5. The time now is 08:22 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search