# Orbwalker

# Description

The Orbwalker namespace provides functionality related to orb-walking, which can control attacks and movement, determine whether attacks or movements are possible, and obtain attack range and other features.

# How to Use

// Basic orb-walking
Vector movePosition = Game::CursorPosition();
auto target = TargetSelector::GetTarget(1000.0f, eDamageType::Physical);
Orbwalker::Orbwalk(target, movePosition);

// Set orb-walking mode
Orbwalker::ActiveMode_Set(eOrbwalkingMode::Combo);

// Determine if attack or movement is possible
if (Orbwalker::CanAttack()) {
    // Execute attack
} else if (Orbwalker::CanMove(90.0f)) {
    // Execute movement
}

# ActiveMode

eOrbwalkingMode ActiveMode()

Gets the current orb-walking mode.

eOrbwalkingMode currentMode = Orbwalker::ActiveMode();
if (currentMode == eOrbwalkingMode::Combo) {
    // Combo mode logic
}

# ActiveMode_Set

void ActiveMode_Set(eOrbwalkingMode value)

Sets the current orb-walking mode.

Parameter Name Parameter Type Description
value eOrbwalkingMode Orb-walking mode
Orbwalker::ActiveMode_Set(eOrbwalkingMode::Combo);

# CanAttack

bool CanAttack()

Determines whether a basic attack can be performed.

if (Orbwalker::CanAttack()) {
    // Execute attack logic
}

# CanMove

bool CanMove(float extraWindup)

Determines whether movement is possible.

Parameter Name Parameter Type Description
extraWindup float Extra windup time
if (Orbwalker::CanMove(90.0f)) {
    // Execute movement logic
}

# ForceTarget

void ForceTarget(AIBaseClient* target)

Forces a specific orb-walking target.

Parameter Name Parameter Type Description
target AIBaseClient* Target unit
auto target = TargetSelector::GetTarget(1000.0f, eDamageType::Physical);
if (target) {
    Orbwalker::ForceTarget(target);
}

# GetAttackRange

float GetAttackRange(AIBaseClient* target)

Gets the attack range against a specific target.

Parameter Name Parameter Type Description
target AIBaseClient* Target unit
auto target = TargetSelector::GetTarget(1000.0f, eDamageType::Physical);
if (target) {
    float attackRange = Orbwalker::GetAttackRange(target);
}

# GetLastAAFinishTick

int GetLastAAFinishTick()

Gets the game tick when the last basic attack finished.

int lastAttackFinishTick = Orbwalker::GetLastAAFinishTick();

# GetLastMovePosition

Vector const& GetLastMovePosition()

Gets the position of the last movement.

Vector lastPos = Orbwalker::GetLastMovePosition();

# GetLastMoveTime

float GetLastMoveTime()

Gets the time of the last movement.

float lastMoveTime = Orbwalker::GetLastMoveTime();

# GetLastTarget

AIBaseClient* GetLastTarget()

Gets the target of the last attack.

AIBaseClient* lastTarget = Orbwalker::GetLastTarget();
if (lastTarget) {
    // Use the last target
}

# GetMyProjectileSpeed

float GetMyProjectileSpeed()

Gets the projectile speed of your champion's basic attack.

float projectileSpeed = Orbwalker::GetMyProjectileSpeed();

# GetRealAutoAttackRange

float GetRealAutoAttackRange(AIBaseClient* target)

Gets the real basic attack range considering the collision volumes of both parties.

Parameter Name Parameter Type Description
target AIBaseClient* Target unit
auto target = TargetSelector::GetTarget(1000.0f, eDamageType::Physical);
if (target) {
    float realRange = Orbwalker::GetRealAutoAttackRange(target);
}

# GetTarget

AIBaseClient* GetTarget()

Gets the current orb-walking target.

AIBaseClient* currentTarget = Orbwalker::GetTarget();
if (currentTarget) {
    // Use the current target
}

# InAutoAttackRange

bool InAutoAttackRange(AIBaseClient* target)

Determines if the target is within basic attack range.

Parameter Name Parameter Type Description
target AIBaseClient* Target unit
auto target = TargetSelector::GetTarget(1000.0f, eDamageType::Physical);
if (target && Orbwalker::InAutoAttackRange(target)) {
    // Target is within attack range
}

# IsAutoAttack

bool IsAutoAttack(const char* name, std::uint32_t NameHash = 0)

Determines if the given skill name is a basic attack.

Parameter Name Parameter Type Description
name const char* Skill name
NameHash std::uint32_t Name hash value (optional)
const char* spellName = "YourChampionBasicAttack";
if (Orbwalker::IsAutoAttack(spellName)) {
    // Is a basic attack
}

# IsAutoAttackReset

bool IsAutoAttackReset(std::uint32_t NameHash)

Determines if the given skill resets the basic attack timer.

Parameter Name Parameter Type Description
NameHash std::uint32_t Skill name hash value
std::uint32_t spellNameHash = HashName_SpellData("DariusAxeGrabCone");
if (Orbwalker::IsAutoAttackReset(spellNameHash)) {
    // Is an attack reset skill
}

# MoveTo

void MoveTo(Vector const& position, float holdAreaRadius = 0, bool overrideTimer = false, bool useFixedDistance = true, bool randomizeMinDistance = true)

Moves to the specified position.

Parameter Name Parameter Type Description
position Vector const& Target position
holdAreaRadius float Hold area radius
overrideTimer bool Whether to override the timer
useFixedDistance bool Whether to use fixed distance
randomizeMinDistance bool Whether to randomize minimum distance
Vector targetPos(1000.0f, 500.0f, 0.0f);
Orbwalker::MoveTo(targetPos);

# Orbwalk

void Orbwalk(AIBaseClient* target, Vector const& position, float extraWindup = 90, float holdAreaRadius = 0, bool useFixedDistance = true, bool randomizeMinDistance = true)

Performs orb-walking, balancing between attacking and moving.

Parameter Name Parameter Type Description
target AIBaseClient* Attack target
position Vector const& Movement position
extraWindup float Extra windup time
holdAreaRadius float Hold area radius
useFixedDistance bool Whether to use fixed distance
randomizeMinDistance bool Whether to randomize minimum distance
auto target = TargetSelector::GetTarget(1000.0f, eDamageType::Physical);
Vector movePosition = Game::CursorPosition();
Orbwalker::Orbwalk(target, movePosition);

# ResetAutoAttackTimer

void ResetAutoAttackTimer()

Resets the basic attack timer.

// After using an attack reset skill
Orbwalker::ResetAutoAttackTimer();

# SetAttack

void SetAttack(bool b)

Sets whether attacking is enabled.

Parameter Name Parameter Type Description
b bool Whether to enable
// Disable attack
Orbwalker::SetAttack(false);

// Enable attack
Orbwalker::SetAttack(true);

# SetMinimumOrbwalkDistance

void SetMinimumOrbwalkDistance(float d)

Sets the minimum orb-walking distance.

Parameter Name Parameter Type Description
d float Minimum distance
Orbwalker::SetMinimumOrbwalkDistance(100.0f);

# SetMovement

void SetMovement(bool b)

Sets whether movement is enabled.

Parameter Name Parameter Type Description
b bool Whether to enable
// Disable movement
Orbwalker::SetMovement(false);

// Enable movement
Orbwalker::SetMovement(true);

# SetMovementDelay

void SetMovementDelay(int delay)

Sets the movement delay.

Parameter Name Parameter Type Description
delay int Delay time (milliseconds)
Orbwalker::SetMovementDelay(50);

# SetOrbwalkingPoint

void SetOrbwalkingPoint(Vector const& point)

Sets the orb-walking point.

Parameter Name Parameter Type Description
point Vector const& Target position
Vector orbwalkPoint(1000.0f, 500.0f, 0.0f);
Orbwalker::SetOrbwalkingPoint(orbwalkPoint);

# ShouldWait

bool ShouldWait()

Determines if the player should wait (for example, wait for minion health to decrease before last-hitting).

if (Orbwalker::ShouldWait()) {
    // Continue waiting
} else {
    // Execute attack
}