Initial upload
Initial upload
This commit is contained in:
63
_module/nss/modlevelup.nss
Normal file
63
_module/nss/modlevelup.nss
Normal file
@@ -0,0 +1,63 @@
|
||||
#include "fky_chat_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
if (ENABLE_LANGUAGES)//check to see if they gained a level in a language class, and if so, add that language
|
||||
{
|
||||
object oPC = GetPCLevellingUp();
|
||||
if (USING_NWNX_DB)
|
||||
{
|
||||
if ((GetLevelByClass(CLASS_TYPE_RANGER, oPC) || GetLevelByClass(CLASS_TYPE_DRUID, oPC)) && (!GetLocalInt(oPC, "FKY_CHAT_LANG37")))
|
||||
{
|
||||
SetLocalInt(oPC, "FKY_CHAT_LANG37", TRUE);
|
||||
SetPersistentInt(oPC, "FKY_CHAT_LANG37", TRUE);
|
||||
}
|
||||
if (GetLevelByClass(CLASS_TYPE_ROGUE, oPC) && (!GetLocalInt(oPC, "FKY_CHAT_LANG44")))
|
||||
{
|
||||
SetLocalInt(oPC, "FKY_CHAT_LANG44", TRUE);
|
||||
SetPersistentInt(oPC, "FKY_CHAT_LANG44", TRUE);
|
||||
}
|
||||
if (GetLevelByClass(CLASS_TYPE_ASSASSIN, oPC) && (!GetLocalInt(oPC, "FKY_CHAT_LANG5")))
|
||||
{
|
||||
SetLocalInt(oPC, "FKY_CHAT_LANG5", TRUE);
|
||||
SetPersistentInt(oPC, "FKY_CHAT_LANG5", TRUE);
|
||||
}
|
||||
if (GetLevelByClass(CLASS_TYPE_DRUID, oPC) && (!GetLocalInt(oPC, "FKY_CHAT_LANG14")))
|
||||
{
|
||||
SetLocalInt(oPC, "FKY_CHAT_LANG14", TRUE);
|
||||
SetPersistentInt(oPC, "FKY_CHAT_LANG14", TRUE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
object oStorage = GetItemPossessedBy(oPC, TAG_OF_LANGUAGE_STORAGE_OBJECT);
|
||||
if ((GetLevelByClass(CLASS_TYPE_RANGER, oPC) || GetLevelByClass(CLASS_TYPE_DRUID, oPC)) && (!GetLocalInt(oPC, "FKY_CHAT_LANG37")))
|
||||
{
|
||||
SetLocalInt(oPC, "FKY_CHAT_LANG37", TRUE);
|
||||
SetLocalInt(oStorage, "FKY_CHAT_LANG37", TRUE);
|
||||
}
|
||||
if (GetLevelByClass(CLASS_TYPE_ROGUE, oPC) && (!GetLocalInt(oPC, "FKY_CHAT_LANG44")))
|
||||
{
|
||||
SetLocalInt(oPC, "FKY_CHAT_LANG44", TRUE);
|
||||
SetLocalInt(oStorage, "FKY_CHAT_LANG44", TRUE);
|
||||
}
|
||||
if (GetLevelByClass(CLASS_TYPE_ASSASSIN, oPC) && (!GetLocalInt(oPC, "FKY_CHAT_LANG5")))
|
||||
{
|
||||
SetLocalInt(oPC, "FKY_CHAT_LANG5", TRUE);
|
||||
SetLocalInt(oStorage, "FKY_CHAT_LANG5", TRUE);
|
||||
}
|
||||
if (GetLevelByClass(CLASS_TYPE_DRUID, oPC) && (!GetLocalInt(oPC, "FKY_CHAT_LANG14")))
|
||||
{
|
||||
SetLocalInt(oPC, "FKY_CHAT_LANG14", TRUE);
|
||||
SetLocalInt(oStorage, "FKY_CHAT_LANG14", TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
ExportAllCharacters();
|
||||
|
||||
SendMessageToPC(GetPCLevellingUp(), "All characters on the server are saved when any character levels up.");
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user