Rune_PRC8/_module/nss/vat_givedmfi.nss
Jaysyn904 3d724b934d Update vat_givedmfi.nss
Added PC messages for Language tokens.
2025-01-03 11:58:42 -05:00

166 lines
6.7 KiB
Plaintext

#include "prc_inc_racial"
#include "prc_class_const"
void GiveDMFI(object oPC, string sResRef)
{
//note: for DMFI items, tag and resref are identical
object oItem = GetItemPossessedBy(oPC, sResRef);
if (!GetIsObjectValid(oItem))
CreateItemOnObject(sResRef, oPC);
}
void main()
{
object oPC = GetPCSpeaker();
int iLanguageFlag = FALSE;
//PC Autofollow Widget
GiveDMFI(oPC, "dmfi_pc_follow");
//PC Dicebag
GiveDMFI(oPC, "dmfi_pc_dicebag");
//PC Emote Wand
GiveDMFI(oPC, "dmfi_pc_emote");
//Book of Player Voice Commands
GiveDMFI(oPC, "dmfi_playerbook");
//:: Abyssal
if ((GetAlignmentGoodEvil(oPC) == ALIGNMENT_EVIL && GetAlignmentLawChaos(oPC) == ALIGNMENT_CHAOTIC && (MyPRCGetRacialType(oPC) == RACIAL_TYPE_OUTSIDER)
|| GetLevelByClass(CLASS_TYPE_CLERIC, oPC) != 0 || GetLevelByClass(CLASS_TYPE_ARCHIVIST, oPC) != 0 || GetLevelByClass(CLASS_TYPE_SOHEI, oPC) != 0
|| GetLevelByClass(CLASS_TYPE_FAVOURED_SOUL, oPC) != 0 || GetLevelByClass(CLASS_TYPE_WARLOCK, oPC) != 0 || GetLevelByClass(CLASS_TYPE_BLACKGUARD, oPC) != 0)
|| (GetLevelByClass(CLASS_TYPE_BLIGHTLORD, oPC) != 0)
|| (GetLevelByClass(CLASS_TYPE_ORCUS, oPC) != 0)
|| (GetLevelByClass(CLASS_TYPE_THRALL_OF_GRAZZT_A, oPC) != 0)
|| (GetLevelByClass(CLASS_TYPE_ACOLYTE, oPC) != 0)
|| (GetLevelByClass(CLASS_TYPE_PRC_EYE_OF_GRUUMSH, oPC) != 0)
|| (GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oPC) != 0))
{
GiveDMFI(oPC, "hlslang_11");
SendMessageToPC(oPC, "Abyssal language given.");
}
//:: Celestial
if ((GetAlignmentGoodEvil(oPC) == ALIGNMENT_GOOD && (MyPRCGetRacialType(oPC) == RACIAL_TYPE_OUTSIDER
|| GetLevelByClass(CLASS_TYPE_CLERIC, oPC) != 0 || GetLevelByClass(CLASS_TYPE_ARCHIVIST, oPC) != 0 || GetLevelByClass(CLASS_TYPE_SOHEI, oPC) != 0 || GetLevelByClass(CLASS_TYPE_HEALER, oPC) != 0
|| GetLevelByClass(CLASS_TYPE_FAVOURED_SOUL, oPC) != 0 ))
|| (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) != 0)
|| (GetLevelByClass(CLASS_TYPE_HEARTWARDER, oPC) != 0)
|| (GetLevelByClass(CLASS_TYPE_SOLDIER_OF_LIGHT, oPC) != 0)
|| (GetLevelByClass(CLASS_TYPE_FISTRAZIEL, oPC) != 0)
|| (GetLevelByClass(CLASS_TYPE_VASSAL, oPC) != 0)
|| (GetLevelByClass(CLASS_TYPE_SACREDFIST, oPC) != 0)
|| (GetLevelByClass(CLASS_TYPE_MIGHTY_CONTENDER_KORD, oPC) != 0)
|| (GetLevelByClass(CLASS_TYPE_MORNINGLORD, oPC) != 0)
|| (GetLevelByClass(CLASS_TYPE_SLAYER_OF_DOMIEL, oPC) != 0))
{
GiveDMFI(oPC, "hlslang_10");
SendMessageToPC(oPC, "Celestial language given.");
}
//::Infernal
if ((GetAlignmentGoodEvil(oPC) == ALIGNMENT_EVIL && GetAlignmentLawChaos(oPC) == ALIGNMENT_LAWFUL && (MyPRCGetRacialType(oPC) == RACIAL_TYPE_OUTSIDER)
|| GetLevelByClass(CLASS_TYPE_CLERIC, oPC) != 0 || GetLevelByClass(CLASS_TYPE_ARCHIVIST, oPC) != 0 || GetLevelByClass(CLASS_TYPE_SOHEI, oPC) != 0
|| GetLevelByClass(CLASS_TYPE_FAVOURED_SOUL, oPC) != 0 || GetLevelByClass(CLASS_TYPE_WARLOCK, oPC) != 0 || GetLevelByClass(CLASS_TYPE_BLACKGUARD, oPC) != 0)
|| (GetLevelByClass(CLASS_TYPE_OCULAR, oPC) != 0)
|| (GetLevelByClass(CLASS_TYPE_TALON_OF_TIAMAT, oPC) != 0)
|| (GetLevelByClass(CLASS_TYPE_DISCIPLE_OF_ASMODEUS, oPC) != 0)
|| (GetLevelByClass(CLASS_TYPE_HEXTOR, oPC) != 0)
|| (GetLevelByClass(CLASS_TYPE_DISPATER, oPC) != 0)
|| (GetLevelByClass(CLASS_TYPE_DISC_BAALZEBUL, oPC) != 0)
|| (GetLevelByClass(CLASS_TYPE_DISCIPLE_OF_MEPH, oPC) != 0)
|| (GetLevelByClass(CLASS_TYPE_DIABOLIST, oPC) != 0))
{
GiveDMFI(oPC, "hlslang_12");
SendMessageToPC(oPC, "Infernal language given.");
}
//:: Animal
if ((GetLevelByClass(CLASS_TYPE_DRUID, oPC) != 0) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) != 0) ||
(GetLevelByClass(CLASS_TYPE_MONK, oPC) > 16) || (GetLevelByClass(CLASS_TYPE_FOCHLUCAN_LYRIST, oPC) != 0))
{
GiveDMFI(oPC, "hlslang_8");
SendMessageToPC(oPC, "Animal language given.");
}
//:: Draconic
if ((MyPRCGetRacialType(oPC) == RACIAL_TYPE_DRAGON) || (GetRacialType(oPC) == RACIAL_TYPE_REDSPAWN_ARCANISS) || (GetLevelByClass(CLASS_TYPE_DRAGONDISCIPLE, oPC)!=0) ||
(GetLevelByClass(CLASS_TYPE_DRAGON_DISCIPLE, oPC)!=0) || (GetLevelByClass(CLASS_TYPE_DRAGONFIRE_ADEPT, oPC)!=0) || (GetLevelByClass(CLASS_TYPE_DRAGON_SHAMAN, oPC)!=0) ||
(GetLevelByClass(CLASS_TYPE_DRAGONSONG_LYRIST, oPC)!=0) || (GetLevelByClass(CLASS_TYPE_INITIATE_DRACONIC, oPC)!=0) || (GetLevelByClass(CLASS_TYPE_HANDOTWM, oPC)!=0) ||
(GetLevelByClass(CLASS_TYPE_DRAGON_DEVOTEE, oPC)!=0) || (GetLevelByClass(CLASS_TYPE_DRAGONHEART_MAGE, oPC)!=0) || (GetLevelByClass(CLASS_TYPE_DIAMOND_DRAGON, oPC)!=0) ||
(GetLevelByClass(CLASS_TYPE_VASSAL, oPC)!=0) || (GetLevelByClass(CLASS_TYPE_SWIFT_WING, oPC)!=0) || (GetLevelByClass(CLASS_TYPE_TALON_OF_TIAMAT, oPC)!=0))
{
GiveDMFI(oPC, "hlslang_7");
SendMessageToPC(oPC, "Draconic language given.");
}
//:: Drow
if (GetRacialType(oPC) == RACIAL_TYPE_DROW_MALE || GetRacialType(oPC) == RACIAL_TYPE_DROW_FEMALE || GetRacialType(oPC) == RACIAL_TYPE_HALFDROW)
{
GiveDMFI(oPC, "hlslang_13");
SendMessageToPC(oPC, "Drow language given.");
}
//:: Dwarven
if (MyPRCGetRacialType(oPC) == RACIAL_TYPE_DWARF)
{
GiveDMFI(oPC, "hlslang_4");
SendMessageToPC(oPC, "Dwarven language given.");
}
//:: Elven
if ((MyPRCGetRacialType(oPC) == RACIAL_TYPE_ELF) || (MyPRCGetRacialType(oPC) == RACIAL_TYPE_HALFELF))
{
GiveDMFI(oPC, "hlslang_1");
SendMessageToPC(oPC, "Elven language given.");
}
//:: Gnome
if (MyPRCGetRacialType(oPC) == RACIAL_TYPE_GNOME)
{
GiveDMFI(oPC, "hlslang_2");
SendMessageToPC(oPC, "Gnomish language given.");
}
//:: Goblin
if ((GetRacialType(oPC) == RACIAL_TYPE_BLUE_GOBLIN) || (GetRacialType(oPC) == RACIAL_TYPE_GOBLIN) ||
(GetRacialType(oPC) == RACIAL_TYPE_SNOW_GOBLIN) || (GetRacialType(oPC) == RACIAL_TYPE_HOBGOBLIN) ||
(GetRacialType(oPC) == RACIAL_TYPE_SUNSCORCH_HOBGOBLIN))
{
GiveDMFI(oPC, "hlslang_6");
SendMessageToPC(oPC, "Goblin language given.");
}
//:: Halfling
if (MyPRCGetRacialType(oPC) == RACIAL_TYPE_HALFLING)
{
GiveDMFI(oPC, "hlslang_3");
SendMessageToPC(oPC, "Halfling language given.");
}
//:: Orc
if (MyPRCGetRacialType(oPC) == RACIAL_TYPE_HALFORC || GetRacialType(oPC) == RACIAL_TYPE_FROSTBLOOD_ORC || GetRacialType(oPC) == RACIAL_TYPE_OROG ||
GetRacialType(oPC) == RACIAL_TYPE_GRAYORC || GetRacialType(oPC) == RACIAL_TYPE_ORC)
{
GiveDMFI(oPC, "hlslang_5");
SendMessageToPC(oPC, "Orc language given.");
}
//:: Thieves' Cant
if ((GetLevelByClass(CLASS_TYPE_ROGUE, oPC)!=0) ||
(GetLevelByClass(CLASS_TYPE_SHADOW_THIEF_AMN, oPC)!=0) ||
(GetLevelByClass(CLASS_TYPE_SHADOWLORD, oPC)!=0) ||
(GetLevelByClass(CLASS_TYPE_PSYCHIC_ROGUE, oPC)!=0) ||
(GetLevelByClass(CLASS_TYPE_SHADOWDANCER, oPC)!=0))
{
GiveDMFI(oPC, "hlslang_9");
SendMessageToPC(oPC, "Thieves' language given.");
}
}