Appearance
Nyx.Objects
The object manager, wrapped. This is the only source of world coordinates and of units the player has not targeted -- the 3.3.5a Lua API exposes neither.
21 entry points, 21 documented.
Objects.Unit
lua
Objects.Unit(guid)Unit table for a guid, or nil when it is not in memory. Omitting the guid returns the player.
Objects.lua
Objects.Player
lua
Objects.Player()The player's own unit table.
Objects.lua
Objects.All
lua
Objects.All()Every unit and player the client has in memory, with distance filled in relative to the player.
Objects.lua
Objects.Nearby
lua
Objects.Nearby(radius, includePlayers)Living units within radius yards, nearest first.
Objects.lua
Objects.Count
lua
Objects.Count(radius)How many living units are within radius yards.
Objects.lua
Objects.Distance
lua
Objects.Distance(guid)Distance in yards from the player to a guid, or nil. Unlike Nyx.Distance this works on this client.
Objects.lua
Objects.WorldToScreen
lua
Objects.WorldToScreen(x, y, z)Screen position of a world point: x, y, onScreen. This is what anchoring FontStrings and textures to world positions is built on.
Objects.lua
Objects.EntryFromGuid
lua
Objects.EntryFromGuid(guid)A creature GUID carries its entry: bits 48-63 are the type mask, bits 24-47 the entry, and the low 24 bits the spawn counter. That gives a second, independent source for the entry field, which is what makes it checkable.
Objects.lua
Objects.MeleeRange
lua
Objects.MeleeRange(unit, other)Melee range between two units, by the server's rule: max(reachA + reachB + 4/3, 5).
Objects.lua
Objects.InMeleeRange
lua
Objects.InMeleeRange(unit)True when the unit is within melee range of the player, using both hitboxes rather than a flat distance.
Objects.lua
Objects.Dump
lua
Objects.Dump(guid, offset, count, mode)Raw 32-bit words from an object, for finding fields nobody has confirmed. mode "object" reads the object itself rather than its descriptor block.
Objects.lua
Nyx.Diff
lua
Nyx.Diff(guid, offset, count, mode)Snapshots an object and reports which 32-bit words changed since the last call. The tool for finding unknown fields.
Objects.lua
Objects.LineOfSightBetween
lua
Objects.LineOfSightBetween(x1, y1, z1, x2, y2, z2)True when nothing blocks the straight line between two world points.
Objects.lua
Objects.LineOfSight
lua
Objects.LineOfSight(unit)True when the player can see unit. Falls back to true when positions are unavailable, on the same principle: a missing check should not silently stop the bot from ever casting.
Objects.lua
Objects.GroundZ
lua
Objects.GroundZ(x, y, z, flags)Ground height under a point, by dropping a ray from well above it. Returns nil when nothing was hit.
Objects.lua
Nyx.CheckProjection
lua
Nyx.CheckProjection()Checks the projection against the client's own nameplates.
This used to try to MEASURE the field of view by fitting. That was the wrong idea and it failed four times: with a dozen candidate units almost any fov puts some unit near each plate, so the fit was ill-posed, and worse, it was being asked to compensate for a projection model that was simply wrong. The camera struct had the answer all along - Nyx.Engine.camdump read it out directly.
So this is now a verification, not a calibration: it reports how far each nameplate sits from the nearest projected unit. Small numbers mean the projection is right. It cannot silently "fix" anything.
Objects.lua
Nyx.MeasureTangent
lua
Nyx.MeasureTangent()One equation, one unknown, no pairing.
Target a unit, put the mouse on it, run this. The horizontal screen position of a known world point solves for the horizontal tangent directly: sx = halfW * (1 - right / (forward * tanH)) Only X is used: vertical carries the unit's height, horizontal does not. Every previous attempt at this failed on ambiguity - which unit, which nameplate, which axis - so this removes all of it. Run it a few times at different angles and distances; a correct tangent gives the same answer every time, a wrong model will not.
Objects.lua
Nyx.SetFov
lua
Nyx.SetFov(value)Overrides the projection field of view. 0 restores the camera's own value.
Objects.lua
Nyx.Calibrate
lua
Nyx.Calibrate()Checks the object-manager field offsets against values the client's own API reports, grading each CONFIRMED / AMBIGUOUS / WRONG.
Objects.lua
Objects.Camera
lua
Objects.Camera()"camX,camY,camZ,fov,distanceToPlayer,orthoError,screenX,screenY"
Objects.lua
Nyx.CameraCheck
lua
Nyx.CameraCheck()The camera struct layout is not statically proven, so it is checked instead: a camera must sit near the player, and its 3x3 must be orthonormal. Random floats at a wrong offset cannot satisfy both.
Objects.lua