This function is mainly used so after a server restart the PC doesn't need to load the starting area before being jumped to their persistent location.
Another example usage could be different starting locations for new characters depending on alignment.
Below is an example of setting a player's persistent location for each of their characters in the NWNX_ON_CLIENT_CONNECT_AFTER
event.
In this example make you would make sure to reset the persistent_locs_loaded
back to 0 for all players OnModuleLoad
.
Files | |
file | nwnx_player.nss |
file | nwnx_player_qbs.nss |
Helper script for quickbar management. | |
Classes | |
struct | NWNX_Player_QuickBarSlot |
A quickbar slot. More... | |
struct | NWNX_Player_JournalEntry |
A journal entry. More... | |
Functions | |
void | NWNX_Player_ForcePlaceableExamineWindow (object player, object placeable) |
Force display placeable examine window for player. More... | |
void | NWNX_Player_ForcePlaceableInventoryWindow (object player, object placeable) |
Force opens the target object's inventory for the player. More... | |
void | NWNX_Player_StartGuiTimingBar (object player, float seconds, string script="", int type=NWNX_PLAYER_TIMING_BAR_CUSTOM) |
Starts displaying a timing bar. More... | |
void | NWNX_Player_StopGuiTimingBar (object player, string script="") |
Stop displaying a timing bar. More... | |
void | NWNX_Player_SetAlwaysWalk (object player, int bWalk=TRUE) |
Sets whether the player should always walk when given movement commands. More... | |
struct NWNX_Player_QuickBarSlot | NWNX_Player_GetQuickBarSlot (object player, int slot) |
Gets the player's quickbar slot info. More... | |
void | NWNX_Player_SetQuickBarSlot (object player, int slot, struct NWNX_Player_QuickBarSlot qbs) |
Sets the player's quickbar slot info. More... | |
string | NWNX_Player_GetBicFileName (object player) |
Get the name of the .bic file associated with the player's character. More... | |
void | NWNX_Player_ShowVisualEffect (object player, int effectId, vector position, float scale=1.0f, vector translate=[], vector rotate=[]) |
Plays the VFX at the target position in current area for the given player only. More... | |
void | NWNX_Player_MusicBackgroundChangeDay (object player, int track) |
Changes the daytime music track for the given player only. More... | |
void | NWNX_Player_MusicBackgroundChangeNight (object player, int track) |
Changes the nighttime music track for the given player only. More... | |
void | NWNX_Player_MusicBackgroundStart (object player) |
Starts the background music for the given player only. More... | |
void | NWNX_Player_MusicBackgroundStop (object player) |
Stops the background music for the given player only. More... | |
void | NWNX_Player_MusicBattleChange (object player, int track) |
Changes the battle music track for the given player only. More... | |
void | NWNX_Player_MusicBattleStart (object player) |
Starts the battle music for the given player only. More... | |
void | NWNX_Player_MusicBattleStop (object player) |
Stops the battle music for the given player only. More... | |
void | NWNX_Player_PlaySound (object player, string sound, object target=OBJECT_INVALID) |
Play a sound at the location of target for the given player only. More... | |
void | NWNX_Player_SetPlaceableUsable (object player, object placeable, int usable) |
Toggle a placeable's usable flag for the given player only. More... | |
void | NWNX_Player_SetRestDuration (object player, int duration) |
Override player's rest duration. More... | |
void | NWNX_Player_ApplyInstantVisualEffectToObject (object player, object target, int visualeffect, float scale=1.0f, vector translate=[], vector rotate=[]) |
Apply visualeffect to target that only player can see. More... | |
void | NWNX_Player_UpdateCharacterSheet (object player) |
Refreshes the players character sheet. More... | |
void | NWNX_Player_OpenInventory (object player, object target, int open=TRUE) |
Allows player to open target's inventory. More... | |
string | NWNX_Player_GetAreaExplorationState (object player, object area) |
Get player's area exploration state. More... | |
void | NWNX_Player_SetAreaExplorationState (object player, object area, string str) |
Set player's area exploration state. More... | |
void | NWNX_Player_SetRestAnimation (object oPlayer, int nAnimation) |
Override player's rest animation. More... | |
void | NWNX_Player_SetObjectVisualTransformOverride (object oPlayer, object oObject, int nTransform, float fValue) |
Override a visual transform on the given object that only player will see. More... | |
void | NWNX_Player_ApplyLoopingVisualEffectToObject (object player, object target, int visualeffect) |
Apply a looping visualeffect to a target that only player can see. More... | |
void | NWNX_Player_SetPlaceableNameOverride (object player, object placeable, string name) |
Override the name of placeable for player only. More... | |
int | NWNX_Player_GetQuestCompleted (object player, string sQuestName) |
Gets whether a quest has been completed by a player. More... | |
void | NWNX_Player_SetPersistentLocation (string sCDKeyOrCommunityName, string sBicFileName, object oWP, int bFirstConnectOnly=TRUE) |
Place waypoints on module load representing where a PC should start. More... | |
void | NWNX_Player_UpdateItemName (object oPlayer, object oItem) |
Force an item name to be updated. More... | |
int | NWNX_Player_PossessCreature (object oPossessor, object oPossessed, int bMindImmune=TRUE, int bCreateDefaultQB=FALSE) |
Possesses a creature by temporarily making them a familiar. More... | |
int | NWNX_Player_GetPlatformId (object oPlayer) |
Returns the platform ID of the given player (NWNX_PLAYER_PLATFORM_*) More... | |
int | NWNX_Player_GetLanguage (object oPlayer) |
Returns the game language of the given player (uses NWNX_DIALOG_LANGUAGE_*) More... | |
void | NWNX_Player_SetResManOverride (object oPlayer, int nResType, string sOldResName, string sNewResName) |
Override sOldResName with sNewResName of nResType for oPlayer. More... | |
void | NWNX_Player_SetCustomToken (object oPlayer, int nCustomTokenNumber, string sTokenValue) |
Set nCustomTokenNumber to sTokenValue for oPlayer only. More... | |
void | NWNX_Player_SetCreatureNameOverride (object oPlayer, object oCreature, string sName) |
Override the name of creature for player only. More... | |
void | NWNX_Player_FloatingTextStringOnCreature (object oPlayer, object oCreature, string sText, int bChatWindow=TRUE) |
Display floaty text above oCreature for oPlayer only. More... | |
void | NWNX_Player_ToggleDM (object oPlayer, int bIsDM) |
Toggle oPlayer's PlayerDM status. More... | |
void | NWNX_Player_SetObjectMouseCursorOverride (object oPlayer, object oObject, int nCursor) |
Override the mouse cursor of oObject for oPlayer only. More... | |
void | NWNX_Player_SetObjectHiliteColorOverride (object oPlayer, object oObject, int nColor) |
Override the hilite color of oObject for oPlayer only. More... | |
void | NWNX_Player_RemoveEffectFromTURD (object oPlayer, string sEffectTag) |
Remove effects with sEffectTag from oPlayer's TURD. More... | |
void | NWNX_Player_SetSpawnLocation (object oPlayer, location locSpawn) |
Set the location oPlayer will spawn when logging in to the server. More... | |
void | NWNX_Player_SendDMAllCreatorLists (object oPlayer) |
Resends palettes to a DM. More... | |
int | NWNX_Player_AddCustomJournalEntry (object oPlayer, struct NWNX_Player_JournalEntry journalEntry, int nSilentUpdate=0) |
Give a custom journal entry to oPlayer. More... | |
struct NWNX_Player_JournalEntry | NWNX_Player_GetJournalEntry (object oPlayer, string questTag) |
Returns a struct containing a journal entry that can then be modified. More... | |
void | NWNX_Player_CloseStore (object oPlayer) |
Closes any store oPlayer may have open. More... | |
void | NWNX_Player_SetTlkOverride (object oPlayer, int nStrRef, string sOverride, int bRestoreGlobal=TRUE) |
Override nStrRef from the TlkTable with sOverride for oPlayer only. More... | |
void | NWNX_Player_ReloadTlk (object oPlayer) |
Make the player reload it's TlkTable. More... | |
void | NWNX_Player_UpdateWind (object oPlayer, vector vDirection, float fMagnitude, float fYaw, float fPitch) |
Update wind for oPlayer only. More... | |
void | NWNX_Player_UpdateSkyBox (object oPlayer, int nSkyBox) |
Update the SkyBox for oPlayer only. More... | |
void | NWNX_Player_UpdateFogColor (object oPlayer, int nSunFogColor, int nMoonFogColor) |
Update Sun and Moon Fog Color for oPlayer only. More... | |
void | NWNX_Player_UpdateFogAmount (object oPlayer, int nSunFogAmount, int nMoonFogAmount) |
Update Sun and Moon Fog Amount for oPlayer only. More... | |
object | NWNX_Player_GetGameObject (object oPlayer) |
Return's the currently-possessed game object of a player. More... | |
void | NWNX_Player_SetObjectUiDiscoveryMaskOverride (object oPlayer, object oObject, int nMask) |
Override the ui discovery mask of oObject for oPlayer only. More... | |
void | NWNX_Player_SendPartyInvite (object oPlayer, object oInviter, int bForceInvite=FALSE, int bHideDialog=FALSE) |
Send a party invite from oInviter to oPlayer. More... | |
object | NWNX_Player_GetTURD (object oPlayer) |
Get the TURD for oPlayer. More... | |
void | NWNX_Player_ReloadColorPalettes (object oPlayer) |
Reloads the color palettes for oPlayer. More... | |
struct NWNX_Player_QuickBarSlot | NWNX_Player_QBS_Empty (int type=NWNX_PLAYER_QBS_TYPE_EMPTY) |
Create an empty QBS of given type. More... | |
struct NWNX_Player_QuickBarSlot | NWNX_Player_QBS_UseItem (object oItem, int nPropertyID=0) |
Create a QBS for using an item. More... | |
struct NWNX_Player_QuickBarSlot | NWNX_Player_QBS_EquipItem (object oItem, object oSecondaryItem=OBJECT_INVALID) |
Create a QBS for equipping an item. More... | |
struct NWNX_Player_QuickBarSlot | NWNX_Player_QBS_CastSpell (int nSpell, int nClassIndex=0, int nMetamagic=METAMAGIC_NONE, int nDomainLevel=-1) |
Create a QBS for casting a spell. More... | |
struct NWNX_Player_QuickBarSlot | NWNX_Player_QBS_UseSkill (int nSkill) |
Create a QBS for using a skill. More... | |
struct NWNX_Player_QuickBarSlot | NWNX_Player_QBS_UseFeat (int nFeat) |
Create a QBS for using a feat. More... | |
struct NWNX_Player_QuickBarSlot | NWNX_Player_QBS_StartDialog () |
Create a QBS for starting a dialog. More... | |
struct NWNX_Player_QuickBarSlot | NWNX_Player_QBS_Attack () |
Create a QBS for attacking. More... | |
struct NWNX_Player_QuickBarSlot | NWNX_Player_QBS_Emote (int nEmote) |
Create a QBS for emoting. More... | |
struct NWNX_Player_QuickBarSlot | NWNX_Player_QBS_ToggleMode (int nMode) |
Create a QBS for toggling a mode. More... | |
struct NWNX_Player_QuickBarSlot | NWNX_Player_QBS_Examine () |
Create a QBS for examining. More... | |
struct NWNX_Player_QuickBarSlot | NWNX_Player_QBS_Barter () |
Create a QBS for bartering. More... | |
struct NWNX_Player_QuickBarSlot | NWNX_Player_QBS_QuickChat (int nCommand) |
Create a QBS for quickchat command. More... | |
struct NWNX_Player_QuickBarSlot | NWNX_Player_QBS_PossessFamiliar () |
Create a QBS for examining. More... | |
struct NWNX_Player_QuickBarSlot | NWNX_Player_QBS_UseSpecialAbility (int nSpell, int nCasterLevel) |
Create a QBS for casting a spell. More... | |
struct NWNX_Player_QuickBarSlot | NWNX_Player_QBS_Command (string sCommandLabel, string sCommandLine) |
Create a QBS for running a command. More... | |
void NWNX_Player_ForcePlaceableExamineWindow | ( | object | player, |
object | placeable | ||
) |
Force display placeable examine window for player.
player | The player object. |
placeable | The placeable object. |
Definition at line 459 of file nwnx_player.nss.
void NWNX_Player_ForcePlaceableInventoryWindow | ( | object | player, |
object | placeable | ||
) |
Force opens the target object's inventory for the player.
player | The player object. |
placeable | The placeable object. |
Definition at line 469 of file nwnx_player.nss.
void NWNX_Player_StartGuiTimingBar | ( | object | player, |
float | seconds, | ||
string | script = "" , |
||
int | type = NWNX_PLAYER_TIMING_BAR_CUSTOM |
||
) |
Starts displaying a timing bar.
player | The player object. |
seconds | The length of time the timing bar will complete. |
script | The script to run at the bar's completion. |
type | The Timing Bar Type |
Definition at line 502 of file nwnx_player.nss.
void NWNX_Player_StopGuiTimingBar | ( | object | player, |
string | script = "" |
||
) |
Stop displaying a timing bar.
player | The player object. |
script | The script to run when stopped. |
Definition at line 521 of file nwnx_player.nss.
void NWNX_Player_SetAlwaysWalk | ( | object | player, |
int | bWalk = TRUE |
||
) |
Sets whether the player should always walk when given movement commands.
player | The player object. |
bWalk | TRUE to set the player to always walk. |
Definition at line 526 of file nwnx_player.nss.
struct NWNX_Player_QuickBarSlot NWNX_Player_GetQuickBarSlot | ( | object | player, |
int | slot | ||
) |
Gets the player's quickbar slot info.
player | The player object. |
slot | Slot ID 0-35 |
Definition at line 536 of file nwnx_player.nss.
void NWNX_Player_SetQuickBarSlot | ( | object | player, |
int | slot, | ||
struct NWNX_Player_QuickBarSlot | qbs | ||
) |
Sets the player's quickbar slot info.
player | The player object. |
slot | Slot ID 0-35 |
qbs | An NWNX_Player_QuickBarSlot struct. |
Definition at line 562 of file nwnx_player.nss.
string NWNX_Player_GetBicFileName | ( | object | player | ) |
Get the name of the .bic file associated with the player's character.
player | The player object. |
Definition at line 585 of file nwnx_player.nss.
void NWNX_Player_ShowVisualEffect | ( | object | player, |
int | effectId, | ||
vector | position, | ||
float | scale = 1.0f , |
||
vector | translate = [] , |
||
vector | rotate = [] |
||
) |
Plays the VFX at the target position in current area for the given player only.
player | The player object. |
effectId | The effect id. |
position | The position to play the visual effect. |
scale | The scale of the effect |
translate | A translation vector to offset the position of the effect |
rotate | A rotation vector to rotate the effect |
Definition at line 594 of file nwnx_player.nss.
void NWNX_Player_MusicBackgroundChangeDay | ( | object | player, |
int | track | ||
) |
Changes the daytime music track for the given player only.
player | The player object. |
track | The track id to play. |
Definition at line 614 of file nwnx_player.nss.
void NWNX_Player_MusicBackgroundChangeNight | ( | object | player, |
int | track | ||
) |
Changes the nighttime music track for the given player only.
player | The player object. |
track | The track id to play. |
Definition at line 625 of file nwnx_player.nss.
void NWNX_Player_MusicBackgroundStart | ( | object | player | ) |
Starts the background music for the given player only.
player | The player object. |
Definition at line 636 of file nwnx_player.nss.
void NWNX_Player_MusicBackgroundStop | ( | object | player | ) |
Stops the background music for the given player only.
player | The player object. |
Definition at line 646 of file nwnx_player.nss.
void NWNX_Player_MusicBattleChange | ( | object | player, |
int | track | ||
) |
Changes the battle music track for the given player only.
player | The player object. |
track | The track id to play. |
Definition at line 656 of file nwnx_player.nss.
void NWNX_Player_MusicBattleStart | ( | object | player | ) |
Starts the battle music for the given player only.
player | The player object. |
Definition at line 666 of file nwnx_player.nss.
void NWNX_Player_MusicBattleStop | ( | object | player | ) |
Stops the battle music for the given player only.
player | The player object. |
Definition at line 676 of file nwnx_player.nss.
void NWNX_Player_PlaySound | ( | object | player, |
string | sound, | ||
object | target = OBJECT_INVALID |
||
) |
Play a sound at the location of target for the given player only.
player | The player object. |
sound | The sound resref. |
target | The target object for the sound to originate. If target OBJECT_INVALID the sound will play at the location of the player. |
Definition at line 686 of file nwnx_player.nss.
void NWNX_Player_SetPlaceableUsable | ( | object | player, |
object | placeable, | ||
int | usable | ||
) |
Toggle a placeable's usable flag for the given player only.
player | The player object. |
placeable | The placeable object. |
usable | TRUE for usable. |
Definition at line 697 of file nwnx_player.nss.
void NWNX_Player_SetRestDuration | ( | object | player, |
int | duration | ||
) |
Override player's rest duration.
player | The player object. |
duration | The duration of rest in milliseconds, 1000 = 1 second. Minimum duration of 10ms. -1 clears the override. |
Definition at line 708 of file nwnx_player.nss.
void NWNX_Player_ApplyInstantVisualEffectToObject | ( | object | player, |
object | target, | ||
int | visualeffect, | ||
float | scale = 1.0f , |
||
vector | translate = [] , |
||
vector | rotate = [] |
||
) |
Apply visualeffect to target that only player can see.
player | The player object. |
target | The target object to play the effect upon. |
visualeffect | The visual effect id. |
scale | The scale of the effect |
translate | A translation vector to offset the position of the effect |
rotate | A rotation vector to rotate the effect |
Definition at line 718 of file nwnx_player.nss.
void NWNX_Player_UpdateCharacterSheet | ( | object | player | ) |
Refreshes the players character sheet.
player | The player object. |
Definition at line 736 of file nwnx_player.nss.
void NWNX_Player_OpenInventory | ( | object | player, |
object | target, | ||
int | open = TRUE |
||
) |
Allows player to open target's inventory.
player | The player object. |
target | The target object, must be a creature or another player. |
open | TRUE to open. |
Definition at line 745 of file nwnx_player.nss.
string NWNX_Player_GetAreaExplorationState | ( | object | player, |
object | area | ||
) |
Get player's area exploration state.
player | The player object. |
area | The area object. |
Definition at line 756 of file nwnx_player.nss.
void NWNX_Player_SetAreaExplorationState | ( | object | player, |
object | area, | ||
string | str | ||
) |
Set player's area exploration state.
player | The player object. |
area | The area object. |
str | An encoded string obtained with NWNX_Player_GetAreaExplorationState() |
Definition at line 767 of file nwnx_player.nss.
void NWNX_Player_SetRestAnimation | ( | object | oPlayer, |
int | nAnimation | ||
) |
Override player's rest animation.
oPlayer | The player object. |
nAnimation | The NWNX animation id. This does not take ANIMATION_LOOPING_* or ANIMATION_FIREFORGET_* constants. Instead use NWNX_Consts_TranslateNWScriptAnimation() to get the NWNX equivalent. -1 to clear the override. |
Definition at line 778 of file nwnx_player.nss.
void NWNX_Player_SetObjectVisualTransformOverride | ( | object | oPlayer, |
object | oObject, | ||
int | nTransform, | ||
float | fValue | ||
) |
Override a visual transform on the given object that only player will see.
oPlayer | The player object. |
oObject | The target object. Can be any valid Creature, Placeable, Item or Door. |
nTransform | One of OBJECT_VISUAL_TRANSFORM_* or -1 to remove the override. |
fValue | Depends on the transformation to apply. |
Definition at line 788 of file nwnx_player.nss.
void NWNX_Player_ApplyLoopingVisualEffectToObject | ( | object | player, |
object | target, | ||
int | visualeffect | ||
) |
Apply a looping visualeffect to a target that only player can see.
player | The player object. |
target | The target object. |
visualeffect | A VFX_DUR_*. Calling again will remove an applied effect. -1 to remove all effects |
Definition at line 800 of file nwnx_player.nss.
void NWNX_Player_SetPlaceableNameOverride | ( | object | player, |
object | placeable, | ||
string | name | ||
) |
Override the name of placeable for player only.
player | The player object. |
placeable | The placeable object. |
name | The name for the placeable for this player, "" to clear the override. |
Definition at line 811 of file nwnx_player.nss.
int NWNX_Player_GetQuestCompleted | ( | object | player, |
string | sQuestName | ||
) |
Gets whether a quest has been completed by a player.
player | The player object. |
sQuestName | The name identifier of the quest from the Journal Editor. |
Definition at line 822 of file nwnx_player.nss.
void NWNX_Player_SetPersistentLocation | ( | string | sCDKeyOrCommunityName, |
string | sBicFileName, | ||
object | oWP, | ||
int | bFirstConnectOnly = TRUE |
||
) |
Place waypoints on module load representing where a PC should start.
This will require storing the PC's cd key or community name (depending on how you store in your vault) and bic_filename along with routinely updating their location in some persistent method like OnRest, OnAreaEnter and OnClentExit.
sCDKeyOrCommunityName | The Public CD Key or Community Name of the player, this will depend on your vault type. |
sBicFileName | The filename for the character. Retrieved with NWNX_Player_GetBicFileName(). |
oWP | The waypoint object to place where the PC should start. |
bFirstConnectOnly | Set to FALSE if you would like the PC to go to this location every time they login instead of just every server restart. |
Definition at line 833 of file nwnx_player.nss.
void NWNX_Player_UpdateItemName | ( | object | oPlayer, |
object | oItem | ||
) |
Force an item name to be updated.
oPlayer | The player object. |
oItem | The item object. |
Definition at line 845 of file nwnx_player.nss.
int NWNX_Player_PossessCreature | ( | object | oPossessor, |
object | oPossessed, | ||
int | bMindImmune = TRUE , |
||
int | bCreateDefaultQB = FALSE |
||
) |
Possesses a creature by temporarily making them a familiar.
This command allows a PC to possess an NPC by temporarily adding them as a familiar. It will work if the player already has an existing familiar. The creatures must be in the same area. Unpossession can be done with the regular UnpossessFamiliar commands.
oPossessor | The possessor player object. |
oPossessed | The possessed creature object. Only works on NPCs. |
bMindImmune | If FALSE will remove the mind immunity effect on the possessor. |
bCreateDefaultQB | If TRUE will populate the quick bar with default buttons. |
Definition at line 855 of file nwnx_player.nss.
int NWNX_Player_GetPlatformId | ( | object | oPlayer | ) |
Returns the platform ID of the given player (NWNX_PLAYER_PLATFORM_*)
oPlayer | The player object. |
Definition at line 868 of file nwnx_player.nss.
int NWNX_Player_GetLanguage | ( | object | oPlayer | ) |
Returns the game language of the given player (uses NWNX_DIALOG_LANGUAGE_*)
This function returns the ID of the game language displayed to the player. Uses the same constants as nwnx_dialog.
oPlayer | The player object. |
Definition at line 878 of file nwnx_player.nss.
void NWNX_Player_SetResManOverride | ( | object | oPlayer, |
int | nResType, | ||
string | sOldResName, | ||
string | sNewResName | ||
) |
Override sOldResName with sNewResName of nResType for oPlayer.
oPlayer | The player object. |
nResType | The res type, see nwnx_util.nss for constants. |
sOldResName | The old res name, 16 characters or less. |
sNewResName | The new res name or "" to clear a previous override, 16 characters or less. |
Definition at line 888 of file nwnx_player.nss.
void NWNX_Player_SetCustomToken | ( | object | oPlayer, |
int | nCustomTokenNumber, | ||
string | sTokenValue | ||
) |
Set nCustomTokenNumber to sTokenValue for oPlayer only.
oPlayer | The player object. |
nCustomTokenNumber | The token number. |
sTokenValue | The token text. |
Definition at line 900 of file nwnx_player.nss.
void NWNX_Player_SetCreatureNameOverride | ( | object | oPlayer, |
object | oCreature, | ||
string | sName | ||
) |
Override the name of creature for player only.
oPlayer | The player object. |
oCreature | The creature object. |
sName | The name for the creature for this player, "" to clear the override. |
Definition at line 911 of file nwnx_player.nss.
void NWNX_Player_FloatingTextStringOnCreature | ( | object | oPlayer, |
object | oCreature, | ||
string | sText, | ||
int | bChatWindow = TRUE |
||
) |
Display floaty text above oCreature for oPlayer only.
oPlayer | The player to display the text to. |
oCreature | The creature to display the text above. |
sText | The text to display. |
bChatWindow | If TRUE, sText will be displayed in oPlayer's chat window. |
Definition at line 922 of file nwnx_player.nss.
void NWNX_Player_ToggleDM | ( | object | oPlayer, |
int | bIsDM | ||
) |
Toggle oPlayer's PlayerDM status.
oPlayer | The player. |
bIsDM | TRUE to toggle dm mode on, FALSE for off. |
Definition at line 934 of file nwnx_player.nss.
void NWNX_Player_SetObjectMouseCursorOverride | ( | object | oPlayer, |
object | oObject, | ||
int | nCursor | ||
) |
Override the mouse cursor of oObject for oPlayer only.
oPlayer | The player object. |
oObject | The object. |
nCursor | The cursor, one of MOUSECURSOR_*. -1 to clear the override. |
Definition at line 944 of file nwnx_player.nss.
void NWNX_Player_SetObjectHiliteColorOverride | ( | object | oPlayer, |
object | oObject, | ||
int | nColor | ||
) |
Override the hilite color of oObject for oPlayer only.
oPlayer | The player object. |
oObject | The object. |
nColor | The color in 0xRRGGBB format, -1 to clear the override. |
Definition at line 955 of file nwnx_player.nss.
void NWNX_Player_RemoveEffectFromTURD | ( | object | oPlayer, |
string | sEffectTag | ||
) |
Remove effects with sEffectTag from oPlayer's TURD.
oPlayer | The player object. |
sEffectTag | The effect tag. |
Definition at line 966 of file nwnx_player.nss.
void NWNX_Player_SetSpawnLocation | ( | object | oPlayer, |
location | locSpawn | ||
) |
Set the location oPlayer will spawn when logging in to the server.
oPlayer | The player object. |
locSpawn | The location. |
Definition at line 976 of file nwnx_player.nss.
void NWNX_Player_SendDMAllCreatorLists | ( | object | oPlayer | ) |
Resends palettes to a DM.
oPlayer | - the DM to send them to. |
Definition at line 992 of file nwnx_player.nss.
int NWNX_Player_AddCustomJournalEntry | ( | object | oPlayer, |
struct NWNX_Player_JournalEntry | journalEntry, | ||
int | nSilentUpdate = 0 |
||
) |
Give a custom journal entry to oPlayer.
oPlayer | The player object. |
journalEntry | The journal entry in the form of a struct. |
nSilentUpdate | 0 = Notify player via sound effects and feedback message, 1 = Suppress sound effects and feedback message |
Definition at line 999 of file nwnx_player.nss.
struct NWNX_Player_JournalEntry NWNX_Player_GetJournalEntry | ( | object | oPlayer, |
string | questTag | ||
) |
Returns a struct containing a journal entry that can then be modified.
oPlayer | The player object. |
questTag | The quest tag you wish to get the journal entry for. |
Definition at line 1018 of file nwnx_player.nss.
void NWNX_Player_CloseStore | ( | object | oPlayer | ) |
Closes any store oPlayer may have open.
oPlayer | The player object. |
Definition at line 1044 of file nwnx_player.nss.
void NWNX_Player_SetTlkOverride | ( | object | oPlayer, |
int | nStrRef, | ||
string | sOverride, | ||
int | bRestoreGlobal = TRUE |
||
) |
Override nStrRef from the TlkTable with sOverride for oPlayer only.
oPlayer | The player. |
nStrRef | The StrRef. |
sOverride | The new value for nStrRef or "" to remove the override. |
bRestoreGlobal | If TRUE, when removing a personal override it will attempt to restore the global override if it exists. |
Definition at line 1052 of file nwnx_player.nss.
void NWNX_Player_ReloadTlk | ( | object | oPlayer | ) |
Make the player reload it's TlkTable.
oPlayer | The player. |
Definition at line 1063 of file nwnx_player.nss.
void NWNX_Player_UpdateWind | ( | object | oPlayer, |
vector | vDirection, | ||
float | fMagnitude, | ||
float | fYaw, | ||
float | fPitch | ||
) |
Update wind for oPlayer only.
oPlayer | The player. |
vDirection | The Wind's direction. |
fMagnitude | The Wind's magnitude. |
fYaw | The Wind's yaw. |
fPitch | The Wind's pitch. |
Definition at line 1071 of file nwnx_player.nss.
void NWNX_Player_UpdateSkyBox | ( | object | oPlayer, |
int | nSkyBox | ||
) |
Update the SkyBox for oPlayer only.
oPlayer | The player. |
nSkyBox | The Skybox ID. |
Definition at line 1085 of file nwnx_player.nss.
void NWNX_Player_UpdateFogColor | ( | object | oPlayer, |
int | nSunFogColor, | ||
int | nMoonFogColor | ||
) |
Update Sun and Moon Fog Color for oPlayer only.
oPlayer | The player. |
nSunFogColor | The int value of Sun Fog color. |
nMoonFogColor | The int value of Moon Fog color. |
Definition at line 1094 of file nwnx_player.nss.
void NWNX_Player_UpdateFogAmount | ( | object | oPlayer, |
int | nSunFogAmount, | ||
int | nMoonFogAmount | ||
) |
Update Sun and Moon Fog Amount for oPlayer only.
oPlayer | The player. |
nSunFogAmount | The int value of Sun Fog amount (range 0-255). |
nMoonFogAmount | The int value of Moon Fog amount (range 0-255). |
Definition at line 1104 of file nwnx_player.nss.
object NWNX_Player_GetGameObject | ( | object | oPlayer | ) |
Return's the currently-possessed game object of a player.
oPlayer | The player object (e.g. from GetFirst/NextPC()). |
Definition at line 1114 of file nwnx_player.nss.
void NWNX_Player_SetObjectUiDiscoveryMaskOverride | ( | object | oPlayer, |
object | oObject, | ||
int | nMask | ||
) |
Override the ui discovery mask of oObject for oPlayer only.
oPlayer | The player object. |
oObject | The target object. |
nMask | A mask of OBJECT_UI_DISCOVERY_*, or -1 to clear the override |
Definition at line 1123 of file nwnx_player.nss.
void NWNX_Player_SendPartyInvite | ( | object | oPlayer, |
object | oInviter, | ||
int | bForceInvite = FALSE , |
||
int | bHideDialog = FALSE |
||
) |
Send a party invite from oInviter to oPlayer.
oPlayer | The player to invite |
oInviter | The one inviting the player |
bForceInvite | TRUE: Sends the invite even if the target ignores invites |
bHideDialog | TRUE: Does not show the party invitation dialog |
Definition at line 1134 of file nwnx_player.nss.
object NWNX_Player_GetTURD | ( | object | oPlayer | ) |
Get the TURD for oPlayer.
oPlayer | The offline player to get the TURD from |
Definition at line 1146 of file nwnx_player.nss.
void NWNX_Player_ReloadColorPalettes | ( | object | oPlayer | ) |
Reloads the color palettes for oPlayer.
oPlayer | The player to reload the color palette for |
Definition at line 1156 of file nwnx_player.nss.
struct NWNX_Player_QuickBarSlot NWNX_Player_QBS_Empty | ( | int | type = NWNX_PLAYER_QBS_TYPE_EMPTY | ) |
Create an empty QBS of given type.
Definition at line 66 of file nwnx_player_qbs.nss.
struct NWNX_Player_QuickBarSlot NWNX_Player_QBS_UseItem | ( | object | oItem, |
int | nPropertyID = 0 |
||
) |
Create a QBS for using an item.
Definition at line 88 of file nwnx_player_qbs.nss.
struct NWNX_Player_QuickBarSlot NWNX_Player_QBS_EquipItem | ( | object | oItem, |
object | oSecondaryItem = OBJECT_INVALID |
||
) |
Create a QBS for equipping an item.
Definition at line 98 of file nwnx_player_qbs.nss.
struct NWNX_Player_QuickBarSlot NWNX_Player_QBS_CastSpell | ( | int | nSpell, |
int | nClassIndex = 0 , |
||
int | nMetamagic = METAMAGIC_NONE , |
||
int | nDomainLevel = -1 |
||
) |
Create a QBS for casting a spell.
Definition at line 108 of file nwnx_player_qbs.nss.
struct NWNX_Player_QuickBarSlot NWNX_Player_QBS_UseSkill | ( | int | nSkill | ) |
Create a QBS for using a skill.
Definition at line 120 of file nwnx_player_qbs.nss.
struct NWNX_Player_QuickBarSlot NWNX_Player_QBS_UseFeat | ( | int | nFeat | ) |
Create a QBS for using a feat.
Definition at line 129 of file nwnx_player_qbs.nss.
struct NWNX_Player_QuickBarSlot NWNX_Player_QBS_StartDialog | ( | ) |
Create a QBS for starting a dialog.
Definition at line 138 of file nwnx_player_qbs.nss.
struct NWNX_Player_QuickBarSlot NWNX_Player_QBS_Attack | ( | ) |
Create a QBS for attacking.
Definition at line 143 of file nwnx_player_qbs.nss.
struct NWNX_Player_QuickBarSlot NWNX_Player_QBS_Emote | ( | int | nEmote | ) |
Create a QBS for emoting.
Definition at line 148 of file nwnx_player_qbs.nss.
struct NWNX_Player_QuickBarSlot NWNX_Player_QBS_ToggleMode | ( | int | nMode | ) |
Create a QBS for toggling a mode.
Definition at line 157 of file nwnx_player_qbs.nss.
struct NWNX_Player_QuickBarSlot NWNX_Player_QBS_Examine | ( | ) |
Create a QBS for examining.
Definition at line 166 of file nwnx_player_qbs.nss.
struct NWNX_Player_QuickBarSlot NWNX_Player_QBS_Barter | ( | ) |
Create a QBS for bartering.
Definition at line 171 of file nwnx_player_qbs.nss.
struct NWNX_Player_QuickBarSlot NWNX_Player_QBS_QuickChat | ( | int | nCommand | ) |
Create a QBS for quickchat command.
Definition at line 176 of file nwnx_player_qbs.nss.
struct NWNX_Player_QuickBarSlot NWNX_Player_QBS_PossessFamiliar | ( | ) |
Create a QBS for examining.
Definition at line 185 of file nwnx_player_qbs.nss.
struct NWNX_Player_QuickBarSlot NWNX_Player_QBS_UseSpecialAbility | ( | int | nSpell, |
int | nCasterLevel | ||
) |
Create a QBS for casting a spell.
Definition at line 190 of file nwnx_player_qbs.nss.
struct NWNX_Player_QuickBarSlot NWNX_Player_QBS_Command | ( | string | sCommandLabel, |
string | sCommandLine | ||
) |
Create a QBS for running a command.
Definition at line 199 of file nwnx_player_qbs.nss.
const int NWNX_PLAYER_TIMING_BAR_TRAP_FLAG = 1 |
Definition at line 48 of file nwnx_player.nss.
const int NWNX_PLAYER_TIMING_BAR_TRAP_RECOVER = 2 |
Definition at line 49 of file nwnx_player.nss.
const int NWNX_PLAYER_TIMING_BAR_TRAP_DISARM = 3 |
Definition at line 50 of file nwnx_player.nss.
const int NWNX_PLAYER_TIMING_BAR_TRAP_EXAMINE = 4 |
Definition at line 51 of file nwnx_player.nss.
const int NWNX_PLAYER_TIMING_BAR_TRAP_SET = 5 |
Definition at line 52 of file nwnx_player.nss.
const int NWNX_PLAYER_TIMING_BAR_REST = 6 |
Definition at line 53 of file nwnx_player.nss.
const int NWNX_PLAYER_TIMING_BAR_UNLOCK = 7 |
Definition at line 54 of file nwnx_player.nss.
const int NWNX_PLAYER_TIMING_BAR_LOCK = 8 |
Definition at line 55 of file nwnx_player.nss.
const int NWNX_PLAYER_TIMING_BAR_CUSTOM = 10 |
Definition at line 56 of file nwnx_player.nss.
const int NWNX_PLAYER_PLATFORM_INVALID = 0 |
Definition at line 62 of file nwnx_player.nss.
const int NWNX_PLAYER_PLATFORM_WINDOWS_X86 = 1 |
Definition at line 63 of file nwnx_player.nss.
const int NWNX_PLAYER_PLATFORM_WINDOWS_X64 = 2 |
Definition at line 64 of file nwnx_player.nss.
const int NWNX_PLAYER_PLATFORM_LINUX_X86 = 10 |
Definition at line 65 of file nwnx_player.nss.
const int NWNX_PLAYER_PLATFORM_LINUX_X64 = 11 |
Definition at line 66 of file nwnx_player.nss.
const int NWNX_PLAYER_PLATFORM_LINUX_ARM32 = 12 |
Definition at line 67 of file nwnx_player.nss.
const int NWNX_PLAYER_PLATFORM_LINUX_ARM64 = 13 |
Definition at line 68 of file nwnx_player.nss.
const int NWNX_PLAYER_PLATFORM_MAC_X86 = 20 |
Definition at line 69 of file nwnx_player.nss.
const int NWNX_PLAYER_PLATFORM_MAC_X64 = 21 |
Definition at line 70 of file nwnx_player.nss.
const int NWNX_PLAYER_PLATFORM_IOS = 30 |
Definition at line 71 of file nwnx_player.nss.
const int NWNX_PLAYER_PLATFORM_ANDROID_ARM32 = 40 |
Definition at line 72 of file nwnx_player.nss.
const int NWNX_PLAYER_PLATFORM_ANDROID_ARM64 = 41 |
Definition at line 73 of file nwnx_player.nss.
const int NWNX_PLAYER_PLATFORM_ANDROID_X64 = 42 |
Definition at line 74 of file nwnx_player.nss.
const int NWNX_PLAYER_PLATFORM_NINTENDO_SWITCH = 50 |
Definition at line 75 of file nwnx_player.nss.
const int NWNX_PLAYER_PLATFORM_MICROSOFT_XBOXONE = 60 |
Definition at line 76 of file nwnx_player.nss.
const int NWNX_PLAYER_PLATFORM_SONY_PS4 = 70 |
Definition at line 77 of file nwnx_player.nss.
const int NWNX_PLAYER_QBS_TYPE_EMPTY = 0 |
Definition at line 10 of file nwnx_player_qbs.nss.
const int NWNX_PLAYER_QBS_TYPE_ITEM = 1 |
Definition at line 11 of file nwnx_player_qbs.nss.
const int NWNX_PLAYER_QBS_TYPE_SPELL = 2 |
Definition at line 12 of file nwnx_player_qbs.nss.
const int NWNX_PLAYER_QBS_TYPE_SKILL = 3 |
Definition at line 13 of file nwnx_player_qbs.nss.
const int NWNX_PLAYER_QBS_TYPE_FEAT = 4 |
Definition at line 14 of file nwnx_player_qbs.nss.
const int NWNX_PLAYER_QBS_TYPE_DIALOG = 6 |
Definition at line 15 of file nwnx_player_qbs.nss.
const int NWNX_PLAYER_QBS_TYPE_ATTACK = 7 |
Definition at line 16 of file nwnx_player_qbs.nss.
const int NWNX_PLAYER_QBS_TYPE_EMOTE = 8 |
Definition at line 17 of file nwnx_player_qbs.nss.
const int NWNX_PLAYER_QBS_TYPE_ITEM_PROPERTY_CASTSPELL = 9 |
Definition at line 18 of file nwnx_player_qbs.nss.
const int NWNX_PLAYER_QBS_TYPE_MODE_TOGGLE = 10 |
Definition at line 19 of file nwnx_player_qbs.nss.
const int NWNX_PLAYER_QBS_TYPE_COMMAND = 18 |
Definition at line 20 of file nwnx_player_qbs.nss.
const int NWNX_PLAYER_QBS_TYPE_POSSESS_FAMILIAR = 38 |
Definition at line 21 of file nwnx_player_qbs.nss.
const int NWNX_PLAYER_QBS_TYPE_ASSOCIATE_COMMAND = 39 |
Definition at line 22 of file nwnx_player_qbs.nss.
const int NWNX_PLAYER_QBS_TYPE_EXAMINE = 40 |
Definition at line 23 of file nwnx_player_qbs.nss.
const int NWNX_PLAYER_QBS_TYPE_BARTER = 41 |
Definition at line 24 of file nwnx_player_qbs.nss.
const int NWNX_PLAYER_QBS_TYPE_QUICK_CHAT = 42 |
Definition at line 25 of file nwnx_player_qbs.nss.
const int NWNX_PLAYER_QBS_TYPE_CANCELPOLYMORPH = 43 |
Definition at line 26 of file nwnx_player_qbs.nss.
const int NWNX_PLAYER_QBS_TYPE_SPELLLIKEABILITY = 44 |
Definition at line 27 of file nwnx_player_qbs.nss.