Code:
using System;
using Server;
using Server.Items;


namespace Server.Items
{
              public class SignofChaos: ChaosShield
{

		public override int InitMinHits{ get{ return 255; } }
		public override int InitMaxHits{ get{ return 255; } }

		public override int BaseColdResistance{ get{ return 5; } }
		public override int BaseEnergyResistance{ get{ return 5; } }
		public override int BasePhysicalResistance{ get{ return 5; } }
		public override int BasePoisonResistance{ get{ return 5; } }
		public override int BaseFireResistance{ get{ return 5; } }
           
              [Constructable]
              public SignofChaos()
{

                          Weight = 5;
                          Name = "Sign of Chaos";
                          Hue = 1092;
           
              Attributes.AttackChance = 15;
              Attributes.BonusHits = 20;
              Attributes.CastSpeed = 2;
              Attributes.DefendChance = 15;


                  }
              public SignofChaos( 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();
                      }
                  }
              }

Tryin to make like randomly picks from 1 to 15 any ideals on this ?
Attributes.AttackChance = 1, 15;
Attributes.BonusHits = 1, 20;
Attributes.CastSpeed = 1, 2;
Attributes.DefendChance = 1, 15;

getting theses errors
Code:
----------------------------------------------------------------------------
ServUO - [http://www.servuo.com] Version 0.5, Build 5210.7645
Publish 54
Core: Running with arguments: -debug
Core: Optimizing for 2 64-bit processors
RandomImpl: CSPRandom (Software)
Scripts: Compiling C# scripts...Failed with: 1 errors, 0 warnings
Errors:
+ Customs/Items/Shields/SignofChaos.cs:
    CS1002: Line 29: ; expected
    CS1525: Line 29: Invalid expression term ','
    CS1002: Line 29: ; expected
    CS1002: Line 30: ; expected
    CS1525: Line 30: Invalid expression term ','
    CS1002: Line 30: ; expected
    CS1002: Line 31: ; expected
    CS1525: Line 31: Invalid expression term ','
    CS1002: Line 31: ; expected
    CS1002: Line 32: ; expected
    CS1525: Line 32: Invalid expression term ','
    CS1002: Line 32: ; expected
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
 
Last edited:
Ok lol figured it out used the Utility.Random ... method like so sorry all :)

Attributes.AttackChance = Utility.RandomMinMax(1, 15);
Attributes.BonusHits = Utility.RandomMinMax(1, 20);
Attributes.CastSpeed = Utility.RandomMinMax(1, 2);
Attributes.DefendChance = Utility.RandomMinMax(1, 15);
 
Back