Ejemplo n.º 1
0
        public int OnCraft(int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue)
        {
            if (quality == 2)
            {
                UsesRemaining *= 2;
            }

            return(quality);
        }
        public int OnCraft(int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue)
        {
            if (from.CheckSkill(SkillName.Tinkering, -5.0, 15.0))
            {
                from.SendLocalizedMessage(500636); // Your tinker skill was sufficient to make the item lockable.

                Key key = new Key(KeyType.Copper, Key.RandomValue());

                KeyValue = key.KeyValue;
                DropItem(key);

                double tinkering = from.Skills[SkillName.Tinkering].Value;
                int    level     = (int)(tinkering * 0.8);

                RequiredSkill = level - 4;
                LockLevel     = level - 14;
                MaxLockLevel  = level + 35;

                if (LockLevel == 0)
                {
                    LockLevel = -1;
                }
                else if (LockLevel > 95)
                {
                    LockLevel = 95;
                }

                if (RequiredSkill > 95)
                {
                    RequiredSkill = 95;
                }

                if (MaxLockLevel > 95)
                {
                    MaxLockLevel = 95;
                }
            }
            else
            {
                from.SendLocalizedMessage(500637); // Your tinker skill was insufficient to make the item lockable.
            }

            return(1);
        }
Ejemplo n.º 3
0
        public override int OnCraft(int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue)
        {
            Quality = (ClothingQuality)quality;

            if (Quality == ClothingQuality.Exceptional)
            {
                DistributeBonuses((tool is BaseRunicTool ? 6 : (Core.SE ? 15 : 14)));   //BLAME OSI. (We can't confirm it's an OSI bug yet.)
            }
            return(base.OnCraft(quality, makersMark, from, craftSystem, typeRes, tool, craftItem, resHue));
        }