[1.0-2.0] Sleeping npc's
Summary:
Compatible with RunUO 1.0 and 2.0.
Causes an npc to appear to go to sleep on a set schedule based on a UO day.
Update:
12/5/04 Players may no longer drop items (such as BOD's) onto the sleeping body. Only SleepingBody.zip updated. Thanks Silverwolfe.
12/2/04 Setting the Bed location to (0,0,0) will now cause the npc to sleep at it's current location rather than the top left corner of the map. Only Sleeper.zip updated.
Description:
This device should be placed near an npc such as a vendor. When properly configured, the Sleeper will remove the npc and place a sleeping body at a predetermined position. Times are based off of UO time and are in 24 hour format (23 is 11 PM, 0 is midnight.)
Settings in Props are:
SleepHour, SleepMinute; when the npc should go to sleep.
WakeHour, WakeMinute; when the npc should wake up.
Mobile; who to send to sleep.
Bed; where they go to sleep at.
Facing; the direction of the sleeping body (opposite what you would think.)
Active; an on / off switch.
Debug; when set to true Sleeper displays time info at every timer tick.
Asleep; read only indicator of current status of npc.
TimeNow; read only indicator of current local UO time.
Additional Information:
At sleep time, the npc will disappear and a visually identical sleeping body will be placed in the location set by the Bed property. At wake time the sleeping body will be deleted and the npc will appear standing on the Sleeper. In most cases you will want the Sleeper placed within the npc's normal range. In some cases, and only on server restart, the npc may be asleep or awake at the wrong time or sleep unclothed. This will correct itself within one UO day.
Notes for users of the Ultima VII spell package:
Two files; SleepingBody.cs, SleepingBodyEquip.cs, together with SleepingNameAttribute.cs replace files in the Ultima VII spell package. These files are compatible with the spell package and enhance it by clothing the sleeping body as well as adding a SleepingName attribute which can be added to creature scripts. The SleepingName attribute is used exactly like the CorpseName attribute is used. (edit: Check the file dates / versions Voran may have updated his scripts. You only need one copy of SleepingBody.cs; use whichever one is most current.)
2.0 Notes:
This script works without modification in RunUO 2.0.
Installation:
There are two zip files. Extract both into your Scripts/Custom folder. The files in the SleepingBody zip replace files in the Ultima VII spell package if it is installed. Add a Sleeper item ingame and update its props as required.
Credits:
I had intended to do something like this for the Britannia shard for a while now, it turned out pretty nice so we decided to share it with everyone. Special thanks go to Voran for his work on the Ultima VII spell package and to crabby654 for his ideas and testing.
Summary:
Compatible with RunUO 1.0 and 2.0.
Causes an npc to appear to go to sleep on a set schedule based on a UO day.
Update:
12/5/04 Players may no longer drop items (such as BOD's) onto the sleeping body. Only SleepingBody.zip updated. Thanks Silverwolfe.
12/2/04 Setting the Bed location to (0,0,0) will now cause the npc to sleep at it's current location rather than the top left corner of the map. Only Sleeper.zip updated.
Description:
This device should be placed near an npc such as a vendor. When properly configured, the Sleeper will remove the npc and place a sleeping body at a predetermined position. Times are based off of UO time and are in 24 hour format (23 is 11 PM, 0 is midnight.)
Settings in Props are:
SleepHour, SleepMinute; when the npc should go to sleep.
WakeHour, WakeMinute; when the npc should wake up.
Mobile; who to send to sleep.
Bed; where they go to sleep at.
Facing; the direction of the sleeping body (opposite what you would think.)
Active; an on / off switch.
Debug; when set to true Sleeper displays time info at every timer tick.
Asleep; read only indicator of current status of npc.
TimeNow; read only indicator of current local UO time.
Additional Information:
At sleep time, the npc will disappear and a visually identical sleeping body will be placed in the location set by the Bed property. At wake time the sleeping body will be deleted and the npc will appear standing on the Sleeper. In most cases you will want the Sleeper placed within the npc's normal range. In some cases, and only on server restart, the npc may be asleep or awake at the wrong time or sleep unclothed. This will correct itself within one UO day.
Notes for users of the Ultima VII spell package:
Two files; SleepingBody.cs, SleepingBodyEquip.cs, together with SleepingNameAttribute.cs replace files in the Ultima VII spell package. These files are compatible with the spell package and enhance it by clothing the sleeping body as well as adding a SleepingName attribute which can be added to creature scripts. The SleepingName attribute is used exactly like the CorpseName attribute is used. (edit: Check the file dates / versions Voran may have updated his scripts. You only need one copy of SleepingBody.cs; use whichever one is most current.)
2.0 Notes:
This script works without modification in RunUO 2.0.
Installation:
There are two zip files. Extract both into your Scripts/Custom folder. The files in the SleepingBody zip replace files in the Ultima VII spell package if it is installed. Add a Sleeper item ingame and update its props as required.
Credits:
I had intended to do something like this for the Britannia shard for a while now, it turned out pretty nice so we decided to share it with everyone. Special thanks go to Voran for his work on the Ultima VII spell package and to crabby654 for his ideas and testing.