NWNX:EE  8193.36.12
nwnx_creature.nss
Go to the documentation of this file.
1 #include "nwnx"
6 
7 const string NWNX_Creature = "NWNX_Creature";
8 
24 
36 
49 
62 
65 
69 {
70  int id;
71  int ready;
72  int level;
73 };
74 
79 void NWNX_Creature_AddFeat(object creature, int feat);
80 
86 void NWNX_Creature_AddFeatByLevel(object creature, int feat, int level);
87 
91 void NWNX_Creature_RemoveFeat(object creature, int feat);
92 
99 void NWNX_Creature_RemoveFeatByLevel(object creature, int feat, int level);
100 
106 int NWNX_Creature_GetKnowsFeat(object creature, int feat);
107 
112 int NWNX_Creature_GetFeatCountByLevel(object creature, int level);
113 
119 int NWNX_Creature_GetFeatByLevel(object creature, int level, int index);
120 
125 int NWNX_Creature_GetFeatGrantLevel(object creature, int feat);
126 
130 int NWNX_Creature_GetFeatCount(object creature);
131 
136 int NWNX_Creature_GetFeatByIndex(object creature, int index);
137 
142 int NWNX_Creature_GetMeetsFeatRequirements(object creature, int feat);
143 
147 int NWNX_Creature_GetSpecialAbilityCount(object creature);
148 
153 struct NWNX_Creature_SpecialAbility NWNX_Creature_GetSpecialAbility(object creature, int index);
154 
158 void NWNX_Creature_AddSpecialAbility(object creature, struct NWNX_Creature_SpecialAbility ability);
159 
163 void NWNX_Creature_RemoveSpecialAbility(object creature, int index);
164 
169 void NWNX_Creature_SetSpecialAbility(object creature, int index, struct NWNX_Creature_SpecialAbility ability);
170 
175 int NWNX_Creature_GetClassByLevel(object creature, int level);
176 
180 void NWNX_Creature_SetBaseAC(object creature, int ac);
181 
185 int NWNX_Creature_GetBaseAC(object creature);
186 
192 void NWNX_Creature_SetRawAbilityScore(object creature, int ability, int value);
193 
199 int NWNX_Creature_GetRawAbilityScore(object creature, int ability);
200 
206 void NWNX_Creature_ModifyRawAbilityScore(object creature, int ability, int modifier);
207 
213 int NWNX_Creature_GetPrePolymorphAbilityScore(object creature, int ability);
214 
220 int NWNX_Creature_GetRemainingSpellSlots(object creature, int class, int level);
221 
227 void NWNX_Creature_SetRemainingSpellSlots(object creature, int class, int level, int slots);
228 
234 int NWNX_Creature_GetMaxSpellSlots(object creature, int class, int level);
235 
241 void NWNX_Creature_AddKnownSpell(object creature, int class, int level, int spellId);
242 
248 void NWNX_Creature_RemoveKnownSpell(object creature, int class, int level, int spellId);
249 
254 int NWNX_Creature_GetMaxHitPointsByLevel(object creature, int level);
255 
260 void NWNX_Creature_SetMaxHitPointsByLevel(object creature, int level, int value);
261 
265 void NWNX_Creature_SetMovementRate(object creature, int rate);
266 
271 float NWNX_Creature_GetMovementRateFactor(object creature);
272 
277 void NWNX_Creature_SetMovementRateFactor(object creature, float rate);
278 
283 float NWNX_Creature_GetMovementRateFactorCap(object creature);
284 
289 void NWNX_Creature_SetMovementRateFactorCap(object creature, float cap);
290 
294 int NWNX_Creature_GetMovementType(object creature);
295 
301 void NWNX_Creature_SetWalkRateCap(object creature, float fWalkRate = 2000.0f);
302 
306 void NWNX_Creature_SetAlignmentGoodEvil(object creature, int value);
307 
311 void NWNX_Creature_SetAlignmentLawChaos(object creature, int value);
312 
317 void NWNX_Creature_SetSkillRank(object creature, int skill, int rank);
318 
324 int NWNX_Creature_GetSkillRankByLevel(object creature, int skill, int level);
325 
332 void NWNX_Creature_SetSkillRankByLevel(object creature, int skill, int rank, int level);
333 
341 void NWNX_Creature_SetClassByPosition(object creature, int position, int classID, int bUpdateLevels = TRUE);
342 
349 void NWNX_Creature_SetLevelByPosition(object creature, int position, int level);
350 
360 void NWNX_Creature_SetBaseAttackBonus(object creature, int bab);
361 
367 int NWNX_Creature_GetAttacksPerRound(object creature, int bBaseAPR = FALSE);
368 
371 void NWNX_Creature_RestoreFeats(object creature);
372 
375 void NWNX_Creature_RestoreSpecialAbilities(object creature);
376 
379 void NWNX_Creature_RestoreItems(object creature);
380 
384 void NWNX_Creature_SetSize(object creature, int size);
385 
389 int NWNX_Creature_GetSkillPointsRemaining(object creature);
390 
394 void NWNX_Creature_SetSkillPointsRemaining(object creature, int skillpoints);
395 
400 int NWNX_Creature_GetSkillPointsRemainingByLevel(object creature, int level);
401 
406 void NWNX_Creature_SetSkillPointsRemainingByLevel(object creature, int level, int value);
407 
411 void NWNX_Creature_SetRacialType(object creature, int racialtype);
412 
416 void NWNX_Creature_SetGold(object creature, int gold);
417 
421 void NWNX_Creature_SetCorpseDecayTime(object creature, int nDecayTime);
422 
428 int NWNX_Creature_GetBaseSavingThrow(object creature, int which);
429 
434 void NWNX_Creature_SetBaseSavingThrow(object creature, int which, int value);
435 
442 void NWNX_Creature_LevelUp(object creature, int class, int count = 1, int package = PACKAGE_INVALID);
443 
448 void NWNX_Creature_LevelDown(object creature, int count=1);
449 
453 void NWNX_Creature_SetChallengeRating(object creature, float fCR);
454 
467 int NWNX_Creature_GetAttackBonus(object creature, int isMelee = -1, int isTouchAttack = FALSE, int isOffhand = FALSE, int includeBaseAttackBonus = TRUE);
468 
474 int NWNX_Creature_GetHighestLevelOfFeat(object creature, int feat);
475 
480 int NWNX_Creature_GetFeatRemainingUses(object creature, int feat);
481 
486 int NWNX_Creature_GetFeatTotalUses(object creature, int feat);
487 
492 void NWNX_Creature_SetFeatRemainingUses(object creature, int feat, int uses);
493 
508 int NWNX_Creature_GetTotalEffectBonus(object creature, int bonusType=NWNX_CREATURE_BONUS_TYPE_ATTACK, object target=OBJECT_INVALID, int isElemental=0, int isForceMax=0, int savetype=-1, int saveSpecificType=-1, int skill=-1, int abilityScore=-1, int isOffhand=FALSE);
509 
515 void NWNX_Creature_SetOriginalName(object creature, string name, int isLastName);
516 
521 string NWNX_Creature_GetOriginalName(object creature, int isLastName);
522 
527 void NWNX_Creature_SetSpellResistance(object creature, int sr);
528 
532 void NWNX_Creature_SetAnimalCompanionCreatureType(object creature, int type);
533 
537 void NWNX_Creature_SetFamiliarCreatureType(object creature, int type);
538 
542 void NWNX_Creature_SetAnimalCompanionName(object creature, string name);
543 
547 void NWNX_Creature_SetFamiliarName(object creature, string name);
548 
552 int NWNX_Creature_GetDisarmable(object creature);
553 
557 void NWNX_Creature_SetDisarmable(object creature, int disarmable);
558 
564 void NWNX_Creature_SetDomain(object creature, int class, int index, int domain);
565 
570 void NWNX_Creature_SetSpecialization(object creature, int class, int school);
571 
575 void NWNX_Creature_SetFaction(object oCreature, int nFactionId);
576 
580 int NWNX_Creature_GetFaction(object oCreature);
581 
585 int NWNX_Creature_GetFlatFooted(object oCreature);
586 
590 string NWNX_Creature_SerializeQuickbar(object oCreature);
591 
596 int NWNX_Creature_DeserializeQuickbar(object oCreature, string sSerializedQuickbar);
597 
603 void NWNX_Creature_SetCasterLevelModifier(object oCreature, int nClass, int nModifier, int bPersist = FALSE);
604 
609 int NWNX_Creature_GetCasterLevelModifier(object oCreature, int nClass);
610 
616 void NWNX_Creature_SetCasterLevelOverride(object oCreature, int nClass, int nCasterLevel, int bPersist = FALSE);
617 
622 int NWNX_Creature_GetCasterLevelOverride(object oCreature, int nClass);
623 
626 void NWNX_Creature_JumpToLimbo(object oCreature);
627 
635 void NWNX_Creature_SetCriticalMultiplierModifier(object oCreature, int nModifier, int nHand = 0, int bPersist = FALSE, int nBaseItem = -1);
636 
642 int NWNX_Creature_GetCriticalMultiplierModifier(object oCreature, int nHand = 0, int nBaseItem = -1);
643 
651 void NWNX_Creature_SetCriticalMultiplierOverride(object oCreature, int nOverride, int nHand = 0, int bPersist = FALSE, int nBaseItem = -1);
652 
658 int NWNX_Creature_GetCriticalMultiplierOverride(object oCreature, int nHand = 0, int nBaseItem = -1);
659 
667 void NWNX_Creature_SetCriticalRangeModifier(object oCreature, int nModifier, int nHand = 0, int bPersist = FALSE, int nBaseItem = -1);
668 
674 int NWNX_Creature_GetCriticalRangeModifier(object oCreature, int nHand = 0, int nBaseItem = -1);
675 
683 void NWNX_Creature_SetCriticalRangeOverride(object oCreature, int nOverride, int nHand = 0, int bPersist = FALSE, int nBaseItem = -1);
684 
690 int NWNX_Creature_GetCriticalRangeOverride(object oCreature, int nHand = 0, int nBaseItem = -1);
691 
697 void NWNX_Creature_AddAssociate(object oCreature, object oAssociate, int nAssociateType);
698 
703 void NWNX_Creature_OverrideDamageLevel(object oCreature, int nDamageLevel);
704 
708 void NWNX_Creature_SetEncounter(object oCreature, object oEncounter);
709 
713 object NWNX_Creature_GetEncounter(object oCreature);
714 
718 int NWNX_Creature_GetIsBartering(object oCreature);
719 
723 void NWNX_Creature_SetLastItemCasterLevel(object oCreature, int nCasterLvl);
724 
728 int NWNX_Creature_GetLastItemCasterLevel(object oCreature);
729 
735 int NWNX_Creature_GetArmorClassVersus(object oAttacked, object oVersus, int nTouch=FALSE);
736 
740 int NWNX_Creature_GetWalkAnimation(object oCreature);
741 
745 void NWNX_Creature_SetWalkAnimation(object oCreature, int nAnimation);
746 
751 void NWNX_Creature_SetAttackRollOverride(object oCreature, int nRoll, int nModifier);
752 
757 void NWNX_Creature_SetParryAllAttacks(object oCreature, int bParry);
758 
762 int NWNX_Creature_GetNoPermanentDeath(object oCreature);
763 
767 void NWNX_Creature_SetNoPermanentDeath(object oCreature, int bNoPermanentDeath);
768 
775 vector NWNX_Creature_ComputeSafeLocation(object oCreature, vector vPosition, float fRadius = 20.0f, int bWalkStraightLineRequired = TRUE);
776 
780 void NWNX_Creature_DoPerceptionUpdateOnCreature(object oCreature, object oTargetCreature);
781 
785 float NWNX_Creature_GetPersonalSpace(object oCreature);
786 
790 void NWNX_Creature_SetPersonalSpace(object oCreature, float fPerspace);
791 
795 float NWNX_Creature_GetCreaturePersonalSpace(object oCreature);
796 
800 void NWNX_Creature_SetCreaturePersonalSpace(object oCreature, float fCrePerspace);
801 
805 float NWNX_Creature_GetHeight(object oCreature);
806 
810 void NWNX_Creature_SetHeight(object oCreature, float fHeight);
811 
815 float NWNX_Creature_GetHitDistance(object oCreature);
816 
820 void NWNX_Creature_SetHitDistance(object oCreature, float fHitDist);
821 
825 float NWNX_Creature_GetPreferredAttackDistance(object oCreature);
826 
830 void NWNX_Creature_SetPreferredAttackDistance(object oCreature, float fPrefAtckDist);
831 
834 int NWNX_Creature_GetArmorCheckPenalty(object oCreature);
835 
838 int NWNX_Creature_GetShieldCheckPenalty(object oCreature);
839 
847 void NWNX_Creature_SetBypassEffectImmunity(object oCreature, int nImmunityType, int nChance = 100, int bPersist = FALSE);
848 
853 int NWNX_Creature_GetBypassEffectImmunity(object oCreature, int nImmunityType);
854 
858 void NWNX_Creature_SetLastKiller(object oCreature, object oKiller);
859 
873 void NWNX_Creature_DoItemCastSpell(object oCreature, object oTarget, location locTarget, int nSpellID, int nCasterLevel, float fProjectileTime, int nProjectilePathType = PROJECTILE_PATH_TYPE_DEFAULT, int nProjectileSpellID = -1, object oItem = OBJECT_INVALID, string sImpactScript = "");
874 
880 int NWNX_Creature_RunEquip(object oCreature, object oItem, int nInventorySlot);
881 
886 int NWNX_Creature_RunUnequip(object oCreature, object oItem);
887 
893 void NWNX_Creature_OverrideRangedProjectileVFX(object oCreature, int nProjectileVFX, int bPersist = FALSE);
894 
901 void NWNX_Creature_SetInitiativeModifier(object oCreature, int nMod, int bPersist = FALSE);
902 
906 int NWNX_Creature_GetInitiativeModifier(object oCreature);
907 
911 object NWNX_Creature_GetBodyBag(object oCreature);
912 
926 int NWNX_Creature_AddCastSpellActions(object oCreature, object oTarget, vector vTargetLocation, int nSpellID, int nMultiClass, int nMetaMagic = METAMAGIC_NONE, int nDomainLevel = 0, int nProjectilePathType = PROJECTILE_PATH_TYPE_DEFAULT, int bInstant = FALSE, int bClearActions = FALSE, int bAddToFront = FALSE);
927 
932 int NWNX_Creature_GetIsFlanking(object oCreature, object oTargetCreature);
933 
938 void NWNX_Creature_DecrementRemainingSpellSlots(object oCreature, int nClass, int nSpellLevel);
939 
944 void NWNX_Creature_IncrementRemainingSpellSlots(object oCreature, int nClass, int nSpellLevel);
945 
949 int NWNX_Creature_GetMaximumBonusAttacks(object oCreature);
950 
957 void NWNX_Creature_SetMaximumBonusAttacks(object oCreature, int nMaxBonusAttacks, int bPersist = FALSE);
958 
962 void NWNX_Creature_DoCleaveAttack(object oCreature);
963 
967 object NWNX_Creature_GetLockOrientationToObject(object oCreature);
968 
972 void NWNX_Creature_SetLockOrientationToObject(object oCreature, object oTarget);
973 
978 void NWNX_Creature_BroadcastAttackOfOpportunity(object oCreature, object oSingleCreature = OBJECT_INVALID, int bMovement = FALSE);
979 
984 int NWNX_Creature_GetMaxSellToStorePriceOverride(object oCreature, object oStore);
985 
990 void NWNX_Creature_SetMaxSellToStorePriceOverride(object oCreature, object oStore, int nMaxSellToPrice);
991 
996 int NWNX_Creature_GetAbilityIncreaseByLevel(object oCreature, int nLevel);
997 
1002 void NWNX_Creature_SetAbilityIncreaseByLevel(object oCreature, int nLevel, int nAbility);
1003 
1008 float NWNX_Creature_GetMaxAttackRange(object oCreature, object oTarget);
1009 
1014 int NWNX_Creature_GetMulticlassLimit(object oCreature);
1015 
1025 void NWNX_Creature_SetMulticlassLimit(object oCreature, int nLimit, int bPersist = FALSE);
1026 
1028 
1029 void NWNX_Creature_AddFeat(object creature, int feat)
1030 {
1031  string sFunc = "AddFeat";
1032  NWNX_PushArgumentInt(feat);
1033  NWNX_PushArgumentObject(creature);
1034 
1035  NWNX_CallFunction(NWNX_Creature, sFunc);
1036 }
1037 
1038 void NWNX_Creature_AddFeatByLevel(object creature, int feat, int level)
1039 {
1040  string sFunc = "AddFeatByLevel";
1041 
1043  NWNX_PushArgumentInt(feat);
1044  NWNX_PushArgumentObject(creature);
1045 
1046  NWNX_CallFunction(NWNX_Creature, sFunc);
1047 }
1048 
1049 void NWNX_Creature_RemoveFeat(object creature, int feat)
1050 {
1051  string sFunc = "RemoveFeat";
1052  NWNX_PushArgumentInt(feat);
1053  NWNX_PushArgumentObject(creature);
1054 
1055  NWNX_CallFunction(NWNX_Creature, sFunc);
1056 }
1057 
1058 void NWNX_Creature_RemoveFeatByLevel(object creature, int feat, int level)
1059 {
1060  string sFunc = "RemoveFeatByLevel";
1061 
1063  NWNX_PushArgumentInt(feat);
1064  NWNX_PushArgumentObject(creature);
1065 
1066  NWNX_CallFunction(NWNX_Creature, sFunc);
1067 }
1068 
1069 int NWNX_Creature_GetKnowsFeat(object creature, int feat)
1070 {
1071  string sFunc = "GetKnowsFeat";
1072 
1073  NWNX_PushArgumentInt(feat);
1074  NWNX_PushArgumentObject(creature);
1075 
1076  NWNX_CallFunction(NWNX_Creature, sFunc);
1077  return NWNX_GetReturnValueInt();
1078 }
1079 
1080 int NWNX_Creature_GetFeatCountByLevel(object creature, int level)
1081 {
1082  string sFunc = "GetFeatCountByLevel";
1083 
1085  NWNX_PushArgumentObject(creature);
1086 
1087  NWNX_CallFunction(NWNX_Creature, sFunc);
1088  return NWNX_GetReturnValueInt();
1089 }
1090 
1091 int NWNX_Creature_GetFeatByLevel(object creature, int level, int index)
1092 {
1093  string sFunc = "GetFeatByLevel";
1094 
1095  NWNX_PushArgumentInt(index);
1097  NWNX_PushArgumentObject(creature);
1098 
1099  NWNX_CallFunction(NWNX_Creature, sFunc);
1100  return NWNX_GetReturnValueInt();
1101 }
1102 
1103 int NWNX_Creature_GetFeatCount(object creature)
1104 {
1105  string sFunc = "GetFeatCount";
1106 
1107  NWNX_PushArgumentObject(creature);
1108 
1109  NWNX_CallFunction(NWNX_Creature, sFunc);
1110  return NWNX_GetReturnValueInt();
1111 }
1112 
1113 int NWNX_Creature_GetFeatGrantLevel(object creature, int feat)
1114 {
1115  string sFunc = "GetFeatGrantLevel";
1116 
1117  NWNX_PushArgumentInt(feat);
1118  NWNX_PushArgumentObject(creature);
1119  NWNX_CallFunction(NWNX_Creature, sFunc);
1120  return NWNX_GetReturnValueInt();
1121 }
1122 
1123 int NWNX_Creature_GetFeatByIndex(object creature, int index)
1124 {
1125  string sFunc = "GetFeatByIndex";
1126 
1127  NWNX_PushArgumentInt(index);
1128  NWNX_PushArgumentObject(creature);
1129 
1130  NWNX_CallFunction(NWNX_Creature, sFunc);
1131  return NWNX_GetReturnValueInt();
1132 }
1133 
1134 int NWNX_Creature_GetMeetsFeatRequirements(object creature, int feat)
1135 {
1136  string sFunc = "GetMeetsFeatRequirements";
1137 
1138  NWNX_PushArgumentInt(feat);
1139  NWNX_PushArgumentObject(creature);
1140 
1141  NWNX_CallFunction(NWNX_Creature, sFunc);
1142  return NWNX_GetReturnValueInt();
1143 }
1144 
1146 {
1147  string sFunc = "GetSpecialAbility";
1148 
1149  struct NWNX_Creature_SpecialAbility ability;
1150 
1151  NWNX_PushArgumentInt(index);
1152  NWNX_PushArgumentObject(creature);
1153 
1154  NWNX_CallFunction(NWNX_Creature, sFunc);
1155 
1156  ability.level = NWNX_GetReturnValueInt();
1157  ability.ready = NWNX_GetReturnValueInt();
1158  ability.id = NWNX_GetReturnValueInt();
1159 
1160  return ability;
1161 }
1162 
1164 {
1165  string sFunc = "GetSpecialAbilityCount";
1166 
1167  NWNX_PushArgumentObject(creature);
1168  NWNX_CallFunction(NWNX_Creature, sFunc);
1169 
1170  return NWNX_GetReturnValueInt();
1171 }
1172 
1174 {
1175  string sFunc = "AddSpecialAbility";
1176 
1177  NWNX_PushArgumentInt(ability.id);
1178  NWNX_PushArgumentInt(ability.ready);
1179  NWNX_PushArgumentInt(ability.level);
1180  NWNX_PushArgumentObject(creature);
1181 
1182  NWNX_CallFunction(NWNX_Creature, sFunc);
1183 }
1184 
1185 void NWNX_Creature_RemoveSpecialAbility(object creature, int index)
1186 {
1187  string sFunc = "RemoveSpecialAbility";
1188 
1189  NWNX_PushArgumentInt(index);
1190  NWNX_PushArgumentObject(creature);
1191 
1192  NWNX_CallFunction(NWNX_Creature, sFunc);
1193 }
1194 
1195 void NWNX_Creature_SetSpecialAbility(object creature, int index, struct NWNX_Creature_SpecialAbility ability)
1196 {
1197  string sFunc = "SetSpecialAbility";
1198 
1199  NWNX_PushArgumentInt(ability.id);
1200  NWNX_PushArgumentInt(ability.ready);
1201  NWNX_PushArgumentInt(ability.level);
1202  NWNX_PushArgumentInt(index);
1203  NWNX_PushArgumentObject(creature);
1204 
1205  NWNX_CallFunction(NWNX_Creature, sFunc);
1206 }
1207 
1208 int NWNX_Creature_GetClassByLevel(object creature, int level)
1209 {
1210  string sFunc = "GetClassByLevel";
1211 
1213  NWNX_PushArgumentObject(creature);
1214 
1215  NWNX_CallFunction(NWNX_Creature, sFunc);
1216  return NWNX_GetReturnValueInt();
1217 }
1218 
1219 void NWNX_Creature_SetBaseAC(object creature, int ac)
1220 {
1221  string sFunc = "SetBaseAC";
1222 
1224  NWNX_PushArgumentObject(creature);
1225 
1226  NWNX_CallFunction(NWNX_Creature, sFunc);
1227 }
1228 
1229 int NWNX_Creature_GetBaseAC(object creature)
1230 {
1231  string sFunc = "GetBaseAC";
1232 
1233  NWNX_PushArgumentObject(creature);
1234 
1235  NWNX_CallFunction(NWNX_Creature, sFunc);
1236  return NWNX_GetReturnValueInt();
1237 }
1238 
1239 void NWNX_Creature_SetRawAbilityScore(object creature, int ability, int value)
1240 {
1241  string sFunc = "SetRawAbilityScore";
1242 
1243  NWNX_PushArgumentInt(value);
1244  NWNX_PushArgumentInt(ability);
1245  NWNX_PushArgumentObject(creature);
1246 
1247  NWNX_CallFunction(NWNX_Creature, sFunc);
1248 }
1249 
1250 int NWNX_Creature_GetRawAbilityScore(object creature, int ability)
1251 {
1252  string sFunc = "GetRawAbilityScore";
1253 
1254  NWNX_PushArgumentInt(ability);
1255  NWNX_PushArgumentObject(creature);
1256 
1257  NWNX_CallFunction(NWNX_Creature, sFunc);
1258  return NWNX_GetReturnValueInt();
1259 }
1260 
1261 void NWNX_Creature_ModifyRawAbilityScore(object creature, int ability, int modifier)
1262 {
1263  string sFunc = "ModifyRawAbilityScore";
1264 
1265  NWNX_PushArgumentInt(modifier);
1266  NWNX_PushArgumentInt(ability);
1267  NWNX_PushArgumentObject(creature);
1268 
1269  NWNX_CallFunction(NWNX_Creature, sFunc);
1270 }
1271 
1272 int NWNX_Creature_GetPrePolymorphAbilityScore(object creature, int ability)
1273 {
1274  string sFunc = "GetPrePolymorphAbilityScore";
1275 
1276  NWNX_PushArgumentInt(ability);
1277  NWNX_PushArgumentObject(creature);
1278 
1279  NWNX_CallFunction(NWNX_Creature, sFunc);
1280  return NWNX_GetReturnValueInt();
1281 }
1282 
1283 int NWNX_Creature_GetRemainingSpellSlots(object creature, int class, int level)
1284 {
1285  string sFunc = "GetRemainingSpellSlots";
1286 
1288  NWNX_PushArgumentInt(class);
1289  NWNX_PushArgumentObject(creature);
1290 
1291  NWNX_CallFunction(NWNX_Creature, sFunc);
1292  return NWNX_GetReturnValueInt();
1293 }
1294 
1295 void NWNX_Creature_SetRemainingSpellSlots(object creature, int class, int level, int slots)
1296 {
1297  string sFunc = "SetRemainingSpellSlots";
1298 
1299  NWNX_PushArgumentInt(slots);
1301  NWNX_PushArgumentInt(class);
1302  NWNX_PushArgumentObject(creature);
1303 
1304  NWNX_CallFunction(NWNX_Creature, sFunc);
1305 }
1306 
1307 void NWNX_Creature_RemoveKnownSpell(object creature, int class, int level, int spellId)
1308 {
1309  string sFunc = "RemoveKnownSpell";
1310 
1311  NWNX_PushArgumentInt(spellId);
1313  NWNX_PushArgumentInt(class);
1314  NWNX_PushArgumentObject(creature);
1315 
1316  NWNX_CallFunction(NWNX_Creature, sFunc);
1317 }
1318 
1319 void NWNX_Creature_AddKnownSpell(object creature, int class, int level, int spellId)
1320 {
1321  string sFunc = "AddKnownSpell";
1322 
1323  NWNX_PushArgumentInt(spellId);
1325  NWNX_PushArgumentInt(class);
1326  NWNX_PushArgumentObject(creature);
1327 
1328  NWNX_CallFunction(NWNX_Creature, sFunc);
1329 }
1330 
1331 int NWNX_Creature_GetMaxSpellSlots(object creature, int class, int level)
1332 {
1333  string sFunc = "GetMaxSpellSlots";
1334 
1336  NWNX_PushArgumentInt(class);
1337  NWNX_PushArgumentObject(creature);
1338 
1339  NWNX_CallFunction(NWNX_Creature, sFunc);
1340  return NWNX_GetReturnValueInt();
1341 }
1342 
1343 
1345 {
1346  string sFunc = "GetMaxHitPointsByLevel";
1347 
1349  NWNX_PushArgumentObject(creature);
1350 
1351  NWNX_CallFunction(NWNX_Creature, sFunc);
1352  return NWNX_GetReturnValueInt();
1353 }
1354 
1355 void NWNX_Creature_SetMaxHitPointsByLevel(object creature, int level, int value)
1356 {
1357  string sFunc = "SetMaxHitPointsByLevel";
1358 
1359  NWNX_PushArgumentInt(value);
1361  NWNX_PushArgumentObject(creature);
1362 
1363  NWNX_CallFunction(NWNX_Creature, sFunc);
1364 }
1365 
1366 void NWNX_Creature_SetMovementRate(object creature, int rate)
1367 {
1368  string sFunc = "SetMovementRate";
1369 
1370  NWNX_PushArgumentInt(rate);
1371  NWNX_PushArgumentObject(creature);
1372 
1373  NWNX_CallFunction(NWNX_Creature, sFunc);
1374 }
1375 
1377 {
1378  string sFunc = "GetMovementRateFactor";
1379  NWNX_PushArgumentObject(creature);
1380 
1381  NWNX_CallFunction(NWNX_Creature, sFunc);
1382  return NWNX_GetReturnValueFloat();
1383 }
1384 
1385 void NWNX_Creature_SetMovementRateFactor(object creature, float factor)
1386 {
1387  string sFunc = "SetMovementRateFactor";
1388 
1389  NWNX_PushArgumentFloat(factor);
1390  NWNX_PushArgumentObject(creature);
1391 
1392  NWNX_CallFunction(NWNX_Creature, sFunc);
1393 }
1394 
1396 {
1397  string sFunc = "GetMovementRateFactorCap";
1398  NWNX_PushArgumentObject(creature);
1399 
1400  NWNX_CallFunction(NWNX_Creature, sFunc);
1401  return NWNX_GetReturnValueFloat();
1402 }
1403 
1404 void NWNX_Creature_SetMovementRateFactorCap(object creature, float cap)
1405 {
1406  string sFunc = "SetMovementRateFactorCap";
1407 
1409  NWNX_PushArgumentObject(creature);
1410 
1411  NWNX_CallFunction(NWNX_Creature, sFunc);
1412 }
1413 
1414 void NWNX_Creature_SetAlignmentGoodEvil(object creature, int value)
1415 {
1416  string sFunc = "SetAlignmentGoodEvil";
1417 
1418  NWNX_PushArgumentInt(value);
1419  NWNX_PushArgumentObject(creature);
1420 
1421  NWNX_CallFunction(NWNX_Creature, sFunc);
1422 }
1423 
1424 void NWNX_Creature_SetAlignmentLawChaos(object creature, int value)
1425 {
1426  string sFunc = "SetAlignmentLawChaos";
1427 
1428  NWNX_PushArgumentInt(value);
1429  NWNX_PushArgumentObject(creature);
1430 
1431  NWNX_CallFunction(NWNX_Creature, sFunc);
1432 }
1433 
1434 void NWNX_Creature_SetSkillRank(object creature, int skill, int rank)
1435 {
1436  string sFunc = "SetSkillRank";
1437  NWNX_PushArgumentInt(rank);
1438  NWNX_PushArgumentInt(skill);
1439  NWNX_PushArgumentObject(creature);
1440 
1441  NWNX_CallFunction(NWNX_Creature, sFunc);
1442 }
1443 
1444 int NWNX_Creature_GetSkillRankByLevel(object creature, int skill, int level)
1445 {
1446  string sFunc = "GetSkillRankByLevel";
1447 
1449  NWNX_PushArgumentInt(skill);
1450  NWNX_PushArgumentObject(creature);
1451 
1452  NWNX_CallFunction(NWNX_Creature, sFunc);
1453  return NWNX_GetReturnValueInt();
1454 }
1455 
1456 void NWNX_Creature_SetSkillRankByLevel(object creature, int skill, int rank, int level)
1457 {
1458  string sFunc = "SetSkillRankByLevel";
1459 
1461  NWNX_PushArgumentInt(rank);
1462  NWNX_PushArgumentInt(skill);
1463  NWNX_PushArgumentObject(creature);
1464 
1465  NWNX_CallFunction(NWNX_Creature, sFunc);
1466 }
1467 
1468 void NWNX_Creature_SetClassByPosition(object creature, int position, int classID, int bUpdateLevels = TRUE)
1469 {
1470  string sFunc = "SetClassByPosition";
1471  NWNX_PushArgumentInt(bUpdateLevels);
1472  NWNX_PushArgumentInt(classID);
1473  NWNX_PushArgumentInt(position);
1474  NWNX_PushArgumentObject(creature);
1475 
1476  NWNX_CallFunction(NWNX_Creature, sFunc);
1477 }
1478 
1479 void NWNX_Creature_SetLevelByPosition(object creature, int position, int level)
1480 {
1481  string sFunc = "SetLevelByPosition";
1483  NWNX_PushArgumentInt(position);
1484  NWNX_PushArgumentObject(creature);
1485 
1486  NWNX_CallFunction(NWNX_Creature, sFunc);
1487 }
1488 
1489 void NWNX_Creature_SetBaseAttackBonus(object creature, int bab)
1490 {
1491  string sFunc = "SetBaseAttackBonus";
1492  NWNX_PushArgumentInt(bab);
1493  NWNX_PushArgumentObject(creature);
1494 
1495  NWNX_CallFunction(NWNX_Creature, sFunc);
1496 }
1497 
1498 int NWNX_Creature_GetAttacksPerRound(object creature, int bBaseAPR = FALSE)
1499 {
1500  string sFunc = "GetAttacksPerRound";
1501  NWNX_PushArgumentInt(bBaseAPR);
1502  NWNX_PushArgumentObject(creature);
1503 
1504  NWNX_CallFunction(NWNX_Creature, sFunc);
1505  return NWNX_GetReturnValueInt();
1506 }
1507 
1508 void NWNX_Creature_RestoreFeats(object creature)
1509 {
1510  string sFunc = "RestoreFeats";
1511  NWNX_PushArgumentObject(creature);
1512 
1513  NWNX_CallFunction(NWNX_Creature, sFunc);
1514 }
1515 
1517 {
1518  string sFunc = "RestoreSpecialAbilities";
1519  NWNX_PushArgumentObject(creature);
1520 
1521  NWNX_CallFunction(NWNX_Creature, sFunc);
1522 }
1523 
1524 void NWNX_Creature_RestoreItems(object creature)
1525 {
1526  string sFunc = "RestoreItems";
1527  NWNX_PushArgumentObject(creature);
1528 
1529  NWNX_CallFunction(NWNX_Creature, sFunc);
1530 }
1531 
1532 void NWNX_Creature_SetSize(object creature, int size)
1533 {
1534  string sFunc = "SetSize";
1535  NWNX_PushArgumentInt(size);
1536  NWNX_PushArgumentObject(creature);
1537 
1538  NWNX_CallFunction(NWNX_Creature, sFunc);
1539 }
1540 
1542 {
1543  string sFunc = "GetSkillPointsRemaining";
1544  NWNX_PushArgumentObject(creature);
1545 
1546  NWNX_CallFunction(NWNX_Creature, sFunc);
1547  return NWNX_GetReturnValueInt();
1548 }
1549 
1550 
1551 void NWNX_Creature_SetSkillPointsRemaining(object creature, int skillpoints)
1552 {
1553  string sFunc = "SetSkillPointsRemaining";
1554  NWNX_PushArgumentInt(skillpoints);
1555  NWNX_PushArgumentObject(creature);
1556 
1557  NWNX_CallFunction(NWNX_Creature, sFunc);
1558 }
1559 
1561 {
1562  string sFunc = "GetSkillPointsRemainingByLevel";
1563 
1565  NWNX_PushArgumentObject(creature);
1566 
1567  NWNX_CallFunction(NWNX_Creature, sFunc);
1568  return NWNX_GetReturnValueInt();
1569 }
1570 
1571 void NWNX_Creature_SetSkillPointsRemainingByLevel(object creature, int level, int value)
1572 {
1573  string sFunc = "SetSkillPointsRemainingByLevel";
1574 
1575  NWNX_PushArgumentInt(value);
1577  NWNX_PushArgumentObject(creature);
1578 
1579  NWNX_CallFunction(NWNX_Creature, sFunc);
1580 }
1581 
1582 void NWNX_Creature_SetRacialType(object creature, int racialtype)
1583 {
1584  string sFunc = "SetRacialType";
1585  NWNX_PushArgumentInt(racialtype);
1586  NWNX_PushArgumentObject(creature);
1587 
1588  NWNX_CallFunction(NWNX_Creature, sFunc);
1589 }
1590 
1591 int NWNX_Creature_GetMovementType(object creature)
1592 {
1593  string sFunc = "GetMovementType";
1594  NWNX_PushArgumentObject(creature);
1595 
1596  NWNX_CallFunction(NWNX_Creature, sFunc);
1597  return NWNX_GetReturnValueInt();
1598 }
1599 
1600 void NWNX_Creature_SetWalkRateCap(object creature, float fWalkRate = 2000.0f)
1601 {
1602  string sFunc = "SetWalkRateCap";
1603  NWNX_PushArgumentFloat(fWalkRate);
1604  NWNX_PushArgumentObject(creature);
1605 
1606  NWNX_CallFunction(NWNX_Creature, sFunc);
1607 }
1608 
1609 void NWNX_Creature_SetGold(object creature, int gold)
1610 {
1611  string sFunc = "SetGold";
1612  NWNX_PushArgumentInt(gold);
1613  NWNX_PushArgumentObject(creature);
1614 
1615  NWNX_CallFunction(NWNX_Creature, sFunc);
1616 }
1617 
1618 void NWNX_Creature_SetCorpseDecayTime(object creature, int nDecayTime)
1619 {
1620  string sFunc = "SetCorpseDecayTime";
1621  NWNX_PushArgumentInt(nDecayTime);
1622  NWNX_PushArgumentObject(creature);
1623 
1624  NWNX_CallFunction(NWNX_Creature, sFunc);
1625 }
1626 
1627 
1628 int NWNX_Creature_GetBaseSavingThrow(object creature, int which)
1629 {
1630  string sFunc = "GetBaseSavingThrow";
1631  NWNX_PushArgumentInt(which);
1632  NWNX_PushArgumentObject(creature);
1633 
1634  NWNX_CallFunction(NWNX_Creature, sFunc);
1635  return NWNX_GetReturnValueInt();
1636 }
1637 
1638 void NWNX_Creature_SetBaseSavingThrow(object creature, int which, int value)
1639 {
1640  string sFunc = "SetBaseSavingThrow";
1641  NWNX_PushArgumentInt(value);
1642  NWNX_PushArgumentInt(which);
1643  NWNX_PushArgumentObject(creature);
1644 
1645  NWNX_CallFunction(NWNX_Creature, sFunc);
1646 }
1647 
1648 void NWNX_Creature_LevelUp(object creature, int class, int count = 1, int package = PACKAGE_INVALID)
1649 {
1650  string sFunc = "LevelUp";
1651  NWNX_PushArgumentInt(package);
1652  NWNX_PushArgumentInt(count);
1653  NWNX_PushArgumentInt(class);
1654  NWNX_PushArgumentObject(creature);
1655 
1656  NWNX_CallFunction(NWNX_Creature, sFunc);
1657 }
1658 
1659 void NWNX_Creature_LevelDown(object creature, int count=1)
1660 {
1661  string sFunc = "LevelDown";
1662  NWNX_PushArgumentInt(count);
1663  NWNX_PushArgumentObject(creature);
1664 
1665  NWNX_CallFunction(NWNX_Creature, sFunc);
1666 }
1667 
1668 void NWNX_Creature_SetChallengeRating(object creature, float fCR)
1669 {
1670  string sFunc = "SetChallengeRating";
1672  NWNX_PushArgumentObject(creature);
1673 
1674  NWNX_CallFunction(NWNX_Creature, sFunc);
1675 }
1676 
1677 int NWNX_Creature_GetAttackBonus(object creature, int isMelee = -1, int isTouchAttack = FALSE, int isOffhand = FALSE, int includeBaseAttackBonus = TRUE)
1678 {
1679  string sFunc = "GetAttackBonus";
1680 
1681  if (isMelee == -1)
1682  {
1683  object oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, creature);
1684 
1685  if (GetIsObjectValid(oWeapon))
1686  {
1687  isMelee = !GetWeaponRanged(oWeapon);
1688  }
1689  else
1690  {// Default to melee for unarmed
1691  isMelee = TRUE;
1692  }
1693  }
1694 
1695  NWNX_PushArgumentInt(includeBaseAttackBonus);
1696  NWNX_PushArgumentInt(isOffhand);
1697  NWNX_PushArgumentInt(isTouchAttack);
1698  NWNX_PushArgumentInt(isMelee);
1699  NWNX_PushArgumentObject(creature);
1700 
1701  NWNX_CallFunction(NWNX_Creature, sFunc);
1702  return NWNX_GetReturnValueInt();
1703 }
1704 
1705 int NWNX_Creature_GetHighestLevelOfFeat(object creature, int feat)
1706 {
1707  string sFunc = "GetHighestLevelOfFeat";
1708 
1709  NWNX_PushArgumentInt(feat);
1710  NWNX_PushArgumentObject(creature);
1711 
1712  NWNX_CallFunction(NWNX_Creature, sFunc);
1713  return NWNX_GetReturnValueInt();
1714 }
1715 
1716 int NWNX_Creature_GetFeatRemainingUses(object creature, int feat)
1717 {
1718  string sFunc = "GetFeatRemainingUses";
1719 
1720  NWNX_PushArgumentInt(feat);
1721  NWNX_PushArgumentObject(creature);
1722 
1723  NWNX_CallFunction(NWNX_Creature, sFunc);
1724  return NWNX_GetReturnValueInt();
1725 }
1726 
1727 int NWNX_Creature_GetFeatTotalUses(object creature, int feat)
1728 {
1729  string sFunc = "GetFeatTotalUses";
1730 
1731  NWNX_PushArgumentInt(feat);
1732  NWNX_PushArgumentObject(creature);
1733 
1734  NWNX_CallFunction(NWNX_Creature, sFunc);
1735  return NWNX_GetReturnValueInt();
1736 }
1737 
1738 void NWNX_Creature_SetFeatRemainingUses(object creature, int feat, int uses)
1739 {
1740  string sFunc = "SetFeatRemainingUses";
1741 
1742  NWNX_PushArgumentInt(uses);
1743  NWNX_PushArgumentInt(feat);
1744  NWNX_PushArgumentObject(creature);
1745 
1746  NWNX_CallFunction(NWNX_Creature, sFunc);
1747 }
1748 
1749 int NWNX_Creature_GetTotalEffectBonus(object creature, int bonusType=NWNX_CREATURE_BONUS_TYPE_ATTACK, object target=OBJECT_INVALID, int isElemental=0, int isForceMax=0, int savetype=-1, int saveSpecificType=-1, int skill=-1, int abilityScore=-1, int isOffhand=FALSE)
1750 {
1751  string sFunc = "GetTotalEffectBonus";
1752 
1753  NWNX_PushArgumentInt(isOffhand);
1754  NWNX_PushArgumentInt(abilityScore);
1755  NWNX_PushArgumentInt(skill);
1756  NWNX_PushArgumentInt(saveSpecificType);
1757  NWNX_PushArgumentInt(savetype);
1758  NWNX_PushArgumentInt(isForceMax);
1759  NWNX_PushArgumentInt(isElemental);
1760  NWNX_PushArgumentObject(target);
1761  NWNX_PushArgumentInt(bonusType);
1762  NWNX_PushArgumentObject(creature);
1763 
1764  NWNX_CallFunction(NWNX_Creature, sFunc);
1765  return NWNX_GetReturnValueInt();
1766 }
1767 
1768 void NWNX_Creature_SetOriginalName(object creature, string name, int isLastName)
1769 {
1770  string sFunc = "SetOriginalName";
1771 
1772  NWNX_PushArgumentInt(isLastName);
1774  NWNX_PushArgumentObject(creature);
1775 
1776  NWNX_CallFunction(NWNX_Creature, sFunc);
1777 }
1778 
1779 string NWNX_Creature_GetOriginalName(object creature, int isLastName)
1780 {
1781  string sFunc = "GetOriginalName";
1782 
1783  NWNX_PushArgumentInt(isLastName);
1784  NWNX_PushArgumentObject(creature);
1785 
1786  NWNX_CallFunction(NWNX_Creature, sFunc);
1787  return NWNX_GetReturnValueString();
1788 }
1789 
1790 void NWNX_Creature_SetSpellResistance(object creature, int sr)
1791 {
1792  string sFunc = "SetSpellResistance";
1793 
1795  NWNX_PushArgumentObject(creature);
1796 
1797  NWNX_CallFunction(NWNX_Creature, sFunc);
1798 }
1799 
1800 void NWNX_Creature_SetAnimalCompanionCreatureType(object creature, int type)
1801 {
1802  string sFunc = "SetAnimalCompanionCreatureType";
1803 
1804  NWNX_PushArgumentInt(type);
1805  NWNX_PushArgumentObject(creature);
1806 
1807  NWNX_CallFunction(NWNX_Creature, sFunc);
1808 }
1809 
1810 void NWNX_Creature_SetFamiliarCreatureType(object creature, int type)
1811 {
1812  string sFunc = "SetFamiliarCreatureType";
1813 
1814  NWNX_PushArgumentInt(type);
1815  NWNX_PushArgumentObject(creature);
1816 
1817  NWNX_CallFunction(NWNX_Creature, sFunc);
1818 }
1819 
1820 void NWNX_Creature_SetAnimalCompanionName(object creature, string name)
1821 {
1822  string sFunc = "SetAnimalCompanionName";
1823 
1825  NWNX_PushArgumentObject(creature);
1826 
1827  NWNX_CallFunction(NWNX_Creature, sFunc);
1828 }
1829 
1830 void NWNX_Creature_SetFamiliarName(object creature, string name)
1831 {
1832  string sFunc = "SetFamiliarName";
1833 
1835  NWNX_PushArgumentObject(creature);
1836 
1837  NWNX_CallFunction(NWNX_Creature, sFunc);
1838 }
1839 
1840 int NWNX_Creature_GetDisarmable(object creature)
1841 {
1842  string sFunc = "GetDisarmable";
1843 
1844  NWNX_PushArgumentObject(creature);
1845 
1846  NWNX_CallFunction(NWNX_Creature, sFunc);
1847  return NWNX_GetReturnValueInt();
1848 }
1849 
1850 void NWNX_Creature_SetDisarmable(object creature, int disarmable)
1851 {
1852  string sFunc = "SetDisarmable";
1853 
1854  NWNX_PushArgumentInt(disarmable);
1855  NWNX_PushArgumentObject(creature);
1856 
1857  NWNX_CallFunction(NWNX_Creature, sFunc);
1858 }
1859 
1860 void NWNX_Creature_SetDomain(object creature, int class, int index, int domain)
1861 {
1862  string sFunc = "SetDomain";
1863 
1864  NWNX_PushArgumentInt(domain);
1865  NWNX_PushArgumentInt(index);
1866  NWNX_PushArgumentInt(class);
1867  NWNX_PushArgumentObject(creature);
1868 
1869  NWNX_CallFunction(NWNX_Creature, sFunc);
1870 }
1871 
1872 void NWNX_Creature_SetSpecialization(object creature, int class, int school)
1873 {
1874  string sFunc = "SetSpecialization";
1875 
1876  NWNX_PushArgumentInt(school);
1877  NWNX_PushArgumentInt(class);
1878  NWNX_PushArgumentObject(creature);
1879 
1880  NWNX_CallFunction(NWNX_Creature, sFunc);
1881 }
1882 
1883 void NWNX_Creature_SetFaction(object oCreature, int nFactionId)
1884 {
1885  string sFunc = "SetFaction";
1886  NWNX_PushArgumentInt(nFactionId);
1887  NWNX_PushArgumentObject(oCreature);
1888  NWNX_CallFunction(NWNX_Creature, sFunc);
1889 }
1890 
1891 int NWNX_Creature_GetFaction(object oCreature)
1892 {
1893  string sFunc = "GetFaction";
1894  NWNX_PushArgumentObject(oCreature);
1895  NWNX_CallFunction(NWNX_Creature, sFunc);
1896  return NWNX_GetReturnValueInt();
1897 }
1898 
1899 int NWNX_Creature_GetFlatFooted(object oCreature)
1900 {
1901  string sFunc = "GetFlatFooted";
1902  NWNX_PushArgumentObject(oCreature);
1903  NWNX_CallFunction(NWNX_Creature, sFunc);
1904  return NWNX_GetReturnValueInt();
1905 }
1906 
1907 string NWNX_Creature_SerializeQuickbar(object oCreature)
1908 {
1909  string sFunc = "SerializeQuickbar";
1910 
1911  NWNX_PushArgumentObject(oCreature);
1912  NWNX_CallFunction(NWNX_Creature, sFunc);
1913 
1914  return NWNX_GetReturnValueString();
1915 }
1916 
1917 int NWNX_Creature_DeserializeQuickbar(object oCreature, string sSerializedQuickbar)
1918 {
1919  string sFunc = "DeserializeQuickbar";
1920 
1921  NWNX_PushArgumentString(sSerializedQuickbar);
1922  NWNX_PushArgumentObject(oCreature);
1923 
1924  NWNX_CallFunction(NWNX_Creature, sFunc);
1925  return NWNX_GetReturnValueInt();
1926 }
1927 
1928 void NWNX_Creature_SetCasterLevelModifier(object oCreature, int nClass, int nModifier, int bPersist = FALSE)
1929 {
1930  string sFunc = "SetCasterLevelModifier";
1931 
1932  NWNX_PushArgumentInt(bPersist);
1933  NWNX_PushArgumentInt(nModifier);
1934  NWNX_PushArgumentInt(nClass);
1935  NWNX_PushArgumentObject(oCreature);
1936 
1937  NWNX_CallFunction(NWNX_Creature, sFunc);
1938 }
1939 
1940 int NWNX_Creature_GetCasterLevelModifier(object oCreature, int nClass)
1941 {
1942  string sFunc = "GetCasterLevelModifier";
1943 
1944  NWNX_PushArgumentInt(nClass);
1945  NWNX_PushArgumentObject(oCreature);
1946 
1947  NWNX_CallFunction(NWNX_Creature, sFunc);
1948  return NWNX_GetReturnValueInt();
1949 }
1950 
1951 void NWNX_Creature_SetCasterLevelOverride(object oCreature, int nClass, int nCasterLevel, int bPersist = FALSE)
1952 {
1953  string sFunc = "SetCasterLevelOverride";
1954 
1955  NWNX_PushArgumentInt(bPersist);
1956  NWNX_PushArgumentInt(nCasterLevel);
1957  NWNX_PushArgumentInt(nClass);
1958  NWNX_PushArgumentObject(oCreature);
1959 
1960  NWNX_CallFunction(NWNX_Creature, sFunc);
1961 }
1962 
1963 int NWNX_Creature_GetCasterLevelOverride(object oCreature, int nClass)
1964 {
1965  string sFunc = "GetCasterLevelOverride";
1966 
1967  NWNX_PushArgumentInt(nClass);
1968  NWNX_PushArgumentObject(oCreature);
1969 
1970  NWNX_CallFunction(NWNX_Creature, sFunc);
1971  return NWNX_GetReturnValueInt();
1972 }
1973 
1974 void NWNX_Creature_JumpToLimbo(object oCreature)
1975 {
1976  string sFunc = "JumpToLimbo";
1977  NWNX_PushArgumentObject(oCreature);
1978  NWNX_CallFunction(NWNX_Creature, sFunc);
1979 }
1980 
1981 void NWNX_Creature_SetCriticalMultiplierModifier(object oCreature, int nModifier, int nHand = 0, int bPersist = FALSE, int nBaseItem = -1)
1982 {
1983  string sFunc = "SetCriticalMultiplierModifier";
1984 
1985  NWNX_PushArgumentInt(nBaseItem);
1986  NWNX_PushArgumentInt(bPersist);
1987  NWNX_PushArgumentInt(nHand);
1988  NWNX_PushArgumentInt(nModifier);
1989  NWNX_PushArgumentObject(oCreature);
1990 
1991  NWNX_CallFunction(NWNX_Creature, sFunc);
1992 }
1993 
1994 int NWNX_Creature_GetCriticalMultiplierModifier(object oCreature, int nHand = 0, int nBaseItem = -1)
1995 {
1996  string sFunc = "GetCriticalMultiplierModifier";
1997 
1998  NWNX_PushArgumentInt(nBaseItem);
1999  NWNX_PushArgumentInt(nHand);
2000  NWNX_PushArgumentObject(oCreature);
2001 
2002  NWNX_CallFunction(NWNX_Creature, sFunc);
2003  return NWNX_GetReturnValueInt();
2004 }
2005 
2006 void NWNX_Creature_SetCriticalMultiplierOverride(object oCreature, int nOverride, int nHand = 0, int bPersist = FALSE, int nBaseItem = -1)
2007 {
2008  string sFunc = "SetCriticalMultiplierOverride";
2009 
2010  NWNX_PushArgumentInt(nBaseItem);
2011  NWNX_PushArgumentInt(bPersist);
2012  NWNX_PushArgumentInt(nHand);
2013  NWNX_PushArgumentInt(nOverride);
2014  NWNX_PushArgumentObject(oCreature);
2015 
2016  NWNX_CallFunction(NWNX_Creature, sFunc);
2017 }
2018 
2019 int NWNX_Creature_GetCriticalMultiplierOverride(object oCreature, int nHand = 0, int nBaseItem = -1)
2020 {
2021  string sFunc = "GetCriticalMultiplierOverride";
2022 
2023  NWNX_PushArgumentInt(nBaseItem);
2024  NWNX_PushArgumentInt(nHand);
2025  NWNX_PushArgumentObject(oCreature);
2026 
2027  NWNX_CallFunction(NWNX_Creature, sFunc);
2028  return NWNX_GetReturnValueInt();
2029 }
2030 
2031 void NWNX_Creature_SetCriticalRangeModifier(object oCreature, int nModifier, int nHand = 0, int bPersist = FALSE, int nBaseItem = -1)
2032 {
2033  string sFunc = "SetCriticalRangeModifier";
2034 
2035  NWNX_PushArgumentInt(nBaseItem);
2036  NWNX_PushArgumentInt(bPersist);
2037  NWNX_PushArgumentInt(nHand);
2038  NWNX_PushArgumentInt(nModifier);
2039  NWNX_PushArgumentObject(oCreature);
2040 
2041  NWNX_CallFunction(NWNX_Creature, sFunc);
2042 }
2043 
2044 int NWNX_Creature_GetCriticalRangeModifier(object oCreature, int nHand = 0, int nBaseItem = -1)
2045 {
2046  string sFunc = "GetCriticalRangeModifier";
2047 
2048  NWNX_PushArgumentInt(nBaseItem);
2049  NWNX_PushArgumentInt(nHand);
2050  NWNX_PushArgumentObject(oCreature);
2051 
2052  NWNX_CallFunction(NWNX_Creature, sFunc);
2053  return NWNX_GetReturnValueInt();
2054 }
2055 
2056 void NWNX_Creature_SetCriticalRangeOverride(object oCreature, int nOverride, int nHand = 0, int bPersist = FALSE, int nBaseItem = -1)
2057 {
2058  string sFunc = "SetCriticalRangeOverride";
2059 
2060  NWNX_PushArgumentInt(nBaseItem);
2061  NWNX_PushArgumentInt(bPersist);
2062  NWNX_PushArgumentInt(nHand);
2063  NWNX_PushArgumentInt(nOverride);
2064  NWNX_PushArgumentObject(oCreature);
2065 
2066  NWNX_CallFunction(NWNX_Creature, sFunc);
2067 }
2068 
2069 int NWNX_Creature_GetCriticalRangeOverride(object oCreature, int nHand = 0, int nBaseItem = -1)
2070 {
2071  string sFunc = "GetCriticalRangeOverride";
2072 
2073  NWNX_PushArgumentInt(nBaseItem);
2074  NWNX_PushArgumentInt(nHand);
2075  NWNX_PushArgumentObject(oCreature);
2076 
2077  NWNX_CallFunction(NWNX_Creature, sFunc);
2078  return NWNX_GetReturnValueInt();
2079 }
2080 
2081 void NWNX_Creature_AddAssociate(object oCreature, object oAssociate, int nAssociateType)
2082 {
2083  string sFunc = "AddAssociate";
2084 
2085  NWNX_PushArgumentInt(nAssociateType);
2086  NWNX_PushArgumentObject(oAssociate);
2087  NWNX_PushArgumentObject(oCreature);
2088 
2089  NWNX_CallFunction(NWNX_Creature, sFunc);
2090 }
2091 
2092 void NWNX_Creature_OverrideDamageLevel(object oCreature, int nDamageLevel)
2093 {
2094  string sFunc = "OverrideDamageLevel";
2095 
2096  NWNX_PushArgumentInt(nDamageLevel);
2097  NWNX_PushArgumentObject(oCreature);
2098  NWNX_CallFunction(NWNX_Creature, sFunc);
2099 }
2100 
2101 void NWNX_Creature_SetEncounter(object oCreature, object oEncounter)
2102 {
2103  string sFunc = "SetEncounter";
2104 
2105  NWNX_PushArgumentObject(oEncounter);
2106  NWNX_PushArgumentObject(oCreature);
2107  NWNX_CallFunction(NWNX_Creature, sFunc);
2108 }
2109 
2110 object NWNX_Creature_GetEncounter(object oCreature)
2111 {
2112  string sFunc = "GetEncounter";
2113 
2114  NWNX_PushArgumentObject(oCreature);
2115  NWNX_CallFunction(NWNX_Creature, sFunc);
2116 
2117  return NWNX_GetReturnValueObject();
2118 }
2119 
2120 int NWNX_Creature_GetIsBartering(object oCreature)
2121 {
2122  string sFunc = "GetIsBartering";
2123 
2124  NWNX_PushArgumentObject(oCreature);
2125  NWNX_CallFunction(NWNX_Creature, sFunc);
2126 
2127  return NWNX_GetReturnValueInt();
2128 }
2129 
2130 void NWNX_Creature_SetLastItemCasterLevel(object oCreature, int nCasterLvl)
2131 {
2132  string sFunc = "SetLastItemCasterLevel";
2133  NWNX_PushArgumentInt(nCasterLvl);
2134  NWNX_PushArgumentObject(oCreature);
2135  NWNX_CallFunction(NWNX_Creature, sFunc);
2136 }
2137 
2138 
2140 {
2141  string sFunc = "GetLastItemCasterLevel";
2142  NWNX_PushArgumentObject(oCreature);
2143  NWNX_CallFunction(NWNX_Creature, sFunc);
2144 
2145  return NWNX_GetReturnValueInt();
2146 }
2147 
2148 int NWNX_Creature_GetArmorClassVersus(object oAttacked, object oVersus, int nTouch=FALSE)
2149 {
2150  string sFunc = "GetArmorClassVersus";
2151  NWNX_PushArgumentInt(nTouch);
2152  NWNX_PushArgumentObject(oVersus);
2153  NWNX_PushArgumentObject(oAttacked);
2154  NWNX_CallFunction(NWNX_Creature, sFunc);
2155 
2156  return NWNX_GetReturnValueInt();
2157 }
2158 
2159 int NWNX_Creature_GetWalkAnimation(object oCreature)
2160 {
2161  string sFunc = "GetWalkAnimation";
2162  NWNX_PushArgumentObject(oCreature);
2163  NWNX_CallFunction(NWNX_Creature, sFunc);
2164 
2165  return NWNX_GetReturnValueInt();
2166 }
2167 
2168 void NWNX_Creature_SetWalkAnimation(object oCreature, int nAnimation)
2169 {
2170  string sFunc = "SetWalkAnimation";
2171  NWNX_PushArgumentInt(nAnimation);
2172  NWNX_PushArgumentObject(oCreature);
2173  NWNX_CallFunction(NWNX_Creature, sFunc);
2174 }
2175 
2176 void NWNX_Creature_SetAttackRollOverride(object oCreature, int nRoll, int nModifier)
2177 {
2178  string sFunc = "SetAttackRollOverride";
2179  NWNX_PushArgumentInt(nModifier);
2180  NWNX_PushArgumentInt(nRoll);
2181  NWNX_PushArgumentObject(oCreature);
2182  NWNX_CallFunction(NWNX_Creature, sFunc);
2183 }
2184 
2185 void NWNX_Creature_SetParryAllAttacks(object oCreature, int bParry)
2186 {
2187  string sFunc = "SetParryAllAttacks";
2188  NWNX_PushArgumentInt(bParry);
2189  NWNX_PushArgumentObject(oCreature);
2190  NWNX_CallFunction(NWNX_Creature, sFunc);
2191 }
2192 
2194 {
2195  string sFunc = "GetNoPermanentDeath";
2196 
2197  NWNX_PushArgumentObject(oCreature);
2198  NWNX_CallFunction(NWNX_Creature, sFunc);
2199 
2200  return NWNX_GetReturnValueInt();
2201 }
2202 
2203 void NWNX_Creature_SetNoPermanentDeath(object oCreature, int bNoPermanentDeath)
2204 {
2205  string sFunc = "SetNoPermanentDeath";
2206 
2207  NWNX_PushArgumentInt(bNoPermanentDeath);
2208  NWNX_PushArgumentObject(oCreature);
2209  NWNX_CallFunction(NWNX_Creature, sFunc);
2210 }
2211 
2212 vector NWNX_Creature_ComputeSafeLocation(object oCreature, vector vPosition, float fRadius = 20.0f, int bWalkStraightLineRequired = TRUE)
2213 {
2214  string sFunc = "ComputeSafeLocation";
2215 
2216  NWNX_PushArgumentInt(bWalkStraightLineRequired);
2217  NWNX_PushArgumentFloat(fRadius);
2218  NWNX_PushArgumentFloat(vPosition.x);
2219  NWNX_PushArgumentFloat(vPosition.y);
2220  NWNX_PushArgumentFloat(vPosition.z);
2221  NWNX_PushArgumentObject(oCreature);
2222  NWNX_CallFunction(NWNX_Creature, sFunc);
2223 
2224  vector v;
2225  v.z = NWNX_GetReturnValueFloat();
2226  v.y = NWNX_GetReturnValueFloat();
2227  v.x = NWNX_GetReturnValueFloat();
2228 
2229  return v;
2230 }
2231 
2232 void NWNX_Creature_DoPerceptionUpdateOnCreature(object oCreature, object oTargetCreature)
2233 {
2234  string sFunc = "DoPerceptionUpdateOnCreature";
2235 
2236  NWNX_PushArgumentObject(oTargetCreature);
2237  NWNX_PushArgumentObject(oCreature);
2238  NWNX_CallFunction(NWNX_Creature, sFunc);
2239 }
2240 
2241 float NWNX_Creature_GetPersonalSpace(object oCreature)
2242 {
2243  string sFunc = "GetPersonalSpace";
2244 
2245  NWNX_PushArgumentObject(oCreature);
2246  NWNX_CallFunction(NWNX_Creature, sFunc);
2247 
2248  return NWNX_GetReturnValueFloat();
2249 }
2250 
2251 void NWNX_Creature_SetPersonalSpace(object oCreature, float fPerspace)
2252 {
2253  string sFunc = "SetPersonalSpace";
2254 
2255  NWNX_PushArgumentFloat(fPerspace);
2256  NWNX_PushArgumentObject(oCreature);
2257  NWNX_CallFunction(NWNX_Creature, sFunc);
2258 }
2259 
2261 {
2262  string sFunc = "GetCreaturePersonalSpace";
2263 
2264  NWNX_PushArgumentObject(oCreature);
2265  NWNX_CallFunction(NWNX_Creature, sFunc);
2266 
2267  return NWNX_GetReturnValueFloat();
2268 }
2269 
2270 void NWNX_Creature_SetCreaturePersonalSpace(object oCreature, float fCrePerspace)
2271 {
2272  string sFunc = "SetCreaturePersonalSpace";
2273 
2274  NWNX_PushArgumentFloat(fCrePerspace);
2275  NWNX_PushArgumentObject(oCreature);
2276  NWNX_CallFunction(NWNX_Creature, sFunc);
2277 }
2278 
2279 float NWNX_Creature_GetHeight(object oCreature)
2280 {
2281  string sFunc = "GetHeight";
2282 
2283  NWNX_PushArgumentObject(oCreature);
2284  NWNX_CallFunction(NWNX_Creature, sFunc);
2285 
2286  return NWNX_GetReturnValueFloat();
2287 }
2288 
2289 void NWNX_Creature_SetHeight(object oCreature, float fHeight)
2290 {
2291  string sFunc = "SetHeight";
2292 
2293  NWNX_PushArgumentFloat(fHeight);
2294  NWNX_PushArgumentObject(oCreature);
2295  NWNX_CallFunction(NWNX_Creature, sFunc);
2296 }
2297 
2298 float NWNX_Creature_GetHitDistance(object oCreature)
2299 {
2300  string sFunc = "GetHitDistance";
2301 
2302  NWNX_PushArgumentObject(oCreature);
2303  NWNX_CallFunction(NWNX_Creature, sFunc);
2304 
2305  return NWNX_GetReturnValueFloat();
2306 }
2307 
2308 void NWNX_Creature_SetHitDistance(object oCreature, float fHitDist)
2309 {
2310  string sFunc = "SetHitDistance";
2311 
2312  NWNX_PushArgumentFloat(fHitDist);
2313  NWNX_PushArgumentObject(oCreature);
2314  NWNX_CallFunction(NWNX_Creature, sFunc);
2315 }
2316 
2318 {
2319  string sFunc = "GetPreferredAttackDistance";
2320 
2321  NWNX_PushArgumentObject(oCreature);
2322  NWNX_CallFunction(NWNX_Creature, sFunc);
2323 
2324  return NWNX_GetReturnValueFloat();
2325 }
2326 
2327 void NWNX_Creature_SetPreferredAttackDistance(object oCreature, float fPrefAtckDist)
2328 {
2329  string sFunc = "SetPreferredAttackDistance";
2330 
2331  NWNX_PushArgumentFloat(fPrefAtckDist);
2332  NWNX_PushArgumentObject(oCreature);
2333  NWNX_CallFunction(NWNX_Creature, sFunc);
2334 }
2335 
2337 {
2338  string sFunc = "GetArmorCheckPenalty";
2339 
2340  NWNX_PushArgumentObject(oCreature);
2341  NWNX_CallFunction(NWNX_Creature, sFunc);
2342  return NWNX_GetReturnValueInt();
2343 }
2344 
2346 {
2347  string sFunc = "GetShieldCheckPenalty";
2348 
2349  NWNX_PushArgumentObject(oCreature);
2350  NWNX_CallFunction(NWNX_Creature, sFunc);
2351  return NWNX_GetReturnValueInt();
2352 }
2353 
2354 void NWNX_Creature_SetBypassEffectImmunity(object oCreature, int nImmunityType, int nChance = 100, int bPersist = FALSE)
2355 {
2356  string sFunc = "SetBypassEffectImmunity";
2357 
2358  NWNX_PushArgumentInt(bPersist);
2359  NWNX_PushArgumentInt(nChance);
2360  NWNX_PushArgumentInt(nImmunityType);
2361  NWNX_PushArgumentObject(oCreature);
2362  NWNX_CallFunction(NWNX_Creature, sFunc);
2363 }
2364 
2365 int NWNX_Creature_GetBypassEffectImmunity(object oCreature, int nImmunityType)
2366 {
2367  string sFunc = "GetBypassEffectImmunity";
2368 
2369  NWNX_PushArgumentInt(nImmunityType);
2370  NWNX_PushArgumentObject(oCreature);
2371  NWNX_CallFunction(NWNX_Creature, sFunc);
2372  return NWNX_GetReturnValueInt();
2373 }
2374 
2375 void NWNX_Creature_SetLastKiller(object oCreature, object oKiller)
2376 {
2377  string sFunc = "SetLastKiller";
2378 
2379  NWNX_PushArgumentObject(oKiller);
2380  NWNX_PushArgumentObject(oCreature);
2381  NWNX_CallFunction(NWNX_Creature, sFunc);
2382 }
2383 
2384 void NWNX_Creature_DoItemCastSpell(object oCreature, object oTarget, location locTarget, int nSpellID, int nCasterLevel, float fProjectileTime, int nProjectilePathType = PROJECTILE_PATH_TYPE_DEFAULT, int nProjectileSpellID = -1, object oItem = OBJECT_INVALID, string sImpactScript = "")
2385 {
2386  string sFunc = "DoItemCastSpell";
2387 
2388  object oArea = GetAreaFromLocation(locTarget);
2389  vector vPosition = GetPositionFromLocation(locTarget);
2390 
2391  NWNX_PushArgumentString(sImpactScript);
2392  NWNX_PushArgumentObject(oItem);
2393  NWNX_PushArgumentInt(nProjectileSpellID);
2394  NWNX_PushArgumentInt(nProjectilePathType);
2395  NWNX_PushArgumentFloat(fProjectileTime);
2396  NWNX_PushArgumentInt(nCasterLevel);
2397  NWNX_PushArgumentInt(nSpellID);
2398  NWNX_PushArgumentFloat(vPosition.z);
2399  NWNX_PushArgumentFloat(vPosition.y);
2400  NWNX_PushArgumentFloat(vPosition.x);
2401  NWNX_PushArgumentObject(oArea);
2402  NWNX_PushArgumentObject(oTarget);
2403  NWNX_PushArgumentObject(oCreature);
2404  NWNX_CallFunction(NWNX_Creature, sFunc);
2405 }
2406 
2407 int NWNX_Creature_RunEquip(object oCreature, object oItem, int nInventorySlot)
2408 {
2409  string sFunc = "RunEquip";
2410 
2411  NWNX_PushArgumentInt(nInventorySlot);
2412  NWNX_PushArgumentObject(oItem);
2413  NWNX_PushArgumentObject(oCreature);
2414  NWNX_CallFunction(NWNX_Creature, sFunc);
2415 
2416  return NWNX_GetReturnValueInt();
2417 }
2418 
2419 int NWNX_Creature_RunUnequip(object oCreature, object oItem)
2420 {
2421  string sFunc = "RunUnequip";
2422 
2423  NWNX_PushArgumentObject(oItem);
2424  NWNX_PushArgumentObject(oCreature);
2425  NWNX_CallFunction(NWNX_Creature, sFunc);
2426 
2427  return NWNX_GetReturnValueInt();
2428 }
2429 
2430 void NWNX_Creature_OverrideRangedProjectileVFX(object oCreature, int nProjectileVFX, int bPersist = FALSE)
2431 {
2432  string sFunc = "OverrideRangedProjectileVFX";
2433 
2434  NWNX_PushArgumentInt(bPersist);
2435  NWNX_PushArgumentInt(nProjectileVFX);
2436  NWNX_PushArgumentObject(oCreature);
2437  NWNX_CallFunction(NWNX_Creature, sFunc);
2438 }
2439 
2440 void NWNX_Creature_SetInitiativeModifier(object oCreature, int nMod, int bPersist = FALSE)
2441 {
2442  string sFunc = "SetInitiativeModifier";
2443 
2444  NWNX_PushArgumentInt(bPersist);
2445  NWNX_PushArgumentInt(nMod);
2446  NWNX_PushArgumentObject(oCreature);
2447  NWNX_CallFunction(NWNX_Creature, sFunc);
2448 }
2449 
2451 {
2452  string sFunc = "GetInitiativeModifier";
2453 
2454  NWNX_PushArgumentObject(oCreature);
2455  NWNX_CallFunction(NWNX_Creature, sFunc);
2456  return NWNX_GetReturnValueInt();
2457 }
2458 
2459 object NWNX_Creature_GetBodyBag(object oCreature)
2460 {
2461  string sFunc = "GetBodyBag";
2462 
2463  NWNX_PushArgumentObject(oCreature);
2464  NWNX_CallFunction(NWNX_Creature, sFunc);
2465  return NWNX_GetReturnValueObject();
2466 }
2467 
2468 int NWNX_Creature_AddCastSpellActions(object oCreature, object oTarget, vector vTargetLocation, int nSpellID, int nMultiClass, int nMetaMagic = METAMAGIC_NONE, int nDomainLevel = 0, int nProjectilePathType = PROJECTILE_PATH_TYPE_DEFAULT, int bInstant = FALSE, int bClearActions = FALSE, int bAddToFront = FALSE)
2469 {
2470  string sFunc = "AddCastSpellActions";
2471 
2472  NWNX_PushArgumentInt(bAddToFront);
2473  NWNX_PushArgumentInt(bClearActions);
2474  NWNX_PushArgumentInt(bInstant);
2475  NWNX_PushArgumentInt(nProjectilePathType);
2476  NWNX_PushArgumentInt(nDomainLevel);
2477  NWNX_PushArgumentInt(nMetaMagic);
2478  NWNX_PushArgumentInt(nMultiClass);
2479  NWNX_PushArgumentInt(nSpellID);
2480  NWNX_PushArgumentFloat(vTargetLocation.z);
2481  NWNX_PushArgumentFloat(vTargetLocation.y);
2482  NWNX_PushArgumentFloat(vTargetLocation.x);
2483  NWNX_PushArgumentObject(oTarget);
2484  NWNX_PushArgumentObject(oCreature);
2485 
2486  NWNX_CallFunction(NWNX_Creature, sFunc);
2487  return NWNX_GetReturnValueInt();
2488 }
2489 
2490 int NWNX_Creature_GetIsFlanking(object oCreature, object oTargetCreature)
2491 {
2492  string sFunc = "GetIsFlanking";
2493 
2494  NWNX_PushArgumentObject(oTargetCreature);
2495  NWNX_PushArgumentObject(oCreature);
2496 
2497  NWNX_CallFunction(NWNX_Creature, sFunc);
2498  return NWNX_GetReturnValueInt();
2499 }
2500 
2501 void NWNX_Creature_DecrementRemainingSpellSlots(object oCreature, int nClass, int nSpellLevel)
2502 {
2503  string sFunc = "DecrementRemainingSpellSlots";
2504 
2505  NWNX_PushArgumentInt(nSpellLevel);
2506  NWNX_PushArgumentInt(nClass);
2507  NWNX_PushArgumentObject(oCreature);
2508 
2509  NWNX_CallFunction(NWNX_Creature, sFunc);
2510 }
2511 
2512 void NWNX_Creature_IncrementRemainingSpellSlots(object oCreature, int nClass, int nSpellLevel)
2513 {
2514  string sFunc = "IncrementRemainingSpellSlots";
2515 
2516  NWNX_PushArgumentInt(nSpellLevel);
2517  NWNX_PushArgumentInt(nClass);
2518  NWNX_PushArgumentObject(oCreature);
2519 
2520  NWNX_CallFunction(NWNX_Creature, sFunc);
2521 }
2522 
2524 {
2525  string sFunc = "GetMaximumBonusAttacks";
2526 
2527  NWNX_PushArgumentObject(oCreature);
2528  NWNX_CallFunction(NWNX_Creature, sFunc);
2529  return NWNX_GetReturnValueInt();
2530 }
2531 
2532 void NWNX_Creature_SetMaximumBonusAttacks(object oCreature, int nMaxBonusAttacks, int bPersist = FALSE)
2533 {
2534  string sFunc = "SetMaximumBonusAttacks";
2535 
2536  NWNX_PushArgumentInt(bPersist);
2537  NWNX_PushArgumentInt(nMaxBonusAttacks);
2538  NWNX_PushArgumentObject(oCreature);
2539  NWNX_CallFunction(NWNX_Creature, sFunc);
2540 }
2541 
2542 void NWNX_Creature_DoCleaveAttack(object oCreature)
2543 {
2544  string sFunc = "DoCleaveAttack";
2545 
2546  NWNX_PushArgumentObject(oCreature);
2547  NWNX_CallFunction(NWNX_Creature, sFunc);
2548 }
2549 
2551 {
2552  string sFunc = "GetLockOrientationToObject";
2553 
2554  NWNX_PushArgumentObject(oCreature);
2555  NWNX_CallFunction(NWNX_Creature, sFunc);
2556 
2557  return NWNX_GetReturnValueObject();
2558 }
2559 
2560 void NWNX_Creature_SetLockOrientationToObject(object oCreature, object oTarget)
2561 {
2562  string sFunc = "SetLockOrientationToObject";
2563 
2564  NWNX_PushArgumentObject(oTarget);
2565  NWNX_PushArgumentObject(oCreature);
2566  NWNX_CallFunction(NWNX_Creature, sFunc);
2567 }
2568 
2569 void NWNX_Creature_BroadcastAttackOfOpportunity(object oCreature, object oSingleCreature = OBJECT_INVALID, int bMovement = FALSE)
2570 {
2571  string sFunc = "BroadcastAttackOfOpportunity";
2572 
2573  NWNX_PushArgumentInt(bMovement);
2574  NWNX_PushArgumentObject(oSingleCreature);
2575  NWNX_PushArgumentObject(oCreature);
2576  NWNX_CallFunction(NWNX_Creature, sFunc);
2577 }
2578 
2579 int NWNX_Creature_GetMaxSellToStorePriceOverride(object oCreature, object oStore)
2580 {
2581  string sFunc = "GetMaxSellToStorePriceOverride";
2582 
2583  NWNX_PushArgumentObject(oStore);
2584  NWNX_PushArgumentObject(oCreature);
2585  NWNX_CallFunction(NWNX_Creature, sFunc);
2586 
2587  return NWNX_GetReturnValueInt();
2588 }
2589 
2590 void NWNX_Creature_SetMaxSellToStorePriceOverride(object oCreature, object oStore, int nMaxSellToPrice)
2591 {
2592  string sFunc = "SetMaxSellToStorePriceOverride";
2593 
2594  NWNX_PushArgumentInt(nMaxSellToPrice);
2595  NWNX_PushArgumentObject(oStore);
2596  NWNX_PushArgumentObject(oCreature);
2597  NWNX_CallFunction(NWNX_Creature, sFunc);
2598 }
2599 
2600 int NWNX_Creature_GetAbilityIncreaseByLevel(object oCreature, int nLevel)
2601 {
2602  string sFunc = "GetAbilityIncreaseByLevel";
2603 
2604  NWNX_PushArgumentInt(nLevel);
2605  NWNX_PushArgumentObject(oCreature);
2606  NWNX_CallFunction(NWNX_Creature, sFunc);
2607 
2608  return NWNX_GetReturnValueInt();
2609 }
2610 
2611 void NWNX_Creature_SetAbilityIncreaseByLevel(object oCreature, int nLevel, int nAbility)
2612 {
2613  string sFunc = "SetAbilityIncreaseByLevel";
2614 
2615  NWNX_PushArgumentInt(nAbility);
2616  NWNX_PushArgumentInt(nLevel);
2617  NWNX_PushArgumentObject(oCreature);
2618  NWNX_CallFunction(NWNX_Creature, sFunc);
2619 }
2620 
2621 float NWNX_Creature_GetMaxAttackRange(object oCreature, object oTarget)
2622 {
2623  string sFunc = "GetMaxAttackRange";
2624 
2625  NWNX_PushArgumentObject(oTarget);
2626  NWNX_PushArgumentObject(oCreature);
2627  NWNX_CallFunction(NWNX_Creature, sFunc);
2628 
2629  return NWNX_GetReturnValueFloat();
2630 }
2631 
2633 {
2634  string sFunc = "GetMulticlassLimit";
2635 
2636  NWNX_PushArgumentObject(oCreature);
2637  NWNX_CallFunction(NWNX_Creature, sFunc);
2638 
2639  return NWNX_GetReturnValueInt();
2640 }
2641 
2642 
2643 void NWNX_Creature_SetMulticlassLimit(object oCreature, int nLimit, int bPersist = FALSE)
2644 {
2645  string sFunc = "SetMulticlassLimit";
2646 
2647  NWNX_PushArgumentInt(bPersist);
2648  NWNX_PushArgumentInt(nLimit);
2649  NWNX_PushArgumentObject(oCreature);
2650  NWNX_CallFunction(NWNX_Creature, sFunc);
2651 }
NWNX_Creature_GetBypassEffectImmunity
int NWNX_Creature_GetBypassEffectImmunity(object oCreature, int nImmunityType)
Gets a chance for normal Effect Immunities to be bypassed.
Definition: nwnx_creature.nss:2365
NWNX_Creature_OverrideRangedProjectileVFX
void NWNX_Creature_OverrideRangedProjectileVFX(object oCreature, int nProjectileVFX, int bPersist=FALSE)
Override the elemental projectile visual effect of ranged/throwing weapons.
Definition: nwnx_creature.nss:2430
NWNX_CREATURE_MOVEMENT_RATE_NORMAL
const int NWNX_CREATURE_MOVEMENT_RATE_NORMAL
Definition: nwnx_creature.nss:18
NWNX_Creature_SetCreaturePersonalSpace
void NWNX_Creature_SetCreaturePersonalSpace(object oCreature, float fCrePerspace)
Set a creatures creature personal space (meters from center to other creatures).
Definition: nwnx_creature.nss:2270
NWNX_CREATURE_BONUS_TYPE_TOUCH_ATTACK
const int NWNX_CREATURE_BONUS_TYPE_TOUCH_ATTACK
Definition: nwnx_creature.nss:47
NWNX_Creature_GetMulticlassLimit
int NWNX_Creature_GetMulticlassLimit(object oCreature)
Returns the creature's multiclass limit.
Definition: nwnx_creature.nss:2632
NWNX_Creature_SetLockOrientationToObject
void NWNX_Creature_SetLockOrientationToObject(object oCreature, object oTarget)
Locks oCreature's orientation to always face oTarget.
Definition: nwnx_creature.nss:2560
NWNX_GetReturnValueInt
int NWNX_GetReturnValueInt()
Returns the specified type from the c++ side.
Definition: nwnx.nss:94
NWNX_Creature_GetCriticalMultiplierOverride
int NWNX_Creature_GetCriticalMultiplierOverride(object oCreature, int nHand=0, int nBaseItem=-1)
Gets the critical hit multiplier override for the Creature.
Definition: nwnx_creature.nss:2019
NWNX_Creature_RemoveKnownSpell
void NWNX_Creature_RemoveKnownSpell(object creature, int class, int level, int spellId)
Remove a spell from creature's spellbook for class.
Definition: nwnx_creature.nss:1307
NWNX_CREATURE_BONUS_TYPE_ATTACK
const int NWNX_CREATURE_BONUS_TYPE_ATTACK
Definition: nwnx_creature.nss:42
NWNX_Creature_RestoreItems
void NWNX_Creature_RestoreItems(object creature)
Restore uses for all items carried by the creature.
Definition: nwnx_creature.nss:1524
NWNX_Creature_SetSkillPointsRemaining
void NWNX_Creature_SetSkillPointsRemaining(object creature, int skillpoints)
Sets the creature's remaining unspent skill points.
Definition: nwnx_creature.nss:1551
NWNX_Creature_GetLastItemCasterLevel
int NWNX_Creature_GetLastItemCasterLevel(object oCreature)
Gets the caster level of the last item used.
Definition: nwnx_creature.nss:2139
NWNX_Creature_AddFeatByLevel
void NWNX_Creature_AddFeatByLevel(object creature, int feat, int level)
Gives the creature a feat assigned at a level.
Definition: nwnx_creature.nss:1038
NWNX_Creature_GetSpecialAbility
struct NWNX_Creature_SpecialAbility NWNX_Creature_GetSpecialAbility(object creature, int index)
Returns the creature's special ability at a given index.
Definition: nwnx_creature.nss:1145
NWNX_Creature_GetOriginalName
string NWNX_Creature_GetOriginalName(object creature, int isLastName)
Get the original first or last name of creature.
Definition: nwnx_creature.nss:1779
NWNX_CREATURE_BONUS_TYPE_SKILL
const int NWNX_CREATURE_BONUS_TYPE_SKILL
Definition: nwnx_creature.nss:46
NWNX_Creature_GetArmorCheckPenalty
int NWNX_Creature_GetArmorCheckPenalty(object oCreature)
Get the skill penalty from wearing armor.
Definition: nwnx_creature.nss:2336
NWNX_Creature_GetMaxHitPointsByLevel
int NWNX_Creature_GetMaxHitPointsByLevel(object creature, int level)
Gets the maximum hit points for creature for level.
Definition: nwnx_creature.nss:1344
NWNX_Creature_SpecialAbility::ready
int ready
Whether it can be used.
Definition: nwnx_creature.nss:71
NWNX_Creature_SetWalkRateCap
void NWNX_Creature_SetWalkRateCap(object creature, float fWalkRate=2000.0f)
Sets the maximum movement rate a creature can have while walking (not running)
Definition: nwnx_creature.nss:1600
NWNX_CREATURE_PROJECTILE_VFX_NONE
const int NWNX_CREATURE_PROJECTILE_VFX_NONE
No VFX.
Definition: nwnx_creature.nss:55
NWNX_Creature_SetNoPermanentDeath
void NWNX_Creature_SetNoPermanentDeath(object oCreature, int bNoPermanentDeath)
Sets the NoPermanentDeath flag of oCreature.
Definition: nwnx_creature.nss:2203
NWNX_Creature_DoItemCastSpell
void NWNX_Creature_DoItemCastSpell(object oCreature, object oTarget, location locTarget, int nSpellID, int nCasterLevel, float fProjectileTime, int nProjectilePathType=PROJECTILE_PATH_TYPE_DEFAULT, int nProjectileSpellID=-1, object oItem=OBJECT_INVALID, string sImpactScript="")
Instantly cast a spell at a target or location.
Definition: nwnx_creature.nss:2384
NWNX_Creature_SetDomain
void NWNX_Creature_SetDomain(object creature, int class, int index, int domain)
Sets one of creature's domains.
Definition: nwnx_creature.nss:1860
NWNX_Creature_AddFeat
void NWNX_Creature_AddFeat(object creature, int feat)
Gives the creature a feat.
Definition: nwnx_creature.nss:1029
NWNX_Creature_GetIsBartering
int NWNX_Creature_GetIsBartering(object oCreature)
Get if oCreature is currently bartering.
Definition: nwnx_creature.nss:2120
NWNX_CREATURE_MOVEMENT_RATE_SLOW
const int NWNX_CREATURE_MOVEMENT_RATE_SLOW
Definition: nwnx_creature.nss:17
NWNX_Creature_SetSkillRankByLevel
void NWNX_Creature_SetSkillRankByLevel(object creature, int skill, int rank, int level)
Set the ranks in a skill for creature assigned at a level.
Definition: nwnx_creature.nss:1456
NWNX_Creature_GetFeatByLevel
int NWNX_Creature_GetFeatByLevel(object creature, int level, int index)
Returns the feat learned at the level and index.
Definition: nwnx_creature.nss:1091
NWNX_Creature_GetMovementRateFactor
float NWNX_Creature_GetMovementRateFactor(object creature)
Returns the creature's current movement rate factor.
Definition: nwnx_creature.nss:1376
NWNX_CREATURE_PROJECTILE_VFX_ELECTRICAL
const int NWNX_CREATURE_PROJECTILE_VFX_ELECTRICAL
Definition: nwnx_creature.nss:58
NWNX_Creature_GetHeight
float NWNX_Creature_GetHeight(object oCreature)
Get a creatures height.
Definition: nwnx_creature.nss:2279
NWNX_Creature_GetPrePolymorphAbilityScore
int NWNX_Creature_GetPrePolymorphAbilityScore(object creature, int ability)
Gets the raw ability score a polymorphed creature had prior to polymorphing.
Definition: nwnx_creature.nss:1272
NWNX_Creature_RestoreSpecialAbilities
void NWNX_Creature_RestoreSpecialAbilities(object creature)
Restore all creature special ability uses.
Definition: nwnx_creature.nss:1516
NWNX_Creature_SetMovementRateFactor
void NWNX_Creature_SetMovementRateFactor(object creature, float rate)
Sets the creature's current movement rate factor.
Definition: nwnx_creature.nss:1385
NWNX_Creature_GetTotalEffectBonus
int NWNX_Creature_GetTotalEffectBonus(object creature, int bonusType=NWNX_CREATURE_BONUS_TYPE_ATTACK, object target=OBJECT_INVALID, int isElemental=0, int isForceMax=0, int savetype=-1, int saveSpecificType=-1, int skill=-1, int abilityScore=-1, int isOffhand=FALSE)
Get total effect bonus.
Definition: nwnx_creature.nss:1749
NWNX_Creature_SetCriticalRangeOverride
void NWNX_Creature_SetCriticalRangeOverride(object oCreature, int nOverride, int nHand=0, int bPersist=FALSE, int nBaseItem=-1)
Sets the critical hit range Override for the creature.
Definition: nwnx_creature.nss:2056
NWNX_Creature_GetSkillPointsRemainingByLevel
int NWNX_Creature_GetSkillPointsRemainingByLevel(object creature, int level)
Gets the creature's remaining unspent skill points for level.
Definition: nwnx_creature.nss:1560
NWNX_Creature_SetLastItemCasterLevel
void NWNX_Creature_SetLastItemCasterLevel(object oCreature, int nCasterLvl)
Sets caster level for the last item used. Use in a spellhook or spell event before to set caster leve...
Definition: nwnx_creature.nss:2130
NWNX_CREATURE_PROJECTILE_VFX_ACID
const int NWNX_CREATURE_PROJECTILE_VFX_ACID
Definition: nwnx_creature.nss:56
NWNX_Creature_SetPersonalSpace
void NWNX_Creature_SetPersonalSpace(object oCreature, float fPerspace)
Set a creatures personal space (meters from center to non-creature objects).
Definition: nwnx_creature.nss:2251
NWNX_Creature_LevelDown
void NWNX_Creature_LevelDown(object creature, int count=1)
Remove last levels from a creature.
Definition: nwnx_creature.nss:1659
NWNX_Creature_SetPreferredAttackDistance
void NWNX_Creature_SetPreferredAttackDistance(object oCreature, float fPrefAtckDist)
Set a creatures preferred attack distance.
Definition: nwnx_creature.nss:2327
NWNX_Creature_GetCriticalMultiplierModifier
int NWNX_Creature_GetCriticalMultiplierModifier(object oCreature, int nHand=0, int nBaseItem=-1)
Gets the critical hit multiplier modifier for the Creature.
Definition: nwnx_creature.nss:1994
NWNX_Creature_SetMaxSellToStorePriceOverride
void NWNX_Creature_SetMaxSellToStorePriceOverride(object oCreature, object oStore, int nMaxSellToPrice)
Overrides the maximum price oStore will buy items from oCreature for.
Definition: nwnx_creature.nss:2590
NWNX_Creature_IncrementRemainingSpellSlots
void NWNX_Creature_IncrementRemainingSpellSlots(object oCreature, int nClass, int nSpellLevel)
Increments the remaining spell slots (innate casting) at a class level.
Definition: nwnx_creature.nss:2512
NWNX_Creature_GetFaction
int NWNX_Creature_GetFaction(object oCreature)
Gets the faction id from oCreature.
Definition: nwnx_creature.nss:1891
NWNX_Creature_SetMulticlassLimit
void NWNX_Creature_SetMulticlassLimit(object oCreature, int nLimit, int bPersist=FALSE)
Sets the creature's multiclass limit.
Definition: nwnx_creature.nss:2643
NWNX_Creature_SetDisarmable
void NWNX_Creature_SetDisarmable(object creature, int disarmable)
Set whether a creature can be disarmed.
Definition: nwnx_creature.nss:1850
NWNX_Creature_SetRacialType
void NWNX_Creature_SetRacialType(object creature, int racialtype)
Sets the creature's racial type.
Definition: nwnx_creature.nss:1582
NWNX_Creature_SetMaximumBonusAttacks
void NWNX_Creature_SetMaximumBonusAttacks(object oCreature, int nMaxBonusAttacks, int bPersist=FALSE)
Sets the maximum number of bonus attacks a creature can have from EffectModifyAttacks().
Definition: nwnx_creature.nss:2532
NWNX_Creature_GetRemainingSpellSlots
int NWNX_Creature_GetRemainingSpellSlots(object creature, int class, int level)
Gets the remaining spell slots (innate casting) at a class level's index.
Definition: nwnx_creature.nss:1283
NWNX_Creature_GetMovementRateFactorCap
float NWNX_Creature_GetMovementRateFactorCap(object creature)
Returns the creature's maximum movement rate cap.
Definition: nwnx_creature.nss:1395
NWNX_Creature_SetClassByPosition
void NWNX_Creature_SetClassByPosition(object creature, int position, int classID, int bUpdateLevels=TRUE)
Set the class ID in a particular position for a creature.
Definition: nwnx_creature.nss:1468
NWNX_Creature_SetOriginalName
void NWNX_Creature_SetOriginalName(object creature, string name, int isLastName)
Set the original first or last name of creature.
Definition: nwnx_creature.nss:1768
NWNX_Creature_SetSpecialAbility
void NWNX_Creature_SetSpecialAbility(object creature, int index, struct NWNX_Creature_SpecialAbility ability)
Sets a special ability at the index for the creature.
Definition: nwnx_creature.nss:1195
NWNX_Creature_GetFeatGrantLevel
int NWNX_Creature_GetFeatGrantLevel(object creature, int feat)
Returns the creature level where the specified feat was learned.
Definition: nwnx_creature.nss:1113
NWNX_Creature_GetFlatFooted
int NWNX_Creature_GetFlatFooted(object oCreature)
Get whether a creature is flat-footed.
Definition: nwnx_creature.nss:1899
NWNX_CREATURE_MOVEMENT_RATE_VERY_FAST
const int NWNX_CREATURE_MOVEMENT_RATE_VERY_FAST
Definition: nwnx_creature.nss:20
NWNX_Creature_GetAttacksPerRound
int NWNX_Creature_GetAttacksPerRound(object creature, int bBaseAPR=FALSE)
Gets the creatures current attacks per round (using equipped weapon).
Definition: nwnx_creature.nss:1498
NWNX_Creature_SetSkillRank
void NWNX_Creature_SetSkillRank(object creature, int skill, int rank)
Set the base ranks in a skill for creature.
Definition: nwnx_creature.nss:1434
NWNX_CREATURE_MOVEMENT_TYPE_STATIONARY
const int NWNX_CREATURE_MOVEMENT_TYPE_STATIONARY
Definition: nwnx_creature.nss:30
NWNX_CREATURE_MOVEMENT_RATE_DEFAULT
const int NWNX_CREATURE_MOVEMENT_RATE_DEFAULT
Definition: nwnx_creature.nss:21
NWNX_Creature_GetArmorClassVersus
int NWNX_Creature_GetArmorClassVersus(object oAttacked, object oVersus, int nTouch=FALSE)
Gets the Armor classed of attacked against versus.
Definition: nwnx_creature.nss:2148
NWNX_Creature_SetCriticalRangeModifier
void NWNX_Creature_SetCriticalRangeModifier(object oCreature, int nModifier, int nHand=0, int bPersist=FALSE, int nBaseItem=-1)
Sets the critical hit range modifier for the creature.
Definition: nwnx_creature.nss:2031
NWNX_Creature_GetEncounter
object NWNX_Creature_GetEncounter(object oCreature)
Get the encounter source of oCreature.
Definition: nwnx_creature.nss:2110
NWNX_GetReturnValueFloat
float NWNX_GetReturnValueFloat()
Returns the specified type from the c++ side.
Definition: nwnx.nss:99
NWNX_Creature_GetBaseAC
int NWNX_Creature_GetBaseAC(object creature)
Get the base AC for the creature.
Definition: nwnx_creature.nss:1229
NWNX_Creature_GetDisarmable
int NWNX_Creature_GetDisarmable(object creature)
Get whether the creature can be disarmed.
Definition: nwnx_creature.nss:1840
NWNX_Creature_SetCasterLevelOverride
void NWNX_Creature_SetCasterLevelOverride(object oCreature, int nClass, int nCasterLevel, int bPersist=FALSE)
Sets a caster level override for oCreature.
Definition: nwnx_creature.nss:1951
NWNX_Creature_GetIsFlanking
int NWNX_Creature_GetIsFlanking(object oCreature, object oTargetCreature)
Get whether oCreature is flanking oTargetCreature.
Definition: nwnx_creature.nss:2490
NWNX_Creature_SetCriticalMultiplierOverride
void NWNX_Creature_SetCriticalMultiplierOverride(object oCreature, int nOverride, int nHand=0, int bPersist=FALSE, int nBaseItem=-1)
Sets the critical hit multiplier override for the Creature.
Definition: nwnx_creature.nss:2006
NWNX_Creature_DoCleaveAttack
void NWNX_Creature_DoCleaveAttack(object oCreature)
Inserts a cleave or great cleave attack into oCreature's current attack round against the nearest ene...
Definition: nwnx_creature.nss:2542
NWNX_Creature_SetChallengeRating
void NWNX_Creature_SetChallengeRating(object creature, float fCR)
Sets the creature's challenge rating.
Definition: nwnx_creature.nss:1668
NWNX_Creature_RemoveFeat
void NWNX_Creature_RemoveFeat(object creature, int feat)
Removes a feat from a creature.
Definition: nwnx_creature.nss:1049
NWNX_Creature_GetClassByLevel
int NWNX_Creature_GetClassByLevel(object creature, int level)
Get the class taken by the creature at the provided level.
Definition: nwnx_creature.nss:1208
NWNX_CallFunction
void NWNX_CallFunction(string pluginName, string functionName)
Scripting interface to NWNX.
Definition: nwnx.nss:54
NWNX_CREATURE_BONUS_TYPE_ABILITY
const int NWNX_CREATURE_BONUS_TYPE_ABILITY
Definition: nwnx_creature.nss:45
NWNX_Creature_SpecialAbility::level
int level
The level of the ability.
Definition: nwnx_creature.nss:72
NWNX_Creature_GetNoPermanentDeath
int NWNX_Creature_GetNoPermanentDeath(object oCreature)
Gets the NoPermanentDeath flag of oCreature.
Definition: nwnx_creature.nss:2193
NWNX_Creature_RunUnequip
int NWNX_Creature_RunUnequip(object oCreature, object oItem)
Have oCreature instantly unequip oItem.
Definition: nwnx_creature.nss:2419
NWNX_Creature_SetMovementRateFactorCap
void NWNX_Creature_SetMovementRateFactorCap(object creature, float cap)
Sets the creature's maximum movement rate cap.
Definition: nwnx_creature.nss:1404
NWNX_CREATURE_MOVEMENT_RATE_IMMOBILE
const int NWNX_CREATURE_MOVEMENT_RATE_IMMOBILE
Definition: nwnx_creature.nss:15
NWNX_Creature_GetBodyBag
object NWNX_Creature_GetBodyBag(object oCreature)
Gets the Body Bag of a creature.
Definition: nwnx_creature.nss:2459
NWNX_Creature_GetAbilityIncreaseByLevel
int NWNX_Creature_GetAbilityIncreaseByLevel(object oCreature, int nLevel)
Returns the creature's ability increase for nLevel.
Definition: nwnx_creature.nss:2600
NWNX_GetReturnValueString
string NWNX_GetReturnValueString()
Returns the specified type from the c++ side.
Definition: nwnx.nss:109
NWNX_Creature_GetSkillRankByLevel
int NWNX_Creature_GetSkillRankByLevel(object creature, int skill, int level)
Get the ranks in a skill for creature assigned at a level.
Definition: nwnx_creature.nss:1444
NWNX_Creature_SetLevelByPosition
void NWNX_Creature_SetLevelByPosition(object creature, int position, int level)
Set the level at the given position for a creature.
Definition: nwnx_creature.nss:1479
NWNX_Creature_GetMaxSpellSlots
int NWNX_Creature_GetMaxSpellSlots(object creature, int class, int level)
Gets the maximum spell slots (innate casting) at a class level.
Definition: nwnx_creature.nss:1331
NWNX_PushArgumentString
void NWNX_PushArgumentString(string value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:74
NWNX_Creature_GetCriticalRangeModifier
int NWNX_Creature_GetCriticalRangeModifier(object oCreature, int nHand=0, int nBaseItem=-1)
Gets the critical hit range modifier for the creature.
Definition: nwnx_creature.nss:2044
NWNX_Creature_GetCasterLevelModifier
int NWNX_Creature_GetCasterLevelModifier(object oCreature, int nClass)
Gets the current caster level modifier for oCreature.
Definition: nwnx_creature.nss:1940
NWNX_Creature_SetRawAbilityScore
void NWNX_Creature_SetRawAbilityScore(object creature, int ability, int value)
Sets the ability score of the creature to the provided value.
Definition: nwnx_creature.nss:1239
NWNX_Creature_SetWalkAnimation
void NWNX_Creature_SetWalkAnimation(object oCreature, int nAnimation)
Sets the current walk animation of oCreature.
Definition: nwnx_creature.nss:2168
NWNX_Creature_GetLockOrientationToObject
object NWNX_Creature_GetLockOrientationToObject(object oCreature)
Gets the current object oCreature's orientation is locked to.
Definition: nwnx_creature.nss:2550
NWNX_Creature_SpecialAbility
A creature special ability.
Definition: nwnx_creature.nss:68
NWNX_Creature_SetAbilityIncreaseByLevel
void NWNX_Creature_SetAbilityIncreaseByLevel(object oCreature, int nLevel, int nAbility)
Sets the creature's ability increase for nLevel.
Definition: nwnx_creature.nss:2611
NWNX_Creature_SetBypassEffectImmunity
void NWNX_Creature_SetBypassEffectImmunity(object oCreature, int nImmunityType, int nChance=100, int bPersist=FALSE)
Sets a chance for normal Effect Immunities to be bypassed.
Definition: nwnx_creature.nss:2354
NWNX_Creature_GetMaxAttackRange
float NWNX_Creature_GetMaxAttackRange(object oCreature, object oTarget)
Returns the creature's maximum attack range to a target.
Definition: nwnx_creature.nss:2621
NWNX_Creature_SetCorpseDecayTime
void NWNX_Creature_SetCorpseDecayTime(object creature, int nDecayTime)
Sets corpse decay time in milliseconds.
Definition: nwnx_creature.nss:1618
NWNX_Creature_SetFaction
void NWNX_Creature_SetFaction(object oCreature, int nFactionId)
Sets oCreatures faction to be the faction with id nFactionId.
Definition: nwnx_creature.nss:1883
NWNX_Creature_RunEquip
int NWNX_Creature_RunEquip(object oCreature, object oItem, int nInventorySlot)
Have oCreature instantly equip oItem to nInventorySlot.
Definition: nwnx_creature.nss:2407
NWNX_CREATURE_PROJECTILE_VFX_FIRE
const int NWNX_CREATURE_PROJECTILE_VFX_FIRE
Definition: nwnx_creature.nss:59
NWNX_Creature_GetSkillPointsRemaining
int NWNX_Creature_GetSkillPointsRemaining(object creature)
Gets the creature's remaining unspent skill points.
Definition: nwnx_creature.nss:1541
NWNX_PushArgumentObject
void NWNX_PushArgumentObject(object value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:69
NWNX_Creature_DoPerceptionUpdateOnCreature
void NWNX_Creature_DoPerceptionUpdateOnCreature(object oCreature, object oTargetCreature)
Update oCreature's perception of oTargetCreature.
Definition: nwnx_creature.nss:2232
NWNX_Creature_SetRemainingSpellSlots
void NWNX_Creature_SetRemainingSpellSlots(object creature, int class, int level, int slots)
Sets the remaining spell slots (innate casting) at a class level.
Definition: nwnx_creature.nss:1295
NWNX_Creature_GetHitDistance
float NWNX_Creature_GetHitDistance(object oCreature)
Get a creatures hit distance.
Definition: nwnx_creature.nss:2298
NWNX_Creature_SetSpellResistance
void NWNX_Creature_SetSpellResistance(object creature, int sr)
Set creature's spell resistance.
Definition: nwnx_creature.nss:1790
NWNX_Creature_SetFeatRemainingUses
void NWNX_Creature_SetFeatRemainingUses(object creature, int feat, int uses)
Set feat remaining uses.
Definition: nwnx_creature.nss:1738
NWNX_Creature_SetAttackRollOverride
void NWNX_Creature_SetAttackRollOverride(object oCreature, int nRoll, int nModifier)
Changes the attack modifier depending on the dice roll. Used to skip autofail on 1 and autosucceed on...
Definition: nwnx_creature.nss:2176
NWNX_Creature_RemoveSpecialAbility
void NWNX_Creature_RemoveSpecialAbility(object creature, int index)
Removes a special ability from a creature.
Definition: nwnx_creature.nss:1185
NWNX_Creature_SetMovementRate
void NWNX_Creature_SetMovementRate(object creature, int rate)
Set creature's movement rate.
Definition: nwnx_creature.nss:1366
NWNX_PushArgumentInt
void NWNX_PushArgumentInt(int value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:59
NWNX_Creature_GetFeatCountByLevel
int NWNX_Creature_GetFeatCountByLevel(object creature, int level)
Returns the count of feats learned at the provided level.
Definition: nwnx_creature.nss:1080
NWNX_Creature_RemoveFeatByLevel
void NWNX_Creature_RemoveFeatByLevel(object creature, int feat, int level)
Removes the creature a feat assigned at a level.
Definition: nwnx_creature.nss:1058
NWNX_Creature_GetCasterLevelOverride
int NWNX_Creature_GetCasterLevelOverride(object oCreature, int nClass)
Gets the current caster level override for oCreature.
Definition: nwnx_creature.nss:1963
NWNX_Creature_SetInitiativeModifier
void NWNX_Creature_SetInitiativeModifier(object oCreature, int nMod, int bPersist=FALSE)
Sets a custom Initiative modifier.
Definition: nwnx_creature.nss:2440
NWNX_CREATURE_BONUS_TYPE_DAMAGE
const int NWNX_CREATURE_BONUS_TYPE_DAMAGE
Definition: nwnx_creature.nss:43
NWNX_Creature_SetSkillPointsRemainingByLevel
void NWNX_Creature_SetSkillPointsRemainingByLevel(object creature, int level, int value)
Sets the creature's remaining unspent skill points for level.
Definition: nwnx_creature.nss:1571
NWNX_Creature_GetFeatCount
int NWNX_Creature_GetFeatCount(object creature)
Get the total number of feats known by creature.
Definition: nwnx_creature.nss:1103
NWNX_Creature_DeserializeQuickbar
int NWNX_Creature_DeserializeQuickbar(object oCreature, string sSerializedQuickbar)
Deserialize sSerializedQuickbar for oCreature.
Definition: nwnx_creature.nss:1917
NWNX_Creature_SpecialAbility::id
int id
The spell id.
Definition: nwnx_creature.nss:70
NWNX_Creature_SetCasterLevelModifier
void NWNX_Creature_SetCasterLevelModifier(object oCreature, int nClass, int nModifier, int bPersist=FALSE)
Sets a caster level modifier for oCreature.
Definition: nwnx_creature.nss:1928
NWNX_Creature_GetFeatRemainingUses
int NWNX_Creature_GetFeatRemainingUses(object creature, int feat)
Get feat remaining uses.
Definition: nwnx_creature.nss:1716
NWNX_CREATURE_MOVEMENT_RATE_PC
const int NWNX_CREATURE_MOVEMENT_RATE_PC
Definition: nwnx_creature.nss:14
NWNX_Creature_SetAlignmentLawChaos
void NWNX_Creature_SetAlignmentLawChaos(object creature, int value)
Set creature's raw law/chaos alignment value.
Definition: nwnx_creature.nss:1424
NWNX_Creature_SetCriticalMultiplierModifier
void NWNX_Creature_SetCriticalMultiplierModifier(object oCreature, int nModifier, int nHand=0, int bPersist=FALSE, int nBaseItem=-1)
Sets the critical hit multiplier modifier for the Creature.
Definition: nwnx_creature.nss:1981
NWNX_Creature_LevelUp
void NWNX_Creature_LevelUp(object creature, int class, int count=1, int package=PACKAGE_INVALID)
Add levels of class to the creature, bypassing all validation.
Definition: nwnx_creature.nss:1648
NWNX_Creature_GetMaxSellToStorePriceOverride
int NWNX_Creature_GetMaxSellToStorePriceOverride(object oCreature, object oStore)
Returns the maximum price oStore will buy items from oCreature for.
Definition: nwnx_creature.nss:2579
NWNX_Creature_GetRawAbilityScore
int NWNX_Creature_GetRawAbilityScore(object creature, int ability)
Gets the ability score of the creature.
Definition: nwnx_creature.nss:1250
NWNX_CREATURE_MOVEMENT_TYPE_SIDESTEP
const int NWNX_CREATURE_MOVEMENT_TYPE_SIDESTEP
Definition: nwnx_creature.nss:33
NWNX_Creature_GetBaseSavingThrow
int NWNX_Creature_GetBaseSavingThrow(object creature, int which)
Gets the creature's base save.
Definition: nwnx_creature.nss:1628
NWNX_CREATURE_BONUS_TYPE_SAVING_THROW
const int NWNX_CREATURE_BONUS_TYPE_SAVING_THROW
Definition: nwnx_creature.nss:44
NWNX_Creature_GetKnowsFeat
int NWNX_Creature_GetKnowsFeat(object creature, int feat)
Determines if the creature knows a feat.
Definition: nwnx_creature.nss:1069
NWNX_CREATURE_PROJECTILE_VFX_COLD
const int NWNX_CREATURE_PROJECTILE_VFX_COLD
Definition: nwnx_creature.nss:57
NWNX_Creature_GetFeatByIndex
int NWNX_Creature_GetFeatByIndex(object creature, int index)
Returns the creature's feat at a given index.
Definition: nwnx_creature.nss:1123
NWNX_CREATURE_MOVEMENT_RATE_DM_FAST
const int NWNX_CREATURE_MOVEMENT_RATE_DM_FAST
Definition: nwnx_creature.nss:22
NWNX_Creature_SetHitDistance
void NWNX_Creature_SetHitDistance(object oCreature, float fHitDist)
Set a creatures hit distance.
Definition: nwnx_creature.nss:2308
NWNX_CREATURE_MOVEMENT_TYPE_RUN
const int NWNX_CREATURE_MOVEMENT_TYPE_RUN
Definition: nwnx_creature.nss:32
NWNX_Creature_SetSpecialization
void NWNX_Creature_SetSpecialization(object creature, int class, int school)
Sets creature's specialist school.
Definition: nwnx_creature.nss:1872
NWNX_Creature_RestoreFeats
void NWNX_Creature_RestoreFeats(object creature)
Restore all creature feat uses.
Definition: nwnx_creature.nss:1508
NWNX_Creature_GetAttackBonus
int NWNX_Creature_GetAttackBonus(object creature, int isMelee=-1, int isTouchAttack=FALSE, int isOffhand=FALSE, int includeBaseAttackBonus=TRUE)
Returns the creature's highest attack bonus based on its own stats.
Definition: nwnx_creature.nss:1677
NWNX_Creature_SetGold
void NWNX_Creature_SetGold(object creature, int gold)
Sets the creature's gold without sending a feedback message.
Definition: nwnx_creature.nss:1609
NWNX_Creature_GetInitiativeModifier
int NWNX_Creature_GetInitiativeModifier(object oCreature)
Gets the custom Initiative modifier.
Definition: nwnx_creature.nss:2450
NWNX_Creature_SetAlignmentGoodEvil
void NWNX_Creature_SetAlignmentGoodEvil(object creature, int value)
Set creature's raw good/evil alignment value.
Definition: nwnx_creature.nss:1414
NWNX_Creature_AddKnownSpell
void NWNX_Creature_AddKnownSpell(object creature, int class, int level, int spellId)
Add a spell to a creature's spellbook for class.
Definition: nwnx_creature.nss:1319
NWNX_Creature_SetAnimalCompanionName
void NWNX_Creature_SetAnimalCompanionName(object creature, string name)
Set creature's animal companion's name.
Definition: nwnx_creature.nss:1820
NWNX_Creature_GetMaximumBonusAttacks
int NWNX_Creature_GetMaximumBonusAttacks(object oCreature)
Gets the maximum number of bonus attacks a creature can have from EffectModifyAttacks().
Definition: nwnx_creature.nss:2523
NWNX_Creature_GetWalkAnimation
int NWNX_Creature_GetWalkAnimation(object oCreature)
Gets the current walk animation of oCreature.
Definition: nwnx_creature.nss:2159
NWNX_Creature_AddSpecialAbility
void NWNX_Creature_AddSpecialAbility(object creature, struct NWNX_Creature_SpecialAbility ability)
Adds a special ability to a creature.
Definition: nwnx_creature.nss:1173
NWNX_Creature_GetMovementType
int NWNX_Creature_GetMovementType(object creature)
Returns the creature's current movement type.
Definition: nwnx_creature.nss:1591
NWNX_CREATURE_MOVEMENT_RATE_VERY_SLOW
const int NWNX_CREATURE_MOVEMENT_RATE_VERY_SLOW
Definition: nwnx_creature.nss:16
NWNX_Creature_DecrementRemainingSpellSlots
void NWNX_Creature_DecrementRemainingSpellSlots(object oCreature, int nClass, int nSpellLevel)
Decrements the remaining spell slots (innate casting) at a class level.
Definition: nwnx_creature.nss:2501
NWNX_CREATURE_PROJECTILE_VFX_RANDOM
const int NWNX_CREATURE_PROJECTILE_VFX_RANDOM
Random Elemental VFX.
Definition: nwnx_creature.nss:61
NWNX_Creature_ModifyRawAbilityScore
void NWNX_Creature_ModifyRawAbilityScore(object creature, int ability, int modifier)
Adjusts the ability score of a creature.
Definition: nwnx_creature.nss:1261
NWNX_CREATURE_MOVEMENT_TYPE_WALK_BACKWARDS
const int NWNX_CREATURE_MOVEMENT_TYPE_WALK_BACKWARDS
Definition: nwnx_creature.nss:34
NWNX_Creature_AddCastSpellActions
int NWNX_Creature_AddCastSpellActions(object oCreature, object oTarget, vector vTargetLocation, int nSpellID, int nMultiClass, int nMetaMagic=METAMAGIC_NONE, int nDomainLevel=0, int nProjectilePathType=PROJECTILE_PATH_TYPE_DEFAULT, int bInstant=FALSE, int bClearActions=FALSE, int bAddToFront=FALSE)
Add a cast spell action to oCreature's action queue.
Definition: nwnx_creature.nss:2468
NWNX_GetReturnValueObject
object NWNX_GetReturnValueObject()
Returns the specified type from the c++ side.
Definition: nwnx.nss:104
NWNX_Creature_GetHighestLevelOfFeat
int NWNX_Creature_GetHighestLevelOfFeat(object creature, int feat)
Get highest level version of feat possessed by creature.
Definition: nwnx_creature.nss:1705
NWNX_Creature_GetPreferredAttackDistance
float NWNX_Creature_GetPreferredAttackDistance(object oCreature)
Get a creatures preferred attack distance.
Definition: nwnx_creature.nss:2317
NWNX_CREATURE_PROJECTILE_VFX_SONIC
const int NWNX_CREATURE_PROJECTILE_VFX_SONIC
Definition: nwnx_creature.nss:60
NWNX_Creature_SetParryAllAttacks
void NWNX_Creature_SetParryAllAttacks(object oCreature, int bParry)
Works like the tweak but can be turned on and off for all creatures or single ones.
Definition: nwnx_creature.nss:2185
NWNX_Creature_JumpToLimbo
void NWNX_Creature_JumpToLimbo(object oCreature)
Move a creature to limbo.
Definition: nwnx_creature.nss:1974
NWNX_Creature_AddAssociate
void NWNX_Creature_AddAssociate(object oCreature, object oAssociate, int nAssociateType)
Add oAssociate as nAssociateType to oCreature.
Definition: nwnx_creature.nss:2081
NWNX_Creature_GetFeatTotalUses
int NWNX_Creature_GetFeatTotalUses(object creature, int feat)
Get feat total uses.
Definition: nwnx_creature.nss:1727
NWNX_Creature_SetAnimalCompanionCreatureType
void NWNX_Creature_SetAnimalCompanionCreatureType(object creature, int type)
Set creature's animal companion creature type.
Definition: nwnx_creature.nss:1800
NWNX_Creature_GetCreaturePersonalSpace
float NWNX_Creature_GetCreaturePersonalSpace(object oCreature)
Get a creatures creature personal space (meters from center to other creatures).
Definition: nwnx_creature.nss:2260
NWNX_CREATURE_ABILITY_NONE
const int NWNX_CREATURE_ABILITY_NONE
Definition: nwnx_creature.nss:64
NWNX_Creature_SetLastKiller
void NWNX_Creature_SetLastKiller(object oCreature, object oKiller)
Sets the killer of oCreature to oKiller.
Definition: nwnx_creature.nss:2375
NWNX_Creature_GetShieldCheckPenalty
int NWNX_Creature_GetShieldCheckPenalty(object oCreature)
Get the skill penalty from wearing a shield.
Definition: nwnx_creature.nss:2345
NWNX_Creature_BroadcastAttackOfOpportunity
void NWNX_Creature_BroadcastAttackOfOpportunity(object oCreature, object oSingleCreature=OBJECT_INVALID, int bMovement=FALSE)
Causes oCreature to broadcast an Attack of Opportunity against themself.
Definition: nwnx_creature.nss:2569
NWNX_Creature_SetBaseSavingThrow
void NWNX_Creature_SetBaseSavingThrow(object creature, int which, int value)
Sets the creature's base save.
Definition: nwnx_creature.nss:1638
NWNX_Creature_SetFamiliarCreatureType
void NWNX_Creature_SetFamiliarCreatureType(object creature, int type)
Set creature's familiar creature type.
Definition: nwnx_creature.nss:1810
NWNX_Creature_GetSpecialAbilityCount
int NWNX_Creature_GetSpecialAbilityCount(object creature)
Gets the count of special abilities of the creature.
Definition: nwnx_creature.nss:1163
NWNX_Creature_SetMaxHitPointsByLevel
void NWNX_Creature_SetMaxHitPointsByLevel(object creature, int level, int value)
Sets the maximum hit points for creature.
Definition: nwnx_creature.nss:1355
NWNX_PushArgumentFloat
void NWNX_PushArgumentFloat(float value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:64
NWNX_Creature_SetHeight
void NWNX_Creature_SetHeight(object oCreature, float fHeight)
Set a creatures height.
Definition: nwnx_creature.nss:2289
NWNX_Creature_ComputeSafeLocation
vector NWNX_Creature_ComputeSafeLocation(object oCreature, vector vPosition, float fRadius=20.0f, int bWalkStraightLineRequired=TRUE)
Compute a safe location for oCreature.
Definition: nwnx_creature.nss:2212
NWNX_Creature_SetSize
void NWNX_Creature_SetSize(object creature, int size)
Sets the creature size.
Definition: nwnx_creature.nss:1532
NWNX_Creature_GetCriticalRangeOverride
int NWNX_Creature_GetCriticalRangeOverride(object oCreature, int nHand=0, int nBaseItem=-1)
Sets the critical hit range Override for the creature.
Definition: nwnx_creature.nss:2069
NWNX_Creature_SetFamiliarName
void NWNX_Creature_SetFamiliarName(object creature, string name)
Set creature's familiar's name.
Definition: nwnx_creature.nss:1830
NWNX_Creature_GetMeetsFeatRequirements
int NWNX_Creature_GetMeetsFeatRequirements(object creature, int feat)
Gets if creature meets feat requirements.
Definition: nwnx_creature.nss:1134
NWNX_CREATURE_MOVEMENT_RATE_FAST
const int NWNX_CREATURE_MOVEMENT_RATE_FAST
Definition: nwnx_creature.nss:19
NWNX_Creature_SetEncounter
void NWNX_Creature_SetEncounter(object oCreature, object oEncounter)
Set the encounter source of oCreature.
Definition: nwnx_creature.nss:2101
NWNX_Creature_OverrideDamageLevel
void NWNX_Creature_OverrideDamageLevel(object oCreature, int nDamageLevel)
Override the damage level of oCreature.
Definition: nwnx_creature.nss:2092
NWNX_Creature_SetBaseAC
void NWNX_Creature_SetBaseAC(object creature, int ac)
Sets the base AC for the creature.
Definition: nwnx_creature.nss:1219
NWNX_Creature_GetPersonalSpace
float NWNX_Creature_GetPersonalSpace(object oCreature)
Get a creatures personal space (meters from center to non-creature objects).
Definition: nwnx_creature.nss:2241
NWNX_Creature_SerializeQuickbar
string NWNX_Creature_SerializeQuickbar(object oCreature)
Serialize oCreature's quickbar to a base64 string.
Definition: nwnx_creature.nss:1907
NWNX_Creature_SetBaseAttackBonus
void NWNX_Creature_SetBaseAttackBonus(object creature, int bab)
Set creature's base attack bonus (BAB).
Definition: nwnx_creature.nss:1489
NWNX_CREATURE_MOVEMENT_TYPE_WALK
const int NWNX_CREATURE_MOVEMENT_TYPE_WALK
Definition: nwnx_creature.nss:31