Files
HeroesStone_PRC8/_module/nss/de1_innrest.nss
Jaysyn904 1eefc84201 Initial Commit
Initial Commit.
2025-09-14 15:40:46 -04:00

26 lines
1.1 KiB
Plaintext

/////////////////////////////////////
// Dragon's Edge
// by Charly Carlos
/////////////////////////////////////
// This is used in inns by an innkeeper. It takes a small amount of gold depending
// how much a room is for a day stated by the integer variable "nRent_Price" placed on
// the innkeeper. The screen then goes black, a rest effect is added, 8 hours passes,
// the screen fades back in.
/////////////////////////////////////
#include "prc_inc_util"
void main()
{
object oPC = GetPCSpeaker();
effect eSleep = EffectVisualEffect(VFX_IMP_SLEEP);
TakeGoldFromCreature(GetLocalInt(OBJECT_SELF, "nRent_Price"), oPC);
SetCommandable(FALSE, oPC);
FadeToBlack(oPC, FADE_SPEED_FAST);
DelayCommand(1.0, PRCForceRest(oPC));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSleep, oPC, 1.0));
DelayCommand(5.0, SetTime(GetTimeHour() + 8, GetTimeMinute(), GetTimeSecond(), GetTimeMillisecond()));
DelayCommand(5.0, FadeFromBlack(oPC, FADE_SPEED_FAST));
DelayCommand(5.0, SetCommandable(TRUE, oPC));
DelayCommand(5.0, AssignCommand(oPC, SendMessageToPC(oPC, "You rested at the inn, and 8 hours has passed.")));
}