Go Back   RunUO - Ultima Online Emulation > RunUO > Custom Script Release Archive

Custom Script Release Archive This is a pre-script database archive of what our users had released.

 
 
Thread Tools Display Modes
Old 12-01-2004, 09:19 PM   #1 (permalink)
Moderate
 
David's Avatar
 
Join Date: Nov 2002
Location: USA
Posts: 6,598
Default [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.
Attached Files
File Type: zip Sleeper.zip (2.0 KB, 776 views)
File Type: zip SleepingBody.zip (3.2 KB, 678 views)
__________________
David Forum Moderator
The RunUO.com Forum Moderator Team

Forum Rules and Guidelines
RunUO Forum Search Engine
Download RunUO 2.0 RC2

Last edited by David; 06-20-2006 at 01:10 AM.
David is offline  
Old 12-01-2004, 11:11 PM   #2 (permalink)
 
Join Date: Apr 2004
Posts: 242
Default

nice script, thanks for posting.
Corbo6969 is offline  
Old 12-01-2004, 11:24 PM   #3 (permalink)
Forum Expert
 
Join Date: Oct 2002
Age: 45
Posts: 4,366
Default

You rock!
HellRazor is offline  
Old 12-02-2004, 10:26 AM   #4 (permalink)
Forum Novice
 
koluch's Avatar
 
Join Date: Mar 2004
Location: Wisconsin
Age: 45
Posts: 791
Thumbs up

Nice as always David

Now I have a silly question:
Id like to have the day/night light levels a little more realistic. Could someone point me to a file where this is located, and would it override the turning off dark nights player option they have?
I dont want to make it pitch black, but think it would add a lot to actually be able to tell a "day" is passing and its night time now.
I also think it would make the whole look of the towns and houses nicer - street lamps are there for a reason :]

Shazzy
koluch is offline  
Old 12-02-2004, 12:17 PM   #5 (permalink)
Moderate
 
David's Avatar
 
Join Date: Nov 2002
Location: USA
Posts: 6,598
Default

Take a look at LightCycle.cs in Scripts\Misc.
__________________
David Forum Moderator
The RunUO.com Forum Moderator Team

Forum Rules and Guidelines
RunUO Forum Search Engine
Download RunUO 2.0 RC2
David is offline  
Old 12-02-2004, 12:21 PM   #6 (permalink)
Forum Expert
 
Join Date: Dec 2003
Age: 35
Posts: 462
Send a message via ICQ to dstarz20 Send a message via AIM to dstarz20
Default

Dude, you rule. I remember back....Ultima 4 i think. The shop people had work schedules like this. They'd actually go to work during the day, then back to their houses at night. You could kill them in their sleep with one hit, boy was that fun.
dstarz20 is offline  
Old 12-02-2004, 01:42 PM   #7 (permalink)
Forum Expert
 
Join Date: Feb 2003
Location: East Coast USA
Posts: 1,364
Default

One step closer to scheduled NPCs. :>

You are the awesome!
__________________
the-retelling.org : scripts and tech demo
Alari is offline  
Old 12-02-2004, 07:33 PM   #8 (permalink)
Forum Novice
 
Join Date: Jun 2004
Posts: 133
Default

Great help to me and I am sure others
Taffer is offline  
Old 12-02-2004, 11:25 PM   #9 (permalink)
Moderate
 
David's Avatar
 
Join Date: Nov 2002
Location: USA
Posts: 6,598
Default Script Updated

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. You only need to download Sleeper.zip to get this update.

Thanks for the positive comments guys!
__________________
David Forum Moderator
The RunUO.com Forum Moderator Team

Forum Rules and Guidelines
RunUO Forum Search Engine
Download RunUO 2.0 RC2
David is offline  
Old 12-03-2004, 02:48 AM   #10 (permalink)
Forum Expert
 
Lucid Nagual's Avatar
 
Join Date: Nov 2004
Location: Beyond the Gates of Hell
Age: 36
Posts: 3,509
Thumbs up Reply

Wow nice script David! Is this the one U helped Voran with?
Lucid Nagual is offline  
Old 12-03-2004, 03:22 AM   #11 (permalink)
P3'c Orion Aviator
 
Join Date: Sep 2004
Age: 30
Posts: 1,272
Default

Intresting Idea. I wrote something semi-like this. Though my Npcs only walk inside their houses and sit down in a chair via waypoints. Id never thought of using a body. Very creative, keep up the superb work David.


-Jamie
sirens song is offline  
Old 12-03-2004, 11:37 AM   #12 (permalink)
Forum Novice
 
DarkeWolf's Avatar
 
Join Date: Feb 2004
Age: 37
Posts: 342
Default

as always, a new and innovative set of scripts from david. this is awesome! thanks for posting it!
I can also use this for a base for some of the scripts that I had in mind as well. thanks much david
DarkeWolf is offline  
Old 12-03-2004, 06:00 PM   #13 (permalink)
Newbie
 
Join Date: Nov 2003
Age: 28
Posts: 23
Default

David you own man!
Ludovic is offline  
Old 12-03-2004, 06:58 PM   #14 (permalink)
 
Join Date: Nov 2004
Age: 18
Posts: 52
Default

AWESOME! This sounds kinda cool, i'll add it to my server later.

Just out of curiosity, is there any chance of it being configured to follow a schedule of a real clock instead? If so, just let me know and I'll toy with it on my own time. Thanks!

-- Jordan
JordanK is offline  
Old 12-04-2004, 12:21 AM   #15 (permalink)
Moderate
 
David's Avatar
 
Join Date: Nov 2002
Location: USA
Posts: 6,598
Default

Quote:
Originally Posted by JordanK
Just out of curiosity, is there any chance of it being configured to follow a schedule of a real clock instead? If so, just let me know and I'll toy with it on my own time. Thanks!
Sure, take a look at the CheckTime() method in Sleeper.cs. Instead of Clock.GetTime() use DateTime.Now().Hours and DateTime.Now().Minutes.
__________________
David Forum Moderator
The RunUO.com Forum Moderator Team

Forum Rules and Guidelines
RunUO Forum Search Engine
Download RunUO 2.0 RC2
David is offline  
Old 12-05-2004, 03:02 AM   #16 (permalink)
Twisted Intel
 
silverwolfe's Avatar
 
Join Date: Feb 2003
Location: Fort Smith, AR
Age: 39
Posts: 1,081
Send a message via ICQ to silverwolfe Send a message via MSN to silverwolfe
Default

Found and fixed a small bug. When some "Inquisitive" Players try to turn in BOD's the corpse eats it. Solution is posted here, now they sleeping body refuses to accept items dragged onto it.
Attached Files
File Type: cs SleepingBody.cs (7.0 KB, 39 views)
__________________
Two roads diverged in a wood, and I-
I took the one less traveled by,
And that has made all the difference. - Robert Frost

Yes I am a damn Trammie! - Silver Wolfe

If You do not have anything good to say, say nothing at all. - Unknown
_______________________________
Quote:
Originally Posted by WarAngel
I would have to agree that Rhexis is very pretty. I will personally never disagree with her in a thread.
silverwolfe is offline  
Old 12-05-2004, 01:54 PM   #17 (permalink)
Moderate
 
David's Avatar
 
Join Date: Nov 2002
Location: USA
Posts: 6,598
Default

Thanks. Tested, confirmed and download fixed.
__________________
David Forum Moderator
The RunUO.com Forum Moderator Team

Forum Rules and Guidelines
RunUO Forum Search Engine
Download RunUO 2.0 RC2
David is offline  
Old 12-06-2004, 09:27 AM   #18 (permalink)
Forum Expert
 
flowerbudd's Avatar
 
Join Date: Jul 2003
Location: Missouri
Age: 31
Posts: 701
Send a message via ICQ to flowerbudd Send a message via AIM to flowerbudd Send a message via MSN to flowerbudd Send a message via Yahoo to flowerbudd
Default

one of my darling players discovered that if you do telekinisis on the sleeping vendors you can steal their items. lol
__________________
Med-Surg Nurse, Full time Pittsburg State Univ Sophmore, and FT Mother to 5 kids
flowerbudd is offline  
Old 12-06-2004, 11:19 AM   #19 (permalink)
Moderate
 
David's Avatar
 
Join Date: Nov 2002
Location: USA
Posts: 6,598
Default

Quote:
Originally Posted by flowerbudd
one of my darling players discovered that if you do telekinisis on the sleeping vendors you can steal their items. lol
That's kinda funny actually

However the SleepingBody is a modified corpse without the loot. All it contains is a generic copy of the clothes the vendor was wearing; which will be deleted as soon as the vendor wakes up. The worst they could do is undress the sleeping vendor, and then hopefully be wearing the items when he wakes up. It's really a self correcting problem I think, but I will look into blocking it at the next revision.
__________________
David Forum Moderator
The RunUO.com Forum Moderator Team

Forum Rules and Guidelines
RunUO Forum Search Engine
Download RunUO 2.0 RC2
David is offline  
Old 12-06-2004, 11:56 PM   #20 (permalink)
Forum Expert
 
otimpyre's Avatar
 
Join Date: Apr 2003
Location: Georgia
Age: 31
Posts: 392
Default Idea

Be nice if they snored. Or if it could set there title to sleeping then reset to "Blah"
Maybe they could run off an emote script. And occasionly play sound

case "snore":
SoundInt = 34;
break;
Just a thought. Great script thanx
otimpyre is offline  
Old 12-07-2004, 03:42 AM   #21 (permalink)
Forum Expert
 
Join Date: Oct 2002
Age: 26
Posts: 1,797
Default

They don't snore currently to save on timers.
Casting sleep on someone still makes them snore.
__________________
New shard coming soon!
Voran is offline  
Old 12-07-2004, 12:33 PM   #22 (permalink)
Moderate
 
David's Avatar
 
Join Date: Nov 2002
Location: USA
Posts: 6,598
Default

Quote:
Originally Posted by otimpyre
Be nice if they snored. Or if it could set there title to sleeping then reset to "Blah"
Maybe they could run off an emote script. And occasionly play sound

case "snore":
SoundInt = 34;
break;
Just a thought. Great script thanx
Voran is correct regarding the snoring. It was ommited on purpose. You can however easily add a title for the SleepingBody. Each creature type which you want to change the title for will need a SleepingName attribute. Here is an example
Code:
namespace Server.Mobiles 
{ 
	[CorpseName( "a corpse" )]
	[SleepingName( "a sleeping local" )]  // <----- Add this line -----<
	public class Townsperson : BaseCreature 
	{
Otherwise the title will default to the npc's name prepended with "Sleeping ".
__________________
David Forum Moderator
The RunUO.com Forum Moderator Team

Forum Rules and Guidelines
RunUO Forum Search Engine
Download RunUO 2.0 RC2
David is offline  
Old 12-09-2004, 07:15 AM   #23 (permalink)
hIn
 
Join Date: Dec 2004
Age: 25
Posts: 3
Default

it funny!
hIn is offline  
Old 12-10-2004, 04:06 AM   #24 (permalink)
Newbie
 
Join Date: Nov 2004
Age: 29
Posts: 27
Default

Most excellent!

I spent weeks on top of weeks scripting systems like this for a NWN project, added a huge amount of immersion... My shard is story based and time sensitive, this makes a huge difference. Many many thanks.
Krystofer is offline  
Old 12-26-2004, 05:32 PM   #25 (permalink)
Forum Novice
 
Join Date: May 2004
Age: 28
Posts: 285
Default

ok call me a newbie But I cant get this to work
Can you help me get it to work?
Rob24 is offline  
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5