public override void OnResponse(NetState state, RelayInfo info) { Mobile from = state.Mobile; switch (info.ButtonID) { case 0: { from.CloseGump(typeof(RunicGump)); break; } case 1: { Item item = new RunicHammer(CraftResource.DullCopper, 100); item.LootType = LootType.Blessed; from.AddToBackpack(item); break; } case 2: { Item item = new RunicHammer(CraftResource.ShadowIron, 100); item.LootType = LootType.Blessed; from.AddToBackpack(item); break; } case 3: { Item item = new RunicHammer(CraftResource.Copper, 100); item.LootType = LootType.Blessed; from.AddToBackpack(item); break; } case 4: { Item item = new RunicHammer(CraftResource.Bronze, 100); item.LootType = LootType.Blessed; from.AddToBackpack(item); break; } case 5: { Item item = new RunicHammer(CraftResource.Gold, 100); item.LootType = LootType.Blessed; from.AddToBackpack(item); break; } case 6: { Item item = new RunicHammer(CraftResource.Agapite, 100); item.LootType = LootType.Blessed; from.AddToBackpack(item); break; } case 7: { Item item = new RunicHammer(CraftResource.Verite, 100); item.LootType = LootType.Blessed; from.AddToBackpack(item); break; } case 8: { Item item = new RunicHammer(CraftResource.Valorite, 100); item.LootType = LootType.Blessed; from.AddToBackpack(item); break; } case 9: { Item item = new RunicSewingKit(CraftResource.SpinedLeather, 100); item.LootType = LootType.Blessed; from.AddToBackpack(item); break; } case 10: { Item item = new RunicSewingKit(CraftResource.HornedLeather, 100); item.LootType = LootType.Blessed; from.AddToBackpack(item); break; } case 11: { Item item = new RunicSewingKit(CraftResource.BarbedLeather, 100); item.LootType = LootType.Blessed; from.AddToBackpack(item); break; } case 12: { Item item = new RunicBag(); from.AddToBackpack(item); break; } } }
public void CreateLoot() { int chance = Utility.Random( 100 ); Item m_Reward = null; if ( chance < 3 ) m_Reward = new NameChangeDeed(); else if ( chance < 33 ) m_Reward = new PowerScroll( PowerScroll.Skills[Utility.Random(PowerScroll.Skills.Count)], (100+(Utility.Random(3)+2)*5) ); else if ( chance < 50 ) m_Reward = new StatCapScroll( (225+(Utility.Random(2)+1)*5) ); else if ( chance < 55 ) m_Reward = new MagicSewingKit(); else if ( chance < 60 ) m_Reward = new ClothingBlessDeed(); else if ( chance < 70 ) m_Reward = new RunicSewingKit(CraftResource.BarbedLeather, ( Utility.Random( 2 ) + 3 ) ); else { int amount = Utility.RandomMinMax( 5, 10 )*10000; m_Reward = new BankCheck(amount); } PackItem( new CopperBar(Utility.Random( 2 ) + 2) ); if (m_Reward != null) { PackItem( m_Reward ); Timer m_TimerCursed = new CursedArtifactSystem.CursedTimer( m_Reward, 6 ); m_TimerCursed.Start(); } }
public override void OnDeath(Container c) { List<DamageStore> rights = BaseCreature.GetLootingRights(this.DamageEntries, this.HitsMax); List<Mobile> toGive = new List<Mobile>(); for (int i = rights.Count - 1; i >= 0; --i) { DamageStore ds = rights[i]; if (ds.m_HasRight) toGive.Add(ds.m_Mobile); } int chance = Utility.Random(100); //World.Broadcast(0x35, true, "{0}is the roll", chance); if (toGive.Count > 0) { Mobile rewardmob = toGive[Utility.Random(toGive.Count)]; Mobile weapmob = toGive[Utility.Random(toGive.Count)]; if (rewardmob is PlayerMobile) { Mobile m = (Mobile)rewardmob; } if (chance < 3) { RunicHammer hammer = new RunicHammer(CraftResource.Valorite, Utility.Random(5) + 8); hammer.LootType = LootType.Cursed; rewardmob.AddToBackpack(hammer); World.Broadcast(0x35, true, "{0} was rewarded with runic hammer", rewardmob.Name); } else if (chance < 5) { RunicSewingKit kit = new RunicSewingKit(CraftResource.BarbedLeather, Utility.Random(5) + 8); kit.LootType = LootType.Cursed; rewardmob.AddToBackpack(kit); World.Broadcast(0x35, true, "{0} was rewarded with runic sewing kit", rewardmob.Name); } else if (chance < 25) { rewardmob.AddToBackpack(new CopperBar(Utility.Random(2) + 2)); rewardmob.SendMessage("You have been rewarded with copper bars"); } } else { if (chance < 40) c.DropItem(new CopperBar(Utility.Random(2) + 1)); } if (!Summoned && !NoKillAwards && DemonKnight.CheckArtifactChance(this)) DemonKnight.DistributeArtifact(this); base.OnDeath(c); }
public override void OnResponse( NetState state, RelayInfo info ) { Mobile from = state.Mobile; switch( info.ButtonID ) { case 0: { from.CloseGump( typeof( RunicGump ) ); break; } case 1: { Item item = new RunicHammer( CraftResource.DullCopper, 100 ); item.LootType = LootType.Blessed; from.AddToBackpack( item ); break; } case 2: { Item item = new RunicHammer( CraftResource.ShadowIron, 100 ); item.LootType = LootType.Blessed; from.AddToBackpack( item ); break; } case 3: { Item item = new RunicHammer( CraftResource.Copper, 100 ); item.LootType = LootType.Blessed; from.AddToBackpack( item ); break; } case 4: { Item item = new RunicHammer( CraftResource.Bronze, 100 ); item.LootType = LootType.Blessed; from.AddToBackpack( item ); break; } case 5: { Item item = new RunicHammer( CraftResource.Gold, 100 ); item.LootType = LootType.Blessed; from.AddToBackpack( item ); break; } case 6: { Item item = new RunicHammer( CraftResource.Agapite, 100 ); item.LootType = LootType.Blessed; from.AddToBackpack( item ); break; } case 7: { Item item = new RunicHammer( CraftResource.Verite, 100 ); item.LootType = LootType.Blessed; from.AddToBackpack( item ); break; } case 8: { Item item = new RunicHammer( CraftResource.Valorite, 100 ); item.LootType = LootType.Blessed; from.AddToBackpack( item ); break; } case 9: { Item item = new RunicSewingKit( CraftResource.SpinedLeather, 100 ); item.LootType = LootType.Blessed; from.AddToBackpack( item ); break; } case 10: { Item item = new RunicSewingKit( CraftResource.HornedLeather, 100 ); item.LootType = LootType.Blessed; from.AddToBackpack( item ); break; } case 11: { Item item = new RunicSewingKit( CraftResource.BarbedLeather, 100 ); item.LootType = LootType.Blessed; from.AddToBackpack( item ); break; } case 12: { Item item = new RunicBag(); from.AddToBackpack( item ); break; } } }