Faction [Little Snipits] menu

User Tag List

Results 1 to 15 of 15
  1. #1
    luciferc's Avatar Contributor
    Reputation
    90
    Join Date
    Jul 2008
    Posts
    373
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Faction [Little Snipits]

    So when it comes to factions of Players its as a simple as an Array to find out if your horde or alliance.

    So i made this since i needed to see if its horde or alliance for my pvp bot so here you go :P.

    List of Faction Id's

    Example of Checking if I am Horde/Alliance

    Code:
    //Each Race has its own faction theres no superfaction for Horde or Alliance
    
            private uint FactionOffset = 0x36 * 4; //Add to Object's Base and u get ur Faction!
            //EX wow.readuint(ObjBase+FactionOffset); Results in your Faction
    
            //Am i Alliance?!!??! (Player)
            public bool isAlliance()
            {
                int[] allianceids = {1, //Human
                3,//Dwarf
                4,//NE
                115,//Gnome
                1629};//Dranei
    
                int myFac = GetFac(); //My Faction
                for(int i =0 ; i < allianceids.Length; i ++)
                    if (myFac == allianceids[i])
                        return true;
                return false;
            }
    
            //Am I Horde?!!?! (Player)
            public bool isHorde()
            {
                int[] hordeids = {2,//Orc
                5,//Undead
                6,//Tauren
                116,//Troll
                1610};//BE
    
                int myFac = GetFac();//My Faction
                for(int i =0 ; i < hordeids.Length; i ++)
                    if (myFac == hordeids[i])
                        return true;
                return false;
            }
    Ya i know its easy, but copy pasta is always delicious!

    Last edited by luciferc; 02-27-2009 at 03:44 PM.

    Faction [Little Snipits]
  2. #2
    Nesox's Avatar ★ Elder ★
    Reputation
    1280
    Join Date
    Mar 2007
    Posts
    1,238
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by luciferc View Post
    That picture is hilarious

  3. #3
    g3gg0's Avatar Active Member
    Reputation
    32
    Join Date
    Mar 2008
    Posts
    86
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    did you test this with deathknights?

    i re-implemented the isEnemy() stuff of WoW by hand and faced
    the problem that each DK race had its own race
    so it worked fine for the races you have listed, but DKs had IDs
    beyond 700 or so - for every DK race an own.

    so i aborted it.

  4. #4
    g3gg0's Avatar Active Member
    Reputation
    32
    Join Date
    Mar 2008
    Posts
    86
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    now tried around little...
    [[playerObj] + 0xD8] is always zero..

    am i missing something?

  5. #5
    ironmaiden187's Avatar Member
    Reputation
    7
    Join Date
    Jul 2008
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    Func _WoWFactionID($loc,$handle)
    	If $loc = "me" Then
    		$Obj = _WoWPlayerBase($handle)
    	ElseIf $loc = "target" Then
    		$Obj = _WoWTargetObj($handle)	
    	EndIf
    	$lvl1Pointer = _MemoryRead($Obj + 0x8,$handle,'ptr')
    	$fID = _MemoryRead($lvl1Pointer + 0x36 * 4,$handle,'int')
    	return $fID
    EndFunc
    This works for me, it's in autoit but you should get the basic idea. Using other functions to get the objects but you shouldn't need to see that.

  6. #6
    g3gg0's Avatar Active Member
    Reputation
    32
    Join Date
    Mar 2008
    Posts
    86
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    aah ok
    [[playerObj + 0x08] + 0xD8]
    ok thanks for pointing that out

  7. #7
    bhpushnslide's Avatar Member
    Reputation
    5
    Join Date
    Feb 2009
    Posts
    28
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    just a noob question by why do i see alot of things like this

    private uint FactionOffset = 0x36 * 4

    isn't that the same as FactionOffset = 0xD8 ?

  8. #8
    jjaa's Avatar Contributor
    Reputation
    245
    Join Date
    Dec 2006
    Posts
    562
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by bhpushnslide View Post
    just a noob question by why do i see alot of things like this

    private uint FactionOffset = 0x36 * 4

    isn't that the same as FactionOffset = 0xD8 ?
    0x36 is the index, 0xD8 is the position, you do 0x36 * 4 because each index is 4 bytes.

    For example:


    Code:
    [07:14:50]: OBJECT_FIELD_GUID = 0x0
    [07:14:50]: OBJECT_FIELD_TYPE = 0x2
    A GUID is an INT64 so it takes up 8 bytes so the next position is at 0x2

    Anyway this has all been explained before, just search the forums :P

  9. #9
    Hyru's Avatar Active Member
    Reputation
    39
    Join Date
    Jun 2008
    Posts
    39
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For 3.09, use UnitFields [0x16], which is Bytes_0. So, from the Storage array, read 0x58 [byte] = Race

    You should see values like this:
    Code:
        public enum Race
        {
            Human = 0x01,
            Orc = 0x02,
            Dwarf = 0x03,
            NightElf = 0x04,
            Undead = 0x05,
            Tauren = 0x06,
            Gnome = 0x07,
            Troll = 0x08,
            BloodElf = 0x0A,
            Draenei = 0x0B
        }
    Using the above values, you can compute Alliance vs Horde using a simple control structure. You can also read from 0x59 [byte] = Class:
    Code:
        public enum Class
        {
            DeathKnight = 0x06,
            Druid = 0x0B,
            Hunter = 0x03,
            Mage = 0x08,
            Paladin = 0x02,
            Priest = 0x05,
            Rogue = 0x04,
            Shaman = 0x07,
            Warlock = 0x09,
            Warrior = 0x01
        }
    0x60 [byte] has gender information if I remember correctly.

  10. #10
    evil2's Avatar Active Member
    Reputation
    27
    Join Date
    Feb 2009
    Posts
    172
    Thanks G/R
    31/9
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nice post from Hyru.

    i'm trying to include class colors to my PVP radar but have difficulty with the usage of "bytes_0".

    ---
    UnitOffsets : Faction = 0x36 *4, Bytes0 = 0x16 *4
    ...
    CurrentObject.UnitFieldsAddress = MemReader.ReadUInt32((IntPtr)(CurrentObject.BaseAddress + ObjectOffsets.UnitFields));
    CurrentObject.Faction = MemReader.ReadUInt32((IntPtr)(CurrentObject.UnitFieldsAddress + UnitOffsets.Faction));

    CurrentObject.Bytes0Address = MemReader.ReadUInt32((IntPtr)(CurrentObject.UnitFieldsAddress + UnitOffsets.Bytes0));
    CurrentObject.Class = (byte)(MemReader.ReadUInt32((IntPtr)(CurrentObject.Bytes0Address + 0x59)));
    ---

    while "Faction" gives correct results, "Class" ist always 0.

    do i handle the Bytes0Address incorrectly?

    any help is welcome

  11. #11
    g3gg0's Avatar Active Member
    Reputation
    32
    Join Date
    Mar 2008
    Posts
    86
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
        protected int baseAddress = <object address>;
    
        public int DescriptorFields
        {
            get { return WoW.ReadInteger(BaseAddress + 0x08); }
        }
        public Race Race
        {
            get { return (Race) WoW.ReadByte(DescriptorFields + 0x58); }
        }
        public Class Class
        {
            get { return (Class) WoW.ReadByte(DescriptorFields + 0x59); }
        }
        public Faction Faction
        {
            get 
            {
                switch (Race)
                {
                    case Race.R_HUMAN:
                    case Race.R_DWARF:
                    case Race.R_NIGHTELF:
                    case Race.R_GNOME:
                    case Race.R_DRAENEI:
                        return Faction.F_ALLIANCE;
    
                    case Race.R_ORC:
                    case Race.R_UNDEAD:
                    case Race.R_TAUREN:
                    case Race.R_TROLL:
                    case Race.R_BLOODELF:
                        return Faction.F_HORDE;
    
                    default:
                        return Faction.F_UNKNOWN;
                }
            }
        }

  12. #12
    luciferc's Avatar Contributor
    Reputation
    90
    Join Date
    Jul 2008
    Posts
    373
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why use a switch when u can just do a loop less code :P

  13. #13
    evil2's Avatar Active Member
    Reputation
    27
    Join Date
    Feb 2009
    Posts
    172
    Thanks G/R
    31/9
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you.

    my mistake was using "bytes_0" as a pointer,
    didn't know the values are already in there


    damn, there are lot of DKs on the radar

  14. #14
    g3gg0's Avatar Active Member
    Reputation
    32
    Join Date
    Mar 2008
    Posts
    86
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by luciferc View Post
    Why use a switch when u can just do a loop less code :P
    uhm...
    why rewrite when it works and would have no advantage?

  15. #15
    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 luciferc View Post
    Why use a switch when u can just do a loop less code :P
    The switch is more efficient at the ASM level.

Similar Threads

  1. Kill your own faction with a little bit of luck!
    By Nezparial in forum World of Warcraft Exploits
    Replies: 1
    Last Post: 11-18-2010, 01:06 AM
  2. little help for mages on faction champions
    By omglol12345 in forum World of Warcraft Guides
    Replies: 5
    Last Post: 11-16-2009, 07:09 PM
  3. Fun little mage exploit to kill opposion faction in city.
    By AceofAngels in forum World of Warcraft Exploits
    Replies: 7
    Last Post: 12-19-2007, 04:23 PM
  4. Kill your own factions NPC's
    By Matt in forum World of Warcraft Exploits
    Replies: 9
    Last Post: 08-18-2006, 04:05 PM
  5. Block resurrection of the opposite faction in battle grounds
    By Matt in forum World of Warcraft Exploits
    Replies: 5
    Last Post: 06-08-2006, 03:19 AM
All times are GMT -5. The time now is 03:27 AM. 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