|
||
|
|||||||
| Script Support Get support for modifying RunUO Scripts, or writing your own! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Join Date: Dec 2003
Posts: 28
|
hi,
i tried to create a new sort of leather but have one problem, the name of the leather isnt showed, there only stands 1_NOTHING what have i done wrong? i tried to creat 2 sorts but here is only 1, Eisdrachenleder so why does it not accept the name i already tried it with Name = "Eisdrachenleder"; but it does not work, so pls help me [code:1][Constructable] public Eisdrachenleder() : this( 1 ) { } [Constructable] public Eisdrachenleder( int amount ) : base( CraftResource.Eisdrachenleder, amount ) { } public Eisdrachenleder( Serial serial ) : base( serial ) { } public override void Serialize( GenericWriter writer ) { base.Serialize( writer ); writer.Write( (int) 0 ); // version } public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); } public override Item Dupe( int amount ) { return base.Dupe( new Eisdrachenleder( amount ), amount ); }[/code:1] [code:1] [FlipableAttribute( 0x1079, 0x1078 )] public class EisdrachenHides : BaseHides, IScissorable { [Constructable] public EisdrachenHides() : this( 1 ) { } [Constructable] public EisdrachenHides( int amount ) : base( CraftResource.Eisdrachenleder, amount ) { } public EisdrachenHides( Serial serial ) : base( serial ) { } public override void Serialize( GenericWriter writer ) { base.Serialize( writer ); writer.Write( (int) 0 ); // version } public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); } public override Item Dupe( int amount ) { return base.Dupe( new EisdrachenHides( amount ), amount ); } public bool Scissor( Mobile from, Scissors scissors ) { if ( Deleted || !from.CanSee( this ) ) return false; base.ScissorHelper( from, new Eisdrachenleder(), 1 ); return true; } }[/code:1] [code:1]using System; using System.Collections; namespace Server.Items { public enum CraftResource { None = 0, Iron = 1, DullCopper, ShadowIron, Copper, Bronze, Gold, Agapite, Verite, Valorite, Rose, BloodRock, Mytheril, BlackRock, Obsidian, Plutonium, Eldar, Crystaline, Vulcan, Aqua, RegularLeather = 101, SpinedLeather, HornedLeather, BarbedLeather, Eisdrachenleder, Gargoyleleder, Oak, RedTree, DarkTree, Swamp, Keranit, Avalon, Elven, Asterxylon, RedScales = 201, YellowScales, BlackScales, GreenScales, WhiteScales, BlueScales } public enum CraftResourceType { None, Metal, Leather, Wood, Scales } public class CraftAttributeInfo { private int m_WeaponFireDamage; private int m_WeaponColdDamage; private int m_WeaponPoisonDamage; private int m_WeaponEnergyDamage; private int m_WeaponDurability; private int m_WeaponLuck; private int m_WeaponGoldIncrease; private int m_WeaponLowerRequirements; private int m_ArmorPhysicalResist; private int m_ArmorFireResist; private int m_ArmorColdResist; private int m_ArmorPoisonResist; private int m_ArmorEnergyResist; private int m_ArmorDurability; private int m_ArmorLuck; private int m_ArmorGoldIncrease; private int m_ArmorLowerRequirements; private int m_RunicMinAttributes; private int m_RunicMaxAttributes; private int m_RunicMinIntensity; private int m_RunicMaxIntensity; public int WeaponFireDamage{ get{ return m_WeaponFireDamage; } set{ m_WeaponFireDamage = value; } } public int WeaponColdDamage{ get{ return m_WeaponColdDamage; } set{ m_WeaponColdDamage = value; } } public int WeaponPoisonDamage{ get{ return m_WeaponPoisonDamage; } set{ m_WeaponPoisonDamage = value; } } public int WeaponEnergyDamage{ get{ return m_WeaponEnergyDamage; } set{ m_WeaponEnergyDamage = value; } } public int WeaponDurability{ get{ return m_WeaponDurability; } set{ m_WeaponDurability = value; } } public int WeaponLuck{ get{ return m_WeaponLuck; } set{ m_WeaponLuck = value; } } public int WeaponGoldIncrease{ get{ return m_WeaponGoldIncrease; } set{ m_WeaponGoldIncrease = value; } } public int WeaponLowerRequirements{ get{ return m_WeaponLowerRequirements; } set{ m_WeaponLowerRequirements = value; } } public int ArmorPhysicalResist{ get{ return m_ArmorPhysicalResist; } set{ m_ArmorPhysicalResist = value; } } public int ArmorFireResist{ get{ return m_ArmorFireResist; } set{ m_ArmorFireResist = value; } } public int ArmorColdResist{ get{ return m_ArmorColdResist; } set{ m_ArmorColdResist = value; } } public int ArmorPoisonResist{ get{ return m_ArmorPoisonResist; } set{ m_ArmorPoisonResist = value; } } public int ArmorEnergyResist{ get{ return m_ArmorEnergyResist; } set{ m_ArmorEnergyResist = value; } } public int ArmorDurability{ get{ return m_ArmorDurability; } set{ m_ArmorDurability = value; } } public int ArmorLuck{ get{ return m_ArmorLuck; } set{ m_ArmorLuck = value; } } public int ArmorGoldIncrease{ get{ return m_ArmorGoldIncrease; } set{ m_ArmorGoldIncrease = value; } } public int ArmorLowerRequirements{ get{ return m_ArmorLowerRequirements; } set{ m_ArmorLowerRequirements = value; } } public int RunicMinAttributes{ get{ return m_RunicMinAttributes; } set{ m_RunicMinAttributes = value; } } public int RunicMaxAttributes{ get{ return m_RunicMaxAttributes; } set{ m_RunicMaxAttributes = value; } } public int RunicMinIntensity{ get{ return m_RunicMinIntensity; } set{ m_RunicMinIntensity = value; } } public int RunicMaxIntensity{ get{ return m_RunicMaxIntensity; } set{ m_RunicMaxIntensity = value; } } public CraftAttributeInfo() { } public static readonly CraftAttributeInfo Blank; public static readonly CraftAttributeInfo DullCopper, ShadowIron, Copper, Bronze, Golden, Agapite, Verite, Valorite, Rose, BloodRock, Mytheril, BlackRock, Obsidian, Plutonium, Eldar, Crystaline, Vulcan, Aqua; public static readonly CraftAttributeInfo Spined, Horned, Barbed, Eisdrachen, Gargoyle; public static readonly CraftAttributeInfo Oak, RedTree, DarkTree, Swamp, Keranit, Avalon, Elven, Asterxylon; public static readonly CraftAttributeInfo RedScales, YellowScales, BlackScales, GreenScales, WhiteScales, BlueScales; static CraftAttributeInfo() { Blank = new CraftAttributeInfo(); CraftAttributeInfo dullCopper = DullCopper = new CraftAttributeInfo(); dullCopper.ArmorPhysicalResist = 1; dullCopper.ArmorDurability = 50; dullCopper.ArmorLowerRequirements = 20; dullCopper.WeaponDurability = 100; dullCopper.WeaponLowerRequirements = 50; dullCopper.RunicMinAttributes = 1; dullCopper.RunicMaxAttributes = 2; dullCopper.RunicMinIntensity = 10; dullCopper.RunicMaxIntensity = 35; CraftAttributeInfo shadowIron = ShadowIron = new CraftAttributeInfo(); shadowIron.ArmorPhysicalResist = 1; shadowIron.ArmorFireResist = 2; shadowIron.ArmorEnergyResist = 2; shadowIron.ArmorDurability = 100; shadowIron.WeaponColdDamage = 16; shadowIron.WeaponDurability = 50; shadowIron.RunicMinAttributes = 2; shadowIron.RunicMaxAttributes = 2; shadowIron.RunicMinIntensity = 20; shadowIron.RunicMaxIntensity = 45; CraftAttributeInfo copper = Copper = new CraftAttributeInfo(); copper.ArmorPhysicalResist = 2; copper.ArmorFireResist = 2; copper.ArmorPoisonResist = 2; copper.ArmorEnergyResist = 2; copper.WeaponPoisonDamage = 10; copper.WeaponEnergyDamage = 8; copper.RunicMinAttributes = 2; copper.RunicMaxAttributes = 3; copper.RunicMinIntensity = 25; copper.RunicMaxIntensity = 50; CraftAttributeInfo bronze = Bronze = new CraftAttributeInfo(); bronze.ArmorPhysicalResist = 2; bronze.ArmorColdResist = 2; bronze.ArmorPoisonResist = 3; bronze.ArmorEnergyResist = 3; bronze.WeaponFireDamage = 20; bronze.RunicMinAttributes = 3; bronze.RunicMaxAttributes = 3; bronze.RunicMinIntensity = 30; bronze.RunicMaxIntensity = 65; CraftAttributeInfo golden = Golden = new CraftAttributeInfo(); golden.ArmorPhysicalResist = 3; golden.ArmorFireResist = 3; golden.ArmorColdResist = 3; golden.ArmorEnergyResist = 3; golden.ArmorLuck = 30; golden.ArmorLowerRequirements = 30; golden.WeaponLuck = 30; golden.WeaponLowerRequirements = 50; golden.RunicMinAttributes = 3; golden.RunicMaxAttributes = 4; golden.RunicMinIntensity = 35; golden.RunicMaxIntensity = 75; CraftAttributeInfo agapite = Agapite = new CraftAttributeInfo(); agapite.ArmorPhysicalResist = 3; agapite.ArmorFireResist = 4; agapite.ArmorColdResist = 4; agapite.ArmorPoisonResist = 3; agapite.ArmorEnergyResist = 3; agapite.WeaponColdDamage = 30; agapite.WeaponEnergyDamage = 13; agapite.RunicMinAttributes = 4; agapite.RunicMaxAttributes = 4; agapite.RunicMinIntensity = 40; agapite.RunicMaxIntensity = 80; CraftAttributeInfo verite = Verite = new CraftAttributeInfo(); verite.ArmorPhysicalResist = 4; verite.ArmorFireResist = 4; verite.ArmorColdResist = 4; verite.ArmorPoisonResist = 4; verite.ArmorEnergyResist = 4; verite.WeaponPoisonDamage = 10; verite.WeaponEnergyDamage = 20; verite.RunicMinAttributes = 4; verite.RunicMaxAttributes = 5; verite.RunicMinIntensity = 45; verite.RunicMaxIntensity = 90; CraftAttributeInfo valorite = Valorite = new CraftAttributeInfo(); valorite.ArmorPhysicalResist = 4; valorite.ArmorColdResist = 4; valorite.ArmorFireResist = 4; valorite.ArmorPoisonResist = 5; valorite.ArmorEnergyResist = 5; valorite.ArmorDurability = 50; valorite.WeaponFireDamage = 7; valorite.WeaponColdDamage = 8; valorite.WeaponEnergyDamage = 10; valorite.RunicMinAttributes = 5; valorite.RunicMaxAttributes = 5; valorite.RunicMinIntensity = 50; valorite.RunicMaxIntensity = 100; CraftAttributeInfo rose = Rose = new CraftAttributeInfo(); rose.ArmorPhysicalResist = 5; rose.ArmorDurability = 50; rose.ArmorFireResist = 5; rose.ArmorColdResist = 5; rose.ArmorPoisonResist = 5; rose.ArmorEnergyResist = 5; rose.WeaponDurability = 100; rose.RunicMinAttributes = 5; rose.RunicMaxAttributes = 6; rose.RunicMinIntensity = 50; rose.RunicMaxIntensity = 100; CraftAttributeInfo bloodrock = BloodRock = new CraftAttributeInfo(); bloodrock.ArmorPhysicalResist = 5; bloodrock.ArmorDurability = 90; bloodrock.ArmorFireResist = 15; bloodrock.ArmorColdResist = -5; bloodrock.ArmorPoisonResist = 5; bloodrock.ArmorEnergyResist = 5; bloodrock.WeaponDurability = 90; bloodrock.RunicMinAttributes = 5; bloodrock.RunicMaxAttributes = 6; bloodrock.RunicMinIntensity = 50; bloodrock.RunicMaxIntensity = 100; CraftAttributeInfo mytheril = Mytheril = new CraftAttributeInfo(); mytheril.ArmorPhysicalResist = 6; mytheril.ArmorDurability = 80; mytheril.ArmorFireResist = -6; mytheril.ArmorColdResist = 16; mytheril.ArmorPoisonResist = 6; mytheril.ArmorEnergyResist = 6; mytheril.ArmorLuck = 60; mytheril.WeaponDurability = 80; mytheril.WeaponLuck = 60; mytheril.RunicMinAttributes = 5; mytheril.RunicMaxAttributes = 6; mytheril.RunicMinIntensity = 50; mytheril.RunicMaxIntensity = 100; CraftAttributeInfo blackrock = BlackRock = new CraftAttributeInfo(); blackrock.ArmorPhysicalResist = 6; blackrock.ArmorDurability = 6; blackrock.ArmorFireResist = 6; blackrock.ArmorColdResist = 6; blackrock.ArmorPoisonResist = 16; blackrock.ArmorEnergyResist = -6; blackrock.WeaponDurability = 70; blackrock.WeaponFireDamage = 65; blackrock.RunicMinAttributes = 5; blackrock.RunicMaxAttributes = 6; blackrock.RunicMinIntensity = 50; blackrock.RunicMaxIntensity = 100; CraftAttributeInfo obsidian = Obsidian = new CraftAttributeInfo(); obsidian.ArmorPhysicalResist = 7; obsidian.ArmorDurability = 70; obsidian.ArmorFireResist = 7; obsidian.ArmorColdResist = 7; obsidian.ArmorPoisonResist = -7; obsidian.ArmorEnergyResist = 17; obsidian.WeaponDurability = 70; obsidian.WeaponColdDamage = 80; obsidian.RunicMinAttributes = 5; obsidian.RunicMaxAttributes = 6; obsidian.RunicMinIntensity = 50; obsidian.RunicMaxIntensity = 100; CraftAttributeInfo plutonium = Plutonium = new CraftAttributeInfo(); plutonium.ArmorPhysicalResist = 9; plutonium.ArmorDurability = 50; plutonium.ArmorFireResist = 9; plutonium.ArmorColdResist = 9; plutonium.ArmorPoisonResist = 9; plutonium.ArmorEnergyResist = 9; plutonium.WeaponDurability = 80; plutonium.WeaponEnergyDamage = 80; plutonium.RunicMinAttributes = 5; plutonium.RunicMaxAttributes = 6; plutonium.RunicMinIntensity = 50; plutonium.RunicMaxIntensity = 100; CraftAttributeInfo eldar = Eldar = new CraftAttributeInfo(); eldar.ArmorPhysicalResist = 20; eldar.ArmorDurability = 100; eldar.ArmorFireResist = 20; eldar.ArmorColdResist = 20; eldar.ArmorPoisonResist = 20; eldar.ArmorEnergyResist = 20; eldar.ArmorLuck = 50; eldar.WeaponDurability = 50; eldar.RunicMinAttributes = 5; eldar.RunicMaxAttributes = 6; eldar.RunicMinIntensity = 50; eldar.RunicMaxIntensity = 100; CraftAttributeInfo crystaline = Crystaline = new CraftAttributeInfo(); crystaline.ArmorPhysicalResist = 20; crystaline.ArmorDurability = 100; crystaline.ArmorFireResist = 20; crystaline.ArmorColdResist = 20; crystaline.ArmorPoisonResist = 20; crystaline.ArmorEnergyResist = 20; crystaline.ArmorLuck = 50; crystaline.WeaponDurability = 50; crystaline.RunicMinAttributes = 5; crystaline.RunicMaxAttributes = 6; crystaline.RunicMinIntensity = 50; crystaline.RunicMaxIntensity = 100; CraftAttributeInfo vulcan = Vulcan = new CraftAttributeInfo(); vulcan.ArmorPhysicalResist = 20; vulcan.ArmorDurability = 100; vulcan.ArmorFireResist = 20; vulcan.ArmorColdResist = 20; vulcan.ArmorPoisonResist = 20; vulcan.ArmorEnergyResist = 20; vulcan.ArmorLuck = 50; vulcan.WeaponDurability = 50; vulcan.RunicMinAttributes = 5; vulcan.RunicMaxAttributes = 6; vulcan.RunicMinIntensity = 50; vulcan.RunicMaxIntensity = 100; CraftAttributeInfo aqua = Aqua = new CraftAttributeInfo(); aqua.ArmorPhysicalResist = 20; aqua.ArmorDurability = 100; aqua.ArmorFireResist = 20; aqua.ArmorColdResist = 20; aqua.ArmorPoisonResist = 20; aqua.ArmorEnergyResist = 20; aqua.ArmorLuck = 50; aqua.WeaponDurability = 50; aqua.RunicMinAttributes = 5; aqua.RunicMaxAttributes = 6; aqua.RunicMinIntensity = 50; aqua.RunicMaxIntensity = 100; CraftAttributeInfo spined = Spined = new CraftAttributeInfo(); spined.ArmorPhysicalResist = 5; spined.ArmorLuck = 40; spined.RunicMinAttributes = 1; spined.RunicMaxAttributes = 3; spined.RunicMinIntensity = 20; spined.RunicMaxIntensity = 40; CraftAttributeInfo horned = Horned = new CraftAttributeInfo(); horned.ArmorPhysicalResist = 2; horned.ArmorFireResist = 3; horned.ArmorColdResist = 2; horned.ArmorPoisonResist = 2; horned.ArmorEnergyResist = 2; horned.RunicMinAttributes = 3; horned.RunicMaxAttributes = 4; horned.RunicMinIntensity = 30; horned.RunicMaxIntensity = 70; CraftAttributeInfo barbed = Barbed = new CraftAttributeInfo(); barbed.ArmorPhysicalResist = 2; barbed.ArmorFireResist = 1; barbed.ArmorColdResist = 2; barbed.ArmorPoisonResist = 3; barbed.ArmorEnergyResist = 4; barbed.RunicMinAttributes = 4; barbed.RunicMaxAttributes = 5; barbed.RunicMinIntensity = 40; barbed.RunicMaxIntensity = 100; CraftAttributeInfo eisdrachen = Eisdrachen = new CraftAttributeInfo(); eisdrachen.ArmorPhysicalResist = 2; eisdrachen.ArmorFireResist = 1; eisdrachen.ArmorColdResist = 2; eisdrachen.ArmorPoisonResist = 3; eisdrachen.ArmorEnergyResist = 4; eisdrachen.RunicMinAttributes = 4; eisdrachen.RunicMaxAttributes = 5; eisdrachen.RunicMinIntensity = 40; eisdrachen.RunicMaxIntensity = 100; CraftAttributeInfo gargoyle = Gargoyle = new CraftAttributeInfo(); gargoyle.ArmorPhysicalResist = 7; gargoyle.ArmorFireResist = 3; gargoyle.ArmorColdResist = 4; gargoyle.ArmorPoisonResist = 0; gargoyle.ArmorEnergyResist = 10; gargoyle.RunicMinAttributes = 4; gargoyle.RunicMaxAttributes = 5; gargoyle.RunicMinIntensity = 40; gargoyle.RunicMaxIntensity = 100; CraftAttributeInfo oak = Oak = new CraftAttributeInfo(); oak.WeaponDurability = 200; oak.WeaponLowerRequirements = 50; oak.WeaponPoisonDamage = 10; oak.RunicMinAttributes = 1; oak.RunicMaxAttributes = 3; oak.RunicMinIntensity = 5; oak.RunicMaxIntensity = 30; CraftAttributeInfo redtree = RedTree = new CraftAttributeInfo(); redtree.WeaponDurability = 200; redtree.WeaponLowerRequirements = 50; redtree.WeaponColdDamage = 20; redtree.RunicMinAttributes = 1; redtree.RunicMaxAttributes = 3; redtree.RunicMinIntensity = 5; redtree.RunicMaxIntensity = 30; CraftAttributeInfo darktree = DarkTree = new CraftAttributeInfo(); darktree.WeaponDurability = 200; darktree.WeaponLowerRequirements = 50; darktree.WeaponFireDamage = 30; darktree.RunicMinAttributes = 1; darktree.RunicMaxAttributes = 3; darktree.RunicMinIntensity = 5; darktree.RunicMaxIntensity = 30; CraftAttributeInfo swamp = Swamp = new CraftAttributeInfo(); swamp.WeaponDurability = 200; swamp.WeaponLowerRequirements = 50; swamp.WeaponEnergyDamage = 40; swamp.RunicMinAttributes = 1; swamp.RunicMaxAttributes = 3; swamp.RunicMinIntensity = 5; swamp.RunicMaxIntensity = 30; CraftAttributeInfo keranit = Keranit = new CraftAttributeInfo(); keranit.WeaponDurability = 100; keranit.WeaponLowerRequirements = 50; keranit.WeaponPoisonDamage = 50; keranit.RunicMinAttributes = 2; keranit.RunicMaxAttributes = 4; keranit.RunicMinIntensity = 10; keranit.RunicMaxIntensity = 40; CraftAttributeInfo avalon = Avalon = new CraftAttributeInfo(); avalon.WeaponDurability = 100; avalon.WeaponLowerRequirements = 50; avalon.WeaponColdDamage = 60; avalon.RunicMinAttributes = 2; avalon.RunicMaxAttributes = 4; avalon.RunicMinIntensity = 10; avalon.RunicMaxIntensity = 40; CraftAttributeInfo elven = Elven = new CraftAttributeInfo(); elven.WeaponDurability = 100; elven.WeaponLowerRequirements = 50; elven.WeaponFireDamage = 70; elven.RunicMinAttributes = 3; elven.RunicMaxAttributes = 5; elven.RunicMinIntensity = 15; elven.RunicMaxIntensity = 50; CraftAttributeInfo asterxylon = Asterxylon = new CraftAttributeInfo(); asterxylon.WeaponDurability = 100; asterxylon.WeaponLowerRequirements = 50; asterxylon.WeaponEnergyDamage = 80; asterxylon.RunicMinAttributes = 3; asterxylon.RunicMaxAttributes = 5; asterxylon.RunicMinIntensity = 15; asterxylon.RunicMaxIntensity = 50; CraftAttributeInfo red = RedScales = new CraftAttributeInfo(); red.ArmorFireResist = 10; red.ArmorColdResist = -3; CraftAttributeInfo yellow = YellowScales = new CraftAttributeInfo(); yellow.ArmorPhysicalResist = -3; yellow.ArmorLuck = 20; CraftAttributeInfo black = BlackScales = new CraftAttributeInfo(); black.ArmorPhysicalResist = 10; black.ArmorEnergyResist = -3; CraftAttributeInfo green = GreenScales = new CraftAttributeInfo(); green.ArmorFireResist = -3; green.ArmorPoisonResist = 10; CraftAttributeInfo white = WhiteScales = new CraftAttributeInfo(); white.ArmorPhysicalResist = -3; white.ArmorColdResist = 10; CraftAttributeInfo blue = BlueScales = new CraftAttributeInfo(); blue.ArmorPoisonResist = -3; blue.ArmorEnergyResist = 10; } } public class CraftResourceInfo { private int m_Hue; private int m_Number; private string m_Name; private CraftAttributeInfo m_AttributeInfo; private CraftResource m_Resource; private Type[] m_ResourceTypes; public int Hue{ get{ return m_Hue; } } public int Number{ get{ return m_Number; } } public string Name{ get{ return m_Name; } } public CraftAttributeInfo AttributeInfo{ get{ return m_AttributeInfo; } } public CraftResource Resource{ get{ return m_Resource; } } public Type[] ResourceTypes{ get{ return m_ResourceTypes; } } public CraftResourceInfo( int hue, int number, string name, CraftAttributeInfo attributeInfo, CraftResource resource, params Type[] resourceTypes ) { m_Hue = hue; m_Number = number; m_Name = name; m_AttributeInfo = attributeInfo; m_Resource = resource; m_ResourceTypes = resourceTypes; for ( int i = 0; i < resourceTypes.Length; ++i ) CraftResources.RegisterType( resourceTypes[i], resource ); } } public class CraftResources { private static CraftResourceInfo[] m_MetalInfo = new CraftResourceInfo[] { new CraftResourceInfo( 0x000, 1053109, "Iron", CraftAttributeInfo.Blank, CraftResource.Iron, typeof( IronIngot ), typeof( IronOre ), typeof( Granite ) ), new CraftResourceInfo( 0x973, 1053108, "Dull Copper", CraftAttributeInfo.DullCopper, CraftResource.DullCopper, typeof( DullCopperIngot ), typeof( DullCopperOre ), typeof( DullCopperGranite ) ), new CraftResourceInfo( 0x966, 1053107, "Shadow Iron", CraftAttributeInfo.ShadowIron, CraftResource.ShadowIron, typeof( ShadowIronIngot ), typeof( ShadowIronOre ), typeof( ShadowIronGranite ) ), new CraftResourceInfo( 0x14F, 1053106, "Copper", CraftAttributeInfo.Copper, CraftResource.Copper, typeof( CopperIngot ), typeof( CopperOre ), typeof( CopperGranite ) ), new CraftResourceInfo( 0x488, 1053105, "Bronze", CraftAttributeInfo.Bronze, CraftResource.Bronze, typeof( BronzeIngot ), typeof( BronzeOre ), typeof( BronzeGranite ) ), new CraftResourceInfo( 0x514, 1053104, "Gold", CraftAttributeInfo.Golden, CraftResource.Gold, typeof( GoldIngot ), typeof( GoldOre ), typeof( GoldGranite ) ), new CraftResourceInfo( 0xCC, 1053103, "Agapite", CraftAttributeInfo.Agapite, CraftResource.Agapite, typeof( AgapiteIngot ), typeof( AgapiteOre ), typeof( AgapiteGranite ) ), new CraftResourceInfo( 0x89F, 1053102, "Verite", CraftAttributeInfo.Verite, CraftResource.Verite, typeof( VeriteIngot ), typeof( VeriteOre ), typeof( VeriteGranite ) ), new CraftResourceInfo( 0x84B, 1053101, "Valorite", CraftAttributeInfo.Valorite, CraftResource.Valorite, typeof( ValoriteIngot ), typeof( ValoriteOre ), typeof( ValoriteGranite ) ), new CraftResourceInfo( 0x13, 0, "Rose", CraftAttributeInfo.Rose, CraftResource.Rose, typeof( RoseIngot ), typeof( RoseOre ), typeof( RoseGranite ) ), new CraftResourceInfo( 0x14D, 0, "BloodRock", CraftAttributeInfo.BloodRock, CraftResource.BloodRock, typeof( BloodRockIngot ), typeof( BloodRockOre ), typeof( BloodRockGranite ) ), new CraftResourceInfo( 0x492, 0, "Mytheril", CraftAttributeInfo.Mytheril, CraftResource.Mytheril, typeof( MytherilIngot ), typeof( MytherilOre ), typeof( MytherilGranite ) ), new CraftResourceInfo( 0x485, 0, "BlackRock", CraftAttributeInfo.BlackRock, CraftResource.BlackRock, typeof( BlackRockIngot ), typeof( BlackRockOre ), typeof( BlackRockGranite ) ), new CraftResourceInfo( 0x27, 0, "Obsidian", CraftAttributeInfo.Obsidian, CraftResource.Obsidian, typeof( ObsidianIngot ), typeof( ObsidianOre ), typeof( ObsidianGranite ) ), new CraftResourceInfo( 0x3A, 0, "Plutonium", CraftAttributeInfo.Plutonium, CraftResource.Plutonium, typeof( PlutoniumIngot ), typeof( PlutoniumOre ), typeof( PlutoniumGranite ) ), new CraftResourceInfo( 0x4FD, 0, "Eldar", CraftAttributeInfo.Eldar, CraftResource.Eldar, typeof( EldarIngot ), typeof( EldarOre ), typeof( EldarGranite ) ), new CraftResourceInfo( 0x7F5, 0, "Crystaline", CraftAttributeInfo.Crystaline, CraftResource.Crystaline, typeof( CrystalineIngot ), typeof( CrystalineOre ), typeof( CrystalineGranite ) ), new CraftResourceInfo( 0x499, 0, "Vulcan", CraftAttributeInfo.Vulcan, CraftResource.Vulcan, typeof( VulcanIngot ), typeof( VulcanOre ), typeof( VulcanGranite ) ), new CraftResourceInfo( 0x48D, 0, "Aqua", CraftAttributeInfo.Aqua, CraftResource.Aqua, typeof( AquaIngot ), typeof( AquaOre ), typeof( AquaGranite ) ), }; private static CraftResourceInfo[] m_WoodInfo = new CraftResourceInfo[] { new CraftResourceInfo( 0x844, 0, "Oak", CraftAttributeInfo.Oak, CraftResource.Oak, typeof( OakLog ) ), new CraftResourceInfo( 0x74F, 0, "RedTree", CraftAttributeInfo.RedTree, CraftResource.RedTree, typeof( RedTreeLog ) ), new CraftResourceInfo( 0x1b1, 0, "DarkTree", CraftAttributeInfo.DarkTree, CraftResource.DarkTree, typeof( DarkTreeLog ) ), new CraftResourceInfo( 0x48C, 0, "Swamp", CraftAttributeInfo.Swamp, CraftResource.Swamp, typeof( SwampLog ) ), new CraftResourceInfo( 0x8A5, 0, "Keranit", CraftAttributeInfo.Keranit, CraftResource.Keranit, typeof( KeranitLog ) ), new CraftResourceInfo( 0x903, 0, "Avalon", CraftAttributeInfo.Avalon, CraftResource.Avalon, typeof( AvalonLog ) ), new CraftResourceInfo( 0x4F4, 0, "Elven", CraftAttributeInfo.Elven, CraftResource.Elven, typeof( ElvenLog ) ), new CraftResourceInfo( 0x486, 0, "Asterxylon", CraftAttributeInfo.Asterxylon, CraftResource.Asterxylon, typeof( AsterxylonLog ) ), }; private static CraftResourceInfo[] m_ScaleInfo = new CraftResourceInfo[] { new CraftResourceInfo( 0x66D, 1053129, "Red Scales", CraftAttributeInfo.RedScales, CraftResource.RedScales, typeof( RedScales ) ), new CraftResourceInfo( 0x8A8, 1053130, "Yellow Scales", CraftAttributeInfo.YellowScales, CraftResource.YellowScales, typeof( YellowScales ) ), new CraftResourceInfo( 0x455, 1053131, "Black Scales", CraftAttributeInfo.BlackScales, CraftResource.BlackScales, typeof( BlackScales ) ), new CraftResourceInfo( 0x851, 1053132, "Green Scales", CraftAttributeInfo.GreenScales, CraftResource.GreenScales, typeof( GreenScales ) ), new CraftResourceInfo( 0x8FD, 1053133, "White Scales", CraftAttributeInfo.WhiteScales, CraftResource.WhiteScales, typeof( WhiteScales ) ), new CraftResourceInfo( 0x8B0, 1053134, "Blue Scales", CraftAttributeInfo.BlueScales, CraftResource.BlueScales, typeof( BlueScales ) ) }; private static CraftResourceInfo[] m_LeatherInfo = new CraftResourceInfo[] { new CraftResourceInfo( 0x000, 1049353, "Normal", CraftAttributeInfo.Blank, CraftResource.RegularLeather, typeof( Leather ), typeof( Hides ) ), new CraftResourceInfo( 0x283, 1049354, "Spined", CraftAttributeInfo.Spined, CraftResource.SpinedLeather, typeof( SpinedLeather ), typeof( SpinedHides ) ), new CraftResourceInfo( 0x227, 1049355, "Horned", CraftAttributeInfo.Horned, CraftResource.HornedLeather, typeof( HornedLeather ), typeof( HornedHides ) ), new CraftResourceInfo( 0x1C1, 1049356, "Barbed", CraftAttributeInfo.Barbed, CraftResource.BarbedLeather, typeof( BarbedLeather ), typeof( BarbedHides ) ), new CraftResourceInfo( 0x481, 0, "Eisdrachen", CraftAttributeInfo.Eisdrachen, CraftResource.Eisdrachenleder, typeof( Eisdrachenleder ), typeof( EisdrachenHides ) ), new CraftResourceInfo( 0x395, 0, "Gargoyle", CraftAttributeInfo.Gargoyle, CraftResource.Gargoyleleder, typeof( Gargoyleleder ), typeof( GargoyleHides ) ), }; private static CraftResourceInfo[] m_AOSLeatherInfo = new CraftResourceInfo[] { new CraftResourceInfo( 0x000, 1049353, "Normal", CraftAttributeInfo.Blank, CraftResource.RegularLeather, typeof( Leather ), typeof( Hides ) ), new CraftResourceInfo( 0x8AC, 1049354, "Spined", CraftAttributeInfo.Spined, CraftResource.SpinedLeather, typeof( SpinedLeather ), typeof( SpinedHides ) ), new CraftResourceInfo( 0x845, 1049355, "Horned", CraftAttributeInfo.Horned, CraftResource.HornedLeather, typeof( HornedLeather ), typeof( HornedHides ) ), new CraftResourceInfo( 0x851, 1049356, "Barbed", CraftAttributeInfo.Barbed, CraftResource.BarbedLeather, typeof( BarbedLeather ), typeof( BarbedHides ) ), new CraftResourceInfo( 0x481, 0, "Eisdrachen", CraftAttributeInfo.Eisdrachen, CraftResource.Eisdrachenleder, typeof( Eisdrachenleder ), typeof( EisdrachenHides ) ), new CraftResourceInfo( 0x395, 0, "Gargoyle", CraftAttributeInfo.Gargoyle, CraftResource.Gargoyleleder, typeof( Gargoyleleder ), typeof( GargoyleHides ) ), }; /// <summary> /// Returns true if '<paramref name="resource"/>' is None, Iron, or RegularLeather. False if otherwise. /// </summary> public static bool IsStandard( CraftResource resource ) { return ( resource == CraftResource.None || resource == CraftResource.Iron || resource == CraftResource.RegularLeather || resource == CraftResource.Oak ); } private static Hashtable m_TypeTable; /// <summary> /// Registers that '<paramref name="resourceType"/>' uses '<paramref name="resource"/>' so that it can later be queried by <see cref="CraftResources.GetFromType"/> /// </summary> public static void RegisterType( Type resourceType, CraftResource resource ) { if ( m_TypeTable == null ) m_TypeTable = new Hashtable(); m_TypeTable[resourceType] = resource; } /// <summary> /// Returns the <see cref="CraftResource"/> value for which '<paramref name="resourceType"/>' uses -or- CraftResource.None if an unregistered type was specified. /// </summary> public static CraftResource GetFromType( Type resourceType ) { if ( m_TypeTable == null ) return CraftResource.None; object obj = m_TypeTable[resourceType]; if ( !(obj is CraftResource) ) return CraftResource.None; return (CraftResource)obj; } /// <summary> /// Returns a <see cref="CraftResourceInfo"/> instance describing '<paramref name="resource"/>' -or- null if an invalid resource was specified. /// </summary> public static CraftResourceInfo GetInfo( CraftResource resource ) { CraftResourceInfo[] list = null; switch ( GetType( resource ) ) { case CraftResourceType.Metal: list = m_MetalInfo; break; case CraftResourceType.Leather: list = Core.AOS ? m_AOSLeatherInfo : m_LeatherInfo; break; case CraftResourceType.Wood: list = m_WoodInfo; break; case CraftResourceType.Scales: list = m_ScaleInfo; break; } if ( list != null ) { int index = GetIndex( resource ); if ( index >= 0 && index < list.Length ) return list[index]; } return null; } /// <summary> /// Returns a <see cref="CraftResourceType"/> value indiciating the type of '<paramref name="resource"/>'. /// </summary> public static CraftResourceType GetType( CraftResource resource ) { if ( resource >= CraftResource.Iron && resource <= CraftResource.Aqua ) return CraftResourceType.Metal; if ( resource >= CraftResource.RegularLeather && resource <= CraftResource.BarbedLeather ) return CraftResourceType.Leather; if ( resource >= CraftResource.Oak && resource <= CraftResource.Asterxylon ) return CraftResourceType.Wood; if ( resource >= CraftResource.RedScales && resource <= CraftResource.BlueScales ) return CraftResourceType.Scales; return CraftResourceType.None; } /// <summary> /// Returns the first <see cref="CraftResource"/> in the series of resources for which '<paramref name="resource"/>' belongs. /// </summary> public static CraftResource GetStart( CraftResource resource ) { switch ( GetType( resource ) ) { case CraftResourceType.Metal: return CraftResource.Iron; case CraftResourceType.Leather: return CraftResource.RegularLeather; case CraftResourceType.Wood: return CraftResource.Oak; case CraftResourceType.Scales: return CraftResource.RedScales; } return CraftResource.None; } /// <summary> /// Returns the index of '<paramref name="resource"/>' in the seriest of resources for which it belongs. /// </summary> public static int GetIndex( CraftResource resource ) { CraftResource start = GetStart( resource ); if ( start == CraftResource.None ) return 0; return (int)(resource - start); } /// <summary> /// Returns the <see cref="CraftResourceInfo.Number"/> property of '<paramref name="resource"/>' -or- 0 if an invalid resource was specified. /// </summary> public static int GetLocalizationNumber( CraftResource resource ) { CraftResourceInfo info = GetInfo( resource ); return ( info == null ? 0 : info.Number ); } /// <summary> /// Returns the <see cref="CraftResourceInfo.Hue"/> property of '<paramref name="resource"/>' -or- 0 if an invalid resource was specified. /// </summary> public static int GetHue( CraftResource resource ) { CraftResourceInfo info = GetInfo( resource ); return ( info == null ? 0 : info.Hue ); } /// <summary> /// Returns the <see cref="CraftResourceInfo.Name"/> property of '<paramref name="resource"/>' -or- an empty string if the resource specified was invalid. /// </summary> public static string GetName( CraftResource resource ) { CraftResourceInfo info = GetInfo( resource ); return ( info == null ? String.Empty : info.Name ); } /// <summary> /// Returns the <see cref="CraftResource"/> value which represents '<paramref name="info"/>' -or- CraftResource.None if unable to convert. /// </summary> public static CraftResource GetFromOreInfo( OreInfo info ) { if ( info.Name.IndexOf( "Spined" ) >= 0 ) return CraftResource.SpinedLeather; else if ( info.Name.IndexOf( "Horned" ) >= 0 ) return CraftResource.HornedLeather; else if ( info.Name.IndexOf( "Barbed" ) >= 0 ) return CraftResource.BarbedLeather; else if ( info.Name.IndexOf( "Leather" ) >= 0 ) return CraftResource.RegularLeather; else if ( info.Name.IndexOf( "Eisdrachen" ) >= 0 ) return CraftResource.Eisdrachenleder; else if ( info.Name.IndexOf( "Gargoyle" ) >= 0 ) return CraftResource.Gargoyleleder; if ( info.Level == 0 ) return CraftResource.Iron; else if ( info.Level == 1 ) return CraftResource.DullCopper; else if ( info.Level == 2 ) return CraftResource.ShadowIron; else if ( info.Level == 3 ) return CraftResource.Copper; else if ( info.Level == 4 ) return CraftResource.Bronze; else if ( info.Level == 5 ) return CraftResource.Gold; else if ( info.Level == 6 ) return CraftResource.Agapite; else if ( info.Level == 7 ) return CraftResource.Verite; else if ( info.Level == 8 ) return CraftResource.Valorite; else if ( info.Level == 9 ) return CraftResource.Rose; else if ( info.Level == 10 ) return CraftResource.BloodRock; else if ( info.Level == 11 ) return CraftResource.Mytheril; else if ( info.Level == 12 ) return CraftResource.BlackRock; else if ( info.Level == 13 ) return CraftResource.Obsidian; else if ( info.Level == 14 ) return CraftResource.Plutonium; else if ( info.Level == 15 ) return CraftResource.Eldar; else if ( info.Level == 16 ) return CraftResource.Crystaline; else if ( info.Level == 17 ) return CraftResource.Vulcan; else if ( info.Level == 18 ) return CraftResource.Aqua; else if ( info.Level == 19 ) return CraftResource.Oak; else if ( info.Level == 20 ) return CraftResource.RedTree; else if ( info.Level == 21 ) return CraftResource.DarkTree; else if ( info.Level == 22 ) return CraftResource.Swamp; else if ( info.Level == 23 ) return CraftResource.Keranit; else if ( info.Level == 24 ) return CraftResource.Avalon; else if ( info.Level == 25 ) return CraftResource.Elven; else if ( info.Level == 26 ) return CraftResource.Asterxylon; return CraftResource.None; } /// <summary> /// Returns the <see cref="CraftResource"/> value which represents '<paramref name="info"/>', using '<paramref name="material"/>' to help resolve leather OreInfo instances. /// </summary> public static CraftResource GetFromOreInfo( OreInfo info, ArmorMaterialType material ) { if ( material == ArmorMaterialType.Studded || material == ArmorMaterialType.Leather || material == ArmorMaterialType.Spined || material == ArmorMaterialType.Horned || material == ArmorMaterialType.Barbed ) { if ( info.Level == 0 ) return CraftResource.RegularLeather; else if ( info.Level == 1 ) return CraftResource.SpinedLeather; else if ( info.Level == 2 ) return CraftResource.HornedLeather; else if ( info.Level == 3 ) return CraftResource.BarbedLeather; else if ( info.Level == 4 ) return CraftResource.Eisdrachenleder; else if ( info.Level == 5 ) return CraftResource.Gargoyleleder; return CraftResource.None; } return GetFromOreInfo( info ); } } // NOTE: This class is only for compatability with very old RunUO versions. // No changes to it should be required for custom resources. public class OreInfo { public static readonly OreInfo Iron = new OreInfo( 0, 0x000, "Iron" ); public static readonly OreInfo DullCopper = new OreInfo( 1, 0x973, "Dull Copper" ); public static readonly OreInfo ShadowIron = new OreInfo( 2, 0x966, "Shadow Iron" ); public static readonly OreInfo Copper = new OreInfo( 3, 0x96D, "Copper" ); public static readonly OreInfo Bronze = new OreInfo( 4, 0x972, "Bronze" ); public static readonly OreInfo Gold = new OreInfo( 5, 0x8A5, "Gold" ); public static readonly OreInfo Agapite = new OreInfo( 6, 0x979, "Agapite" ); public static readonly OreInfo Verite = new OreInfo( 7, 0x89F, "Verite" ); public static readonly OreInfo Valorite = new OreInfo( 8, 0x8AB, "Valorite" ); public static readonly OreInfo Rose = new OreInfo( 9, 0x13, "Rose" ); public static readonly OreInfo BloodRock = new OreInfo( 10, 0x14D, "BloodRock" ); public static readonly OreInfo Mytheril = new OreInfo( 11, 0x492, "Mytheril" ); public static readonly OreInfo BlackRock = new OreInfo( 12, 0x485, "BlackRock" ); public static readonly OreInfo Obsidian = new OreInfo( 13, 0x27, "Obsidian" ); public static readonly OreInfo Plutonium = new OreInfo( 14, 0x3A, "Plutonium" ); public static readonly OreInfo Eldar = new OreInfo( 15, 0x4FD, "Eldar" ); public static readonly OreInfo Crystaline = new OreInfo( 16, 0x7F5, "Crystaline" ); public static readonly OreInfo Vulcan = new OreInfo( 17, 0x499, "Vulcan" ); public static readonly OreInfo Aqua = new OreInfo( 18, 0x48D, "Aqua" ); public static readonly OreInfo Oak = new OreInfo( 19, 0x844, "Oak" ); public static readonly OreInfo RedTree = new OreInfo( 20, 0x74F, "RedTree" ); public static readonly OreInfo DarkTree = new OreInfo( 21, 0x1b1, "DarkTree" ); public static readonly OreInfo Swamp = new OreInfo( 22, 0x48C, "Swamp" ); public static readonly OreInfo Keranit = new OreInfo( 23, 0x8A5, "Keranit" ); public static readonly OreInfo Avalon = new OreInfo( 24, 0x903, "Avalon" ); public static readonly OreInfo Elven = new OreInfo( 25, 0x4F4, "Elven" ); public static readonly OreInfo Asterxylon = new OreInfo( 26, 0x486, "Asterxylon" ); private int m_Level; private int m_Hue; private string m_Name; public OreInfo( int level, int hue, string name ) { m_Level = level; m_Hue = hue; m_Name = name; } public int Level { get { return m_Level; } } public int Hue { get { return m_Hue; } } public string Name { get { return m_Name; } } } }[/code:1] thx for youre answers,
__________________
sometimes you lose, and sometimes the others win! |
|
|
|
|
|
#4 (permalink) |
|
Join Date: Feb 2003
Posts: 269
|
http://www.runuo.com/forum/viewtopic.php?t=9862
It's a little old, but it should still work. This is an example of how to add custom ore. You should be able to add custom leather in this way too. Just remember to add it as both hides and as cut leather, and if you want your players to actually use it, add it to the tailoring menu as well. |
|
|
|
|
|
#6 (permalink) | |
|
Join Date: Dec 2003
Posts: 28
|
HOOAH
no it works !!! i forgot to edit the line Quote:
__________________
sometimes you lose, and sometimes the others win! |
|
|
|
|
|
|
#8 (permalink) |
|
Join Date: Dec 2003
Posts: 28
|
hmmm, now i have the next problem,
i tried to enter it into the tailoring menu but, there are the solts for leather but there is nothing wiritten. normlay there satnd for ex. Spined Leather / Hides but with my leather there is nothing only the button, heres the script [code:1]using System; using Server.Items; namespace Server.Engines.Craft { public class DefTailoring : CraftSystem { public override SkillName MainSkill { get { return SkillName.Tailoring; } } public override int GumpTitleNumber { get { return 1044005; } // <CENTER>TAILORING MENU</CENTER> } private static CraftSystem m_CraftSystem; public static CraftSystem CraftSystem { get { if ( m_CraftSystem == null ) m_CraftSystem = new DefTailoring(); return m_CraftSystem; } } public override CraftECA ECA{ get{ return CraftECA.ChanceMinusSixtyToFourtyFive; } } public override double GetChanceAtMin( CraftItem item ) { return 0.5; // 50% } private DefTailoring() : base( 1, 1, 1.25 )// base( 1, 1, 4.5 ) { } public override int CanCraft( Mobile from, BaseTool tool, Type itemType ) { if ( tool.Deleted || tool.UsesRemaining < 0 ) return 1044038; // You have worn out your tool! return 0; } public override void PlayCraftEffect( Mobile from ) { from.PlaySound( 0x248 ); } public override int PlayEndingEffect( Mobile from, bool failed, bool lostMaterial, bool toolBroken, int quality, bool makersMark, CraftItem item ) { if ( toolBroken ) from.SendLocalizedMessage( 1044038 ); // You have worn out your tool if ( failed ) { if ( lostMaterial ) return 1044043; // You failed to create the item, and some of your materials are lost. else return 1044157; // You failed to create the item, but no materials were lost. } else { if ( quality == 0 ) return 502785; // You were barely able to make this item. It's quality is below average. else if ( makersMark && quality == 2 ) return 1044156; // You create an exceptional quality item and affix your maker's mark. else if ( quality == 2 ) return 1044155; // You create an exceptional quality item. else return 1044154; // You create the item. } } public override void InitCraftList() { // Hats AddCraft( typeof( SkullCap ), 1011375, 1025444, 0.0, 25.0, typeof( Cloth ), 1044286, 2, 1044287 ); AddCraft( typeof( Bandana ), 1011375, 1025440, 0.0, 25.0, typeof( Cloth ), 1044286, 2, 1044287 ); AddCraft( typeof( FloppyHat ), 1011375, 1025907, 6.2, 31.2, typeof( Cloth ), 1044286, 11, 1044287 ); AddCraft( typeof( Cap ), 1011375, 1025909, -18.8, 6.2, typeof( Cloth ), 1044286, 11, 1044287 ); AddCraft( typeof( WideBrimHat ), 1011375, 1025908, 6.2, 31.2, typeof( Cloth ), 1044286, 12, 1044287 ); AddCraft( typeof( StrawHat ), 1011375, 1025911, 6.2, 31.2, typeof( Cloth ), 1044286, 10, 1044287 ); AddCraft( typeof( TallStrawHat ), 1011375, 1025910, 6.7, 31.7, typeof( Cloth ), 1044286, 13, 1044287 ); AddCraft( typeof( WizardsHat ), 1011375, 1025912, 7.2, 32.2, typeof( Cloth ), 1044286, 15, 1044287 ); AddCraft( typeof( Bonnet ), 1011375, 1025913, 6.2, 31.2, typeof( Cloth ), 1044286, 11, 1044287 ); AddCraft( typeof( FeatheredHat ), 1011375, 1025914, 6.2, 31.2, typeof( Cloth ), 1044286, 12, 1044287 ); AddCraft( typeof( TricorneHat ), 1011375, 1025915, 6.2, 31.2, typeof( Cloth ), 1044286, 12, 1044287 ); AddCraft( typeof( JesterHat ), 1011375, 1025916, 7.2, 32.2, typeof( Cloth ), 1044286, 15, 1044287 ); if ( Core.AOS ) AddCraft( typeof( FlowerGarland ), 1011375, 1028965, 10.0, 35.0, typeof( Cloth ), 1044286, 5, 1044287 ); // Shirts AddCraft( typeof( Doublet ), 1015269, 1028059, 0, 25.0, typeof( Cloth ), 1044286, 8, 1044287 ); AddCraft( typeof( Shirt ), 1015269, 1025399, 20.7, 45.7, typeof( Cloth ), 1044286, 8, 1044287 ); AddCraft( typeof( FancyShirt ), 1015269, 1027933, 24.8, 49.8, typeof( Cloth ), 1044286, 8, 1044287 ); AddCraft( typeof( Tunic ), 1015269, 1028097, 00.0, 25.0, typeof( Cloth ), 1044286, 12, 1044287 ); AddCraft( typeof( Surcoat ), 1015269, 1028189, 8.2, 33.2, typeof( Cloth ), 1044286, 14, 1044287 ); AddCraft( typeof( PlainDress ), 1015269, 1027937, 12.4, 37.4, typeof( Cloth ), 1044286, 10, 1044287 ); AddCraft( typeof( FancyDress ), 1015269, 1027935, 33.1, 58.1, typeof( Cloth ), 1044286, 12, 1044287 ); AddCraft( typeof( Cloak ), 1015269, 1025397, 41.4, 66.4, typeof( Cloth ), 1044286, 14, 1044287 ); AddCraft( typeof( Robe ), 1015269, 1027939, 53.9, 78.9, typeof( Cloth ), 1044286, 16, 1044287 ); AddCraft( typeof( JesterSuit ), 1015269, 1028095, 8.2, 33.2, typeof( Cloth ), 1044286, 24, 1044287 ); if ( Core.AOS ) { AddCraft( typeof( FurCape ), 1015269, 1028969, 35.0, 60.0, typeof( Cloth ), 1044286, 13, 1044287 ); AddCraft( typeof( GildedDress ), 1015269, 1028973, 37.5, 62.5, typeof( Cloth ), 1044286, 16, 1044287 ); AddCraft( typeof( FormalShirt ), 1015269, 1028975, 26.0, 51.0, typeof( Cloth ), 1044286, 16, 1044287 ); } // Pants AddCraft( typeof( ShortPants ), 1015279, 1025422, 24.8, 49.8, typeof( Cloth ), 1044286, 6, 1044287 ); AddCraft( typeof( LongPants ), 1015279, 1025433, 24.8, 49.8, typeof( Cloth ), 1044286, 8, 1044287 ); AddCraft( typeof( Kilt ), 1015279, 1025431, 20.7, 45.7, typeof( Cloth ), 1044286, 8, 1044287 ); AddCraft( typeof( Skirt ), 1015279, 1025398, 29.0, 54.0, typeof( Cloth ), 1044286, 10, 1044287 ); if ( Core.AOS ) AddCraft( typeof( FurSarong ), 1015279, 1028971, 35.0, 60.0, typeof( Cloth ), 1044286, 12, 1044287 ); // Misc AddCraft( typeof( BodySash ), 1015283, 1025441, 4.1, 29.1, typeof( Cloth ), 1044286, 4, 1044287 ); AddCraft( typeof( HalfApron ), 1015283, 1025435, 20.7, 45.7, typeof( Cloth ), 1044286, 6, 1044287 ); AddCraft( typeof( FullApron ), 1015283, 1025437, 29.0, 54.0, typeof( Cloth ), 1044286, 10, 1044287 ); AddCraft( typeof( OilCloth ), 1015283, 1041498, 74.6, 99.6, typeof( Cloth ), 1044286, 1, 1044287 ); // Footwear if ( Core.AOS ) AddCraft( typeof( FurBoots ), 1015288, 1028967, 50.0, 75.0, typeof( Cloth ), 1044286, 12, 1044287 ); AddCraft( typeof( Sandals ), 1015288, 1025901, 12.4, 37.4, typeof( Leather ), 1044462, 4, 1044463 ); AddCraft( typeof( Shoes ), 1015288, 1025904, 16.5, 41.5, typeof( Leather ), 1044462, 6, 1044463 ); AddCraft( typeof( Boots ), 1015288, 1025899, 33.1, 58.1, typeof( Leather ), 1044462, 8, 1044463 ); AddCraft( typeof( ThighBoots ), 1015288, 1025906, 41.4, 66.4, typeof( Leather ), 1044462, 10, 1044463 ); // Leather Armor AddCraft( typeof( LeatherGorget ), 1015293, 1025063, 53.9, 78.9, typeof( Leather ), 1044462, 4, 1044463 ); AddCraft( typeof( LeatherCap ), 1015293, 1027609, 6.2, 31.2, typeof( Leather ), 1044462, 2, 1044463 ); AddCraft( typeof( LeatherGloves ), 1015293, 1025062, 51.8, 76.8, typeof( Leather ), 1044462, 3, 1044463 ); AddCraft( typeof( LeatherArms ), 1015293, 1025061, 53.9, 78.9, typeof( Leather ), 1044462, 4, 1044463 ); AddCraft( typeof( LeatherLegs ), 1015293, 1025067, 66.3, 91.3, typeof( Leather ), 1044462, 10, 1044463 ); AddCraft( typeof( LeatherChest ), 1015293, 1025068, 70.5, 95.5, typeof( Leather ), 1044462, 12, 1044463 ); // Studded Armor AddCraft( typeof( StuddedGorget ), 1015300, 1025078, 78.8, 103.8, typeof( Leather ), 1044462, 6, 1044463 ); AddCraft( typeof( StuddedGloves ), 1015300, 1025077, 82.9, 107.9, typeof( Leather ), 1044462, 8, 1044463 ); AddCraft( typeof( StuddedArms ), 1015300, 1025076, 87.1, 112.1, typeof( Leather ), 1044462, 10, 1044463 ); AddCraft( typeof( StuddedLegs ), 1015300, 1025082, 91.2, 116.2, typeof( Leather ), 1044462, 12, 1044463 ); AddCraft( typeof( StuddedChest ), 1015300, 1025083, 94.0, 119.0, typeof( Leather ), 1044462, 14, 1044463 ); // Female Armor AddCraft( typeof( LeatherShorts ), 1015306, 1027168, 62.2, 87.2, typeof( Leather ), 1044462, 8, 1044463 ); AddCraft( typeof( LeatherSkirt ), 1015306, 1027176, 58.0, 83.0, typeof( Leather ), 1044462, 6, 1044463 ); AddCraft( typeof( LeatherBustierArms ), 1015306, 1027178, 58.0, 83.0, typeof( Leather ), 1044462, 6, 1044463 ); AddCraft( typeof( StuddedBustierArms ), 1015306, 1027180, 82.9, 107.9, typeof( Leather ), 1044462, 8, 1044463 ); AddCraft( typeof( FemaleLeatherChest ), 1015306, 1027174, 62.2, 87.2, typeof( Leather ), 1044462, 8, 1044463 ); AddCraft( typeof( FemaleStuddedChest ), 1015306, 1027170, 87.1, 112.1, typeof( Leather ), 1044462, 10, 1044463 ); int index = -1; // Bone Armor index = AddCraft( typeof( BoneHelm ), 1049149, 1025206, 85.0, 110.0, typeof( Leather ), 1044462, 4, 1044463 ); AddRes( index, typeof( Bone ), 1049064, 2, 1049063 ); index = AddCraft( typeof( BoneGloves ), 1049149, 1025205, 89.0, 114.0, typeof( Leather ), 1044462, 6, 1044463 ); AddRes( index, typeof( Bone ), 1049064, 2, 1049063 ); index = AddCraft( typeof( BoneArms ), 1049149, 1025203, 92.0, 117.0, typeof( Leather ), 1044462, 8, 1044463 ); AddRes( index, typeof( Bone ), 1049064, 4, 1049063 ); index = AddCraft( typeof( BoneLegs ), 1049149, 1025202, 95.0, 120.0, typeof( Leather ), 1044462, 10, 1044463 ); AddRes( index, typeof( Bone ), 1049064, 6, 1049063 ); index = AddCraft( typeof( BoneChest ), 1049149, 1025199, 96.0, 121.0, typeof( Leather ), 1044462, 12, 1044463 ); AddRes( index, typeof( Bone ), 1049064, 10, 1049063 ); // Set the overidable material SetSubRes( typeof( Leather ), 1049150 ); // Add every material you want the player to be able to chose from // This will overide the overidable material AddSubRes( typeof( Leather ), 1049150, 00.0, 1044462, 1049311 ); AddSubRes( typeof( SpinedLeather ), 1049151, 65.0, 1044462, 1049311 ); AddSubRes( typeof( HornedLeather ), 1049152, 80.0, 1044462, 1049311 ); AddSubRes( typeof( BarbedLeather ), 1049153, 99.0, 1044462, 1049311 ); AddSubRes( typeof( Eisdrachenleder ), 0, 50.0, 1044463, 1049311 ); AddSubRes( typeof( Alligatorenleder ), 0, 50.0, 1044462, 1049311 ); AddSubRes( typeof( Schweineleder ), 0, 50.0, 1044462, 1049311 ); AddSubRes( typeof( Ghulleder ), 0, 50.0, 1044462, 1049311 ); AddSubRes( typeof( Orkleder ), 0, 50.0, 1044462, 1049311 ); AddSubRes( typeof( Eisschlangenleder ), 0, 50.0, 1044462, 1049311 ); AddSubRes( typeof( Therathanleder ), 0, 50.0, 1044462, 1049311 ); AddSubRes( typeof( Froschleder ), 0, 50.0, 1044462, 1049311 ); AddSubRes( typeof( Seeschlangenleder ), 0, 50.0, 1044462, 1049311 ); AddSubRes( typeof( Feuerschlangenleder ), 0, 50.0, 1044462, 1049311 ); AddSubRes( typeof( Drachenleder ), 0, 50.0, 1044462, 1049311 ); AddSubRes( typeof( Lizardleder ), 0, 50.0, 1044462, 1049311 ); AddSubRes( typeof( Gargoyleleder ), 0, 50.0, 1044462, 1049311 ); AddSubRes( typeof( Balronleder ), 0, 100.0, 1044462, 1049311 ); AddSubRes( typeof( Goblinleder ), 0, 50.0, 1044462, 1049311 ); AddSubRes( typeof( Spinnenleder ), 0, 50.0, 1044462, 1049311 ); AddSubRes( typeof( Frostspinnenleder ), 0, 50.0, 1044462, 1049311 ); AddSubRes( typeof( Walrossleder ), 0, 50.0, 1044462, 1049311 ); AddSubRes( typeof( Blutwurmleder ), 0, 50.0, 1044462, 1049311 ); MarkOption = true; Repair = Core.AOS; CanEnhance = Core.AOS; } } }[/code:1] thx for help
__________________
sometimes you lose, and sometimes the others win! |
|
|
|
|
|
#9 (permalink) |
|
Join Date: Dec 2003
Posts: 28
|
ok i got this problem and now it works, nut then there the nex tproblem =((( if i cahnge th Basearmor it has 19 errors, pls have a look at the script and tell me whats wrong [code:1]using System; using System.Collections; using Server.Network; using Server.Engines.Craft; using AMA = Server.Items.ArmorMeditationAllowance; using AMT = Server.Items.ArmorMaterialType; using ABT = Server.Items.ArmorBodyType; namespace Server.Items { public abstract class BaseArmor : Item, IArmor, IScissorable { /* Armor internals work differently now (Jun 19 2003) * * The attributes defined below default to -1. * If the value is -1, the corresponding virtual 'Aos/Old' property is used. * If not, the attribute value itself is used. Here's the list: * - ArmorBase * - StrBonus * - DexBonus * - IntBonus * - StrReq * - DexReq * - IntReq * - MeditationAllowance */ // Instance values. These values must are unique to each armor piece. private int m_MaxHitPoints; private int m_HitPoints; private Mobile m_Crafter; private ArmorQuality m_Quality; private ArmorDurabilityLevel m_Durability; private ArmorProtectionLevel m_Protection; private CraftResource m_Resource; private bool m_Identified, m_PlayerConstructed; private int m_PhysicalBonus, m_FireBonus, m_ColdBonus, m_PoisonBonus, m_EnergyBonus; private AosAttributes m_AosAttributes; private AosArmorAttributes m_AosArmorAttributes; private AosSkillBonuses m_AosSkillBonuses; // Overridable values. These values are provided to override the defaults which get defined in the individual armor scripts. private int m_ArmorBase = -1; private int m_StrBonus = -1, m_DexBonus = -1, m_IntBonus = -1; private int m_StrReq = -1, m_DexReq = -1, m_IntReq = -1; private AMA m_Meditate = (AMA)(-1); public virtual bool AllowMaleWearer{ get{ return true; } } public virtual bool AllowFemaleWearer{ get{ return true; } } public abstract AMT MaterialType{ get; } public virtual int RevertArmorBase{ get{ return ArmorBase; } } public virtual int ArmorBase{ get{ return 0; } } public virtual AMA DefMedAllowance{ get{ return AMA.None; } } public virtual AMA AosMedAllowance{ get{ return DefMedAllowance; } } public virtual AMA OldMedAllowance{ get{ return DefMedAllowance; } } public virtual int AosStrBonus{ get{ return 0; } } public virtual int AosDexBonus{ get{ return 0; } } public virtual int AosIntBonus{ get{ return 0; } } public virtual int AosStrReq{ get{ return 0; } } public virtual int AosDexReq{ get{ return 0; } } public virtual int AosIntReq{ get{ return 0; } } public virtual int OldStrBonus{ get{ return 0; } } public virtual int OldDexBonus{ get{ return 0; } } public virtual int OldIntBonus{ get{ return 0; } } public virtual int OldStrReq{ get{ return 0; } } public virtual int OldDexReq{ get{ return 0; } } public virtual int OldIntReq{ get{ return 0; } } [CommandProperty( AccessLevel.GameMaster )] public AMA MeditationAllowance { get{ return ( m_Meditate == (AMA)(-1) ? Core.AOS ? AosMedAllowance : OldMedAllowance : m_Meditate ); } set{ m_Meditate = value; } } [CommandProperty( AccessLevel.GameMaster )] public int BaseArmorRating { get{ return ( m_ArmorBase == -1 ? ArmorBase : m_ArmorBase ); } set{ m_ArmorBase = value; Invalidate(); } } [CommandProperty( AccessLevel.GameMaster )] public int StrBonus { get{ return ( m_StrBonus == -1 ? Core.AOS ? AosStrBonus : OldStrBonus : m_StrBonus ); } set{ m_StrBonus = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int DexBonus { get{ return ( m_DexBonus == -1 ? Core.AOS ? AosDexBonus : OldDexBonus : m_DexBonus ); } set{ m_DexBonus = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int IntBonus { get{ return ( m_IntBonus == -1 ? Core.AOS ? AosIntBonus : OldIntBonus : m_IntBonus ); } set{ m_IntBonus = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int StrRequirement { get{ return ( m_StrReq == -1 ? Core.AOS ? AosStrReq : OldStrReq : m_StrReq ); } set{ m_StrReq = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int DexRequirement { get{ return ( m_DexReq == -1 ? Core.AOS ? AosDexReq : OldDexReq : m_DexReq ); } set{ m_DexReq = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int IntRequirement { get{ return ( m_IntReq == -1 ? Core.AOS ? AosIntReq : OldIntReq : m_IntReq ); } set{ m_IntReq = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public bool Identified { get{ return m_Identified; } set{ m_Identified = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public bool PlayerConstructed { get{ return m_PlayerConstructed; } set{ m_PlayerConstructed = value; } } [CommandProperty( AccessLevel.GameMaster )] public CraftResource Resource { get { return m_Resource; } set { if ( m_Resource != value ) { UnscaleDurability(); m_Resource = value; Hue = CraftResources.GetHue( m_Resource ); Invalidate(); InvalidateProperties(); if ( Parent is Mobile ) ((Mobile)Parent).UpdateResistances(); ScaleDurability(); } } } public virtual double ArmorScalar { get { int pos = (int)BodyPosition; if ( pos >= 0 && pos < m_ArmorScalars.Length ) return m_ArmorScalars[pos]; return 1.0; } } [CommandProperty( AccessLevel.GameMaster )] public int MaxHitPoints { get{ return m_MaxHitPoints; } set{ m_MaxHitPoints = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int HitPoints { get { return m_HitPoints; } set { if ( value != m_HitPoints && MaxHitPoints != 0 ) { m_HitPoints = value; if ( m_HitPoints <= 0 ) Delete(); else if ( m_HitPoints > MaxHitPoints ) m_HitPoints = MaxHitPoints; InvalidateProperties(); if ( m_HitPoints == (m_MaxHitPoints / 10) ) { if ( Parent is Mobile ) ((Mobile)Parent).LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061121 ); // Your equipment is severely damaged. } } } } [CommandProperty( AccessLevel.GameMaster )] public Mobile Crafter { get{ return m_Crafter; } set{ m_Crafter = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public ArmorQuality Quality { get{ return m_Quality; } set{ UnscaleDurability(); m_Quality = value; Invalidate(); InvalidateProperties(); ScaleDurability(); } } [CommandProperty( AccessLevel.GameMaster )] public ArmorDurabilityLevel Durability { get{ return m_Durability; } set{ UnscaleDurability(); m_Durability = value; ScaleDurability(); InvalidateProperties(); } } public virtual int ArtifactRarity { get{ return 0; } } [CommandProperty( AccessLevel.GameMaster )] public ArmorProtectionLevel ProtectionLevel { get { return m_Protection; } set { if ( m_Protection != value ) { m_Protection = value; Invalidate(); InvalidateProperties(); if ( Parent is Mobile ) ((Mobile)Parent).UpdateResistances(); } } } [CommandProperty( AccessLevel.GameMaster )] public AosAttributes Attributes { get{ return m_AosAttributes; } set{} } [CommandProperty( AccessLevel.GameMaster )] public AosArmorAttributes ArmorAttributes { get{ return m_AosArmorAttributes; } set{} } [CommandProperty( AccessLevel.GameMaster )] public AosSkillBonuses SkillBonuses { get{ return m_AosSkillBonuses; } set{} } public int ComputeStatReq( StatType type ) { int v; if ( type == StatType.Str ) v = StrRequirement; else if ( type == StatType.Dex ) v = DexRequirement; else v = IntRequirement; return AOS.Scale( v, 100 - GetLowerStatReq() ); } public int ComputeStatBonus( StatType type ) { if ( type == StatType.Str ) return StrBonus + Attributes.BonusStr; else if ( type == StatType.Dex ) return DexBonus + Attributes.BonusDex; else return IntBonus + Attributes.BonusInt; } [CommandProperty( AccessLevel.GameMaster )] public int PhysicalBonus{ get{ return m_PhysicalBonus; } set{ m_PhysicalBonus = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int FireBonus{ get{ return m_FireBonus; } set{ m_FireBonus = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int ColdBonus{ get{ return m_ColdBonus; } set{ m_ColdBonus = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int PoisonBonus{ get{ return m_PoisonBonus; } set{ m_PoisonBonus = value; InvalidateProperties(); } } [CommandProperty( AccessLevel.GameMaster )] public int EnergyBonus{ get{ return m_EnergyBonus; } set{ m_EnergyBonus = value; InvalidateProperties(); } } public virtual int BasePhysicalResistance{ get{ return 0; } } public virtual int BaseFireResistance{ get{ return 0; } } public virtual int BaseColdResistance{ get{ return 0; } } public virtual int BasePoisonResistance{ get{ return 0; } } public virtual int BaseEnergyResistance{ get{ return 0; } } public override int PhysicalResistance{ get{ return BasePhysicalResistance + GetProtOffset() + GetResourceAttrs().ArmorPhysicalResist + m_PhysicalBonus; } } public override int FireResistance{ get{ return BaseFireResistance + GetProtOffset() + GetResourceAttrs().ArmorFireResist + m_FireBonus; } } public override int ColdResistance{ get{ return BaseColdResistance + GetProtOffset() + GetResourceAttrs().ArmorColdResist + m_ColdBonus; } } public override int PoisonResistance{ get{ return BasePoisonResistance + GetProtOffset() + GetResourceAttrs().ArmorPoisonResist + m_PoisonBonus; } } public override int EnergyResistance{ get{ return BaseEnergyResistance + GetProtOffset() + GetResourceAttrs().ArmorEnergyResist + m_EnergyBonus; } } public virtual int InitMinHits{ get{ return 0; } } public virtual int InitMaxHits{ get{ return 0; } } [CommandProperty( AccessLevel.GameMaster )] public ArmorBodyType BodyPosition { get { switch ( this.Layer ) { default: case Layer.Neck: return ArmorBodyType.Gorget; case Layer.TwoHanded: return ArmorBodyType.Shield; case Layer.Gloves: return ArmorBodyType.Gloves; case Layer.Helm: return ArmorBodyType.Helmet; case Layer.Arms: return ArmorBodyType.Arms; case Layer.InnerLegs: case Layer.OuterLegs: case Layer.Pants: return ArmorBodyType.Legs; case Layer.InnerTorso: case Layer.OuterTorso: case Layer.Shirt: return ArmorBodyType.Chest; } } } public void DistributeBonuses( int amount ) { for ( int i = 0; i < amount; ++i ) { switch ( Utility.Random( 5 ) ) { case 0: ++m_PhysicalBonus; break; case 1: ++m_FireBonus; break; case 2: ++m_ColdBonus; break; case 3: ++m_PoisonBonus; break; case 4: ++m_EnergyBonus; break; } } InvalidateProper |