-
-
Save l0l1dk/7af5ad86668ddc0098bdc2ea7c21cd52 to your computer and use it in GitHub Desktop.
FireHack 2.3.7 API Documentation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FireHack 2.3.7 API Documentation | |
------------------------- Active Player ------------------- | |
--- Move to a position. | |
-- X (number) - The X coordinate | |
-- Y (number) - The Y coordinate | |
-- Z (number) - The Z coordinate | |
-- InstantTurn (boolean) - Whether to instantly turn toward the destination | |
function MoveTo (X, Y, Z[, InstantTurn]) | |
--- Stop falling. | |
function StopFalling () | |
--- Get the maximum angle from the XY plane that the player can move at | |
-- returns (number) - The maximum angle in degrees | |
function GetMaximumClimbAngle () | |
--- Set the maximum angle from the XY plane that the player can move at | |
-- Angle (number) - The maximum angle in degrees | |
-- Note that the angle must be between 0º and 90º. | |
function SetMaximumClimbAngle (Angle) | |
--- Send the player's movement state to the server. | |
function SendMovementUpdate () | |
--- Set the direction that the player is facing (angle in XY). | |
-- Direction (number) - The direction in radians | |
-- Update (boolean) - Whether to immediately notify the server | |
function FaceDirection (Direction[, Update]) | |
--- Set the player's pitch (angle from XY). | |
-- Pitch (number) - The pitch in radians | |
function SetPitch (Pitch) | |
--- Set the player's current speed. | |
-- Speed (number) - The new current speed | |
-- Note that this will cause a disconnect in most situations as it is checked by the server. | |
function SetCurrentSpeed (Speed) | |
--- Set the player's run speed. | |
-- Speed (number) - The new run speed | |
-- Note that this will cause a disconnect in most situations as it is checked by the server. | |
function SetRunSpeed (Speed) | |
--- Set the player's swim speed. | |
-- Speed (number) - The new swim speed | |
-- Note that this will cause a disconnect in most situations as it is checked by the server. | |
function SetSwimSpeed (Speed) | |
--- Set the player's fly speed. | |
-- Speed (number) - The new fly speed | |
-- Note that this will cause a disconnect in most situations as it is checked by the server. | |
function SetFlySpeed (Speed) | |
--- Get the distance that the player has fallen during the current fall. | |
-- return (number) - The distance that the player has fallen during the current fall or 0 if not falling | |
function GetDistanceFallen () | |
------------------------- Events -------------------------- | |
--- Movement events | |
table MoveEvent = { | |
MoveForwardStart, | |
MoveBackwardStart, | |
MoveStop, | |
StrafeLeftStart, | |
StrafeRightStart, | |
StrafeStop, | |
AscensionStart, | |
DescensionStart, | |
AscensionDescensionStop, | |
TryStartFalling, | |
Jump, | |
TurnLeftStart, | |
TurnRightStart, | |
TurnStop, | |
PitchUpStart, | |
PitchDownStart, | |
PitchStop, | |
WalkStart, | |
WalkStop, | |
SwimStart, | |
ChangeRunSpeed, | |
Knockback, | |
FeatherFallStart, | |
FeatherFallStop, | |
Root, | |
Unroot, | |
Teleport, | |
} | |
--- Add a frame callback. | |
-- Callback (function) - The callback | |
function AddFrameCallback (Callback) | |
--- Add a timer callback. | |
-- Interval (number) - The number of seconds between calls | |
-- Callback (function) - The callback | |
function AddTimerCallback (Interval, Callback) | |
--- Add a WoW event callback. | |
-- Event (string) - The event name | |
-- Callback (function) - The callback | |
-- Note that the callback is called with the event arguments. | |
function AddEventCallback (Event, Callback) | |
--- Add a movement event callback. | |
-- Callback (function) - The callback | |
-- Note that the callback is called with a member of MoveEvent. | |
function AddMovementCallback (Callback) | |
------------------------- File ---------------------------- | |
--- Get the names of the files in a directory. | |
-- Path (string) - The path to the files | |
-- returns (table) - The file names | |
-- Example: "C:\*" would retrieve the names of all of the files in C:\. | |
-- Example: "C:\*.dll" would retrieve the names of all of the .dll files in C:\. | |
function GetDirectoryFiles (Path) | |
--- Get the names of the directories in a directory. | |
-- Path (string) - The path to the directories | |
-- returns (table) - The directory names | |
-- Example: "C:\*" would retrieve the names of all of the directories in C:\. | |
-- Example: "C:\Program Files*" would retrieve the names of the program files directories in C:\. | |
function GetSubdirectories (Path) | |
--- Get the contents of a text file. | |
-- Path (string) - The file path | |
-- returns (string) - The file contents | |
function ReadFile (Path) | |
--- Set the contents of or append a text file. | |
-- Path (string) - The file path | |
-- String (string) - The string to write | |
-- Append (boolean) - Whether to append rather than overwrite | |
function WriteFile (Path, Contents[, Append]) | |
--- Get the directory that FireHack is in. | |
-- returns (string) - The directory that FireHack is in | |
function GetFireHackDirectory () | |
--- Get the directory that WoW is in. | |
-- returns (string) - The directory that WoW is in | |
function GetWoWDirectory () | |
------------------------- Hacks --------------------------- | |
--- Hacks | |
table Hacks = { | |
Fly, | |
Hover, | |
Climb, | |
MovingLoot, | |
WaterWalk, | |
M2Collision, | |
WMOCollision, | |
TerrainCollision, | |
Zoom, | |
AlwaysFacing, | |
NoAutoAway, | |
NoSwim, | |
M2Rendering, | |
WMORendering, | |
TerrainRendering, | |
LiquidRendering, | |
CollisionRendering, | |
Wireframe, | |
CRZBlocking, | |
Freeze, | |
MovingCast, | |
MultiJump, | |
} | |
--- Get whether a hack is enabled. | |
-- Hack (Hacks member) - The hack | |
-- returns (boolean) - Whether the hack is enabled | |
function IsHackEnabled (Hack) | |
--- Set whether a hack is enabled. | |
-- Hack (Hacks member) - The hack | |
-- Enable (boolean) - Whether the hack is to be enabled | |
function SetHackEnabled (Hack, Enable) | |
------------------------- Miscellaneous ------------------- | |
--- Value types | |
table Type = { | |
Bool, | |
Char, | |
Byte, | |
Short, | |
UShort, | |
Int, | |
UInt, | |
Long, | |
ULong, | |
Float, | |
Double, | |
String, | |
IntPtr, | |
UIntPtr, | |
GUID, | |
} | |
--- Immediately close the game client. | |
-- Note that this does not return. | |
function TerminateClient () | |
--- Open a URL in the default handler for the scheme. | |
-- URL (string) - The URL | |
function OpenURL (URL) | |
--- Get whether the game client is the foreground window. | |
-- returns (boolean) - Whether the game client is the foreground window | |
function IsForeground () | |
--- Get the state of a key. | |
-- Key (integer) - The virtual key code | |
-- returns (boolean, boolean) - Whether the key is down and whether the key is toggled | |
-- Virtual Key Codes: https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx | |
function GetKeyState (Key) | |
--- Get FireHack's version number. | |
-- returns (integer, integer, integer) - The major, minor, and patch version numbers | |
function GetFireHackVersion () | |
--- Get the time remaining on an auction. | |
-- Type (string) - The auction type ("List", "Bidder", or "Owner") | |
-- Index (integer) - The auction index | |
-- returns (integer) - The number of milliseconds remaining | |
function GetAuctionItemExactTimeLeft (Type, Index) | |
--- Call a function in a loaded module. It must return void and take no arguments. | |
-- Module (string) - The module name | |
-- Function (string) - The function name | |
function CallModuleFunction (Module, Function) | |
--- Get a session variable. | |
-- Name (string) - The variable name | |
-- returns (string) - The value | |
function GetSessionVariable (Name) | |
--- Set a session variable. | |
-- Name (string) - The variable name | |
-- Value (string) - The new value | |
function SetSessionVariable (Name) | |
--- Send an HTTP or HTTPS request. | |
-- URL (string) - The URL to send to | |
-- PostData (string) - The post data if any (nil to use a GET request) | |
-- OnComplete (function) - The function to be called with the response if the request succeeds | |
-- OnError (function) - The function to be called with the error message if the request fails | |
function SendHTTPRequest (URL, PostData, OnComplete, OnError) | |
------------------------- Object -------------------------- | |
--- Object type flags | |
table ObjectTypes = { | |
Object, | |
Item, | |
Container, | |
Unit, | |
Player, | |
GameObject, | |
DynamicObject, | |
Corpse, | |
AreaTrigger, | |
SceneObject, | |
All, | |
} | |
--- Get an object's pointer. | |
-- Object (object) - The object | |
-- returns (string) - The pointer as a hexadecimal string prefixed by 0x | |
function ObjectPointer (Object) | |
--- Get one of an object's fields. | |
-- Object (object) - The object | |
-- Offset (integer) - The field offset | |
-- Type (Type member) - The field type | |
-- returns (Type) - The field value | |
function ObjectField (Object, Offset, Type) | |
--- Get one of an object's descriptors. | |
-- Object (object) - The object | |
-- Offset (integer) - The descriptor offset | |
-- Type (Type member) - The descriptor type | |
-- returns (Type) - The descriptor value | |
function ObjectDescriptor (Object, Offset, Type) | |
--- Get an object's position. | |
-- Object (object) - The object | |
-- returns (number, number, number) - The X, Y, and Z coordinates | |
function ObjectPosition (Object) | |
--- Get an object's facing. | |
-- Object (object) - The object | |
-- returns (number) - The facing (angle in XY) in radians | |
function ObjectFacing (Object) | |
--- Get an object's GUID. | |
-- Object (object) - The object | |
-- returns (string) - The GUID | |
function ObjectGUID (Object) | |
--- Get an object's type flags. | |
-- Object (object) - The object | |
-- returns (integer) - One or more members of the ObjectType table combined with bit.bor | |
function ObjectTypeFlags (Object) | |
--- Get whether an object is of a type. | |
-- Object (object) - The object | |
-- Type (ObjectType member) - The type | |
-- returns (boolean) - Whether the object is of the type | |
function ObjectIsType (Object, Type) | |
--- Get an object's scale. | |
-- Object (object) - The object | |
-- returns (number) - The scale | |
function ObjectScale (Object) | |
--- Interact with an object. | |
-- Object (object) - The object | |
function ObjectInteract (Object) | |
--- Get whether an object exists in the object manager. | |
-- Object (object) - The object | |
-- returns (boolean) - Whether the object exists in the object manager | |
-- Note that if the object does not exist in the object manager it is invalid. | |
function ObjectExists (Object) | |
--- Get an object's name. | |
-- Object (object) - The object | |
-- returns (string) - The name | |
function ObjectName (Object) | |
--- Get the distance between two objects. | |
-- Object1 (object) - The first object | |
-- Object2 (object) - The second object | |
-- returns (number) - The distance | |
function GetDistanceBetweenObjects (Object1, Object2) | |
--- Get the angles between two objects. | |
-- Object1 (object) - The first object | |
-- Object2 (object) - The second object | |
-- returns (number, number) - The facing (angle in XY) and pitch (angle from XY) from the first object to the second | |
function GetAnglesBetweenObjects (Object1, Object2) | |
--- Get the position that is between two objects and a specified distance from the first object. | |
-- Object1 (object) - The first object | |
-- Object2 (object) - The second object | |
-- Distance (number) - The distance from the first object | |
-- returns (number, number, number) - The X, Y, and Z coordinates | |
function GetPositionBetweenObjects (Object1, Object2, Distance) | |
--- Get whether an object is facing another. | |
-- Object1 (object) - The first object | |
-- Object2 (object) - The second object | |
-- returns (boolean) - Whether the first object is facing the second | |
function ObjectIsFacing (Object1, Object2) | |
--- Get whether an object is behind another. | |
-- Object1 (object) - The first object | |
-- Object2 (object) - The second object | |
-- returns (boolean) - Whether the first object is behind the second | |
function ObjectIsBehind (Object1, Object2) | |
--- Get whether an object is tracked. | |
-- Object (object) - The object | |
-- returns (boolean) - Whether the object is tracked | |
function ObjectIsTracked (Object) | |
--- Set whether an object is tracked. | |
-- Object (object) - The object | |
-- Track (boolean) - Whether the object is to be tracked | |
function ObjectSetTracked (Object, Track) | |
--- Get an object's type ID. | |
-- Object (object) - The object | |
-- returns (integer) - The type ID or nil if there is none | |
function ObjectID (Object) | |
------------------------- Object Manager ------------------ | |
--- Get the number of objects in the object manager. | |
-- returns (integer) - The number of objects in the object manager | |
function GetObjectCount () | |
--- Get an object in the object manager from its index. | |
-- Index (integer) - The one-based index of the object | |
-- returns (object) - The object | |
function GetObjectWithIndex (Index) | |
--- Get an object in the object manager from its pointer. | |
-- Pointer (string) - A pointer to the object as a hexadecimal string prefixed by 0x | |
-- returns (object) - The object | |
function GetObjectWithPointer (Pointer) | |
--- Get an object in the object manager from its GUID. | |
-- GUID (string) - The GUID | |
-- returns (object) - The object or nil if it does not in the object manager | |
function GetObjectWithGUID (GUID) | |
------------------------- Scripts ------------------------- | |
--- Load a script from the Scripts folder. | |
-- FileName (string) - The script file name | |
-- returns - The return values of the script if any | |
function LoadScript (FileName) | |
--- Get the file name of the currently executing script. | |
-- returns (string) - The file name of the currently executing script | |
-- Note that this can only be called from within a script. | |
function GetScriptName () | |
------------------------- Tracking ------------------------ | |
--- Add a tracking filter. | |
-- Name (string) - The filter name | |
-- Function (function) - The filter function taking an object and returning whether it is to be tracked | |
-- Enable (boolean) - Whether the filter is to be immediately enabled | |
function AddTrackingFilter (Name, Function, Enable) | |
--- Get whether a tracking filter is enabled. | |
-- Name (string) - The filter name | |
-- returns (boolean) - Whether the filter is enabled | |
function IsFilterEnabled (Name) | |
--- Set whether a tracking filter is enabled. | |
-- Name (string) - The filter name | |
-- Enable (boolean) - Whehter the filter is to be enabled | |
function SetFilterEnabled (Name, Enable) | |
--- Get whether a name is tracked. | |
-- Name (string) - The name | |
-- returns (boolean) - Whether the name is tracked | |
function IsNameTracked (Name) | |
--- Set whether a name is tracked. | |
-- Name (string) - The name | |
-- Track (boolean) - Whether the name is to be tracked | |
function SetNameTracked (Name, Track) | |
--- Get whether an object type ID is tracked. | |
-- ID (integer) - The object type ID | |
-- returns (boolean) - Whether the object type ID is tracked | |
function IsIDTracked (ID) | |
--- Set whether an object type ID is tracked. | |
-- ID (integer) - The object type ID | |
-- Track (boolean) - Whether the ID is to be tracked | |
-- Note that you can get an object's type ID with the ObjectID function. | |
function SetIDTracked (ID, Track) | |
------------------------- Unit ---------------------------- | |
--- Unit movement flags | |
table MovementFlags = { | |
Forward, | |
Backward, | |
StrafeLeft, | |
StrafeRight, | |
TurnLeft, | |
TurnRight, | |
PitchUp, | |
PitchDown, | |
Walking, | |
Immobilized, | |
Falling, | |
FallingFar, | |
Swimming, | |
Ascending, | |
Descending, | |
CanFly, | |
Flying, | |
} | |
--- Visible item slots | |
table Slots = { | |
Head, | |
Shoulders, | |
Shirt, | |
Chest, | |
Waist, | |
Legs, | |
Feet, | |
Wrists, | |
Hands, | |
Back, | |
MainHand, | |
OffHand, | |
Tabard, | |
} | |
--- Appearance types | |
table AppearanceTypes = { | |
Skin, | |
Face, | |
Hair, | |
HairColor, | |
Misc, | |
} | |
--- Sexes | |
table Sexes = { | |
Male, | |
Female, | |
Unknown, | |
} | |
--- Get one of a unit's movement fields. | |
-- Unit (unit) - The unit | |
-- Offset (integer) - The field offset | |
-- Type (Type member) - The field type | |
-- returns (Type) - The field value | |
function UnitMovementField (Unit, Offset, Type) | |
--- Get a unit's movement flags. | |
-- Unit (unit) - The unit | |
-- returns (integer) - The movement flags | |
function UnitMovementFlags (Unit) | |
--- Get a unit's pitch. | |
-- Unit (unit) - The unit | |
-- returns (number) - The pitch in radians | |
function UnitPitch (Unit) | |
--- Get a unit's bounding radius. | |
-- Unit (unit) - The unit | |
-- returns (number) - The bounding radius | |
function UnitBoundingRadius (Unit) | |
--- Get a unit's combat reach. | |
-- Unit (unit) - The unit | |
-- returns (number) - The combat reach | |
function UnitCombatReach (Unit) | |
--- Get a unit's target. | |
-- Unit (unit) - The unit | |
-- returns (unit) - The target or nil if there is none | |
function UnitTarget (Unit) | |
--- Get a unit's creator. | |
-- Unit (unit) - The unit | |
-- returns (unit) - The creator or nil if there is none | |
function UnitCreator (Unit) | |
--- Get whether a unit can be looted. | |
-- Unit (unit) - The unit | |
-- returns (boolean) - Whether the unit can be looted | |
function UnitCanBeLooted (Unit) | |
--- Get whether a unit can be skinned. | |
-- Unit (unit) - The unit | |
-- returns (boolean) - Whether the unit can be skinned | |
function UnitCanBeSkinned (Unit) | |
--- Update a unit's model. | |
-- Unit (unit) - The unit | |
function UnitUpdateModel (Unit) | |
--- Get a unit's display ID. | |
-- Unit (unit) - The unit | |
-- returns (integer) - The display ID | |
function UnitGetDisplayID (Unit) | |
--- Set a unit's display ID. | |
-- Unit (unit) - The unit | |
-- DisplayID (integer) - The new display ID | |
-- Note that UnitUpdateModel must be called for the change to be displayed. | |
function UnitSetDisplayID (Unit, DisplayID) | |
--- Reset a unit's model. | |
-- Unit (unit) - The unit | |
-- Note that UnitUpdateModel must be called for the change to be displayed. | |
function UnitReset (Unit) | |
--- Get a unit's mount's display ID. | |
-- Unit (unit) - The unit | |
-- returns (integer) - The display ID | |
function UnitGetMountDisplayID (Unit) | |
--- Set a unit's mount's display ID. | |
-- Unit (unit) - The unit | |
-- DisplayID (integer) - The display ID | |
function UnitSetMountDisplayID (Unit, DisplayID) | |
--- Get a unit's sex. | |
-- Unit (unit) - The unit | |
-- returns (Sexes member) - The sex | |
function UnitGetSex (Unit) | |
--- Set a unit's sex. | |
-- Unit (unit) - The unit | |
-- Sex (Sexes member) - The sex | |
-- Note that UnitUpdateModel must be called for the change to be displayed. | |
function UnitSetSex (Unit, Sex) | |
--- Get a one of unit's visible items. | |
-- Unit (unit) - The unit | |
-- Slot (Slots member) - The item slot | |
-- returns (integer) - The item display ID | |
function UnitGetItem (Unit, Slot) | |
--- Set one of a unit's visible items. | |
-- Unit (unit) - The unit | |
-- Slot (Slots member) - The item slot | |
-- DisplayID (integer) - The item display ID | |
-- Note that UnitUpdateModel must be called for the change to be displayed. | |
function UnitSetItem (Unit, Slot, DisplayID) | |
--- Set a unit's appearance. | |
-- Unit (unit) - The unit | |
-- Type (AppearanceTypes member) - The appearance type | |
-- returns (integer) - The appearance ID | |
function UnitGetAppearance (Unit, Type) | |
--- Get a unit's appearance. | |
-- Unit (unit) - The unit | |
-- Type (AppearanceTypes member) - The appearance type | |
-- ID (integer) - The appearance ID | |
-- Note that UnitUpdateModel must be called for the change to be displayed. | |
function UnitSetAppearance (Unit, Type, ID) | |
------------------------- World --------------------------- | |
--- Trace line hit flags | |
table HitFlags = { | |
M2Collision, | |
M2Render, | |
WMOCollision, | |
WMORender, | |
Terrain, | |
WaterWalkableLiquid, | |
Liquid, | |
EntityCollision, | |
} | |
--- Simulate a click at a position in the game-world. | |
-- X (number) - The X coordinate | |
-- Y (number) - The Y coordinate | |
-- Z (number) - The Z coordinate | |
-- Right (boolean) - Whether to right click rather than left click | |
function ClickPosition (X, Y, Z[, Right]) | |
--- Get whether an AoE spell is pending a target. | |
-- returns (boolean) - Whether an AoE spell is pending a target | |
function IsAoEPending () | |
--- Cancel the pending spell if any. | |
function CancelPendingSpell () | |
--- Get the timestamp. | |
-- returns (integer) - The timestamp | |
function GetTimestamp () | |
--- Perform a raycast between two positions. | |
-- StartX (number) - The starting X coordinate | |
-- StartY (number) - The starting Y coordinate | |
-- StartZ (number) - The starting Z coordinate | |
-- EndX (number) - The ending X coordinate | |
-- EndY (number) - The ending Y coordinate | |
-- EndZ (number) - The ending Z coordinate | |
-- Flags (integer) - One or more members of the HitFlags table combined with bit.bor | |
-- returns (number, number, number) - The X, Y, and Z coordinates of the hit position, or nil if there was no hit | |
function TraceLine (StartX, StartY, StartZ, EndX, EndY, EndZ, Flags) | |
--- Get the camera position. | |
-- returns (number, number, number) - The X, Y, and Z coordinates of the camera | |
function GetCameraPosition () | |
--- Get the field of view. | |
-- returns (number) - The field of view | |
function GetFieldOfView () | |
--- Set the field of view. | |
-- Value (number) - The new field of view | |
function SetFieldOfView (Value) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment