PageRenderTime 52ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/Scripts/Mobiles/Collectors/Talbart.cs

https://bitbucket.org/servuo/servuo
C# | 164 lines | 136 code | 26 blank | 2 comment | 3 complexity | 259498fa9786d25b74c3d179ae91ceb8 MD5 | raw file
  1. using System;
  2. using System.Collections.Generic;
  3. using Server.Mobiles;
  4. namespace Server.Items
  5. {
  6. public class MaceAndBlade : BaseCollectionMobile
  7. {
  8. [Constructable]
  9. public MaceAndBlade()
  10. : base("Talbart", "the warrior")
  11. {
  12. this.StartTier = 10000000;
  13. this.DailyDecay = 100000;
  14. this.DonationLabel = 1073449; // Mace and Blade Section Donation Representative.
  15. }
  16. public MaceAndBlade(Serial serial)
  17. : base(serial)
  18. {
  19. }
  20. public override Collection CollectionID
  21. {
  22. get
  23. {
  24. return Collection.MaceAndBlade;
  25. }
  26. }
  27. public override int MaxTier
  28. {
  29. get
  30. {
  31. return 1;
  32. }
  33. }
  34. public override void InitBody()
  35. {
  36. this.InitStats(100, 100, 25);
  37. this.Female = false;
  38. this.CantWalk = true;
  39. this.Race = Race.Human;
  40. this.Hue = 0x83ED;
  41. }
  42. public override void InitOutfit()
  43. {
  44. this.AddItem(new Backpack());
  45. this.AddItem(new DoubleAxe());
  46. this.AddItem(new PlateLegs());
  47. this.AddItem(new CloseHelm());
  48. this.AddItem(new PlateGloves());
  49. this.AddItem(new StuddedGorget());
  50. this.AddItem(new PlateChest());
  51. this.AddItem(new PlateArms());
  52. this.AddItem(new BodySash(0x75D));
  53. }
  54. public override void Init()
  55. {
  56. base.Init();
  57. this.Donations.Add(new CollectionItem(typeof(Gold), 0xEEF, 1073116, 0x0, 0.06666));
  58. this.Donations.Add(new CollectionItem(typeof(BankCheck), 0x14F0, 1075013, 0x34, 0.06666));
  59. this.Donations.Add(new CollectionItem(typeof(BrownBook), 0xFEF, 1074906, 0x0, 3));
  60. this.Donations.Add(new CollectionItem(typeof(TanBook), 0xFF0, 1074906, 0x0, 3));
  61. this.Donations.Add(new CollectionItem(typeof(Buckler), 0x1B73, 1074907, 0x0, 9));
  62. this.Donations.Add(new CollectionItem(typeof(BattleAxe), 0xF47, 1074908, 0x0, 9));
  63. int[] hues = new int[] { 0x1E0, 0x190, 0x151 };
  64. this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendBodySash), 0x1541, 1073346, 0x190, 100000.0, hues));
  65. this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendFeatheredHat), 0x171A, 1073347, 0x190, 100000.0, hues));
  66. this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendSurcoat), 0x1FFD, 1073348, 0x190, 100000.0, hues));
  67. this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendPants), 0x1539, 1073349, 0x190, 100000.0, hues));
  68. this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendCloak), 0x1515, 1073350, 0x190, 100000.0, hues));
  69. this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendDoublet), 0x1F7B, 1073351, 0x190, 100000.0, hues));
  70. this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendSkirt), 0x1537, 1073352, 0x190, 100000.0, hues));
  71. this.Rewards.Add(new CollectionTitle(1073341, 1073859, 100000.0)); // Britain Public Library Contributor
  72. hues = new int[] { 0x0, 0x1C2, 0x320, 0x190, 0x1E0 };
  73. this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendLantern), 0xA25, 1073339, 0x1C2, 200000.0, hues));
  74. this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendReadingChair), 0x2DEB, 1073340, 0x1C2, 200000.0, hues));
  75. this.Rewards.Add(new CollectionTitle(1073342, 1073860, 200000.0)); // Distinguished Library Contributor
  76. this.Rewards.Add(new CollectionHuedItem(typeof(SherryTheMouseQuotes), 0xFBD, 1073300, 0x1C2, 350000.0, hues));
  77. this.Rewards.Add(new CollectionHuedItem(typeof(WyrdBeastmasterQuotes), 0xFBD, 1073310, 0x1C2, 350000.0, hues));
  78. this.Rewards.Add(new CollectionHuedItem(typeof(MercenaryJustinQuotes), 0xFBD, 1073317, 0x1C2, 350000.0, hues));
  79. this.Rewards.Add(new CollectionHuedItem(typeof(HeigelOfMoonglowQuotes), 0xFBD, 1073327, 0x1C2, 350000.0, hues));
  80. this.Rewards.Add(new CollectionHuedItem(typeof(TraderHoraceQuotes), 0xFBD, 1073338, 0x1C2, 350000.0, hues));
  81. this.Rewards.Add(new CollectionTitle(1073343, 1073861, 350000.0)); // Honored Library Contributor
  82. this.Rewards.Add(new CollectionItem(typeof(TreatiseonAlchemyTalisman), 0x2F58, 1073353, 0x0, 550000.0));
  83. this.Rewards.Add(new CollectionItem(typeof(PrimerOnArmsTalisman), 0x2F59, 1073354, 0x0, 550000.0));
  84. this.Rewards.Add(new CollectionItem(typeof(MyBookTalisman), 0x2F5A, 1073355, 0x0, 550000.0));
  85. this.Rewards.Add(new CollectionItem(typeof(TalkingtoWispsTalisman), 0x2F5B, 1073356, 0x0, 550000.0));
  86. this.Rewards.Add(new CollectionItem(typeof(GrammarOfOrchishTalisman), 0x2F59, 1073358, 0x0, 550000.0));
  87. this.Rewards.Add(new CollectionItem(typeof(BirdsofBritanniaTalisman), 0x2F5A, 1073359, 0x0, 550000.0));
  88. this.Rewards.Add(new CollectionItem(typeof(TheLifeOfTravelingMinstrelTalisman), 0x2F5A, 1073360, 0x0, 550000.0));
  89. this.Rewards.Add(new CollectionTitle(1073344, 1073862, 550000.0)); // Prominent Library Contributor
  90. this.Rewards.Add(new CollectionTitle(1073345, 1073863, 800000.0)); // Eminent Library Contributor
  91. this.Rewards.Add(new CollectionItem(typeof(MaceAndShieldGlasses), 0x2FB8, 1073381, 0x1DD, 800000.0));
  92. }
  93. public override bool CanDonate(PlayerMobile player)
  94. {
  95. bool can = player.LibraryFriend;
  96. if (!can)
  97. player.SendLocalizedMessage(1074273); // You must speak with Librarian Verity before you can donate to this collection.
  98. return can;
  99. }
  100. public override void IncreaseTier()
  101. {
  102. base.IncreaseTier();
  103. List<object> list = new List<object>();
  104. Item c;
  105. switch ( this.Tier )
  106. {
  107. case 1:
  108. // decorative armor
  109. c = new Static(0x1508);
  110. c.MoveToWorld(new Point3D(1409, 1610, 30), this.Map);
  111. list.Add(c);
  112. // cannon
  113. c = new Static(0xE94);
  114. c.MoveToWorld(new Point3D(1409, 1610, 30), this.Map);
  115. list.Add(c);
  116. c = new Static(0xE95);
  117. c.MoveToWorld(new Point3D(1410, 1610, 30), this.Map);
  118. list.Add(c);
  119. c = new Static(0xE96);
  120. c.MoveToWorld(new Point3D(1411, 1610, 30), this.Map);
  121. list.Add(c);
  122. break;
  123. }
  124. if (list.Count > 0)
  125. this.Tiers.Add(list);
  126. }
  127. public override void Serialize(GenericWriter writer)
  128. {
  129. base.Serialize(writer);
  130. writer.Write((int)0); // version
  131. }
  132. public override void Deserialize(GenericReader reader)
  133. {
  134. base.Deserialize(reader);
  135. int version = reader.ReadInt();
  136. }
  137. }
  138. }