PoA_PRC8/_module/nss/jailpunishment.nss

56 lines
1.8 KiB
Plaintext
Raw Normal View History

2022-10-07 14:20:31 -04:00
void main()
{
object oPC = GetEnteringObject();
object oPlayer = oPC;
location lSaved = GetLocation(oPC);
string sMsg = "You have been send to jail by a DM, you can play another character, but your current character is here till restart.";
if (!GetIsPC(oPC)) return;
SetCutsceneMode(oPC, TRUE, FALSE);
//Store thier location...
//SetCampaignLocation("LOCATIONS", "SAVED_LOC", lSaved, oPC);
DelayCommand(0.5, FloatingTextStringOnCreature(sMsg, oPC, FALSE));
DelayCommand(1.5, FloatingTextStringOnCreature(sMsg, oPC, FALSE));
DelayCommand(3.0, FloatingTextStringOnCreature(sMsg, oPC, FALSE));
DelayCommand(15.0, FadeToBlack(oPC, FADE_SPEED_MEDIUM));
DelayCommand(400.0, SetCutsceneMode(oPC, FALSE, FALSE));
if(GetIsPC(oPlayer))
{
AssignCommand(oPlayer, ClearAllActions());
//Clear Reputation of PC
if (GetStandardFactionReputation(STANDARD_FACTION_COMMONER, oPlayer) <= 10)
{ SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad
SetStandardFactionReputation(STANDARD_FACTION_COMMONER, 80, oPlayer);
}
if (GetStandardFactionReputation(STANDARD_FACTION_MERCHANT, oPlayer) <= 10)
{ SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad
SetStandardFactionReputation(STANDARD_FACTION_MERCHANT, 80, oPlayer);
}
if (GetStandardFactionReputation(STANDARD_FACTION_DEFENDER, oPlayer) <= 10)
{ SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad
SetStandardFactionReputation(STANDARD_FACTION_DEFENDER, 80, oPlayer);
}
}
object oItem;
oItem = GetFirstItemInInventory(oPC);
while (GetIsObjectValid(oItem))
{
if (GetTag(oItem)=="gemofteleporation") DestroyObject(oItem);
if (GetTag(oItem)=="fieldtent") DestroyObject(oItem);
if (GetTag(oItem)=="teleportationgem") DestroyObject(oItem);
oItem = GetNextItemInInventory(oPC);
}
}