public override Item CompleteCraft(out int _check) { _check = Verify(this.Door); if (_check == 0) { int level = (int)(From.Skills.Tinkering.Value); uint KeyValue; Key key = new Key(KeyType.Iron, Key.RandomValue()); KeyValue = key.KeyValue; From.AddToBackpack(key); From.PlaySound(0x3A4); From.SendMessage("You successfully install the lock."); Door.HasLock = true; Door.RequiredSkill = level - 20; Door.MaxLockLevel = level; Door.LockLevel = level - 10; Door.KeyValue = KeyValue; if (Door.Link != null) { Door.Link.HasLock = true; Door.Link.RequiredSkill = level - 20; Door.Link.MaxLockLevel = level; Door.Link.LockLevel = level - 10; Door.Link.KeyValue = KeyValue; } } return(null); }
public override void Complete() { base.Complete(); From.SendLocalizedMessage(1156342); // You have proven your prowess on the battlefield and have completed the first step on the path of the Master! From.SendLocalizedMessage(1156209); // You have received a mastery primer! From.SendLocalizedMessage(1152339, "#1028794"); // A reward of ~1_ITEM~ has been placed in your backpack. From.AddToBackpack(new BookOfMasteries()); SkillMasteryPrimer primer = new SkillMasteryPrimer(Mastery, 1); From.AddToBackpack(primer); }