Приватные функции

Статус
В этой теме нельзя размещать новые ответы.
Начинающий
Статус
Оффлайн
Регистрация
16 Окт 2022
Сообщения
108
Реакции[?]
11
Поинты[?]
11K
Поздравляю , а теперь разгребайте приватный функционал. Пропал интерес с такими детьми на пиратке. Вместо адекватного комьюнити они из жопы лезут чтобы доказать свой мега скил в кодинге, пиратка всегда будет пираткой - никому нельзя доверять. Все разговоры альтуются и сливаются при первом запросе, коды перескриниваются с демок и продаются за 50 рублей, даже человек, с которым ты общаешься на протяжении года, продаст за пачку кириешек.

Если нужна помощь - ds "kakrazz."

bullet tp:
void SimulateProjectile(Vector3 position, Vector3 velocity, float partialTime, float travelTime, Vector3 gravity, float drag, Vector3 prevPosition, Vector3 prevVelocity)
{
    float num = 0.03125f;
    prevPosition = position;
    prevVelocity = velocity;
    if (partialTime > 0)
    {
        float num2 = num - partialTime;
        if (travelTime < num2)
        {
            prevPosition = position;
            prevVelocity = velocity;
            position += velocity * travelTime;
            partialTime += travelTime;
            return;
        }
        prevPosition = position;
        prevVelocity = velocity;
        position += velocity * num2;
        velocity += gravity * num;
        velocity -= velocity * (drag * num);
        travelTime -= num2;
    }
    int num3 = int(travelTime / num);
    for (int i = 0; i < num3; i++)
    {
        prevPosition = position;
        prevVelocity = velocity;
        position += velocity * num;
        velocity += gravity * num;
        velocity -= velocity * (drag * num);
    }
    partialTime = travelTime - num * (float)num3;
    if (partialTime > 0)
    {
        prevPosition = position;
        prevVelocity = velocity;
        position += velocity * partialTime;
    }
}




if (target_player == nullptr) return;
if (vars::bulletteleport::tp_bullet) {
    Transform* playerTransform = target_player->GetTransform(target_bone);
    Vector3 playerPos = playerTransform->position();

    Line updateLine = Line(tpcurrentPosition, nextBulletPos);
    Vector3 closestUpdateToPlayer = updateLine.ClosestPoint(playerPos);

    Vector3 newBulletPos = MoveTowards(closestUpdateToPlayer, playerPos, 0.99f); Vector3 newBulletPosx2 = MoveTowards(newBulletPos, playerPos, 0.99f);
    if (newBulletPos == newBulletPosx2) {
        newBulletPosx2.y += 0.01f;
    }

    float distanceToPlayer = closestUpdateToPlayer.Distance(playerPos);

    if (distanceToPlayer <= 4 && closestUpdateToPlayer.Distance(newBulletPos) <= 1.f) {
        Vector3 velocityPerTick = tpcurrentVelocity * Time::fixedDeltaTime();
        float velocityPerTickSpeed = velocityPerTick.Length();
        float speedPerSecond = 1.f / velocityPerTickSpeed;
        float distanceTraveled = (closestUpdateToPlayer - tpcurrentPosition).Length();
        float sstraveledTime = distanceTraveled * speedPerSecond * Time::fixedDeltaTime();

        Vector3 pointStart = newBulletPos;
        Vector3 vector = newBulletPosx2;
        vector -= tpcurrentVelocity.Normalized() * 0.001f;
        Vector3 vector2 = vector;
        Vector3 b2 = (pointStart - closestUpdateToPlayer).Normalized() * 0.01f;
        Vector3 b3 = (vector2 - pointStart).Normalized() * 0.01f;

        auto CenterPosition = target_player->PivotPoint() + Vector3(0.f, 0.9f, 0.f);
        if (LineOfSight(tpcurrentPosition, closestUpdateToPlayer) && LineOfSight(tpcurrentPosition, newBulletPos) &&
            LineOfSight(newBulletPos, newBulletPosx2) && LineOfSight(newBulletPosx2, playerPos) &&
            LineOfSight(newBulletPosx2, CenterPosition) && LineOfSight(playerPos, newBulletPos) &&
            LineOfSight(closestUpdateToPlayer - b2, pointStart + b2) && LineOfSight(pointStart - b3, vector2) &&
            LineOfSight(vector2, vector)) {

            float timeSinceLastTick = (Time::realtimeSinceStartup() - local_player->lastSentTickTime());
            float last_tick_time = max(0.f, min(timeSinceLastTick, 1.f));

            float num = 1.5f;
            float eye_clientframes = 2.0f;
            float eye_serverframes = 2.0f;
            float num2 = eye_clientframes / 60.f;
            float num3 = eye_serverframes * Max3(Time::deltaTime(), Time::smoothDeltaTime(), Time::fixedDeltaTime());
            float num4 = (last_tick_time + num2 + num3) * num;

            float num5 = local_player->GetMaxSpeed() + local_player->GetParentVelocity().Magnitude();
            float num6 = local_player->BoundsPadding() + num4 * num5;

            /*float magnitude = target_player->GetParentVelocity().UnityMagnitude();
            float num19 = 0.1f + num4 * magnitude + 0.1f;
            float num20 = target_player->Distance(newBulletPosx2);

            float num16 = target_player->MaxVelocity() + target_player->GetParentVelocity().UnityMagnitude();
            float num17 = 0.1f + num4 * num16;
            float num18 = target_player->Distance(newBulletPosx2);*/

            Vector3 centerserver_t = target_player->playerModel()->position() + Vector3(0, 1.2, 0);
            float num18 = centerserver_t.Distance(closestUpdateToPlayer);

            float travel = max((tptraveledTime + sstraveledTime) - projectile->closeFlybyDistance(), 0);
            Vector3 gr = Physics::gravity();

            Vector3 a; Vector3 b;
            SimulateProjectile(newBulletPos, projectile->currentVelocity(), projectile->tumbleSpeed(), travel, gr * projectile->gravityModifier(), projectile->drag(), a, b);

            Vector3 positionOffset = Vector3(); float num25 = 0.f;

            float num26 = target_player->GetParentVelocity().UnityMagnitude();
            num25 = num6 * num26;

            Line line_1 = Line(a - b, newBulletPos + b);
            float num27 = max(line_1.Distance(newBulletPos) - positionOffset.UnityMagnitude() - num25, 0.f);
            float num28 = max(line_1.Distance(newBulletPosx2) - positionOffset.UnityMagnitude() - num25, 0.f);

            bool flag6 = target_player != nullptr;
            float num14 = newBulletPos.Distance(newBulletPosx2);
            float num21 = flag6 ? (target_player->MaxVelocity() + target_player->GetParentVelocity().UnityMagnitude()) : 0.f;
            float num22 = flag6 ? (num6 * num21) : 0.f;
            float num24 = (tptraveledDistance + distanceTraveled) + 1.f + positionOffset.UnityMagnitude() + num22;

            //if (num18 <= num17 && num20 <= num19 && num27 <= 1.f && num28 <= 1.f && num14 <= num24) {
            if (num27 <= 1.f && num28 <= 1.f && num14 <= num24 && num18 <= 2.68) {
                HitTest* hitTest = projectile->hitTest();
                PlayerProjectileUpdate* ppu = PlayerProjectileUpdate::New();
                PlayerProjectileAttack* ppa = PlayerProjectileAttack::New();
                if (ppu && ppa && hitTest) {
                    projectile->traveledDistance(tptraveledDistance + distanceTraveled);
                    projectile->traveledTime(tptraveledTime + sstraveledTime);
                    ppu->projectileID(projectile->projectileID());
                    ppu->travelTime(tptraveledTime + sstraveledTime);
                    ppu->curVelocity(tpcurrentVelocity);
                    ppu->curPosition(closestUpdateToPlayer);
                    projectile->owner()->SendProjectileUpdate(ppu);
                    RPC_Counter.Increment();
                    ppu->curPosition(newBulletPos);
                    projectile->owner()->SendProjectileUpdate(ppu);
                    RPC_Counter.Increment();

                    hitTest->DidHit(true);
                    hitTest->HitEntity(target_player);
                    hitTest->HitTransform(playerTransform);
                    hitTest->HitPoint(playerTransform->InverseTransformPoint(newBulletPosx2));
                    hitTest->HitNormal(playerTransform->InverseTransformDirection(newBulletPosx2));
                    hitTest->AttackRay(Ray(newBulletPos, Vector3()));
                    hitTest->damageProperties(projectile->damageProperties());
                    hitTest->MaxDistance(1000.0f);

                    projectile->DoHit(hitTest, newBulletPosx2, Vector3());
                    DDraw::Capsule(closestUpdateToPlayer, Quaternion(), 0.3f, 2 * 0.3f, { 1, 1, 1, 1 }, 5.f, false, true);
                    RPC_Counter.Increment();
                }
            }
        }
    }
}
new manipulator calculation:
static Vector3 EyePositionForPlayer(BasePlayer* player)
{
    bool mounted = player->HasParent();
    if (!mounted)
    {
        return Vector3::Zero();
    }
    return player->eyes()->position();
}
Vector3 GetNetworkEyePosition() {
    if (!isvalid((uintptr_t)this)) return Vector3();
    Vector3 viewOffset;

    if (this->IsCrawling())
    {
        viewOffset = Vector3(0.f, -1.15f, 0.175f);
    }
    else if (this->IsDucked())
    {
        viewOffset = Vector3(0.f, -0.6f, 0.f);
    }
    else
    {
        viewOffset = Vector3::Zero();
    }
    //local_player->lastSentTick()->position()
    if (this->isMounted())
    {
        return this->lastSentTick()->position() + this->transform()->rotation() * (Vector3(0.f, 1.5f, 0.f) + viewOffset) + Vector3::Zero();
    }
    Vector3 vector = EyePositionForPlayer(this);
    if (vector != Vector3::Zero())
    {
        return vector;
    }
    return this->lastSentTick()->position() + this->transform()->get_up() * (1.5f + 0) + Vector3::Zero();
}

bool onlyonecheck;
Vector3 estimatedVelocity;
void GetestimatedVelocity() {
    double desyncTimeClamped = (Time::realtimeSinceStartup() - local_player->lastSentTickTime()) - 0.03125f;
    vars::manipulator::desync = desyncTimeClamped;
    const auto player_movement = local_player->movement();
    if (desyncTimeClamped < 0.025f) {
        if (onlyonecheck) {
            if (local_player->transform()->position() == local_player->lastSentTick()->position())
                estimatedVelocity = Vector3::Zero();
            else
                estimatedVelocity = player_movement->TargetMovement();
            onlyonecheck = false;
        }
    }
    else {
        onlyonecheck = true;
    }
}



// В ВАШ КОД МАНИПУЛЯТОРА
Vector3 realEye = local_player->GetNetworkEyePosition();

float num = 1.f + 0.5f;
float eye_clientframes = 2.f;
float eye_serverframes = 2.f;
float num2 = eye_clientframes / 60.f;
float num3 = eye_serverframes * Mathx::Max(Time::deltaTime(), Time::smoothDeltaTime(), Time::fixedDeltaTime());
float num4 = (vars::manipulator::desync + num2 + num3) * num;
float num5 = estimatedVelocity.Magnitude() + local_player->GetParentVelocity().Magnitude();
float num6 = 0.f;
float num7 = local_player->BoundsPadding() + num4 * num5 + num6; //eye_distance

float num9 = Mathf::Abs(local_player->GetMountVelocity().y + local_player->GetParentVelocity().y);
float num10 = local_player->BoundsPadding() + num4 * num9 + local_player->GetJumpHeight(); //eye_altitude

float min_y = min(num7, num10);


// В ВАШИ КАЛЬКУЛЯЦИИ ПРИВАТНЫЕ
float x = num7 + /[I]ваш код[/I]/;
float y = min_y + /[I]ваш код[/I]/;
float z = num7 + /[I]ваш код[/I]/;
instakill:
auto m = held->repeatDelay() * 0.75f;
int r = vars::manipulator::desync / m;
if (vars::weapon::instakill && r > 1) {
    float NextShot = lastshottime + held->repeatDelay() + 0.2;
    if (Time::fixedTime() > NextShot) {
        for (int i = 0; i <= r; i++)
        {
            if (!validateshot(held)) continue;
            if (i >= 4) break;
            held->startshot(false);
            RPC_Counter.Increment();
        }
        lastshottime = Time::fixedTime();
        return;
    }
}
else {
    if (!validateshot(held)) return;
    lastshottime = Time::fixedTime();
    held->startshot(true);
    RPC_Counter.Increment();
}
teleport_to_head:
Vector2 rotatePoint1(const Vector2& point, const Vector2& center, float angle)
{
    float s = math::sin(angle);
    float c = math::cos(angle);

    Vector2 rotatedPoint;
    rotatedPoint.x = (point.x - center.x) * c - (point.y - center.y) * s + center.x;
    rotatedPoint.y = (point.x - center.x) * s + (point.y - center.y) * c + center.y;

    return rotatedPoint;
}
void PlayerRvanka(bool PreventTp, PlayerWalkMovement* Walk) {
    if (!PreventTp) return;
    Vector3 headPos = big_target_player->GetBoneByID(head);
    Vector3 playerPos = local_player->transform()->position();

    if (playerPos.Distance(headPos) > 4.f) return;

    Vector2 center(headPos.x, headPos.z);
    float radius = 0.5f;
    int numLines = 1;
    float angleStep = 2 * M_PI / numLines;
    static float rotation = 0.0f;
    rotation += 3.0f * Time::deltaTime();

    for (int i = 0; i < numLines; ++i) {
        float angle = i * angleStep + rotation;

        Vector2 startPoint = rotatePoint1(Vector2(center.x + radius, center.y), center, angle);
        Vector3 teleportPos(startPoint.x, headPos.y + 0.04f, startPoint.y);
        Walk->TeleportTo(Vector3(teleportPos), local_player);
    }
}
hamerdraw (no lag):
bool VerifyClientRPC(BasePlayer* player)
{
    if (player == NULL) return false;
    if (player != local_player) return false;
    if (player->is_dead()) return false;
    if (player->is_wounded()) return false;
    if (player->is_sleeping()) return false;
    if (vars::manipulator::desync > AntiHack::maxdesync) return false;
    Item* ownerItem = local_player->GetHeldItme();
    if (ownerItem == NULL) return false;
    if (ownerItem->isBroken()) return false;
    return true;
}
bool VerifyClientAttack(BasePlayer* player, BaseMelee* _this)
{
    if (!VerifyClientRPC(player)) return false;
    if (_this->HasAttackCooldown()) return false;
    return true;
}


int iarr;

//в BasePlayer ClientInput
if (vars::weapon::hamerdraw && u_crt::m_strcmp(classname, _("Hammer"))) {
    Vector3 arr[81] = {
                local_player->transform()->position() + Vector3(1.0, 2.0, 0.0),
                local_player->transform()->position() + Vector3(0.9, 2.0, 0.0),
                local_player->transform()->position() + Vector3(0.8, 2.0, 0.0),
                local_player->transform()->position() + Vector3(0.7, 2.0, 0.0),
                local_player->transform()->position() + Vector3(0.6, 2.0, 0.0),
                local_player->transform()->position() + Vector3(0.5, 2.0, 0.0),
                local_player->transform()->position() + Vector3(0.4, 2.0, 0.0),
                local_player->transform()->position() + Vector3(0.3, 2.0, 0.0),
                local_player->transform()->position() + Vector3(0.2, 2.0, 0.0),
                local_player->transform()->position() + Vector3(0.1, 2.0, 0.0),
                local_player->transform()->position() + Vector3(0.0, 2.0, 0.0),

                local_player->transform()->position() + Vector3(0.0, 1.9, 0.0),
                local_player->transform()->position() + Vector3(0.0, 1.8, 0.0),
                local_player->transform()->position() + Vector3(0.0, 1.7, 0.0),
                local_player->transform()->position() + Vector3(0.0, 1.6, 0.0),
                local_player->transform()->position() + Vector3(0.0, 1.5, 0.0),
                local_player->transform()->position() + Vector3(0.0, 1.4, 0.0),
                local_player->transform()->position() + Vector3(0.0, 1.3, 0.0),
                local_player->transform()->position() + Vector3(0.0, 1.2, 0.0),
                local_player->transform()->position() + Vector3(0.0, 1.1, 0.0),
                local_player->transform()->position() + Vector3(0.0, 1.0, 0.0),


                local_player->transform()->position() + Vector3(0.0, 0.9, 0.0),
                local_player->transform()->position() + Vector3(0.0, 0.8, 0.0),
                local_player->transform()->position() + Vector3(0.0, 0.7, 0.0),
                local_player->transform()->position() + Vector3(0.0, 0.6, 0.0),
                local_player->transform()->position() + Vector3(0.0, 0.5, 0.0),
                local_player->transform()->position() + Vector3(0.0, 0.4, 0.0),
                local_player->transform()->position() + Vector3(0.0, 0.3, 0.0),
                local_player->transform()->position() + Vector3(0.0, 0.2, 0.0),
                local_player->transform()->position() + Vector3(0.0, 0.1, 0.0),
                local_player->transform()->position() + Vector3(0.0, 0.0, 0.0),

                local_player->transform()->position() + Vector3(-0.1, 0.0, 0.0),
                local_player->transform()->position() + Vector3(-0.2, 0.0, 0.0),
                local_player->transform()->position() + Vector3(-0.3, 0.0, 0.0),
                local_player->transform()->position() + Vector3(-0.4, 0.0, 0.0),
                local_player->transform()->position() + Vector3(-0.5, 0.0, 0.0),
                local_player->transform()->position() + Vector3(-0.6, 0.0, 0.0),
                local_player->transform()->position() + Vector3(-0.7, 0.0, 0.0),
                local_player->transform()->position() + Vector3(-0.8, 0.0, 0.0),
                local_player->transform()->position() + Vector3(-0.9, 0.0, 0.0),
                local_player->transform()->position() + Vector3(-1.0, 0.0, 0.0),


                local_player->transform()->position() + Vector3(-0.1, 1.0, 0.0),
                local_player->transform()->position() + Vector3(-0.2, 1.0, 0.0),
                local_player->transform()->position() + Vector3(-0.3, 1.0, 0.0),
                local_player->transform()->position() + Vector3(-0.4, 1.0, 0.0),
                local_player->transform()->position() + Vector3(-0.5, 1.0, 0.0),
                local_player->transform()->position() + Vector3(-0.6, 1.0, 0.0),
                local_player->transform()->position() + Vector3(-0.7, 1.0, 0.0),
                local_player->transform()->position() + Vector3(-0.8, 1.0, 0.0),
                local_player->transform()->position() + Vector3(-0.9, 1.0, 0.0),
                local_player->transform()->position() + Vector3(-1.0, 1.0, 0.0),

                local_player->transform()->position() + Vector3(-1.0, 1.1, 0.0),
                local_player->transform()->position() + Vector3(-1.0, 1.2, 0.0),
                local_player->transform()->position() + Vector3(-1.0, 1.3, 0.0),
                local_player->transform()->position() + Vector3(-1.0, 1.4, 0.0),
                local_player->transform()->position() + Vector3(-1.0, 1.5, 0.0),
                local_player->transform()->position() + Vector3(-1.0, 1.6, 0.0),
                local_player->transform()->position() + Vector3(-1.0, 1.7, 0.0),
                local_player->transform()->position() + Vector3(-1.0, 1.8, 0.0),
                local_player->transform()->position() + Vector3(-1.0, 1.9, 0.0),
                local_player->transform()->position() + Vector3(-1.0, 2.0, 0.0),


                local_player->transform()->position() + Vector3(0.1, 1.0, 0.0),
                local_player->transform()->position() + Vector3(0.2, 1.0, 0.0),
                local_player->transform()->position() + Vector3(0.3, 1.0, 0.0),
                local_player->transform()->position() + Vector3(0.4, 1.0, 0.0),
                local_player->transform()->position() + Vector3(0.5, 1.0, 0.0),
                local_player->transform()->position() + Vector3(0.6, 1.0, 0.0),
                local_player->transform()->position() + Vector3(0.7, 1.0, 0.0),
                local_player->transform()->position() + Vector3(0.8, 1.0, 0.0),
                local_player->transform()->position() + Vector3(0.9, 1.0, 0.0),
                local_player->transform()->position() + Vector3(1.0, 1.0, 0.0),

                local_player->transform()->position() + Vector3(1.0, 0.9, 0.0),
                local_player->transform()->position() + Vector3(1.0, 0.8, 0.0),
                local_player->transform()->position() + Vector3(1.0, 0.7, 0.0),
                local_player->transform()->position() + Vector3(1.0, 0.6, 0.0),
                local_player->transform()->position() + Vector3(1.0, 0.5, 0.0),
                local_player->transform()->position() + Vector3(1.0, 0.4, 0.0),
                local_player->transform()->position() + Vector3(1.0, 0.3, 0.0),
                local_player->transform()->position() + Vector3(1.0, 0.2, 0.0),
                local_player->transform()->position() + Vector3(1.0, 0.1, 0.0),
                local_player->transform()->position() + Vector3(1.0, 0.0, 0.0)
    };

    if (iarr > 81) iarr = 0;
    if (VerifyClientAttack(local_player, basemelee))
    {
        Vector3 hitpoint = arr[iarr];
        if (MeleePlayerAttack(basemelee, NULL, hitpoint)) {
            Vector3 origin = local_player->eyes()->position();
            Vector3 localDir = local_player->eyes()->bodyforward();
            localDir.y = 0.00f;

            HitTest* hit = HitTest::New();
            hit->HitEntity(NULL);
            hit->DidHit(true);
            hit->MaxDistance(basemelee->maxDistance());
            hit->HitTransform(nullptr);
            hit->AttackRay(Ray(hitpoint, Vector3::Zero()));
            hit->HitNormal(localDir);
            hit->HitPoint(hitpoint);
            hit->HitTest_HitMaterial((String*)il2cpp::methods::new_string(_("glass")));
            basemelee->ProcessAttack(hit);
            basemelee->StartAttackCooldown(0.01f);
        }
        iarr += 1;
    }
}
piercematerials:
void bullet_move(Projectile* _This)
{
    float delta_time = 0.03125f;
    Transform* transform = _This->transform();
    Vector3 previous_position = _This->previousPosition();
    if (_This->traveledTime() != 0.f)
        _This->previousPosition(_This->currentPosition());

    _This->currentPosition() = transform->position();
    if (_This->traveledTime() == 0.f) {
        _This->sentPosition(_This->previousPosition());
        _This->previousPosition(_This->currentPosition());
    }
    delta_time *= Time::timeScale();
    bool res = _This->_Movement(delta_time);
    if (!res)
    {
        _This->DoVelocityUpdate(delta_time);
    }
    transform->position(_This->currentPosition());
    transform->rotation(Vector4::QuaternionLookRotation(_This->currentVelocity(), { 0.f, 1.f, 0.f }));
    if (_This->integrity() <= 0.01f || _This->maxDistance() <= _This->traveledDistance() || _This->traveledTime() > 8.f)
        _This->Retire();
    else
    {
        _This->SetEffectScale(GetEffectScale(_This));
        _This->DoFlybySound();
    }
}

//в думувемент или проджектаил апдейт
if ((vars::weapon::piercematerials &&
    LineOfSight(projectile->currentPosition(), nextBulletPos) && LineOfSight(nextBulletPos, projectile->currentPosition()))
    && (!LineOfSight(projectile->currentPosition(), nextBulletPos, true || !LineOfSight(projectile->currentPosition(), nextBulletPos, true))))
{
    bullet_move(projectile);
    return;
}
return u_hooks::orig::hk_ProjectileUpdate(projectile);
 
Последнее редактирование:
Забаненный
Статус
Оффлайн
Регистрация
5 Май 2024
Сообщения
24
Реакции[?]
3
Поинты[?]
3K
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу