public override void Drink( Mobile from ) { if( from.InRange( GetWorldLocation(), 1) && from.InLOS( this ) ) from.Target = new ShrinkTarget( from, this, false ); else from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. }
public override void OnDoubleClick( Mobile from ) { if ( !from.InRange( GetWorldLocation(), 2 ) || !from.InLOS( this ) ) { from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that } else if ( Visible && ( ItemID == 4656 || ItemID == 4702 ) && DateTime.Now >= m_NextUse ) { Point3D p = GetWorldLocation(); if ( 1 > Utility.Random( Math.Max( Math.Abs( from.X - p.X ), Math.Abs( from.Y - p.Y ) ) ) ) { Effects.PlaySound( from.Location, from.Map, from.GetHurtSound() ); from.PublicOverheadMessage( MessageType.Regular, from.SpeechHue, true, "Ouch!" ); SpellHelper.Damage( TimeSpan.FromSeconds( 0.5 ), from, Utility.Dice( 2, 10, 5 ) ); } Effects.PlaySound( GetWorldLocation(), Map, 0x387 ); Timer.DelayCall( TimeSpan.FromSeconds( 0.25 ), new TimerCallback( Down1 ) ); Timer.DelayCall( TimeSpan.FromSeconds( 0.50 ), new TimerCallback( Down2 ) ); Timer.DelayCall( TimeSpan.FromSeconds( 5.00 ), new TimerCallback( BackUp ) ); m_NextUse = DateTime.Now + TimeSpan.FromSeconds( 10.0 ); } }
public override void OnDoubleClick(Mobile from) { if ((!from.InRange(GetWorldLocation(), 2) || !from.InLOS(this)) && from.AccessLevel == AccessLevel.Player) { from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. return; } m_TimeOut = DateTime.Now - m_LastBuild; if (m_UpdateTimer < m_TimeOut || itemarray == null) BuildArrayList(from); else if (turboslotsarray != null) { foreach (TurboSlot t in turboslotsarray) { if ((t == null || t.Deleted) ) { BuildArrayList(from); break; } } } if (turboslotsarray != null) { from.CloseGump(typeof(TurboSlotsStatGump)); from.SendGump(new TurboSlotsStatGump(from, turboslotsarray)); } }
public void OnTarget(Mobile from, object obj) { if (!from.InRange(GetWorldLocation(), 5) || !from.InLOS(this)) from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. else if (obj is Corpse) { Corpse c = obj as Corpse; if (c.Carved) return; if (c.Owner is PlayerMobile) { ((ICarvable)obj).Carve(from, this); c.PublicOverheadMessage(MessageType.Emote, 33, true, string.Format("*You see {0} steal the soul of {1}*", from.Name, c.Owner.Name)); from.PlaySound(0x19c); from.PlaySound(20); from.PlaySound(230); Effects.SendLocationEffect(c.Location, c.Map, 0x37c4, 18, 15, 1); } else ((ICarvable) obj).Carve(from, this); } else from.SendAsciiMessage("You cannot use this on that"); }
public override void OnHit(Mobile attacker, Mobile defender, int damage) { ClearCurrentAbility(attacker); attacker.SendLocalizedMessage(1060084); // You attack with lightning speed! defender.SendLocalizedMessage(1060085); // Your attacker strikes with lightning speed! defender.PlaySound(0x3BB); defender.FixedEffect(0x37B9, 244, 25); // Swing again: // If no combatant, wrong map, one of us is a ghost, or cannot see, or deleted, then stop combat if (defender == null || defender.Deleted || attacker.Deleted || defender.Map != attacker.Map || !defender.Alive || !attacker.Alive || !attacker.CanSee(defender)) { attacker.Combatant = null; return; } IWeapon weapon = attacker.Weapon; if (weapon == null) return; if (!attacker.InRange(defender, weapon.MaxRange)) return; if (attacker.InLOS(defender)) { BaseWeapon.InDoubleStrike = true; attacker.RevealingAction(); attacker.NextCombatTime = DateTime.Now + weapon.OnSwing(attacker, defender); BaseWeapon.InDoubleStrike = false; } }
public override void OnDoubleClick( Mobile from ) { Direction dir; if ( from.Location != this.Location ) dir = from.GetDirectionTo( this ); else if ( this.East ) dir = Direction.West; else dir = Direction.North; from.Direction = dir; bool canThrow = true; if ( !from.InRange( this, 4 ) || !from.InLOS( this ) ) canThrow = false; else if ( this.East ) canThrow = ( dir == Direction.Left || dir == Direction.West || dir == Direction.Up ); else canThrow = ( dir == Direction.Up || dir == Direction.North || dir == Direction.Right ); if ( canThrow ) Throw( from ); else from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that. }
public override void OnDoubleClick(Mobile from) { if (Filled) { if (from.InRange(this, 3) && from.InLOS(this)) { from.SendAsciiMessage("You look at the Tombstone"); from.PlaySound(47); from.SendGump(new GraveGump()); } else if (IsChildOf(from.Backpack)) { from.SendAsciiMessage("You look at the Tombstone"); from.PlaySound(47); from.SendGump(new GraveGump()); } else { from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. } } if (!(Filled)) { if (!IsChildOf(from.Backpack)) from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. else { from.Target = new InternalTarget(this); from.SendAsciiMessage("This tombstone is blank!"); from.SendAsciiMessage("Target a players head to bury them."); } } }
public void BeginSacrifice( Mobile from ) { if ( Deleted ) return; if ( m_Skull != null && m_Skull.Deleted ) Skull = null; if ( from.Map != Map || !from.InRange( GetWorldLocation(), 3 ) || !from.InLOS(this) ) { from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. } else if ( !Harrower.CanSpawn ) { from.SendMessage( "The harrower has already been spawned." ); } else if ( m_Skull == null ) { from.SendLocalizedMessage( 1049485 ); // What would you like to sacrifice? from.Target = new SacrificeTarget( this ); } else { SendLocalizedMessageTo( from, 1049487, "" ); // I already have my champions awakening skull! } }
public static void Resurrect( Mobile m, Item item ) { if ( m.InRange(item, 2) && m.InLOS(item)) { if (!m.Alive) { if (m.Map == null || !m.Map.CanFit(m.Location, 16, false, false)) { m.SendLocalizedMessage(502391); // Thou can not be resurrected there! } else if (m.Region is HouseRegion) { m.SendAsciiMessage("You can't get resurrected in house regions."); } else { m.PlaySound(0x214); m.FixedEffect(0x376A, 10, 16); m.Resurrect(); //m.CloseGump(typeof(ResurrectGump)); //m.SendGump(new ResurrectGump(m, item, ResurrectMessage.VirtueShrine)); } } } else { m.LocalOverheadMessage(MessageType.Regular, 906, 1019045); // I can't reach that. } }
public override void OnDoubleClick( Mobile from ) { if (from.InRange(GetWorldLocation(), 2) && from.InLOS(this)) Roll(from); else from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. }
public override void OnDoubleClick( Mobile from ) { if ( !from.InRange( GetWorldLocation(), 3 ) || !from.InLOS(this)) from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that. else from.SendAsciiMessage( "This looks like part of a larger contraption." ); }
private bool CheckUse( Mobile from ) { if ( !IsAccessibleTo( from ) ) return false; if ( from.Map != Map || !from.InRange( GetWorldLocation(), 2 ) || !from.InLOS(this) ) { from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that. return false; } if ( !from.CanBeginAction( typeof( FireHorn ) ) ) { from.SendLocalizedMessage( 1049615 ); // You must take a moment to catch your breath. return false; } int sulfAsh = Core.AOS ? 4 : 15; if ( from.Backpack == null || from.Backpack.GetAmount( typeof( SulfurousAsh ) ) < sulfAsh ) { from.SendLocalizedMessage( 1049617 ); // You do not have enough sulfurous ash. return false; } return true; }
public override void OnDoubleClick(Mobile from) { if (Parent != null || !VerifyMove(from)) return; if (!from.InRange(this, 2) || !from.InLOS(this)) { from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. return; } if (ItemID == 0xA57) // rolled { Direction dir = PlayerMobile.GetDirection4(from.Location, Location); if (dir == Direction.North || dir == Direction.South) ItemID = 0xA55; else ItemID = 0xA56; } else // unrolled { ItemID = 0xA57; //Iza - do not send gump //if ( !from.HasGump( typeof( LogoutGump ) ) ) //{ // CampfireEntry entry = Campfire.GetEntry( from ); // if ( entry != null && entry.Safe ) // from.SendGump( new LogoutGump( entry, this ) ); //} } }
public static void CheckAnvilAndForge( Mobile from, int range, out bool anvil, out bool forge ) { anvil = false; forge = false; Map map = from.Map; if ( map == null ) return; IPooledEnumerable eable = map.GetItemsInRange( from.Location, range ); foreach ( Item item in eable ) { Type type = item.GetType(); bool isAnvil = ( type.IsDefined( typeofAnvil, false ) || item.ItemID == 4015 || item.ItemID == 4016 || item.ItemID == 0x2DD5 || item.ItemID == 0x2DD6 ); bool isForge = ( type.IsDefined( typeofForge, false ) || item.ItemID == 4017 || (item.ItemID >= 6522 && item.ItemID <= 6569) || item.ItemID == 0x2DD8 ); if ( isAnvil || isForge ) { if ( (from.Z + 16) < item.Z || (item.Z + 16) < from.Z || !from.InLOS( item ) ) continue; anvil = anvil || isAnvil; forge = forge || isForge; if ( anvil && forge ) break; } } eable.Free(); for ( int x = -range; (!anvil || !forge) && x <= range; ++x ) { for ( int y = -range; (!anvil || !forge) && y <= range; ++y ) { StaticTile[] tiles = map.Tiles.GetStaticTiles( from.X+x, from.Y+y, true ); for ( int i = 0; (!anvil || !forge) && i < tiles.Length; ++i ) { int id = tiles[i].ID; bool isAnvil = ( id == 4015 || id == 4016 || id == 0x2DD5 || id == 0x2DD6 ); bool isForge = ( id == 4017 || (id >= 6522 && id <= 6569) || id == 0x2DD8 ); if ( isAnvil || isForge ) { if ( (from.Z + 16) < tiles[i].Z || (tiles[i].Z + 16) < from.Z || !from.InLOS( new Point3D( from.X+x, from.Y+y, tiles[i].Z + (tiles[i].Height/2) + 1 ) ) ) continue; anvil = anvil || isAnvil; forge = forge || isForge; } } } } }
public override void OnDoubleClick( Mobile from ) { Point3D loc = GetWorldLocation(); if (!from.InLOS(loc) || !from.InRange(loc, 2)) from.LocalOverheadMessage(MessageType.Regular, 0x3E9, 1019045); // I can't reach that else Fishing.System.BeginHarvesting(from, this); }
public override void OnDoubleClick( Mobile from ) { if( from.InRange( this, 4 ) && from.InLOS(this) ) { from.SendGump( new pvprewardgump() ); from.PlaySound(47); } else from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. }
public override void OnDoubleClick( Mobile from ) { if ( from.InRange( GetWorldLocation(), 2 ) && from.InLOS(this) ) { from.SendGump( new QuestRewardGump( from, 0 ) ); } else { from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. } }
public override void OnDoubleClick(Mobile from) { if (!from.InRange(GetWorldLocation(), 2) || !from.InLOS(this)) { from.SendLocalizedMessage(501816); return; } from.SendMessage("Dans quoi souhaitez-vous l'enfoncer?"); from.BeginTarget(1, false, TargetFlags.Harmful, new TargetCallback(OnTarget)); }
public override void OnDoubleClick( Mobile from ) { if( from is PlayerMobile ) if( from.InRange( GetWorldLocation(), 3 ) && from.InLOS(this) ) { from.CloseGump( typeof( MysteryStoneGump ) ); from.SendGump( new MysteryStoneGump() ); Effects.PlaySound( from.Location, from.Map, 0x5C7 ); } else from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. }
public override void OnDoubleClick( Mobile from ) { if ( m_Faction == null ) return; if ( !from.InRange( GetWorldLocation(), 2 ) || !from.InLOS(this) ) from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that. else if ( FactionGump.Exists( from ) ) from.SendLocalizedMessage( 1042160 ); // You already have a faction menu open. else if ( Faction.Find( from ) == null && from is PlayerMobile ) from.SendGump( new JoinStoneGump( (PlayerMobile) from, m_Faction ) ); }
public override void OnDoubleClick( Mobile from ) { if (from.InLOS(this) && from.InRange(GetWorldLocation(), 5)) { if (RootParentEntity == null) PublicOverheadMessage(MessageType.Regular, 0x3B2, 1007000 + Utility.Random(28)); else PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1007000 + Utility.Random(28), from.NetState); } else from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. }
public override void OnDoubleClick(Mobile from) { if (!IsChildOf(from.Backpack)) from.SendLocalizedMessage(1060640); // "This item must be in your backpack to use it" else if (from.InRange(GetWorldLocation(), 5) && from.InLOS(this)) { from.SendAsciiMessage("What do you want to use the bloody bandages on?"); from.Target = new InternalTarget(this); } else from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. }
public override void OnDoubleClick( Mobile from ) { if( from.InRange( GetWorldLocation(), 5 ) && from.InLOS( this ) ) { from.PlaySound( 32 ); from.SendMessage( "Your fame is: {0}", from.Fame ); from.SendMessage( "Your karma is: {0}", from.Karma ); from.SendMessage( "And your killcount is: {0}", from.Kills ); } else from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. }
public override void OnDoubleClick(Mobile from) { var weapon = from.Weapon as BaseWeapon; Direction dir; if (from.Location != Location) { dir = from.GetDirectionTo(this); } else if (East) { dir = Direction.West; } else { dir = Direction.North; } from.Direction = dir; bool canThrow = true; if (!from.InRange(this, 5) || !from.InLOS(this)) { canThrow = false; } else if (East) { canThrow = (dir == Direction.Left || dir == Direction.West || dir == Direction.Up); } else { canThrow = (dir == Direction.Up || dir == Direction.North || dir == Direction.Right); } if (canThrow) { if (from.FindItemOnLayer(Layer.OneHanded) == null) { PunchMongbat(from, weapon); } else if (weapon is BaseKnife) { ThrowKnife(from); } } else { from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. } }
public override void OnDoubleClick( Mobile from ) { Map map = this.Map; Point3D loc = this.Location; if ( Parent != null || Movable || IsLockedDown || IsSecure || map == null || map == Map.Internal ) return; if ( !from.InRange( loc, 2 ) || !from.InLOS( this ) ) from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that. else if ( !m_Picked ) OnPicked( from, loc, map ); }
public override void OnDoubleClick( Mobile from ) { if (from == null || from.Deleted) return; if ( !from.InLOS( this.GetWorldLocation() ) ) { from.SendLocalizedMessage( 502800 ); // You can't see that. } else if ( from.GetDistanceToSqrt( this.GetWorldLocation() ) > 4 ) { from.SendLocalizedMessage( 500446 ); // That is too far away. } else if ( !IsNaked( from ) ) { from.SendMessage( "You must be naked to join." ); } else if ( from.Backpack == null ) { from.SendMessage("You can not join without a backpack."); } else if ( m_Game != null ) { if ( m_Game.OpenJoin ) { if ( m_Game.IsInGame( from ) ) { from.SendMessage( "You are already playing!" ); //from.SendGump( new GameTeamSelector( m_Game ) ); } else { if ( from.AccessLevel == AccessLevel.Player ) { from.CloseGump( typeof(GameJoinGump) ); from.SendGump( new GameJoinGump( m_Game, m_GameName, m_RandomTeam ) ); } else from.SendMessage( "It might not be wise for staff to be playing..." ); } } else { from.SendMessage( "{0} join is closed.", m_GameName ); } } else { from.SendMessage( "This stone must be linked to a game stone. Please contact a game master." ); } }
public override void OnDoubleClick( Mobile from ) { if (from.BeginAction(typeof(IAction))) { bool releaseLock = true; if (from.InRange(GetWorldLocation(), 2) && from.InLOS(this)) { if ( !VerifyMove( from ) ) return; Point3D fireLocation = GetFireLocation( from ); if ( fireLocation == Point3D.Zero ) { from.SendLocalizedMessage( 501695 ); // There is not a spot nearby to place your campfire. return; } else { new InternalTimer(from).Start(); releaseLock = false; if (!from.CheckSkill(SkillName.Camping, 0.0, 100.0)) { from.SendLocalizedMessage(501696); // You fail to ignite the campfire. } else { Consume(); if (!Deleted && Parent == null) from.PlaceInBackpack(this); new Campfire().MoveToWorld(fireLocation, from.Map); } } } else from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that. if (releaseLock && from is PlayerMobile) { ((PlayerMobile)from).EndPlayerAction(); } } else from.SendAsciiMessage("You must wait to perform another action."); }
public override void OnDoubleClick(Mobile from) { if (!this.CheckUse(from)) return; Map map = this.Map; Point3D loc = this.Location; if (from.InRange(loc, 1) || from.InLOS(this)) { (this).Delete(); Snake snake = new Snake(); Mongbat mongbat = new Mongbat(); SilverSerpent silverserpent = new SilverSerpent(); Raptor raptor = new Raptor(); Ballem ballem = new Ballem(); FNPitchfork fnpitchfork = new FNPitchfork(); switch (Utility.Random(6)) { case 0: snake.MoveToWorld(loc, map); break; case 1: mongbat.MoveToWorld(loc, map); break; case 2: silverserpent.MoveToWorld(loc, map); break; case 3: raptor.MoveToWorld(loc, map); break; case 4: ballem.MoveToWorld(loc, map); break; case 5: if (Utility.RandomDouble() < 0.20) { fnpitchfork.MoveToWorld(loc, map); from.SendMessage("You find Farmer Nash's pitchfork under one of the brambles of weeds. You pick up the pitchfork and put it in your backpack."); break; } else { silverserpent.MoveToWorld(loc, map); break; } } } }
bool IScissorable.Scissor( Mobile from, Scissors scissors ) { if( !Deleted && ( IsChildOf( from ) || IsChildOf( from.BankBox ) || (from.InRange( this, 3 ) && from.InLOS(this) ) ) ) { from.SendAsciiMessage( "You put the bandages in your pack." ); from.AddToBackpack( new Bandage( 3 ) ); Delete(); return true; } else { from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. return false; } }
public override void OnDoubleClick(Mobile from) { if (from == null || Disabled) return; if (!from.InRange(GetWorldLocation(), 2) || !from.InLOS(this)) { from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. return; } base.OnDoubleClick(from); // delete after use Delete(); }