Начинающий
-
Автор темы
- #1
Всем привет, выкладываю классы External может кому пригодиться .
C++:
class system_global
{
public:
i_renderer* get_renderer()
{
return p_mem.read<i_renderer*>((uintptr_t)this + 0x48);
}
};
C++:
class actor_iterator
{
uint64_t v2 = 0;
uint64_t v4 = 0;
public:
i_actor_iterator() = delete;
i_actor_iterator(const i_actor_iterator&) = delete;
i_actor_iterator(void* actor_system)
{
this->v2 = (uint64_t)actor_system;
this->v4 = this->begin();
}
size_t count() const
{
return p_mem.read<size_t>(v2 + 0x38);
}
size_t empty() const
{
return this->count() == 0;
}
i_actor* next()
{
uint64_t i = 0, j = 0;
uint64_t v5 = 0, v6 = 0;
uint64_t v7 = end();
if (!v7)
return nullptr;
uint64_t v8 = begin();
if(!v8)
return nullptr;
if (v8 == v7)
return nullptr;
if (!v4)
return nullptr;
if (v4 == v7)
return nullptr;
v5 = p_mem.read64(v4 + 0x28);
if (!v5)
return nullptr;
if (!p_mem.read<uint8_t>(v4 + 0x19))
{
if (!v4)
return nullptr;
v6 = p_mem.read64(v4 + 0x10);
if (!v6)
return nullptr;
if (p_mem.read<uint8_t>(v6 + 0x19))
{
if (!v4)
return nullptr;
for (i = p_mem.read64(v4 + 0x8); !p_mem.read<uint8_t>(i + 0x19); i = p_mem.read64(i + 0x8))
{
if (v4 != p_mem.read64(i + 0x10))
break;
v4 = i;
}
v4 = i;
}
else
{
if (!v4)
return nullptr;
v4 = p_mem.read64(v4 + 0x10);
if (!v6)
return nullptr;
if (!v4)
return nullptr;
for (j = p_mem.read64(v6); !p_mem.read<uint8_t>(j + 0x19); j = p_mem.read64(j))
v4 = j;
}
if (!v5)
return nullptr;
return reinterpret_cast<i_actor*>(v5);
}
return nullptr;
}
private:
uint64_t begin() const
{
uint64_t p_end = this->end();
if (!p_end)
return 0;
return p_mem.read<uint64_t>(p_end);
}
uint64_t end() const
{
if (!v2)
return 0;
return p_mem.read<uint64_t>(v2 + 0x30);
}
};
C++:
class item_system
{
public:
i_item* get_item(uint32_t item_id)
{
uint64 v2, v3, v4;
if (!item_id)
return nullptr;
v2 = p_mem.read64((uintptr_t)this + 0x70);
v3 = v2;
v4 = p_mem.read64(v2 + 0x8);
while (!p_mem.read<uint8_t>(v4 + 0x19))
{
if (p_mem.read<uint32_t>(v4 + 0x20) >= item_id)
{
v3 = v4;
v4 = p_mem.read<uint64_t>(v4);
}
else
{
v4 = p_mem.read<uint64_t>(v4 + 0x10);
}
}
if (v3 == v2 || item_id < p_mem.read<uint32_t>(v3 + 0x20))
v3 = v2;
if (v3 != v2)
return p_mem.read<i_item*>(v3 + 0x28);
return nullptr;
}
};
C++:
class game_frame_work
{
public:
i_actor_system* get_actor_system()
{
return p_mem.read<i_actor_system*>((uintptr_t)this + 0x4E0);
}
uint32_t get_client_actor_id()
{
uint64_t v1 = p_mem.read64((uintptr_t)this + 0x50);
if (!v1)
return 0;
uint64_t v2 = p_mem.read64(v1 + 0x48);
if (!v2)
return 0;
uint64_t v3 = p_mem.read64(v2 + 0x10);
if (!v3)
return 0;
return p_mem.read<uint32_t>(v3 + 0x20);
}
i_actor* get_client_actor()
{
uint32_t client_id = get_client_actor_id();
if (!client_id)
return nullptr;
return get_actor_system()->get_actor(client_id);
}
};
C++:
class i_cvar
{
public:
template<class t>
t get_cvar(uint32_t offset)
{
return p_mem.read<t>((uintptr_t)this + offset);
}
template<class t>
void set_cvar(uint32_t offset, t value)
{
p_mem.write<t>((uintptr_t)this + offset, value);
}
};