public override void OnResponse(NetState sender, RelayInfo info) { if (m_Ticket == null || m_Ticket.Deleted || !m_Ticket.IsChildOf(sender.Mobile.Backpack)) { return; } //int number = 0; Item item = null; Item item2 = null; switch (info.ButtonID) { case 1: item = new EtherealHorse(); /*number = 1049368;*/ break; // You have been rewarded for your dedication to Justice!. case 2: item = new EtherealLlama(); /*number = 1049368;*/ break; // You have been rewarded for your dedication to Justice!. case 3: item = new EtherealOstard(); /*number = 1049368;*/ break; // You have been rewarded for your dedication to Justice!. case 4: item = new BlackHairDye(); /*number = 1049368;*/ break; // You have been rewarded for your dedication to Justice!. case 5: item = new HoodedShroudOfShadows(); /*number = 1049368;*/ break; // You have been rewarded for your dedication to Justice!. case 6: item = new DyeTub(); item2 = new Dyes(); /*number = 1049368;*/ break; // You have been rewarded for your dedication to Justice!. } if (item != null) { m_Ticket.Delete(); //m_From.SendLocalizedMessage( number ); m_From.AddToBackpack(item); if (item2 != null) { m_From.AddToBackpack(item2); } } }
public override void OnResponse(NetState state, RelayInfo info) { Mobile from = state.Mobile; switch (info.ButtonID) { case 0: { from.CloseGump(typeof(MyLegacyTokenGump)); break; } case 1: { Item item = new EtherealLlama(); from.AddToBackpack(item); from.CloseGump(typeof(MyLegacyTokenGump)); m_Deed.Delete(); break; } case 2: { Item item = new EtherealHorse(); from.AddToBackpack(item); from.CloseGump(typeof(MyLegacyTokenGump)); m_Deed.Delete(); break; } case 3: { Item item = new EtherealOstard(); from.AddToBackpack(item); from.CloseGump(typeof(MyLegacyTokenGump)); m_Deed.Delete(); break; } } }
public void OnOptionSelected(Mobile from, int option) { if (!Deleted) { Item item = null; switch (option) { case 1: item = new EtherealHorse(); break; case 2: item = new EtherealLlama(); break; case 3: item = new EtherealOstard(); break; case 4: item = new EtherealForestOstard(); break; case 5: item = new EtherealFrenziedOstard(); break; } //Donation item has been claimed from.Backpack.DropItem(item); Consume(); } }
public override void OnClick() { Race race = ((Player)pm).Race; switch (race) { case Race.Ogre: { pm.Target = new OgreTarget(); pm.SendMessage("Target a creature to bash!"); break; } case Race.Terathan: { mobList = new List <Mobile>(); foreach (Mobile mobile in pm.GetMobilesInRange(8)) { if (mobile.AccessLevel > pm.AccessLevel) { continue; } else if (mobile.Blessed || !mobile.Alive) { continue; } else if (mobile == pm) { continue; } else { mobList.Add(mobile); } } if (mobList != null) { Timer.DelayCall(TimeSpan.FromSeconds(8.0), new TimerCallback(FinishWebs)); pm.PublicOverheadMessage(MessageType.Regular, pm.EmoteHue, false, "*Begins hurling webs at nearby creatures*"); for (int i = 0; i < mobList.Count; i++) { Mobile m = mobList[i]; if (m is PlayerMobile && 0.51 > Utility.RandomDouble()) { m.SendMessage("You've been struck by a terathan web!"); } m.CantWalk = true; Effects.SendMovingEffect(pm, m, 4308, 0, 10, false, false); } Effects.PlaySound(pm.Location, pm.Map, 0x027); pm.NextRaceAbility = TimeSpan.FromMinutes(1); } break; } case Race.Liche: { if (pm.Followers >= pm.FollowersMax) { pm.SendMessage("You already have too many followers to summon more."); } else { do { BaseCreature bc = null; switch (Utility.Random(3)) { case 0: bc = new Skeleton(); break; case 1: bc = new Zombie(); break; case 2: bc = new Wraith(); break; } if (bc != null && BaseCreature.Summon(bc, true, pm, Point3D.Zero, 0x1E2, TimeSpan.FromMinutes(1.5))) { bc.MoveToWorld(new Point3D(pm.X + Utility.RandomMinMax(1, 3), pm.Y - Utility.RandomMinMax(0, 3), pm.Z), pm.Map); Effects.SendLocationEffect(pm.Location, pm.Map, 0x3709, 15, 945, 0); } }while (pm.Followers < pm.FollowersMax); pm.NextRaceAbility = TimeSpan.FromMinutes(2.0); } break; } case Race.HalfDaemon: { if (pm.AbilityActive) { pm.RaceBody = 0; pm.BodyDamageBonus = 0; pm.AdjustBody(); pm.Str -= 40; pm.Dex -= 20; pm.Int += 60; pm.AbilityActive = false; pm.PublicOverheadMessage(MessageType.Regular, pm.EmoteHue, false, String.Format("*{0} begins to shrink, taking the form of a human*", pm.Name)); } else { for (int x = 1; x <= 2; x++) { Item toDisarm = pm.FindItemOnLayer(Layer.OneHanded); if (toDisarm == null || !toDisarm.Movable) { toDisarm = pm.FindItemOnLayer(Layer.TwoHanded); } Container pack = pm.Backpack; pack.DropItem(toDisarm); } pm.RaceBody = 792; pm.AdjustBody(); pm.BodyDamageBonus = 36; pm.Str += 40; pm.Dex += 20; pm.Int -= 60; pm.AbilityActive = true; pm.PublicOverheadMessage(MessageType.Regular, pm.EmoteHue, false, String.Format("*{0}'s flesh begins to buldge and tear as something emerges from within*", pm.Name)); } break; } case Race.Shapeshifter: { pm.Target = new ShapeshifterTarget(); pm.SendMessage("Select a creature to assume their form."); break; } case Race.Marid: { if (pm.AbilityActive) { pm.AbilityActive = false; pm.CanSwim = false; Effects.SendLocationParticles(EffectItem.Create(pm.Location, pm.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 2023); try { IMount mount = pm.Mount; mount.Rider = null; ((EtherealMount)mount).Delete(); } catch { } } else { for (int x = 1; x <= 2; x++) { Item toDisarm = pm.FindItemOnLayer(Layer.OneHanded); if (toDisarm == null || !toDisarm.Movable) { toDisarm = pm.FindItemOnLayer(Layer.TwoHanded); } Container pack = pm.Backpack; pack.DropItem(toDisarm); } pm.AbilityActive = true; pm.PublicOverheadMessage(MessageType.Regular, pm.EmoteHue, false, String.Format("*A mass of vapors condenses under {0}, forming a steed*", pm.Name)); pm.CanSwim = true; bool isWater = false; Map map = pm.Map; LandTile land = map.Tiles.GetLandTile(pm.X, pm.Y); StaticTile[] tiles = map.Tiles.GetStaticTiles(pm.X, pm.Y); isWater = (land.Z == pm.Z && ((land.ID >= 168 && land.ID <= 171) || (land.ID >= 310 && land.ID <= 311))); for (int i = 0; i < tiles.Length; ++i) { StaticTile tile = tiles[i]; isWater = (tile.ID >= 0x1796 && tile.ID <= 0x17B2); } try { if (isWater) { EtherealMount seaHorse = new EtherealSeaHorse(); seaHorse.MoveToWorld(pm.Location); seaHorse.Rider = pm; } else { EtherealMount horse = new EtherealHorse(); horse.MoveToWorld(pm.Location); horse.Rider = pm; } } catch { } } break; } default: break; } }
public static void PrepareServerWar() { m_ServerWars = true; FactionReset(); Map[] maps = Map.Maps; foreach (GuardedRegion region in maps.Where(m => m != null).SelectMany(m => m.Regions.Values.OfType <GuardedRegion>()) ) { region.Disabled = true; } foreach ( PlayerMobile mob in World.Mobiles.Values.OfType <PlayerMobile>().Where(mob => mob.AccessLevel == AccessLevel.Player)) { mob.BankBox.Credit = 10000000; //10 mill in the bank! Bag bag = new BagOfReagents(10000); bag.Name = "Bag of Reagents (10K)"; bag.Hue = RandomHue(); mob.BankBox.DropItem(bag); ResurrectGump.ClearSkillLoss(mob); bag = new Bag { Hue = RandomHue(), Name = "Bag of PVP Supplies" }; mob.BankBox.DropItem(bag); if (mob.Skills[SkillName.Magery].Value > 0.0) { mob.Backpack.DropItem( BaseCreature.Rehued(BaseCreature.ChangeLootType(new BagOfReagents(150), LootType.Blessed), RandomHue())); Spellbook book = Spellbook.FindRegular(mob); if (book != null) { book.Content = ulong.MaxValue; book.LootType = LootType.Blessed; book.Hue = Utility.Random(1000); } else { book = new Spellbook { Content = ulong.MaxValue, LootType = LootType.Blessed, Hue = Utility.Random(1000) }; mob.Backpack.DropItem(book); } } //if ( mob.Skills[SkillName.Healing].Value > 0.0 ) //{ mob.BankBox.DropItem(BaseCreature.ChangeLootType(new Bandage(150), LootType.Blessed)); //} //if ( mob.Skills[SkillName.Fencing].Value > 0.0 ) //{ bag.DropItem(SetWeapon(new ShortSpear())); bag.DropItem(SetWeapon(new Kryss())); bag.DropItem(SetWeapon(new Spear())); //} //if ( mob.Skills[SkillName.Parry].Value > 0.0 ) //{ bag.DropItem( BaseCreature.ChangeLootType( BaseCreature.Resourced(new MetalKiteShield(), CraftResource.Valorite), LootType.Blessed)); //} //if ( mob.Skills[SkillName.Swords].Value > 0.0 ) //{ if (mob.Skills[SkillName.Lumberjacking].Value > 0.0) { bag.DropItem(SetWeapon(new Hatchet())); bag.DropItem(SetWeapon(new LargeBattleAxe())); } bag.DropItem(SetWeapon(new Halberd())); bag.DropItem(SetWeapon(new Katana())); //} //if ( mob.Skills[SkillName.Macing].Value > 0.0 ) //{ bag.DropItem(SetWeapon(new WarAxe())); bag.DropItem(SetWeapon(new WarHammer())); //} //if ( mob.Skills[SkillName.Archery].Value > 0.0 ) //{ bag.DropItem(SetWeapon(new Bow())); bag.DropItem(SetWeapon(new Crossbow())); bag.DropItem(SetWeapon(new HeavyCrossbow())); var quiver = new ElvenQuiver { Hue = RandomHue() }; quiver.DropItem(new Arrow(300)); bag.DropItem(new Bolt(300)); mob.BankBox.DropItem(BaseCreature.ChangeLootType(quiver, LootType.Blessed)); //} //if ( mob.Skills[SkillName.Poisoning].Value > 0.0 ) //{ for (int i = 0; i < 5; i++) { bag.DropItem(BaseCreature.ChangeLootType(new DeadlyPoisonPotion(), LootType.Blessed)); } //} mob.Kills = mob.ShortTermMurders = 0; var horse = new EtherealHorse { IsDonationItem = true, Hue = RandomHue() }; mob.Backpack.DropItem(horse); mob.Backpack.DropItem(BaseCreature.ChangeLootType(new StatsBall(), LootType.Blessed)); bag = new Bag { Hue = 1437, Name = "Bag of Barbed Leather Armor" }; bag.DropItem( BaseCreature.Rehued( BaseCreature.ChangeLootType( BaseCreature.Resourced(new LeatherChest(), CraftResource.BarbedLeather), LootType.Blessed), RandomHue())); bag.DropItem( BaseCreature.Rehued( BaseCreature.ChangeLootType( BaseCreature.Resourced(new LeatherLegs(), CraftResource.BarbedLeather), LootType.Blessed), RandomHue())); bag.DropItem( BaseCreature.Rehued( BaseCreature.ChangeLootType( BaseCreature.Resourced(new LeatherGorget(), CraftResource.BarbedLeather), LootType.Blessed), RandomHue())); bag.DropItem( BaseCreature.Rehued( BaseCreature.ChangeLootType( BaseCreature.Resourced(new LeatherGloves(), CraftResource.BarbedLeather), LootType.Blessed), RandomHue())); bag.DropItem( BaseCreature.Rehued( BaseCreature.ChangeLootType( BaseCreature.Resourced(new LeatherArms(), CraftResource.BarbedLeather), LootType.Blessed), RandomHue())); bag.DropItem( BaseCreature.Rehued( BaseCreature.ChangeLootType( BaseCreature.Resourced(new LeatherCap(), CraftResource.BarbedLeather), LootType.Blessed), RandomHue())); mob.Backpack.DropItem(bag); Skills skills = mob.Skills; foreach (Skill s in skills.Where(t => t.SkillName != SkillName.ItemID)) { s.BaseFixedPoint = 1000; } } }