-- ====================================================
-- Robin Hood: The Legend of Sherwood Lua Scripting API
-- ====================================================

-- https://luals.github.io/wiki/annotations/

---@alias pointer integer

-- "Globals" is a table used to define values that will be persisted when the game is saved (only integers and booleans)
-- "SequenceCallbacks" is a hidden table used to manage functions called by "SequenceCall"

-- ===== EVENTS ================================================================

---Initialize the mission.
function Initialize() end

---Perform post-initialization, e.g. patrol assignment, intro cutscene, etc.
function PostInitialize() end

---When a message is received at ID 0.
---@param code integer The code of the message to process.
---@param p1 integer The first argument of the message to process.
---@param p2 integer The second argument of the message to process.
function ProcessMessage(code, p1, p2) end

---Executes every second.
---@param secondsPassed integer The number of seconds since the start of the mission.
function Timer(secondsPassed) end

---Check the victory condition every three seconds.
---@param secondsPassed integer The number of seconds since the start of the mission.
---@return integer # Returns 0 if nothing happens, 1 for victory, and >1 for loss.
function CheckVictoryCondition(secondsPassed) return 0 end

---Level cleanup.
---@param unk integer An unknown parameter, either 0 or 1.
function Finalize(unk) end

---Executes when a key is pressed. Key codes: https://learn.microsoft.com/en-us/previous-versions/windows/desktop/bb321074(v=vs.85)
---@param key integer The scan code of the key pressed.
function KeyPressed(key) end

Actor = {
  ---Initialize the actor.
  Initialize = function() end,

  ---Handle the change of an actor's action.
  ---@param action integer The new action.
  ---@param oldAction integer The previous action.
  ActionChange = function(action, oldAction) end,

  ---Filter AI events received by the actor.
  ---@param actorSource pointer The source actor of the event.
  ---@param event integer The event to filter.
  FilterAiEvent = function(actorSource, event) end,

  ---Process a message with three integer parameters for the actor.
  ---@param code integer The code of the message to process.
  ---@param p1 integer The first argument of the message to process.
  ---@param p2 integer The second argument of the message to process.
  ProcessMessage = function(code, p1, p2) end
}

Target = {
  ---Initialize the target.
  Initialize = function() end,

  ---Handle activation by an apple.
  ---@param actorSource pointer The actor that activated the target.
  ActivatedByApple = function(actorSource) end,

  ---Handle activation by an arrow.
  ---@param actorSource pointer The actor that activated the target.
  ActivatedByArrow = function(actorSource) end,

  ---Handle activation by hand.
  ---@param actorSource pointer The actor that activated the target.
  ActivatedByHand = function(actorSource) end,

  ---Handle activation by a heal action.
  ---@param actorSource pointer The actor that activated the target.
  ActivatedByHeal = function(actorSource) end,

  ---Handle activation by a lever.
  ---@param actorSource pointer The actor that activated the target.
  ActivatedByLever = function(actorSource) end,

  ---Handle activation by money.
  ---@param actorSource pointer The actor that activated the target.
  ActivatedByMoney = function(actorSource) end,

  ---Handle activation by a search action.
  ---@param actorSource pointer The actor that activated the target.
  ActivatedBySearch = function(actorSource) end,

  ---Handle activation by a stone.
  ---@param actorSource pointer The actor that activated the target.
  ActivatedByStone = function(actorSource) end,

  ---Handle activation by a sword.
  ---@param actorSource pointer The actor that activated the target.
  ActivatedBySword = function(actorSource) end,

  ---Handle activation by a listenable action.
  ---@param actorSource pointer The actor that activated the target.
  ActivatedByListenable = function(actorSource) end
}

Waypoint = {
  ---Initialize the waypoint.
  Initialize = function() end,

  ---Handle an actor reaching the waypoint.
  ---@param actor pointer The actor reaching the waypoint.
  ReachPoint = function(actor) end
}

Scroll = {
  ---Initialize the scroll.
  Initialize = function() end,

  ---Executes when the scroll is taken by an actor.
  ---@param actorSource pointer The actor taking the scroll.
  Taken = function(actorSource) end,

  ---Executes every second.
  Timer = function() end
}

Zone = {
  ---Initialize the zone.
  Initialize = function() end,

  ---Handle an actor entering the zone.
  ---@param actor pointer The actor entering the zone.
  Enter = function(actor) end,

  ---Handle an actor exiting the zone.
  ---@param actor pointer The actor exiting the zone.
  Exit = function(actor) end
}

-- ===== FUNCTIONS =============================================================

---Get the name of an actor.
---@param actor pointer
---@return string
function GetActorName(actor) return "" end

---Get an actor by name.
---@param name string
---@return pointer
function GetActor(name) return 0 end

---Get an item by name.
---@param name string
---@return pointer
function GetItem(name) return 0 end

---Get a script node by name.
---@param name string
---@return pointer
function GetLocation(name) return 0 end

---Get a scroll by name.
---@param name string
---@return pointer
function GetScroll(name) return 0 end

---Get a patrol by name.
---@param name string
---@return pointer
function GetPatrol(name) return 0 end

---Get a table of all actors.
---@return table
function GetAllActors() return {} end

---Get a table of all items.
---@return table
function GetAllItems() return {} end

---Get a table of all locations.
---@return table
function GetAllLocations() return {} end

---Get a table of all scrolls.
---@return table
function GetAllScrolls() return {} end

---Get a table of all patrols.
---@return table
function GetAllPatrols() return {} end

---Get the coordinates of the mouse cursor in the map ("x" and "y" members).
---@return table
function GetMousePosition() return {} end

---Make an actor move to a specific coordinate. Reaching destination not guaranteed.
---@param actor pointer
---@param position table
---@param shouldRun boolean
function CheatActorMoveTo(actor, position, shouldRun) end

---Initialize a global variable. Use the "Globals" table instead.
---@param id integer
---@param value integer
---@return integer
function InitGlobal(id, value) return 0 end

---Set a global variable. Use the "Globals" table instead.
---@param id integer The ID of the global variable.
---@param value integer The value to set the global variable to.
---@return integer
function SetGlobal(id, value) return 0 end

---Get the value of a global variable. Use the "Globals" table instead.
---@param id integer The ID of the global variable.
---@return integer # The value of the global variable.
function GetGlobal(id) return 0 end

---Get an actor by its index.
---@param index integer The index of the actor.
---@return pointer # The actor.
function GetActorScript(index) return 0 end

---Get a door by its index.
---@param doorId integer The index of the door.
---@return pointer # The door.
function GetDoorScript(doorId) return 0 end

---Get a patch by its index.
---@param patchId integer The index of the patch.
---@return pointer # The patch.
function GetPatchScript(patchId) return 0 end

---Get a location by its index.
---@param locationId integer The index of the location.
---@return pointer # The location.
function GetLocationScript(locationId) return 0 end

---Get a sound source by its index.
---@param soundSourceId integer The index of the sound source.
---@return pointer # The sound source.
function GetSoundSourceScript(soundSourceId) return 0 end

---Get a building by its index.
---@param buildingId integer The index of the building.
---@return pointer # The building.
function GetBuildingScript(buildingId) return 0 end

---Get a patrol by its index.
---@param patrolId integer The index of the patrol.
---@return pointer # The patrol.
function GetPatrolScript(patrolId) return 0 end

---Get the index of a specific actor, target, item or scroll.
---@param actor pointer The actor.
---@return integer # The index of the actor.
function GetActorIndex(actor) return 0 end

---Get the index of a specific door.
---@param door pointer The door.
---@return integer # The index of the door.
function GetDoorIndex(door) return 0 end

---Get the index of a specific patch.
---@param patch pointer The patch.
---@return integer # The index of the patch.
function GetPatchIndex(patch) return 0 end

---Get the index of a specific location.
---@param location pointer The location.
---@return integer # The index of the location.
function GetLocationIndex(location) return 0 end

---Get the index of a specific sound source.
---@param soundSource pointer The sound source.
---@return integer # The index of the sound source.
function GetSoundSourceIndex(soundSource) return 0 end

---Get the index of a specific building.
---@param building pointer The building.
---@return integer # The index of the building.
function GetBuildingIndex(building) return 0 end

---Get the index of a specific patrol.
---@param patrol pointer The patrol.
---@return integer # The index of the patrol.
function GetPatrolIndex(patrol) return 0 end

---Start a dialog with a specific dialog ID.
---@param dialogId integer The ID of the dialog to start.
function StartDialog(dialogId) end

---Scroll the camera to a specific location.
---@param location pointer The location to scroll the camera to.
---@return boolean # True if the operation was successful, otherwise false.
function ScrollCameraTo(location) return false end

---Scroll the camera slowly to a specific location.
---@param location pointer The location to scroll the camera to.
---@param speed integer The speed at which to scroll the camera.
---@return boolean # True if the operation was successful, otherwise false.
function ScrollCameraSlowlyTo(location, speed) return false end

---Instantly jump the camera to a specific location.
---@param location pointer The location to jump the camera to.
---@return boolean # True if the operation was successful, otherwise false.
function JumpCameraTo(location) return false end

---Set the zoom level of the camera.
---@param zoomLevel integer The zoom level to set (0, 1 or 2).
---@return boolean # True if the operation was successful, otherwise false.
function SetZoomLevel(zoomLevel) return false end

---Display or hide the map.
---@param shouldDisplay boolean True to display the map, false to hide it.
function DisplayMap(shouldDisplay) end

---Display the console.
function DisplayConsole() end

---Customize the minimap display for a specific actor.
---@param actor pointer The pointer to the actor.
---@param displayType integer The display type to set.
---@return boolean # True if the operation was successful, otherwise false.
function CustomizeMinimapDisplay(actor, displayType) return false end

---Define a flat trajectory zone for a specific sector.
---@param sector pointer The pointer to the sector.
---@param unk01 number An unknown parameter.
---@return pointer # The pointer to the defined trajectory zone.
function DefineFlatTrajectoryZone(sector, unk01) return 0 end

---Add an objective to the pause menu.
---@param objectiveId integer The ID of the objective.
---@param isMainObjective boolean Whether the objective is main or secondary.
---@return integer # The result of the operation.
function AddObjective(objectiveId, isMainObjective) return 0 end

---Complete an objective in the pause menu.
---@param objectiveId integer The ID of the objective.
---@return integer # The result of the operation.
function CompleteObjective(objectiveId) return 0 end

---Choose a victory or defeat text by its ID.
---@param textId integer The ID of the text.
---@return pointer # The pointer to the chosen text.
function ChooseVictoryDefeatText(textId) return 0 end

---Force a check for victory conditions.
---@return pointer # The pointer to the victory check result.
function ForceCheckVictory() return 0 end

---Start a sequence recording.
---@return boolean # True if the operation was successful, otherwise false.
function StartSequence() return false end

---End sequence recording.
---@return boolean # True if the operation was successful, otherwise false.
function EndSequence() return false end

---Pause sequence until previous actions complete.
---@return integer # The result of the action.
function Then() return 0 end

---Record a callback.
---@param callback function The function that is called when the sequence reaches it.
function SequenceCall(callback) end

---Record a scroll camera operation to a specific location.
---@param location pointer The location to scroll the camera to.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceScrollCameraTo(location) return false end

---Record a jump camera operation to a specific location.
---@param location pointer The location to jump the camera to.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceJumpCameraTo(location) return false end

---Record setting the zoom level.
---@param zoomLevel integer The zoom level to set (0, 1 or 2).
---@return boolean # True if the operation was successful, otherwise false.
function SequenceSetZoomLevel(zoomLevel) return false end

---Record the display or hide operation of the map.
---@param shouldDisplay boolean True to display the map, false to hide it.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceDisplayMap(shouldDisplay) return false end

---Record the availability of a specific action for an actor.
---@param actor pointer The pointer to the actor.
---@param actionId integer The ID of the action.
---@param isAvailable boolean True if the action is available, otherwise false.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceActionAvailable(actor, actionId, isAvailable) return false end

---Record the availability of a character.
---@param actor pointer The pointer to the actor.
---@param isAvailable boolean True if the character is available, otherwise false.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceCharacterAvailable(actor, isAvailable) return false end

---Record locking the camera on a specific actor.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceLockCameraOn(actor) return false end

---Record clearing the camera lock.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceClearCameraLock() return false end

---Record playing a dialog.
---@param dialogId integer The ID of the dialog.
---@return boolean # True if the operation was successful, otherwise false.
function SequencePlayDialog(dialogId) return false end

---Record moving the camera to a specific location.
---@param location pointer The location to move the camera to.
---@param speed integer Movement speed. Higher number means faster cam movement.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceMoveCameraTo(location, speed) return false end

---Record sending a message to an actor.
---@param actor pointer The pointer to the actor.
---@param message integer The message to send.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceSendMessage(actor, message) return false end

---Record sending a message with arguments to an actor.
---@param actor pointer The pointer to the actor.
---@param message integer The message to send.
---@param arg1 integer The first argument.
---@param arg2 integer The second argument.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceSendMessageWithArguments(actor, message, arg1, arg2) return false end

---Record moving an actor to a specific location with a specific move style.
---@param actor pointer The pointer to the actor.
---@param location pointer The location to move the actor to.
---@param moveStyleId integer The ID of the move style.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceMove(actor, location, moveStyleId) return false end

---Record a specific actor entering the level.
---@param actor pointer The pointer to the actor.
---@param location pointer The location to enter.
---@param direction integer The direction to enter the level from.
---@param moveStyleId integer The ID of the move style.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceEnterLevel(actor, location, direction, moveStyleId) return false end

---Record a specific actor leaving the level.
---@param actor pointer The pointer to the actor.
---@param location pointer The location to leave.
---@param direction integer The direction of the actor while leaving the level.
---@param moveStyleId integer The ID of the move style.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceLeaveLevel(actor, location, direction, moveStyleId) return false end

---Record turning an actor to face a specific location.
---@param actor pointer The pointer to the actor.
---@param location pointer The location to turn the actor to face.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceTurnTo(actor, location) return false end

---Record playing an animation for a specific actor.
---@param actor pointer The pointer to the actor.
---@param animId integer The ID of the animation.
---@return boolean # True if the operation was successful, otherwise false.
function SequencePlayAnim(actor, animId) return false end

---Record playing a looped animation for a specific actor.
---@param actor pointer The pointer to the actor.
---@param animId integer The ID of the animation.
---@return boolean # True if the operation was successful, otherwise false.
function SequencePlayAnimLoop(actor, animId) return false end

---Record playing an animation for a specific actor and then freezing the last frame.
---@param actor pointer The pointer to the actor.
---@param animId integer The ID of the animation.
---@return boolean # True if the operation was successful, otherwise false.
function SequencePlayAnimFreeze(actor, animId) return false end

---Record locking the AI for a specific actor.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceLockAI(actor) return false end

---Record unlocking the AI for a specific actor.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceUnlockAI(actor) return false end

---Record locking the user interface.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceLockUser() return false end

---Record unlocking the user interface.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceUnLockUser() return false end

---Record pausing the sequence for a specific number of frames.
---@param frames integer The number of frames to wait for.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceTimer(frames) return false end

---Record an actor seeking another actor with specific parameters.
---@param actor pointer The pointer to the actor.
---@param targetActor pointer The pointer to the target actor.
---@param unk01 integer An unknown parameter.
---@param unk02 integer An unknown parameter.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceSeekActor(actor, targetActor, unk01, unk02) return false end

---Record an action for a specific actor with an argument.
---@param actor pointer The pointer to the actor.
---@param actionId integer The ID of the action.
---@param argument integer The argument for the action.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceAction(actor, actionId, argument) return false end

---Record replacing an animation for a specific actor.
---@param actor pointer The pointer to the actor.
---@param originalAnimId integer The ID of the original animation.
---@param replacementAnimId integer The ID of the replacement animation.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceReplaceAnim(actor, originalAnimId, replacementAnimId) return false end

---Record restoring the original animation for a specific actor.
---@param actor pointer The pointer to the actor.
---@param originalAnimId integer The ID of the original animation.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceRestoreAnim(actor, originalAnimId) return false end

---Record speaking a remark for a specific actor.
---@param actor pointer The pointer to the actor.
---@param remarkId integer The ID of the remark.
---@param remarkVariant integer The variant of the remark.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceSpeakPC(actor, remarkId, remarkVariant) return false end

---Record an actor taking a corpse with a specific move style.
---@param actor pointer The pointer to the actor.
---@param corpse pointer The pointer to the corpse.
---@param moveStyleId integer The ID of the move style.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceTakeCorpse(actor, corpse, moveStyleId) return false end

---Record moving an actor into a building.
---@param actor pointer The pointer to the actor.
---@param locationAtDoor pointer The location at the door of the building.
---@param moveStyleId integer The ID of the move style.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceMoveIntoBuilding(actor, locationAtDoor, moveStyleId) return false end

---Record leaving a corpse for a specific actor.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceLeaveCorpse(actor) return false end

---Reset the animation for a specific actor.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the operation was successful, otherwise false.
function ResetAnim(actor) return false end

---Record starting a mobile element.
---@param mobileElement pointer The pointer to the mobile element.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceStartMobileElement(mobileElement) return false end

---Record stopping a mobile element.
---@param mobileElement pointer The pointer to the mobile element.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceStopMobileElement(mobileElement) return false end

---Record speaking a remark for a specific actor.
---@param actor pointer The pointer to the actor.
---@param remarkId integer The ID of the remark.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceSpeak(actor, remarkId) return false end

---Record seeking an actor with a message and parameters.
---@param actor pointer The pointer to the actor who is seeking.
---@param actorToFind pointer The pointer to the actor to find.
---@param movementStyle integer The movement style to use during seeking.
---@param messageTo pointer The actor to send message to when the seeked actor is found.
---@param distance number The distance at which the character is considered found.
---@param messageCode integer The code of the message.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceSeekActorMessage(actor, actorToFind, movementStyle, messageTo, distance, messageCode) return false end

---Record seeking an actor with a message and arguments.
---@param actor pointer The pointer to the actor who is seeking.
---@param unk01 integer An unknown parameter.
---@param unk02 integer An unknown parameter.
---@param unk03 integer An unknown parameter.
---@param unk04 integer An unknown parameter.
---@param unk05 integer An unknown parameter.
---@param unk06 integer An unknown parameter.
---@param unk07 integer An unknown parameter.
---@return boolean # True if the operation was successful, otherwise false.
function SequenceSeekActorMessageWithArguments(actor, unk01, unk02, unk03, unk04, unk05, unk06, unk07) return false end

---Record activating a mobile element.
---@param mobileElement pointer The pointer to the mobile element.
---@return boolean True if the operation was successful, otherwise false.
function SequenceActivateMobileElement(mobileElement) return false end

---Record deactivating a mobile element.
---@param mobileElement pointer The pointer to the mobile element.
---@return boolean True if the operation was successful, otherwise false.
function SequenceDeactivateMobileElement(mobileElement) return false end

---Get the current actor.
---@return pointer # The pointer to the current actor.
function ThisActor() return 0 end

---Get the number of actors in the engine.
---@return integer # The number of actors in the engine.
function GetNumberOfActorsInEngine() return 0 end

---Check if a specific actor is a target.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the actor is a target, otherwise false.
function IsActorTarget(actor) return false end

---Check if a specific actor is an object.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the actor is an object, otherwise false.
function IsActorObject(actor) return false end

---Check if a specific actor is a character.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the actor is a character, otherwise false.
function IsActorCharacter(actor) return false end

---Check whether an actor is a playable character (PC).
---@param actor pointer The actor to check.
---@return boolean # True if the actor is a playable character, otherwise false.
function IsActorPC(actor) return false end

---Check if a specific actor is an NPC.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the actor is an NPC, otherwise false.
function IsActorNPC(actor) return false end

---Check if a specific actor is a soldier.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the actor is a soldier, otherwise false.
function IsActorSoldier(actor) return false end

---Check if a specific actor is a civilian.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the actor is a civilian, otherwise false.
function IsActorCivilian(actor) return false end

---Check if a specific actor is an animal.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the actor is an animal, otherwise false.
function IsActorAnimal(actor) return false end

---Check if a specific actor is a cart.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the actor is a cart, otherwise false.
function IsActorCart(actor) return false end

---Check if a specific actor pointer is null.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the actor pointer is null, otherwise false.
function IsNull(actor) return false end

---Check if two actors are equal.
---@param actor pointer The pointer to the first actor.
---@param otherActor pointer The pointer to the second actor.
---@return boolean # True if the actors are equal, otherwise false.
function IsActorEqual(actor, otherActor) return false end

---Check if a specific actor is dead.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the actor is dead, otherwise false.
function IsActorDead(actor) return false end

---Check if a specific actor is knocked out (KO).
---@param actor pointer The pointer to the actor.
---@return boolean # True if the actor is knocked out, otherwise false.
function IsActorKO(actor) return false end

---Check if a specific actor is tied.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the actor is tied, otherwise false.
function IsActorTied(actor) return false end

---Check if a specific actor is either knocked out, tied, or dead.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the actor is out of action, otherwise false.
function IsActorOutOfAction(actor) return false end

---Get the posture of a specific actor.
---@param actor pointer The pointer to the actor.
---@return integer # The posture ID of the actor.
function GetActorPosture(actor) return 0 end

---Set the posture of a specific actor.
---@param actor pointer The pointer to the actor.
---@param postureId integer The posture ID to set.
---@return pointer # The pointer to the operation result.
function SetActorPosture(actor, postureId) return 0 end

---Get the direction a specific actor is facing.
---@param actor pointer The pointer to the actor.
---@return integer # The direction the actor is facing.
function GetActorDirection(actor) return 0 end

---Set the direction a specific actor is facing.
---@param actor pointer The pointer to the actor.
---@param direction integer The direction to set.
---@return boolean # True if the operation was successful, otherwise false.
function SetActorDirection(actor, direction) return false end

---Get the location of a specific actor.
---@param actor pointer The pointer to the actor.
---@return pointer # The location pointer of the actor.
function GetActorLocation(actor) return 0 end

---Set the location of a specific actor.
---@param actor pointer The pointer to the actor.
---@param location pointer The location to set.
---@return boolean # True if the operation was successful, otherwise false.
function SetActorLocation(actor, location) return false end

---Check if an actor is inside a specific location.
---@param actor pointer The pointer to the actor.
---@param location pointer The pointer to the location.
---@return boolean # True if the actor is inside the location, otherwise false.
function IsInside(actor, location) return false end

---Check if an actor is inside a specific building.
---@param actor pointer The pointer to the actor.
---@param buildingId integer The ID of the building.
---@return boolean # True if the actor is inside the building, otherwise false.
function IsInsideBuilding(actor, buildingId) return false end

---Reveal an actor.
---@param actor pointer The actor to reveal.
---@return boolean # True if the operation was successful, otherwise false.
function Reveal(actor) return false end

---Get the movement style of an actor.
---@param actor pointer The pointer to the actor.
---@return integer # The movement style of the actor.
function GetMovementStyle(actor) return 0 end

---Get the current action of an actor.
---@param actor pointer The pointer to the actor.
---@return integer # The current action of the actor.
function GetCurrentAction(actor) return 0 end

---Deal damage to an actor.
---@param actor pointer The actor to deal damage to.
---@param damage integer The amount of damage to deal.
---@param shouldStun boolean Whether the damage should knock the actor out.
---@return boolean # True if the operation was successful, otherwise false.
function DealDamage(actor, damage, shouldStun) return false end

---Stop an actor's current action.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the operation was successful, otherwise false.
function StopActor(actor) return false end

---Check if an actor can see another actor.
---@param actor pointer The pointer to the actor.
---@param otherActor pointer The pointer to the other actor.
---@return boolean # True if the actor can see the other actor, otherwise false.
function Sees(actor, otherActor) return false end

---Enable the view cone for an actor.
---@param actor pointer The pointer to the actor.
function EnableViewCone(actor) end

---Get the outline display status.
---@return boolean # True if the outline display is enabled, otherwise false.
function GetOutlineDisplay() return false end

---Set the outline display status.
---@param shouldDisplay boolean True to enable the outline display, false to disable it.
function SetOutlineDisplay(shouldDisplay) end

---Filter an event with prototype parameters.
---@param unk01 pointer An unknown parameter.
---@param unk02 pointer An unknown parameter.
---@param unk03 integer An unknown parameter.
---@return boolean # True if the operation was successful, otherwise false.
function PrototypeFilterEvent(unk01, unk02, unk03) return false end

---Send a message to an actor.
---@param actor pointer The pointer to the actor.
---@param message integer The message to send.
---@return boolean # True if the operation was successful, otherwise false.
function SendMessage(actor, message) return false end

---Send a message with arguments to an actor.
---@param actor pointer The pointer to the actor.
---@param message integer The message to send.
---@param arg1 integer The first argument.
---@param arg2 integer The second argument.
---@return boolean # True if the operation was successful, otherwise false.
function SendMessageWithArguments(actor, message, arg1, arg2) return false end

---Constant function representing the global ProcessMessage function.
---@return integer # Zero.
function God() return 0 end

---Select all or none (31 to select all, 0 to select none).
---@param code integer The code for selection (31 for all, 0 for none).
function Select(code) end

---Deactivate an actor.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the operation was successful, otherwise false.
function Deactivate(actor) return false end

---Activate an actor.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the operation was successful, otherwise false.
function Activate(actor) return false end

---Set the availability of a specific action for an actor.
---@param actor pointer The pointer to the actor.
---@param actionId integer The ID of the action.
---@param isAvailable boolean True if the action is available, otherwise false.
---@return boolean # True if the operation was successful, otherwise false.
function SetActionAvailable(actor, actionId, isAvailable) return false end

---Check if a specific action is available for an actor.
---@param actor pointer The pointer to the actor.
---@param actionId integer The ID of the action.
---@return boolean # True if the action is available, otherwise false.
function IsActionAvailable(actor, actionId) return false end

---Set a persistent property for an actor.
---@param actor pointer The pointer to the actor.
---@param propertyId integer The ID of the property.
---@param value integer The value to set.
---@return boolean # True if the operation was successful, otherwise false.
function SetPersistentProperty(actor, propertyId, value) return false end

---Get a persistent property of an actor.
---@param actor pointer The pointer to the actor.
---@param propertyId integer The ID of the property.
---@return integer # The value of the property.
function GetPersistentProperty(actor, propertyId) return 0 end

---Check if any civilian is dead.
---@return boolean # True if any civilian is dead, otherwise false.
function IsAnyCivilianDead() return false end

---Check if any enemy is dead.
---@return boolean # True if any enemy is dead, otherwise false.
function IsAnyEnemyDead() return false end

---Get the overall alert level of enemies.
---@return integer # The overall enemy alert level.
function GetOverallEnemyAlert() return 0 end

---Get the overall alert level of civilians.
---@return integer # The overall civilian alert level.
function GetOverallCivilianAlert() return 0 end

---Set the AI alert status for an actor.
---@param actor pointer The pointer to the actor.
---@param alertStatusId integer The ID of the alert status.
---@return boolean # True if the operation was successful, otherwise false.
function SetAIAlertStatus(actor, alertStatusId) return false end

---Get the AI alert status of an actor.
---@param actor pointer The pointer to the actor.
---@return integer # The AI alert status ID of the actor.
function GetAIAlertStatus(actor) return 0 end

---Set the AI state for an actor.
---@param actor pointer The pointer to the actor.
---@param stateId integer The ID of the state.
---@return boolean # True if the operation was successful, otherwise false.
function SetAIState(actor, stateId) return false end

---Get the AI state of an actor.
---@param actor pointer The pointer to the actor.
---@return integer # The AI state ID of the actor.
function GetAIState(actor) return 0 end

---Get the AI attitude of an actor.
---@param actor pointer The pointer to the actor.
---@return integer # The AI attitude of the actor.
function GetAIAttitude(actor) return 0 end

---Make an actor stare at another actor.
---@param actor pointer The pointer to the actor.
---@param targetActor pointer The pointer to the target actor.
function StareActor(actor, targetActor) end

---Make an actor stare at a specific location.
---@param actor pointer The pointer to the actor.
---@param location pointer The pointer to the location.
function StareLocation(actor, location) end

---Assign a patrol to an actor.
---@param actor pointer The pointer to the actor.
---@param patrol pointer The pointer to the patrol.
function AssignPatrol(actor, patrol) end

---Assign a post to an actor.
---@param actor pointer The pointer to the actor.
---@param location pointer The pointer to the location.
---@param direction integer The direction the actor should face.
function AssignPost(actor, location, direction) end

---Lock the AI of an actor with the option to remember events.
---@param actor pointer The pointer to the actor.
---@param shouldRememberEvents boolean True if the AI should remember events, otherwise false.
function LockAI(actor, shouldRememberEvents) end

---Unlock the AI of an actor.
---@param actor pointer The pointer to the actor.
function UnlockAI(actor) end

---Force a battle decision for an actor.
---@param actor pointer The pointer to the actor.
---@param decisionId integer The ID of the decision.
---@return boolean # True if the operation was successful, otherwise false.
function ForceBattleDecision(actor, decisionId) return false end

---Make noise at a specific location.
---@param location pointer The pointer to the location.
---@param noiseTypeId integer The ID of the noise type.
function MakeNoise(location, noiseTypeId) end

---Freeze or unfreeze an actor.
---@param actor pointer The pointer to the actor.
---@param isFrozen boolean True to freeze the actor, false to unfreeze.
---@return integer # The result of the operation.
function Freeze(actor, isFrozen) return 0 end

---Freeze or unfreeze all actors.
---@param areFrozen boolean True to freeze all actors, false to unfreeze.
---@return pointer # The result of the operation.
function FreezeAll(areFrozen) return 0 end

---Set whether the actor should walk or run along its patrol route.
---@param actor pointer The pointer to the actor.
---@param shouldRun boolean Actor walks if false and runs if true.
function SetPatrolShouldRun(actor, shouldRun) end

---Get the rank of a soldier actor.
---@param actor pointer The pointer to the soldier actor.
---@return integer # The rank of the soldier actor.
function GetSoldierRank(actor) return 0 end

---Check if an animation is active for an actor.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the animation is active, otherwise false.
function IsAnimationActive(actor) return false end

---Set the animation state for an actor.
---@param actor pointer The pointer to the actor.
---@param isActive boolean True to activate the animation, false to deactivate.
---@return boolean # True if the operation was successful, otherwise false.
function SetAnimationState(actor, isActive) return false end

---Check if a patch is applied.
---@param patch pointer The pointer to the patch.
---@return boolean # True if the patch is applied, otherwise false.
function IsPatchApplied(patch) return false end

---Apply a patch.
---@param patch pointer The pointer to the patch.
function ApplyPatch(patch) end

---Reset a patch.
---@param patch pointer The pointer to the patch.
function ResetPatch(patch) end

---Suspend all sound sources.
function SuspendAllSoundSources() end

---Resume all sound sources.
function ResumeAllSoundSources() end

---Activate a specific sound source.
---@param soundSource pointer The pointer to the sound source.
function ActivateSoundSource(soundSource) end

---Deactivate a specific sound source.
---@param soundSource pointer The pointer to the sound source.
function DeactivateSoundSource(soundSource) end

---Destroy a specific sound source.
---@param soundSource pointer The pointer to the sound source.
function DestroySoundSource(soundSource) end

---Clean an actor from its building before teleporting.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the operation was successful, otherwise false.
function CleanFromHisBuildingBeforeTeleport(actor) return false end

---Clean an actor from a script zone before teleporting.
---@param actor pointer The pointer to the actor.
---@param location pointer The pointer to the location.
---@return boolean # True if the operation was successful, otherwise false.
function CleanFromScriptZoneBeforeTeleport(actor, location) return false end

---Add an actor to a script zone after teleporting.
---@param actor pointer The pointer to the actor.
---@param location pointer The pointer to the location.
---@return boolean # True if the operation was successful, otherwise false.
function AddToScriptZoneAfterTeleport(actor, location) return false end

---Put an actor in a specific building.
---@param actor pointer The pointer to the actor.
---@param building pointer The pointer to the building.
function PutActorInBulding(actor, building) end

---Set the active state of a building.
---@param building pointer The pointer to the building.
---@param isActive boolean True to activate the building, false to deactivate.
---@return boolean # True if the operation was successful, otherwise false.
function SetBuildingActive(building, isActive) return false end

---Get any actor inside a specific building.
---@param building pointer The pointer to the building.
---@return pointer # The pointer to the actor inside the building.
function GetAnyActorInsideBuilding(building) return 0 end

---Constant function.
---@return integer # Zero.
function NoWhere() return 0 end

---Get the distance between two locations.
---@param location1 pointer The pointer to the first location.
---@param location2 pointer The pointer to the second location.
---@return integer # The distance between the two locations.
function GetDistance(location1, location2) return 0 end

---Generate a random number up to a maximum value.
---@param maximum integer The maximum value.
---@return integer # The generated random number.
function Rand(maximum) return 0 end

---Print a message to the console.
---@param textId integer The ID of the text to print.
---@return boolean # True if the operation was successful, otherwise false.
function PrintConsole(textId) return false end

---Get the size of the mission team.
---@return integer # The size of the mission team.
function GetSizeOfMissionTeam() return 0 end

---Get a playable character (PC) from the mission team by index.
---@param index integer The index of the PC.
---@return pointer # The pointer to the PC.
function GetPCFromMissionTeam(index) return 0 end

---Add a playable character (PC) to the mission team.
---@param actor pointer The pointer to the PC.
function AddPCToMissionTeam(actor) end

---Remove a playable character (PC) from the mission team.
---@param actor pointer The pointer to the PC.
function RemovePCFromMissionTeam(actor) end

---Get the number of obligatory PCs in the mission team.
---@return integer # The number of obligatory PCs.
function GetNumberOfObligatoryPCsInMissionTeam() return 0 end

---Get an obligatory PC from the mission team by mission ID.
---@param missionId integer The mission ID.
---@return integer # The obligatory PC.
function GetObligatoryPCFromMissionTeam(missionId) return 0 end

---Check if a PC is obligatory in the mission team.
---@param actor pointer The pointer to the PC.
---@return boolean # True if the PC is obligatory, otherwise false.
function IsPCObligatoryInMissionTeam(actor) return false end

---Check if the mission team is valid.
---@return boolean # True if the mission team is valid, otherwise false.
function IsMissionTeamValid() return false end

---Get the ID of the last played mission.
---@return integer # The ID of the last played mission.
function GetLastPlayedMission() return 0 end

---Get the ID of the next played mission.
---@return integer # The ID of the next played mission.
function GetNextPlayedMission() return 0 end

---Check if the game is in Men to Blazon conversion mode.
---@return boolean # True if in Men to Blazon conversion mode, otherwise false.
function IsMenToBlazonConversionMode() return false end

---Get the number of placeholders.
---@return integer # The number of placeholders.
function GetNumberOfPlaceholders() return 0 end

---Move a placeholder with specific parameters.
---@param unk01 integer An unknown parameter.
---@param unk02 integer An unknown parameter.
---@return integer # The result of the operation.
function MovePlaceholder(unk01, unk02) return 0 end

---Set the company number for an actor.
---@param actor pointer The pointer to the actor.
---@param value integer The company number to set.
---@return pointer # The result of the operation.
function SetCompanyNumber(actor, value) return 0 end

---Set an actor to always be attentive.
---@param actor pointer The pointer to the actor.
---@param isActive boolean True to set the actor as always attentive, false otherwise.
---@return integer # The result of the operation.
function SetAlwaysAttentive(actor, isActive) return 0 end

---Win a blazon.
---@param blazonId integer The ID of the blazon.
function WinBlazon(blazonId) end

---Lose a blazon.
---@param blazonId integer The ID of the blazon.
function LoseBlazon(blazonId) end

---Set an actor to be invisible.
---@param actor pointer The pointer to the actor.
---@param isActive boolean True to set the actor as invisible, false otherwise.
---@return integer # The result of the operation.
function SetInvisible(actor, isActive) return 0 end

---Check if an actor is invisible.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the actor is invisible, otherwise false.
function IsInvisible(actor) return false end

---Check if a door is locked for the player character (PC).
---@param door pointer The pointer to the door.
---@return boolean # True if the door is locked for the PC, otherwise false.
function IsDoorLockedPC(door) return false end

---Check if a door is unlockable.
---@param door pointer The pointer to the door.
---@return boolean # True if the door is unlockable, otherwise false.
function IsDoorUnlockable(door) return false end

---Check if a door is locked for a civilian NPC.
---@param door pointer The pointer to the door.
---@return boolean # True if the door is locked for the civilian NPC, otherwise false.
function IsDoorLockedNPCCivilian(door) return false end

---Check if a door is locked for a villain NPC.
---@param door pointer The pointer to the door.
---@return boolean # True if the door is locked for the villain NPC, otherwise false.
function IsDoorLockedNPCVillain(door) return false end

---Set a door to be locked for the player character (PC).
---@param door pointer The pointer to the door.
---@param isLocked boolean True to lock the door, false to unlock it.
function SetDoorLockedPC(door, isLocked) end

---Set a door to be unlockable.
---@param door pointer The pointer to the door.
---@param isUnlockable boolean True to make the door unlockable, false otherwise.
function SetDoorUnlockable(door, isUnlockable) end

---Set a door to be locked for a civilian NPC.
---@param door pointer The pointer to the door.
---@param isLocked boolean True to lock the door, false to unlock it.
function SetDoorLockedNPCCivilian(door, isLocked) end

---Set a door to be locked for a villain NPC.
---@param door pointer The pointer to the door.
---@param isLocked boolean True to lock the door, false to unlock it.
function SetDoorLockedNPCVillain(door, isLocked) end

---Set special authorization for a door.
---@param door pointer The pointer to the door.
function SetDoorSpecialAutorisation(door) end

---Activate a door mouse sector.
---@param isActive boolean True to activate the door mouse sector, false otherwise.
---@param door pointer The pointer to the door.
---@return integer # The result of the operation.
function ActivateDoorMouseSector(isActive, door) return 0 end

---Get the current scroll.
---@return pointer # The pointer to the current scroll.
function ThisScroll() return 0 end

---Get the state of a scroll.
---@param scroll pointer The pointer to the scroll.
---@return integer # The state of the scroll.
function GetScrollState(scroll) return 0 end

---Set the state of a scroll.
---@param scroll pointer The pointer to the scroll.
---@param stateId integer The state ID to set.
---@return integer # The result of the operation.
function SetScrollState(scroll, stateId) return 0 end

---Get a custom campaign value.
---@param id integer The integer id of the custom campaign value.
---@return integer # The custom campaign value.
function GetCustomCampaignValue(id) return 0 end

---Set a custom campaign value.
---@param id integer The integer id of the custom campaign value.
---@param value integer The value to set.
---@return integer # The result of the operation.
function SetCustomCampaignValue(id, value) return 0 end

---Get a custom value for an NPC.
---@param actor pointer The pointer to the NPC.
---@param valueId integer The ID of the custom value.
---@return integer # The custom value of the NPC.
function GetCustomNPCValue(actor, valueId) return 0 end

---Set a custom value for an NPC.
---@param actor pointer The pointer to the NPC.
---@param valueId integer The ID of the custom value.
---@param value integer The value to set.
---@return integer # The result of the operation.
function SetCustomNPCValue(actor, valueId, value) return 0 end

---Register a sector as a production sector.
---@param unk01 integer An unknown parameter.
---@param unk02 integer An unknown parameter.
---@param unk03 integer An unknown parameter.
---@return integer # The result of the operation.
function RegisterAsProductionSector(unk01, unk02, unk03) return 0 end

---Add a production point to a sector.
---@param unk01 integer An unknown parameter.
---@param unk02 integer An unknown parameter.
function AddProductionPoint(unk01, unk02) end

---Get an actor for a placeholder.
---@param actor pointer The pointer to the actor.
---@return integer # The result of the operation.
function GetActorForPlaceholder(actor) return 0 end

---Display popup text.
---@param textId integer The ID of the text to display.
function DisplayPopupText(textId) end

---Record displaying popup text.
---@param textId integer The ID of the text to display.
---@return integer # The result of the operation.
function SequenceDisplayPopupText(textId) return 0 end

---Get the number of actors in a specific sector.
---@param location pointer The pointer to the sector.
---@return integer # The number of actors in the sector.
function GetNumberOfActorsInSector(location) return 0 end

---Get an actor in a specific sector by index.
---@param location pointer The pointer to the sector.
---@param index integer The index of the actor.
---@return pointer # The pointer to the actor in the sector.
function GetActorInSector(location, index) return 0 end

---Perform a bitwise AND operation.
---@param a integer The first operand.
---@param b integer The second operand.
---@return integer # The result of the bitwise AND operation.
function BitwiseAnd(a, b) return 0 end

---Perform a bitwise OR operation.
---@param a integer The first operand.
---@param b integer The second operand.
---@return integer # The result of the bitwise OR operation.
function BitwiseOr(a, b) return 0 end

---Perform a bitwise XOR operation.
---@param a integer The first operand.
---@param b integer The second operand.
---@return integer # The result of the bitwise XOR operation.
function BitwiseXor(a, b) return 0 end

---Check if a specific action is available for a player character (PC).
---@param actor pointer The pointer to the actor.
---@param actionId integer The ID of the action.
---@return boolean # True if the action is available, otherwise false.
function HasPCAction(actor, actionId) return false end

---Check if any player character (PC) has a specific action available.
---@param actionId integer The ID of the action.
---@return boolean # True if any PC has the action available, otherwise false.
function HasAnyPCAction(actionId) return false end

---Get the current Robin actor.
---@return pointer # The pointer to the current Robin actor.
function GetRobin() return 0 end

---Record moving an actor near a location with specific parameters.
---@param actor pointer The pointer to the actor.
---@param location pointer The pointer to the location.
---@param unk01 integer An unknown parameter.
---@param unk02 number An unknown parameter.
---@return integer # The result of the operation.
function SequenceMoveNear(actor, location, unk01, unk02) return 0 end

---Compute a location between two locations.
---@param location1 pointer The pointer to the first location.
---@param location2 pointer The pointer to the second location.
---@param ratio number A number between 1 and 0 indicating where between the input locations the result should be.
---@return pointer # The computed location.
function ComputeLocationBetween(location1, location2, ratio) return 0 end

---Declare an actor as a combat trainer.
---@param actor pointer The pointer to the actor.
---@return integer # The result of the operation.
function DeclareAsCombatTrainer(actor) return 0 end

---Get a relic by its ID.
---@param relicId integer The ID of the relic.
---@return pointer # The pointer to the relic.
function GetRelic(relicId) return 0 end

---Get the number of player characters (PCs).
---@return integer # The number of PCs.
function GetNumberOfPCs() return 0 end

---Get a player character (PC) by index.
---@param index integer The index of the PC.
---@return pointer # The pointer to the PC.
function GetPC(index) return 0 end

---Add a squad member to a chief actor.
---@param chiefActor pointer The pointer to the chief actor.
---@param squadMemberActor pointer The pointer to the squad member actor.
function AddAsSquadMember(chiefActor, squadMemberActor) end

---Remove all squad members from a chief actor.
---@param chiefActor pointer The pointer to the chief actor.
function RemoveAllSquadMembers(chiefActor) end

---Switch an actor to an alert patrol.
---@param actor pointer The pointer to the actor.
---@return integer # The result of the operation.
function SwitchToAlertPatrol(actor) return 0 end

---Check if an actor is a rider.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the actor is a rider, otherwise false.
function IsActorRider(actor) return false end

---Check if an actor is revealed.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the actor is revealed, otherwise false.
function IsRevealed(actor) return false end

---Check if a blazon is won.
---@param blazonId integer The ID of the blazon.
---@return boolean # True if the blazon is won, otherwise false.
function IsBlazonWon(blazonId) return false end

---Add a repulsive point to a location with specific parameters.
---@param location pointer The pointer to the location.
---@param unk01 number An unknown parameter.
---@param unk02 number An unknown parameter.
---@param unk03 integer The character type that this point restricts movement of. (bitwise 1=PCs, 2=?, 4=?)
---@return integer # The result of the operation.
function AddRepulsivePoint(location, unk01, unk02, unk03) return 0 end

---Set the view radius.
---@param radius integer The view radius to set.
---@return integer # The result of the operation.
function SetViewRadius(radius) return 0 end

---Record freezing or unfreezing all actors.
---@param isFrozen boolean True to freeze all actors, false to unfreeze.
---@return integer # The result of the operation.
function SequenceFreezeAll(isFrozen) return 0 end

---Delete a repulsive point from a location.
---@param location pointer The pointer to the location.
---@return integer # The result of the operation.
function DeleteRepulsivePoint(location) return 0 end

---Set an emoticon for an NPC.
---@param actor pointer The pointer to the NPC.
---@param emoticonId integer The ID of the emoticon.
---@param frames integer The duration of the emoticon display.
---@return integer # The result of the operation.
function SetNPCEmoticon(actor, emoticonId, frames) return 0 end

---Confiscate money from an actor.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the operation was successful, otherwise false.
function ConfiscateMoney(actor) return false end

---Check if all player characters (PCs) are inside a specific location.
---@param location pointer The pointer to the location.
---@return boolean # True if all PCs are inside, otherwise false.
function AreAllPCsInside(location) return false end

---Check if all enemies inside are out of action (knocked out, tied, or dead).
---@param location pointer The pointer to the location.
---@return boolean # True if all enemies inside are out of action, otherwise false.
function AreAllEnemiesInsideOutOfAction(location) return false end

---Add a player character (PC) to a gang.
---@param actor pointer The pointer to the PC.
---@return integer # The result of the operation.
function AddPCToGang(actor) return 0 end

---Attach a scroll to an NPC.
---@param actor pointer The pointer to the NPC.
---@param scroll pointer The pointer to the scroll.
---@return integer # The result of the operation.
function AttachScrollToNPC(actor, scroll) return 0 end

---Check if all blazons are won.
---@return boolean # True if all blazons are won, otherwise false.
function AreAllBlazonsWon() return false end

---Check if a bonus item is picked up.
---@param item pointer The pointer to the bonus item.
---@return boolean # True if the bonus item is picked up, otherwise false.
function IsBonusItemPickedUp(item) return false end

---Get the amount of ransom money.
---@return integer # The amount of ransom money.
function GetRansomMoney() return 0 end

---Set the amount of ransom money.
---@param value integer The amount of ransom money to set.
---@return integer # The result of the operation.
function SetRansomMoney(value) return 0 end

---Get the difficulty level of the game.
---@return integer # The difficulty level.
function GetDifficultyLevel() return 0 end

---Display the Sherwood report.
function DisplaySherwoodReport() end

---Check if an actor is active.
---@param actor pointer The pointer to the actor.
---@return boolean # True if the actor is active, otherwise false.
function IsActorActive(actor) return false end

---Add a farmer to a gang with specific melee and marksman levels.
---@param merryManId integer The ID of the merry man.
---@param meleeLevel integer The melee level to set.
---@param marksmanLevel integer The marksman level to set.
---@return integer # The result of the operation.
function AddFarmerToGang(merryManId, meleeLevel, marksmanLevel) return 0 end

---Set the experiences of an actor in melee and marksman levels.
---@param actor pointer The pointer to the actor.
---@param meleeLevel integer The melee level to set.
---@param marksmanLevel integer The marksman level to set.
---@return integer # The result of the operation.
function SetExperiences(actor, meleeLevel, marksmanLevel) return 0 end

---Record revealing an actor.
---@param actor pointer The pointer to the actor.
---@return integer # The result of the operation.
function SequenceReveal(actor) return 0 end

---Set the animation active state for a patch.
---@param patch pointer The pointer to the patch.
---@param isActive boolean True to activate the animation, false to deactivate.
---@return integer # The result of the operation.
function SetPatchAnimationActive(patch, isActive) return 0 end

---Get the number of player characters (PCs) alive.
---@return integer # The number of PCs alive.
function GetNumberOfPCsAlive() return 0 end

---Check if all player characters (PCs) alive are inside a specific location.
---@param location pointer The pointer to the location.
---@return boolean # True if all alive PCs are inside, otherwise false.
function AreAllPCsAliveInside(location) return false end

---Transform a handle target to a take target.
---@param target pointer The pointer to the target.
---@return integer # The result of the operation.
function TransformHandleTargetToTakeTarget(target) return 0 end

---Check if a player character (PC) is selected.
---@param actor pointer The pointer to the PC.
---@return boolean # True if the PC is selected, otherwise false.
function IsPCSelected(actor) return false end

---Get the number of selected player characters (PCs).
---@return integer # The number of selected PCs.
function GetNumberOfSelectedPCs() return 0 end

---Get a selected player character (PC) by index.
---@param index integer The index of the PC.
---@return pointer # The pointer to the selected PC.
function GetSelectedPC(index) return 0 end

---Play the trap jingle sound.
function PlayTrapJingle() end

---Make a player character (PC) crouched.
---@param actor pointer The pointer to the PC.
---@return integer # The result of the operation.
function MakePCCrouched(actor) return 0 end

---Check if any player character (PC) action is available in the current level or could come from Sherwood.
---@param actionId integer The ID of the action.
---@return boolean # True if any PC action is available, otherwise false.
function HasAnyPCActionWhoIsInThisLevelOrCouldMaybeComeFromSherwood(actionId) return false end

---Lock or unlock a patch.
---@param patch pointer The pointer to the patch.
---@param isLocked boolean True to lock the patch, false to unlock.
---@return integer # The result of the operation.
function LockPatch(patch, isLocked) return 0 end

---Check if any active player character (PC) action is available.
---@param actionId integer The ID of the action.
---@return boolean # True if any active PC action is available, otherwise false.
function HasAnyActivePCAction(actionId) return false end

---Get the type of a player character (PC).
---@param actor pointer The pointer to the PC.
---@return integer # The type of the PC.
function GetPCType(actor) return 0 end

---Select or deselect a player character (PC).
---@param actor pointer The pointer to the PC.
---@param shouldSelect boolean True to select the PC, false to deselect.
function SelectActorPC(actor, shouldSelect) end

---Check if any action is selected for an actor.
---@param actor pointer The pointer to the actor.
---@return boolean # True if any action is selected, otherwise false.
function HasAnyActionSelected(actor) return false end

---Get the action state of an actor.
---@param actor pointer The pointer to the actor.
---@return integer # The action state of the actor.
function GetActorActionState(actor) return 0 end

---Set the action state of an actor.
---@param actor pointer The pointer to the actor.
---@param stateId integer The state ID to set.
---@return integer # The result of the operation.
function SetActorActionState(actor, stateId) return 0 end

---Check if secret agents are back in Sherwood.
---@return boolean # True if secret agents are back in Sherwood, otherwise false.
function SecretAgentsAreBackInSherwood() return false end

---Fade the screen to black.
---@param unk01 number An unknown parameter.
function FadeToBlack(unk01) end

---Link a target to a visual effect (FX).
---@param target pointer The pointer to the target.
---@param fxId integer The ID of the visual effect.
---@return boolean # True if the operation was successful, otherwise false.
function LinkTargetToFX(target, fxId) return false end

---Forbid or allow an NPC to say a specific remark.
---@param actor pointer The pointer to the NPC.
---@param remarkId integer The ID of the remark.
---@param isForbidden boolean True to forbid the remark, false to allow.
---@return integer # The result of the operation.
function ForbidNPCRemark(actor, remarkId, isForbidden) return 0 end