RoT2_PRC8/_module/nss/xx_cb_enter.nss
Jaysyn904 379c5dce03 Added persistent player storage
Added persistent player storage.  Fixed store items.  Full compile.  Updated release archive.
2025-03-09 20:14:36 -04:00

51 lines
1.9 KiB
Plaintext

#include "xx_persist_quest"
#include "cs_misc_function"
void main ()
{
// WriteTimestampedLogEntry("Entering Module onClientEnter: xx_cb_enter");
object oPlayer = GetEnteringObject();
// string sPlayerName = GetName(oPlayer);
// string sPCPlayerName = GetPCPlayerName(oPlayer);
// string sCDKey = GetPCPublicCDKey(oPlayer);
// string sIP = GetPCIPAddress(oPlayer);
AddJournalQuestEntry("xprules", 1, oPlayer, FALSE, FALSE, FALSE);
AddJournalQuestEntry("lvl_adj", 1, oPlayer, FALSE, FALSE, FALSE);
AddJournalQuestEntry("JRNL_PRC8", 1, oPlayer, FALSE, FALSE, FALSE);
cs_DestroyStolenItems(oPlayer); // Destroy any stolen items
cs_LimitGoldInBank(oPlayer, 20000000); // Limit gold in bank
cs_LimitGoldOnPlayer(oPlayer, 1000000); // Limit gold on player
DelayCommand(3.0,cs_StripPlayerSpells(oPlayer)); // Strip Spells
DelayCommand(4.0,cs_StripPlayerFeats(oPlayer)); // Strip Feats
DelayCommand(2.0,cs_MakeAllItemsNoClean(oPlayer)); // Set items for store cleanup script
// Rebuild Journal Entries for chr. Tab
RebuildJournalQuestEntries(GetEnteringObject());
cs_RemoveIllegalItem(oPlayer, "EVILORB"); // Remove all illegal items (None replaced)
cs_RemoveIllegalItem(oPlayer, "GOODORB");
cs_RemoveIllegalItem(oPlayer, "PVPHELM");
cs_RemoveIllegalItem(oPlayer, "PVPTOKEN");
cs_RemoveIllegalItem(oPlayer, "EVILSYMBOL");
cs_RemoveIllegalItem(oPlayer, "GOODSYMBOL");
//
// Removed Items use the TAG, Created Items use the ResRef!
// Tags must also be different... at least for now.
//
// Remove 'ArmoroftheShiningsea' and replace with 'armorofunspokenp' (Unique item, so only 1 allowed)
if (cs_RemoveIllegalItem(oPlayer, "ArmoroftheShiningSea") > 0) { cs_CreateObjectOnPlayer("armorofunspokenp", oPlayer); }
}