public static void ToggleKeyGuard( Mobile from, Item item ) { #if( XML_ATTACHMENT_PRESENT ) { //Get guardatt attachment Keyguard guardatt = (Keyguard)XmlAttach.FindAttachment( item, typeof( Keyguard ) ); // does item already have an attachment? if( guardatt == null ) { // create a new attachment and add it XmlAttach.AttachTo( item, new Keyguard() ); guardatt = (Keyguard)XmlAttach.FindAttachment( item, typeof( Keyguard ) ); guardatt.Guard = true; guardatt.SetAttachedBy( from.Name ); guardatt.Name = "Keyguard"; from.SendMessage(264, "Item is now Guarded"); } else { //delete the attachment to reduce soap film buildup! guardatt.Delete(); from.SendMessage(33, "Item is now Un-Guarded"); } } #else { from.SendMessage( "This command only works when XML attachments are enabled." ); } #endif }
public override void GiveGift( Mobile mob ) { GiftBox box = new GiftBox(); box.DropItem( new MistletoeDeed() ); box.DropItem( new PileOfGlacialSnow() ); box.DropItem( new LightOfTheWinterSolstice() ); int random = Utility.Random( 100 ); if ( random < 60 ) box.DropItem( new DecorativeTopiary() ); else if ( random < 84 ) box.DropItem( new FestiveCactus() ); else box.DropItem( new SnowyTree() ); switch ( GiveGift( mob, box ) ) { case GiftResult.Backpack: mob.SendMessage( 0x482, "Happy Holidays from the team! Gift items have been placed in your backpack." ); break; case GiftResult.BankBox: mob.SendMessage( 0x482, "Happy Holidays from the team! Gift items have been placed in your bank box." ); break; } }
public override void OnDoubleClick( Mobile m ) { Item d = m.Backpack.FindItemByType( typeof(SigilofMinax) ); if ( d != null ) { Item c = m.Backpack.FindItemByType( typeof(SigilofLloth) ); if ( c != null ) { Item n = m.Backpack.FindItemByType( typeof(SigilofGoat) ); if ( n != null ) { Item p = m.Backpack.FindItemByType( typeof(SigilofTreefolk) ); if ( p != null ) { m.AddToBackpack( new BraceletofMinax() ); d.Delete(); c.Delete(); n.Delete(); p.Delete(); m.SendMessage( "The four Sigils of the Minaxian Minions and Minax herself have been United!" ); } } else { m.SendMessage( "You Are Missing Something..." ); } } } }
public override void GiveGift( Mobile mob ) { HalloweenBag2007 bag = new HalloweenBag2007(); bag.DropItem( new HalloweenLantern2007() ); switch ( Utility.Random( 4 ) ) { case 0: bag.DropItem(new HalloweenCloak2007()); break; case 1: bag.DropItem(new HalloweenTunic2007()); break; case 2: bag.DropItem(new HalloweenDoublet2007()); break; case 3: bag.DropItem(new HalloweenBoots2007()); break; } if ( 0.1 > Utility.RandomDouble() ) { bag.DropItem( new HalloweenOuiJaBoard2007() ); } switch ( GiveGift( mob, bag ) ) { case GiftResult.Backpack: mob.SendMessage( 0x482, "Happy Halloween from Tannis and Victoria! Gift items have been placed in your backpack." ); break; case GiftResult.BankBox: mob.SendMessage( 0x482, "Happy Halloween ffrom Tannis and Victoria! Gift items have been placed in your bank box." ); break; } }
public override void OnDoubleClick( Mobile m ) { Item a = m.Backpack.FindItemByType( typeof(ArrianasDiamond) ); if ( a != null ) { Item b = m.Backpack.FindItemByType( typeof(ArrianasClips) ); if ( b != null ) { Item c = m.Backpack.FindItemByType( typeof(ArrianasHoops) ); if ( c != null ) { m.AddToBackpack( new DiamondHoopEarrings() ); a.Delete(); b.Delete(); c.Delete(); m.SendMessage( "You Combine the knowledge of Arriana's ancestry into a Heirloom" ); this.Delete(); } } else { m.SendMessage( "You are missing something..." ); } } }
public override void OnDamage( int amount, Mobile from, bool willKill ) { if ( from != null && from.Map != null ) { int amt = 0; Mobile target = this; if ( willKill ) amt = 3 + ((Utility.Random( 6 ) % 5) >> 2); // 20% = 1, 20% = 2, 60% = 0 if ( Hits < 550 ) { double rand = Utility.RandomDouble(); if ( 0.10 > rand ) target = from; if ( 0.20 > rand ) amt++; } if ( amt > 0 ) { SpillAcid( target, amt ); if ( willKill ) from.SendMessage( "Your body explodes into a pile of venom!" ); else from.SendMessage( "The creature spits venom at you!" ); } } base.OnDamage( amount, from, willKill ); }
protected override void OnTarget( Mobile from, object target ) { if ( target == from ) from.SendMessage( "This can only be used on pets." ); else if ( target is PlayerMobile ) from.SendMessage( "You cannot dye them." ); else if ( target is Item ) from.SendMessage( "You cannot dye that." ); else if ( target is BaseCreature ) { BaseCreature c = (BaseCreature)target; if ( c.BodyValue == 400 || c.BodyValue == 401 && c.Controlled == false ) { from.SendMessage( "You cannot dye them." ); } else if ( c.ControlMaster != from && c.Controlled == false ) { from.SendMessage( "This is not your pet." ); } else if ( c.Controlled == true && c.ControlMaster == from) { c.Hue = 2118; from.SendMessage( 53, "Your pet has now been dyed." ); from.PlaySound( 0x23E ); m_Powder.Delete(); } } }
public static void DecayAccounts_Callback( Mobile from, bool okay, object state ) { if ( okay ) { List<Account> list = (List<Account>)state; CommandLogging.WriteLine( from, "{0} {1} deleting {2} old account{3}", from.AccessLevel, CommandLogging.Format( from ), list.Count, list.Count == 1 ? "" : "s" ); NetState.Pause(); for ( int i = 0; i < list.Count; ++i ) { Account a = (Account)list[i]; if ( a != null ) a.Delete(); } NetState.Resume(); from.SendMessage( "You have deleted {0} old accounts{1}.", list.Count, list.Count == 1 ? "" : "s" ); } else { from.SendMessage( "You have chosen not to delete old accounts." ); } }
public override void OnDoubleClick( Mobile from ) { if ( Parent != from ) { from.SendMessage( "The costume must be equiped to be used." ); } else if ( from.Mounted == true ) { from.SendMessage( "You cannot be mounted while wearing your costume!" ); } else if ( from.BodyMod == 0x0 ) { from.SendMessage( "You pull the mask over your head." ); from.PlaySound( 0x440 ); from.BodyMod = 75; from.DisplayGuildTitle = false; } else { from.SendMessage( "You lower the mask." ); from.PlaySound( 0x440 ); from.BodyMod = 0x0; from.DisplayGuildTitle = true; this.Transformed = false; } }
public override void OnDoubleClick( Mobile from ) { if ( IsChildOf( from.Backpack ) ) { PlayerMobile pm = (PlayerMobile)from; if ( from.Skills[SkillName.AnimalTaming].Base < 100.0 && from.Skills[SkillName.Tinkering].Base < 100.0 ) { from.SendMessage( "You have no clue how to use this." ); } else if ( FSATS.EnableBioEngineer == false ) { from.SendMessage( "Bio-Engineering has been disabled on this server, Please contact your server administrator for more information." ); } //else if ( pm.Bioenginer == false ) //{ // from.SendMessage( "You have no clue how to use this." ); //} else { from.CloseGump( typeof( SampleDNAGump ) ); from.SendGump( new SampleDNAGump( this ) ); } } else { from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. } }
protected override void OnTarget( Mobile from, object target ) { if ( target is PlayerVendor ) { PlayerVendor vendor = (PlayerVendor)target; if (vendor.IsOwner(from)) { from.SendMessage("What dost thou wish to name thy servant?"); from.Prompt = new RenamePrompt(from,vendor,m_Deed ); } else { vendor.SayTo(from, "I do not work for thee! Only my master may change my name."); } } else if (target is PlayerBarkeeper) { PlayerBarkeeper barkeep = (PlayerBarkeeper)target; if (barkeep.IsOwner(from)) { from.SendMessage("What dost thou wish to name thy servant?"); from.Prompt = new RenamePrompt(from,barkeep,m_Deed ); } else { barkeep.SayTo(from, "I do not work for thee! Only my master may change my name."); } } else { from.SendMessage("Thou canst only change the names of thy servants."); } }
protected override void OnTarget( Mobile from, object targeted ) { if( targeted is Mobile ) { Mobile m = ((Mobile)targeted); if( m == creature ) { from.SendMessage( "It cannot attack itself!" ); from.SendGump( new CreatureControl( creature, from ) ); } else { if( creature.Alive ) { m_AI.Action = ActionType.Combat; m_AI.NextMove = DateTime.Now; creature.Combatant = m; from.SendGump( new CreatureControl( creature, from ) ); } } } else { from.SendMessage( "You cannot attack that!" ); from.SendGump( new CreatureControl( creature, from ) ); } }
protected override void OnTarget( Mobile from, object targeted ) { if( from == null || targeted == null ) return; string name = String.Empty; string typename = targeted.GetType().Name; string article = "a"; if( typename != null && typename.Length > 0 ) { if( "aeiouy".IndexOf( typename.ToLower()[0] ) >= 0 ) { article = "an"; } } if( targeted is Item ) { name = ((Item)targeted).Name; } else if( targeted is Mobile ) { name = ((Mobile)targeted).Name; } if( name != String.Empty && name != null ) { from.SendMessage( "That is {0} {1} named '{2}'", article, typename, name ); } else { from.SendMessage( "That is {0} {1} with no name", article, typename ); } }
protected override void OnTarget( Mobile from, object target ) { if( target is HitchingPost ) { HitchingPost post = (HitchingPost)target; if( !from.InRange(post.GetWorldLocation(), 1) ) from.SendLocalizedMessage(500295); else { from.LocalOverheadMessage(MessageType.Regular, from.EmoteHue, false, "*ties the rope to the hitching post ring*"); from.SendMessage("Target the pet you wish to hitch."); from.Target = new PostToPetTarget(); } } else if( target is BaseCreature ) from.SendMessage("You must tie the rope to a hitching post before being able to hitch your pet."); else if( target is PlayerMobile ) from.SendMessage("The person looks at you in disgust."); else if( target == from ) from.SendMessage("That would be a stupid idea."); }
public override void OnDoubleClick( Mobile m ) { Item a = m.Backpack.FindItemByType( typeof(EnchantedRope) ); if ( a != null ) { Item b = m.Backpack.FindItemByType( typeof(GlowingShipModel) ); if ( b != null ) { Item c = m.Backpack.FindItemByType( typeof(SacredAnchor) ); if ( c != null ) { Item d = m.Backpack.FindItemByType( typeof(SpecialSeaMap) ); if ( d != null ) { m.AddToBackpack( new MasterOfTheSeaChest() ); a.Delete(); b.Delete(); c.Delete(); d.Delete(); m.SendMessage( "You place the artifacts into the Sea Chest for a Full Master of the Sea Chest!" ); this.Delete(); } } } } else { m.SendMessage( "You are missing some artifacts." ); } }
protected override void OnTarget( Mobile from, object target ) { if( target == from ) from.SendMessage( "You cant do that." ); else if( target is BaseCreature ) { BaseCreature c = (BaseCreature)target; Mobile master = c.ControlMaster; if( c.Controlled == false ) { from.SendMessage( "That creature is not tamed." ); } else if( !c.IsDeadPet ) { from.SendMessage( "That creature is alive." ); } else if ( c != null && c.IsDeadPet ) { master.SendGump( new PetResurrectGump( from, c ) ); from.PlaySound( 0x214 ); from.FixedEffect( 0x376A, 10, 16 ); m_Powder.Consume(); from.AddToBackpack(new Bottle()); } } }
protected override void OnTarget( Mobile from, object target ) { if ( target is BaseWeapon || target is BaseArmor || target is BaseClothing || target is BaseJewel ) { Item item = (Item)target; XmlLevelItem a = (XmlLevelItem)XmlAttach.FindAttachment(item, typeof(XmlLevelItem)); if ( a != null ) { from.SendMessage( "That already is levelable!"); return; } else { if( item.RootParent != from ) // Make sure its in their pack or they are wearing it { from.SendMessage( "You cannot make that levelable there!" ); } else { XmlAttach.AttachTo(item, new XmlLevelItem()); from.SendMessage( "You magically make the item levelable..." ); m_Deed.Delete(); } } } else { from.SendMessage( "You cannot make that levelable" ); } }
public void Carve( Mobile from, Item item ) { Effects.PlaySound( GetWorldLocation(), Map, 0x48F ); Effects.SendLocationEffect( GetWorldLocation(), Map, 0x3728, 10, 10, 0, 0 ); if ( 0.5 > Utility.RandomDouble() ) { if ( ItemID == 0xF7E ) from.SendMessage( "You destroy the bone." ); else from.SendMessage( "You destroy the bone pile." ); Gold gold = new Gold( 25, 100 ); gold.MoveToWorld( GetWorldLocation(), Map ); Delete(); m_Timer.Stop(); } else { if ( ItemID == 0xF7E ) from.SendMessage( "You damage the bone." ); else from.SendMessage( "You damage the bone pile." ); } }
public override bool TryDropItem( Mobile from, Item dropped, bool sendFullMessage ) { if ( m_Participant == null || !m_Participant.Contains( from ) ) { if ( sendFullMessage ) from.SendMessage( "You are not allowed to place items here." ); return false; } if ( dropped is Container || dropped.Stackable ) { if ( sendFullMessage ) from.SendMessage( "That item cannot be used as stakes." ); return false; } if ( !base.TryDropItem( from, dropped, sendFullMessage ) ) return false; if ( from != null ) m_Owners[dropped] = from; return true; }
public override void OnDoubleClick( Mobile from ) { BaseCreature squi = new Squire(); if ( !IsChildOf( from.Backpack ) ) { from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. squi.Delete(); } else if ( from.FollowersMax - from.Followers < 5 ) { from.SendMessage( "You have too many followers to have a squire at the moment." ); squi.Delete(); } else { squi.Controlled = true; squi.ControlMaster = from; squi.ControlOrder = OrderType.Follow; squi.ControlTarget = from; squi.Direction = from.Direction & Direction.Mask; squi.MoveToWorld( from.Location, from.Map ); from.SendMessage( squi.Name + " has arrived, meet your new squire!" ); this.Delete(); } }
// When this object -- the bottle -- is double-clicked... public override void OnDoubleClick(Mobile m) { if (m.Followers >= m.FollowersMax) // If the player's followers is greater than or equal to his max followers... { m.SendMessage("You need at least one free follower slot to open the bottle."); } else if (((m.InRange(this, 1) && m.CanSee(this)) || this.IsChildOf(m.Backpack)) && (!GetGooInBottle())) // If the bottle is in-range and the goo is not in its bottle... { m.SendMessage("The goo is out of its bottle!"); m.SendLocalizedMessage(1010018); // What do you want to use this item on? m.Target = new BottleOfGooTarget(this, gooPet); // Creates a target from this mobile with the goo mobile thrown to the new class as a reference. } else if (((m.InRange(this, 1) && m.CanSee(this)) || this.IsChildOf(m.Backpack)) && (GetGooInBottle())) // If the bottle is in-range and the goo IS in its bottle, this function creates a new goo mobile. { gooPet = new Goo(this); ((GenericWarrior)gooPet).Controlled = true; ((GenericWarrior)gooPet).ControlMaster = m; gooPet.MoveToWorld(m.Location, m.Map); gooPet.PlaySound(0x1CC); gooPet.Emote("*leaps out of " + m.Name + "'s bottle!*"); SetGooInBottle(false); } else { m.SendLocalizedMessage(500446); //That is too far away. } }
public override void OnDoubleClick(Mobile m) { Item e = m.Backpack.FindItemByType(typeof(AncientSmeltingBox)); if (e != null) { Item a = m.Backpack.FindItemByType(typeof(SosarianOre)); Item b = m.Backpack.FindItemByType(typeof(EnergizerCrystal)); Item c = m.Backpack.FindItemByType(typeof(StarMetalFragments)); Item d = m.Backpack.FindItemByType(typeof(SpecialCharcoal)); if (e == null || e.Amount < 1 || a == null || a.Amount < 1 || b == null || b.Amount < 1 || c == null || c.Amount < 1 || d == null || d.Amount < 1) { m.SendMessage("You are missing something..."); } else { m.AddToBackpack(new EnergizedSosarianIngots()); a.Delete(); b.Delete(); c.Delete(); d.Delete(); m.SendMessage("You Combine the items into the Energized Sosarian Ingots"); this.Delete(); } } }
public override void OnDoubleClick(Mobile from) { MerlinsStaff Staff = from.FindItemOnLayer(Layer.TwoHanded) as MerlinsStaff; if (Parent != from) { from.SendMessage("You remember that you must equip the staff to summon a portal to Merlin"); } else { Item marker1 = from.Backpack.FindItemByType(typeof(Marker1)); if (marker1 != null) { marker1.Delete(); from.AddToBackpack(new Marker2()); from.AddToBackpack(new Tablet()); from.FixedParticles(0x3709, 1, 30, 9904, 1108, 6, EffectLayer.RightFoot); from.SendGump(new MerlinsQuestGump6(from)); from.SendMessage("Muahahahaha!!!! You fool!"); Talon2 tl = new Talon2(); tl.Map = from.Map; tl.Location = from.Location; Delete(); } else { from.SendMessage("You have no right to have this staff!!!!"); } } }
public void Hatch( Mobile from ) { IEvoCreature evo = GetEvoCreature(); if ( null != evo ) { BaseEvoSpec spec = evo.GetEvoSpec(); BaseCreature creature = evo as BaseCreature; if ( null != spec && null != spec.Stages && !creature.Deleted ) { if ( spec.Tamable && spec.MinTamingToHatch > from.Skills[SkillName.AnimalTaming].Value ) { from.SendMessage( "A minimum animal taming skill of {0} is required to hatch this egg.", spec.Stages[0].MinTameSkill ); creature.Delete(); } else if ( from.FollowersMax - from.Followers < spec.Stages[0].ControlSlots ) { from.SendMessage( "You have too many followers to hatch this egg." ); creature.Delete(); } else { creature.Controlled = true; creature.ControlMaster = from; creature.IsBonded = true; creature.MoveToWorld( from.Location, from.Map ); creature.ControlOrder = OrderType.Follow; Delete(); from.SendMessage( "You are now the proud owner of " + creature.Name + "!" ); creature.Owners.Add(from); } } } }
protected override void OnTarget( Mobile from, object targ ) { if (targ is Object) { if (targ is Container) { from.SendMessage("You cannot add containers to containers. Sorry!"); } else { if (targ is Item) { Item itemtobag = targ as Item; if ( itemtobag.IsChildOf( from.Backpack ) ) // Make sure its in their pack { from.SendMessage("Select the Container you wish to toss the items in."); from.Target = new TargetBag(itemtobag); } else { from.SendMessage("Item must be in your backpack in order to initiate Mass Bagging!"); } } else { from.SendMessage("You can only bag items!"); } } } else { from.SendMessage("You cannot bag that!"); } }
protected override void OnTarget(Mobile m_From, object targeted) { //string SetName = "tadek"; if (targeted is Mobile) { Mobile m_Target = (Mobile)targeted; if (m_Target is PlayerMobile) { if (((PlayerMobile)m_Target).SetNames.ContainsKey(m_From.Serial) == false) { ((PlayerMobile)m_From).SendGump(new SetNameGump((PlayerMobile)m_From, m_Target)); //((PlayerMobile)m_From).SetNames.Add(m_Target.Serial, SetName); //((PlayerMobile)m_From).SendGump(new WrodzoneGump(((PlayerMobile)m_From), m_Target)); //m_From.SendMessage("Nadales przydomek"); // m_Target.SendMessage("Podal Ci Imie: {0}", m_From.Name); } else { m_From.SendMessage("Już ma przydomek"); } } else { m_From.SendMessage("To nie jest gracz!"); } } else { m_From.SendMessage("Nie mozesz tego nazwac!"); } }
public void DropTarget(Mobile from, object obj) { if(!(obj is SlayerForge)) { from.SendMessage("Ceci n'est pas une forge adéquate"); return; } SlayerForge forge = (SlayerForge)obj; if(forge.SuperSlayer != SuperSlayerType.None) { from.SendMessage("Cette forge contient déjà une relique"); return; } if (!(forge.CanAddRelic)) { from.SendMessage("Cette forge ne peut accepter de relique"); return; } from.SendMessage("Vous jetez la relique dans la forge"); forge.SuperSlayer = SuperSlayerType.Elemental; this.Delete(); }
protected override void OnTarget(Mobile from, object targeted) { if (targeted is BaseCreature) { foreach (object item in World.Items.Values) { if (item is ESpawner) { ESpawner spawner = (ESpawner)item; foreach (EclSpawnEntry entry in spawner.SpawnEntries) { foreach (object o in entry.SpawnObjects) { if (o is BaseCreature) { if (((BaseCreature)o).Serial == ((BaseCreature)targeted).Serial) { from.Location = spawner.Location; from.Map = spawner.Map; from.SendMessage(55, "Spawner found for creature."); return; } } } } } } } from.SendMessage(55, "No spawner found for creature."); }
protected override void OnTarget( Mobile from, object targeted ) { IPoint3D p = targeted as IPoint3D; if ( p == null ) return; else if ( p is Item ) p = ((Item)p).GetWorldTop(); if ( m_First ) { from.SendMessage( "Target another location to complete the bounding box." ); from.Target = new PickTarget( new Point3D( p ), false, from.Map, m_Callback, m_State ); } else if ( from.Map != m_Map ) { from.SendMessage( "Both locations must reside on the same map." ); } else if ( m_Map != null && m_Map != Map.Internal && m_Callback != null ) { Point3D start = m_Store; Point3D end = new Point3D( p ); Utility.FixPoints( ref start, ref end ); m_Callback( from, m_Map, start, end, m_State ); } }
private static void Path( Mobile from, IPoint3D p, PathAlgorithm alg, string name, int zOffset ) { m_OverrideAlgorithm = alg; long start = DateTime.Now.Ticks; MovementPath path = new MovementPath( from, new Point3D( p ) ); long end = DateTime.Now.Ticks; double len = Math.Round( (end-start) / 10000.0, 2 ); if ( !path.Success ) { from.SendMessage( "{0} path failed: {1}ms", name, len ); } else { from.SendMessage( "{0} path success: {1}ms", name, len ); int x = from.X; int y = from.Y; int z = from.Z; for ( int i = 0; i < path.Directions.Length; ++i ) { Movement.Movement.Offset( path.Directions[i], ref x, ref y ); new RecallRune().MoveToWorld( new Point3D( x, y, z+zOffset ), from.Map ); } } }
public static bool Handle(Mobile from, string text, MessageType type = MessageType.Regular) { if (!text.StartsWith(Prefix) && type != MessageType.Command) { return(false); } if (type != MessageType.Command) { text = text.Substring(Prefix.Length); } var indexOf = text.IndexOf(' '); string command; string[] args; string argString; if (indexOf >= 0) { argString = text.Substring(indexOf + 1); command = text.Substring(0, indexOf); args = Split(argString); } else { argString = ""; command = text.ToLower(); args = Array.Empty <string>(); } Entries.TryGetValue(command, out var entry); if (entry != null) { if (from.AccessLevel >= entry.AccessLevel) { if (entry.Handler != null) { var e = new CommandEventArgs(from, command, argString, args); entry.Handler(e); EventSink.InvokeCommand(e); } } else { if (from.AccessLevel <= BadCommandIgnoreLevel) { return(false); } from.SendMessage("You do not have access to that command."); } } else { if (from.AccessLevel <= BadCommandIgnoreLevel) { return(false); } from.SendMessage("That is not a valid command."); } return(true); }
public override void OnResponse(NetState state, RelayInfo info) { Mobile m = state.Mobile; switch (info.ButtonID) { case 0: { break; } case 1: { if (info.Switches.Length < switches) { m.SendGump(new SkillPickGump(m_SkillBallPlus)); m.SendMessage(0, "You must pick {0} more skills.", switches - info.Switches.Length); break; } else if (info.Switches.Length > switches) { m.SendGump(new SkillPickGump(m_SkillBallPlus)); m.SendMessage(0, "Please get rid of {0} skills, you have exceeded the 7 skills that are allowed.", info.Switches.Length - switches); break; } else { Server.Skills skills = m.Skills; for (int i = 0; i < skills.Length; ++i) { // skills[i].Base = 0; if (info.IsSwitched(1)) // ------------------------------------------------ Alchemy { m.Skills[SkillName.Alchemy].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new Bottle(10)); pack.DropItem(new MortarPestle()); pack.DropItem(new BagOfReagents(50)); } } } if (info.IsSwitched(2)) // ------------------------------------------------ Anatomy { m.Skills[SkillName.Anatomy].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new Bandage(50)); } } if (info.IsSwitched(3)) // ------------------------------------------------ AnimalLore { m.Skills[SkillName.AnimalLore].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new ShepherdsCrook()); } } if (info.IsSwitched(4)) // ------------------------------------------------ AnimalTaming { m.Skills[SkillName.AnimalTaming].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new Apple(10)); } } if (info.IsSwitched(5)) // ------------------------------------------------ Archery { m.Skills[SkillName.Archery].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new Arrow(200)); pack.DropItem(new Bow( )); } } if (info.IsSwitched(6)) // ------------------------------------------------ ArmsLore { m.Skills[SkillName.ArmsLore].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new IronIngot(50)); } } if (info.IsSwitched(7)) // ------------------------------------------------ Begging { m.Skills[SkillName.Begging].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new BankCheck(5000)); } } if (info.IsSwitched(9)) // ------------------------------------------------ Blacksmith { m.Skills[SkillName.Blacksmith].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new IronIngot(50)); pack.DropItem(new Tongs()); pack.DropItem(new Pickaxe()); pack.DropItem(new Pickaxe()); pack.DropItem(new Shovel()); } } if (info.IsSwitched(11)) // ------------------------------------------------ Camping { m.Skills[SkillName.Camping].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new Bedroll()); pack.DropItem(new Kindling(20)); } } if (info.IsSwitched(13)) // ------------------------------------------------ Carpentry { m.Skills[SkillName.Carpentry].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new Saw()); pack.DropItem(new Board(100)); } } if (info.IsSwitched(14)) // ------------------------------------------------ Cooking { m.Skills[SkillName.Cooking].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new Kindling(10)); pack.DropItem(new RawLambLeg()); pack.DropItem(new RawChickenLeg()); pack.DropItem(new RawFishSteak()); pack.DropItem(new SackFlour()); pack.DropItem(new Pitcher(BeverageType.Water)); } } if (info.IsSwitched(15)) // ------------------------------------------------ Fishing { m.Skills[SkillName.Fishing].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new FishingPole()); pack.DropItem(new FishingPole()); pack.DropItem(new FishingPole()); pack.DropItem(new FloppyHat(Utility.RandomYellowHue())); } } if (info.IsSwitched(17)) // ------------------------------------------------ Healing { m.Skills[SkillName.Healing].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new Bandage(50)); pack.DropItem(new Scissors()); } } if (info.IsSwitched(18)) // ------------------------------------------------ Herding { m.Skills[SkillName.Herding].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new ShepherdsCrook()); } } if (info.IsSwitched(19)) // ------------------------------------------------ Lockpicking { m.Skills[SkillName.Lockpicking].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new Lockpick(20)); } } if (info.IsSwitched(20)) // ------------------------------------------------ Lumberjacking { m.Skills[SkillName.Lumberjacking].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new Hatchet()); pack.DropItem(new FullApron(Utility.RandomYellowHue())); } } if (info.IsSwitched(21)) // ------------------------------------------------ Magery { m.Skills[SkillName.Magery].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new Spellbook(UInt64.MaxValue)); pack.DropItem(new BagOfReagents(50)); } } if (info.IsSwitched(22)) // ------------------------------------------------ Meditation { m.Skills[SkillName.Meditation].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new DecoCrystalBall()); } } if (info.IsSwitched(23)) // ------------------------------------------------ Mining { m.Skills[SkillName.Mining].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new Pickaxe()); pack.DropItem(new Pickaxe()); pack.DropItem(new Pickaxe()); pack.DropItem(new Shovel()); pack.DropItem(new Shovel()); pack.DropItem(new Shovel()); } } if (info.IsSwitched(24)) // ------------------------------------------------ Musicianship { m.Skills[SkillName.Musicianship].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new Lute()); pack.DropItem(new LapHarp()); pack.DropItem(new TambourineTassel()); pack.DropItem(new Drums()); } } if (info.IsSwitched(27)) // ------------------------------------------------ RemoveTrap { m.Skills[SkillName.RemoveTrap].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new GreaterHealPotion(3)); } } if (info.IsSwitched(28)) // ------------------------------------------------ MagicResist { m.Skills[SkillName.MagicResist].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new FireballWand()); pack.DropItem(new LightningWand()); pack.DropItem(new MagicArrowWand()); } } if (info.IsSwitched(29)) // ------------------------------------------------ Snooping { m.Skills[SkillName.Snooping].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new BankCheck(5000)); } } if (info.IsSwitched(31)) // ------------------------------------------------ Stealing { m.Skills[SkillName.Stealing].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new BankCheck(5000)); } } if (info.IsSwitched(32)) // ------------------------------------------------ Stealth { m.Skills[SkillName.Stealth].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new BurglarsBandana()); } } if (info.IsSwitched(33)) // ------------------------------------------------ Tailoring { m.Skills[SkillName.Tailoring].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new BoltOfCloth( )); pack.DropItem(new Cloth(100)); pack.DropItem(new SewingKit( )); pack.DropItem(new SewingKit( )); pack.DropItem(new SewingKit( )); } } if (info.IsSwitched(34)) // ------------------------------------------------ Tinkering { m.Skills[SkillName.Tinkering].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new TinkerTools()); pack.DropItem(new IronIngot(20)); } } if (info.IsSwitched(35)) // ------------------------------------------------ Veterinary { m.Skills[SkillName.Veterinary].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new Bandage(50)); } } if (info.IsSwitched(36)) // ------------------------------------------------ Fencing { m.Skills[SkillName.Fencing].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new Kryss()); } } if (info.IsSwitched(37)) // ------------------------------------------------ Macing { m.Skills[SkillName.Macing].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new Mace()); } } if (info.IsSwitched(38)) // ------------------------------------------------ Parry { m.Skills[SkillName.Parry].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new MetalKiteShield()); } } if (info.IsSwitched(39)) // ------------------------------------------------ Swords { m.Skills[SkillName.Swords].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new Longsword()); } } if (info.IsSwitched(40)) // ------------------------------------------------ Tactics { m.Skills[SkillName.Tactics].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new Gold(500)); } } if (info.IsSwitched(41)) // ------------------------------------------------ Wrestling { m.Skills[SkillName.Wrestling].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new LeatherGloves()); } } if (info.IsSwitched(42)) // ------------------------------------------------ Cartography { m.Skills[SkillName.Cartography].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new BlankMap()); pack.DropItem(new BlankMap()); pack.DropItem(new BlankMap()); pack.DropItem(new BlankMap()); pack.DropItem(new Sextant()); } } if (info.IsSwitched(43)) // ------------------------------------------------ DetectHidden { m.Skills[SkillName.DetectHidden].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new Cloak(0x455)); } } if (info.IsSwitched(44)) // ------------------------------------------------ Inscribe { m.Skills[SkillName.Inscribe].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new BlankScroll(10)); pack.DropItem(new BlueBook( )); } } if (info.IsSwitched(45)) // ------------------------------------------------ Peacemaking { m.Skills[SkillName.Peacemaking].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new Tambourine()); } } if (info.IsSwitched(46)) // ------------------------------------------------ Poisoning { m.Skills[SkillName.Poisoning].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new LesserPoisonPotion()); pack.DropItem(new LesserPoisonPotion()); pack.DropItem(new LesserPoisonPotion()); } } if (info.IsSwitched(47)) // ------------------------------------------------ Provocation { m.Skills[SkillName.Provocation].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new BambooFlute()); } } if (info.IsSwitched(48)) // ------------------------------------------------ SpiritSpeak { m.Skills[SkillName.SpiritSpeak].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new BagOfNecroReagents(50)); } } if (info.IsSwitched(49)) // ------------------------------------------------ Tracking { m.Skills[SkillName.Tracking].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new BearMask(0x1545)); } } if (info.IsSwitched(50)) // ------------------------------------------------ EvalInt { m.Skills[SkillName.EvalInt].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new BagOfReagents(50)); } } if (info.IsSwitched(51)) // ------------------------------------------------ Forensics { m.Skills[SkillName.Forensics].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new SkinningKnife(0xEC4)); } } if (info.IsSwitched(52)) // ------------------------------------------------ ItemID { m.Skills[SkillName.ItemID].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new IDWand(25)); } } if (info.IsSwitched(53)) // ------------------------------------------------ TasteID { m.Skills[SkillName.TasteID].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new GreaterHealPotion(1)); pack.DropItem(new GreaterAgilityPotion(1)); pack.DropItem(new GreaterStrengthPotion(1)); } } if (info.IsSwitched(55)) // ------------------------------------------------ Hiding // { // m.Skills[SkillName.Hiding].Base = val; // Container pack = m.Backpack; // if (pack != null) // { // pack.DropItem( new BagOfSmokeBombs(20) ); // } // } { if (info.IsSwitched(56)) // ------------------------------------------------ Fletching { m.Skills[SkillName.Fletching].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new FletcherTools(0x1022)); pack.DropItem(new Shaft(50)); pack.DropItem(new Feather(50)); } } } if (info.IsSwitched(57)) // ------------------------------------------------ Focus { m.Skills[SkillName.Focus].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new Chessboard(0xFA6)); } } if (info.IsSwitched(58)) // ------------------------------------------------ Throwing { m.Skills[SkillName.Throwing].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new ThrowingDagger()); } } if (info.IsSwitched(59)) // ------------------------------------------------ Bushido { m.Skills[SkillName.Bushido].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new BookOfBushido()); } } if (info.IsSwitched(60)) // ------------------------------------------------ Chivalry { m.Skills[SkillName.Chivalry].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new BookOfChivalry((UInt64)0x3FF)); } } if (info.IsSwitched(61)) // ------------------------------------------------ Imbuing { m.Skills[SkillName.Imbuing].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new RunicHammer(CraftResource.Valorite)); } } if (info.IsSwitched(62)) // ------------------------------------------------ Mysticism { m.Skills[SkillName.Mysticism].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new Bone(50)); pack.DropItem(new DaemonBone(50)); pack.DropItem(new FertileDirt(50)); } } if (info.IsSwitched(63)) // ------------------------------------------------ Necromancy { m.Skills[SkillName.Necromancy].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new NecromancerSpellbook((UInt64)0xFFFF)); pack.DropItem(new BagOfNecroReagents(50)); } } if (info.IsSwitched(64)) // ------------------------------------------------ Ninjitsu { m.Skills[SkillName.Ninjitsu].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new BookOfNinjitsu()); } } if (info.IsSwitched(65)) // ------------------------------------------------ Spellweaving { m.Skills[SkillName.Spellweaving].Base = val; Container pack = m.Backpack; if (pack != null) { new SpellweavingBook((Int64)0xFFFF); } } if (info.IsSwitched(66)) // ------------------------------------------------ Discordance { m.Skills[SkillName.Discordance].Base = val; Container pack = m.Backpack; if (pack != null) { pack.DropItem(new Harp()); } } m_SkillBallPlus.Delete(); } break; } } }
public static void StartDuel(bool TwoPlayers, PlayerMobile challenger, ArrayList m_Stones) { Mobile from = (Mobile)challenger; PlayerMobile m = from as PlayerMobile; Items.ChallengeGameType m_Game; if (TwoPlayers) { m_Game = ChallengeGameType.TwoPlayerTeam; } else { m_Game = ChallengeGameType.OnePlayerTeam; } foreach (Item chall in m_Stones) { ChallengeStone challstone = chall as ChallengeStone; if (challstone.Active == true && challstone.Game == m_Game) { if (m.Frozen == true) { from.SendMessage(43, "You cannot use right now because you are frozen!"); return; } else if (m.Young) { from.SendMessage(43, "You can not use the ladder system if your young!"); return; } else if (m.IsInChallenge) { from.SendMessage(43, "You are already in the process of using the ladder system!"); return; } /* else if ( from.Map == Map.Trammel || from.Map == Map.Malas || from.Map == Map.Ilshenar ) * { * from.SendMessage(1266, "You can only duel in Felucca as we are having problems dueling in other facets!" ); * } */ else { challstone.ClearAll(); challenger.IsInChallenge = true; challstone.OnDoubleClick(from); { if (m.Hits != m.HitsMax) { m.Hits = m.HitsMax; m.Mana = 125; m.Stam = 125; } return; } } } } }