public Skeleton() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4) { Name = "a skeleton"; Body = Utility.RandomList( 50, 56 ); BaseSoundID = 0x48D; SetStr( 56, 80 ); SetDex( 56, 65 ); SetInt( 5 ); SetHits( 134, 148 ); SetDamage( 8, 10 ); SetDamageType( ResistanceType.Blunt, 100 ); SetResistance( ResistanceType.Blunt, 15, 20 ); SetResistance( ResistanceType.Piercing, 50, 60 ); SetResistance( ResistanceType.Slashing, 50, 60 ); SetResistance( ResistanceType.Fire, 5, 10 ); SetResistance( ResistanceType.Cold, 25, 40 ); SetResistance( ResistanceType.Poison, 100 ); SetResistance( ResistanceType.Energy, 5, 15 ); SetSkill( SkillName.MagicResist, 45.1, 60.0 ); SetSkill( SkillName.Tactics, 45.1, 60.0 ); SetSkill( SkillName.UnarmedFighting, 45.1, 55.0 ); Fame = 3650; Karma = -3650; VirtualArmor = 40; PackItem( new Bone( 3 ) ); Hatchet hatchet = new Hatchet(); hatchet.HitPoints = 5; hatchet.MaxHitPoints = 5; hatchet.Hue = 2964; hatchet.Name = "rusty hatchet"; PackItem( hatchet ); }
public override void OnResponse(NetState sender, RelayInfo info) { if (m_Player == null) { return; } bool closeGump = true; CaptchaPersistance.CheckAndCreateCaptchaAccountEntry(m_Player); CaptchaAccountData captchaData = m_Player.m_CaptchaAccountData; switch (info.ButtonID) { //Guide case 1: closeGump = false; break; //Confirm case 2: if (captchaData.m_ConfirmPrompt) { bool correct = false; if (captchaData.m_Row1CorrectIndex == captchaData.m_SelectedRow1Index && captchaData.m_Row2CorrectIndex == captchaData.m_SelectedRow2Index && captchaData.m_Row3CorrectIndex == captchaData.m_SelectedRow3Index) { correct = true; } if (correct) { captchaData.m_NextCaptchaTime = DateTime.UtcNow + TimeSpan.FromMinutes((double)Utility.RandomMinMax(CaptchaAccountData.MinimumCaptchaDelay, CaptchaAccountData.MaximumCaptchaDelay)); captchaData.m_CaptchaRequired = false; captchaData.m_CaptchaAttempt = 0; captchaData.m_ConfirmPrompt = false; m_Player.SendSound(0x5B6); m_Player.SendMessage("Captcha successful."); switch (captchaData.m_CaptchaSourceType) { case CaptchaSourceType.Fishing: FishingPole fishingPole = m_Player.FindItemOnLayer(Layer.TwoHanded) as FishingPole; if (fishingPole != null) { Fishing.System.StartHarvesting(m_Player, fishingPole, null, true); } break; case CaptchaSourceType.Lumberjacking: Hatchet hatchet = m_Player.FindItemOnLayer(Layer.TwoHanded) as Hatchet; if (hatchet != null) { Lumberjacking.System.StartHarvesting(m_Player, hatchet, null, true); } break; case CaptchaSourceType.Mining: Pickaxe pickaxe = m_Player.FindItemOnLayer(Layer.OneHanded) as Pickaxe; if (pickaxe != null) { Mining.System.StartHarvesting(m_Player, pickaxe, null, true); } break; case CaptchaSourceType.DungeonChest: Lockpick lockpick = (Lockpick)m_Player.Backpack.FindItemByType(typeof(Lockpick)); //TEST if (lockpick != null) { lockpick.OnDoubleClick(m_Player); } break; } return; } else { captchaData.m_CaptchaAttempt++; if (captchaData.m_CaptchaAttempt == 3) { string responseMessage = ""; if (captchaData.m_PreviousPenalty != CaptchaAccountData.PenaltyLevelType.None && captchaData.m_PenaltyProbationExpiration > DateTime.UtcNow) { switch (captchaData.m_PreviousPenalty) { case CaptchaAccountData.PenaltyLevelType.None: captchaData.m_CurrentPenalty = CaptchaAccountData.PenaltyLevelType.Minor; captchaData.m_CurrentPenaltyExpiration = DateTime.UtcNow + CaptchaAccountData.GetPenaltyDuration(captchaData.m_CurrentPenalty); captchaData.m_PreviousPenalty = captchaData.m_CurrentPenalty; captchaData.m_PenaltyProbationExpiration = DateTime.UtcNow + CaptchaAccountData.GetPenaltyProbationDuration(captchaData.m_PreviousPenalty); responseMessage = "You have failed a captcha response and your account will now be prevented from gathering resources for "; responseMessage += Utility.CreateTimeRemainingString(DateTime.UtcNow, captchaData.m_CurrentPenaltyExpiration, false, true, true, true, false) + "."; m_Player.SendMessage(2115, responseMessage); break; case CaptchaAccountData.PenaltyLevelType.Minor: captchaData.m_CurrentPenalty = CaptchaAccountData.PenaltyLevelType.Major; captchaData.m_CurrentPenaltyExpiration = DateTime.UtcNow + CaptchaAccountData.GetPenaltyDuration(captchaData.m_CurrentPenalty); captchaData.m_PreviousPenalty = captchaData.m_CurrentPenalty; captchaData.m_PenaltyProbationExpiration = DateTime.UtcNow + CaptchaAccountData.GetPenaltyProbationDuration(captchaData.m_PreviousPenalty); responseMessage = "You have failed a second captcha response within one day, and your account will now be prevented from gathering resources for "; responseMessage += Utility.CreateTimeRemainingString(DateTime.UtcNow, captchaData.m_CurrentPenaltyExpiration, false, true, true, true, false) + "."; m_Player.SendMessage(2115, responseMessage); break; case CaptchaAccountData.PenaltyLevelType.Major: captchaData.m_CurrentPenalty = CaptchaAccountData.PenaltyLevelType.Epic; captchaData.m_CurrentPenaltyExpiration = DateTime.UtcNow + CaptchaAccountData.GetPenaltyDuration(captchaData.m_CurrentPenalty); captchaData.m_PreviousPenalty = captchaData.m_CurrentPenalty; captchaData.m_PenaltyProbationExpiration = DateTime.UtcNow + CaptchaAccountData.GetPenaltyProbationDuration(captchaData.m_PreviousPenalty); responseMessage = "You have failed a third captcha response within one week, and your account will now be prevented from gathering resources for "; responseMessage += Utility.CreateTimeRemainingString(DateTime.UtcNow, captchaData.m_CurrentPenaltyExpiration, false, true, true, true, false) + "."; m_Player.SendMessage(2115, responseMessage); break; case CaptchaAccountData.PenaltyLevelType.Epic: captchaData.m_CurrentPenalty = CaptchaAccountData.PenaltyLevelType.Permanent; captchaData.m_CurrentPenaltyExpiration = DateTime.UtcNow + CaptchaAccountData.GetPenaltyDuration(captchaData.m_CurrentPenalty); captchaData.m_PreviousPenalty = captchaData.m_CurrentPenalty; captchaData.m_PenaltyProbationExpiration = DateTime.UtcNow + CaptchaAccountData.GetPenaltyProbationDuration(captchaData.m_PreviousPenalty); responseMessage = "You have failed a fourth captcha response within one month, and your account will now be permanently prevented from gathering resources."; m_Player.SendMessage(2115, responseMessage); break; case CaptchaAccountData.PenaltyLevelType.Permanent: captchaData.m_CurrentPenalty = CaptchaAccountData.PenaltyLevelType.Permanent; captchaData.m_CurrentPenaltyExpiration = DateTime.UtcNow + CaptchaAccountData.GetPenaltyDuration(captchaData.m_CurrentPenalty); captchaData.m_PreviousPenalty = captchaData.m_CurrentPenalty; captchaData.m_PenaltyProbationExpiration = DateTime.UtcNow + CaptchaAccountData.GetPenaltyProbationDuration(captchaData.m_PreviousPenalty); responseMessage = "You have failed a fourth captcha response within one month, and your account will now be permanently prevented from gathering resources."; m_Player.SendMessage(2115, responseMessage); break; } } else { captchaData.m_CurrentPenalty = CaptchaAccountData.PenaltyLevelType.Minor; captchaData.m_CurrentPenaltyExpiration = DateTime.UtcNow + CaptchaAccountData.GetPenaltyDuration(captchaData.m_CurrentPenalty); captchaData.m_PreviousPenalty = captchaData.m_CurrentPenalty; captchaData.m_PenaltyProbationExpiration = DateTime.UtcNow + CaptchaAccountData.GetPenaltyProbationDuration(captchaData.m_PreviousPenalty); responseMessage = "You have failed a captcha response and your account will now be blocked from gathering resources for " + Utility.CreateTimeRemainingString(DateTime.UtcNow, captchaData.m_CurrentPenaltyExpiration, false, true, true, true, false) + "."; m_Player.SendMessage(2115, responseMessage); } captchaData.m_NextCaptchaTime = DateTime.UtcNow + TimeSpan.FromMinutes((double)Utility.RandomMinMax(CaptchaAccountData.MinimumCaptchaDelay, CaptchaAccountData.MaximumCaptchaDelay)); captchaData.m_CaptchaRequired = false; captchaData.m_CaptchaAttempt = 0; captchaData.m_ConfirmPrompt = false; m_Player.SendSound(0x5B3); return; } else { switch (captchaData.m_CaptchaAttempt) { case 1: m_Player.SendMessage(55, "Captcha response incorrect. You have two more attempts."); break; case 2: m_Player.SendMessage(1256, "Captcha response incorrect. You have one more attempt."); break; } captchaData.m_NextCaptchaTime = DateTime.UtcNow + TimeSpan.FromMinutes((double)Utility.RandomMinMax(CaptchaAccountData.MinimumCaptchaDelay, CaptchaAccountData.MaximumCaptchaDelay)); captchaData.GenerateIDs(); captchaData.m_ConfirmPrompt = false; } } } else { captchaData.m_ConfirmPrompt = true; } closeGump = false; break; //Row 1 Previous case 3: captchaData.m_SelectedRow1Index--; if (captchaData.m_SelectedRow1Index < 0) { captchaData.m_SelectedRow1Index = CaptchaAccountData.ItemsPerRow - 1; } captchaData.m_ConfirmPrompt = false; m_Player.SendSound(SelectionSound); closeGump = false; break; //Row 1 Next case 4: captchaData.m_SelectedRow1Index++; if (captchaData.m_SelectedRow1Index >= CaptchaAccountData.ItemsPerRow) { captchaData.m_SelectedRow1Index = 0; } captchaData.m_ConfirmPrompt = false; m_Player.SendSound(SelectionSound); closeGump = false; break; //Row 2 Previous case 5: captchaData.m_SelectedRow2Index--; if (captchaData.m_SelectedRow2Index < 0) { captchaData.m_SelectedRow2Index = CaptchaAccountData.ItemsPerRow - 1; } captchaData.m_ConfirmPrompt = false; m_Player.SendSound(SelectionSound); closeGump = false; break; //Row 2 Next case 6: captchaData.m_SelectedRow2Index++; if (captchaData.m_SelectedRow2Index >= CaptchaAccountData.ItemsPerRow) { captchaData.m_SelectedRow2Index = 0; } captchaData.m_ConfirmPrompt = false; m_Player.SendSound(SelectionSound); closeGump = false; break; //Row 3 Previous case 7: captchaData.m_SelectedRow3Index--; if (captchaData.m_SelectedRow3Index < 0) { captchaData.m_SelectedRow3Index = CaptchaAccountData.ItemsPerRow - 1; } captchaData.m_ConfirmPrompt = false; m_Player.SendSound(SelectionSound); closeGump = false; break; //Row 3 Next case 8: captchaData.m_SelectedRow3Index++; if (captchaData.m_SelectedRow3Index >= CaptchaAccountData.ItemsPerRow) { captchaData.m_SelectedRow3Index = 0; } captchaData.m_ConfirmPrompt = false; m_Player.SendSound(SelectionSound); closeGump = false; break; } if (!closeGump) { m_Player.CloseGump(typeof(CaptchaGump)); m_Player.SendGump(new CaptchaGump(m_Player)); } else { m_Player.SendSound(CloseGumpSound); } }
public TerathanIslandTreasureChest() : base(0x2DF1) { Name = "a treasure chest -30-"; Movable = true; Hue = 285; Weight = 1000.0; TrapPower = 0; Locked = true; RequiredSkill = 30; LockLevel = 30; MaxLockLevel = 35; // Gold if (Utility.RandomDouble() < 0.25) { DropItem(new Gold(Utility.Random(45, 450))); } /////////////////////////////////////// Books if (Utility.RandomDouble() < 0.10) { DropItem(new TamersHandbookVol1()); } if (Utility.RandomDouble() < 0.10) { DropItem(new TamersHandbookVol2()); } if (Utility.RandomDouble() < 0.10) { DropItem(new TamersHandbookVol3()); } if (Utility.RandomDouble() < 0.10) { DropItem(new TamersHandbookVol4()); } if (Utility.RandomDouble() < 0.10) { DropItem(new TamersHandbookVol5()); } /////////////////////////////////////// Meats if (Utility.RandomDouble() < 0.15) { DropItem(new Bacon()); } if (Utility.RandomDouble() < 0.15) { DropItem(new Sausage()); } /////////////////////////////////////// Eating Utensils if (Utility.RandomDouble() < 0.08) { DropItem(new KnifeLeft()); } if (Utility.RandomDouble() < 0.08) { DropItem(new KnifeRight()); } if (Utility.RandomDouble() < 0.08) { DropItem(new PewterMug()); } if (Utility.RandomDouble() < 0.08) { DropItem(new Plate()); } if (Utility.RandomDouble() < 0.08) { DropItem(new SpoonLeft()); } if (Utility.RandomDouble() < 0.08) { DropItem(new SpoonRight()); } /////////////////////////////////////// Jewelry if (Utility.RandomDouble() < 0.04) { DropItem(new Agate()); } if (Utility.RandomDouble() < 0.04) { DropItem(new Beryl()); } if (Utility.RandomDouble() < 0.04) { DropItem(new ChromeDiopside()); } if (Utility.RandomDouble() < 0.04) { DropItem(new FireOpal()); } if (Utility.RandomDouble() < 0.04) { DropItem(new MoonstoneCustom()); } if (Utility.RandomDouble() < 0.04) { DropItem(new Onyx()); } if (Utility.RandomDouble() < 0.04) { DropItem(new Opal()); } if (Utility.RandomDouble() < 0.04) { DropItem(new Pearl()); } if (Utility.RandomDouble() < 0.04) { DropItem(new TurquoiseCustom()); } if (Utility.RandomDouble() < 0.03) { DropItem(new Bloodstone()); } if (Utility.RandomDouble() < 0.03) { DropItem(new Citrine()); } if (Utility.RandomDouble() < 0.03) { DropItem(new Demantoid()); } if (Utility.RandomDouble() < 0.03) { DropItem(new Jasper()); } if (Utility.RandomDouble() < 0.03) { DropItem(new Lolite()); } if (Utility.RandomDouble() < 0.03) { DropItem(new Lupis()); } if (Utility.RandomDouble() < 0.03) { DropItem(new Peridot()); } if (Utility.RandomDouble() < 0.03) { DropItem(new Tsavorite()); } if (Utility.RandomDouble() < 0.03) { DropItem(new Zircon()); } /////////////////////////////////////// Supplies if (Utility.RandomDouble() < 0.15) { DropItem(new Arrow(Utility.Random(17, 22))); } if (Utility.RandomDouble() < 0.15) { DropItem(new Bolt(Utility.Random(17, 22))); } Item ReagentLoot = Loot.RandomReagent(); ReagentLoot.Amount = Utility.Random(17, 22); DropItem(ReagentLoot); if (Utility.RandomDouble() < 0.15) { DropItem(new Bandage(Utility.Random(17, 22))); } if (Utility.RandomDouble() < 0.15) { DropItem(new Bedroll()); } if (Utility.RandomDouble() < 0.15) { DropItem(new Bottle(Utility.Random(17, 22))); } if (Utility.RandomDouble() < 0.15) { DropItem(new Lockpick(Utility.Random(17, 22))); } Item PotionLoot = Loot.RandomPotion(); DropItem(PotionLoot); if (Utility.RandomDouble() < 0.20) { DropItem(new LesserPoisonPotion()); } if (Utility.RandomDouble() < 0.15) { DropItem(new PoisonPotion()); } /////////////////////////////////////// Tools if (Utility.RandomDouble() < 0.15) { DropItem(new FishingPole()); } if (Utility.RandomDouble() < 0.15) { DropItem(new Shovel()); } if (Utility.RandomDouble() < 0.15) { DropItem(new Skillet()); } /////////////////////////////////////// Rare Items if (Utility.RandomDouble() < 0.01) { DropItem(new DyeTub()); } if (Utility.RandomDouble() < 0.15) { BaseWeapon weapon = Loot.RandomWeapon(true); switch (Utility.Random(38)) { case 0: weapon = new Hatchet(); break; case 1: weapon = new Bow(); break; case 2: weapon = new Crossbow(); break; case 3: weapon = new Club(); break; case 4: weapon = new Mace(); break; case 5: weapon = new Maul(); break; case 6: weapon = new Pitchfork(); break; case 7: weapon = new ShortSpear(); break; case 8: weapon = new GnarledStaff(); break; case 9: weapon = new ShepherdsCrook(); break; case 10: weapon = new Cutlass(); break; case 11: weapon = new Katana(); break; case 12: weapon = new Kryss(); break; case 13: weapon = new Scimitar(); break; case 14: weapon = new AssassinSpike(); break; case 15: weapon = new DiamondMace(); break; case 16: weapon = new Leafblade(); break; case 17: weapon = new MagicalShortbow(); break; case 18: weapon = new RadiantScimitar(); break; case 19: weapon = new WildStaff(); break; case 20: weapon = new Axe(); break; case 21: weapon = new ExecutionersAxe(); break; case 22: weapon = new Pickaxe(); break; case 23: weapon = new TwoHandedAxe(); break; case 24: weapon = new WarAxe(); break; case 25: weapon = new HeavyCrossbow(); break; case 26: weapon = new HammerPick(); break; case 27: weapon = new WarMace(); break; case 28: weapon = new Spear(); break; case 29: weapon = new WarFork(); break; case 30: weapon = new BlackStaff(); break; case 31: weapon = new QuarterStaff(); break; case 32: weapon = new Longsword(); break; case 33: weapon = new ElvenCompositeLongbow(); break; case 34: weapon = new ElvenMachete(); break; case 35: weapon = new ElvenSpellblade(); break; case 36: weapon = new RuneBlade(); break; default: weapon = new Dagger(); break; } BaseRunicTool.ApplyAttributesTo(weapon, 2, 22, 25); weapon.Hue = 285; weapon.WeaponAttributes.HitLeechStam = 5; weapon.Attributes.BonusHits = 10; DropItem(weapon); } if (Utility.RandomDouble() < 0.15) { BaseArmor armor = Loot.RandomArmor(true); switch (Utility.Random(13)) { case 0: armor = new FemaleStuddedChest(); break; case 1: armor = new StuddedArms(); break; case 2: armor = new StuddedBustierArms(); break; case 3: armor = new StuddedGloves(); break; case 4: armor = new StuddedGorget(); break; case 5: armor = new ChainCoif(); break; case 6: armor = new ChainChest(); break; case 7: armor = new ChainLegs(); break; case 8: armor = new RingmailArms(); break; case 9: armor = new RingmailChest(); break; case 10: armor = new RingmailGloves(); break; case 11: armor = new RingmailLegs(); break; default: armor = new StuddedChest(); break; } BaseRunicTool.ApplyAttributesTo(armor, 3, 22, 25); armor.Hue = 285; armor.Attributes.WeaponDamage = 3; DropItem(armor); } if (Utility.RandomDouble() < 0.15) { BaseHat hat = Loot.RandomHat(true); switch (Utility.Random(5)) { case 0: hat = new BearMask(); break; case 1: hat = new DeerMask(); break; case 2: hat = new FeatheredHat(); break; case 3: hat = new WizardsHat(); break; default: hat = new TribalMask(); break; } BaseRunicTool.ApplyAttributesTo(hat, 3, 22, 25); hat.Hue = 285; hat.Attributes.BonusHits = 10; hat.Attributes.SpellDamage = 5; hat.Resistances.Energy = 10; DropItem(hat); } if (Utility.RandomDouble() < 0.15) { BaseClothing clothing = Loot.RandomClothing(true); BaseRunicTool.ApplyAttributesTo(clothing, 3, 22, 25); clothing.Hue = 285; clothing.Attributes.BonusHits = 5; clothing.Attributes.DefendChance = 3; clothing.Resistances.Physical = 5; DropItem(clothing); } if (Utility.RandomDouble() < 0.15) { BaseShield shield = new WoodenKiteShield(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(shield, 3, 22, 25); } shield.Hue = 285; shield.Attributes.BonusHits = 10; DropItem(shield); } if (Utility.RandomDouble() < 0.15) { BaseJewel bracelet = new GoldBracelet(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(bracelet, 3, 22, 25); } bracelet.Hue = 285; bracelet.Attributes.WeaponDamage = 5; bracelet.Attributes.DefendChance = 2; bracelet.Resistances.Fire = 5; DropItem(bracelet); } if (Utility.RandomDouble() < 0.15) { BaseJewel earrings = new SilverEarrings(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(earrings, 3, 22, 25); } earrings.Hue = 285; earrings.Attributes.WeaponDamage = 5; earrings.Attributes.DefendChance = 3; earrings.Resistances.Cold = 5; DropItem(earrings); } if (Utility.RandomDouble() < 0.15) { BaseJewel necklace = new GoldNecklace(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(necklace, 3, 22, 25); } necklace.Hue = 285; necklace.Attributes.WeaponDamage = 5; necklace.Attributes.DefendChance = 5; necklace.Resistances.Energy = 5; DropItem(necklace); } if (Utility.RandomDouble() < 0.15) { BaseJewel ring = new SilverRing(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(ring, 3, 22, 25); } ring.Hue = 285; ring.Attributes.WeaponDamage = 5; ring.Attributes.DefendChance = 2; ring.Resistances.Poison = 5; DropItem(ring); } }
public FortressCalcifinaTreasureChest1() : base(0xE43) { Name = "a treasure chest -25-"; Movable = true; Weight = 1000.0; TrapPower = 0; Locked = true; RequiredSkill = 25; LockLevel = 25; MaxLockLevel = 30; // Gold if (Utility.RandomDouble() < 0.25) { DropItem(new Gold(Utility.Random(40, 400))); } /////////////////////////////////////// Supplies if (Utility.RandomDouble() < 0.15) { DropItem(new Arrow(Utility.Random(15, 20))); } if (Utility.RandomDouble() < 0.15) { DropItem(new Bolt(Utility.Random(15, 20))); } Item ReagentLoot = Loot.RandomReagent(); ReagentLoot.Amount = Utility.Random(15, 20); DropItem(ReagentLoot); if (Utility.RandomDouble() < 0.15) { DropItem(new Bandage(Utility.Random(15, 20))); } if (Utility.RandomDouble() < 0.15) { DropItem(new Bedroll()); } if (Utility.RandomDouble() < 0.15) { DropItem(new Bottle(Utility.Random(15, 20))); } if (Utility.RandomDouble() < 0.15) { DropItem(new Lockpick(Utility.Random(15, 20))); } Item PotionLoot = Loot.RandomPotion(); DropItem(PotionLoot); /////////////////////////////////////// Tools if (Utility.RandomDouble() < 0.15) { DropItem(new FishingPole()); } if (Utility.RandomDouble() < 0.15) { DropItem(new Shovel()); } if (Utility.RandomDouble() < 0.15) { DropItem(new Skillet()); } /////////////////////////////////////// Rare Items if (Utility.RandomDouble() < 0.01) { DropItem(new DyeTub()); } if (Utility.RandomDouble() < 0.15) { BaseWeapon weapon = Loot.RandomWeapon(true); switch (Utility.Random(38)) { case 0: weapon = new Hatchet(); break; case 1: weapon = new Bow(); break; case 2: weapon = new Crossbow(); break; case 3: weapon = new Club(); break; case 4: weapon = new Mace(); break; case 5: weapon = new Maul(); break; case 6: weapon = new Pitchfork(); break; case 7: weapon = new ShortSpear(); break; case 8: weapon = new GnarledStaff(); break; case 9: weapon = new ShepherdsCrook(); break; case 10: weapon = new Cutlass(); break; case 11: weapon = new Katana(); break; case 12: weapon = new Kryss(); break; case 13: weapon = new Scimitar(); break; case 14: weapon = new AssassinSpike(); break; case 15: weapon = new DiamondMace(); break; case 16: weapon = new Leafblade(); break; case 17: weapon = new MagicalShortbow(); break; case 18: weapon = new RadiantScimitar(); break; case 19: weapon = new WildStaff(); break; case 20: weapon = new Axe(); break; case 21: weapon = new ExecutionersAxe(); break; case 22: weapon = new Pickaxe(); break; case 23: weapon = new TwoHandedAxe(); break; case 24: weapon = new WarAxe(); break; case 25: weapon = new HeavyCrossbow(); break; case 26: weapon = new HammerPick(); break; case 27: weapon = new WarMace(); break; case 28: weapon = new Spear(); break; case 29: weapon = new WarFork(); break; case 30: weapon = new BlackStaff(); break; case 31: weapon = new QuarterStaff(); break; case 32: weapon = new Longsword(); break; case 33: weapon = new ElvenCompositeLongbow(); break; case 34: weapon = new ElvenMachete(); break; case 35: weapon = new ElvenSpellblade(); break; case 36: weapon = new RuneBlade(); break; default: weapon = new Dagger(); break; } BaseRunicTool.ApplyAttributesTo(weapon, 4, 18, 22); DropItem(weapon); } if (Utility.RandomDouble() < 0.15) { BaseArmor armor = Loot.RandomArmor(true); switch (Utility.Random(13)) { case 0: armor = new FemaleStuddedChest(); break; case 1: armor = new StuddedArms(); break; case 2: armor = new StuddedBustierArms(); break; case 3: armor = new StuddedGloves(); break; case 4: armor = new StuddedGorget(); break; case 5: armor = new ChainCoif(); break; case 6: armor = new ChainChest(); break; case 7: armor = new ChainLegs(); break; case 8: armor = new RingmailArms(); break; case 9: armor = new RingmailChest(); break; case 10: armor = new RingmailGloves(); break; case 11: armor = new RingmailLegs(); break; default: armor = new StuddedChest(); break; } BaseRunicTool.ApplyAttributesTo(armor, 4, 18, 22); DropItem(armor); } if (Utility.RandomDouble() < 0.15) { BaseHat hat = Loot.RandomHat(true); switch (Utility.Random(5)) { case 0: hat = new BearMask(); break; case 1: hat = new DeerMask(); break; case 2: hat = new FeatheredHat(); break; case 3: hat = new WizardsHat(); break; default: hat = new TribalMask(); break; } BaseRunicTool.ApplyAttributesTo(hat, 4, 18, 22); DropItem(hat); } if (Utility.RandomDouble() < 0.15) { BaseClothing clothing = Loot.RandomClothing(true); BaseRunicTool.ApplyAttributesTo(clothing, 4, 18, 22); DropItem(clothing); } if (Utility.RandomDouble() < 0.15) { BaseShield shield = new MetalKiteShield(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(shield, 4, 18, 22); } DropItem(shield); } if (Utility.RandomDouble() < 0.15) { BaseJewel bracelet = new GoldBracelet(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(bracelet, 4, 18, 22); } DropItem(bracelet); } if (Utility.RandomDouble() < 0.15) { BaseJewel earrings = new SilverEarrings(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(earrings, 4, 18, 22); } DropItem(earrings); } if (Utility.RandomDouble() < 0.15) { BaseJewel necklace = new GoldNecklace(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(necklace, 4, 18, 22); } DropItem(necklace); } if (Utility.RandomDouble() < 0.15) { BaseJewel ring = new SilverRing(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(ring, 4, 18, 22); } DropItem(ring); } }
public MongbatHideoutTreasureChest1() : base(0xE43) { Name = "a treasure chest -40-"; Movable = true; Weight = 1000.0; TrapPower = 0; Locked = true; RequiredSkill = 40; LockLevel = 40; MaxLockLevel = 80; /////////////////////////////////// Gold if (Utility.RandomDouble() < 0.25) { DropItem(new Gold(Utility.Random(20, 300))); } /////////////////////////////////////// Supplies switch (Utility.Random(19)) { case 0: DropItem(new Board(60)); break; case 1: DropItem(new BoltOfCloth(60)); break; case 2: DropItem(new Bottle(60)); break; case 3: DropItem(new CopperWire(60)); break; case 4: DropItem(new Cotton(60)); break; case 5: DropItem(new DarkYarn(60)); break; case 6: DropItem(new Feather(60)); break; case 7: DropItem(new Flax(60)); break; case 8: DropItem(new Gears(60)); break; case 9: DropItem(new GoldWire(60)); break; case 10: DropItem(new IronIngot(60)); break; case 11: DropItem(new IronWire(60)); break; case 12: DropItem(new Leather(60)); break; case 13: DropItem(new LightYarn(60)); break; case 14: DropItem(new Shaft(60)); break; case 15: DropItem(new SilverWire(60)); break; case 16: DropItem(new SpoolOfThread(60)); break; case 17: DropItem(new Springs(60)); break; case 18: DropItem(new Wool(60)); break; } switch (Utility.Random(5)) { case 0: DropItem(new BeetleEgg(15)); break; case 1: DropItem(new FishScale(15)); break; case 2: DropItem(new Nirnroot(15)); break; case 3: DropItem(new SerpentScale(15)); break; case 4: DropItem(new ThunderStone(15)); break; } Item ReagentLoot = Loot.RandomReagent(); ReagentLoot.Amount = Utility.RandomMinMax(5, 10); DropItem(ReagentLoot); if (Utility.RandomDouble() < 0.05) { DropItem(new SackFlour()); } /////////////////////////////////////// Rare Items if (Utility.RandomDouble() < 0.01) { DropItem(new DyeTub()); } /////////////////////////////////////// LV 1-15 if (Utility.RandomDouble() < 0.10) { BaseWeapon weapon = Loot.RandomWeapon(true); switch (Utility.Random(36)) { case 0: weapon = new Hatchet(); break; // Lv1 case 1: weapon = new Axe(); break; // Lv5 case 2: weapon = new BattleAxe(); break; // Lv10 case 3: weapon = new Bow(); break; // Lv1 case 4: weapon = new Crossbow(); break; // Lv1 case 5: weapon = new Balestra(); break; // Lv5 case 6: weapon = new ElvenLeafBow(); break; // Lv5 case 7: weapon = new MagicalShortbow(); break; // Lv10 case 8: weapon = new RepeatingCrossbow(); break; // Lv10 case 9: weapon = new SkinningKnife(); break; // Lv1 case 10: weapon = new Cleaver(); break; // Lv5 case 11: weapon = new Dagger(); break; // Lv5 case 12: weapon = new ButcherKnife(); break; // Lv10 case 13: weapon = new EbonyDagger(); break; // Lv10 case 14: weapon = new Sai(); break; // Lv15 case 15: weapon = new Club(); break; // Lv1 case 16: weapon = new Nunchaku(); break; // Lv1 case 17: weapon = new Mace(); break; // Lv5 case 18: weapon = new Maul(); break; // Lv10 case 19: weapon = new Scepter(); break; // Lv15 case 20: weapon = new Pitchfork(); break; // Lv1 case 21: weapon = new ShortSpear(); break; // Lv5 case 22: weapon = new Pilum(); break; // Lv10 case 23: weapon = new Pike(); break; // Lv15 case 24: weapon = new GnarledStaff(); break; // Lv1 case 25: weapon = new ShepherdsCrook(); break; // Lv1 case 26: weapon = new QuarterStaff(); break; // Lv10 case 27: weapon = new ReptilianStaff(); break; // Lv15 case 28: weapon = new Bokuto(); break; // Lv1 case 29: weapon = new BoneHarvester(); break; // Lv1 case 30: weapon = new Cutlass(); break; // Lv1 case 31: weapon = new ElvenMachete(); break; // Lv1 case 32: weapon = new Kryss(); break; // Lv1 case 33: weapon = new EbonyRapier(); break; // Lv10 case 34: weapon = new Scimitar(); break; // Lv10 default: weapon = new Leafblade(); break; // Lv1 } switch (Utility.Random(14)) { case 0: weapon.Attributes.AttackChance = Utility.RandomMinMax(1, 5); break; case 1: weapon.Attributes.DefendChance = Utility.RandomMinMax(1, 5); break; case 2: weapon.Attributes.Luck = Utility.RandomMinMax(1, 10); break; case 3: weapon.Attributes.WeaponSpeed = Utility.RandomMinMax(1, 25); break; case 4: weapon.WeaponAttributes.HitDispel = Utility.RandomMinMax(2, 10); break; case 5: weapon.WeaponAttributes.HitFireball = Utility.RandomMinMax(2, 10); break; case 6: weapon.WeaponAttributes.HitHarm = Utility.RandomMinMax(2, 10); break; case 7: weapon.WeaponAttributes.HitLeechHits = Utility.RandomMinMax(2, 10); break; case 8: weapon.WeaponAttributes.HitLeechMana = Utility.RandomMinMax(2, 10); break; case 9: weapon.WeaponAttributes.HitLeechStam = Utility.RandomMinMax(2, 10); break; case 10: weapon.WeaponAttributes.HitLightning = Utility.RandomMinMax(2, 10); break; case 11: weapon.WeaponAttributes.HitLowerAttack = Utility.RandomMinMax(2, 10); break; case 12: weapon.WeaponAttributes.HitLowerDefend = Utility.RandomMinMax(2, 10); break; default: weapon.Attributes.WeaponDamage = Utility.RandomMinMax(1, 10); break; } DropItem(weapon); } /////////////////////////////////////// LV 1-15 if (Utility.RandomDouble() < 0.10) { BaseArmor armor = Loot.RandomArmor(true); switch (Utility.Random(39)) { case 0: armor = new LeatherArms(); break; // Lv1 case 1: armor = new LeatherBustierArms(); break; // Lv1 case 2: armor = new LeatherCap(); break; // Lv1 case 3: armor = new LeatherChest(); break; // Lv1 case 4: armor = new LeatherGloves(); break; // Lv1 case 5: armor = new LeatherGorget(); break; // Lv1 case 6: armor = new LeatherLegs(); break; // Lv1 case 7: armor = new LeatherShorts(); break; // Lv1 case 8: armor = new LeatherSkirt(); break; // Lv1 case 9: armor = new FemaleLeafChest(); break; // Lv1 case 10: armor = new LeafArms(); break; // Lv3 case 11: armor = new LeafChest(); break; // Lv3 case 12: armor = new LeafGloves(); break; // Lv3 case 13: armor = new LeafGorget(); break; // Lv3 case 14: armor = new LeafLegs(); break; // Lv3 case 15: armor = new LeafTonlet(); break; // Lv3 case 16: armor = new LeatherDo(); break; // Lv6 case 17: armor = new LeatherHaidate(); break; // Lv6 case 18: armor = new LeatherHiroSode(); break; // Lv6 case 19: armor = new LeatherJingasa(); break; // Lv6 case 20: armor = new LeatherMempo(); break; // Lv6 case 21: armor = new LeatherNinjaHood(); break; // Lv6 case 22: armor = new LeatherNinjaJacket(); break; // Lv6 case 23: armor = new LeatherNinjaMitts(); break; // Lv6 case 24: armor = new LeatherNinjaPants(); break; // Lv6 case 25: armor = new LeatherSuneate(); break; // Lv6 case 26: armor = new EbonsilkArms(); break; // Lv9 case 27: armor = new EbonsilkChest(); break; // Lv9 case 28: armor = new EbonsilkGloves(); break; // Lv9 case 29: armor = new EbonsilkGorget(); break; // Lv9 case 30: armor = new EbonsilkLegs(); break; // Lv9 case 31: armor = new EbonsilkTiara(); break; // Lv9 case 32: armor = new ChitinArms(); break; // Lv12 case 33: armor = new ChitinChest(); break; // Lv12 case 34: armor = new ChitinGloves(); break; // Lv12 case 35: armor = new ChitinGorget(); break; // Lv12 case 36: armor = new ChitinHelmet(); break; // Lv12 case 37: armor = new ChitinLegs(); break; // Lv12 default: armor = new FemaleLeatherChest(); break; // Lv1 } BaseRunicTool.ApplyAttributesTo(armor, 3, 5, 50); DropItem(armor); } if (Utility.RandomDouble() < 0.05) { BaseHat hat = Loot.RandomHat(true); BaseRunicTool.ApplyAttributesTo(hat, 3, 5, 10); DropItem(hat); } if (Utility.RandomDouble() < 0.05) { BaseClothing clothing = Loot.RandomClothing(true); BaseRunicTool.ApplyAttributesTo(clothing, 3, 5, 10); DropItem(clothing); } if (Utility.RandomDouble() < 0.05) { BaseShield shield1 = new Buckler(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(shield1, 3, 5, 50); } DropItem(shield1); } if (Utility.RandomDouble() < 0.05) { BaseShield shield2 = new WoodenShield(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(shield2, 3, 5, 50); } DropItem(shield2); } if (Utility.RandomDouble() < 0.05) { BaseShield shield3 = new AmmoniteShield(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(shield3, 3, 5, 50); } DropItem(shield3); } if (Utility.RandomDouble() < 0.05) { BaseShield shield4 = new BronzeShield(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(shield4, 3, 5, 50); } DropItem(shield4); } if (Utility.RandomDouble() < 0.05) { BaseShield shield5 = new MetalShield(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(shield5, 3, 5, 50); } DropItem(shield5); } if (Utility.RandomDouble() < 0.05) { BaseShield shield6 = new WoodenKiteShield(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(shield6, 3, 5, 50); } DropItem(shield6); } if (Utility.RandomDouble() < 0.05) { BaseJewel bracelet = new SilverBracelet(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(bracelet, 3, 5, 10); } DropItem(bracelet); } if (Utility.RandomDouble() < 0.05) { BaseJewel earrings = new SilverEarrings(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(earrings, 3, 5, 10); } DropItem(earrings); } if (Utility.RandomDouble() < 0.05) { BaseJewel necklace = new SilverNecklace(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(necklace, 3, 5, 10); } DropItem(necklace); } if (Utility.RandomDouble() < 0.05) { BaseJewel ring = new SilverRing(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(ring, 3, 5, 10); } DropItem(ring); } }
public RatmenFortressBossChest() : base(0x2DF2) { Name = "a boss treasure chest -25-"; Movable = true; Weight = 1000.0; TrapPower = 0; Locked = true; RequiredSkill = 25; LockLevel = 25; MaxLockLevel = 30; // Gold if (Utility.RandomDouble() < 0.50) { DropItem(new Gold(Utility.Random(250, 400))); } /////////////////////////////////////// Jewelry if (Utility.RandomDouble() < 0.04) { DropItem(new Agate()); } if (Utility.RandomDouble() < 0.04) { DropItem(new Beryl()); } if (Utility.RandomDouble() < 0.04) { DropItem(new ChromeDiopside()); } if (Utility.RandomDouble() < 0.04) { DropItem(new FireOpal()); } if (Utility.RandomDouble() < 0.04) { DropItem(new MoonstoneCustom()); } if (Utility.RandomDouble() < 0.04) { DropItem(new Onyx()); } if (Utility.RandomDouble() < 0.04) { DropItem(new Opal()); } if (Utility.RandomDouble() < 0.04) { DropItem(new Pearl()); } if (Utility.RandomDouble() < 0.04) { DropItem(new TurquoiseCustom()); } if (Utility.RandomDouble() < 0.03) { DropItem(new Bloodstone()); } if (Utility.RandomDouble() < 0.03) { DropItem(new Citrine()); } if (Utility.RandomDouble() < 0.03) { DropItem(new Demantoid()); } if (Utility.RandomDouble() < 0.03) { DropItem(new Jasper()); } if (Utility.RandomDouble() < 0.03) { DropItem(new Lolite()); } if (Utility.RandomDouble() < 0.03) { DropItem(new Lupis()); } if (Utility.RandomDouble() < 0.03) { DropItem(new Peridot()); } if (Utility.RandomDouble() < 0.03) { DropItem(new Tsavorite()); } if (Utility.RandomDouble() < 0.03) { DropItem(new Zircon()); } if (Utility.RandomDouble() < 0.02) { DropItem(new Amber()); } if (Utility.RandomDouble() < 0.02) { DropItem(new Amethyst()); } if (Utility.RandomDouble() < 0.02) { DropItem(new Andalusite()); } if (Utility.RandomDouble() < 0.02) { DropItem(new Chrysoberyl()); } if (Utility.RandomDouble() < 0.02) { DropItem(new Garnet()); } if (Utility.RandomDouble() < 0.02) { DropItem(new Jade()); } if (Utility.RandomDouble() < 0.02) { DropItem(new Mandarin()); } if (Utility.RandomDouble() < 0.02) { DropItem(new Morganite()); } if (Utility.RandomDouble() < 0.02) { DropItem(new Paraiba()); } if (Utility.RandomDouble() < 0.02) { DropItem(new TigerEye()); } if (Utility.RandomDouble() < 0.02) { DropItem(new Tourmaline()); } if (Utility.RandomDouble() < 0.01) { DropItem(new Alexandrite()); } if (Utility.RandomDouble() < 0.01) { DropItem(new Ametrine()); } if (Utility.RandomDouble() < 0.01) { DropItem(new Kunzite()); } if (Utility.RandomDouble() < 0.01) { DropItem(new Ruby()); } if (Utility.RandomDouble() < 0.01) { DropItem(new Sapphire()); } if (Utility.RandomDouble() < 0.01) { DropItem(new Tanzanite()); } if (Utility.RandomDouble() < 0.01) { DropItem(new Topaz()); } if (Utility.RandomDouble() < 0.01) { DropItem(new Zultanite()); } if (Utility.RandomDouble() < 0.01) { DropItem(new Diamond()); } if (Utility.RandomDouble() < 0.01) { DropItem(new Emerald()); } if (Utility.RandomDouble() < 0.01) { DropItem(new PinkQuartz()); } if (Utility.RandomDouble() < 0.01) { DropItem(new StarSapphire()); } /////////////////////////////////////// Supplies if (Utility.RandomDouble() < 0.15) { DropItem(new Arrow(Utility.Random(35, 50))); } if (Utility.RandomDouble() < 0.15) { DropItem(new Bolt(Utility.Random(35, 50))); } Item ReagentLoot = Loot.RandomReagent(); ReagentLoot.Amount = Utility.Random(35, 40); DropItem(ReagentLoot); if (Utility.RandomDouble() < 0.15) { DropItem(new Bandage(Utility.Random(25, 40))); } if (Utility.RandomDouble() < 0.15) { DropItem(new Bedroll()); } if (Utility.RandomDouble() < 0.15) { DropItem(new Bottle(Utility.Random(15, 25))); } if (Utility.RandomDouble() < 0.15) { DropItem(new Lockpick(Utility.Random(15, 25))); } Item PotionLoot1 = Loot.RandomPotion(); DropItem(PotionLoot1); Item PotionLoot2 = Loot.RandomPotion(); DropItem(PotionLoot2); Item PotionLoot3 = Loot.RandomPotion(); DropItem(PotionLoot3); /////////////////////////////////////// Tools if (Utility.RandomDouble() < 0.15) { DropItem(new FishingPole()); } if (Utility.RandomDouble() < 0.15) { DropItem(new Shovel()); } if (Utility.RandomDouble() < 0.15) { DropItem(new Skillet()); } /////////////////////////////////////// Rare Items if (Utility.RandomDouble() < 0.01) { DropItem(new DyeTub()); } if (Utility.RandomDouble() < 0.20) { BaseWeapon weapon = Loot.RandomWeapon(true); switch (Utility.Random(38)) { case 0: weapon = new Hatchet(); break; case 1: weapon = new Bow(); break; case 2: weapon = new Crossbow(); break; case 3: weapon = new Club(); break; case 4: weapon = new Mace(); break; case 5: weapon = new Maul(); break; case 6: weapon = new Pitchfork(); break; case 7: weapon = new ShortSpear(); break; case 8: weapon = new GnarledStaff(); break; case 9: weapon = new ShepherdsCrook(); break; case 10: weapon = new Cutlass(); break; case 11: weapon = new Katana(); break; case 12: weapon = new Kryss(); break; case 13: weapon = new Scimitar(); break; case 14: weapon = new AssassinSpike(); break; case 15: weapon = new DiamondMace(); break; case 16: weapon = new Leafblade(); break; case 17: weapon = new MagicalShortbow(); break; case 18: weapon = new RadiantScimitar(); break; case 19: weapon = new WildStaff(); break; case 20: weapon = new Axe(); break; case 21: weapon = new ExecutionersAxe(); break; case 22: weapon = new Pickaxe(); break; case 23: weapon = new TwoHandedAxe(); break; case 24: weapon = new WarAxe(); break; case 25: weapon = new HeavyCrossbow(); break; case 26: weapon = new HammerPick(); break; case 27: weapon = new WarMace(); break; case 28: weapon = new Spear(); break; case 29: weapon = new WarFork(); break; case 30: weapon = new BlackStaff(); break; case 31: weapon = new QuarterStaff(); break; case 32: weapon = new Longsword(); break; case 33: weapon = new ElvenCompositeLongbow(); break; case 34: weapon = new ElvenMachete(); break; case 35: weapon = new ElvenSpellblade(); break; case 36: weapon = new RuneBlade(); break; default: weapon = new Dagger(); break; } BaseRunicTool.ApplyAttributesTo(weapon, 5, 15, 20); DropItem(weapon); } if (Utility.RandomDouble() < 0.20) { BaseArmor armor = Loot.RandomArmor(true); switch (Utility.Random(13)) { case 0: armor = new FemaleStuddedChest(); break; case 1: armor = new StuddedArms(); break; case 2: armor = new StuddedBustierArms(); break; case 3: armor = new StuddedGloves(); break; case 4: armor = new StuddedGorget(); break; case 5: armor = new ChainCoif(); break; case 6: armor = new ChainChest(); break; case 7: armor = new ChainLegs(); break; case 8: armor = new RingmailArms(); break; case 9: armor = new RingmailChest(); break; case 10: armor = new RingmailGloves(); break; case 11: armor = new RingmailLegs(); break; default: armor = new StuddedChest(); break; } BaseRunicTool.ApplyAttributesTo(armor, 5, 15, 20); DropItem(armor); } if (Utility.RandomDouble() < 0.20) { BaseHat hat = Loot.RandomHat(true); switch (Utility.Random(5)) { case 0: hat = new BearMask(); break; case 1: hat = new DeerMask(); break; case 2: hat = new FeatheredHat(); break; case 3: hat = new WizardsHat(); break; default: hat = new TribalMask(); break; } BaseRunicTool.ApplyAttributesTo(hat, 5, 15, 20); DropItem(hat); } if (Utility.RandomDouble() < 0.20) { BaseClothing clothing = Loot.RandomClothing(true); BaseRunicTool.ApplyAttributesTo(clothing, 5, 15, 20); DropItem(clothing); } if (Utility.RandomDouble() < 0.20) { BaseShield shield = new HeaterShield(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(shield, 5, 15, 20); } DropItem(shield); } if (Utility.RandomDouble() < 0.20) { BaseJewel bracelet = new SilverBracelet(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(bracelet, 5, 15, 20); } DropItem(bracelet); } if (Utility.RandomDouble() < 0.20) { BaseJewel earrings = new SilverEarrings(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(earrings, 5, 15, 20); } DropItem(earrings); } if (Utility.RandomDouble() < 0.20) { BaseJewel necklace = new SilverNecklace(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(necklace, 5, 15, 20); } DropItem(necklace); } if (Utility.RandomDouble() < 0.20) { BaseJewel ring = new SilverRing(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(ring, 5, 15, 20); } DropItem(ring); } }
public override void OnResponse(NetState sender, RelayInfo info) { if (m_House.Deleted) { return; } else if (info.ButtonID == 1) { if (m_House.SewingKit > 0) { m_From.AddToBackpack(new SewingKit(m_House.SewingKit)); m_House.SewingKit = (0); m_From.SendGump(new ToolHouseGump(m_From, m_House)); } else { m_From.SendGump(new ToolHouseGump(m_From, m_House)); m_House.BeginCombine(m_From); } } else if (info.ButtonID == 2) { if (m_House.MortarPestle > 0) { m_From.AddToBackpack(new MortarPestle(m_House.MortarPestle)); m_House.MortarPestle = (0); m_From.SendGump(new ToolHouseGump(m_From, m_House)); } else { m_From.SendGump(new ToolHouseGump(m_From, m_House)); m_House.BeginCombine(m_From); } } else if (info.ButtonID == 3) { if (m_House.ScribesPen > 0) { m_From.AddToBackpack(new ScribesPen(m_House.ScribesPen)); m_House.ScribesPen = (0); m_From.SendGump(new ToolHouseGump(m_From, m_House)); } else { m_From.SendGump(new ToolHouseGump(m_From, m_House)); m_House.BeginCombine(m_From); } } else if (info.ButtonID == 4) { if (m_House.MalletAndChisel > 0) { m_From.AddToBackpack(new MalletAndChisel(m_House.MalletAndChisel)); m_House.MalletAndChisel = (0); m_From.SendGump(new ToolHouseGump(m_From, m_House)); } else { m_From.SendGump(new ToolHouseGump(m_From, m_House)); m_House.BeginCombine(m_From); } } else if (info.ButtonID == 5) { if (m_House.Carpentry > 0) { m_From.AddToBackpack(new Hammer(m_House.Carpentry)); m_House.Carpentry = (0); m_From.SendGump(new ToolHouseGump(m_From, m_House)); } else { m_From.SendGump(new ToolHouseGump(m_From, m_House)); m_House.BeginCombine(m_From); } } else if (info.ButtonID == 6) { if (m_House.FletcherTools > 0) { m_From.AddToBackpack(new FletcherTools(m_House.FletcherTools)); m_House.FletcherTools = (0); m_From.SendGump(new ToolHouseGump(m_From, m_House)); } else { m_From.SendGump(new ToolHouseGump(m_From, m_House)); m_House.BeginCombine(m_From); } } else if (info.ButtonID == 7) { if (m_House.TinkerTools > 0) { m_From.AddToBackpack(new TinkerTools(m_House.TinkerTools)); m_House.TinkerTools = (0); m_From.SendGump(new ToolHouseGump(m_From, m_House)); } else { m_From.SendGump(new ToolHouseGump(m_From, m_House)); m_House.BeginCombine(m_From); } } else if (info.ButtonID == 8) { if (m_House.BlackSmith > 0) { m_From.AddToBackpack(new SmithHammer(m_House.BlackSmith)); m_House.BlackSmith = (0); m_From.SendGump(new ToolHouseGump(m_From, m_House)); } else { m_From.SendGump(new ToolHouseGump(m_From, m_House)); m_House.BeginCombine(m_From); } } else if (info.ButtonID == 9) { if (m_House.Shovel > 0) { m_From.AddToBackpack(new Shovel(m_House.Shovel)); m_House.Shovel = (0); m_From.SendGump(new ToolHouseGump(m_From, m_House)); } else { m_From.SendGump(new ToolHouseGump(m_From, m_House)); m_House.BeginCombine(m_From); } } else if (info.ButtonID == 10) { if (m_House.GargoylesPickaxe > 0) { GargoylesPickaxe gargoylesPickaxe = new GargoylesPickaxe(); // items that don't accept uses need to be handled like this gargoylesPickaxe.UsesRemaining = m_House.GargoylesPickaxe; // items that don't accept uses need to be handled like this m_From.AddToBackpack(gargoylesPickaxe); // items that don't accept uses need to be handled like this m_House.GargoylesPickaxe = (0); m_From.SendGump(new ToolHouseGump(m_From, m_House)); } else { m_From.SendGump(new ToolHouseGump(m_From, m_House)); m_House.BeginCombine(m_From); } } else if (info.ButtonID == 11) { if (m_House.ProspectorsTool > 0) { ProspectorsTool prospectorstool = new ProspectorsTool(); // items that don't accept uses need to be handled like this prospectorstool.UsesRemaining = m_House.ProspectorsTool; // items that don't accept uses need to be handled like this m_From.AddToBackpack(prospectorstool); // items that don't accept uses need to be handled like this m_House.ProspectorsTool = (0); m_From.SendGump(new ToolHouseGump(m_From, m_House)); } else { m_From.SendGump(new ToolHouseGump(m_From, m_House)); m_House.BeginCombine(m_From); } /*else if ( info.ButtonID == 12 ) * { * if ( m_House.LumberjackingProspectorsTool > 0 ) * { * LumberjackingProspectorsTool lumberjackingprospectorstool = new LumberjackingProspectorsTool(); // items that don't accept uses need to be handled like this * lumberjackingprospectorstool.UsesRemaining = m_House.LumberjackingProspectorsTool; // items that don't accept uses need to be handled like this * m_From.AddToBackpack(lumberjackingprospectorstool); // items that don't accept uses need to be handled like this * m_House.LumberjackingProspectorsTool = ( 0 ); * m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); * } * else * { * m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); * m_House.BeginCombine( m_From ); * }*/ } else if (info.ButtonID == 13) { if (m_House.Lumberjacking > 0) { Hatchet lumberjacking = new Hatchet(); // items that don't accept uses need to be handled like this lumberjacking.UsesRemaining = m_House.Lumberjacking; // items that don't accept uses need to be handled like this m_From.AddToBackpack(lumberjacking); // items that don't accept uses need to be handled like this lumberjacking.ShowUsesRemaining = true; m_House.Lumberjacking = (0); m_From.SendGump(new ToolHouseGump(m_From, m_House)); } else { m_From.SendGump(new ToolHouseGump(m_From, m_House)); m_House.BeginCombine(m_From); } } else if (info.ButtonID == 14) { if (m_House.Cooking > 0) { m_From.AddToBackpack(new Skillet(m_House.Cooking)); m_House.Cooking = (0); m_From.SendGump(new ToolHouseGump(m_From, m_House)); } else { m_From.SendGump(new ToolHouseGump(m_From, m_House)); m_House.BeginCombine(m_From); } } else if (info.ButtonID == 15) { if (m_House.Cartography > 0) { m_From.AddToBackpack(new MapmakersPen(m_House.Cartography)); m_House.Cartography = (0); m_From.SendGump(new ToolHouseGump(m_From, m_House)); } else { m_From.SendGump(new ToolHouseGump(m_From, m_House)); m_House.BeginCombine(m_From); } } else if (info.ButtonID == 16) { if (m_House.Glassblowing > 0) { m_From.AddToBackpack(new Blowpipe(m_House.Glassblowing)); m_House.Glassblowing = (0); m_From.SendGump(new ToolHouseGump(m_From, m_House)); } else { m_From.SendGump(new ToolHouseGump(m_From, m_House)); m_House.BeginCombine(m_From); } } else if (info.ButtonID == 17) { if (m_House.TaxidermyKit > 0) { m_From.AddToBackpack(new TaxidermyKit()); // have 1 time use m_House.TaxidermyKit = (m_House.TaxidermyKit - 1); // have 1 time use m_From.SendGump(new ToolHouseGump(m_From, m_House)); } else { m_From.SendGump(new ToolHouseGump(m_From, m_House)); m_House.BeginCombine(m_From); } /*} * else if ( info.ButtonID == 18 ) * { * if ( m_House.GargoylesAxe > 0 ) * { * m_From.AddToBackpack( new GargoylesAxe(m_House.GargoylesAxe) ); * m_House.GargoylesAxe = ( 0 ); * m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); * } * else * { * m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); * m_House.BeginCombine( m_From ); * } * } * else if ( info.ButtonID == 19 ) * { * if ( m_House.GargoylesKnife > 0 ) * { * m_From.AddToBackpack( new GargoylesKnife(m_House.GargoylesKnife) ); * m_House.GargoylesKnife = ( 0 ); * m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); * } * else * { * m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); * m_House.BeginCombine( m_From ); * }*/ } /// else if ( info.ButtonID == 20 ) /// { /// if ( m_House.Brush > 0 ) /// { /// m_From.AddToBackpack( new Brush(m_House.Brush) ); /// m_House.Brush = ( 0 ); /// m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); /// } /// else /// { /// m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); /// m_House.BeginCombine( m_From ); /// } /// } else if (info.ButtonID == 21) { m_From.SendGump(new ToolHouseGump(m_From, m_House)); m_House.BeginCombine(m_From); } }
public AmazonTreeSettlementTreasureChest() : base(0xE43) { Name = "a treasure chest -10-"; Movable = true; Weight = 1000.0; TrapPower = 0; Locked = true; RequiredSkill = 10; LockLevel = 10; MaxLockLevel = 15; // Gold if (Utility.RandomDouble() < 0.25) { DropItem(new Gold(Utility.Random(15, 200))); } /////////////////////////////////////// Supplies if (Utility.RandomDouble() < 0.10) { DropItem(new Arrow(Utility.Random(2, 6))); } if (Utility.RandomDouble() < 0.10) { DropItem(new Bolt(Utility.Random(2, 6))); } Item ReagentLoot = Loot.RandomReagent(); ReagentLoot.Amount = Utility.Random(2, 6); DropItem(ReagentLoot); if (Utility.RandomDouble() < 0.10) { DropItem(new Bandage(Utility.Random(2, 6))); } if (Utility.RandomDouble() < 0.10) { DropItem(new Bedroll()); } if (Utility.RandomDouble() < 0.10) { DropItem(new Bottle(Utility.Random(2, 6))); } if (Utility.RandomDouble() < 0.10) { DropItem(new Lockpick(Utility.Random(2, 6))); } Item PotionLoot = Loot.RandomPotion(); DropItem(PotionLoot); /////////////////////////////////////// Tools if (Utility.RandomDouble() < 0.10) { DropItem(new FishingPole()); } if (Utility.RandomDouble() < 0.10) { DropItem(new Shovel()); } if (Utility.RandomDouble() < 0.10) { DropItem(new Skillet()); } /////////////////////////////////////// Rare Items if (Utility.RandomDouble() < 0.01) { DropItem(new DyeTub()); } if (Utility.RandomDouble() < 0.05) { DropItem(new AmazonianFighterBelt()); } if (Utility.RandomDouble() < 0.05) { DropItem(new AmazonianFighterBoots()); } if (Utility.RandomDouble() < 0.05) { DropItem(new AmazonianFighterBustier()); } if (Utility.RandomDouble() < 0.05) { DropItem(new AmazonianFighterGloves()); } if (Utility.RandomDouble() < 0.05) { DropItem(new AmazonianFighterHelmet()); } if (Utility.RandomDouble() < 0.10) { BaseWeapon weapon = Loot.RandomWeapon(true); switch (Utility.Random(21)) { case 0: weapon = new Hatchet(); break; case 1: weapon = new Bow(); break; case 2: weapon = new Crossbow(); break; case 3: weapon = new Club(); break; case 4: weapon = new Mace(); break; case 5: weapon = new Maul(); break; case 6: weapon = new Pitchfork(); break; case 7: weapon = new ShortSpear(); break; case 8: weapon = new GnarledStaff(); break; case 9: weapon = new ShepherdsCrook(); break; case 10: weapon = new Cutlass(); break; case 11: weapon = new Katana(); break; case 12: weapon = new Kryss(); break; case 13: weapon = new Scimitar(); break; case 14: weapon = new AssassinSpike(); break; case 15: weapon = new DiamondMace(); break; case 16: weapon = new Leafblade(); break; case 17: weapon = new MagicalShortbow(); break; case 18: weapon = new RadiantScimitar(); break; case 19: weapon = new WildStaff(); break; default: weapon = new Dagger(); break; } BaseRunicTool.ApplyAttributesTo(weapon, 2, 10, 15); weapon.DamageLevel = (WeaponDamageLevel)Utility.Random(2); weapon.AccuracyLevel = (WeaponAccuracyLevel)Utility.Random(2); weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random(2); weapon.Quality = WeaponQuality.Regular; DropItem(weapon); } if (Utility.RandomDouble() < 0.10) { BaseArmor armor = Loot.RandomArmor(true); switch (Utility.Random(10)) { case 0: armor = new FemaleLeatherChest(); break; case 1: armor = new LeatherBustierArms(); break; case 2: armor = new LeatherArms(); break; case 3: armor = new LeatherCap(); break; case 4: armor = new LeatherGloves(); break; case 5: armor = new LeatherGorget(); break; case 6: armor = new LeatherLegs(); break; case 7: armor = new LeatherShorts(); break; case 8: armor = new LeatherSkirt(); break; default: armor = new LeatherChest(); break; } BaseRunicTool.ApplyAttributesTo(armor, 3, 10, 15); armor.ProtectionLevel = (ArmorProtectionLevel)Utility.Random(3); armor.Durability = (ArmorDurabilityLevel)Utility.Random(3); armor.Quality = ArmorQuality.Regular; DropItem(armor); } if (Utility.RandomDouble() < 0.10) { BaseHat hat = Loot.RandomHat(true); switch (Utility.Random(5)) { case 0: hat = new BearMask(); break; case 1: hat = new DeerMask(); break; case 2: hat = new FeatheredHat(); break; case 3: hat = new WizardsHat(); break; default: hat = new TribalMask(); break; } BaseRunicTool.ApplyAttributesTo(hat, 3, 10, 15); DropItem(hat); } if (Utility.RandomDouble() < 0.10) { BaseClothing clothing = Loot.RandomClothing(true); BaseRunicTool.ApplyAttributesTo(clothing, 3, 10, 15); DropItem(clothing); } if (Utility.RandomDouble() < 0.10) { BaseShield shield = new MetalShield(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(shield, 3, 10, 15); } DropItem(shield); } if (Utility.RandomDouble() < 0.10) { BaseJewel bracelet = new GoldBracelet(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(bracelet, 3, 10, 15); } DropItem(bracelet); } if (Utility.RandomDouble() < 0.10) { BaseJewel earrings = new GoldEarrings(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(earrings, 3, 10, 15); } DropItem(earrings); } if (Utility.RandomDouble() < 0.10) { BaseJewel necklace = new GoldNecklace(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(necklace, 3, 10, 15); } DropItem(necklace); } if (Utility.RandomDouble() < 0.10) { BaseJewel ring = new GoldRing(); if (Core.AOS) { BaseRunicTool.ApplyAttributesTo(ring, 3, 10, 15); } DropItem(ring); } }
private void Process( Mobile from ) { Item rewardItem; switch( m_Skill.SkillID ) { case 0: // alchemy rewardItem = new MortarPestle(); break; case 7: // Blacksmithy rewardItem = new GMSmithHammer(); break; case 8: // Bowcraft/fletching rewardItem = new Bow(); break; case 11: // Carpentry switch (m_Itemid) { case 4138: rewardItem = new Hammer(); break; case 4148: rewardItem = new Saw(); break; case 4146: rewardItem = new SmoothingPlane(); break; case 4325: rewardItem = new Froe(); break; case 4326: rewardItem = new Inshave(); break; case 4324: rewardItem = new DrawKnife(); break; default: return; } break; case 23: // Inscription rewardItem = new ScribesPen(); break; case 25: // Magery rewardItem = new Spellbook(); ( rewardItem as Spellbook ).Content = ulong.MaxValue; (rewardItem as Spellbook).LootType = LootType.Blessed; break; case 34: // Tailoring rewardItem = new RewardDyeTub(); break; case 35: // Animal Taming rewardItem = new ShepherdsCrook(); break; case 44: //Lumberjacking rewardItem = new Hatchet(); break; case 45: // Mining rewardItem = new Pickaxe(); break; //Bardic skills case 9: case 15: case 22: case 29: switch (m_Itemid) { case 3740: rewardItem = new Drums(); break; case 3761: rewardItem = new Harp(); break; case 3762: rewardItem = new LapHarp(); break; case 3763: rewardItem = new Lute(); break; case 3741: rewardItem = new Tambourine(); break; case 3742: rewardItem = new TambourineTassel(); break; default: return; } break; //"Thieving" skills case 21: case 28: case 33: case 47: rewardItem = new Cloak(); break; default: return; } rewardItem.Hue = m_CurrentHue; rewardItem.LootType = LootType.Blessed; if( m_Name != "" ) rewardItem.Name = m_Name; if( rewardItem is RewardDyeTub ) { var tub = (RewardDyeTub)rewardItem; tub.DyedHue = rewardItem.Hue; tub.Redyable = false; tub.LootType = LootType.Blessed; tub.Owner = from; } else if( rewardItem is GMSmithHammer ) { var hammer = (GMSmithHammer)rewardItem; hammer.Owner = from; } from.AddToBackpack( rewardItem ); // Log RewardLogging.WriteLine( from, m_Skill, m_Name, m_CurrentHue ); }
public override void OnResponse( NetState sender, RelayInfo info ) { if ( m_House.Deleted ) return; else if ( info.ButtonID == 1 ) { if ( m_House.SewingKit > 0 ) { m_From.AddToBackpack( new SewingKit(m_House.SewingKit) ); m_House.SewingKit = ( 0 ); m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); } else { m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); m_House.BeginCombine( m_From ); } } else if ( info.ButtonID == 2 ) { if ( m_House.MortarPestle > 0 ) { m_From.AddToBackpack( new MortarPestle(m_House.MortarPestle) ); m_House.MortarPestle = ( 0 ); m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); } else { m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); m_House.BeginCombine( m_From ); } } else if ( info.ButtonID == 3 ) { if ( m_House.ScribesPen > 0 ) { m_From.AddToBackpack( new ScribesPen(m_House.ScribesPen) ); m_House.ScribesPen = ( 0 ); m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); } else { m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); m_House.BeginCombine( m_From ); } } else if ( info.ButtonID == 4 ) { if ( m_House.MalletAndChisel > 0 ) { m_From.AddToBackpack( new MalletAndChisel(m_House.MalletAndChisel) ); m_House.MalletAndChisel = ( 0 ); m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); } else { m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); m_House.BeginCombine( m_From ); } } else if ( info.ButtonID == 5 ) { if ( m_House.Carpentry > 0 ) { m_From.AddToBackpack( new Hammer(m_House.Carpentry) ); m_House.Carpentry = ( 0 ); m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); } else { m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); m_House.BeginCombine( m_From ); } } else if ( info.ButtonID == 6 ) { if ( m_House.FletcherTools > 0 ) { m_From.AddToBackpack( new FletcherTools(m_House.FletcherTools) ); m_House.FletcherTools = ( 0 ); m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); } else { m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); m_House.BeginCombine( m_From ); } } else if ( info.ButtonID == 7 ) { if ( m_House.TinkerTools > 0 ) { m_From.AddToBackpack( new TinkerTools(m_House.TinkerTools) ); m_House.TinkerTools = ( 0 ); m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); } else { m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); m_House.BeginCombine( m_From ); } } else if ( info.ButtonID == 8 ) { if ( m_House.BlackSmith > 0 ) { m_From.AddToBackpack( new SmithHammer(m_House.BlackSmith) ); m_House.BlackSmith = ( 0 ); m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); } else { m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); m_House.BeginCombine( m_From ); } } else if ( info.ButtonID == 9 ) { if ( m_House.Shovel > 0 ) { m_From.AddToBackpack( new Shovel(m_House.Shovel) ); m_House.Shovel = ( 0 ); m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); } else { m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); m_House.BeginCombine( m_From ); } } else if ( info.ButtonID == 10 ) { if ( m_House.GargoylesPickaxe > 0 ) { GargoylesPickaxe gargoylesPickaxe = new GargoylesPickaxe(); // items that don't accept uses need to be handled like this gargoylesPickaxe.UsesRemaining = m_House.GargoylesPickaxe; // items that don't accept uses need to be handled like this m_From.AddToBackpack(gargoylesPickaxe); // items that don't accept uses need to be handled like this m_House.GargoylesPickaxe = ( 0 ); m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); } else { m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); m_House.BeginCombine( m_From ); } } else if ( info.ButtonID == 11 ) { if ( m_House.ProspectorsTool > 0 ) { ProspectorsTool prospectorstool = new ProspectorsTool(); // items that don't accept uses need to be handled like this prospectorstool.UsesRemaining = m_House.ProspectorsTool; // items that don't accept uses need to be handled like this m_From.AddToBackpack(prospectorstool); // items that don't accept uses need to be handled like this m_House.ProspectorsTool = ( 0 ); m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); } else { m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); m_House.BeginCombine( m_From ); } /*else if ( info.ButtonID == 12 ) { if ( m_House.LumberjackingProspectorsTool > 0 ) { LumberjackingProspectorsTool lumberjackingprospectorstool = new LumberjackingProspectorsTool(); // items that don't accept uses need to be handled like this lumberjackingprospectorstool.UsesRemaining = m_House.LumberjackingProspectorsTool; // items that don't accept uses need to be handled like this m_From.AddToBackpack(lumberjackingprospectorstool); // items that don't accept uses need to be handled like this m_House.LumberjackingProspectorsTool = ( 0 ); m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); } else { m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); m_House.BeginCombine( m_From ); }*/ } else if ( info.ButtonID == 13 ) { if ( m_House.Lumberjacking > 0 ) { Hatchet lumberjacking = new Hatchet(); // items that don't accept uses need to be handled like this lumberjacking.UsesRemaining = m_House.Lumberjacking; // items that don't accept uses need to be handled like this m_From.AddToBackpack(lumberjacking); // items that don't accept uses need to be handled like this lumberjacking.ShowUsesRemaining = true; m_House.Lumberjacking = ( 0 ); m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); } else { m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); m_House.BeginCombine( m_From ); } } else if ( info.ButtonID == 14 ) { if ( m_House.Cooking > 0 ) { m_From.AddToBackpack( new Skillet(m_House.Cooking) ); m_House.Cooking = ( 0 ); m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); } else { m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); m_House.BeginCombine( m_From ); } } else if ( info.ButtonID == 15 ) { if ( m_House.Cartography > 0 ) { m_From.AddToBackpack( new MapmakersPen(m_House.Cartography) ); m_House.Cartography = ( 0 ); m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); } else { m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); m_House.BeginCombine( m_From ); } } else if ( info.ButtonID == 16 ) { if ( m_House.Glassblowing > 0 ) { m_From.AddToBackpack( new Blowpipe(m_House.Glassblowing) ); m_House.Glassblowing = ( 0 ); m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); } else { m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); m_House.BeginCombine( m_From ); } } else if ( info.ButtonID == 17 ) { if ( m_House.TaxidermyKit > 0 ) { m_From.AddToBackpack( new TaxidermyKit() ); // have 1 time use m_House.TaxidermyKit = ( m_House.TaxidermyKit - 1 ); // have 1 time use m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); } else { m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); m_House.BeginCombine( m_From ); } /*} else if ( info.ButtonID == 18 ) { if ( m_House.GargoylesAxe > 0 ) { m_From.AddToBackpack( new GargoylesAxe(m_House.GargoylesAxe) ); m_House.GargoylesAxe = ( 0 ); m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); } else { m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); m_House.BeginCombine( m_From ); } } else if ( info.ButtonID == 19 ) { if ( m_House.GargoylesKnife > 0 ) { m_From.AddToBackpack( new GargoylesKnife(m_House.GargoylesKnife) ); m_House.GargoylesKnife = ( 0 ); m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); } else { m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); m_House.BeginCombine( m_From ); }*/ } /// else if ( info.ButtonID == 20 ) /// { /// if ( m_House.Brush > 0 ) /// { /// m_From.AddToBackpack( new Brush(m_House.Brush) ); /// m_House.Brush = ( 0 ); /// m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); /// } /// else /// { /// m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); /// m_House.BeginCombine( m_From ); /// } /// } else if ( info.ButtonID == 21 ) { m_From.SendGump( new ToolHouseGump( m_From, m_House ) ); m_House.BeginCombine( m_From ); } }
public ZaythalorFarmHouseTreasureChest() : base(0xE43) { Name = "a treasure chest"; Movable = true; Weight = 1000.0; TrapPower = 0; Locked = false; RequiredSkill = 0; LockLevel = 0; MaxLockLevel = this.RequiredSkill; // Gold if (Utility.RandomDouble() < 0.25) { DropItem(new Gold(Utility.Random(25, 50))); } DropItem(new OneGoldBar()); /////////////////////////////////////// Supplies if (Utility.RandomDouble() < 0.15) { DropItem(new Arrow(Utility.Random(1, 5))); } Item ReagentLoot = Loot.RandomReagent(); ReagentLoot.Amount = Utility.Random(1, 5); DropItem(ReagentLoot); if (Utility.RandomDouble() < 0.15) { DropItem(new Bandage(Utility.Random(1, 5))); } if (Utility.RandomDouble() < 0.15) { DropItem(new Bedroll()); } if (Utility.RandomDouble() < 0.10) { DropItem(new Bottle(Utility.Random(1, 5))); } if (Utility.RandomDouble() < 0.20) { DropItem(new Lockpick(Utility.Random(1, 5))); } Item PotionLoot = Loot.RandomPotion(); DropItem(PotionLoot); /////////////////////////////////////// Tools if (Utility.RandomDouble() < 0.15) { DropItem(new FishingPole()); } if (Utility.RandomDouble() < 0.15) { DropItem(new Shovel()); } if (Utility.RandomDouble() < 0.15) { DropItem(new Skillet()); } /////////////////////////////////////// Rare Items if (Utility.RandomDouble() < 0.15) { DropItem(new FineOpalPendant()); } if (Utility.RandomDouble() < 0.15) { DropItem(new TamersHandbookVol2()); } if (Utility.RandomDouble() < 0.15) { DropItem(new Tanzanite()); } if (Utility.RandomDouble() < 0.15) { DropItem(new CrackedHitFireballGem()); } if (Utility.RandomDouble() < 0.25) { BaseWeapon weapon = Loot.RandomWeapon(true); switch (Utility.Random(7)) { case 0: weapon = new Hatchet(); break; case 1: weapon = new Bow(); break; case 2: weapon = new Club(); break; case 3: weapon = new Pitchfork(); break; case 4: weapon = new GnarledStaff(); break; case 5: weapon = new ShepherdsCrook(); break; default: weapon = new Dagger(); break; } BaseRunicTool.ApplyAttributesTo(weapon, 3, 10, 15); weapon.DamageLevel = (WeaponDamageLevel)Utility.Random(2); weapon.AccuracyLevel = (WeaponAccuracyLevel)Utility.Random(2); weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random(2); weapon.Quality = WeaponQuality.Regular; DropItem(weapon); } }
public override void OnResponse( NetState state, RelayInfo info ) { PlayerMobile m = m_user; ToolBox box = i_box; BaseTool tool; BaseHarvestTool toola; Hatchet toolh; Container pack = m.Backpack; switch ( info.ButtonID ) { default: { break; } case 2: { box.OW( m ); break; } case 3: { tool = new Tongs(); tool.UsesRemaining = box.i_S; pack.DropItem( tool ); box.i_S = 0; break; } case 4: { tool = new MouldingPlane(); tool.UsesRemaining = box.i_C; pack.DropItem( tool ); box.i_C = 0; break; } case 5: { tool = new TinkerTools(); tool.UsesRemaining = box.i_Ti; pack.DropItem( tool ); box.i_Ti = 0; break; } case 6: { tool = new SewingKit(); tool.UsesRemaining = box.i_T; pack.DropItem( tool ); box.i_T = 0; break; } case 7: { toolh = new Hatchet(); toolh.UsesRemaining = box.i_L; pack.DropItem( toolh ); box.i_L = 0; break; } case 8: { tool = new ScribesPen(); tool.UsesRemaining = box.i_Sc; pack.DropItem( tool ); box.i_Sc = 0; break; } case 9: { toola = new Shovel(); toola.UsesRemaining = box.i_M; pack.DropItem( toola ); box.i_M = 0; break; } case 10: { tool = new Skillet(); tool.UsesRemaining = box.i_Co; pack.DropItem( tool ); box.i_Co = 0; break; } case 11: { tool = new FletcherTools(); tool.UsesRemaining = box.i_F; pack.DropItem( tool ); box.i_F = 0; break; } case 12: { tool = new MortarPestle(); tool.UsesRemaining = box.i_A; pack.DropItem( tool ); box.i_A = 0; break; } case 13: { tool = new MalletAndChisel(); tool.UsesRemaining = box.i_St; pack.DropItem( tool ); box.i_St = 0; break; } case 14: { tool = new MapmakersPen(); tool.UsesRemaining = box.i_Ca; pack.DropItem( tool ); box.i_Ca = 0; break; } case 15: { GargoylesPickaxe item = new GargoylesPickaxe(); item.UsesRemaining = box.i_Garg; pack.DropItem(item); box.i_Garg = 0; break; } case 16: { ProspectorsTool item = new ProspectorsTool(); item.UsesRemaining = box.i_Pros; pack.DropItem(item); box.i_Pros = 0; break; } case 17: { Blowpipe item = new Blowpipe(); item.UsesRemaining = box.i_G; pack.DropItem(item); box.i_G = 0; break; } } if ( info.ButtonID > 2 ) { box.NG( m, box ); } }
public SpawnHelperMage() : base( AIType.AI_Mage, FightMode.Closest, 25, 1, 0.4, 0.3 ) { Title = "[BEC-Mage]"; if ( Female = Utility.RandomBool() ) { Body = 401; Name = NameList.RandomName( "female" ); } else { Body = 400; Name = NameList.RandomName( "male" ); } // Name.Hue = 2002; // Title.Hue = 2002; SetStr(100, 150); SetDex(100, 150); SetInt(250, 500); ActiveSpeed = 0.2; PassiveSpeed = 0; SetHits(200, 300); // SetDamage(12, 19); SetDamageType(ResistanceType.Physical, 120); SetResistance(ResistanceType.Physical, 65, 80); SetResistance(ResistanceType.Fire, 65, 80); SetResistance(ResistanceType.Cold, 65, 80); SetResistance(ResistanceType.Poison, 65, 80); SetResistance(ResistanceType.Energy, 65, 80); SetSkill(SkillName.Swords, 89.0, 120.0); SetSkill(SkillName.Tactics, 89.0, 120.0); SetSkill(SkillName.MagicResist, 89.0, 120.0); SetSkill(SkillName.Tactics, 89.0, 120.0); SetSkill(SkillName.Parry, 89.0, 120.0); SetSkill(SkillName.Anatomy, 85.0, 120.0); SetSkill(SkillName.Healing, 85.0, 120.0); SetSkill(SkillName.Magery, 99.0, 120.0); SetSkill(SkillName.EvalInt, 99.0, 120.0); SetSkill(SkillName.Poisoning, 85.0, 100.0); Fame = 18000; Karma = 10000; VirtualArmor = 50; switch (Utility.Random(4)) { case 0: BattleAxe weapona = new BattleAxe(); weapona.Hue = 2063; weapona.LootType = LootType.Newbied; weapona.Attributes.SpellChanneling = 1; weapona.WeaponAttributes.HitLeechMana = 60; weapona.Movable = false; AddItem( weapona ); break; case 1: Axe weaponb = new Axe(); weaponb.Hue = 2063; weaponb.LootType = LootType.Newbied; weaponb.Attributes.SpellChanneling = 1; weaponb.WeaponAttributes.HitLeechMana = 60; weaponb.Movable = false; AddItem( weaponb ); break; case 2: Bardiche weaponc = new Bardiche(); weaponc.Hue = 2063; weaponc.LootType = LootType.Newbied; weaponc.Attributes.SpellChanneling = 1; weaponc.WeaponAttributes.HitLeechMana = 60; weaponc.Movable = false; AddItem( weaponc ); break; case 3: Hatchet weapond = new Hatchet(); weapond.Hue = 2063; weapond.LootType = LootType.Newbied; weapond.Attributes.SpellChanneling = 1; weapond.WeaponAttributes.HitLeechMana = 60; weapond.Movable = false; AddItem( weapond ); break; } Item Robe = new Robe( ); Robe.Name = "Britania Electric Co."; Robe.Movable = false; Robe.Hue = 1109; AddItem( Robe ); switch (Utility.Random(3)) { case 0: AddItem( new LongPants(1050)); break; case 1: Item LegsOfBane = new LeggingsOfBane(); LegsOfBane.Hue = 1269; LegsOfBane.LootType = LootType.Newbied; LegsOfBane.Movable = false; AddItem( LegsOfBane ); break; case 2: break; } switch (Utility.Random(3)) { case 0: AddItem( new Boots() ); break; case 1: Item Sandals = new Sandals(); Sandals.Hue = 1195; Sandals.LootType = LootType.Blessed; Sandals.Movable = false; AddItem( Sandals ); break; case 2: break; } Item PlateHelm = new PlateHelm(); PlateHelm.Hue = 2063; PlateHelm.LootType = LootType.Newbied; PlateHelm.Movable = false; AddItem( PlateHelm ); switch (Utility.Random(3)) { case 0: AddItem( new LeatherGloves() ); break; case 1: break; case 2: break; } AddItem( new Shirt(743) ); Utility.AssignRandomHair( this ); for (int i = 0; i < 10; i++) { PackItem( new GreaterCurePotion() ); PackItem( new GreaterHealPotion() ); PackItem( new TotalRefreshPotion() ); } PackItem(new Bandage(Utility.RandomMinMax(80, 200))); Horse ns = new Horse(); ns.Controlled = true; ns.Hue = 2063; ns.ControlMaster = this; ns.ControlOrder = OrderType.Stay; ns.Rider = this; }
public TownChestWeaponsmith() : base(0xE43) { Name = "a metal chest -20-"; Movable = true; Weight = 1000.0; Hue = 83; TrapPower = 0; Locked = true; RequiredSkill = 20; LockLevel = 20; MaxLockLevel = 25; // Gold if (Utility.RandomDouble() < 0.25) { DropItem(new Gold(Utility.Random(1, 50))); } // Supplies if (Utility.RandomDouble() < 0.10) { DropItem(new Axe()); } if (Utility.RandomDouble() < 0.05) { DropItem(new DoubleAxe()); } if (Utility.RandomDouble() < 0.10) { DropItem(new LargeBattleAxe()); } if (Utility.RandomDouble() < 0.10) { DropItem(new Mace()); } if (Utility.RandomDouble() < 0.10) { DropItem(new Maul()); } if (Utility.RandomDouble() < 0.10) { DropItem(new WarMace()); } if (Utility.RandomDouble() < 0.10) { DropItem(new ShortSpear()); } if (Utility.RandomDouble() < 0.10) { DropItem(new Spear()); } if (Utility.RandomDouble() < 0.10) { DropItem(new Longsword()); } if (Utility.RandomDouble() < 0.10) { DropItem(new Scimitar()); } if (Utility.RandomDouble() < 0.10) { DropItem(new Arrow(Utility.Random(25, 30))); } /////////////////////////////////////// Rare Items if (Utility.RandomDouble() < 0.15) { BaseWeapon weapon = Loot.RandomWeapon(true); switch (Utility.Random(38)) { case 0: weapon = new Hatchet(); break; case 1: weapon = new Bow(); break; case 2: weapon = new Crossbow(); break; case 3: weapon = new Club(); break; case 4: weapon = new Mace(); break; case 5: weapon = new Maul(); break; case 6: weapon = new Pitchfork(); break; case 7: weapon = new ShortSpear(); break; case 8: weapon = new GnarledStaff(); break; case 9: weapon = new ShepherdsCrook(); break; case 10: weapon = new Cutlass(); break; case 11: weapon = new Katana(); break; case 12: weapon = new Kryss(); break; case 13: weapon = new Scimitar(); break; case 14: weapon = new AssassinSpike(); break; case 15: weapon = new DiamondMace(); break; case 16: weapon = new Leafblade(); break; case 17: weapon = new MagicalShortbow(); break; case 18: weapon = new RadiantScimitar(); break; case 19: weapon = new WildStaff(); break; case 20: weapon = new Axe(); break; case 21: weapon = new ExecutionersAxe(); break; case 22: weapon = new Pickaxe(); break; case 23: weapon = new TwoHandedAxe(); break; case 24: weapon = new WarAxe(); break; case 25: weapon = new HeavyCrossbow(); break; case 26: weapon = new HammerPick(); break; case 27: weapon = new WarMace(); break; case 28: weapon = new Spear(); break; case 29: weapon = new WarFork(); break; case 30: weapon = new BlackStaff(); break; case 31: weapon = new QuarterStaff(); break; case 32: weapon = new Longsword(); break; case 33: weapon = new ElvenCompositeLongbow(); break; case 34: weapon = new ElvenMachete(); break; case 35: weapon = new ElvenSpellblade(); break; case 36: weapon = new RuneBlade(); break; default: weapon = new Dagger(); break; } BaseRunicTool.ApplyAttributesTo(weapon, 5, 15, 20); DropItem(weapon); } }