feat: add incoming messages to bot

This commit is contained in:
k0t9i
2023-02-09 18:30:07 +04:00
parent 130cdc6bca
commit eefb5d40ae
27 changed files with 25280 additions and 111 deletions

View File

@@ -22,7 +22,15 @@ namespace Interlude
Item* GetNextItem(float_t radius, int prevId) const;
User* GetNextCreature(float_t radius, int prevId) const;
User* GetHero() const;
User* GetUser(int objectId) const;
Item* GetItem(int objectId) const;
int RequestItemList() const;
void MTL(APawn* self, L2::FVector dst, L2::FVector src, void* terrainInfo, int unk1) const;
void Action(int objectId, L2::FVector objectLocation, int unk) const;
void RequestMagicSkillUse(L2ParamStack& stack) const;
int RequestUseItem(L2ParamStack& stack) const;
void RequestAutoSoulShot(L2ParamStack& stack) const;
void ChangeWaitType(int type) const;
private:
static void __fastcall __Init_hook(NetworkHandler* This, int /*edx*/, float unk);
@@ -33,6 +41,18 @@ namespace Interlude
static User* (__thiscall* __GetNextCreature)(NetworkHandler*, float, int);
static int(__thiscall* __AddNetworkQueue)(NetworkHandler*, L2::NetworkPacket*);
static int(__thiscall* __RequestItemList)(NetworkHandler*);
static User* (__thiscall* __GetUser)(NetworkHandler*, int);
static Item* (__thiscall* __GetItem)(NetworkHandler*, int);
static void(__thiscall* __MTL)(NetworkHandler*, APawn*, L2::FVector, L2::FVector, void*, int);
static void(__thiscall* __Action)(NetworkHandler*, int, L2::FVector, int);
//stack skillId, isForce, isShiftPressed
static void(__thiscall* __RequestMagicSkillUse)(NetworkHandler*, L2ParamStack&);
static int(__thiscall* __RequestUseItem)(NetworkHandler*, L2ParamStack&);
//stack itemId, on/off
static void(__thiscall* __RequestAutoSoulShot)(NetworkHandler*, L2ParamStack&);
//params objectId, unk
static void(__thiscall* __ChangeWaitType)(NetworkHandler*, int);
private:
static void* originalInitAddress;
static NetworkHandler* _target;