REO-EE/_module/nss/wardrobesave1.nss
Jaysyn904 f82740bbbd Initial commit
Initial commit
2024-02-22 13:22:03 -05:00

32 lines
972 B
Plaintext

void main()
{
object oPC = GetPCSpeaker();
object oDatabase = GetItemPossessedBy(oPC, "database");
string sLastChat = GetLocalString(oPC,"TD_QUILLCHAT");
//int iText = (GetStringLength(sLastChat));
//string sText = GetStringRight(sLastChat,iText);
if (!GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_CHEST, oPC)))
{
FloatingTextStringOnCreature("No armor/clothes equipped, cannot proceed.", oPC, FALSE);
return;
}
if (sLastChat == "1" || sLastChat == "2" || sLastChat == "3" || sLastChat == "4" || sLastChat == "5" || sLastChat == "6" || sLastChat == "7" || sLastChat == "8" || sLastChat == "9" || sLastChat == "10")
{
StoreCampaignObject("REO_Wardrobe", "WR_" + GetName(oPC) + "_" + sLastChat + "", GetItemInSlot(INVENTORY_SLOT_CHEST, oPC));
FloatingTextStringOnCreature("Wardrobe " + sLastChat + " saved.", oPC, FALSE);
DeleteLocalString(oPC,"TD_QUILLCHAT");
return;
}
else
{
FloatingTextStringOnCreature("Invalid number, cannot proceed.", oPC, FALSE);
return;
}
}