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 06-03-2005, 07:27 PM   #1 (permalink)
Forum Novice
 
Join Date: Oct 2004
Location: Canada
Posts: 175
Default Changing itemID

How do you change an items Custom ID in scripts? like heres my script, but I want it to be a spellbook with customizable options such as Manaregain and stuff. The item ID will put it into a spellbook, and the original might be a dagger or something. Plz help!

Code:
using System;
using Server;

namespace Server.Items
{
	public class SpellbookOfKnowledge : Dagger
	{
		public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.Disarm; } } 
        public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.Paralyze; } }
		
		[Constructable]
		public SpellbookOfKnowledge()
		{
			
			Hue = 1157;
			Name = "Spellbook Of Knowledge";
			Attributes.LowerManaCost = 15;
			Attributes.SpellChanneling = 1;
			Attributes.BonusInt = 5;
			Attributes.RegenMana = 5;
			Attributes.SpellDamage = 5;
			Attributes.CastSpeed = 1;
		}



		public SpellbookOfKnowledge( 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();
		}
	}
}
yuri99 is offline   Reply With Quote
Old 06-03-2005, 07:41 PM   #2 (permalink)
Forum Novice
 
Join Date: Apr 2005
Age: 39
Posts: 233
Default

Changing ItemID in the script will change the appearance of an item, but for it to take on the functionality of something else, you need to override all the methods and code your own handlers.
Geezer is offline   Reply With Quote
Old 06-03-2005, 09:33 PM   #3 (permalink)
Forum Novice
 
Join Date: Oct 2004
Location: Canada
Posts: 175
Default

i just need the appearance changed
yuri99 is offline   Reply With Quote
Old 06-03-2005, 10:08 PM   #4 (permalink)
Forum Novice
 
Join Date: Apr 2005
Age: 39
Posts: 233
Default

Just add

ItemID = ... into the constructor of the item and it will change the appearance.
Geezer 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