#ifndef __ASHITA_MMF_H_INCLUDED__ #define __ASHITA_MMF_H_INCLUDED__ #if defined (_MSC_VER) && (_MSC_VER >= 1020) #pragma once #endif #define SAFE_DELETE(p) if(p) { delete p; p = NULL; } #include "C:\Program Files (x86)\Ashita 3\Plugins\ADK\Ashita.h" #include "Structs.h" #include "..\..\..\pluginheaders\Utilities.h" #include "..\..\..\pluginheaders\Pointers.h" #include "..\..\..\pluginheaders\rapidxml.hpp" #include #include #include using namespace std; extern plugininfo_t* g_PluginInfo; struct GroupData { bool Loaded; char* rawdata; rapidxml::xml_document<> doc; std::map Map; }; struct sFollow { // 42 bytes unsigned int _unknown_0_4; // 0- 3 Looks like a pointer unsigned short TargetIndex; // 4- 5+2 unsigned int TargetID; // 8-11 float DirX; // 12-15 float DirY; // 16-19 float DirZ; // 20-23 unsigned char _unknown_24_27[4]; // 24-27 unsigned int _unknown_28_31; // 28-31 Same as _unknown_0_4 unsigned int FollowIndex; // 32-33+2 unsigned int FollowID; // 36-39 Once set will overwrite DirX, DirZ and DirY with directional values unsigned char _zero_40_40; // 40-40 unsigned char Autorun; // 41-41 }; class MultiSend : IPlugin, Ashita::Threading::AS_Thread { IAshitaCore* m_AshitaCore; ILogManager* m_LogManager; DWORD m_PluginId; IDirect3DDevice8* m_Direct3DDevice; //References HANDLE hMapFile; sFollow* p_Follow; MMF_Global* p_MMF; //State tracking GroupData s_group; std::string s_name; uint32_t s_position; bool s_last_run_state; float s_vector_x; float s_vector_z; //Configuration std::list c_groups; float c_maxdist; volatile bool c_follow; volatile bool c_attemptzone; volatile bool c_ignoreself; volatile bool c_debug; volatile bool c_safemode; public: MultiSend(void); virtual ~MultiSend(void); public: plugininfo_t GetPluginInfo(void); public: bool Initialize(IAshitaCore* core, ILogManager* log, uint32_t id); void Release(void); bool Direct3DInitialize(IDirect3DDevice8* lpDevice); void Direct3DPreRender(void); bool HandleIncomingPacket(uint16_t id, uint32_t size, void* data, void* modified, bool blocked) override; bool HandleCommand(const char* command, int32_t type); uint32_t ThreadEntry(void) override; bool CheckMatch(MMF_ICommand_Single command); bool ReadCommand(); void SendCommand(multisend_type type, uint32_t param, const char* Command); void SanitizeCommand(char* Input); std::string SubValues(std::string Input); void SubValues(char* Input); void UpdateName(std::string Name); void Claim(uint32_t* Target, uint32_t Mod); void LoadGroups(); void ReadXML(); void MatchGroups(); uint32_t GetArg(const char* text, std::string* buffer); }; __declspec(dllexport) double __stdcall GetInterfaceVersion(void); __declspec(dllexport) void __stdcall CreatePluginInfo(plugininfo_t* lpBuffer); __declspec(dllexport) IPlugin* __stdcall CreatePlugin(void); #endif // __ASHITA_MMF_H_INCLUDED__