jayates

Member
I scripted Juo'nar's Grimoire today. It calls for Random Slayer though. http://www.uoguide.com/Juo’nar’s_Grimoire
How would I go about adding it?
Here's my script:

Code:
using System;

namespace Server.Items
{
    public class JuonarGrimoire : NecromancerSpellbook, ITokunoDyable
    {
        [Constructable]
        public JuonarGrimoire()
        {
                        Name = "Juo'nar's Grimoire";
            LootType = LootType.Blessed;
                        Weight = 1.0;
            SkillBonuses.SetValues( 0, SkillName.Necromancy, 15.0 );
            Attributes.BonusInt = 8;
            Attributes.SpellDamage = 15;
            Attributes.LowerManaCost = 10;
            Attributes.LowerRegCost = 10;
        }

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

        }
    }
}
 
@ Jayates

Here is an example of what you're trying to do.

switch (Utility.Random(8))
{
default: this.Slayer = SlayerName.Silver; break;
case 0: this.Slayer = SlayerName.Arachnid; break;
case 1: this.Slayer = SlayerName.Demonoid; break;
case 2: this.Slayer = SlayerName.Elemental; break;
case 3: this.Slayer = SlayerName.Fey; break;
case 4: this.Slayer = SlayerName.Repond; break;
case 5: this.Slayer = SlayerName.Reptile; break;
case 6: this.Slayer = SlayerName.Undead; break;

}
 
Ty...
[doublepost=1473686200][/doublepost]That worked out great! Any idea how i'd add protection to this shield as in http://www.uoguide.com/Grugor’s_Shield. I tried it and got errors... anyways here's my script:
Code:
using System;
using Server;

namespace Server.Items
{
    public class GrugorShield : BaseShield
    {
                public override int ArtifactRarity { get { return Utility.RandomMinMax(20, 1000); } }
        public override int BasePhysicalResistance{ get{ return 18; } }
        public override int BaseFireResistance{ get{ return 14; } }
        public override int BaseColdResistance{ get{ return 12; } }
        public override int BasePoisonResistance{ get{ return 15; } }
        public override int BaseEnergyResistance{ get{ return 13; } }

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

        public override int AosStrReq{ get{ return 20; } }

        public override int ArmorBase{ get{ return 8; } }

        [Constructable]
        public GrugorShield() : base( 0x1B7A )
        {
                        Name = "Grugor's Shield";
            Weight = 5.0;
            Attributes.BonusStr = 10;
           
                        Attributes.BonusStam = 10;
                        Attributes.RegenHits = 5;
            Attributes.WeaponSpeed = 10;
            StrRequirement = 20;

                switch (Utility.Random(1))
                {
                case 0: SkillBonuses.SetValues(0, SkillName.Parry, 10.0); break;
                     }
        }

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

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();
        }

        public override void Serialize( GenericWriter writer )
        {
            base.Serialize( writer );

            writer.Write( (int)0 );//version
        }
    }
}
[doublepost=1473687220][/doublepost]I guess the best way to post this 2nd question would proably be in script support i'll make a post for it that way everyone could benefit from it.
 

Active Shards

Donations

Total amount
$50.00
Goal
$1,000.00
Back