Go Back   RunUO - Ultima Online Emulation > RunUO > New Join Forum

New Join Forum So your new to RunUO and looking to work with people that are new, this is the place.

Reply
 
Thread Tools Display Modes
Old 02-21-2005, 12:20 PM   #1 (permalink)
 
Join Date: Jan 2005
Age: 40
Posts: 17
Default Two Questions from a NEW Scriptor

I'm starting by learning to read and modify (slightly) existing scripts before trying to build my own.

I have 2 small questions that will help me understand changes that are possible.

First is in the BaseVendor.cs script.

Code:
		public virtual TimeSpan RestockDelay
		{
			get
			{
				return TimeSpan.FromHours( 1 );
			}
		}
If I want vendors based on this class to restock in shorter time period can I set this value for .25 hours or is there another way to set it for 15 minutes?


Second is about the sound when items are dropped say on the floor or in a pack / box etc. I've looked in just about every script I can think of trying to find an example of how to make a sound happen on drag-drop. Can anyone tell me how to make a sound happen when I drop an item into a custom book or box etc?

Thanks a lot for your help.
DHMagicMan is offline   Reply With Quote
Old 02-21-2005, 12:46 PM   #2 (permalink)
Save the Mongbats!
 
Thraxus's Avatar
 
Join Date: Mar 2003
Location: Mongbatville
Age: 33
Posts: 1,042
Default

I can answer your first question easily..

Code:
TimeSpan.FromMinutes( 15 );
__________________
One day, we mongbats shall rise up and unleash our fury on all of mankind...
And on that fateful day, humanity shall tremble, and they shall know despair...
Thraxus is offline   Reply With Quote
Old 02-21-2005, 01:01 PM   #3 (permalink)
Save the Mongbats!
 
Thraxus's Avatar
 
Join Date: Mar 2003
Location: Mongbatville
Age: 33
Posts: 1,042
Default

Your second question really depends on what specific circumstances you're dealing with. If you're working on a container that inherits from BaseContainer, then you can just specify it by overriding DefaultDropSound, as seen in all the containers in Scripts\Items\Containers\Container.cs
__________________
One day, we mongbats shall rise up and unleash our fury on all of mankind...
And on that fateful day, humanity shall tremble, and they shall know despair...
Thraxus is offline   Reply With Quote
Old 02-21-2005, 01:07 PM   #4 (permalink)
 
Join Date: Jan 2005
Age: 40
Posts: 17
Default

Thanks for your help on both issues.

I'm sorry if the questions seeded stupid.

I'm (obviously) very new at this.
DHMagicMan is offline   Reply With Quote
Old 02-21-2005, 01:10 PM   #5 (permalink)
Save the Mongbats!
 
Thraxus's Avatar
 
Join Date: Mar 2003
Location: Mongbatville
Age: 33
Posts: 1,042
Default

That's why this is the New Join forum.

You're welcome.
__________________
One day, we mongbats shall rise up and unleash our fury on all of mankind...
And on that fateful day, humanity shall tremble, and they shall know despair...
Thraxus is offline   Reply With Quote
Old 02-21-2005, 03:43 PM   #6 (permalink)
 
Join Date: Jan 2005
Age: 40
Posts: 17
Default

Thanks for all this. I've found the PlaySound examples now.

This brought up another question though. When you open a spell book you hear a "Book Opening" sound which I would expect to be defined in a DoubleClick area. There's no sound info that I can find though. I've checked the items/books and don't see any open book sound there either.

Is the sound being inherited from someplace else?

I'm trying to be as independant as possible but it's sort of like learning to crawl and then walk, isn't it?
DHMagicMan is offline   Reply With Quote
Old 02-21-2005, 03:47 PM   #7 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

Quote:
This brought up another question though. When you open a spell book you hear a "Book Opening" sound which I would expect to be defined in a DoubleClick area. There's no sound info that I can find though. I've checked the items/books and don't see any open book sound there either.
I would assume that event is handled by the client because of:

Code:
EventSink.OpenSpellbookRequest += new OpenSpellbookRequestEventHandler( EventSink_OpenSpellbookRequest );
Which means there is some internal code either in the client or the core that handles that.
Phantom is offline   Reply With Quote
Old 02-21-2005, 03:49 PM   #8 (permalink)
Save the Mongbats!
 
Thraxus's Avatar
 
Join Date: Mar 2003
Location: Mongbatville
Age: 33
Posts: 1,042
Default

A lot of the code pertaining to the spellbooks is located within the core, and some of it is handled by the client.

Edit: Phantom ninja'd my reply!

__________________
One day, we mongbats shall rise up and unleash our fury on all of mankind...
And on that fateful day, humanity shall tremble, and they shall know despair...
Thraxus is offline   Reply With Quote
Old 02-21-2005, 03:59 PM   #9 (permalink)
 
Join Date: Feb 2005
Age: 34
Posts: 107
Send a message via Yahoo to Ninja-AoI
Default

Gotta watch that Phantom. He'll do it every time. :P
Ninja-AoI is offline   Reply With Quote
Old 02-21-2005, 04:02 PM   #10 (permalink)
Save the Mongbats!
 
Thraxus's Avatar
 
Join Date: Mar 2003
Location: Mongbatville
Age: 33
Posts: 1,042
Default

Ack! Everywhere I go I'm either being ninja'd or running into ninjas!
__________________
One day, we mongbats shall rise up and unleash our fury on all of mankind...
And on that fateful day, humanity shall tremble, and they shall know despair...
Thraxus is offline   Reply With Quote
Old 02-21-2005, 06:29 PM   #11 (permalink)
 
Join Date: Feb 2005
Age: 34
Posts: 107
Send a message via Yahoo to Ninja-AoI
Default

Maybe it's your Cologne?
Ninja-AoI is offline   Reply With Quote
Old 02-21-2005, 08:55 PM   #12 (permalink)
Save the Mongbats!
 
Thraxus's Avatar
 
Join Date: Mar 2003
Location: Mongbatville
Age: 33
Posts: 1,042
Default

*sniff* *sniff*

Yeah.. that must be it.
__________________
One day, we mongbats shall rise up and unleash our fury on all of mankind...
And on that fateful day, humanity shall tremble, and they shall know despair...
Thraxus is offline   Reply With Quote
Reply

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