Updated scripts to use MyPRCGetRacialType

Updated scripts to use MyPRCGetRacialType.  Full compile.
This commit is contained in:
Jaysyn904 2022-09-28 21:36:29 -04:00
parent 8994c41256
commit 0b86a6485c
81 changed files with 142 additions and 74 deletions

View File

@ -11169,7 +11169,7 @@
},
"Version": {
"type": "dword",
"value": 86
"value": 87
},
"Width": {
"type": "int",

View File

@ -2913,7 +2913,7 @@
},
"Version": {
"type": "dword",
"value": 8
"value": 9
},
"Width": {
"type": "int",

View File

@ -555,7 +555,7 @@
"Text": {
"type": "cexolocstring",
"value": {
"0": "You turn to flee and hear the undead being behind you laughing riotously. Suddenly, you feel a supernatural force hurly you down to the bottom of the pyramid, and you know that you have failed these tests."
"0": "You turn to flee and hear the undead being behind you laughing riotously. Suddenly, you feel a supernatural force hurl you down to the bottom of the pyramid, and you know that you have failed these tests."
}
}
},

View File

@ -3462,6 +3462,21 @@
"type": "int",
"value": 1
}
},
{
"__struct_id": 0,
"Name": {
"type": "cexostring",
"value": "PRC_PNP_SHIFTER_BONUS"
},
"Type": {
"type": "dword",
"value": 1
},
"Value": {
"type": "int",
"value": 255
}
}
]
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
_module/ncs/ms_name_inc.ncs Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -3,6 +3,7 @@
//Created by: 69MEH69
#include "nw_i0_generic"
#include "prc_inc_racial"
void main()
{
@ -16,7 +17,7 @@ void main()
int nCurrent = GetCurrentHitPoints(oTarget);
int nBase = GetMaxHitPoints(oTarget);
if(GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
if(MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
{
if(nCurrent < nBase && !GetIsDead(oTarget))
{
@ -28,7 +29,7 @@ void main()
}
}
}
else if(GetRacialType(oTarget) != RACIAL_TYPE_UNDEAD)
else if(MyPRCGetRacialType(oTarget) != RACIAL_TYPE_UNDEAD)
{
if(nCurrent < nBase && !GetIsDead(oTarget))
{

View File

@ -4,6 +4,7 @@
///////////////////////////////////
#include "NW_I0_GENERIC"
#include "prc_inc_racial"
const int BattleCryChance = 15;
const int CombatCryChance = 20;
@ -83,7 +84,7 @@ void DoBattleCry()
if (d100()<=BattleCryChance)
{
if (HasSpoken()) return;
if ((GetRacialType(OBJECT_SELF) == RACIAL_TYPE_UNDEAD)&&(d100()<=CustomUndeadChance))
if ((MyPRCGetRacialType(OBJECT_SELF) == RACIAL_TYPE_UNDEAD)&&(d100()<=CustomUndeadChance))
{
DoUndeadChatter();
}
@ -111,7 +112,7 @@ void DoCombatCry()
if (d100()<=CombatCryChance)
{
if (HasSpoken()) return;
if ((GetRacialType(OBJECT_SELF) == RACIAL_TYPE_UNDEAD)&&(d100()<=CustomUndeadChance))
if ((MyPRCGetRacialType(OBJECT_SELF) == RACIAL_TYPE_UNDEAD)&&(d100()<=CustomUndeadChance))
switch (d6()) //Turned undead :)
{
case 1 : ActionSpeakString(COLOR_YELLOW+"It Burns! It Burns!",TALKVOLUME_TALK); break;
@ -137,7 +138,7 @@ void DoCombatCry()
if (d100()<=CombatCryChance)
{
if (HasSpoken()) return;
if ((GetRacialType(OBJECT_SELF) == RACIAL_TYPE_UNDEAD)&&(d100()<=CustomUndeadChance))
if ((MyPRCGetRacialType(OBJECT_SELF) == RACIAL_TYPE_UNDEAD)&&(d100()<=CustomUndeadChance))
switch (d6())
{
DoUndeadChatter();
@ -161,7 +162,7 @@ void DoDeathCry()
if (d100()<=DeathCryChance)
{
if (HasSpoken()) return;
if ((GetRacialType(OBJECT_SELF) == RACIAL_TYPE_UNDEAD)&&(d100()<=CustomUndeadChance))
if ((MyPRCGetRacialType(OBJECT_SELF) == RACIAL_TYPE_UNDEAD)&&(d100()<=CustomUndeadChance))
switch (d6())
{
case 1 : ActionSpeakString(COLOR_RED+"Dead by dawn! Dead by dawn!",TALKVOLUME_TALK); break;

View File

@ -1,3 +1,5 @@
#include "prc_inc_racial"
const float fUnlifespan = 300.0;
string SpawnOf(object oSpawnKiller = OBJECT_INVALID)
@ -126,8 +128,8 @@ int UndeadCheck(object oMyKiller)
int iPassed = 0;
int iSpawnVFX = VFX_FNF_SUMMON_UNDEAD;
object oMyKiller = GetLastKiller();
int iRace = GetRacialType(OBJECT_SELF);
int iKillerRace = GetRacialType(oMyKiller);
int iRace = MyPRCGetRacialType(OBJECT_SELF);
int iKillerRace = MyPRCGetRacialType(oMyKiller);
int iKillerUndeadClass = GetLevelByClass(CLASS_TYPE_UNDEAD, oMyKiller);
object oLeft = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,oMyKiller);
object oRight = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oMyKiller);

View File

@ -1,3 +1,6 @@
#include "prc_inc_racial"
// void main (){}
// VOICE CONFIGURATION - NEW IN 1.07 and UP
// Set this to 0 if you want to DISABLE listening by NPCs for performance reasons.
@ -672,7 +675,7 @@ void SmokePipe(object oActivator)
// Set height based on race and gender
if (GetGender(oActivator) == GENDER_MALE)
{
switch (GetRacialType(oActivator))
switch (MyPRCGetRacialType(oActivator))
{
case RACIAL_TYPE_HUMAN:
case RACIAL_TYPE_HALFELF: fHeight = 1.7; fDistance = 0.12; break;
@ -686,7 +689,7 @@ void SmokePipe(object oActivator)
else
{
// FEMALES
switch (GetRacialType(oActivator))
switch (MyPRCGetRacialType(oActivator))
{
case RACIAL_TYPE_HUMAN:
case RACIAL_TYPE_HALFELF: fHeight = 1.6; fDistance = 0.12; break;
@ -712,7 +715,7 @@ void SmokePipe(object oActivator)
// puff of smoke above and in front of head
AssignCommand(oActivator, ActionDoCommand(ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SMOKE_PUFF), lAboveHead)));
// if female, turn head to left
if ((GetGender(oActivator) == GENDER_FEMALE) && (GetRacialType(oActivator) != RACIAL_TYPE_DWARF))
if ((GetGender(oActivator) == GENDER_FEMALE) && (MyPRCGetRacialType(oActivator) != RACIAL_TYPE_DWARF))
AssignCommand(oActivator, ActionPlayAnimation(ANIMATION_FIREFORGET_HEAD_TURN_LEFT, 1.0, 5.0));
}
@ -1093,7 +1096,7 @@ string dmwand_Inventory(object oEntity)
string dmwand_Race(object oEntity)
{
switch (GetRacialType(oEntity))
switch (MyPRCGetRacialType(oEntity))
{
case RACIAL_TYPE_ABERRATION: return "Aberration"; break;
case RACIAL_TYPE_ALL: return "All"; break;

View File

@ -23,6 +23,7 @@
#include "dmfi_string_inc"
#include "dmfi_plchlishk_i"
#include "dmfi_db_inc"
#include "prc_inc_racial"
const int DMFI_LOG_CONVERSATION = TRUE; // turn on or off logging of conversation text
@ -754,7 +755,7 @@ void SmokePipe(object oActivator)
// Set height based on race and gender
if (GetGender(oActivator) == GENDER_MALE)
{
switch (GetRacialType(oActivator))
switch (MyPRCGetRacialType(oActivator))
{
case RACIAL_TYPE_HUMAN:
case RACIAL_TYPE_HALFELF: fHeight = 1.7; fDistance = 0.12; break;
@ -768,7 +769,7 @@ void SmokePipe(object oActivator)
else
{
// FEMALES
switch (GetRacialType(oActivator))
switch (MyPRCGetRacialType(oActivator))
{
case RACIAL_TYPE_HUMAN:
case RACIAL_TYPE_HALFELF: fHeight = 1.6; fDistance = 0.12; break;
@ -794,7 +795,7 @@ void SmokePipe(object oActivator)
// puff of smoke above and in front of head
AssignCommand(oActivator, ActionDoCommand(ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SMOKE_PUFF), lAboveHead)));
// if female, turn head to left
if ((GetGender(oActivator) == GENDER_FEMALE) && (GetRacialType(oActivator) != RACIAL_TYPE_DWARF))
if ((GetGender(oActivator) == GENDER_FEMALE) && (MyPRCGetRacialType(oActivator) != RACIAL_TYPE_DWARF))
AssignCommand(oActivator, ActionPlayAnimation(ANIMATION_FIREFORGET_HEAD_TURN_LEFT, 1.0, 5.0));
}
@ -2571,7 +2572,7 @@ string TranslateCommonToLanguage(int iLang, string sText)
////////////////////////////////////////////////////////////////////////
int GetDefaultRacialLanguage(object oPC, int iRename)
{
switch (GetRacialType(oPC))
switch (MyPRCGetRacialType(oPC))
{
case RACIAL_TYPE_DWARF: if (iRename) SetLocalString(oPC, "hls_MyLanguageName", "Dwarven");return 4; break;
case RACIAL_TYPE_ELF:

View File

@ -1,3 +1,4 @@
#include "prc_inc_racial"
//Smoking Function by Jason Robinson
location GetLocationAboveAndInFrontOf(object oPC, float fDist, float fHeight)
{
@ -31,7 +32,7 @@ void SmokePipe(object oActivator)
// Set height based on race and gender
if (GetGender(oActivator) == GENDER_MALE)
{
switch (GetRacialType(oActivator))
switch (MyPRCGetRacialType(oActivator))
{
case RACIAL_TYPE_HUMAN:
case RACIAL_TYPE_HALFELF: fHeight = 1.7; fDistance = 0.12; break;
@ -45,7 +46,7 @@ void SmokePipe(object oActivator)
else
{
// FEMALES
switch (GetRacialType(oActivator))
switch (MyPRCGetRacialType(oActivator))
{
case RACIAL_TYPE_HUMAN:
case RACIAL_TYPE_HALFELF: fHeight = 1.6; fDistance = 0.12; break;
@ -71,7 +72,7 @@ void SmokePipe(object oActivator)
// puff of smoke above and in front of head
AssignCommand(oActivator, ActionDoCommand(ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SMOKE_PUFF), lAboveHead)));
// if female, turn head to left
if ((GetGender(oActivator) == GENDER_FEMALE) && (GetRacialType(oActivator) != RACIAL_TYPE_DWARF))
if ((GetGender(oActivator) == GENDER_FEMALE) && (MyPRCGetRacialType(oActivator) != RACIAL_TYPE_DWARF))
AssignCommand(oActivator, ActionPlayAnimation(ANIMATION_FIREFORGET_HEAD_TURN_LEFT, 1.0, 5.0));
}

View File

@ -1,7 +1,20 @@
#include "prc_inc_racial"
int StartingConditional()
{
int iResult;
iResult = (GetClassByPosition(1, OBJECT_SELF) == CLASS_TYPE_ARCANE_ARCHER || GetClassByPosition(2, OBJECT_SELF) == CLASS_TYPE_ARCANE_ARCHER || GetClassByPosition(3, OBJECT_SELF) == CLASS_TYPE_ARCANE_ARCHER || GetClassByPosition(3, OBJECT_SELF) == CLASS_TYPE_INVALID) && (GetRacialType(OBJECT_SELF) == RACIAL_TYPE_ELF || GetRacialType(OBJECT_SELF) == RACIAL_TYPE_HALFELF) && (GetBaseAttackBonus(OBJECT_SELF) >= 6) && (GetHasFeat(FEAT_WEAPON_FOCUS_LONGBOW, OBJECT_SELF) || GetHasFeat(FEAT_WEAPON_FOCUS_SHORTBOW, OBJECT_SELF)) && (GetHasFeat(FEAT_POINT_BLANK_SHOT, OBJECT_SELF)) && (GetLevelByClass(CLASS_TYPE_SORCERER, OBJECT_SELF) >= 1 || GetLevelByClass(CLASS_TYPE_WIZARD, OBJECT_SELF) >= 1) && (GetLevelByClass(CLASS_TYPE_ARCANE_ARCHER, OBJECT_SELF) != 40);
iResult = (GetClassByPosition(1, OBJECT_SELF) == CLASS_TYPE_ARCANE_ARCHER ||
GetClassByPosition(2, OBJECT_SELF) == CLASS_TYPE_ARCANE_ARCHER ||
GetClassByPosition(3, OBJECT_SELF) == CLASS_TYPE_ARCANE_ARCHER ||
GetClassByPosition(3, OBJECT_SELF) == CLASS_TYPE_INVALID) &&
(MyPRCGetRacialType(OBJECT_SELF) == RACIAL_TYPE_ELF ||
MyPRCGetRacialType(OBJECT_SELF) == RACIAL_TYPE_HALFELF) &&
(GetBaseAttackBonus(OBJECT_SELF) >= 6) &&
(GetHasFeat(FEAT_WEAPON_FOCUS_LONGBOW, OBJECT_SELF) ||
GetHasFeat(FEAT_WEAPON_FOCUS_SHORTBOW, OBJECT_SELF)) &&
(GetHasFeat(FEAT_POINT_BLANK_SHOT, OBJECT_SELF)) &&
(GetLevelByClass(CLASS_TYPE_SORCERER, OBJECT_SELF) >= 1 ||
GetLevelByClass(CLASS_TYPE_WIZARD, OBJECT_SELF) >= 1) &&
(GetLevelByClass(CLASS_TYPE_ARCANE_ARCHER, OBJECT_SELF) != 40);
return iResult;
}

View File

@ -1,7 +1,17 @@
#include "prc_inc_racial"
int StartingConditional()
{
int iResult;
iResult = (GetClassByPosition(1, OBJECT_SELF) == CLASS_TYPE_DWARVENDEFENDER || GetClassByPosition(2, OBJECT_SELF) == CLASS_TYPE_DWARVENDEFENDER || GetClassByPosition(3, OBJECT_SELF) == CLASS_TYPE_DWARVENDEFENDER || GetClassByPosition(3, OBJECT_SELF) == CLASS_TYPE_INVALID) && (GetHasFeat(FEAT_DODGE, OBJECT_SELF)) && (GetHasFeat(FEAT_TOUGHNESS, OBJECT_SELF)) && (GetLevelByClass(CLASS_TYPE_DWARVENDEFENDER, OBJECT_SELF) != 40) && (GetRacialType(OBJECT_SELF) == RACIAL_TYPE_DWARF) && (GetAlignmentLawChaos(OBJECT_SELF) == ALIGNMENT_LAWFUL);
iResult = (GetClassByPosition(1, OBJECT_SELF) == CLASS_TYPE_DWARVENDEFENDER ||
GetClassByPosition(2, OBJECT_SELF) == CLASS_TYPE_DWARVENDEFENDER ||
GetClassByPosition(3, OBJECT_SELF) == CLASS_TYPE_DWARVENDEFENDER ||
GetClassByPosition(3, OBJECT_SELF) == CLASS_TYPE_INVALID) &&
(GetHasFeat(FEAT_DODGE, OBJECT_SELF)) &&
(GetHasFeat(FEAT_TOUGHNESS, OBJECT_SELF)) &&
(GetLevelByClass(CLASS_TYPE_DWARVENDEFENDER, OBJECT_SELF) != 40)
&& (MyPRCGetRacialType(OBJECT_SELF) == RACIAL_TYPE_DWARF)
&& (GetAlignmentLawChaos(OBJECT_SELF) == ALIGNMENT_LAWFUL);
return iResult;
}

View File

@ -314,7 +314,7 @@ void main()
// Min. Amount of Rounds between each breath use. See readme for counter defaults. Def: 3
// Default checks for dragon flying automatic turning on of flying.
if(GetLevelByClass(CLASS_TYPE_DRAGON) || GetRacialType(OBJECT_SELF) == RACIAL_TYPE_DRAGON)
if(GetLevelByClass(CLASS_TYPE_DRAGON) || MyPRCGetRacialType(OBJECT_SELF) == RACIAL_TYPE_DRAGON)
{
SetSpawnInCondition(AI_FLAG_COMBAT_FLYING, AI_COMBAT_MASTER);
// This turns ON combat flying. I think anything winged looks A-OK. See readme for info.

View File

@ -1729,7 +1729,7 @@ int AI_EquipAndAttack()
// Monk levels
nMonkLevels = GetLevelByClass(CLASS_TYPE_MONK);
if(!nMonkLevels) nMonkLevels = 1;
nTargetCreatureRace = GetRacialType(GlobalMeleeTarget);//done later.
nTargetCreatureRace = MyPRCGetRacialType(GlobalMeleeTarget);//done later.
nTargetAlignment = GetAlignmentGoodEvil(GlobalMeleeTarget);
// Now, monk, can it be done...
if((!GetIsObjectValid(oEquipped) ||
@ -2637,7 +2637,7 @@ int AI_AttemptGrenadeThrowing(object oTarget)
// We have a valid item grenade. We then throw it (or attempt to!)
// - Check holy grenade not firing Versus non-undead
if(ItemHostRanged == SPELL_GRENADE_HOLY &&
GetRacialType(oTarget) != RACIAL_TYPE_UNDEAD)
MyPRCGetRacialType(oTarget) != RACIAL_TYPE_UNDEAD)
{
// Stop as they are not undead
return FALSE;
@ -4487,7 +4487,7 @@ int AI_AttemptHealingSelf()
// Determine what we should heal at...
int nPercent = GetBoundriedAIInteger(AI_HEALING_US_PERCENT, 50, 100, 1);
int nRace = GetRacialType(OBJECT_SELF);
int nRace = MyPRCGetRacialType(OBJECT_SELF);
// What % are we at? It is GlobalOurPercentHP
// Are we under the right %?
@ -4654,7 +4654,7 @@ int AI_AttemptCureCondition()
while(GetIsObjectValid(oHeal) && GetDistanceToObject(oHeal) <= 20.0)
{
// Don't target undead
if(GetRacialType(oHeal) != RACIAL_TYPE_UNDEAD)
if(MyPRCGetRacialType(oHeal) != RACIAL_TYPE_UNDEAD)
{
// Go through possible effects in priority order.
nEffectHex = GetLocalInt(oHeal, AI_EFFECT_HEX);
@ -4985,7 +4985,7 @@ int AI_AttemptHealingAlly()
oLoopTarget = GetLocalObject(OBJECT_SELF, ARRAY_ALLIES_RANGE_SEEN + IntToString(nCnt));
while(GetIsObjectValid(oLoopTarget))
{
if(GetRacialType(oLoopTarget) != RACIAL_TYPE_CONSTRUCT &&
if(MyPRCGetRacialType(oLoopTarget) != RACIAL_TYPE_CONSTRUCT &&
(GetAssociateType(oLoopTarget) == ASSOCIATE_TYPE_NONE || bSummonHeal == TRUE))
{
// We do actually not ALWAYS use the nearest dead person, nor
@ -5013,7 +5013,7 @@ int AI_AttemptHealingAlly()
// Did we find someone to heal?
if(nChosenPercentHitPoints > 0)
{
int nAllyHealRace = GetRacialType(oAllyToHeal);
int nAllyHealRace = MyPRCGetRacialType(oAllyToHeal);
// Undead - negative energy heals!
if(nAllyHealRace == RACIAL_TYPE_UNDEAD)
{
@ -5817,7 +5817,7 @@ int AI_AttemptFeatTurning()
if(!GetIsFriend(oTarget))
{
nHD = GetHitDice(oTarget) + GetTurnResistanceHD(oTarget);
nRacial = GetRacialType(oTarget);
nRacial = MyPRCGetRacialType(oTarget);
// Planar creatures add spell resistance (don't bother if can't turn them)
if(nRacial == RACIAL_TYPE_OUTSIDER && bOutsider)
{
@ -7386,7 +7386,7 @@ H [Crumble] - Constructs only.
{
// If we are undead, we make sure we leave at least 1 for our own healing.
if(GlobalNormalSpellsNoEffectLevel < 6 &&
(GetRacialType(OBJECT_SELF) != RACIAL_TYPE_UNDEAD ||
(MyPRCGetRacialType(OBJECT_SELF) != RACIAL_TYPE_UNDEAD ||
GetHasSpell(SPELL_HARM) >= 2))
{
// Harm
@ -10077,12 +10077,12 @@ H X [Aura of Glory] - +4 Char, and allies get +4 VS Fear effects.
{
// This is natural AC, and only for undead. Cast it on ourselves, or
// our summoned undead monster.
if(GetRacialType(OBJECT_SELF) == RACIAL_TYPE_UNDEAD)
if(MyPRCGetRacialType(OBJECT_SELF) == RACIAL_TYPE_UNDEAD)
{
// Stone bones - cast if we do not have a natural armor AC spell.
if(AI_ActionCastSpell(SPELL_STONE_BONES, OBJECT_SELF, 12, FALSE)) return TRUE;
}
else if(GetRacialType(GlobalBuffAlly) == RACIAL_TYPE_UNDEAD)
else if(MyPRCGetRacialType(GlobalBuffAlly) == RACIAL_TYPE_UNDEAD)
{
// Stone bones - cast if we do not have a natural armor AC spell.
if(AI_ActionCastSpell(SPELL_STONE_BONES, GlobalBuffAlly, 12, FALSE)) return TRUE;
@ -13712,7 +13712,7 @@ int AI_SetUpAllObjects(object oInputBackup)
GlobalSpellTargetCurrentHitPoints = GetCurrentHitPoints(GlobalSpellTarget);
// This is one of the most important.
GlobalSeenSpell = GetObjectSeen(GlobalSpellTarget);
GlobalSpellTargetRace = GetRacialType(GlobalSpellTarget);
GlobalSpellTargetRace = MyPRCGetRacialType(GlobalSpellTarget);
// Range
GlobalSpellTargetRange = GetDistanceToObject(GlobalSpellTarget);
@ -13879,7 +13879,7 @@ int AI_AttemptHostileSkills()
GetSpawnInCondition(AI_FLAG_OTHER_COMBAT_FORCE_EMPATHY, AI_OTHER_COMBAT_MASTER))
{
iEmpathyDC = 20;
iRace = GetRacialType(GlobalMeleeTarget);
iRace = MyPRCGetRacialType(GlobalMeleeTarget);
// we add 4 (to make DC 24 + HD) if a special animal. R_T_ANIMAL is DC 20
if(iRace == RACIAL_TYPE_BEAST || iRace == RACIAL_TYPE_MAGICAL_BEAST)
{
@ -14034,7 +14034,7 @@ int AI_AttemptFeatCombatHostile()
if(!GetItemHasItemProperty(oPrimaryWeapon, ITEM_PROPERTY_ON_HIT_PROPERTIES))
{
// Bless weapon
if(GetRacialType(GlobalMeleeTarget) == RACIAL_TYPE_UNDEAD)
if(MyPRCGetRacialType(GlobalMeleeTarget) == RACIAL_TYPE_UNDEAD)
{
// Bless weapon. Level 1 (Paladin). +1 Attack Bonus, +2d6 Damage to melee weapon VS undead
if(AI_ActionCastSpell(SPELL_BLESS_WEAPON, oPrimaryWeapon, 11, FALSE)) return TRUE;

View File

@ -28,6 +28,9 @@
///////////////////////// [Include - Set Effects] ////////////////////////////*/
#include "J_INC_CONSTANTS"
#include "prc_inc_racial"
//void main (){}
// List (use Global to not conflict with the nwscript.nss!)
const int GlobalEffectUncommandable = 0x00000001;// Stun. Sleep. Fear. Turning. Paralsis. Petrify.
@ -458,7 +461,7 @@ void AI_SetEffectsOnTarget(object oTarget = OBJECT_SELF)
eCheck = GetNextEffect(oTarget);
}
// If undead, set some immunities by default
if(GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
if(MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
{
AI_SetWeHaveSpellsEffect(GlobalHasDeathWardSpell);
}

View File

@ -27,6 +27,7 @@
// All constants.
#include "J_INC_SETWEAPONS"
#include "prc_inc_racial"
// Set weapons
// - Constants file is in this
@ -654,7 +655,7 @@ void AI_SetTurningLevel()
void AI_SetMaybeFearless()
{
// Cirtain races are immune to fear
switch(GetRacialType(OBJECT_SELF))
switch(MyPRCGetRacialType(OBJECT_SELF))
{
case RACIAL_TYPE_CONSTRUCT:
case RACIAL_TYPE_DRAGON:

View File

@ -55,6 +55,7 @@
//
//
//////////////////////////////////////////////////////////////////////////////*/
#include "prc_inc_racial"
//void main (){}
@ -339,7 +340,7 @@ void ms_Nomenclature(object oNPC = OBJECT_SELF)
string ms_RandomFirstName(object oNPC = OBJECT_SELF)
{
int Gender = GetGender(oNPC);
int Race = GetRacialType(oNPC);
int Race = MyPRCGetRacialType(oNPC);
string Name;
@ -385,7 +386,7 @@ string ms_RandomFirstName(object oNPC = OBJECT_SELF)
string ms_RandomLastName(object oNPC = OBJECT_SELF)
{
int Race = GetRacialType(oNPC);
int Race = MyPRCGetRacialType(oNPC);
string Name;

View File

@ -314,7 +314,7 @@ void main()
// Min. Amount of Rounds between each breath use. See readme for counter defaults. Def: 3
// Default checks for dragon flying automatic turning on of flying.
if(GetLevelByClass(CLASS_TYPE_DRAGON) || GetRacialType(OBJECT_SELF) == RACIAL_TYPE_DRAGON)
if(GetLevelByClass(CLASS_TYPE_DRAGON) || MyPRCGetRacialType(OBJECT_SELF) == RACIAL_TYPE_DRAGON)
{
SetSpawnInCondition(AI_FLAG_COMBAT_FLYING, AI_COMBAT_MASTER);
// This turns ON combat flying. I think anything winged looks A-OK. See readme for info.

View File

@ -14,6 +14,7 @@
//:://////////////////////////////////////////////
#include "69_hench_lib"
#include "NW_I0_SPELLS"
#include "prc_inc_racial"
void main()
{
//Declare major variables
@ -39,7 +40,7 @@ void main()
object oArea = GetArea(oTarget);
int nCHP = GetLocalInt(oArea, "nCHP" +sTag);
//Check if the target is an undead
if(GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
if(MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_LAY_ON_HANDS));

View File

@ -32,6 +32,7 @@ Of course you don't have to use this method - its optional.
//:://////////////////////////////////////////////
#include "x2_inc_switches"
#include "x2_inc_spellhook"
#include "prc_inc_racial"
//Belker
void SmokeClaw(object oTarget, int nDC, int nRounds);
@ -607,8 +608,8 @@ int GetIsLiving(object oTarget)
int bAlive;
//Constructs & Undead
if(GetRacialType(oTarget) == RACIAL_TYPE_CONSTRUCT ||
GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
if(MyPRCGetRacialType(oTarget) == RACIAL_TYPE_CONSTRUCT ||
MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
{
return bAlive = FALSE;
}

View File

@ -319,7 +319,7 @@ void main()
// Min. Amount of Rounds between each breath use. See readme for counter defaults. Def: 3
// Default checks for dragon flying automatic turning on of flying.
if(GetLevelByClass(CLASS_TYPE_DRAGON) || GetRacialType(OBJECT_SELF) == RACIAL_TYPE_DRAGON)
if(GetLevelByClass(CLASS_TYPE_DRAGON) || MyPRCGetRacialType(OBJECT_SELF) == RACIAL_TYPE_DRAGON)
{
SetSpawnInCondition(AI_FLAG_COMBAT_FLYING, AI_COMBAT_MASTER);
// This turns ON combat flying. I think anything winged looks A-OK. See readme for info.

View File

@ -1,6 +1,8 @@
#include "prc_inc_racial"
//#include "journal_include"
#include "pqj_inc"
void GivePCWands(object oPC)
{
// items to be give to new players
@ -38,7 +40,7 @@ void GiveLangTokens(object oPC)
// Give race based language tokens
// TODO: Expand for PRC races.
if( GetRacialType(oPC) == RACIAL_TYPE_ELF )
if( MyPRCGetRacialType(oPC) == RACIAL_TYPE_ELF )
{
// DelayCommand(0.5, AdjustReputation(oPC, GetObjectByTag("FACTION_ATHAS_SILVERHAND"), 90)); // Adjust faction reputation
@ -49,7 +51,7 @@ void GiveLangTokens(object oPC)
}
}
if( GetRacialType(oPC) == RACIAL_TYPE_HALFELF )
if( MyPRCGetRacialType(oPC) == RACIAL_TYPE_HALFELF )
{
if ( GetItemPossessedBy(oPC, "hlslang_1") == OBJECT_INVALID )
{
@ -58,7 +60,7 @@ void GiveLangTokens(object oPC)
}
}
if( GetRacialType(oPC) == RACIAL_TYPE_DWARF )
if( MyPRCGetRacialType(oPC) == RACIAL_TYPE_DWARF )
{
// DelayCommand(0.5, AdjustReputation(oPC, GetObjectByTag("ATHAS_FACTION_KLED"), 90)); // Adjust faction reputation
@ -69,7 +71,7 @@ void GiveLangTokens(object oPC)
}
}
if( GetRacialType(oPC) == RACIAL_TYPE_HALFLING )
if( MyPRCGetRacialType(oPC) == RACIAL_TYPE_HALFLING )
{
if ( GetItemPossessedBy(oPC, "hlslang_3") == OBJECT_INVALID )
{
@ -78,7 +80,7 @@ void GiveLangTokens(object oPC)
}
}
if( GetRacialType(oPC) == 199 ) // Air Genasi
if( MyPRCGetRacialType(oPC) == 199 ) // Air Genasi
{
SetColor ( oPC, COLOR_CHANNEL_SKIN, 020);
@ -88,7 +90,7 @@ void GiveLangTokens(object oPC)
CreateItemOnObject("hlslang_101", oPC);
}
}
if( GetRacialType(oPC) == 200 ) // Earth Genasi
if( MyPRCGetRacialType(oPC) == 200 ) // Earth Genasi
{
SetColor ( oPC, COLOR_CHANNEL_SKIN, 118);
@ -98,7 +100,7 @@ void GiveLangTokens(object oPC)
CreateItemOnObject("hlslang_102", oPC);
}
}
if( GetRacialType(oPC) == 202 ) // Fire Genasi
if( MyPRCGetRacialType(oPC) == 202 ) // Fire Genasi
{
SetColor ( oPC, COLOR_CHANNEL_SKIN, 103);
@ -108,7 +110,7 @@ void GiveLangTokens(object oPC)
CreateItemOnObject("hlslang_104", oPC);
}
}
if( GetRacialType(oPC) == 205 ) // Water Genasi
if( MyPRCGetRacialType(oPC) == 205 ) // Water Genasi
{
SetColor ( oPC, COLOR_CHANNEL_SKIN, 141);

View File

@ -75,8 +75,10 @@
// - This will spawn treasure based on chests placed in the module. See "x0_i0_treasure" for more information.
// This is required for all spawn in options!
#include "prc_inc_racial"
#include "J_INC_SPAWNIN"
void main()
{
/************************ [Important Spawn Settings] **************************/
@ -314,7 +316,7 @@ void main()
// Min. Amount of Rounds between each breath use. See readme for counter defaults. Def: 3
// Default checks for dragon flying automatic turning on of flying.
if(GetLevelByClass(CLASS_TYPE_DRAGON) || GetRacialType(OBJECT_SELF) == RACIAL_TYPE_DRAGON)
if(GetLevelByClass(CLASS_TYPE_DRAGON) || MyPRCGetRacialType(OBJECT_SELF) == RACIAL_TYPE_DRAGON)
{
SetSpawnInCondition(AI_FLAG_COMBAT_FLYING, AI_COMBAT_MASTER);
// This turns ON combat flying. I think anything winged looks A-OK. See readme for info.

View File

@ -28,17 +28,19 @@ or in a module is very subjective. Some will consider this amount far too gener
and some too greedy.
*/
////////////////////////////////////////////////////////////////////////////////
#include "prc_inc_racial"
void main()
{
if(d100()>66) return;
object oCreature = OBJECT_SELF;
object oMarker;
if(GetRacialType(oCreature) == RACIAL_TYPE_ANIMAL
|| GetRacialType(oCreature) == RACIAL_TYPE_VERMIN) return;
if(MyPRCGetRacialType(oCreature) == RACIAL_TYPE_ANIMAL
|| MyPRCGetRacialType(oCreature) == RACIAL_TYPE_VERMIN) return;
float fChallengeFactor = GetChallengeRating(oCreature) * 30.0;
float fFactor = IntToFloat(Random(5) + 2);
int iTreasure = FloatToInt(fChallengeFactor / fFactor);
int iType = GetRacialType(oCreature);
int iType = MyPRCGetRacialType(oCreature);
CreateItemOnObject("NW_IT_GOLD001", oCreature, iTreasure);
if(iType == RACIAL_TYPE_UNDEAD || iType == RACIAL_TYPE_ABERRATION)
oMarker = CreateItemOnObject("NW_IT_MSMLMISC21", oCreature, 1);

View File

@ -4,11 +4,13 @@ Custom Treasure Table for use with the BESIE
Random Encounter Package by Ray Miller
*/
////////////////////////////////////////////////////
#include "prc_inc_racial"
////////////////////////////////////////////////////
void main()
{
//Note: This statement causes the script to exclude animals from this treasure table.
if(GetRacialType(OBJECT_SELF) == RACIAL_TYPE_ANIMAL) return;
if(MyPRCGetRacialType(OBJECT_SELF) == RACIAL_TYPE_ANIMAL) return;
////////////////////////////////////////////////////////////
object oCreature = OBJECT_SELF;
float fChance;

View File

@ -9,6 +9,10 @@ and will not compile on its own.
////////////////////////////////////////////////////
////////////////////////////////////////////////////
#include "prc_inc_racial"
//::void main(){}
float fCRFactor = GetChallengeRating(OBJECT_SELF) / 20.0;
object GiveMoney(object oCreature = OBJECT_SELF)
@ -16,12 +20,12 @@ object GiveMoney(object oCreature = OBJECT_SELF)
if(d100()>66) return OBJECT_INVALID;
object oObject = OBJECT_INVALID;
object oMarker;
if(GetRacialType(oCreature) == RACIAL_TYPE_ANIMAL
|| GetRacialType(oCreature) == RACIAL_TYPE_VERMIN) return OBJECT_INVALID;
if(MyPRCGetRacialType(oCreature) == RACIAL_TYPE_ANIMAL
|| MyPRCGetRacialType(oCreature) == RACIAL_TYPE_VERMIN) return OBJECT_INVALID;
float fChallengeFactor = GetChallengeRating(oCreature) * 30.0;
float fFactor = IntToFloat(Random(5) + 2);
int iTreasure = FloatToInt(fChallengeFactor / fFactor);
int iType = GetRacialType(oCreature);
int iType = MyPRCGetRacialType(oCreature);
oObject = CreateItemOnObject("NW_IT_GOLD001", oCreature, iTreasure);
if(iType == RACIAL_TYPE_UNDEAD || iType == RACIAL_TYPE_ABERRATION)
oMarker = CreateItemOnObject("NW_IT_MSMLMISC21", oCreature, 1);
@ -44,7 +48,7 @@ object GiveHealing(object oCreature = OBJECT_SELF)
object oObject = OBJECT_INVALID;
//Note: This statement causes the script to exclude animals from this treasure table.
if(GetRacialType(oCreature) != RACIAL_TYPE_ANIMAL){
if(MyPRCGetRacialType(oCreature) != RACIAL_TYPE_ANIMAL){
//////////////////////////////////////////////////////////////
int END;
float fChance;

View File

@ -12,6 +12,7 @@
//:://////////////////////////////////////////////
//:: VFX Pass By:
#include "X0_I0_SPELLS" // * this is the new spells include for expansion packs
#include "prc_inc_racial"
void main()
{
@ -25,35 +26,35 @@ void main()
{
/*Minor*/ case 431: spellsInflictTouchAttack(1, 0, 1, 246, VFX_IMP_HEALING_G, nSpellID);
nCure = 1;
if(GetIsHenchmanDying(oTarget) && GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
if(GetIsHenchmanDying(oTarget) && MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
{
SetLocalInt(oArea, "nCHP" +sTag, nCHP + nCure);
}
break;
/*Light*/ case 432: case 609: spellsInflictTouchAttack(d8(), 5, 8, 246, VFX_IMP_HEALING_G, nSpellID);
nCure = d8(1);
if(GetIsHenchmanDying(oTarget) && GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
if(GetIsHenchmanDying(oTarget) && MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
{
SetLocalInt(oArea, "nCHP" +sTag, nCHP + nCure);
}
break;
/*Moderate*/ case 433: case 610: spellsInflictTouchAttack(d8(2), 10, 16, 246, VFX_IMP_HEALING_G, nSpellID);
nCure = d8(2);
if(GetIsHenchmanDying(oTarget) && GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
if(GetIsHenchmanDying(oTarget) && MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
{
SetLocalInt(oArea, "nCHP" +sTag, nCHP + nCure);
}
break;
/*Serious*/ case 434: case 611: spellsInflictTouchAttack(d8(3), 15, 24, 246, VFX_IMP_HEALING_G, nSpellID);
nCure = d8(3);
if(GetIsHenchmanDying(oTarget) && GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
if(GetIsHenchmanDying(oTarget) && MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
{
SetLocalInt(oArea, "nCHP" +sTag, nCHP + nCure);
}
break;
/*Critical*/ case 435: case 612: spellsInflictTouchAttack(d8(4), 20, 32, 246, VFX_IMP_HEALING_G, nSpellID);
nCure = d8(4);
if(GetIsHenchmanDying(oTarget) && GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
if(GetIsHenchmanDying(oTarget) && MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
{
SetLocalInt(oArea, "nCHP" +sTag, nCHP + nCure);
}

View File

@ -15,6 +15,7 @@
#include "x0_i0_spells"
#include "prc_inc_racial"
void DoBeholderPetrify(int nDuration,object oSource, object oTarget, int nSpellID);
@ -75,7 +76,7 @@ void main()
SignalEvent(oTarget,EventSpellCastAt(OBJECT_SELF,GetSpellId(),TRUE));
fDelay = 0.0f; //old -- GetSpellEffectDelay(GetLocation(oTarget),OBJECT_SELF);
int iTargetRace = GetRacialType(oTarget);
int iTargetRace = MyPRCGetRacialType(oTarget);
if ((nSpell == 786) && (
((!GetIsPlayableRacialType(oTarget))

Binary file not shown.

View File

@ -2,7 +2,7 @@
"__data_type": "UTC ",
"Appearance_Head": {
"type": "byte",
"value": 22
"value": 3
},
"Appearance_Type": {
"type": "word",
@ -110,7 +110,7 @@
},
"Color_Hair": {
"type": "byte",
"value": 11
"value": 123
},
"Color_Skin": {
"type": "byte",
@ -118,11 +118,11 @@
},
"Color_Tattoo1": {
"type": "byte",
"value": 1
"value": 152
},
"Color_Tattoo2": {
"type": "byte",
"value": 1
"value": 152
},
"Comment": {
"type": "cexostring",