Strange "bugs" with CTM (gotoXY and looting) menu

User Tag List

Results 1 to 6 of 6
  1. #1
    reliasn's Avatar Legendary Authenticator enabled
    Reputation
    774
    Join Date
    Jan 2009
    Posts
    136
    Thanks G/R
    24/215
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Strange "bugs" with CTM (gotoXY and looting)

    Deleted.

    /10chars
    Last edited by reliasn; 10-18-2019 at 11:24 PM.

    Strange "bugs" with CTM (gotoXY and looting)
  2. #2
    Frosttall's Avatar Active Member
    Reputation
    64
    Join Date
    Feb 2011
    Posts
    261
    Thanks G/R
    16/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    About the stuttering behaviour:
    Are you sure that you're checking the current CTM-Location if it's the same as you're try to approach with the new click? I check always if they're identical and if yes, I skip the command since it's unnecessary and can create that behaviour.

    Which value do you write to CTM_DISTANCE (CTM + 0xC)?

  3. #3
    reliasn's Avatar Legendary Authenticator enabled
    Reputation
    774
    Join Date
    Jan 2009
    Posts
    136
    Thanks G/R
    24/215
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Deleted.

    /10chars
    Last edited by reliasn; 10-18-2019 at 11:24 PM.

  4. #4
    Empted's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2011
    Posts
    117
    Thanks G/R
    0/5
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,
    Concerning 1 thing, learn calling functions inside of WoW's process. That's not that hard and it gives you almost godlike powers. It will be probably good start for you to try calling function not via detour but via creating new thread in WoW's process, updating it's TLS and calling any function you need from it. Then looting will be much easier and better (confirming soul bound items).
    Concerning 2 thing, I suppose wrong KEY_DOWN message sending to process or some kind of logic mistake (like fail distance checking or not taking Z axis into consideration at all). It's not known WoW bug Just do some good logic and things will be fine. But first learn to call functions. So looting will go something like this:
    Code:
    	        private static void LootNPC(NpcObject npc)
            {
                ClickToMove(npc.XPosition, npc.YPosition, npc.ZPosition, 0, PushType.WalkTo);
                WaitMovementEnds(player, intervalToCheck);
                InteractUnit(npc.BaseAddress, MouseButton.Right);
                Thread.Sleep(2000); //wait loot window to pop out or you can find if it is there by calling some lua
                string lua = @"
            cnt = GetNumLootItems()
    		if cnt == 0 then
    			CloseLoot()
    		else
    			for slot = 1, cnt do
    				LootSlot(slot)
    				ConfirmLootSlot(slot)
    			end
    		end";
                LuaDoString(lua);
                Thread.Sleep(2000); //same here, call some lua (check if loot window opened) to avoid waiting time
            }
    Though, with any kind of path finding and synchronization (so, without useless sleep time) things will go even better, or you'll need to implement lots of stable working logic, what is quite hard and it's double that hard if you are not able to call any function, until you can reverse almost any function.
    Last edited by Empted; 08-25-2012 at 11:43 PM.

  5. #5
    Frosttall's Avatar Active Member
    Reputation
    64
    Join Date
    Feb 2011
    Posts
    261
    Thanks G/R
    16/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by reliasn View Post
    The only thing I check is if my bot is close enough to the "waypoint X" that I wrote in CTM. If he is, then he reads another "waypoint Y" to keep following the path I recorded. If not, then I check if it is getting close to the "waypoint X" or if it is stuck. I'm not totally sure if I understood this "checking" you mentioned...
    Also, my gotoXYZ function doesn't "spam" the CTM_Push (or CTM_Action) like crazy, unless it's needed, for example, when I detect that the bot is stuck or not reaching the waypoint properly. However, when heading towards a mob to kill it, I write in CTM_Guid and use AttackGUID (0xB), so I don't even need to use gotoXYZ. And yup, in this case, I spam the action every 100ms, since the mob can move from his position while I'm heading after it.

    Regarding the CTM_Distance (CTM + 0xC), I don't even use it and I think that's the problem. My guess is that Interact with Mouse Over sometimes "adds" a Stop Distance to CTM_Distance which ends up causing this stuttering behaviour (this expression defines perfectly what's happening with my bot hehe).

    As you can see, I'm pretty confused as to why this is happening... and thanks for trying to help me out!

    EDIT: I managed to reproduce this "error" a few times and I'm 80% positive it's related to the CTM_Distance (0xC). I reproduced the error and ran my gotoXYZ function without editing the CTM_Distance. The bot was killing the mobs and when heading towards the mob to loot it, it would stop a few yards far from it. Then I edited my gotoXYZ function, this time writing 0 to CTM_Distance and gg, the bot stopped right on top of the mob's corpse. I will do some more testing, but if it's this... damn, I'll be happy =D
    I recomment you to use 0.5 as distance instead of 0. Otherwise could you get into trouble because the char won't stop or things like that.

    The check I meant is a simple memread:
    PHP Code:
                    var WowMem.ReadRebased<float>(MemEnums.CTM.CTM_X);
                    var 
    WowMem.ReadRebased<float>(MemEnums.CTM.CTM_Y);
                    var 
    WowMem.ReadRebased<float>(MemEnums.CTM.CTM_Z); 
    Together with some other checks could you check your current location you're moving to and like this avoid unnecessary CTM_PUSHs

  6. #6
    hamburger12's Avatar Contributor CoreCoins Purchaser
    Reputation
    87
    Join Date
    Jan 2010
    Posts
    297
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are just writing to the CTM Structure there is no error check. So if you ctm "bugs" then basicly the structure fails (x = 0 y = 0 z = 0) and the char is walking straight into the location 0,0,0... To resolve the error just hook Endscene and call you CTM function from there. there are many samples on how you can do it ! Also you can use iHook then you don't need to do the hooking part!

Similar Threads

  1. Any instant 80 with working arena and a minimum amount of bugs?
    By andmel in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 07-31-2010, 08:19 PM
  2. [Bug] Screw with people with Levitate and a boat!
    By Subset in forum World of Warcraft Exploits
    Replies: 16
    Last Post: 06-13-2010, 04:46 AM
  3. Replies: 27
    Last Post: 08-13-2007, 07:03 AM
  4. level 70 hunter with nether ray and two level 60s
    By Notahax in forum Members Only Accounts And CD Keys Buy Sell
    Replies: 9
    Last Post: 08-07-2007, 02:26 PM
  5. Can someone make me a cool sig with a pic and stuff?
    By xkisses in forum World of Warcraft General
    Replies: 2
    Last Post: 01-06-2007, 06:19 AM
All times are GMT -5. The time now is 02:31 AM. 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