private void RewardWinner(Mobile player) { string messageGump = "O Premio de Vencedor foi depositado em seu banco!"; Bag bagReward = new Bag(); if (SingletonEvent.Instance.IsAutomaticEvent || SingletonEvent.Instance.CurrentEventRewardList.Count == 0) { bagReward.Hue = Utility.RandomYellowHue(); bagReward.Name = "Reward Bag"; if (SingletonEvent.Instance.IsTeamMode) { Item item; if (Utility.RandomBool()) { item = RewardUtil.CreateRewardInstance(RewardUtil.BlackRockWeaponTypes) as Item; } else { item = RewardUtil.CreateRewardInstance(RewardUtil.BlackRockPlateTypes) as Item; } bagReward.DropItem(item); } else { IMount mount = RewardUtil.CreateRewardInstance(RewardUtil.RegularMountTypes) as IMount; ShrinkItem shrunkenPet = new ShrinkItem((BaseCreature)mount); bagReward.DropItem(shrunkenPet); } bagReward.DropItem(new Gold(10000)); player.BankBox.DropItem(bagReward); } else { RewardUtil.SendRewardToPlayer(player); } player.SendMessage(0x35, "O Premio de Vencedor foi depositado em seu banco!"); if (this.eventStatistics.GetPlayerKillList((PlayerMobile)player).Count > 0) { int qtExtraGold = 5000 * this.eventStatistics.GetPlayerKillList((PlayerMobile)player).Count; bagReward.DropItem(new Gold(qtExtraGold)); player.SendMessage(0x35, string.Format("Voce recebeu um premio extra de {0} Golds, por eliminar {1} inimigos.", qtExtraGold, this.eventStatistics.GetPlayerKillList((PlayerMobile)player).Count)); messageGump += string.Format("<BR>Voce recebeu um premio extra de {0} Golds, por eliminar {1} inimigos.", qtExtraGold, this.eventStatistics.GetPlayerKillList((PlayerMobile)player).Count); } player.SendGump(new AlertGump(player, messageGump, "PARABÉNS!")); }
protected override void OnTarget( Mobile from, object o ) { if (o is Item) from.SendMessage("That cannot be shrunken."); else if (o is PlayerMobile) from.SendMessage("That cannot be shrunken."); else if (o is BaseEscortable) from.SendMessage("You can't shrink me."); /*else if ( o is RoninsBaseCreature && ( (RoninsBaseCreature)o).Pregnant == true ) from.SendMessage( 53, "Warning! Shrinking a pet while pregnant could cause a server crash." ); else if ( o is RoninsBaseCreature && ( (RoninsBaseCreature)o).IsMating == true ) from.SendMessage( 53, "Warning! Shrinking a pet while mating could cause a server crash." );*/ else if (o is BaseCreature) { BaseCreature c = (BaseCreature)o; Type type = c.GetType(); ShrinkItem si = new ShrinkItem(); si.MobType = type; si.Pet = c; si.PetOwner = from; if (c is BaseMount) { BaseMount mount = (BaseMount)c; si.MountID = mount.ItemID; } from.AddToBackpack(si); c.Controlled = true; c.ControlMaster = null; c.Internalize(); c.OwnerAbandonTime = DateTime.MinValue; c.IsStabled = true; } else from.SendMessage("You cannot shrink that, MOBILES ONLY"); }
private void PreparePlayersToFight() { foreach (Mobile mobile in m_SurvivorPlayerList) { PlayerMobile player = World.FindMobile(mobile.Serial) as PlayerMobile; this.CleanPlayer(player); player.Blessed = true; player.Paralyzed = true; player.Hidden = true; if (player.Alive == false) { player.Resurrect(); } IMount mount = player.Mount; if (mount != null) { mount.Rider = null; ShrinkItem shrunkenPet = new ShrinkItem((BaseCreature)mount); player.Backpack.DropItem(shrunkenPet); mobile.SendMessage("Este evento nao permite entrar com animais."); mobile.SendMessage("Ele foi guardado e seu banco."); } // Salva posicao antes de puxar para o local do evento m_SurvivorPlayerHomeLocationList.Add(mobile, mobile.Location); m_SurvivorPlayerHomeLocationMapList.Add(mobile, mobile.Map); // Incognito - Remove Backpack player.SetIncognitoToEvent(); player.DropAllItensToBackpack(); player.Backpack.Visible = false; // Seta Time e Teleport this.MovePlayerToSpot(player); m_SurvivorPlayerLivesList.Add(player.Serial, qtInitialLives); player.SendMessage(string.Format("Voce recebeu {0} vidas iniciais!", qtInitialLives)); } }
private void PreparePlayersToFight() { foreach (Mobile mobile in m_TheHuntPlayerList) { PlayerMobile player = World.FindMobile(mobile.Serial) as PlayerMobile; this.CleanPlayer(player); player.Blessed = true; player.Paralyzed = true; player.Hidden = true; if (player.Alive == false) { player.Resurrect(); } IMount mount = player.Mount; if (mount != null) { mount.Rider = null; ShrinkItem shrunkenPet = new ShrinkItem((BaseCreature)mount); player.Backpack.DropItem(shrunkenPet); mobile.SendMessage("Este evento nao permite entrar com animais."); mobile.SendMessage("Ele foi guardado e seu banco."); } // Salva posicao antes de puxar para o local do evento m_TheHuntPlayerHomeLocationList.Add(mobile, mobile.Location); m_TheHuntPlayerHomeLocationMapList.Add(mobile, mobile.Map); Point3D point3D = m_PlayerSpotList[new Random().Next(m_PlayerSpotList.Count)]; m_PlayerSpotList.Remove(point3D); player.FixedParticles(0x3709, 1, 30, 9965, 5, 7, EffectLayer.Waist); player.MoveToWorld(point3D, Map.Ilshenar); player.FixedParticles(0x3709, 1, 30, 9965, 5, 7, EffectLayer.Waist); } }
public SellConfirmGump(Mobile mobile, ShrinkItem pet) : base(25, 50) { this.m_Mobile = mobile; this.m_ShrinkItem = pet; this.AddPage(0); this.AddBackground(25, 10, 420, 200, 5054); this.AddImageTiled(33, 20, 401, 181, 2624); this.AddAlphaRegion(33, 20, 401, 181); this.AddHtml(40, 48, 387, 100, "<CENTER>Warning!!!<BR>Your about to convert this pet into an animal sale contract. This will remove any bonded status you have with the animal and make it able to transfer to a new owner and be sold. Once you do this it cannont be undone.", true, true); this.AddHtml(125, 148, 200, 20, "<BASEFONT COLOR=#FFFFFF>Do you wish to proceed?</BASEFONT>", false, false); this.AddButton(100, 172, 4005, 4007, 1, GumpButtonType.Reply, 0); this.AddHtmlLocalized(135, 172, 120, 20, 1046362, 0xFFFFFF, false, false); // Yes this.AddButton(275, 172, 4005, 4007, 0, GumpButtonType.Reply, 0); this.AddHtmlLocalized(310, 172, 120, 20, 1046363, 0xFFFFFF, false, false); // No }
public static bool Shrink( Mobile from, object targ, bool restricted ) { String errorString = null; int errorLocalizedMessage = 0; if ( from == targ ) errorString = "You can't shrink yourself!"; else if ( !(targ is BaseCreature) ) errorString = "You can't shrink that!"; else { BaseCreature t=(BaseCreature)targ; #region Shrink Restrictions if ( !restricted ) { //Don't check anything if not a restricted Shrink } else if( t.Summoned ) { errorString = "You cannot shrink summoned creatures."; } else if ( t.Poisoned ) { errorString = "You cannot shrink your pet while it is poisoned."; } else if ( t.Combatant != null && t.InRange( t.Combatant, 12 ) && t.Map == t.Combatant.Map ) { errorString = "You cannot shrink your pet while it is in combat."; } else if (!(t.Controlled && t.ControlMaster==from)) { errorLocalizedMessage = 1042562; //That is not your pet! errorString = "That is not your pet!"; } else if ( (t is PackLlama || t is PackHorse || t is Beetle) && (t.Backpack != null && t.Backpack.Items.Count > 0) ) { errorLocalizedMessage = 1042563; //Unload the pet first errorString = "Unload the pet first"; } #endregion ShrinkItem shrunkenPet = new ShrinkItem( t ); if ( (errorString==null) && ( errorLocalizedMessage == 0 ) ) { //If no errors, proceed. if ( from != null ) { from.SendMessage( "You shrink the pet" ); if ( !from.AddToBackpack ( shrunkenPet ) ) { shrunkenPet.MoveToWorld( new Point3D( from.X, from.Y, from.Z ), from.Map ); from.SendMessage( "Your backpack is full so the shrunken pet falls to the ground" ); } } else { shrunkenPet.MoveToWorld( new Point3D( t.X, t.Y, t.Z ), t.Map ); // place shrunken pet at current location } t.Controlled = true; //To make it so It won't still be a part of a spawner. SendAway( t ); return true; } } if( from != null ) //if From is NOT null, send error Message. { if ( errorLocalizedMessage != 0 ) { from.SendLocalizedMessage( errorLocalizedMessage ); } else { from.SendMessage( errorString ); } } return false; }
protected override void OnTarget( Mobile from, object target ) { if ( target == from ) from.SendMessage( "You cant shrink yourself!" ); else if ( target is PlayerMobile ) from.SendMessage( "That person gives you a dirty look." ); else if ( target is Item ) from.SendMessage( "You can only shrink pets that you own" ); else if ( target is BaseBioCreature && FSATS.EnableBioShrink == false ) from.SendMessage( "Unnatural creatures cannot be shrunk" ); else if ( Server.Spells.SpellHelper.CheckCombat( from ) ) from.SendMessage( "You cannot shrink your pet while your fighting." ); else if ( target is BaseCreature ) { BaseCreature c = (BaseCreature)target; bool packanimal = false; Type typ = c.GetType(); string nam = typ.Name; foreach ( string ispack in FSATS.PackAnimals ) { if ( ispack == nam ) packanimal = true; } if ( c.BodyValue == 400 || c.BodyValue == 401 && c.Controlled == false ) { from.SendMessage( "That person gives you a dirty look." ); } else if ( c.ControlMaster != from && c.Controlled == false ) { from.SendMessage( "This is not your pet." ); } else if ( packanimal == true && (c.Backpack != null && c.Backpack.Items.Count > 0) ) { from.SendMessage( "You must unload your pets backpack first." ); } else if ( c.IsDeadPet ) { from.SendMessage( "You cannot shrink the dead." ); } else if ( c.Summoned ) { from.SendMessage( "You cannot shrink a summoned creature." ); } else if ( c.Combatant != null && c.InRange( c.Combatant, 12 ) && c.Map == c.Combatant.Map ) { from.SendMessage( "Your pet is fighting, You cannot shrink it yet." ); } else if ( c.BodyMod != 0 ) { from.SendMessage( "You cannot shrink your pet while its polymorphed." ); } //else if ( Server.Spells.LostArts.CharmBeastSpell.IsCharmed( c ) ) //{ // from.SendMessage( "Your hold over this pet is not strong enough to shrink it." ); //} else if ( c.Controlled == true && c.ControlMaster == from) { Type type = c.GetType(); ShrinkItem si = new ShrinkItem(); si.MobType = type; si.Pet = c; si.PetOwner = from; if ( c is BaseMount ) { BaseMount mount = (BaseMount)c; si.MountID = mount.ItemID; } from.AddToBackpack( si ); IEntity p1 = new Entity( Serial.Zero, new Point3D( from.X, from.Y, from.Z ), from.Map ); IEntity p2 = new Entity( Serial.Zero, new Point3D( from.X, from.Y, from.Z + 50 ), from.Map ); Effects.SendMovingParticles( p2, p1, ShrinkTable.Lookup( c ), 1, 0, true, false, 0, 3, 1153, 1, 0, EffectLayer.Head, 0x100 ); from.PlaySound( 492 ); c.Controlled = true; c.ControlMaster = null; c.Internalize(); c.OwnerAbandonTime = DateTime.MinValue; c.IsStabled = true; m_Powder.Charges -= 1; if ( m_Powder.Charges == 0 ) m_Powder.Delete(); } } }
protected override void OnTarget(Mobile from, object target) { if (target == from) { from.SendMessage("You cant shrink yourself!"); } else if (target is PlayerMobile) { from.SendMessage("That person gives you a dirty look."); } else if (target is Item) { from.SendMessage("You can only shrink pets that you own"); } else if (target is BaseBioCreature && FSATS.EnableBioShrink == false) { from.SendMessage("Unnatural creatures cannot be shrunk"); } else if (Server.Spells.SpellHelper.CheckCombat(from)) { from.SendMessage("You cannot shrink your pet while your fighting."); } else if (target is BaseCreature) { BaseCreature c = (BaseCreature)target; bool packanimal = false; Type typ = c.GetType(); string nam = typ.Name; foreach (string ispack in FSATS.PackAnimals) { if (ispack == nam) { packanimal = true; } } if (c.BodyValue == 400 || c.BodyValue == 401 && c.Controlled == false) { from.SendMessage("That person gives you a dirty look."); } else if (c.ControlMaster != from && c.Controlled == false) { from.SendMessage("This is not your pet."); } else if (packanimal == true && (c.Backpack != null && c.Backpack.Items.Count > 0)) { from.SendMessage("You must unload your pets backpack first."); } else if (c.IsDeadPet) { from.SendMessage("You cannot shrink the dead."); } else if (c.Summoned) { from.SendMessage("You cannot shrink a summoned creature."); } else if (c.Combatant != null && c.InRange(c.Combatant, 12) && c.Map == c.Combatant.Map) { from.SendMessage("Your pet is fighting, You cannot shrink it yet."); } else if (c.BodyMod != 0) { from.SendMessage("You cannot shrink your pet while its polymorphed."); } //else if ( Server.Spells.LostArts.CharmBeastSpell.IsCharmed( c ) ) //{ // from.SendMessage( "Your hold over this pet is not strong enough to shrink it." ); //} else if (c.Controlled == true && c.ControlMaster == from) { Type type = c.GetType(); ShrinkItem si = new ShrinkItem(); si.MobType = type; si.Pet = c; si.PetOwner = from; if (c is BaseMount) { BaseMount mount = (BaseMount)c; si.MountID = mount.ItemID; } from.AddToBackpack(si); IEntity p1 = new Entity(Serial.Zero, new Point3D(from.X, from.Y, from.Z), from.Map); IEntity p2 = new Entity(Serial.Zero, new Point3D(from.X, from.Y, from.Z + 50), from.Map); Effects.SendMovingParticles(p2, p1, ShrinkTable.Lookup(c), 1, 0, true, false, 0, 3, 1153, 1, 0, EffectLayer.Head, 0x100); from.PlaySound(492); c.Controlled = true; c.ControlMaster = null; c.Internalize(); c.OwnerAbandonTime = DateTime.MinValue; c.IsStabled = true; m_Powder.Charges -= 1; if (m_Powder.Charges == 0) { m_Powder.Delete(); } } } }
public UnLockShrinkItem( Mobile from, ShrinkItem shrink ) : base( 2033, 5 ) { m_From = from; m_ShrinkItem = shrink; }
private static void CreateItens(bool pImportItensToPlayer) { Bag bagItens = new Bag(); bagItens.Name = "Itens de " + sphereCharName; bagItens.Hue = 1153; Bag bagGold = new Bag(); Bag bagOres = new Bag(); Bag bagIngots = new Bag(); Bag bagArmor = new Bag(); Bag bagWeapon = new Bag(); Bag bagMount = new Bag(); Bag bagOther = new Bag(); Bag bagPotion = new Bag(); Bag bagRegs = new Bag(); Bag bagCloth = new Bag(); Bag bagContainer = new Bag(); Bag bagMaps = new Bag(); Bag bagPlateOutras = new Bag(); bagPlateOutras.Hue = DimensionsNewAge.Scripts.HueOreConst.HueIron; bagArmor.DropItem(bagPlateOutras); Bag bagPlateRusty = new Bag(); bagPlateRusty.Hue = DimensionsNewAge.Scripts.HueOreConst.HueRusty; bagArmor.DropItem(bagPlateRusty); Bag bagPlateOldCopper = new Bag(); bagArmor.DropItem(bagPlateOldCopper); bagPlateOldCopper.Hue = DimensionsNewAge.Scripts.HueOreConst.HueOldCopper; Bag bagPlateDullCopper = new Bag(); bagArmor.DropItem(bagPlateDullCopper); bagPlateDullCopper.Hue = DimensionsNewAge.Scripts.HueOreConst.HueDullCopper; Bag bagPlateRuby = new Bag(); bagPlateRuby.Hue = DimensionsNewAge.Scripts.HueOreConst.HueRuby; bagArmor.DropItem(bagPlateRuby); Bag bagPlateCopper = new Bag(); bagPlateCopper.Hue = DimensionsNewAge.Scripts.HueOreConst.HueCopper; bagArmor.DropItem(bagPlateCopper); Bag bagPlateBronze = new Bag(); bagPlateBronze.Hue = DimensionsNewAge.Scripts.HueOreConst.HueBronze; bagArmor.DropItem(bagPlateBronze); Bag bagPlateShadowIron = new Bag(); bagPlateShadowIron.Hue = DimensionsNewAge.Scripts.HueOreConst.HueShadow; bagArmor.DropItem(bagPlateShadowIron); Bag bagPlateSilver = new Bag(); bagPlateSilver.Hue = DimensionsNewAge.Scripts.HueOreConst.HueSilver; bagArmor.DropItem(bagPlateSilver); Bag bagPlateMercury = new Bag(); bagPlateMercury.Hue = DimensionsNewAge.Scripts.HueOreConst.HueMercury; bagArmor.DropItem(bagPlateMercury); Bag bagPlateRose = new Bag(); bagPlateRose.Hue = DimensionsNewAge.Scripts.HueOreConst.HueRose; bagArmor.DropItem(bagPlateRose); Bag bagPlateGold = new Bag(); bagPlateGold.Hue = DimensionsNewAge.Scripts.HueOreConst.HueGold; bagArmor.DropItem(bagPlateGold); Bag bagPlateAgapite = new Bag(); bagPlateAgapite.Hue = DimensionsNewAge.Scripts.HueOreConst.HueAgapite; bagArmor.DropItem(bagPlateAgapite); Bag bagPlateVerite = new Bag(); bagPlateVerite.Hue = DimensionsNewAge.Scripts.HueOreConst.HueVerite; bagArmor.DropItem(bagPlateVerite); Bag bagPlatePlutonio = new Bag(); bagPlatePlutonio.Hue = DimensionsNewAge.Scripts.HueOreConst.HuePlutonio; bagArmor.DropItem(bagPlatePlutonio); Bag bagPlateBloodRock = new Bag(); bagPlateBloodRock.Hue = DimensionsNewAge.Scripts.HueOreConst.HueBloodRock; bagArmor.DropItem(bagPlateBloodRock); Bag bagPlateValorite = new Bag(); bagPlateValorite.Hue = DimensionsNewAge.Scripts.HueOreConst.HueValorite; bagArmor.DropItem(bagPlateValorite); Bag bagPlateBlackRock = new Bag(); bagPlateBlackRock.Hue = DimensionsNewAge.Scripts.HueOreConst.HueBlackRock; bagArmor.DropItem(bagPlateBlackRock); Bag bagPlateMytheril = new Bag(); bagPlateMytheril.Hue = DimensionsNewAge.Scripts.HueOreConst.HueAqua; bagArmor.DropItem(bagPlateMytheril); Bag bagPlateAqua = new Bag(); bagPlateAqua.Hue = DimensionsNewAge.Scripts.HueOreConst.HueAqua; bagArmor.DropItem(bagPlateAqua); bagItens.DropItem(bagOres); bagItens.DropItem(bagIngots); bagItens.DropItem(bagArmor); bagItens.DropItem(bagWeapon); bagItens.DropItem(bagMount); bagItens.DropItem(bagOther); bagItens.DropItem(bagGold); bagItens.DropItem(bagPotion); bagItens.DropItem(bagRegs); bagItens.DropItem(bagCloth); bagItens.DropItem(bagContainer); bagItens.DropItem(bagMaps); Spellbook book = new Spellbook(); book.Content = ulong.MaxValue; bagItens.DropItem(book); bagItens.DropItem(new Runebook()); bagItens.DropItem(new Runebook()); if (pImportItensToPlayer) { foreach (Mobile mobile in World.Mobiles.Values) { if (mobile is PlayerMobile && mobile.Account.Username == runuoAccName && mobile.Name == runuoCharName) { mobile.BankBox.DropItem(bagItens); break; } } } else { caller.Backpack.DropItem(bagItens); } foreach (SphereItemClass sphereItem in sphereItensListToAcc) { try { object item; if (sphereItem.itemType == typeof(TreasureMap)) item = new TreasureMap(new Random().Next(1, 3), Map.Felucca); else item = RewardUtil.CreateRewardInstance(sphereItem.itemType); if (item is Item) { if (((Item)item).Stackable) { ((Item)item).Amount = sphereItem.qtAmount; } } if (item is BaseOre) { bagOres.DropItem((Item)item); } else if (item is Gold) { bagGold.DropItem((Item)item); } else if (item is BaseIngot) { bagIngots.DropItem((Item)item); } else if (item is BaseWeapon) { bagWeapon.DropItem((Item)item); } else if (item is BaseReagent) { bagRegs.DropItem((Item)item); } else if (item is LockableContainer) { bagContainer.DropItem((Item)item); } else if (item is TreasureMap) { bagMaps.DropItem((Item)item); } else if (item is BaseArmor) { bagPlateOutras.DropItem((Item)item); if (item is PlateChestRusty || item is PlateArmsRusty || item is PlateLegsRusty || item is PlateCloseHelmRusty || item is PlateGorgetRusty || item is PlateGlovesRusty || item is SwordRusty || item is WarMaceRusty || item is KryssRusty || item is WarMaceRusty || item is HeaterShieldRusty || item is BowRusty) { bagPlateRusty.DropItem((Item)item); } if (item is PlateChestOldCopper || item is PlateArmsOldCopper || item is PlateLegsOldCopper || item is PlateCloseHelmOldCopper || item is PlateGorgetOldCopper || item is PlateGlovesOldCopper || item is SwordOldCopper || item is WarMaceOldCopper || item is KryssOldCopper || item is WarMaceOldCopper || item is HeaterShieldOldCopper || item is BowOldCopper) { bagPlateOldCopper.DropItem((Item)item); } if (item is PlateChestDullCopper || item is PlateArmsDullCopper || item is PlateLegsDullCopper || item is PlateCloseHelmDullCopper || item is PlateGorgetDullCopper || item is PlateGlovesDullCopper || item is SwordDullCopper || item is WarMaceDullCopper || item is KryssDullCopper || item is WarMaceDullCopper || item is HeaterShieldDullCopper || item is BowDullCopper) { bagPlateDullCopper.DropItem((Item)item); } if (item is PlateChestRuby || item is PlateArmsRuby || item is PlateLegsRuby || item is PlateCloseHelmRuby || item is PlateGorgetRuby || item is PlateGlovesRuby || item is SwordRuby || item is WarMaceRuby || item is KryssRuby || item is WarMaceRuby || item is HeaterShieldRuby || item is BowRuby) { bagPlateRuby.DropItem((Item)item); } if (item is PlateChestCopper || item is PlateArmsCopper || item is PlateLegsCopper || item is PlateCloseHelmCopper || item is PlateGorgetCopper || item is PlateGlovesCopper || item is SwordCopper || item is WarMaceCopper || item is KryssCopper || item is WarMaceCopper || item is HeaterShieldCopper || item is BowCopper) { bagPlateCopper.DropItem((Item)item); } if (item is PlateChestBronze || item is PlateArmsBronze || item is PlateLegsBronze || item is PlateCloseHelmBronze || item is PlateGorgetBronze || item is PlateGlovesBronze || item is SwordBronze || item is WarMaceBronze || item is KryssBronze || item is WarMaceBronze || item is HeaterShieldBronze || item is BowBronze) { bagPlateBronze.DropItem((Item)item); } if (item is PlateChestShadow || item is PlateArmsShadow || item is PlateLegsShadow || item is PlateCloseHelmShadow || item is PlateGorgetShadow || item is PlateGlovesShadow || item is SwordShadow || item is WarMaceShadow || item is KryssShadow || item is WarMaceShadow || item is HeaterShieldShadow || item is BowShadow) { bagPlateShadowIron.DropItem((Item)item); } if (item is PlateChestSilver || item is PlateArmsSilver || item is PlateLegsSilver || item is PlateCloseHelmSilver || item is PlateGorgetSilver || item is PlateGlovesSilver || item is SwordSilver || item is WarMaceSilver || item is KryssSilver || item is WarMaceSilver || item is HeaterShieldSilver || item is BowSilver) { bagPlateSilver.DropItem((Item)item); } if (item is PlateChestMercury || item is PlateArmsMercury || item is PlateLegsMercury || item is PlateCloseHelmMercury || item is PlateGorgetMercury || item is PlateGlovesMercury || item is SwordMercury || item is WarMaceMercury || item is KryssMercury || item is WarMaceMercury || item is HeaterShieldMercury || item is BowMercury) { bagPlateMercury.DropItem((Item)item); } if (item is PlateChestRose || item is PlateArmsRose || item is PlateLegsRose || item is PlateCloseHelmRose || item is PlateGorgetRose || item is PlateGlovesRose || item is SwordRose || item is WarMaceRose || item is KryssRose || item is WarMaceRose || item is HeaterShieldRose || item is BowRose) { bagPlateRose.DropItem((Item)item); } if (item is PlateChestGold || item is PlateArmsGold || item is PlateLegsGold || item is PlateCloseHelmGold || item is PlateGorgetGold || item is PlateGlovesGold || item is SwordGold || item is WarMaceGold || item is KryssGold || item is WarMaceGold || item is HeaterShieldGold || item is BowGold) { bagPlateGold.DropItem((Item)item); } if (item is PlateChestAgapite || item is PlateArmsAgapite || item is PlateLegsAgapite || item is PlateCloseHelmAgapite || item is PlateGorgetAgapite || item is PlateGlovesAgapite || item is SwordAgapite || item is WarMaceAgapite || item is KryssAgapite || item is WarMaceAgapite || item is HeaterShieldAgapite || item is BowAgapite) { bagPlateAgapite.DropItem((Item)item); } if (item is PlateChestVerite || item is PlateArmsVerite || item is PlateLegsVerite || item is PlateCloseHelmVerite || item is PlateGorgetVerite || item is PlateGlovesVerite || item is SwordVerite || item is WarMaceVerite || item is KryssVerite || item is WarMaceVerite || item is HeaterShieldVerite || item is BowVerite) { bagPlateVerite.DropItem((Item)item); } if (item is PlateChestPlutonio || item is PlateArmsPlutonio || item is PlateLegsPlutonio || item is PlateCloseHelmPlutonio || item is PlateGorgetPlutonio || item is PlateGlovesPlutonio || item is SwordPlutonio || item is WarMacePlutonio || item is KryssPlutonio || item is WarMacePlutonio || item is HeaterShieldPlutonio || item is BowPlutonio) { bagPlatePlutonio.DropItem((Item)item); } if (item is PlateChestBloodRock || item is PlateArmsBloodRock || item is PlateLegsBloodRock || item is PlateCloseHelmBloodRock || item is PlateGorgetBloodRock || item is PlateGlovesBloodRock || item is SwordBloodRock || item is WarMaceBloodRock || item is KryssBloodRock || item is WarMaceBloodRock || item is HeaterShieldBloodRock || item is BowBloodRock) { bagPlateBloodRock.DropItem((Item)item); } if (item is PlateChestValorite || item is PlateArmsValorite || item is PlateLegsValorite || item is PlateCloseHelmValorite || item is PlateGorgetValorite || item is PlateGlovesValorite || item is SwordValorite || item is WarMaceValorite || item is KryssValorite || item is WarMaceValorite || item is HeaterShieldValorite || item is BowValorite) { bagPlateValorite.DropItem((Item)item); } if (item is PlateChestBlackRock || item is PlateArmsBlackRock || item is PlateLegsBlackRock || item is PlateCloseHelmBlackRock || item is PlateGorgetBlackRock || item is PlateGlovesBlackRock || item is SwordBlackRock || item is WarMaceBlackRock || item is KryssBlackRock || item is WarMaceBlackRock || item is HeaterShieldBlackRock || item is BowBlackRock) { bagPlateBlackRock.DropItem((Item)item); } if (item is PlateChestMytheril || item is PlateArmsMytheril || item is PlateLegsMytheril || item is PlateCloseHelmMytheril || item is PlateGorgetMytheril || item is PlateGlovesMytheril || item is SwordMytheril || item is WarMaceMytheril || item is KryssMytheril || item is WarMaceMytheril || item is HeaterShieldMytheril || item is BowMytheril) { bagPlateMytheril.DropItem((Item)item); } if (item is PlateChestAqua || item is PlateArmsAqua || item is PlateLegsAqua || item is PlateCloseHelmAqua || item is PlateGorgetAqua || item is PlateGlovesAqua || item is SwordAqua || item is WarMaceAqua || item is KryssAqua || item is WarMaceAqua || item is HeaterShieldAqua || item is BowAqua) { bagPlateAqua.DropItem((Item)item); } } else if (item is BaseClothing) { bagCloth.DropItem((Item)item); } else if (item is BasePotion) { //for (int i = 0; i <= sphereItem.qtAmount - 1; i++) //{ // object itemPotion = RewardUtil.CreateRewardInstance(sphereItem.itemType); // bagPotion.DropItem((Item)itemPotion); //} bagPotion.DropItem((Item)item); } else if (item is BaseCreature) { if (sphereItem.Hue != 1) { ((BaseCreature)item).Hue = sphereItem.Hue; } ShrinkItem shrunkenPet = new ShrinkItem((BaseCreature)item); bagMount.DropItem(shrunkenPet); } else { bagOther.DropItem((Item)item); } if (item is Server.Mobiles.Horse && sphereItem.Hue != 1) { ((Server.Mobiles.Horse)item).Hue = DimensionsNewAge.Scripts.HueItemConst.GetNewHueBySphereHue(sphereItem.Hue); ((Server.Mobiles.Horse)item).Name = "Wild Horse"; } if (item is Server.Items.MagicDyeTub && sphereItem.Hue != 1) ((Server.Items.MagicDyeTub)item).DyedHue = DimensionsNewAge.Scripts.HueItemConst.GetNewHueBySphereHue(sphereItem.Hue); if (item is Server.Items.BaseClothing && sphereItem.Hue != 1) ((Server.Items.BaseClothing)item).Hue = DimensionsNewAge.Scripts.HueItemConst.GetNewHueBySphereHue(sphereItem.Hue); } catch (Exception ex) { Logger.LogSphereImport(string.Format("CreateItens ERRO " + ex.Message), sphereCharName); } } if (bagOres.Items.Count == 0) bagOres.Delete(); if (bagIngots.Items.Count == 0) bagIngots.Delete(); if (bagArmor.Items.Count == 0) bagArmor.Delete(); if (bagWeapon.Items.Count == 0) bagWeapon.Delete(); if (bagMount.Items.Count == 0) bagMount.Delete(); if (bagOther.Items.Count == 0) bagOther.Delete(); if (bagGold.Items.Count == 0) bagGold.Delete(); if (bagPotion.Items.Count == 0) bagPotion.Delete(); if (bagRegs.Items.Count == 0) bagRegs.Delete(); if (bagCloth.Items.Count == 0) bagCloth.Delete(); if (bagContainer.Items.Count == 0) bagContainer.Delete(); if (bagMaps.Items.Count == 0) bagMaps.Delete(); if (bagPlateOutras.Items.Count == 0) bagPlateOutras.Delete(); if (bagPlateRusty.Items.Count == 0) bagPlateRusty.Delete(); if (bagPlateOldCopper.Items.Count == 0) bagPlateOldCopper.Delete(); if (bagPlateDullCopper.Items.Count == 0) bagPlateDullCopper.Delete(); if (bagPlateRuby.Items.Count == 0) bagPlateRuby.Delete(); if (bagPlateCopper.Items.Count == 0) bagPlateCopper.Delete(); if (bagPlateBronze.Items.Count == 0) bagPlateBronze.Delete(); if (bagPlateShadowIron.Items.Count == 0) bagPlateShadowIron.Delete(); if (bagPlateSilver.Items.Count == 0) bagPlateSilver.Delete(); if (bagPlateMercury.Items.Count == 0) bagPlateMercury.Delete(); if (bagPlateRose.Items.Count == 0) bagPlateRose.Delete(); if (bagPlateGold.Items.Count == 0) bagPlateGold.Delete(); if (bagPlateAgapite.Items.Count == 0) bagPlateAgapite.Delete(); if (bagPlateVerite.Items.Count == 0) bagPlateVerite.Delete(); if (bagPlatePlutonio.Items.Count == 0) bagPlatePlutonio.Delete(); if (bagPlateBloodRock.Items.Count == 0) bagPlateBloodRock.Delete(); if (bagPlateValorite.Items.Count == 0) bagPlateValorite.Delete(); if (bagPlateBlackRock.Items.Count == 0) bagPlateBlackRock.Delete(); if (bagPlateMytheril.Items.Count == 0) bagPlateMytheril.Delete(); if (bagPlateAqua.Items.Count == 0) bagPlateAqua.Delete(); }
private void PreparePlayersToFight() { foreach (Mobile mobile in m_TheHuntPlayerList) { PlayerMobile player = World.FindMobile(mobile.Serial) as PlayerMobile; this.CleanPlayer(player); player.Blessed = true; player.Paralyzed = true; player.Hidden = true; if (player.Alive == false) player.Resurrect(); IMount mount = player.Mount; if (mount != null) { mount.Rider = null; ShrinkItem shrunkenPet = new ShrinkItem((BaseCreature)mount); player.Backpack.DropItem(shrunkenPet); mobile.SendMessage("Este evento nao permite entrar com animais."); mobile.SendMessage("Ele foi guardado e seu banco."); } // Salva posicao antes de puxar para o local do evento m_TheHuntPlayerHomeLocationList.Add(mobile, mobile.Location); m_TheHuntPlayerHomeLocationMapList.Add(mobile, mobile.Map); Point3D point3D = m_PlayerSpotList[new Random().Next(m_PlayerSpotList.Count)]; m_PlayerSpotList.Remove(point3D); player.FixedParticles(0x3709, 1, 30, 9965, 5, 7, EffectLayer.Waist); player.MoveToWorld(point3D, Map.Ilshenar); player.FixedParticles(0x3709, 1, 30, 9965, 5, 7, EffectLayer.Waist); } }
internal Item Construct() { try { Item item; if (Type == typeof(Gold)) { item = new Gold(Amount); } else if (Type == typeof(ImagineNickel)) { item = new ImagineNickel(Amount); } else if (Type == typeof(BaseWeapon)) { BaseWeapon w = Loot.RandomWeapon(); w.DamageLevel = WeaponDamageLevel.Vanq; int accuracyRoll = Utility.Random(99); if (accuracyRoll < 31) // 30% to get Accurate { w.AccuracyLevel = WeaponAccuracyLevel.Accurate; } else if (accuracyRoll < 56) // 25% to get Surpassingly { w.AccuracyLevel = WeaponAccuracyLevel.Surpassingly; } else if (accuracyRoll < 76) // 20% to get Eminently { w.AccuracyLevel = WeaponAccuracyLevel.Eminently; } else if (accuracyRoll < 91) // 15% to get Exceedingly { w.AccuracyLevel = WeaponAccuracyLevel.Exceedingly; } else if (accuracyRoll < 100) // 10% to get Supremely { w.AccuracyLevel = WeaponAccuracyLevel.Supremely; } item = w; } else if (Type == typeof(BaseArmor)) { BaseArmor armor = Loot.RandomArmorOrShield(); armor.ProtectionLevel = ArmorProtectionLevel.Invulnerability; armor.Durability = (ArmorDurabilityLevel)Utility.Random(6); item = armor; } else if (Type == typeof(BaseClothing)) { item = Loot.RandomClothing(); item.LootType = LootType.Blessed; item.Hue = Utility.RandomList(Sphere.RareHues); } else if (Type == typeof(BaseJewel)) { item = Loot.RandomJewelry(); item.LootType = LootType.Blessed; item.Hue = Utility.RandomList(Sphere.RareHues); } else if (Type == typeof(Mustang)) { Mustang m = new Mustang(); MustangCollection.Randomize().ApplyTo(m); item = new ShrinkItem(m); } else { item = Activator.CreateInstance(Type) as Item; } return(item); } catch { } return(null); }
public override void OnResponse(NetState sender, RelayInfo info) { if (m_Ticket.Deleted) { return; } int number = 0; string message = null; Item item = null; switch (info.ButtonID) { case 1: BaseCreature parrot = new TalkingParrot { Controlled = true, ControlMaster = m_From }; parrot.Delta(MobileDelta.Noto); item = new ShrinkItem(parrot); message = "A shrunk parrot has been placed in your backpack"; break; case 2: item = new ActionFigure { Name = "Lord Blackthorne action figure", Phrase1 = "That tickles!", Sound1 = 1066, Phrase2 = "Uhhh I think I had too much to drink yesterday", Sound2 = 1087, Phrase3 = "Hey, put me down!", Sound3 = 1069, Phrase4 = "Shh, I'm trying to sleep here", Sound4 = 1089, Phrase5 = "Wasn't me", Sound5 = 1064 }; message = "A Lord Blackthorne action figure has been placed in your backpack"; break; case 3: item = new MagicCrystalBall { Hue = 1952 }; message = "A magic crystal ball has been placed in your backpack"; break; case 4: item = new FireworksWand(); number = 501935; // A wand of fireworks has been placed in your backpack. break; case 5: item = new tarotpoker(); message = "A deck of tarot poker cards has been placed in your backpack"; break; } if (item != null) { m_Ticket.Delete(); if (number > 0) { m_From.SendLocalizedMessage(number); } else if (!string.IsNullOrEmpty(message)) { m_From.SendAsciiMessage(message); } m_From.AddToBackpack(item); } }
public static void SendRewardToPlayer(Mobile player) { Bag bagReward = new Bag(); bagReward.Hue = Utility.RandomYellowHue(); bagReward.Name = "Reward Bag"; foreach (RewardItem rewardItem in SingletonEvent.Instance.CurrentEventRewardList) { object item = CreateRewardInstance(rewardItem.RewardTypeList); // Ajusta Item if (item is Gold) { ((Gold)item).Amount = 5000; } else if (item is BaseOre || item is BaseIngot) { ((Item)item).Amount = 2; } // Send Item if (item is Item) { bagReward.DropItem((Item)item); } else if (item is BaseCreature) { ShrinkItem shrunkenPet = new ShrinkItem((BaseCreature)item); bagReward.DropItem(shrunkenPet); } } player.SendMessage("Uma Bag de Recompensa foi depositada em seu Banco!"); player.BankBox.DropItem(bagReward); }
protected override void OnTarget(Mobile from, object target) { if (Server.Spells.SpellHelper.CheckCombat(from)) { from.SendMessage("You cannot shrink your pet while your in combat."); } else if (target is BaseCreature) { BaseCreature bc = (BaseCreature)target; if (Server.Spells.SpellHelper.CheckCombat(bc)) { from.SendMessage("You cannont shrink your pet while its in combat."); } else if (bc.Summoned) { from.SendMessage("You cannont shrink a summoned pet."); } else if (!from.InRange(bc, 5)) { from.SendMessage("You need to be closer to shrink that pet."); } else if (bc.BodyMod != 0) { from.SendMessage("You cannont shrink your pet while its polymorphed."); } else if (bc.IsDeadPet) { from.SendMessage("That pet is dead."); } else if ((bc is PackLlama || bc is PackHorse || bc is Beetle) && (bc.Backpack != null && bc.Backpack.Items.Count > 0)) { from.SendMessage("You must unload your pets pack before you shrink it."); } else if (!bc.Controlled) { from.SendMessage("You have to tame the creature first before you can shrink it."); } else if (bc.Controlled && bc.ControlMaster == from) { #region Creation ShrinkItem si = new ShrinkItem(); si.Creature = bc; si.Owner = from; if (bc.Hue != 0) { si.Hue = bc.Hue; } #endregion #region Effect IEntity p1 = new Entity(Serial.Zero, new Point3D(from.X, from.Y, from.Z), from.Map); IEntity p2 = new Entity(Serial.Zero, new Point3D(from.X, from.Y, from.Z + 50), from.Map); Effects.SendMovingParticles(p2, p1, ShrinkTable.Lookup(bc), 1, 0, true, false, 0, 3, 1153, 1, 0, EffectLayer.Head, 0x100); from.PlaySound(492); #endregion #region Internalize bc.Controlled = true; bc.ControlMaster = null; bc.Internalize(); bc.OwnerAbandonTime = DateTime.MinValue; bc.IsStabled = true; #endregion #region Uses m_Shrinker.Uses -= 1; if (m_Shrinker.Uses == 0) { m_Shrinker.Delete(); } #endregion from.AddToBackpack(si); } else { from.SendMessage("Thats not your pet you may not shrink it."); } } else { from.SendMessage("You cannont shrink that."); } }
public SellPet(Mobile from, ShrinkItem shrink) : base(6104, 5) { m_From = from; m_ShrinkItem = shrink; }