Cheat Engine - Object Manager Script (For Newbies) menu

User Tag List

Results 1 to 1 of 1
  1. #1
    sendeos23's Avatar Member
    Reputation
    14
    Join Date
    Oct 2009
    Posts
    56
    Thanks G/R
    13/8
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cheat Engine - Object Manager Script (For Newbies)

    Script I have been using while reversing classic client.

    I'm a newbie to cheat engine / lua so there are definitely better ways to do things (especially the guid1,guid2 stuff which is horrible... I know) but this gives someone new starting out maybe some guidance.

    Run this through auto assemble - you need to run it every time you change target - something i want to change in future to run on timer instead.
    Code:
    {$lua}
    --------------------  Main Section  ---------------------
    
    wowBaseAddress = getAddress("wow.exe");
    
    --Offsets for classic wow - 8.2.0.31478
    -- buildinfobuildnumberoffset = wowbaseaddress + 32589060;
    -- buildinfoversionnumberoffset = wowbaseaddress + 32525904;
    -- buildnumber = readstring(buildinfobuildnumberoffset,100,false);
    -- buildversion = readstring(buildinfoversionnumberoffset,100,false);
    
    -- localplayerguidoffset = wowbaseaddress + 39640256;
    -- objectmanageroffset = wowbaseaddress + 40613984;
    
    -- objectmanagerfirstobject = 24;
    -- objectmanagernextobject = 48;
    -- wowobjectguid=72;
    -- wowobjectdescriptorfields=0;
    -- wowobjecttype=16;
    -- unittargetguidoffset = 5464;
    
    --Load offsets from file? - we have a nice dictionary already which is loading these from signatures... seems silly to update these manually
    --Offsets for classic wow - 1.13.231650 
    buildInfoBuildNumberOffset = wowBaseAddress + 29312492;
    buildInfoVersionNumberOffset = wowBaseAddress + 29312484;
    buildNumber = readString(buildInfoBuildNumberOffset,100,false);
    buildVersion = readString(buildInfoVersionNumberOffset,100,false);
    
    
    localPlayerGuidOffset = wowBaseAddress + 39973936;
    objectManagerOffset = wowBaseAddress + 36867816;
    objectManagerFirstObject = 24;
    objectManagerNextObject = 112;
    debuffAuraOffset = 12344;
    wowObjectGuid=88;
    wowObjectDescriptorFields=16;
    wowObjectType=32;
    
    --Unit Descriptors
    unitTargetGuidOffset = 156;
    
    
    wowObjectTypes = {
    		[0] =		 "Object",
            [1] =      "Item",
            [2] =      "Container",
            [3] =      "AzeriteEmpoweredItem",
            [4] =      "AzeriteItem"	,
            [5] =      "Unit",
            [6] =      "Player",
            [7] =      "ActivePlayer",
            [8] =   	 "GameObject",
            [9] =      "Dynamic",
            [10] =     "Corpse",
            [11] =     "Areatrigger",
            [12] =     "Scene",
            [13] =     "Conversation",
            [14] =     "AiGroup",
            [15] =     "Scenario",
            [16] =     "Loot",
            [17] =     "Invalid"
    	};
    
    --Print Build Version
    print("Wow Build number : "..buildVersion..buildNumber);
    
    --Start Script
    
    
    --Guide
    function getObjectsFromObjectManager()
    
    	local foundObjects = {};
    
    	local objectManager = readQword(objectManagerOffset);
    
    	local nextObject = readQword(objectManager + objectManagerFirstObject);
    
    	local objectType = readBytes(nextObject + wowObjectType,1,false);
    
    	local objectCount = 0;
    
    	while ((nextObject & 1) == 0) and (nextObject ~= 0) do
    
    		wowObject = {};
    		wowObject.type = objectType;
    		wowObject.baseAddress = nextObject;
    		wowObject.descriptorBaseAddress = readQword(nextObject + wowObjectDescriptorFields);
    
    		local guidPart1 = readQword(nextObject + wowObjectGuid);
    		local guidPart2 = readQword(nextObject+8 + wowObjectGuid);
    
    		wowObject.guidPart1 = guidPart1;
    		wowObject.guidPart2 = guidPart2;
    
    		readUnitDescriptors(wowObject);
    
    		foundObjects[objectCount] = wowObject;
    
    		objectCount = objectCount + 1;
    
    		nextObject = readQword(nextObject + objectManagerNextObject);
    		objectType = readBytes(nextObject + wowObjectType,1,false);
    
    	end
    
    	print("object count:"..objectCount);
    
    	foundObjects.count = objectCount;
    
    	return foundObjects;
    
    end
    
    function readUnitDescriptors(wowObject)
    	if (wowObjectTypes[wowObject.type] == "Player" or wowObjectTypes[wowObject.type] == "Unit" or wowObjectTypes[wowObject.type] == "ActivePlayer") then
    
    		local guidPart1 = readQword(wowObject.descriptorBaseAddress + unitTargetGuidOffset);
    		local guidPart2 = readQword(wowObject.descriptorBaseAddress + unitTargetGuidOffset + 8);
    
    		wowObject.targetGuidPart1 = guidPart1;
    		wowObject.targetGuidPart2 = guidPart2;
    	end
    end
    
    function printObjectsFromObjectManager()
    
    	print("running printObjectsFromObjectManager");
    	local objects = getObjectsFromObjectManager();
    	print("FINISHED CALLING OBJECTS FROM OBJECT MANGER ");
    
    	print(objects.count);
    
    	for i=0,objects.count-1,1
    	do
    		local object = objects[i];
    
    		printObject(object);
    
    	end
    
    end
    
    function printObject(wowObject)
    
    	print("Wow Object Base Address: "..wowObject.baseAddress);
    	print("Wow Object Descriptor Base Address: "..wowObject.descriptorBaseAddress);
    	print("Wow Object Type: "..wowObjectTypes[wowObject.type]);
    	print("Wow Object Guid Part 1 : "..wowObject.guidPart1);
    	print("Wow Object Guid Part 2 : "..wowObject.guidPart2);
    
    	if (wowObjectTypes[wowObject.type] == "Player" or wowObjectTypes[wowObject.type] == "Unit" or wowObjectTypes[wowObject.type] == "ActivePlayer") then
    		print("Unit Object Target Guid Part 1 : "..wowObject.targetGuidPart1);
    		print("Unit Object Target Guid Part 1 : "..wowObject.targetGuidPart2);
    	end
    
    end
    
    function getObjectByGuid(guidPart1,guidPart2)
    
    	local objects = getObjectsFromObjectManager();
    
    	for i=0,objects.count-1,1
    	do
    		local object = objects[i];
    
    		if (guidPart1 == object.guidPart1 and guidPart2 == object.guidPart2) then
    			return object;
    		end
    
    	end
    
    	return nill;
    
    end
    
    function getPlayer()
    
    	local playerGuidPart1 = readQword(localPlayerGuidOffset);
    	local playerGuidPart2 = readQword(localPlayerGuidOffset+8);
    
    	return getObjectByGuid(playerGuidPart1,playerGuidPart2);
    end
    
    function getUnitTarget(unitObject)
    
    	local guidPart1 = unitObject.targetGuidPart1;
    	local guidPart2 = unitObject.targetGuidPart2;
    
    	if(guidPart1 == 0 and guidPart2 == 0) then
    		return nill;
    	end
    
    	return getObjectByGuid(guidPart1,guidPart2);
    
    end
    
    function getPlayerTarget()
    	local player = getPlayer();
    
    	return getUnitTarget(player);
    end
    
    function createAddressListEntry(name,address)
    
    	local addressList = getAddressList();
    	local addressListEntry = addressList.getMemoryRecordByDescription(name);
    
    	if addressListEntry == nill then
    		addressListEntry = addressList.createMemoryRecord();
    	end
    
    	addressListEntry.Description = name;
    	addressListEntry.Address = string.format("%x", address);
    end
    
    local player = getPlayer();
    
    local playerTarget = getUnitTarget(player);
    
    createAddressListEntry('ObjectManagerBaseAddress',readQword(objectManagerOffset));
    createAddressListEntry('PlayerGuidOffset',localPlayerGuidOffset);
    createAddressListEntry('PlayerBaseAddress',player.baseAddress);
    createAddressListEntry('PlayerDescriptorsBaseAddress',player.descriptorBaseAddress)
    
    if playerTarget ~= nill then
    	createAddressListEntry('PlayerTargetDebuffAuraAddress',playerTarget.baseAddress + debuffAuraOffset);
    	createAddressListEntry('PlayerTargetGuidAddress',playerTarget.baseAddress + wowObjectGuid);
    	createAddressListEntry('PlayerTargetBaseAddress',playerTarget.baseAddress);
    	createAddressListEntry('PlayerTargetDescriptorBaseAddress',playerTarget.descriptorBaseAddress);
    end
    
    
    -- code before either enable/disable section runs for both just like with AA code
    if syntaxcheck then return end
    if memrec then print(memrec.Description) end
    -- the check is not really necessary but it is technically correct to have it
    
    [ENABLE]
    --------------------  Enable Section  ---------------------
    
    [DISABLE]
    --------------------  Disable Section  --------------------
    -- print("disabled");
    Cheers

    These ads disappear when you log in.

  2. Thanks DanThePman, Corthezz, MEHT, xbec (4 members gave Thanks to sendeos23 for this useful post)

Similar Threads

  1. [Selling] Rust (playrust) hacks ( Cheat engine) Add on skype for tutorial
    By Ishyorc in forum General Trading Buy Sell Trade
    Replies: 7
    Last Post: 01-27-2014, 01:18 PM
  2. Guide for Cheat engine Hacking.. quick and easy
    By edestron in forum World of Warcraft Guides
    Replies: 8
    Last Post: 02-22-2007, 12:30 PM
  3. Cheat Engine Freezes for World of Warcraft
    By gamerx256 in forum World of Warcraft General
    Replies: 2
    Last Post: 02-15-2007, 04:59 PM
  4. Other uses for Cheat engine?
    By mwo in forum Community Chat
    Replies: 1
    Last Post: 02-03-2007, 08:59 PM
  5. Any new working values for cheat engine
    By ygf1975 in forum World of Warcraft General
    Replies: 3
    Last Post: 09-20-2006, 08:47 PM
All times are GMT -5. The time now is 06:32 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search