Go to the source code of this file.
Classes | |
struct | NWNX_Creature_MemorisedSpell |
A memorised spell structure. More... | |
Functions | |
int | NWNX_Creature_GetMemorisedSpellCountByLevel (object creature, int class, int level) |
Gets the count of memorised spells for a creature's class at a level. More... | |
struct NWNX_Creature_MemorisedSpell | NWNX_Creature_GetMemorisedSpell (object creature, int class, int level, int index) |
Gets the memorised spell at a class level's index. More... | |
void | NWNX_Creature_SetMemorisedSpell (object creature, int class, int level, int index, struct NWNX_Creature_MemorisedSpell spell) |
Sets the memorised spell at a class level's index. More... | |
int | NWNX_Creature_GetKnownSpellCount (object creature, int class, int level) |
Gets the known spell count (innate casting) at a class level. More... | |
int | NWNX_Creature_GetKnownSpell (object creature, int class, int level, int index) |
Gets the known spell at a class level's index. More... | |
void | NWNX_Creature_ClearMemorisedKnownSpells (object creature, int class, int spellId) |
Clear a specific spell from the creature's spellbook for class. More... | |
void | NWNX_Creature_ClearMemorisedSpell (object creature, int class, int level, int index) |
Clear the memorised spell of the creature for the class, level and index. More... | |
int | NWNX_Creature_GetSoundset (object creature) |
Get the soundset index for creature. More... | |
void | NWNX_Creature_SetSoundset (object creature, int soundset) |
Set the soundset index for creature. More... | |
void | NWNX_Creature_SetGender (object creature, int gender) |
Sets the creature gender. More... | |
void | NWNX_Creature_RestoreSpells (object creature, int level=-1) |
Restore all creature spells per day for given level. More... | |
int | NWNX_Creature_GetDomain (object creature, int class, int index) |
Gets one of creature's domains. More... | |
int | NWNX_Creature_GetSpecialization (object creature, int class) |
Gets the creature's specialist school. More... | |
int | NWNX_Creature_GetSpellUsesLeft (object oCreature, int nSpellID, int nMultiClass, int nDomainLevel=0, int nMetaMagic=METAMAGIC_NONE) |
Get the number of uses left of a spell. More... | |
int | NWNX_Creature_GetMemorizedSpellReadyCount (object oCreature, int nSpellID, int nMultiClass, int nMetaMagic=METAMAGIC_NONE) |
Get the number of memorized ready spells by spellid. More... | |
void | NWNX_Creature_SetEffectIconFlashing (object oCreature, int nIconId, int bFlashing) |
Set whether an effect icon is flashing or not. More... | |
effect | NWNX_Effect_SetEffectExpiredScript (effect e, string script, string data="") |
Set a script with optional data that runs when an effect expires. More... | |
string | NWNX_Effect_GetEffectExpiredData () |
Get the data set with NWNX_Effect_SetEffectExpiredScript() More... | |
object | NWNX_Effect_GetEffectExpiredCreator () |
Get the effect creator. More... | |
effect | NWNX_Effect_AccessorizeVisualEffect (effect eEffect) |
Accessorize an EffectVisualEffect(), making it undispellable and unable to be removed by resting or death. More... | |
object | NWNX_Object_StringToObject (string id) |
Convert an object id to the actual object. More... | |
int | NWNX_Object_CheckFit (object obj, int baseitem) |
Check if an item can fit in an object's inventory. More... | |
void | NWNX_Object_AddIconEffect (object obj, int nIcon, float fDuration=0.0) |
Add an effect to an object that displays an icon and has no other effect. More... | |
void | NWNX_Object_RemoveIconEffect (object obj, int nIcon) |
Remove an icon effect from an object that was added by the NWNX_Object_AddIconEffect() function. More... | |
void | NWNX_Object_SetFacing (object oObject, float fDirection) |
Cause oObject to face fDirection. More... | |
int | NWNX_Regex_Search (string str, string regex) |
string | NWNX_Regex_Replace (string str, string regex, string replace="", int firstOnly=FALSE) |
Replaces any matches of the regular expression with a string. More... | |
json | NWNX_Regex_Match (string str, string regex) |
Returns all matches in a string that match the regular expression. More... | |
int | NWNX_Util_IsValidResRef (string resref, int type=RESTYPE_UTC) |
Determines if the supplied resref exists. More... | |
int | NWNX_Util_Get2DARowCount (string str) |
Gets the row count for a 2da. More... | |
string | NWNX_Util_GetNSSContents (string sScriptName, int nMaxLength=-1) |
Gets the contents of a .nss script file as a string. More... | |
int | NWNX_Util_GetServerTicksPerSecond () |
Get the ticks per second of the server. More... | |
Variables | |
Cleric Domains | |
const int | NWNX_CREATURE_CLERIC_DOMAIN_AIR = 0 |
const int | NWNX_CREATURE_CLERIC_DOMAIN_ANIMAL = 1 |
const int | NWNX_CREATURE_CLERIC_DOMAIN_DEATH = 3 |
const int | NWNX_CREATURE_CLERIC_DOMAIN_DESTRUCTION = 4 |
const int | NWNX_CREATURE_CLERIC_DOMAIN_EARTH = 5 |
const int | NWNX_CREATURE_CLERIC_DOMAIN_EVIL = 6 |
const int | NWNX_CREATURE_CLERIC_DOMAIN_FIRE = 7 |
const int | NWNX_CREATURE_CLERIC_DOMAIN_GOOD = 8 |
const int | NWNX_CREATURE_CLERIC_DOMAIN_HEALING = 9 |
const int | NWNX_CREATURE_CLERIC_DOMAIN_KNOWLEDGE = 10 |
const int | NWNX_CREATURE_CLERIC_DOMAIN_MAGIC = 13 |
const int | NWNX_CREATURE_CLERIC_DOMAIN_PLANT = 14 |
const int | NWNX_CREATURE_CLERIC_DOMAIN_PROTECTION = 15 |
const int | NWNX_CREATURE_CLERIC_DOMAIN_STRENGTH = 16 |
const int | NWNX_CREATURE_CLERIC_DOMAIN_SUN = 17 |
const int | NWNX_CREATURE_CLERIC_DOMAIN_TRAVEL = 18 |
const int | NWNX_CREATURE_CLERIC_DOMAIN_TRICKERY = 19 |
const int | NWNX_CREATURE_CLERIC_DOMAIN_WAR = 20 |
const int | NWNX_CREATURE_CLERIC_DOMAIN_WATER = 21 |
int NWNX_Creature_GetMemorisedSpellCountByLevel | ( | object | creature, |
int | class, | ||
int | level | ||
) |
Gets the count of memorised spells for a creature's class at a level.
creature | The creature object. |
class | The class id from classes.2da. (Not class index 0-2) |
level | The spell level. |
Definition at line 151 of file nwnx_deprecated.nss.
struct NWNX_Creature_MemorisedSpell NWNX_Creature_GetMemorisedSpell | ( | object | creature, |
int | class, | ||
int | level, | ||
int | index | ||
) |
Gets the memorised spell at a class level's index.
creature | The creature object. |
class | The class id from classes.2da. (Not class index 0-2) |
level | The spell level. |
index | The index. Index bounds: 0 <= index < NWNX_Creature_GetMemorisedSpellCountByLevel(). |
Definition at line 157 of file nwnx_deprecated.nss.
void NWNX_Creature_SetMemorisedSpell | ( | object | creature, |
int | class, | ||
int | level, | ||
int | index, | ||
struct NWNX_Creature_MemorisedSpell | spell | ||
) |
Sets the memorised spell at a class level's index.
creature | The creature object. |
class | The class id from classes.2da. (Not class index 0-2) |
level | The spell level. |
index | The index. Index bounds: 0 <= index < NWNX_Creature_GetMemorisedSpellCountByLevel(). |
spell | An NWNX_Creature_MemorisedSpell() struct. |
Definition at line 168 of file nwnx_deprecated.nss.
int NWNX_Creature_GetKnownSpellCount | ( | object | creature, |
int | class, | ||
int | level | ||
) |
Gets the known spell count (innate casting) at a class level.
creature | The creature object. |
class | The class id from classes.2da. (Not class index 0-2) |
level | The spell level. |
Definition at line 174 of file nwnx_deprecated.nss.
int NWNX_Creature_GetKnownSpell | ( | object | creature, |
int | class, | ||
int | level, | ||
int | index | ||
) |
Gets the known spell at a class level's index.
creature | The creature object. |
class | The class id from classes.2da. (Not class index 0-2) |
level | The spell level. |
index | The index. Index bounds: 0 <= index < NWNX_Creature_GetKnownSpellCount(). |
Definition at line 180 of file nwnx_deprecated.nss.
void NWNX_Creature_ClearMemorisedKnownSpells | ( | object | creature, |
int | class, | ||
int | spellId | ||
) |
Clear a specific spell from the creature's spellbook for class.
creature | The creature object. |
class | The class id from classes.2da. (Not class index 0-2) |
spellId | The spell to clear. |
Definition at line 186 of file nwnx_deprecated.nss.
void NWNX_Creature_ClearMemorisedSpell | ( | object | creature, |
int | class, | ||
int | level, | ||
int | index | ||
) |
Clear the memorised spell of the creature for the class, level and index.
creature | The creature object. |
class | The class id from classes.2da. (Not class index 0-2) |
level | The spell level. |
index | The index. Index bounds: 0 <= index < NWNX_Creature_GetMemorisedSpellCountByLevel(). |
Definition at line 192 of file nwnx_deprecated.nss.
int NWNX_Creature_GetSoundset | ( | object | creature | ) |
Get the soundset index for creature.
creature | The creature object. |
Definition at line 198 of file nwnx_deprecated.nss.
void NWNX_Creature_SetSoundset | ( | object | creature, |
int | soundset | ||
) |
Set the soundset index for creature.
creature | The creature object. |
soundset | The soundset index. |
Definition at line 204 of file nwnx_deprecated.nss.
void NWNX_Creature_SetGender | ( | object | creature, |
int | gender | ||
) |
Sets the creature gender.
creature | The creature object. |
gender | The GENDER_ constant. |
Definition at line 210 of file nwnx_deprecated.nss.
void NWNX_Creature_RestoreSpells | ( | object | creature, |
int | level = -1 |
||
) |
Restore all creature spells per day for given level.
creature | The creature object. |
level | The level to restore. If -1, all spells are restored. |
Definition at line 216 of file nwnx_deprecated.nss.
int NWNX_Creature_GetDomain | ( | object | creature, |
int | class, | ||
int | index | ||
) |
Gets one of creature's domains.
creature | The creature object. |
class | The class id from classes.2da. (Not class index 0-2) |
index | The first or second domain. |
Definition at line 232 of file nwnx_deprecated.nss.
int NWNX_Creature_GetSpecialization | ( | object | creature, |
int | class | ||
) |
Gets the creature's specialist school.
creature | The creature object. |
class | The class id from classes.2da. (Not class index 0-2) |
Definition at line 238 of file nwnx_deprecated.nss.
int NWNX_Creature_GetSpellUsesLeft | ( | object | oCreature, |
int | nSpellID, | ||
int | nMultiClass, | ||
int | nDomainLevel = 0 , |
||
int | nMetaMagic = METAMAGIC_NONE |
||
) |
Get the number of uses left of a spell.
oCreature | The creature. |
nSpellID | The spell ID. |
nMultiClass | The position of the class to check, 0-2 |
nDomainLevel | The domain level if checking a domain spell. |
nMetaMagic | A METAMAGIC_* constant. |
Definition at line 244 of file nwnx_deprecated.nss.
int NWNX_Creature_GetMemorizedSpellReadyCount | ( | object | oCreature, |
int | nSpellID, | ||
int | nMultiClass, | ||
int | nMetaMagic = METAMAGIC_NONE |
||
) |
Get the number of memorized ready spells by spellid.
oCreature | The creature. |
nSpellID | The spell ID. |
nMultiClass | The position of the class to check, 0-2 |
nMetaMagic | A METAMAGIC_* constant. |
Definition at line 250 of file nwnx_deprecated.nss.
void NWNX_Creature_SetEffectIconFlashing | ( | object | oCreature, |
int | nIconId, | ||
int | bFlashing | ||
) |
Set whether an effect icon is flashing or not.
oCreature | The target creature. |
nIconId | The icon id, see effecticons.2da. |
bFlashing | TRUE for flashing, FALSE for not flashing. |
Definition at line 256 of file nwnx_deprecated.nss.
effect NWNX_Effect_SetEffectExpiredScript | ( | effect | e, |
string | script, | ||
string | data = "" |
||
) |
Set a script with optional data that runs when an effect expires.
e | The effect. |
script | The script to run when the effect expires. |
data | Any other data you wish to send back to the script. |
Definition at line 288 of file nwnx_deprecated.nss.
string NWNX_Effect_GetEffectExpiredData | ( | ) |
Get the data set with NWNX_Effect_SetEffectExpiredScript()
Definition at line 294 of file nwnx_deprecated.nss.
object NWNX_Effect_GetEffectExpiredCreator | ( | ) |
Get the effect creator.
Definition at line 300 of file nwnx_deprecated.nss.
effect NWNX_Effect_AccessorizeVisualEffect | ( | effect | eEffect | ) |
Accessorize an EffectVisualEffect(), making it undispellable and unable to be removed by resting or death.
eEffect | An EffectVisualEffect(), does not work for other effect types. |
Definition at line 306 of file nwnx_deprecated.nss.
object NWNX_Object_StringToObject | ( | string | id | ) |
Convert an object id to the actual object.
id | The object id. |
Definition at line 351 of file nwnx_deprecated.nss.
int NWNX_Object_CheckFit | ( | object | obj, |
int | baseitem | ||
) |
Check if an item can fit in an object's inventory.
obj | The object with an inventory. |
baseitem | The base item id to check for a fit. |
Definition at line 357 of file nwnx_deprecated.nss.
void NWNX_Object_AddIconEffect | ( | object | obj, |
int | nIcon, | ||
float | fDuration = 0.0 |
||
) |
Add an effect to an object that displays an icon and has no other effect.
obj | The object to apply the effect. |
nIcon | The icon id. |
fDuration | If specified the effect will be temporary and last this length in seconds, otherwise the effect will be permanent. |
Definition at line 363 of file nwnx_deprecated.nss.
void NWNX_Object_RemoveIconEffect | ( | object | obj, |
int | nIcon | ||
) |
Remove an icon effect from an object that was added by the NWNX_Object_AddIconEffect() function.
obj | The object. |
nIcon | The icon id. |
Definition at line 378 of file nwnx_deprecated.nss.
void NWNX_Object_SetFacing | ( | object | oObject, |
float | fDirection | ||
) |
Cause oObject to face fDirection.
oObject | The object to change its facing of |
fDirection | The direction the object should face |
Definition at line 390 of file nwnx_deprecated.nss.
int NWNX_Regex_Search | ( | string | str, |
string | regex | ||
) |
str | The string to search. |
regex | The regular expression to use when searching. |
Definition at line 417 of file nwnx_deprecated.nss.
string NWNX_Regex_Replace | ( | string | str, |
string | regex, | ||
string | replace = "" , |
||
int | firstOnly = FALSE |
||
) |
Replaces any matches of the regular expression with a string.
str | The string to search. |
regex | The regular expression to use when searching. |
replace | The string to replace the matches with. |
firstOnly | Set to TRUE to only replace the first match. |
Definition at line 423 of file nwnx_deprecated.nss.
json NWNX_Regex_Match | ( | string | str, |
string | regex | ||
) |
Returns all matches in a string that match the regular expression.
str | The string to search. |
regex | The regular expression to use. |
Definition at line 429 of file nwnx_deprecated.nss.
int NWNX_Util_IsValidResRef | ( | string | resref, |
int | type = RESTYPE_UTC |
||
) |
Determines if the supplied resref exists.
resref | The resref to check. |
type | The Resref Type. |
Definition at line 460 of file nwnx_deprecated.nss.
int NWNX_Util_Get2DARowCount | ( | string | str | ) |
Gets the row count for a 2da.
str | The 2da to check (do not include the .2da). |
Definition at line 466 of file nwnx_deprecated.nss.
string NWNX_Util_GetNSSContents | ( | string | sScriptName, |
int | nMaxLength = -1 |
||
) |
Gets the contents of a .nss script file as a string.
sScriptName | The name of the script to get the contents of. |
nMaxLength | The max length of the return string, -1 to get everything |
Definition at line 472 of file nwnx_deprecated.nss.
int NWNX_Util_GetServerTicksPerSecond | ( | ) |
Get the ticks per second of the server.
Definition at line 479 of file nwnx_deprecated.nss.
const int NWNX_CREATURE_CLERIC_DOMAIN_AIR = 0 |
Definition at line 11 of file nwnx_deprecated.nss.
const int NWNX_CREATURE_CLERIC_DOMAIN_ANIMAL = 1 |
Definition at line 12 of file nwnx_deprecated.nss.
const int NWNX_CREATURE_CLERIC_DOMAIN_DEATH = 3 |
Definition at line 13 of file nwnx_deprecated.nss.
const int NWNX_CREATURE_CLERIC_DOMAIN_DESTRUCTION = 4 |
Definition at line 14 of file nwnx_deprecated.nss.
const int NWNX_CREATURE_CLERIC_DOMAIN_EARTH = 5 |
Definition at line 15 of file nwnx_deprecated.nss.
const int NWNX_CREATURE_CLERIC_DOMAIN_EVIL = 6 |
Definition at line 16 of file nwnx_deprecated.nss.
const int NWNX_CREATURE_CLERIC_DOMAIN_FIRE = 7 |
Definition at line 17 of file nwnx_deprecated.nss.
const int NWNX_CREATURE_CLERIC_DOMAIN_GOOD = 8 |
Definition at line 18 of file nwnx_deprecated.nss.
const int NWNX_CREATURE_CLERIC_DOMAIN_HEALING = 9 |
Definition at line 19 of file nwnx_deprecated.nss.
const int NWNX_CREATURE_CLERIC_DOMAIN_KNOWLEDGE = 10 |
Definition at line 20 of file nwnx_deprecated.nss.
const int NWNX_CREATURE_CLERIC_DOMAIN_MAGIC = 13 |
Definition at line 21 of file nwnx_deprecated.nss.
const int NWNX_CREATURE_CLERIC_DOMAIN_PLANT = 14 |
Definition at line 22 of file nwnx_deprecated.nss.
const int NWNX_CREATURE_CLERIC_DOMAIN_PROTECTION = 15 |
Definition at line 23 of file nwnx_deprecated.nss.
const int NWNX_CREATURE_CLERIC_DOMAIN_STRENGTH = 16 |
Definition at line 24 of file nwnx_deprecated.nss.
const int NWNX_CREATURE_CLERIC_DOMAIN_SUN = 17 |
Definition at line 25 of file nwnx_deprecated.nss.
const int NWNX_CREATURE_CLERIC_DOMAIN_TRAVEL = 18 |
Definition at line 26 of file nwnx_deprecated.nss.
const int NWNX_CREATURE_CLERIC_DOMAIN_TRICKERY = 19 |
Definition at line 27 of file nwnx_deprecated.nss.
const int NWNX_CREATURE_CLERIC_DOMAIN_WAR = 20 |
Definition at line 28 of file nwnx_deprecated.nss.
const int NWNX_CREATURE_CLERIC_DOMAIN_WATER = 21 |
Definition at line 29 of file nwnx_deprecated.nss.