Multisend is a replacement for servo. No synchronization is needed, just load and go.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

112 lines
3.2 KiB

#if defined (_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#define SAFE_DELETE(p) if(p) { delete p; p = NULL; }
#include "C:\Ashita3\Plugins\ADK\Ashita.h"
#include "Structs.h"
#include "..\..\..\..\..\..\pluginheaders\Utilities.h"
#include "..\..\..\..\..\..\pluginheaders\rapidxml.hpp"
#include <time.h>
#include <list>
#include <map>
using namespace std;
extern plugininfo_t* g_PluginInfo;
struct GroupData
bool Loaded;
char* rawdata;
rapidxml::xml_document<> doc;
std::map<uint16_t, string> 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;
sFollow* StructPointer;
GroupData m_Group;
HANDLE hMapFile;
MMF_Global* MMF_Pointer;
uint32_t Position;
volatile bool ZoneExtra;
volatile bool Following;
volatile float PositionX;
volatile float PositionZ;
std::list<uint16_t> Groups;
std::string CurrentName;
uint32_t Zoning; //0 = not zoning, 1 = waiting to zone, 2 = zoned and waiting to finish
volatile bool FollowEnabled;
volatile bool StopFollow;
volatile bool IgnoreSelf;
volatile bool _Debug;
volatile bool _SafeMode;
virtual ~MultiSend(void);
plugininfo_t GetPluginInfo(void);
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 MatchID(uint32_t ID);
bool ReadCommand();
void SetFollow(bool Active);
void SendCommand(uint32_t ID, 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);