Go Back   RunUO - Ultima Online Emulation > RunUO > Script Support

Script Support Get support for modifying RunUO Scripts, or writing your own!

Reply
 
Thread Tools Display Modes
Old 06-18-2003, 06:26 PM   #1 (permalink)
 
Join Date: May 2003
Posts: 2,848
Default Meditation Allowance

How do you set the meditation allowance for a piece of armor? I wanted to make a custom piece of plate armor, but I can't figure out how to get the meditation allowance set to "all."

Oh, and how do I make the localized message "Mage Armor" appear on the property list of the armor on a mouse-over?
Cmonkey123 is offline   Reply With Quote
Old 06-18-2003, 07:55 PM   #2 (permalink)
Forum Expert
 
Join Date: Sep 2002
Age: 22
Posts: 979
Send a message via ICQ to Xero Send a message via AIM to Xero Send a message via MSN to Xero Send a message via Yahoo to Xero
Default

ok well just type [set meditationallowance all ... it should work.. the mage armor i am not absolutely sure.. i don't know scripts.. i just know ingame stuff
__________________
lightoningfast!
Xero is offline   Reply With Quote
Old 06-18-2003, 10:40 PM   #3 (permalink)
 
Join Date: May 2003
Posts: 2,848
Default

Well, I'm trying to script OSI artifacts into my shard, and the Inquisitor's Resolution gloves are Mage Armor... so i need to figure out how to get it to say "Mage Armor" on the mouse-over property list of the item, and I need to know how to script in MeditationAllowance-All.
Cmonkey123 is offline   Reply With Quote
Old 06-18-2003, 10:45 PM   #4 (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:
Originally Posted by Cmonkey123
Well, I'm trying to script OSI artifacts into my shard, and the Inquisitor's Resolution gloves are Mage Armor... so i need to figure out how to get it to say "Mage Armor" on the mouse-over property list of the item, and I need to know how to script in MeditationAllowance-All.
Just add the localized message to the property list...

Look up the int number, using Krrio's Clilic viewer
Phantom is offline   Reply With Quote
Old 06-18-2003, 10:58 PM   #5 (permalink)
 
Join Date: May 2003
Posts: 2,848
Default

Okay, well here is the code for InquisitorsResolution.cs:

[code:1]using System;
using Server.Items;

namespace Server.Items
{
[FlipableAttribute( 0x1414, 0x1418 )]
public class InquisitorsResolution : BaseArmor
{
public override int BasePhysicalResistance{ get{ return 5; } }
public override int BaseFireResistance{ get{ return 3; } }
public override int BaseColdResistance{ get{ return 22; } }
public override int BasePoisonResistance{ get{ return 3; } }
public override int BaseEnergyResistance{ get{ return 17; } }

public override int InitMaxHits{ get{ return 225; } }

[Constructable]
public InquisitorsResolution() : base( 0x1414, 40, ArmorMaterialType.Plate, ArmorBodyType.Gloves )
{
Weight = 1;
Hue = 1266;
DexBonus = -2;
StrRequirement = 30;
Name = " Inquisitor's Resolution ";
Attributes.ArtifactRarity = 10;
MaxHitPoints = 255;
HitPoints = 255;
Attributes.CastRecovery = 3;
Attributes.LowerManaCost = 8;
1060437;

}

public InquisitorsResolution( Serial serial ) : base( serial )
{
}

public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}

public override void Deserialize(GenericReader reader)
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}[/code:1]

I added the Localized Message # (1060437) to the properties list:

[code:1][Constructable]
public InquisitorsResolution() : base( 0x1414, 40, ArmorMaterialType.Plate, ArmorBodyType.Gloves )
{
Weight = 1;
Hue = 1266;
DexBonus = -2;
StrRequirement = 30;
Name = " Inquisitor's Resolution ";
Attributes.ArtifactRarity = 10;
MaxHitPoints = 255;
HitPoints = 255;
Attributes.CastRecovery = 3;
Attributes.LowerManaCost = 8;
1060437;

}[/code:1]

And it comes up with this error:

[code:1]Error: Scripts\Custom Scripts\Artifacts\InquisitorsResolution.cs: CS1519: <line 15, column 23> Only assignment, call, increment, decrement, and new object expressions can be used as a statement[/code:1]
Cmonkey123 is offline   Reply With Quote
Old 06-18-2003, 11:28 PM   #6 (permalink)
 
Join Date: May 2003
Posts: 2,848
Default

How do I get the meditation allowace to "all" too? I can't figure it out for the life of me...
Cmonkey123 is offline   Reply With Quote
Old 06-19-2003, 02:36 AM   #7 (permalink)
Forum Administrator
 
krrios's Avatar
 
Join Date: Aug 2002
Posts: 2,850
Default

Should work:

[code:1]MeditationAllowance = MeditationAllowance.All;[/code:1]

By the way, I've added proper support for mage armor (and mage weapons) for the next version.
krrios is offline   Reply With Quote
Old 06-19-2003, 06:09 AM   #8 (permalink)
 
Join Date: Nov 2002
Posts: 61
Default

Im not 100% sure of this but lets say 99%. Mage armor in Osi is not meditationall, but 1/2. I had a bard with zero meditation on Osi, and using mage armor did slow a lot my med rate, so i didn't used them. I guess using Mage armor give the same regen rate as studded armor, coz i was wearing leather, and saw a huge slow when puting mage armor on this char (i say this coz im not sure RunUo meditallow 1/2 = Osi med rate of studded)
Requiem is offline   Reply With Quote
Old 06-19-2003, 12:15 PM   #9 (permalink)
 
Join Date: May 2003
Posts: 2,848
Default

Mage armor means meditation allowance- all
Cmonkey123 is offline   Reply With Quote
Old 06-19-2003, 12:19 PM   #10 (permalink)
 
Join Date: May 2003
Posts: 2,848
Default

Quote:
Originally Posted by krrios
Should work:

[code:1]MeditationAllowance = MeditationAllowance.All;[/code:1]

By the way, I've added proper support for mage armor (and mage weapons) for the next version.
Well when I put MeditationAllowance = MeditationAllowance.All in the properties list, it comes up with these two errors when compiling the scripts:

[code:1]'Server.Items.BaseArmor.MeditationAllowance' dontaes a 'property' where a 'class' was expected[/code:1]

[code:1]Static member 'Server.Items.ArmorMeditationAllowance.All' cannot be accessed with an instance referance; qualify it with a type name instead[/code:1]

And how do I get the message "Mage Armor" to display in the properties mouse-over?
Cmonkey123 is offline   Reply With Quote
Old 06-19-2003, 04:03 PM   #11 (permalink)
Forum Administrator
 
krrios's Avatar
 
Join Date: Aug 2002
Posts: 2,850
Default

Sorry, try:

[code:1]MeditationAllowance = ArmorMeditationAllowance.All;[/code:1]

Use the localization viewer in the downloads section to add properties in the GetProperties method. There are many examples of this.
krrios is offline   Reply With Quote
Old 06-19-2003, 11:39 PM   #12 (permalink)
 
Join Date: May 2003
Posts: 2,848
Default

How do I make it say "Mage Armor?"

The number is 1060437...
Cmonkey123 is offline   Reply With Quote
Old 06-19-2003, 11:44 PM   #13 (permalink)
UOT
Forum Expert
 
UOT's Avatar
 
Join Date: Oct 2002
Location: Naples,FL
Age: 32
Posts: 1,552
Default

Dipends on if you want the name to be magic armor then you do an public override int LabelTo {get{return 1060437}} if you add it to the property list then you have to override the AddNameProperties.
UOT is offline   Reply With Quote
Old 06-20-2003, 01:45 AM   #14 (permalink)
 
Join Date: May 2003
Posts: 2,848
Default

Can you add it into my script... I don't really know what you mean... I don't know much about C#, lol
Cmonkey123 is offline   Reply With Quote
Old 06-20-2003, 01:56 PM   #15 (permalink)
 
Join Date: May 2003
Posts: 2,848
Default

Can anyone help here?
Cmonkey123 is offline   Reply With Quote
Old 06-20-2003, 03:58 PM   #16 (permalink)
 
Join Date: May 2003
Posts: 2,848
Default

I've tried everything, I can't get it to display "Mage Armor" on the properties list...
Cmonkey123 is offline   Reply With Quote
Old 06-20-2003, 07:57 PM   #17 (permalink)
UOT
Forum Expert
 
UOT's Avatar
 
Join Date: Oct 2002
Location: Naples,FL
Age: 32
Posts: 1,552
Default

Dipending on if you want it on the bottom or top of the list you'd use either the first or the second[code:1]
public override void AddNameProperties( ObjectPropertyList list )
{
base.AddNameProperties( list );
list.Add("Mage Armor");
}
[/code:1][code:1]
public override void AddNameProperties( ObjectPropertyList list )
{
list.Add("Mage Armor");
base.AddNameProperties( list );
}
[/code:1]
UOT is offline   Reply With Quote
Old 06-20-2003, 08:27 PM   #18 (permalink)
 
Join Date: May 2003
Posts: 2,848
Default

That changes the name to "Mage Armor" either way...
Cmonkey123 is offline   Reply With Quote
Old 06-20-2003, 11:08 PM   #19 (permalink)
 
Join Date: May 2003
Posts: 2,848
Default

URG!!! SOMEONE HELP ME!!! IT'S DRIVING ME INSANE!!!!
Cmonkey123 is offline   Reply With Quote
Old 06-21-2003, 01:07 AM   #20 (permalink)
UOT
Forum Expert
 
UOT's Avatar
 
Join Date: Oct 2002
Location: Naples,FL
Age: 32
Posts: 1,552
Default

If you use the labelTo override it'll change the name if you just use the override addnameproperties exactly how I showed you, the top one will list Mage armor at the bottom and the bottom one will list it at the top of the current property list. If you have a locilized text instead of "mage armor" you can use the int. Also if it doesn't list the name and you want the name on top the mage armor then the rst you can do[code:1] public override void AddNameProperties( ObjectPropertyList list )
{
list.Add(Name);
list.Add("Mage Armor");
base.AddNameProperties( list );
} [/code:1]or if you want to have NAME [Mage Armor] on top you can use [code:1] public override void AddNameProperties( ObjectPropertyList list )
{
list.Add(Name + " [Mage Armor]");
base.AddNameProperties( list );
} [/code:1]
The combination are quite a few as are the options on how to do it. Don't mean to sound rude but I'm sorry, don't expect further help from me for I have shown you the way but you haven't shown that you even tried to play with what I gave you to try and figure it out. It seems that you want the code just handed to you which I don't like doing, I try to help people not do hand outs unless I have no samples to refer to, which wasn't the case here.
UOT is offline   Reply With Quote
Old 06-21-2003, 12:07 PM   #21 (permalink)
 
Join Date: May 2003
Posts: 2,848
Default

I'm sorry, but I tried many things... I don't understand C# that well, and, not to be rude, I couldn't really understand what you where telling me...

Thanks anyways.
Cmonkey123 is offline   Reply With Quote
Old 06-21-2003, 01:01 PM   #22 (permalink)
 
Join Date: May 2003
Posts: 2,848
Default

Well, I tried the addnameproperties and the getproperties methods, but it always makes the first property on the object property list the name of the item... I got "Mage Armor" to appear at the bottom with this code:

[code:1] public override void GetProperties( ObjectPropertyList list )
{
base.GetProperties( list );
list.Add( " Mage Armor " );
}[/code:1]

But it still puts the first property on the object list in the place of the name.

I tired to add list.add( name ); into this code in several differenet places, but each time it comes up with the same results... a property in the place of the name...
Cmonkey123 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