Osiris API Tips Queries: Difference between revisions

From Divinity Engine Wiki
Jump to navigation Jump to search
(Blanked the page)
No edit summary
Line 1: Line 1:
 
<div>
<h3>Queries</h3>
<p>Queries request information about the state of the world from Osiris. They can be used in the part of a rule that checks conditions. Queries almost always succeed, except if you pass an initialised value as an <b><i>[out]</i></b> parameter and it does not match the value the query would returns. Below, this will be called the <b>Default Return Value</b>. If a query can also fail under other circumstances, this will be mentioned.<br>
</p>
<p><br>
</p>
<div>
<div>
<h4 style="font-size:1.1em;color:rgb(36,53,93)">CharacterGetEquippedItem</h4>
<p><u>Full definitions</u></p>
<ul><li>query <b>CharacterGetEquippedItem</b>(<i><b>[in]</b>(CHARACTERGUID)</i><b>_Character</b>,<i><b> [in]</b>(STRING)</i><b>_Slotname</b>,<i><b> [out]</b></i>(<i>GUIDSTRING</i>)<b>_ItemGUID</b>)</li></ul>
<u>Description</u><br>
</div>
<p>Returns in <b>_ItemGUID</b> the item equipped by <b>_Character</b> in slot <b>_Slotname</b>, if any.<br>
</p>
<p><u>Return values</u></p>
<ul><li><b><b><b>Success/Failure</b>: </b></b>Fails if <b>_Character</b> does not exist, or if no item is equipped in <b>_Slotname</b>.<br>
</li>
<li><b>_ItemGuid</b>: The item equipped by <b>_Character</b> in <b>_Slotname.</b><br>
</li></ul>
<p><u>Notes</u></p>
<ul><li>The valid values for <b>_Slotname</b> are: <b>Helmet</b>, <b>Amulet</b>, <b>Breast</b>, <b>Belt</b>, <b>Gloves</b>, <b>Leggings</b>, <b>Boots</b>, <b>Weapon</b>, <b>Shield</b>, <b>Ring</b>, <b>Ring2</b>.<br>
</li></ul>
<p><u>See also</u></p>
<ul><li><b>CharacterUnequipItem</b><br>
</li></ul>
<div>
<h4>CharacterGetHenchmanPresetPrice</h4>
<div style="font-size:13.3333px">
<p style="font-size:13.3333px"><u>Full definitions</u></p>
<ul style="font-size:13.3333px"><li>query&nbsp;<b>CharacterGetHenchmanPresetPrice</b>(<i><b>[in]</b></i>(STRING)<b>_Preset</b>,<b>&nbsp;</b><i style="font-size:13.3333px"><b>[in]</b>(CHARACTERGUID)</i><b style="font-size:13.3333px">_Character</b><span style="font-size:13.3333px">,&nbsp;<b><i>[out]</i></b><i>(INTEGER)</i><b>_Price</b></span>)</li></ul>
<u style="font-size:13.3333px">Description</u><br style="font-size:13.3333px">
<p style="font-size:13.3333px">Returns the price of the preset scaled to the level of&nbsp;<b>_Character</b>.<br>
</p>
<p style="font-size:13.3333px"><u>Return values</u></p>
<ul style="font-size:13.3333px"><li><b>_Price</b>: The price of the preset scaled to the level of&nbsp;<b>_Character.</b><br>
</li></ul>
<p style="font-size:13.3333px"><u>Notes</u></p>
<ul style="font-size:13.3333px"><li>Presets come from the folder&nbsp;<b>".../DOS2/Data/Mods/Shared/CharacterCreation/HenchmanPresets/"</b></li>
<li>Presets can be customized using the following documentation:&nbsp;<b>link</b></li></ul>
<div>
<p style="font-size:13.3333px"><u>See also</u></p>
<ul style="font-size:13.3333px"><li><b>CharacterApplyHenchmanPreset</b><br>
</li></ul>
</div>
</div>
</div>
<div>
<div>
<h4>CharacterIsAlly</h4>
<p><u>Full definitions</u></p>
<ul><li>query <b>CharacterIsAlly</b>(<i><b>[in]</b>(CHARACTERGUID)</i><b>_Character</b>,<i><b> </b></i><i><b><i><b>[in]</b></i></b><i>(CHARACTERGUID)</i></i><b><b>_OtherCharacter</b></b><i><b>,<i><b> </b></i>[out]</b></i>(INTEGER)<b>_Bool</b>)</li></ul>
<u>Description</u><br>
<p>Returns whether <b>_Character</b> is an ally of <b>_OtherCharacter</b>.<br>
</p>
<p><u>Return values</u></p>
<ul><li><b><b><b>Success/Failure</b>:</b></b> Default return value.<br>
</li>
<li><b>_Bool</b>: <b>1</b> if <b>_Character</b> and <b>_OtherCharacter </b>are allies, <b>0</b> if not<b>.</b><br>
</li></ul>
<p><u>Notes</u></p>
<ul><li>Also works outside combat.</li>
<li>If <b>_Character</b> or <b>_OtherCharacter</b> is dead or dying, the result solely depends on the characters' alignments (factions). If they are alive, it is also influenced by temporary hostile relations, e.g. induced by attacking a neutral character.<br>
</li></ul>
<p><u>See also</u></p>
<ul><li><b>CharacterIsNeutral</b></li>
<li><b>CharacterIsEnemy<br>
</b></li></ul>
<h4>CharacterIsEnemy</h4>
<p><u>Notes</u></p>
<ul><li>See <b>CharacterIsAlly</b> for detailed information, except that this query returns whether the characters are enemies.<br>
</li></ul>
<p><u>See also</u></p>
<ul><li><b>CharacterIsAlly</b></li>
<li><b>CharacterIsEnemy<br>
</b></li></ul>
<h4>CharacterIsNeutral</h4>
<p><u>Notes</u></p>
<ul><li>See <b>CharacterIsAlly</b> for detailed information, except that this query returns whether the characters are neutral.<br>
</li></ul>
<p><u>See also</u></p>
<ul><li><b>CharacterIsAlly</b></li>
<li><b>CharacterIsEnemy<br>
</b></li></ul>
<h4>CharacterIsPartyFollower</h4>
<p><u>Full definitions</u></p>
<ul><li>query <b>CharacterIsPartyFollower</b>(<i><b>[in]</b>(CHARACTERGUID)</i><b>_Character</b>,<i><b> </b></i><i><b>[out]</b></i>(INTEGER)<b>_Bool</b>)</li></ul>
<u>Description</u><br>
</div>
<p>Returns whether <b>_Character</b> is a character that follows a player character around. An NPC can be instructed to do so through <b>CharacterFollowCharacter</b>.<br>
</p>
<p><u>Return values</u></p>
<ul><li><b><b><b>Success/Failure</b>: </b></b>Fails if <b>_Character</b> does not exist<b>.</b><br>
</li>
<li><b>_Bool</b>: <b>1</b> if <b>_Character</b> is a party follower, <b>0</b> if not<b>.</b><br>
</li></ul>
<p><u>Notes</u></p>
<ul><li><b>CharacterIsPlayer</b> will also return true for party followers.<br>
</li></ul>
<p><u>See also</u></p>
<ul><li><b>CharacterIsPlayer</b></li>
<li><b>CharacterFollowCharacter</b></li></ul>
<h4>CharacterIsPlayer</h4>
<p><u>Full definitions</u></p>
<ul><li>query <b>CharacterIsPlayer</b>(<i><b>[in]</b>(CHARACTERGUID)</i><b>_Character</b>,<i><b> </b></i><i><b>[out]</b></i>(INTEGER)<b>_Bool</b>)</li></ul>
<u>Description</u><br>
</div>
<p>Returns whether <b>_Character</b> is <i>player-controlled</i>.<br>
</p>
<p><u>Return values</u></p>
<ul><li><b><b><b>Success/Failure</b>: </b></b>Fails if <b>_Character</b> does not exist<b>.</b><br>
</li>
<li><b>_Bool</b>: <b>1</b> if <b>_Character</b> is <i>player-controlled</i>, <b>0</b> if not<b>.</b><br>
</li></ul>
<p><u>Notes</u></p>
<ul><li>Apart from avatars and recruited companions, <i>player-controlled</i> characters also include summons and followers.</li></ul>
<p><u>See also</u></p>
<ul><li><b>CharacterIsPartyFollower</b></li>
<li><b>CharacterIsSummon</b></li>
<li><b>CharacterFollowCharacter</b></li></ul>
<h4>CharacterIsSummon</h4>
<p><u>Full definitions</u></p>
<ul><li>query <b>CharacterIsSummon</b>(<i><b>[in]</b>(CHARACTERGUID)</i><b>_Character</b>,<i><b> </b></i><i><b>[out]</b></i>(INTEGER)<b>_Bool</b>)</li></ul>
<u>Description</u><br>
<p>Returns whether <b>_Character</b> is a summon. Summon can be <i>player-controlled</i> or not.<br>
</p>
<p><u>Return values</u></p>
<ul><li><b><b><b>Success/Failure</b>: </b></b>Fails if <b>_Character</b> does not exist<b>.</b><br>
</li>
<li><b>_Bool</b>: <b>1</b> if <b>_Character</b> is a summon, <b>0</b> if not<b>.</b><br>
</li></ul>
<p><u>Notes</u></p>
<ul><li><br>
</li>
<li>Summons can also be distinguished by the fact that hey have the <b>SUMMON</b> tag.</li>
<li>If you wish to know whether a summon is <i>player-controlled</i>, also check <b>CharacterIsPlayer</b>.<br>
</li></ul>
<p><u>See also</u></p>
<ul><li><b>CharacterIsPlayer</b></li></ul>
<h4>GetClosestAlivePlayer</h4>
<p><u>Full definitions</u></p>
<ul><li>query <span style="font-family:arial,sans-serif"><b>GetClosestAlivePlayer</b></span>(<i><b>[in]</b>(GUIDSTRING)</i><b>_Target</b>, <i><b>[out]</b>(CHARACTERGUID)</i><b>_Player</b>)</li></ul>
<u>Description</u><br>
</div>
<div>
<p>Gets the closest player to <b>_Target</b> that is alive and stores it in <b>_Player</b>.</p>
<p><u>Return values</u></p>
<ul><li><b><b><b><b>Success/Failure</b>: </b></b></b>Fails if no living player is found.<br>
</li>
<li><b>_Player</b>: The found player character.<br>
</li></ul>
<p><u>Notes</u></p>
<ul><li>Be careful if you check for extra conditions on the returned player: if any of those conditions fail, no other players will be considered.</li>
<li>If you want to start a dialog, use <b><span style="font-family:arial,sans-serif">ProcGetClosestAvailableCharacterTo</span></b></li></ul>
<p><u>See also</u></p>
<ul><li>Helper <b><span style="font-family:arial,sans-serif">ProcGetClosestAvailableCharacterTo</span></b></li></ul>
<div>
<div>
<h4>GetDistanceTo</h4>
<p><u>Full definitions</u></p>
<ul><li>query <span style="font-family:arial,sans-serif"><b>GetDistanceTo</b></span>(<i><b>[in]</b>(GUIDSTRING)</i><b>_Object1</b>, <i><b>[in]</b>(GUIDSTRING)</i><b>_Object2</b>, <i><b>[out]</b>(REAL)</i><b>_Dist</b>)</li></ul>
<u>Description</u><br>
</div>
<p>Calculates the distance between <b>_Object1</b> and <b>_Object2</b>.</p>
<p><u>Return values</u></p>
<ul><li><b>Success/Failure</b>: Fails if <span style="font-family:arial,sans-serif">if either <b>_Object1</b> or _<b>Object2</b> is in a container or in an inventory. Use <b>ItemIsInInventory</b> to check for this.</span></li>
<li><b>_Dist</b>: The distance in metres.</li></ul>
<p><u>Notes</u></p>
<ul><li><span style="font-family:arial,sans-serif">/</span><br>
</li></ul>
<p><u>See also<br>
</u></p>
<ul><li><b>ItemIsInInventory</b><br>
</li></ul>
<h4>GetInventoryOwner</h4>
<p><u>Full definitions</u></p>
<ul><li>query <b>GetInventoryOwner</b>(<i><b>[in]</b>(ITEMGUID)</i><b>_Item</b>, <i><b>[out]</b>(GUIDSTRING)</i><b>_Owner</b>)</li></ul>
<u>Description</u><br>
<p>Returns the inventory/container that holds <b>_Item</b> in <b>_Owner</b>.<br>
</p>
<p><u>Return values</u></p>
<ul><li><b>Success/Failure</b>: Fails if <b>_Item</b> is not in anyone's inventory nor in a container.<br>
</li>
<li><b>_Owner</b>: The character or item in whose inventory the item currently resides.<br>
</li></ul>
<p><u>Notes<br>
</u></p>
<ul><li>This call returns the outermost container. I.e., if a character has crate in their inventory, and the crate contains a pouch with the item, this call will return the character.<br>
</li></ul>
<p><u>See also<br>
</u></p>
<ul><li><b>ItemIsInInventory</b><br>
</li></ul>
<h4>GetRandomPositionInTrigger</h4>
<p><u>Full definitions</u></p>
<ul><li>query <b>GetRandomPositionInTrigger</b>(<i><b>[in]</b>(TRIGGERGUID)</i><b>_Trigger</b>, <i><b>[out]</b>(REAL)</i><b>_X</b>, <i><b>[out]</b>(REAL)</i><b>_Y</b>, <i><b>[out]</b>(REAL)</i><b>_Z</b>)</li></ul>
<u>Description</u><br>
<p>Returns a random position <i>that is valid on the AI-grid</i> inside <b>_Trigger</b>.<br>
</p>
<p><u>Return values</u></p>
<ul><li><b>Success/Failure</b>: Default return value.<br>
</li>
<li><b>_Trigger</b>: A box trigger inside which the random position should be gotten.<br>
</li>
<li><b>_X</b>, <b>_Y</b>, <b>_Z</b>: the coordinates of the random position<br>
</li></ul>
<p><u>Notes<br>
</u></p>
<ul><li>This routine will first get a random position in the trigger, and if this random position is not valid on the AI-grid, the coordinates will be snapped to a nearby valid position on the AI-grid.</li>
<li>This call does not work for polytriggers</li></ul>
<p><u>See also<br>
</u></p>
<ul><li>/<br>
</li></ul>
<h4>HasActiveStatus</h4>
<p><u>Full definitions</u></p>
<ul><li>query <b>HasActiveStatus</b>(<i><b>[in]</b>(GUIDSTRING)</i><b>_Target</b>, <i><b>[in]</b>(STRING)</i><b>_Status</b>,<i><b> [out]</b>(INTEGER)</i><b>_Bool</b>)</li></ul>
<u>Description</u><br>
<p>Returns whether <b>_Target</b> is currently under the influence of <b>_Status</b>.<br>
</p>
<p><u>Return values</u></p>
<ul><li><b>Success/Failure</b>: Default return value.<br>
</li>
<li><b>_Bool</b>: 0 if <b>_Target</b> is currently not under the influence of <b>_Status</b>, 1 if it is.<br>
</li></ul>
<p><u>Notes<br>
</u></p>
<ul><li>/</li></ul>
<p><u>See also<br>
</u></p>
<ul><li><b>HasAppliedStatus</b><br>
</li></ul>
<h4>HasAppliedStatus</h4>
<p><u>Full definitions</u></p>
<ul><li>query <b>HasAppliedStatus</b>(<i><b>[in]</b>(GUIDSTRING)</i><b>_Target</b>, <i><b>[in]</b>(STRING)</i><b>_Status</b>,<i><b> [out]</b>(INTEGER)</i><b>_Bool</b>)</li></ul>
<u>Description</u><br>
<p>Returns whether <b>_Status</b> has been applied to <b>_Target</b>. <b>_Target</b> may or may not yet actually be under its influence.<br>
</p>
<p><u>Return values</u></p>
<ul><li><b><b>Success/Failure</b>: </b>Default return value.</li>
<li><b>_Bool</b>: 0 if <b>_Status</b> has not been applied to <b>_Target</b>, 1 if it has been.<br>
</li></ul>
<p><u>Notes</u></p>
<ul><li>In virtually all cases, use <b>HasActiveStatus</b> instead. The main purpose of this query is for crime reactions, and is only needed due to frame delays between code and Osiris.<br>
</li></ul>
<p><u>See also<br>
</u></p>
<ul><li><b>HasActiveStatus</b><br>
</li></ul>
<h4>IsSpeakerReserved<br>
</h4>
<p><u>Full definitions</u></p>
<ul><li>query <b>IsSpeakerReserved</b>(<i><b>[in]</b>(GUIDSTRING)</i><b>_Speaker</b>, <i><b>[out]</b>(INTEGER)</i><b>_success</b>)</li></ul>
<u>Description</u><br>
<p>Returns whether <b>_Speaker</b> is already in a dialog.<br>
</p>
<p><u>Return values</u></p>
<ul><li><b><b>Success/Failure</b>: </b>Default return value.</li>
<li><b>_success</b>: <b>0</b> if <b>_Speaker</b> is currently not in a dialog, <b>1</b> otherwise.<br>
</li></ul>
<p><u>Notes</u></p>
<ul><li>/</li></ul>
<p><u>See also<br>
</u></p>
<ul><li><b>DialogStartRequested</b></li>
<li><b>Proc_StartDialog<br>
</b></li></ul>
<h4>ItemIsInInventory</h4>
<p><u>Full definitions</u></p>
<ul><li>query <b><span style="font-family:arial,sans-serif">Item</span>IsInInventory</b>(<i><b>[in]</b>(ITEMGUID)</i><b>_Item</b>, <i><b>[out]</b>(INTEGER)</i><b>_Bool</b>)</li></ul>
<u>Description</u><br>
</div>
<p>Returns whether <b>_Item</b> is in an inventory. This includes both character and container inventories.<br>
</p>
<p><u>Return values</u></p>
<ul><li><b><b>Success/Failure</b>: </b>Default return value.</li>
<li><b>_Bool</b>: 0 if <b>_Item</b> is not in an inventory (as defined above), 1 if it is.<br>
</li></ul>
<p><u>Notes</u></p>
<ul><li>/</li></ul>
<p><u>See also<br>
</u></p>
<ul><li><b>GetInventoryOwner</b></li></ul>
<div>
<hr>
</div>

Revision as of 10:08, 2 August 2017

Queries

Queries request information about the state of the world from Osiris. They can be used in the part of a rule that checks conditions. Queries almost always succeed, except if you pass an initialised value as an [out] parameter and it does not match the value the query would returns. Below, this will be called the Default Return Value. If a query can also fail under other circumstances, this will be mentioned.


CharacterGetEquippedItem

Full definitions

  • query CharacterGetEquippedItem([in](CHARACTERGUID)_Character, [in](STRING)_Slotname, [out](GUIDSTRING)_ItemGUID)

Description

Returns in _ItemGUID the item equipped by _Character in slot _Slotname, if any.

Return values

  • Success/Failure: Fails if _Character does not exist, or if no item is equipped in _Slotname.
  • _ItemGuid: The item equipped by _Character in _Slotname.

Notes

  • The valid values for _Slotname are: Helmet, Amulet, Breast, Belt, Gloves, Leggings, Boots, Weapon, Shield, Ring, Ring2.

See also

  • CharacterUnequipItem

CharacterGetHenchmanPresetPrice

Full definitions

  • query CharacterGetHenchmanPresetPrice([in](STRING)_Preset, [in](CHARACTERGUID)_Character[out](INTEGER)_Price)

Description

Returns the price of the preset scaled to the level of _Character.

Return values

  • _Price: The price of the preset scaled to the level of _Character.

Notes

  • Presets come from the folder ".../DOS2/Data/Mods/Shared/CharacterCreation/HenchmanPresets/"
  • Presets can be customized using the following documentation: link

See also

  • CharacterApplyHenchmanPreset

CharacterIsAlly

Full definitions

  • query CharacterIsAlly([in](CHARACTERGUID)_Character, [in](CHARACTERGUID)_OtherCharacter, [out](INTEGER)_Bool)

Description

Returns whether _Character is an ally of _OtherCharacter.

Return values

  • Success/Failure: Default return value.
  • _Bool: 1 if _Character and _OtherCharacter are allies, 0 if not.

Notes

  • Also works outside combat.
  • If _Character or _OtherCharacter is dead or dying, the result solely depends on the characters' alignments (factions). If they are alive, it is also influenced by temporary hostile relations, e.g. induced by attacking a neutral character.

See also

  • CharacterIsNeutral
  • CharacterIsEnemy

CharacterIsEnemy

Notes

  • See CharacterIsAlly for detailed information, except that this query returns whether the characters are enemies.

See also

  • CharacterIsAlly
  • CharacterIsEnemy

CharacterIsNeutral

Notes

  • See CharacterIsAlly for detailed information, except that this query returns whether the characters are neutral.

See also

  • CharacterIsAlly
  • CharacterIsEnemy

CharacterIsPartyFollower

Full definitions

  • query CharacterIsPartyFollower([in](CHARACTERGUID)_Character, [out](INTEGER)_Bool)

Description

Returns whether _Character is a character that follows a player character around. An NPC can be instructed to do so through CharacterFollowCharacter.

Return values

  • Success/Failure: Fails if _Character does not exist.
  • _Bool: 1 if _Character is a party follower, 0 if not.

Notes

  • CharacterIsPlayer will also return true for party followers.

See also

  • CharacterIsPlayer
  • CharacterFollowCharacter

CharacterIsPlayer

Full definitions

  • query CharacterIsPlayer([in](CHARACTERGUID)_Character, [out](INTEGER)_Bool)

Description

Returns whether _Character is player-controlled.

Return values

  • Success/Failure: Fails if _Character does not exist.
  • _Bool: 1 if _Character is player-controlled, 0 if not.

Notes

  • Apart from avatars and recruited companions, player-controlled characters also include summons and followers.

See also

  • CharacterIsPartyFollower
  • CharacterIsSummon
  • CharacterFollowCharacter

CharacterIsSummon

Full definitions

  • query CharacterIsSummon([in](CHARACTERGUID)_Character, [out](INTEGER)_Bool)

Description

Returns whether _Character is a summon. Summon can be player-controlled or not.

Return values

  • Success/Failure: Fails if _Character does not exist.
  • _Bool: 1 if _Character is a summon, 0 if not.

Notes


  • Summons can also be distinguished by the fact that hey have the SUMMON tag.
  • If you wish to know whether a summon is player-controlled, also check CharacterIsPlayer.

See also

  • CharacterIsPlayer

GetClosestAlivePlayer

Full definitions

  • query GetClosestAlivePlayer([in](GUIDSTRING)_Target, [out](CHARACTERGUID)_Player)

Description

Gets the closest player to _Target that is alive and stores it in _Player.

Return values

  • Success/Failure: Fails if no living player is found.
  • _Player: The found player character.

Notes

  • Be careful if you check for extra conditions on the returned player: if any of those conditions fail, no other players will be considered.
  • If you want to start a dialog, use ProcGetClosestAvailableCharacterTo

See also

  • Helper ProcGetClosestAvailableCharacterTo

GetDistanceTo

Full definitions

  • query GetDistanceTo([in](GUIDSTRING)_Object1, [in](GUIDSTRING)_Object2, [out](REAL)_Dist)

Description

Calculates the distance between _Object1 and _Object2.

Return values

  • Success/Failure: Fails if if either _Object1 or _Object2 is in a container or in an inventory. Use ItemIsInInventory to check for this.
  • _Dist: The distance in metres.

Notes

  • /

See also

  • ItemIsInInventory

GetInventoryOwner

Full definitions

  • query GetInventoryOwner([in](ITEMGUID)_Item, [out](GUIDSTRING)_Owner)

Description

Returns the inventory/container that holds _Item in _Owner.

Return values

  • Success/Failure: Fails if _Item is not in anyone's inventory nor in a container.
  • _Owner: The character or item in whose inventory the item currently resides.

Notes

  • This call returns the outermost container. I.e., if a character has crate in their inventory, and the crate contains a pouch with the item, this call will return the character.

See also

  • ItemIsInInventory

GetRandomPositionInTrigger

Full definitions

  • query GetRandomPositionInTrigger([in](TRIGGERGUID)_Trigger, [out](REAL)_X, [out](REAL)_Y, [out](REAL)_Z)

Description

Returns a random position that is valid on the AI-grid inside _Trigger.

Return values

  • Success/Failure: Default return value.
  • _Trigger: A box trigger inside which the random position should be gotten.
  • _X, _Y, _Z: the coordinates of the random position

Notes

  • This routine will first get a random position in the trigger, and if this random position is not valid on the AI-grid, the coordinates will be snapped to a nearby valid position on the AI-grid.
  • This call does not work for polytriggers

See also

  • /

HasActiveStatus

Full definitions

  • query HasActiveStatus([in](GUIDSTRING)_Target, [in](STRING)_Status, [out](INTEGER)_Bool)

Description

Returns whether _Target is currently under the influence of _Status.

Return values

  • Success/Failure: Default return value.
  • _Bool: 0 if _Target is currently not under the influence of _Status, 1 if it is.

Notes

  • /

See also

  • HasAppliedStatus

HasAppliedStatus

Full definitions

  • query HasAppliedStatus([in](GUIDSTRING)_Target, [in](STRING)_Status, [out](INTEGER)_Bool)

Description

Returns whether _Status has been applied to _Target. _Target may or may not yet actually be under its influence.

Return values

  • Success/Failure: Default return value.
  • _Bool: 0 if _Status has not been applied to _Target, 1 if it has been.

Notes

  • In virtually all cases, use HasActiveStatus instead. The main purpose of this query is for crime reactions, and is only needed due to frame delays between code and Osiris.

See also

  • HasActiveStatus

IsSpeakerReserved

Full definitions

  • query IsSpeakerReserved([in](GUIDSTRING)_Speaker, [out](INTEGER)_success)

Description

Returns whether _Speaker is already in a dialog.

Return values

  • Success/Failure: Default return value.
  • _success: 0 if _Speaker is currently not in a dialog, 1 otherwise.

Notes

  • /

See also

  • DialogStartRequested
  • Proc_StartDialog

ItemIsInInventory

Full definitions

  • query ItemIsInInventory([in](ITEMGUID)_Item, [out](INTEGER)_Bool)

Description

Returns whether _Item is in an inventory. This includes both character and container inventories.

Return values

  • Success/Failure: Default return value.
  • _Bool: 0 if _Item is not in an inventory (as defined above), 1 if it is.

Notes

  • /

See also

  • GetInventoryOwner