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-08-2006, 08:20 PM   #1 (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 Custom ObjectPropertyLists Made Easy!

Me and my staff team got together to work out a way to have totally custom ObjectPropertyLists.

Using an array, and the cliloc value for ~1_NOTHING~, we were able to create a list that you can add ANYTHING to... All you need to do is replace your old ObjectPropertyList override method with this one, and edit it to suit your needs

Code:
public override void GetProperties( ObjectPropertyList list )
		{
			base.GetProperties( list );

			ArrayList strings = new ArrayList();

			if ( EXAMPLE != null )
				strings.Add("This text will show");
			
			string toAdd = "";
			int amount = strings.Count;
			int current = 1;

			foreach(string str in strings)
			{
				toAdd += str;
	
				if ( current != amount )
					toAdd += "\n";
	
				++current;
			}

			if(toAdd != "")
			list.Add(1070722, toAdd);
		}
Edit the areas marked in RED to suit your script, or you WILL get errors.

You can repeat this part as many times as you like:
Code:
if ( EXAMPLE != null )
	strings.Add("This text will show");
I know somethingl ike this has not been released before, because of a lot of searching. So i know this will be important for you guys!

*Not a tested theory, but this was tested using client 501j, so maybe the cliloc's were updated recently, since there is 2 ~1_NOTHING~ cliloc's now. And, of course, it ONLY work when the OPL is Enabled.

Have fun!
__________________

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

Last edited by Admin Vorspire; 05-08-2006 at 08:24 PM.
Vorspire is offline  
Old 05-08-2006, 08:57 PM   #2 (permalink)
Forum Master
 
Joeku's Avatar
 
Join Date: Feb 2005
Location: ShatteredSosaria.com
Posts: 9,260
Default

1. Kick Ass.
2. What's OPL?
3. Kick Ass.

***EDIT***
OPL = Object Property Lists
Joeku is offline  
Old 05-08-2006, 09:53 PM   #3 (permalink)
Forum Expert
 
Pyro-Tech's Avatar
 
Join Date: Oct 2003
Location: Carbondale, IL
Age: 24
Posts: 1,805
Send a message via MSN to Pyro-Tech
Default

I don't understand....what does this do??
__________________

Pyro-Tech is offline  
Old 05-08-2006, 11:18 PM   #4 (permalink)
Forum Expert
 
Join Date: Dec 2003
Location: Sitting in a chair fulfilling my life's goal
Age: 22
Posts: 2,650
Send a message via AIM to Killamus Send a message via MSN to Killamus
Default

I love you... Platonicly, of course.
__________________
Procrastinators unite!
Tomorrow.
Saying that Java is nice because it works on all OS's is like saying that anal sex is nice because it works on all genders.
Killamus is offline  
Old 05-08-2006, 11:36 PM   #5 (permalink)
Forum Expert
 
A_Li_N's Avatar
 
Join Date: Apr 2004
Location: Another state of mind
Age: 27
Posts: 2,875
Default

First off, this is very good Bout time someone made this.

Quote:
Originally Posted by Pyro-Tech
I don't understand....what does this do??
Let's say you have your PlayerMobile and you want to add a new system, let's say a Race/Class/Level. In order to add all 3 of those values to the list that pops up when you hover over a player (or click on them), you used to need 3 entries in the OPL (as in 3 different clicloc numbers), or a crafty use of ~1_val~:~2_val~ entry. With this, you can add all values into the array and it will make that crafty string (with breaks and all) for you automatically. So if you have your R/C/L values (string Race, string Class, int Level), you could do this:
Code:
		public override void GetProperties( ObjectPropertyList list )
		{
			base.GetProperties( list );

			ArrayList strings = new ArrayList();

			strings.Add( (Race == null ? "Race : Generic Race" : "Race : " + Race) );
			strings.Add( (Class == null ? "Class : Generic Class" : "Class : " + Class) );
			strings.Add( "Level : " + Level.ToString() );
			
			string toAdd = "";
			int amount = strings.Count;
			int current = 1;

			foreach(string str in strings)
			{
				toAdd += str;
	
				if ( current != amount )
					toAdd += "\n";
	
				++current;
			}

			if(toAdd != "")
			list.Add(1070722, toAdd);
		}
And this would make your OPL look like this in-game (when you hover/click on a player):
A_Li_N
Race : Alien
Class : Bringer of Death
Level : 11
A_Li_N is offline  
Old 05-09-2006, 12:49 AM   #6 (permalink)
Save the Mongbats!
 
Thraxus's Avatar
 
Join Date: Mar 2003
Location: Mongbatville
Age: 33
Posts: 1,042
Default

Clever little trick. I'm sure I can make use of this. I just wish I'd thought of 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  
Old 05-09-2006, 04:12 PM   #7 (permalink)
Forum Master
 
Joeku's Avatar
 
Join Date: Feb 2005
Location: ShatteredSosaria.com
Posts: 9,260
Default

A_Li_N actually thought of (and used) this method long ago, with his spellbooks. He helped me with object property lists on my Command Toolbar Stone

Vorspire made an easy-to-use method, though.

Again, this rocks. Good job man.
Joeku is offline  
Old 05-13-2006, 02:59 PM   #8 (permalink)
Forum Newbie
 
Join Date: Dec 2004
Age: 34
Posts: 7
Cool lol

Quote:
Originally Posted by Joeku
A_Li_N actually thought of (and used) this method long ago, with his spellbooks. He helped me with object property lists on my Command Toolbar Stone

Vorspire made an easy-to-use method, though.

Again, this rocks. Good job man.

yah he thought of it but did he make it?
redneck2002 is offline  
Old 05-13-2006, 07:56 PM   #9 (permalink)
Forum Master
 
Joeku's Avatar
 
Join Date: Feb 2005
Location: ShatteredSosaria.com
Posts: 9,260
Default

Quote:
Originally Posted by redneck2002
yah he thought of it but did he make it?
I said that Vorspire was the one to release the "official" method. Can't you read?
Quote:
A_Li_N actually thought of (and used) this method long ago...
Vorspire made an easy-to-use method, though.
Joeku is offline  
Old 05-14-2006, 11:14 AM   #10 (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

Don't worry about that...

I'm just surprised A_Li_N didn't release it when he made it.
__________________

WWW.RPK-UO.COM - The WoW-UO Cross-Over Shard
Vorspire is offline  
Old 05-14-2006, 09:47 PM   #11 (permalink)
Forum Expert
 
A_Li_N's Avatar
 
Join Date: Apr 2004
Location: Another state of mind
Age: 27
Posts: 2,875
Default

Technically, I did
It was part of my Full Spellbook script...not a standalone.
I, however, take no sort of credit for this as it's a prety generic 'idea' that just takes some thinking to put together.

Thanks for the release again!
A_Li_N is offline  
Old 05-14-2006, 10:30 PM   #12 (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

your welcome A_Li_N
__________________

WWW.RPK-UO.COM - The WoW-UO Cross-Over Shard
Vorspire 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