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

/Scripts/Mobiles/Collectors/Margo.cs

https://bitbucket.org/servuo/servuo
C# | 178 lines | 143 code | 29 blank | 6 comment | 3 complexity | 1e0a3fe46b835eba83977a496d75b039 MD5 | raw file
  1. using System;
  2. using System.Collections.Generic;
  3. using Server.Mobiles;
  4. namespace Server.Items
  5. {
  6. public class UnderstandingAnimals : BaseCollectionMobile
  7. {
  8. [Constructable]
  9. public UnderstandingAnimals()
  10. : base("Margo", "the animal trainer")
  11. {
  12. this.StartTier = 10000000;
  13. this.DailyDecay = 100000;
  14. this.DonationLabel = 1073447; // Understanding Animals Section Donation Representative.
  15. }
  16. public UnderstandingAnimals(Serial serial)
  17. : base(serial)
  18. {
  19. }
  20. public override Collection CollectionID
  21. {
  22. get
  23. {
  24. return Collection.UnderstandingAnimals;
  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 = true;
  38. this.CantWalk = true;
  39. this.Race = Race.Human;
  40. this.Hue = 0x8411;
  41. this.HairItemID = 0x2045;
  42. this.HairHue = 0x453;
  43. }
  44. public override void InitOutfit()
  45. {
  46. this.AddItem(new Backpack());
  47. this.AddItem(new QuarterStaff());
  48. this.AddItem(new Boots());
  49. this.AddItem(new Doublet(0x651));
  50. this.AddItem(new Skirt(0x4B2));
  51. }
  52. public override void Init()
  53. {
  54. base.Init();
  55. this.Donations.Add(new CollectionItem(typeof(Gold), 0xEEF, 1073116, 0x0, 0.06666));
  56. this.Donations.Add(new CollectionItem(typeof(BankCheck), 0x14F0, 1075013, 0x34, 0.06666));
  57. this.Donations.Add(new CollectionItem(typeof(BrownBook), 0xFEF, 1074906, 0x0, 3));
  58. this.Donations.Add(new CollectionItem(typeof(TanBook), 0xFF0, 1074906, 0x0, 3));
  59. this.Donations.Add(new CollectionItem(typeof(ShepherdsCrook), 0xE81, 1015110, 0x0, 7));
  60. this.Donations.Add(new CollectionItem(typeof(RedScales), 0x26B4, 1060883, 0x66D, 20));
  61. this.Donations.Add(new CollectionItem(typeof(YellowScales), 0x26B4, 1060883, 0x8A8, 20));
  62. int[] hues = new int[] { 0x1E0, 0x190, 0x151 };
  63. this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendBodySash), 0x1541, 1073346, 0x190, 100000.0, hues));
  64. this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendFeatheredHat), 0x171A, 1073347, 0x190, 100000.0, hues));
  65. this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendSurcoat), 0x1FFD, 1073348, 0x190, 100000.0, hues));
  66. this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendPants), 0x1539, 1073349, 0x190, 100000.0, hues));
  67. this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendCloak), 0x1515, 1073350, 0x190, 100000.0, hues));
  68. this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendDoublet), 0x1F7B, 1073351, 0x190, 100000.0, hues));
  69. this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendSkirt), 0x1537, 1073352, 0x190, 100000.0, hues));
  70. this.Rewards.Add(new CollectionTitle(1073341, 1073859, 100000.0)); // Britain Public Library Contributor
  71. hues = new int[] { 0x0, 0x1C2, 0x320, 0x190, 0x1E0 };
  72. this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendLantern), 0xA25, 1073339, 0x1C2, 200000.0, hues));
  73. this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendReadingChair), 0x2DEB, 1073340, 0x1C2, 200000.0, hues));
  74. this.Rewards.Add(new CollectionTitle(1073342, 1073860, 200000.0)); // Distinguished Library Contributor
  75. this.Rewards.Add(new CollectionHuedItem(typeof(SherryTheMouseQuotes), 0xFBD, 1073300, 0x1C2, 350000.0, hues));
  76. this.Rewards.Add(new CollectionHuedItem(typeof(WyrdBeastmasterQuotes), 0xFBD, 1073310, 0x1C2, 350000.0, hues));
  77. this.Rewards.Add(new CollectionHuedItem(typeof(MercenaryJustinQuotes), 0xFBD, 1073317, 0x1C2, 350000.0, hues));
  78. this.Rewards.Add(new CollectionHuedItem(typeof(HeigelOfMoonglowQuotes), 0xFBD, 1073327, 0x1C2, 350000.0, hues));
  79. this.Rewards.Add(new CollectionHuedItem(typeof(TraderHoraceQuotes), 0xFBD, 1073338, 0x1C2, 350000.0, hues));
  80. this.Rewards.Add(new CollectionTitle(1073343, 1073861, 350000.0)); // Honored Library Contributor
  81. this.Rewards.Add(new CollectionItem(typeof(TreatiseonAlchemyTalisman), 0x2F58, 1073353, 0x0, 550000.0));
  82. this.Rewards.Add(new CollectionItem(typeof(PrimerOnArmsTalisman), 0x2F59, 1073354, 0x0, 550000.0));
  83. this.Rewards.Add(new CollectionItem(typeof(MyBookTalisman), 0x2F5A, 1073355, 0x0, 550000.0));
  84. this.Rewards.Add(new CollectionItem(typeof(TalkingtoWispsTalisman), 0x2F5B, 1073356, 0x0, 550000.0));
  85. this.Rewards.Add(new CollectionItem(typeof(GrammarOfOrchishTalisman), 0x2F59, 1073358, 0x0, 550000.0));
  86. this.Rewards.Add(new CollectionItem(typeof(BirdsofBritanniaTalisman), 0x2F5A, 1073359, 0x0, 550000.0));
  87. this.Rewards.Add(new CollectionItem(typeof(TheLifeOfTravelingMinstrelTalisman), 0x2F5A, 1073360, 0x0, 550000.0));
  88. this.Rewards.Add(new CollectionTitle(1073344, 1073862, 550000.0)); // Prominent Library Contributor
  89. this.Rewards.Add(new CollectionTitle(1073345, 1073863, 800000.0)); // Eminent Library Contributor
  90. this.Rewards.Add(new CollectionItem(typeof(AnthropomorphistGlasses), 0x2FB8, 1073379, 0x80, 800000.0));
  91. }
  92. public override bool CanDonate(PlayerMobile player)
  93. {
  94. bool can = player.LibraryFriend;
  95. if (!can)
  96. player.SendLocalizedMessage(1074273); // You must speak with Librarian Verity before you can donate to this collection.
  97. return can;
  98. }
  99. public override void IncreaseTier()
  100. {
  101. base.IncreaseTier();
  102. List<object> list = new List<object>();
  103. Item c;
  104. switch ( this.Tier )
  105. {
  106. case 1:
  107. // brush
  108. c = new Static(0x1373);
  109. c.MoveToWorld(new Point3D(1415, 1593, 67), this.Map);
  110. list.Add(c);
  111. // horse shoes
  112. c = new Static(0xFB6);
  113. c.MoveToWorld(new Point3D(1415, 1595, 50), this.Map);
  114. list.Add(c);
  115. // bridle
  116. c = new Static(0x1375);
  117. c.MoveToWorld(new Point3D(1416, 1593, 67), this.Map);
  118. list.Add(c);
  119. // brush
  120. c = new Static(0x1372);
  121. c.MoveToWorld(new Point3D(1417, 1593, 67), this.Map);
  122. list.Add(c);
  123. // horse barding
  124. c = new Static(0x1378);
  125. c.MoveToWorld(new Point3D(1417, 1595, 50), this.Map);
  126. list.Add(c);
  127. c = new Static(0x1379);
  128. c.MoveToWorld(new Point3D(1417, 1594, 50), this.Map);
  129. list.Add(c);
  130. // shepard's crook
  131. c = new ShepherdsCrook();
  132. c.MoveToWorld(new Point3D(1417, 1597, 58), this.Map);
  133. break;
  134. }
  135. if (list.Count > 0)
  136. this.Tiers.Add(list);
  137. }
  138. public override void Serialize(GenericWriter writer)
  139. {
  140. base.Serialize(writer);
  141. writer.Write((int)0); // version
  142. }
  143. public override void Deserialize(GenericReader reader)
  144. {
  145. base.Deserialize(reader);
  146. int version = reader.ReadInt();
  147. }
  148. }
  149. }