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 05-18-2006, 03:07 PM   #1 (permalink)
Forum Expert
 
Khaz's Avatar
 
Join Date: Mar 2003
Location: where I belong
Posts: 1,786
Default Usable ToStatic Command

Description: This simple command will allow you to convert items and add-ons into their static equivalent. It was written for freezing preparation, as freezing only locks in statics, walls, and floors.
This ToStatic command is called "usable" because it is derived from the BaseCommand class, and comes with the ability for you to use the Multi and Area modifiers.

Installation: Download the attached file and place it in your preferred Scripts subdirectory.

Usage:
  • To explode a single add-on into its static parts: [ToStatic -> target the add-on
  • To convert multiple items or add-ons: [m ToStatic -> target the objects to convert
  • If you have a large area of items or add-ons that you want to be converted to statics: [area ToStatic -> target the two corners of the bounding box around the area

Updates:
  • 05-22-06: Updated the file to initialize command registration. This resolves the problem where the command would not be recognized as valid.
  • 05-18-06: Updated the command to handle converting containers in a better fashion. Containers will now dump their contents to the ground when converted. These contents will not be converted to statics.


If any problems are encountered with the use of this file, please report it in this thread.
__________________
"Misfortune shows those who are not really friends." -Aristotle
"A multitude of words is no proof of a prudent mind." -Thales

Last edited by Khaz; 12-11-2006 at 02:23 AM.
Khaz is offline  
Old 05-18-2006, 03:43 PM   #2 (permalink)
Forum Expert
 
Manu's Avatar
 
Join Date: Jul 2005
Location: München/Deutschland (Munich/Germany)
Age: 27
Posts: 1,948
Send a message via ICQ to Manu Send a message via Skype™ to Manu
Thumbs up

Thx a lot!
__________________
Tides of Magic
doc-chaos.dyndns.org - Status: Gathering ideas, working out the concept
Manu is offline  
Old 05-18-2006, 08:44 PM   #3 (permalink)
Forum Expert
 
Khaz's Avatar
 
Join Date: Mar 2003
Location: where I belong
Posts: 1,786
Default

I've updated the file so that container contents are not lost when a container is targeted with this command. The usage is still the same.
__________________
"Misfortune shows those who are not really friends." -Aristotle
"A multitude of words is no proof of a prudent mind." -Thales
Khaz is offline  
Old 05-19-2006, 07:09 AM   #4 (permalink)
Forum Expert
 
Sunshine's Avatar
 
Join Date: Mar 2005
Location: Hopefully not near you
Posts: 2,233
Default

Ohhh I feel smarter now.

Why?

Becuase thanks to this I can go get those cool building addons and use them

BIG THANKS TO YOU

+++ karma for being soo nice and help so many
__________________
All people have the right to be stupid but some abuse the privilege.
Sunshine is offline  
Old 05-19-2006, 03:44 PM   #5 (permalink)
Forum Expert
 
Vorspire's Avatar
 
Join Date: Jan 2005
Location: Newcastle, United Kingdom
Age: 21
Posts: 2,298
Send a message via ICQ to Vorspire Send a message via MSN to Vorspire Send a message via Skype™ to Vorspire
Default

YES! Good job bro! I'm very impressed!

Infact, I've been waiting for something like this because we have addons that are around 200k items (new towns built in UOArchitect) that we anted to add. Now YOU have made it possible. ++++++Karma bro..

GJ


EDIT:

I downloaded, installed and booted runuo. When ingame it tells me "That is not a valid command". Why is this?

-Thnx
__________________

WWW.RPK-UO.COM - The WoW-UO Cross-Over Shard

Last edited by Admin Vorspire; 05-19-2006 at 04:05 PM.
Vorspire is offline  
Old 05-20-2006, 03:24 PM   #6 (permalink)
Forum Expert
 
Khaz's Avatar
 
Join Date: Mar 2003
Location: where I belong
Posts: 1,786
Default

Quote:
Originally Posted by Admin Vorspire
When ingame it tells me "That is not a valid command".
What is the command you're using when you receive that feedback?
__________________
"Misfortune shows those who are not really friends." -Aristotle
"A multitude of words is no proof of a prudent mind." -Thales
Khaz is offline  
Old 05-20-2006, 10:59 PM   #7 (permalink)
 
Join Date: May 2006
Age: 42
Posts: 10
Default same here

im getting same thing as guy up above
im using commcand [tostatic
xonmesall is offline  
Old 05-21-2006, 06:08 PM   #8 (permalink)
Forum Expert
 
Khaz's Avatar
 
Join Date: Mar 2003
Location: where I belong
Posts: 1,786
Default

Make sure that the file is underneath your RunUO\Scripts directory. Also ensure that line 16 reads Commands = new string[]{ "ToStatic" }; and line 18 reads Usage = "ToStatic";.
The most likely reason for the invalid command message is that the file is simply not in the Scripts directory, so make sure it is there.
__________________
"Misfortune shows those who are not really friends." -Aristotle
"A multitude of words is no proof of a prudent mind." -Thales
Khaz is offline  
Old 05-22-2006, 07:50 AM   #9 (permalink)
Forum Expert
 
Join Date: Jan 2004
Location: England
Age: 20
Posts: 442
Default

Quote:
Originally Posted by Khaz
Make sure that the file is underneath your RunUO\Scripts directory. Also ensure that line 16 reads Commands = new string[]{ "ToStatic" }; and line 18 reads Usage = "ToStatic";.
The most likely reason for the invalid command message is that the file is simply not in the Scripts directory, so make sure it is there.
The reason it's not been working is because you need to go into Commands.cs and put:
Code:
 
Register( new ToStaticCommand() );
in the Initialize() method.

__________________
David's Sig is my Sig. He always says it best.
tobyjug is offline  
Old 05-22-2006, 07:59 AM   #10 (permalink)
Forum Expert
 
Join Date: Oct 2002
Posts: 1,126
Default

May as well just do that in the ToStaticCommand class' Initialize(). Will have to make it TargetCommands.Register( new ToStaticCommand() );, though.
Aenima is offline  
Old 05-22-2006, 08:55 AM   #11 (permalink)
Forum Expert
 
Join Date: Jan 2004
Location: England
Age: 20
Posts: 442
Default

Quote:
Originally Posted by Aenima
May as well just do that in the ToStaticCommand class' Initialize(). Will have to make it TargetCommands.Register( new ToStaticCommand() );, though.
Yeh, even better suggestion
__________________
David's Sig is my Sig. He always says it best.
tobyjug is offline  
Old 05-22-2006, 12:37 PM   #12 (permalink)
 
Join Date: May 2006
Age: 42
Posts: 10
Default

say what? i dident quite get that.... so what do i have to do?
xonmesall is offline  
Old 05-22-2006, 12:59 PM   #13 (permalink)
Forum Expert
 
Join Date: Jan 2004
Location: England
Age: 20
Posts: 442
Default

Put in this:
Code:
public static void Initialize()
{
TargetCommands.Register(new ToStaticCommand());
}


just before the
Code:
public ToStaticCommand()
__________________
David's Sig is my Sig. He always says it best.
tobyjug is offline  
Old 05-22-2006, 02:15 PM   #14 (permalink)
Forum Expert
 
Khaz's Avatar
 
Join Date: Mar 2003
Location: where I belong
Posts: 1,786
Default

Good catch, tobyjug and Aenima. Thanks. I had forgotten all about that step with new command additions.

The download file has been updated to resolve this issue.
__________________
"Misfortune shows those who are not really friends." -Aristotle
"A multitude of words is no proof of a prudent mind." -Thales
Khaz 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