/// <summary> /// Overrides the Double-Click option on the item. Supplies the /// player that double-clicks on the stone with appropriate gear /// based upon their skill levels. /// </summary> /// <param name="m">PlayerMobile to be supplied</param> public override void OnDoubleClick(Mobile m) { if (m.Backpack != null) { if (((m.X) == this.X || (m.X - 1) == this.X || (m.X + 1) == this.X) && ((m.Y) == this.Y || (m.Y - 1) == this.Y || (m.Y + 1) == this.Y)) { if (!Tourney) { Supply(new BagOfPots(8, 8, 4, 4, 5), m, typeof(BagOfPots)); for (int i = 1; i <= 5; i++) { TrapableContainer con = new Pouch(); con.TrapType = TrapType.MagicTrap; con.TrapLevel = 1; con.TrapPower = 1; if (!m.AddToBackpack(con)) { con.Delete(); } } } else { for (int i = 1; i <= 10; i++) { Item item = new TotalRefreshPotion(); if (!m.AddToBackpack(item)) { item.Delete(); } } } if (m.Skills[SkillName.Magery].Value >= 50.0 || m.Str <= 50) { EquipArmor(new LeatherLegs(), true, m, typeof(LeatherLegs), m_EquipHue); EquipArmor(new LeatherGorget(), true, m, typeof(LeatherGorget), m_EquipHue); EquipArmor(new LeatherGloves(), true, m, typeof(LeatherGloves), m_EquipHue); EquipArmor(new LeatherChest(), true, m, typeof(LeatherChest), m_EquipHue); EquipArmor(new LeatherArms(), true, m, typeof(LeatherArms), m_EquipHue); EquipArmor(new LeatherCap(), true, m, typeof(LeatherCap), m_EquipHue); } else { EquipArmor(new ChainLegs(), true, m, typeof(ChainLegs), m_EquipHue); EquipArmor(new LeatherGorget(), true, m, typeof(LeatherGorget), m_EquipHue); EquipArmor(new RingmailGloves(), true, m, typeof(RingmailGloves), m_EquipHue); EquipArmor(new ChainChest(), true, m, typeof(ChainChest), m_EquipHue); EquipArmor(new RingmailArms(), true, m, typeof(RingmailArms), m_EquipHue); EquipArmor(new CloseHelm(), true, m, typeof(CloseHelm), m_EquipHue); } if (m.Skills[SkillName.Magery].Value >= 50.0) { Container pack = m.Backpack; if (pack.FindItemByType(typeof(Spellbook)) == null) { Spellbook book = new Spellbook(); book.Content = ulong.MaxValue; book.LootType = LootType.Regular; if (!m.AddToBackpack(book)) { book.Delete(); } } Supply(new BagOfReagents(50), m, typeof(BagOfReagents)); } if (m.Skills[SkillName.Healing].Value >= 50.0 || m.Skills[SkillName.Veterinary].Value >= 50) { Supply(new Bandage(50), m, typeof(Bandage)); } if (m.Skills[SkillName.Swords].Value >= 50.0) { EquipItem(new Katana(), true, m, typeof(Katana)); EquipItem(new Halberd(), false, m, typeof(Halberd)); EquipItem(new BattleAxe(), false, m, typeof(BattleAxe)); } if (m.Skills[SkillName.Fencing].Value >= 50.0) { EquipItem(new Kryss(), true, m, typeof(Kryss)); EquipItem(new ShortSpear(), false, m, typeof(ShortSpear)); EquipItem(new Spear(), false, m, typeof(Spear)); } if (m.Skills[SkillName.Macing].Value >= 50.0) { EquipItem(new Mace(), true, m, typeof(Mace)); EquipItem(new QuarterStaff(), false, m, typeof(QuarterStaff)); EquipItem(new WarHammer(), false, m, typeof(WarHammer)); } if (m.Skills[SkillName.Archery].Value >= 50.0) { EquipItem(new Bow(), false, m, typeof(Bow)); EquipItem(new Crossbow(), false, m, typeof(Crossbow)); EquipItem(new HeavyCrossbow(), false, m, typeof(HeavyCrossbow)); Supply(new Arrow(50), m, typeof(Arrow)); Supply(new Bolt(50), m, typeof(Bolt)); } } else { m.SendMessage("You reach out but cannot seem to touch the stone..."); } } else { m.SendMessage("For some reason you don't seem to have a backpack..."); } }
/// <summary> /// Overrides the Double-Click option on the item. Supplies the /// player that double-clicks on the stone with appropriate gear /// based upon their skill levels. /// </summary> /// <param name="m">PlayerMobile to be supplied</param> public override void OnDoubleClick(Mobile m) { if (m.Backpack != null) { if (((m.X) == this.X || (m.X - 1) == this.X || (m.X + 1) == this.X) && ((m.Y) == this.Y || (m.Y - 1) == this.Y || (m.Y + 1) == this.Y)) { if (!Tourney) { Supply(new BagOfPots(8, 8, 4, 4, 5), m, typeof(BagOfPots)); for (int i = 1; i <= 5; i++) { TrapableContainer con = new Pouch(); con.TrapType = TrapType.MagicTrap; con.TrapLevel = 1; con.TrapPower = 1; if (!m.AddToBackpack(con)) con.Delete(); } } else { for (int i = 1; i <= 10; i++) { Item item = new TotalRefreshPotion(); if (!m.AddToBackpack(item)) item.Delete(); } } if (m.Skills[SkillName.Magery].Value >= 50.0 || m.Str <= 50) { EquipArmor(new LeatherLegs(), true, m, typeof(LeatherLegs), m_EquipHue); EquipArmor(new LeatherGorget(), true, m, typeof(LeatherGorget), m_EquipHue); EquipArmor(new LeatherGloves(), true, m, typeof(LeatherGloves), m_EquipHue); EquipArmor(new LeatherChest(), true, m, typeof(LeatherChest), m_EquipHue); EquipArmor(new LeatherArms(), true, m, typeof(LeatherArms), m_EquipHue); EquipArmor(new LeatherCap(), true, m, typeof(LeatherCap), m_EquipHue); } else { EquipArmor(new ChainLegs(), true, m, typeof(ChainLegs), m_EquipHue); EquipArmor(new LeatherGorget(), true, m, typeof(LeatherGorget), m_EquipHue); EquipArmor(new RingmailGloves(), true, m, typeof(RingmailGloves), m_EquipHue); EquipArmor(new ChainChest(), true, m, typeof(ChainChest), m_EquipHue); EquipArmor(new RingmailArms(), true, m, typeof(RingmailArms), m_EquipHue); EquipArmor(new CloseHelm(), true, m, typeof(CloseHelm), m_EquipHue); } if (m.Skills[SkillName.Magery].Value >= 50.0) { Container pack = m.Backpack; if (pack.FindItemByType(typeof(Spellbook)) == null) { Spellbook book = new Spellbook(); book.Content = ulong.MaxValue; book.LootType = LootType.Regular; if (!m.AddToBackpack(book)) book.Delete(); } Supply(new BagOfReagents(50), m, typeof(BagOfReagents)); } if (m.Skills[SkillName.Healing].Value >= 50.0 || m.Skills[SkillName.Veterinary].Value >= 50) { Supply(new Bandage(50), m, typeof(Bandage)); } if (m.Skills[SkillName.Swords].Value >= 50.0) { EquipItem(new Katana(), true, m, typeof(Katana)); EquipItem(new Halberd(), false, m, typeof(Halberd)); EquipItem(new BattleAxe(), false, m, typeof(BattleAxe)); } if (m.Skills[SkillName.Fencing].Value >= 50.0) { EquipItem(new Kryss(), true, m, typeof(Kryss)); EquipItem(new ShortSpear(), false, m, typeof(ShortSpear)); EquipItem(new Spear(), false, m, typeof(Spear)); } if (m.Skills[SkillName.Macing].Value >= 50.0) { EquipItem(new Mace(), true, m, typeof(Mace)); EquipItem(new QuarterStaff(), false, m, typeof(QuarterStaff)); EquipItem(new WarHammer(), false, m, typeof(WarHammer)); } if (m.Skills[SkillName.Archery].Value >= 50.0) { EquipItem(new Bow(), false, m, typeof(Bow)); EquipItem(new Crossbow(), false, m, typeof(Crossbow)); EquipItem(new HeavyCrossbow(), false, m, typeof(HeavyCrossbow)); Supply(new Arrow(50), m, typeof(Arrow)); Supply(new Bolt(50), m, typeof(Bolt)); } } else { m.SendMessage("You reach out but cannot seem to touch the stone..."); } } else { m.SendMessage("For some reason you don't seem to have a backpack..."); } }