Ok SuneC, I have your code now, reviewing it a little bit, will post queries as they occur. Sadly can't compile and test it myself just yet, trying to use Dreamscape instead of Express and having some validation issues ><
CBag:
Function to get ID of item in the slot, and another to use item by slot. Maybe another function to use item by item ID? Faster to do the scan of all bagslots and use if valid all within the DLL instead of having a loop over all slots check ID's and then use if valid, doing multiple calls in and out of the DLL in the process.
I do love the idea of the Item ID being able to be checked, lets you set up to do Scroll clicks and have the clicking automatically stop if that slot changes to something else (ie - you finished, so now don't spam potions if they happen to pick up to that spot)
Cpet:
Didn't expect stats to be in here. I suppose the model is to have the DLL be the only thing that touches memory in any way? Lots of extra calls into and out of the DLL that way though, as the implementation program will have lots of logic checks based on these values. Would it be significantly faster to leave the HP/MP and other such stats to the implementation level? Probably depends on language used I suppose (my only long-term experience with DLL to another language was with Python, so calls between were to be avoided at all costs due to slowdown)
What good is the Pet ID going to be? Let you choose a specific one of the pets which you own to be summoned? Not sure precisely what use that would be, but might be of use somewhere/somehow.
Summoning the pet: Same as clicking the ability in game, or instant? Is it even possible to force instant spellcasting (and maybe collecting of resources like Celebeam)?
CPlayerMgr:
Move To function is only X/Y, why not also Map ID? Very useful to have this as well so that you can have auto-follow functionality which carries through zoning.
Select Target function: What exactly does this one do? Select any player, NPC, Monster or item based on unique IDs? Or only select other players?
CTarget:
Fetches by ID, quite nice, does that mean we can implement a true Assist function? (Set the bot to automatically target the same monster as some other player, likely Group Leader)
Main:
Use Skill: F keys come after the numeric keys for Slot number? edit - Actually looking in MessageHandling it appears we can use even the non-key slots from the expanded sidebar. So how does the enumeration run precisely?
Autoloot: Can we set it up to only loot specific items based on item ID? Like, "Pick up all Soulshards and Raw Jade only" or the like? I am guessing right now it runs a right click on the little treasure box icon on the map, but if that changed to a Left Click, then checking the pop-up window slot by slot for item ID, and running left clicks on it (have to accommodate checking multiple tabs for bosses).
If the selective autoloot is possible, then it would be useful to figure out if there are attributes we can pick up off of items other than just their ID so we can be more general, and to have Blacklist as well as Whitelist. ie - Do not pick up Green Gear, or Do Pick up all Soul Gear, or only pick up Rings with Light Attack > 50. This of course gets overcomplicated quite quickly, mostly just an exercise in seeing what is possible rather than an item likely to be implemented into a bot.
edit - Ok, MessageHandler made it clear that this is just a right click as I thought. Still nice if possible to complicate it slightly, mostly for a blacklist when you are in an area with frequent drops you simply do NOT want to have, or longterm bot running to avoid Berry Hearts or whatever. But Item deletion can handle that just as easily I suppose...
Destroy Item: I assume this deletes an item from your bag by the Item ID. How does it work with multiple instances of the same item? Like 2 stacks of Pet Potions or somesuch? Even if each stack appears to be the same type and quantity, do they have unique IDs? That sounds like the most likely case... But if so, are there 2 IDs to an item, one for the generic "What is it? (Pet potion)" and another for the specific "WHICH is it? (Pet Potions in Bagslot 5)"
CPlayer: (Why no CPP? Threw me off for a bit :))
Talk to NPC: How does this work precisely? If you aren't already in range of the NPC, does it fail, set you to move toward them, or pop up communication even though you are out of range (that would be nice, but I doubt it is possible)?
Be useful to figure out if there is a way to automate purchase of items from the Marketplace. Then you could buy Pet Trainers when they are required, or re-stock salary potions and other such events.
Is it possible to initiate the Shop Window with an NPC and purchase a specific item from them? Forgot that this would also be required for automation of the Academic Quests. Not too many items are possible in those quests, so could hardcode the Item IDs if it were needed.
Would be nice if you could figure out a way to tell if a target cannot be attacked. I've tried a few times, but always run into issues with the pointers/offsets which I isolate. Good test subjects (if you have a high level character) would be the 4 sins in the Land of the Dead Dailies, and the walking condemned in the world through Aku. Also the Cart you escort for Guild Quest, and the old man you escort in Shadow Manor, or Yggdrassil in World Tree Garden. Pointers I have found so far work on some (Guild Cart) and not others (4 Sins), or work on some things they shouldn't once (Evil Adventurer's), or just don't update when the target changes from non-attackable to attackable (4 sins again, though really they respawn as a completely new NPC, not change type directly)