public void Target( Mobile m ) { if ( !Caster.CanSee( m ) ) { Caster.SendLocalizedMessage( 500237 ); // Target can not be seen. } else if ( CheckHSequence( m ) ) { SpellHelper.Turn( Caster, m ); speak=m.Squelched; m.PlaySound( 0x19 ); m.Paralyze( TimeSpan.FromSeconds( 20.0 ) ); m.FixedParticles( 0x375A, 2, 10, 5027, 0x3D, 2, EffectLayer.Waist ); m.Hidden = true; m.Squelched = true; { Point3D loc = new Point3D( m.X, m.Y, m.Z ); Item item = new InternalItem( loc, Caster.Map, Caster,m , speak ); } } FinishSequence(); }
public AnkhNorth(bool bloodied) : base(bloodied ? 0x1E5D : 0x4) { this.Movable = false; this.m_Item = new InternalItem(bloodied, this); }
public Tapestry1N() : base(0xEAA) { Movable = false; m_Item = new InternalItem( this ); }
public void Target( IPoint3D p ) { if ( !Caster.CanSee( p ) ) { Caster.SendLocalizedMessage( 500237 ); // Target can not be seen. } else if ( CheckSequence() ) { SpellHelper.Turn( Caster, p ); SpellHelper.GetSurfaceTop( ref p ); Effects.PlaySound( p, Caster.Map, 0x382 ); Point3D loc = new Point3D( p.X, p.Y, p.Z ); Item item = new InternalItem( loc, Caster.Map, Caster ); } FinishSequence(); }
public AnkhEast( bool bloodied ) : base(bloodied ? 0x1E5D : 0x4) { Movable = false; m_Item = new InternalItem( bloodied, this ); }
public LargeForgeWest() : base( 0x199A ) { Movable = false; m_Item = new InternalItem( this ); m_Item2 = new InternalItem2( this ); }
public DuelWall( bool northsouth, Mobile from, Mobile to ) : base(0x80) { m_From = from; m_To = to; Movable = false; if( northsouth ) { m_Item1 = new InternalItem( this, 1, 0 ); m_Item2 = new InternalItem( this, -1, 0 ); m_XOffset1 = 1; m_XOffset2 = -1; m_YOffset1 = 0; m_YOffset2 = 0; } else { m_Item1 = new InternalItem( this, 0, 1 ); m_Item2 = new InternalItem( this, 0, -1 ); m_XOffset1 = 0; m_XOffset2 = 0; m_YOffset1 = 1; m_YOffset2 = -1; } m_Timer = new InternalTimer( this, TimeSpan.FromSeconds( 10.0 ), m_From, m_To ); m_Timer.Start(); m_End = DateTime.Now + TimeSpan.FromSeconds( 3.0 ); Effects.PlaySound( new Point3D( X, Y, Z ), Map, 0x1F6 ); }
public void Effect( Point3D loc, Map map, bool checkMulti ) { if ( map == null || (!Core.AOS && Caster.Map != map) ) { Caster.SendLocalizedMessage( 1005570 ); // You can not gate to another facet. } else if ( !map.CanFit( loc.X, loc.Y, loc.Z, 16 ) ) { Caster.SendLocalizedMessage( 501942 ); // That location is blocked. } else if ( (checkMulti && SpellHelper.CheckMulti( loc, map )) ) { Caster.SendLocalizedMessage( 501942 ); // That location is blocked. } else if ( !SpellHelper.CheckTravel( Caster, loc, map, TravelType.Gate ) && Caster.AccessLevel == AccessLevel.Player ) { Caster.PlaySound( 0x5C ); } else if ( CheckSequence() ) { Caster.SendLocalizedMessage( 501024 ); // You open a magical gate to another location Effects.PlaySound( Caster.Location, Caster.Map, 0x20E ); InternalItem firstGate = new InternalItem( loc, map ); firstGate.MoveToWorld( Caster.Location, Caster.Map ); Effects.PlaySound( loc, map, 0x20E ); InternalItem secondGate = new InternalItem( Caster.Location, Caster.Map ); secondGate.MoveToWorld( loc, map ); } FinishSequence(); }
public void Target( IPoint3D p ) { if ( !Caster.CanSee( p ) ) { Caster.SendLocalizedMessage( 500237 ); // Target can not be seen. } else if ( SpellHelper.CheckTown( p, Caster ) && CheckSequence() ) { SpellHelper.Turn( Caster, p ); SpellHelper.GetSurfaceTop( ref p ); int dx = Caster.Location.X - p.X; int dy = Caster.Location.Y - p.Y; int rx = (dx - dy) * 44; int ry = (dx + dy) * 44; bool eastToWest; if ( rx >= 0 && ry >= 0 ) { eastToWest = false; } else if ( rx >= 0 ) { eastToWest = true; } else if ( ry >= 0 ) { eastToWest = true; } else { eastToWest = false; } Effects.PlaySound( p, Caster.Map, 0x20B ); TimeSpan duration = TimeSpan.FromSeconds( Caster.Skills[SkillName.Magery].Value * 0.28 + 2.0 ); // (28% of magery) + 2.0 seconds int itemID = eastToWest ? 0x3946 : 0x3956; for ( int i = -2; i <= 2; ++i ) { Point3D loc = new Point3D( eastToWest ? p.X + i : p.X, eastToWest ? p.Y : p.Y + i, p.Z ); bool canFit = SpellHelper.AdjustField( ref loc, Caster.Map, 12, false ); if ( !canFit ) continue; Item item = new InternalItem( loc, Caster.Map, duration, itemID, Caster ); item.ProcessDelta(); Effects.SendLocationParticles( EffectItem.Create( loc, Caster.Map, EffectItem.DefaultDuration ), 0x376A, 9, 10, 5051 ); } } FinishSequence(); }
public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); m_Item = reader.ReadItem() as InternalItem; }
public LargeForgeEast() : base(0x197A) { this.Movable = false; this.m_Item = new InternalItem(this); this.m_Item2 = new InternalItem2(this); }
public void Target( IPoint3D p ) { if( !Caster.CanSee( p ) ) { Caster.SendLocalizedMessage( 500237 ); // Target can not be seen. } else if( SpellHelper.CheckTown( p, Caster ) && CheckSequence() ) { SpellHelper.Turn( Caster, p ); SpellHelper.GetSurfaceTop( ref p ); int dx = Caster.Location.X - p.X; int dy = Caster.Location.Y - p.Y; int rx = (dx - dy) * 44; int ry = (dx + dy) * 44; bool eastToWest; if( rx >= 0 && ry >= 0 ) { eastToWest = false; } else if( rx >= 0 ) { eastToWest = true; } else if( ry >= 0 ) { eastToWest = true; } else { eastToWest = false; } Effects.PlaySound( p, Caster.Map, 0x1F6 ); for( int i = -1; i <= 1; ++i ) { Point3D loc = new Point3D( eastToWest ? p.X + i : p.X, eastToWest ? p.Y : p.Y + i, p.Z ); bool canFit = SpellHelper.AdjustField( ref loc, Caster.Map, 22, true ); //Effects.SendLocationParticles( EffectItem.Create( loc, Caster.Map, EffectItem.DefaultDuration ), 0x376A, 9, 10, 5025 ); if( !canFit ) continue; Item item = new InternalItem( loc, Caster.Map, Caster ); Effects.SendLocationParticles( item, 0x376A, 9, 10, 5025 ); //new InternalItem( loc, Caster.Map, Caster ); } } FinishSequence(); }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); switch (version) { case 1: m_Chaos = reader.ReadBool(); break; } m_Item = reader.ReadItem() as InternalItem; }
public void Target( Mobile m ) { if ( !Caster.CanSee( m ) ) { Caster.SendLocalizedMessage( 500237 ); // Target can not be seen. } else if ( CheckHSequence( m ) ) { SpellHelper.Turn( Caster, m ); double duration; // Algorithm: ((20% of AnimalTamin) + 7) seconds [- 50% if resisted] seems to work?? duration = 7.0 + (Caster.Skills[DamageSkill].Value * 0.2); // Resist if Str + Dex / 2 is greater than CastSkill eg. AnimalLore seems to work?? if ( ( Caster.Skills[CastSkill].Value ) < ( ( m.Str + m.Dex ) * 0.5 ) ) duration *= 0.5; // no less than 0 seconds no more than 9 seconds if ( duration < 0.0 ) duration = 0.0; if ( duration > 9.0 ) duration = 9.0; m.PlaySound( 0x2A1 ); m.Paralyze( TimeSpan.FromSeconds( duration ) ); m.FixedParticles( 0x375A, 2, 10, 5027, 0x3D, 2, EffectLayer.Waist ); { Point3D loc = new Point3D( m.X, m.Y, m.Z ); Item item = new InternalItem( loc, Caster.Map, Caster ); } } FinishSequence(); }
public DecorativeSwordWest() : base(0x1566) { Movable = false; m_Item = new InternalItem( this ); }
public void Effect(Point3D loc, Map map, bool checkMulti) { if (map == null || (!Core.AOS && Caster.Map != map)) { Caster.SendLocalizedMessage(1005570); // You can not gate to another facet. } else if (!SpellHelper.CheckTravel(Caster, TravelCheckType.GateFrom)) { } else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.GateTo)) { } else if (Caster.Kills >= 5 && map != Map.Felucca) { Caster.SendLocalizedMessage(1019004); // You are not allowed to travel there. } else if (Caster.Criminal) { Caster.SendLocalizedMessage(1005561, "", 0x22); // Thou'rt a criminal and cannot escape so easily. } else if (SpellHelper.CheckCombat(Caster)) { Caster.SendLocalizedMessage(1005564, "", 0x22); // Wouldst thou flee during the heat of battle?? } else if (!map.CanSpawnMobile(loc.X, loc.Y, loc.Z)) { Caster.SendLocalizedMessage(501942); // That location is blocked. } else if ((checkMulti && SpellHelper.CheckMulti(loc, map))) { Caster.SendLocalizedMessage(501942); // That location is blocked. } else if (CheckSequence()) { Caster.SendMessage("You open a mystical portal in a mushroom circle"); // You open a magical gate to another location Effects.PlaySound(Caster.Location, Caster.Map, 0x1); int mushx; int mushy; int mushz; InternalItem firstGatea = new InternalItem(loc, map); mushx = Caster.X; mushy = Caster.Y; mushz = Caster.Z; firstGatea.ItemID = 0xD10; Point3D mushxyz = new Point3D(mushx, mushy, mushz); firstGatea.MoveToWorld(mushxyz, Caster.Map); InternalItem firstGateb = new InternalItem(loc, map); mushx = Caster.X; mushy = Caster.Y; firstGateb.ItemID = 0x373A; mushz = Caster.Z + 1; Point3D mushxyza = new Point3D(mushx, mushy, mushz); firstGateb.MoveToWorld(mushxyza, Caster.Map); InternalItem firstGatec = new InternalItem(loc, map); mushx = Caster.X - 1; firstGatec.ItemID = 0xD11; mushy = Caster.Y + 1; mushz = Caster.Z; Point3D mushxyzb = new Point3D(mushx, mushy, mushz); firstGatec.MoveToWorld(mushxyzb, Caster.Map); InternalItem firstGated = new InternalItem(loc, map); firstGated.ItemID = 0xD0C; mushx = Caster.X; mushy = Caster.Y + 2; mushz = Caster.Z; Point3D mushxyzc = new Point3D(mushx, mushy, mushz); firstGated.MoveToWorld(mushxyzc, Caster.Map); InternalItem firstGatee = new InternalItem(loc, map); mushx = Caster.X + 1; firstGatee.ItemID = 0xD0D; mushy = Caster.Y + 1; mushz = Caster.Z; Point3D mushxyzd = new Point3D(mushx, mushy, mushz); firstGatee.MoveToWorld(mushxyzd, Caster.Map); InternalItem firstGatef = new InternalItem(loc, map); firstGatef.ItemID = 0xD0E; mushx = Caster.X + 2; mushy = Caster.Y; mushz = Caster.Z; Point3D mushxyze = new Point3D(mushx, mushy, mushz); firstGatef.MoveToWorld(mushxyze, Caster.Map); InternalItem firstGateg = new InternalItem(loc, map); mushx = Caster.X + 1; firstGateg.ItemID = 0xD0F; mushy = Caster.Y - 1; mushz = Caster.Z; Point3D mushxyzf = new Point3D(mushx, mushy, mushz); firstGateg.MoveToWorld(mushxyzf, Caster.Map); Effects.PlaySound(loc, map, 0x1); InternalItem secondGatea = new InternalItem(Caster.Location, Caster.Map); mushx = loc.X; mushy = loc.Y; mushz = loc.Z; secondGatea.ItemID = 0xD10; Point3D mushaxyz = new Point3D(mushx, mushy, mushz); secondGatea.MoveToWorld(mushaxyz, map); InternalItem secondGateb = new InternalItem(Caster.Location, Caster.Map); mushx = loc.X; mushy = loc.Y; secondGateb.ItemID = 0x373A; mushz = loc.Z + 1; Point3D mushaxyza = new Point3D(mushx, mushy, mushz); secondGateb.MoveToWorld(mushaxyza, map); InternalItem secondGatec = new InternalItem(Caster.Location, Caster.Map); mushx = loc.X - 1; secondGatec.ItemID = 0xD11; mushy = loc.Y + 1; mushz = loc.Z - 1; Point3D mushaxyzb = new Point3D(mushx, mushy, mushz); secondGatec.MoveToWorld(mushaxyzb, map); InternalItem secondGated = new InternalItem(Caster.Location, Caster.Map); mushx = loc.X; mushy = loc.Y + 2; secondGated.ItemID = 0xD0C; mushz = loc.Z; Point3D mushaxyzc = new Point3D(mushx, mushy, mushz); secondGated.MoveToWorld(mushaxyzc, map); InternalItem secondGatee = new InternalItem(Caster.Location, Caster.Map); mushx = loc.X + 1; mushy = loc.Y + 1; mushz = loc.Z; secondGatee.ItemID = 0xD0D; Point3D mushaxyzd = new Point3D(mushx, mushy, mushz); secondGatee.MoveToWorld(mushaxyzd, map); InternalItem secondGatef = new InternalItem(Caster.Location, Caster.Map); mushx = loc.X + 2; mushy = loc.Y; mushz = loc.Z; secondGatef.ItemID = 0xD0E; Point3D mushaxyze = new Point3D(mushx, mushy, mushz); secondGatef.MoveToWorld(mushaxyze, map); InternalItem secondGateg = new InternalItem(Caster.Location, Caster.Map); mushx = loc.X + 1; secondGateg.ItemID = 0xD0F; mushy = loc.Y - 1; mushz = loc.Z; Point3D mushaxyzf = new Point3D(mushx, mushy, mushz); secondGateg.MoveToWorld(mushaxyzf, map); } FinishSequence(); }
public DecorativeDAxeWest() : base(0x156A) { Movable = false; m_Item = new InternalItem( this ); }
public void Effect(Point3D loc, Map map, bool checkMulti) { if (!SpellHelper.CheckTravel(Caster, TravelCheckType.GateFrom)) { } else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.GateTo)) { } else if ((checkMulti && SpellHelper.CheckMulti(loc, map))) { Caster.SendLocalizedMessage(501942); // That location is blocked. } else if (m_Book != null && m_Book.CurCharges <= 0 && m_Scroll != null) { Caster.SendLocalizedMessage(502412); // There are no charges left on that item. } else if (CheckSequence()) { /*if (m_Entry != null && m_Book != null && m_Scroll == null) * --m_Entry.ChargesLeft; * else */ if (SphereSpellTarget is RecallRune) { RecallRune rune = (RecallRune)SphereSpellTarget; if (rune.ChargesLeft > 0) { --rune.ChargesLeft; } else if (rune.ChargesLeft == 0) { FinishSequence(); return; } } else if (SphereSpellTarget is Runebook) { RunebookEntry e = ((Runebook)SphereSpellTarget).Default; /*if (e.ChargesLeft > 0) * --e.ChargesLeft; * else*/ //if (e.ChargesLeft == 0) // { FinishSequence(); return; // } } CustomRegion cR; ISpell markSpell = new Sixth.MarkSpell(Caster, null); if ((cR = Caster.Region as CustomRegion) != null && cR.Controller.IsRestrictedSpell(this)) { Caster.SendAsciiMessage("You can't gate here."); } else if (Region.Find(loc, map) is HouseRegion || ((cR = Region.Find(loc, map) as CustomRegion) != null && (cR.Controller.IsRestrictedSpell(this) || cR.Controller.IsRestrictedSpell(markSpell)))) { Caster.SendAsciiMessage("You can't gate to that spot."); } else { InternalItem firstGate = new InternalItem(loc, map); InternalItem secondGate = new InternalItem(Caster.Location, Caster.Map); firstGate.MoveToWorld(Caster.Location, Caster.Map); Effects.PlaySound(Caster.Location, Caster.Map, Sound); secondGate.MoveToWorld(loc, map); Effects.PlaySound(loc, map, Sound); } } FinishSequence(); }
public Tapestry6N() : base( 0xFE2 ) { Movable = false; m_Item = new InternalItem( this ); }
public void Target(IPoint3D p) { if (!Caster.CanSee(p)) { Caster.SendAsciiMessage("Target is not in line of sight."); DoFizzle(); } else if (SphereSpellTarget is BaseWand) { BaseWand bw = SphereSpellTarget as BaseWand; bw.RechargeWand(Caster, this); } else if (/*SpellHelper.CheckTown(p, Caster) && */CheckSequence()) { SpellHelper.GetSurfaceTop(ref p); int dx = Caster.Location.X - p.X; int dy = Caster.Location.Y - p.Y; int rx = (dx - dy)*44; int ry = (dx + dy)*44; bool eastToWest; if (rx >= 0 && ry >= 0) { eastToWest = false; } else if (rx >= 0) { eastToWest = true; } else if (ry >= 0) { eastToWest = true; } else { eastToWest = false; } Effects.PlaySound(p, Caster.Map, Sound); int itemID = eastToWest ? 0x3915 : 0x3922; TimeSpan duration = TimeSpan.FromSeconds(3 + (Caster.Skills.Magery.Fixed/25)); List<InternalItem> itemList = new List<InternalItem>(); for (int i = -3; i <= 3; ++i) { Point3D loc = new Point3D(eastToWest ? p.X + i : p.X, eastToWest ? p.Y : p.Y + i, p.Z); IPooledEnumerable eable = Caster.Map.GetMobilesInRange(loc, 0); foreach (Mobile m in eable) { if (m.AccessLevel != AccessLevel.Player || !m.Alive || (m is PlayerMobile && ((PlayerMobile)m).Young)) continue; //Taran: The whole field counts as a harmful action, not just the target if (m.Location.Z - loc.Z < 18 && m.Location.Z - loc.Z > -10) Caster.DoHarmful(m); } InternalItem item = new InternalItem(itemID, loc, Caster, Caster.Map, duration, i); itemList.Add(item); } if (SphereSpellTarget is Mobile) { InternalItem castItem = new InternalItem(itemID, (SphereSpellTarget as Mobile).Location, Caster, Caster.Map, duration, 3); castItem.OnMoveOver(SphereSpellTarget as Mobile); //Caster.DoHarmful(SphereSpellTarget as Mobile); - This check is now made for each field tile castItem.Delete(); } if (itemList.Count > 0) new SoundTimer(itemList, 517).Start(); FinishSequence(); } }
public void Target(IPoint3D p) { if (!Caster.CanSee(p)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (SpellHelper.CheckTown(p, Caster) && CheckSequence()) { if (this.Scroll != null) { Scroll.Consume(); } SpellHelper.Turn(Caster, p); SpellHelper.GetSurfaceTop(ref p); Effects.PlaySound(p, Caster.Map, 0x2); Point3D loc = new Point3D(p.X, p.Y, p.Z); int grovex; int grovey; int grovez; InternalItem groveStone = new InternalItem(Caster.Location, Caster.Map, Caster); grovex = loc.X; grovey = loc.Y; grovez = loc.Z; groveStone.ItemID = 0x08E3; groveStone.Name = "sacred stone"; Point3D stonexyz = new Point3D(grovex, grovey, grovez); groveStone.MoveToWorld(stonexyz, Caster.Map); InternalItem grovea = new InternalItem(Caster.Location, Caster.Map, Caster); grovex = loc.X - 2; grovey = loc.Y - 2; grovez = loc.Z; grovea.ItemID = 3290; Point3D grovexyz = new Point3D(grovex, grovey, grovez); grovea.MoveToWorld(grovexyz, Caster.Map); InternalItem grovec = new InternalItem(Caster.Location, Caster.Map, Caster); grovex = loc.X; grovey = loc.Y - 3; grovez = loc.Z; grovec.ItemID = 3293; Point3D grovexyzb = new Point3D(grovex, grovey, grovez); grovec.MoveToWorld(grovexyzb, Caster.Map); InternalItem groved = new InternalItem(Caster.Location, Caster.Map, Caster); groved.ItemID = 3290; grovex = loc.X + 2; grovey = loc.Y - 2; grovez = loc.Z; Point3D grovexyzc = new Point3D(grovex, grovey, grovez); groved.MoveToWorld(grovexyzc, Caster.Map); InternalItem grovee = new InternalItem(Caster.Location, Caster.Map, Caster); grovex = loc.X + 3; grovee.ItemID = 3290; grovey = loc.Y; grovez = loc.Z; Point3D grovexyzd = new Point3D(grovex, grovey, grovez); grovee.MoveToWorld(grovexyzd, Caster.Map); InternalItem grovef = new InternalItem(Caster.Location, Caster.Map, Caster); grovef.ItemID = 3293; grovex = loc.X + 2; grovey = loc.Y + 2; grovez = loc.Z; Point3D grovexyze = new Point3D(grovex, grovey, grovez); grovef.MoveToWorld(grovexyze, Caster.Map); InternalItem groveg = new InternalItem(Caster.Location, Caster.Map, Caster); grovex = loc.X; groveg.ItemID = 3290; grovey = loc.Y + 3; grovez = loc.Z; Point3D grovexyzf = new Point3D(grovex, grovey, grovez); groveg.MoveToWorld(grovexyzf, Caster.Map); InternalItem groveh = new InternalItem(Caster.Location, Caster.Map, Caster); grovex = loc.X - 2; groveh.ItemID = 3293; grovey = loc.Y + 2; grovez = loc.Z; Point3D grovexyzg = new Point3D(grovex, grovey, grovez); groveh.MoveToWorld(grovexyzg, Caster.Map); InternalItem grovei = new InternalItem(Caster.Location, Caster.Map, Caster); grovex = loc.X - 3; grovei.ItemID = 3293; grovey = loc.Y; grovez = loc.Z; Point3D grovexyzh = new Point3D(grovex, grovey, grovez); grovei.MoveToWorld(grovexyzh, Caster.Map); InternalItem leavesa = new InternalItem(Caster.Location, Caster.Map, Caster); grovex = loc.X - 2; grovey = loc.Y - 2; grovez = loc.Z; leavesa.ItemID = 3291; Point3D leafxyz = new Point3D(grovex, grovey, grovez); leavesa.MoveToWorld(leafxyz, Caster.Map); InternalItem leavesc = new InternalItem(Caster.Location, Caster.Map, Caster); grovex = loc.X; grovey = loc.Y - 3; grovez = loc.Z; leavesc.ItemID = 3294; Point3D leafxyzb = new Point3D(grovex, grovey, grovez); leavesc.MoveToWorld(leafxyzb, Caster.Map); InternalItem leavesd = new InternalItem(Caster.Location, Caster.Map, Caster); leavesd.ItemID = 3291; grovex = loc.X + 2; grovey = loc.Y - 2; grovez = loc.Z; Point3D leafxyzc = new Point3D(grovex, grovey, grovez); leavesd.MoveToWorld(leafxyzc, Caster.Map); InternalItem leavese = new InternalItem(Caster.Location, Caster.Map, Caster); grovex = loc.X + 3; leavese.ItemID = 3291; grovey = loc.Y; grovez = loc.Z; Point3D leafxyzd = new Point3D(grovex, grovey, grovez); leavese.MoveToWorld(leafxyzd, Caster.Map); InternalItem leavesf = new InternalItem(Caster.Location, Caster.Map, Caster); leavesf.ItemID = 3294; grovex = loc.X + 2; grovey = loc.Y + 2; grovez = loc.Z; Point3D leafxyze = new Point3D(grovex, grovey, grovez); leavesf.MoveToWorld(leafxyze, Caster.Map); InternalItem leavesg = new InternalItem(Caster.Location, Caster.Map, Caster); grovex = loc.X; leavesg.ItemID = 3291; grovey = loc.Y + 3; grovez = loc.Z; Point3D leafxyzf = new Point3D(grovex, grovey, grovez); leavesg.MoveToWorld(leafxyzf, Caster.Map); InternalItem leavesh = new InternalItem(Caster.Location, Caster.Map, Caster); grovex = loc.X - 2; leavesh.ItemID = 3294; grovey = loc.Y + 2; grovez = loc.Z; Point3D leafxyzg = new Point3D(grovex, grovey, grovez); leavesh.MoveToWorld(leafxyzg, Caster.Map); InternalItem leavesi = new InternalItem(Caster.Location, Caster.Map, Caster); grovex = loc.X - 3; leavesi.ItemID = 3294; grovey = loc.Y; grovez = loc.Z; Point3D leafxyzh = new Point3D(grovex, grovey, grovez); leavesi.MoveToWorld(leafxyzh, Caster.Map); } FinishSequence(); }
public void Target(IPoint3D p) { if (!Caster.CanSee(p)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (SpellHelper.CheckTown(p, Caster) && CheckSequence()) { SpellHelper.Turn(Caster, p); SpellHelper.GetSurfaceTop(ref p); int dx = Caster.Location.X - p.X; int dy = Caster.Location.Y - p.Y; int rx = (dx - dy) * 44; int ry = (dx + dy) * 44; bool eastToWest; if (rx >= 0 && ry >= 0) { eastToWest = false; } else if (rx >= 0) { eastToWest = true; } else if (ry >= 0) { eastToWest = true; } else { eastToWest = false; } Effects.PlaySound(p, Caster.Map, 0x20B); TimeSpan duration; if (Core.AOS) { duration = TimeSpan.FromSeconds((15 + (Caster.Skills.Magery.Fixed / 5)) / 7); } else { duration = TimeSpan.FromSeconds(Caster.Skills[SkillName.Magery].Value * 0.28 + 2.0); // (28% of magery) + 2.0 seconds } int itemID = eastToWest ? 0x3946 : 0x3956; for (int i = -2; i <= 2; ++i) { Point3D loc = new Point3D(eastToWest ? p.X + i : p.X, eastToWest ? p.Y : p.Y + i, p.Z); bool canFit = SpellHelper.AdjustField(ref loc, Caster.Map, 12, false); if (!canFit) { continue; } Item item = new InternalItem(loc, Caster.Map, duration, itemID, Caster); item.ProcessDelta(); Effects.SendLocationParticles(EffectItem.Create(loc, Caster.Map, EffectItem.DefaultDuration), 0x376A, 9, 10, 5051); } } FinishSequence(); }
public DecorativeSwordNorth() : base(0x1565) { Movable = false; m_Item = new InternalItem(this); }
public InternalTimer(InternalItem item, TimeSpan duration) : base(duration) { m_Item = item; Priority = TimerPriority.FiftyMS; }
public void Target(IPoint3D p) { if (!Caster.CanSee(p)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (SpellHelper.CheckTown(p, Caster) && CheckSequence()) { if (this.Scroll != null) { Scroll.Consume(); } SpellHelper.Turn(Caster, p); SpellHelper.GetSurfaceTop(ref p); Effects.PlaySound(p, Caster.Map, 0x1DD); Point3D loc = new Point3D(p.X, p.Y, p.Z); int mushx; int mushy; int mushz; InternalItem firstFlamea = new InternalItem(Caster.Location, Caster.Map, Caster); mushx = loc.X - 2; mushy = loc.Y - 2; mushz = loc.Z; Point3D mushxyz = new Point3D(mushx, mushy, mushz); firstFlamea.MoveToWorld(mushxyz, Caster.Map); InternalItem firstFlamec = new InternalItem(Caster.Location, Caster.Map, Caster); mushx = loc.X; mushy = loc.Y - 3; mushz = loc.Z; Point3D mushxyzb = new Point3D(mushx, mushy, mushz); firstFlamec.MoveToWorld(mushxyzb, Caster.Map); InternalItem firstFlamed = new InternalItem(Caster.Location, Caster.Map, Caster); firstFlamed.ItemID = 0x3709; mushx = loc.X + 2; mushy = loc.Y - 2; mushz = loc.Z; Point3D mushxyzc = new Point3D(mushx, mushy, mushz); firstFlamed.MoveToWorld(mushxyzc, Caster.Map); InternalItem firstFlamee = new InternalItem(Caster.Location, Caster.Map, Caster); mushx = loc.X + 3; firstFlamee.ItemID = 0x3709; mushy = loc.Y; mushz = loc.Z; Point3D mushxyzd = new Point3D(mushx, mushy, mushz); firstFlamee.MoveToWorld(mushxyzd, Caster.Map); InternalItem firstFlamef = new InternalItem(Caster.Location, Caster.Map, Caster); firstFlamef.ItemID = 0x3709; mushx = loc.X + 2; mushy = loc.Y + 2; mushz = loc.Z; Point3D mushxyze = new Point3D(mushx, mushy, mushz); firstFlamef.MoveToWorld(mushxyze, Caster.Map); InternalItem firstFlameg = new InternalItem(Caster.Location, Caster.Map, Caster); mushx = loc.X; firstFlameg.ItemID = 0x3709; mushy = loc.Y + 3; mushz = loc.Z; Point3D mushxyzf = new Point3D(mushx, mushy, mushz); firstFlameg.MoveToWorld(mushxyzf, Caster.Map); InternalItem firstFlameh = new InternalItem(Caster.Location, Caster.Map, Caster); mushx = loc.X - 2; firstFlameh.ItemID = 0x3709; mushy = loc.Y + 2; mushz = loc.Z; Point3D mushxyzg = new Point3D(mushx, mushy, mushz); firstFlameh.MoveToWorld(mushxyzg, Caster.Map); InternalItem firstFlamei = new InternalItem(Caster.Location, Caster.Map, Caster); mushx = loc.X - 3; firstFlamei.ItemID = 0x3709; mushy = loc.Y; mushz = loc.Z; Point3D mushxyzh = new Point3D(mushx, mushy, mushz); firstFlamei.MoveToWorld(mushxyzh, Caster.Map); } FinishSequence(); }
bool UpdateReceivedItemsOnEntity(int terminalId) { //Собираем список всего на возврат из разных виджетов. var tempItemList = new List <InternalItem>(); if (Entity.TareToReturn > 0) { tempItemList.Add( new InternalItem { ReciveType = ReciveTypes.Bottle, NomenclatureId = Entity.DefBottleId, Amount = Entity.TareToReturn } ); } var defectiveItemsList = new List <InternalItem>(); foreach (var node in defectiveitemsreceptionview1.Items) { if (node.Amount == 0) { continue; } var item = new InternalItem { ReciveType = ReciveTypes.Defective, NomenclatureId = node.NomenclatureId, Amount = node.Amount, MovementOperationId = node.MovementOperation?.Id ?? 0, TypeOfDefect = node.TypeOfDefect, Source = node.Source }; if (!defectiveItemsList.Any(i => i.EqualsToAnotherInternalItem(item))) { defectiveItemsList.Add(item); } } foreach (var node in returnsreceptionview.Items) { if (node.Amount == 0) { continue; } var item = new InternalItem { ReciveType = node.NomenclatureId == terminalId ? ReciveTypes.ReturnCashEquipment : ReciveTypes.Returnes, NomenclatureId = node.NomenclatureId, Amount = node.Amount, Redhead = node.Redhead }; tempItemList.Add(item); } foreach (var node in nonserialequipmentreceptionview1.Items) { if (node.Amount == 0) { continue; } var item = new InternalItem { ReciveType = ReciveTypes.Equipment, NomenclatureId = node.NomenclatureId, Amount = node.Amount }; tempItemList.Add(item); } //Обновляем Entity foreach (var tempItem in defectiveItemsList) { //валидация брака if (tempItem.TypeOfDefect == null) { MessageDialogHelper.RunWarningDialog("Для брака необходимо указать его вид"); return(false); } //проверка на дубли. если несколько одинаковых, то устанавливаем кол-во в 0 для последующего удаления из коллекции if (tempItem.Amount > 0 && defectiveItemsList.Count(i => i.EqualsToAnotherInternalItem(tempItem)) > 1) { tempItem.Amount = 0; } } foreach (var tempItem in defectiveItemsList) { var item = Entity.Items.FirstOrDefault(x => x.WarehouseMovementOperation.Id > 0 && x.WarehouseMovementOperation.Id == tempItem.MovementOperationId); if (item == null) { Entity.AddItem( tempItem.ReciveType, UoW.GetById <Nomenclature>(tempItem.NomenclatureId), null, tempItem.Amount, null, null, tempItem.Source, tempItem.TypeOfDefect ); } else { if (item.WarehouseMovementOperation.Amount != tempItem.Amount) { item.WarehouseMovementOperation.Amount = tempItem.Amount; } if (item.TypeOfDefect != tempItem.TypeOfDefect) { item.TypeOfDefect = tempItem.TypeOfDefect; } if (item.DefectSource != tempItem.Source) { item.DefectSource = tempItem.Source; } } } var nomenclatures = UoW.GetById <Nomenclature>(tempItemList.Select(x => x.NomenclatureId).ToArray()); foreach (var tempItem in tempItemList) { var item = Entity.Items.FirstOrDefault(x => x.WarehouseMovementOperation.Nomenclature.Id == tempItem.NomenclatureId); if (item == null) { var nomenclature = nomenclatures.First(x => x.Id == tempItem.NomenclatureId); Entity.AddItem( tempItem.ReciveType, nomenclature, null, tempItem.Amount, null, tempItem.Redhead ); } else { if (item.WarehouseMovementOperation.Amount != tempItem.Amount) { item.WarehouseMovementOperation.Amount = tempItem.Amount; } if (item.EmployeeNomenclatureMovementOperation != null && item.EmployeeNomenclatureMovementOperation.Amount != -tempItem.Amount) { item.EmployeeNomenclatureMovementOperation.Amount = -tempItem.Amount; } if (item.Redhead != tempItem.Redhead) { item.Redhead = tempItem.Redhead; } } } foreach (var item in Entity.Items.ToList()) { bool exist = true; if (item.ReciveType != ReciveTypes.Defective) { exist = tempItemList.Any(x => x.NomenclatureId == item.WarehouseMovementOperation.Nomenclature?.Id); } else { exist = defectiveItemsList.Any(x => x.MovementOperationId == item.WarehouseMovementOperation.Id && x.Amount > 0); } if (!exist) { UoW.Delete(item.WarehouseMovementOperation); Entity.ObservableItems.Remove(item); } } return(true); }
public void Target(IPoint3D p) { if (!Caster.CanSee(p)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (SpellHelper.CheckTown(p, Caster) && CheckSequence()) { SpellHelper.Turn(Caster, p); SpellHelper.GetSurfaceTop(ref p); Effects.PlaySound(p, Caster.Map, 0x222); Point3D loc = new Point3D(p.X, p.Y, p.Z); int mushx; int mushy; int mushz; InternalItem firstFlamea = new InternalItem(Caster.Location, Caster.Map, Caster); mushx = loc.X - 2; mushy = loc.Y - 2; mushz = loc.Z; Point3D mushxyz = new Point3D(mushx, mushy, mushz); firstFlamea.MoveToWorld(mushxyz, Caster.Map); InternalItem firstFlamec = new InternalItem(Caster.Location, Caster.Map, Caster); mushx = loc.X; mushy = loc.Y - 3; mushz = loc.Z; Point3D mushxyzb = new Point3D(mushx, mushy, mushz); firstFlamec.MoveToWorld(mushxyzb, Caster.Map); InternalItem firstFlamed = new InternalItem(Caster.Location, Caster.Map, Caster); mushx = loc.X + 2; mushy = loc.Y - 2; mushz = loc.Z; Point3D mushxyzc = new Point3D(mushx, mushy, mushz); firstFlamed.MoveToWorld(mushxyzc, Caster.Map); InternalItem hiddenflame = new InternalItem(Caster.Location, Caster.Map, Caster); mushx = loc.X + 2; mushy = loc.Y - 1; mushz = loc.Z; Point3D mushxyzhid = new Point3D(mushx, mushy, mushz); hiddenflame.MoveToWorld(mushxyzhid, Caster.Map); InternalItem hiddenrock = new InternalItem(Caster.Location, Caster.Map, Caster); mushx = loc.X + 2; mushy = loc.Y + 1; mushz = loc.Z; Point3D rockaxyz = new Point3D(mushx, mushy, mushz); hiddenrock.MoveToWorld(rockaxyz, Caster.Map); InternalItem hiddenflamea = new InternalItem(Caster.Location, Caster.Map, Caster); mushx = loc.X - 2; mushy = loc.Y - 1; mushz = loc.Z; Point3D mushxyzhida = new Point3D(mushx, mushy, mushz); hiddenflamea.MoveToWorld(mushxyzhida, Caster.Map); InternalItem hiddenrocks = new InternalItem(Caster.Location, Caster.Map, Caster); mushx = loc.X - 2; mushy = loc.Y + 1; mushz = loc.Z; Point3D rocksaxyz = new Point3D(mushx, mushy, mushz); hiddenrocks.MoveToWorld(rocksaxyz, Caster.Map); InternalItem hiddenrocka = new InternalItem(Caster.Location, Caster.Map, Caster); mushx = loc.X + 1; mushy = loc.Y + 2; mushz = loc.Z; Point3D rockbxyz = new Point3D(mushx, mushy, mushz); hiddenrocka.MoveToWorld(rockbxyz, Caster.Map); InternalItem hiddenrockb = new InternalItem(Caster.Location, Caster.Map, Caster); mushx = loc.X + 1; mushy = loc.Y - 2; mushz = loc.Z; Point3D rockcxyz = new Point3D(mushx, mushy, mushz); hiddenrockb.MoveToWorld(rockcxyz, Caster.Map); InternalItem hiddenrockc = new InternalItem(Caster.Location, Caster.Map, Caster); mushx = loc.X - 1; mushy = loc.Y - 2; mushz = loc.Z; Point3D rockdxyz = new Point3D(mushx, mushy, mushz); hiddenrockc.MoveToWorld(rockdxyz, Caster.Map); InternalItem hiddenrockd = new InternalItem(Caster.Location, Caster.Map, Caster); mushx = loc.X - 1; mushy = loc.Y + 2; mushz = loc.Z; Point3D rockexyz = new Point3D(mushx, mushy, mushz); hiddenrockd.MoveToWorld(rockexyz, Caster.Map); InternalItem firstFlamee = new InternalItem(Caster.Location, Caster.Map, Caster); mushx = loc.X + 3; mushy = loc.Y; mushz = loc.Z; Point3D mushxyzd = new Point3D(mushx, mushy, mushz); firstFlamee.MoveToWorld(mushxyzd, Caster.Map); InternalItem firstFlamef = new InternalItem(Caster.Location, Caster.Map, Caster); mushx = loc.X + 2; mushy = loc.Y + 2; mushz = loc.Z; Point3D mushxyze = new Point3D(mushx, mushy, mushz); firstFlamef.MoveToWorld(mushxyze, Caster.Map); InternalItem firstFlameg = new InternalItem(Caster.Location, Caster.Map, Caster); mushx = loc.X; mushy = loc.Y + 3; mushz = loc.Z; Point3D mushxyzf = new Point3D(mushx, mushy, mushz); firstFlameg.MoveToWorld(mushxyzf, Caster.Map); InternalItem firstFlameh = new InternalItem(Caster.Location, Caster.Map, Caster); mushx = loc.X - 2; mushy = loc.Y + 2; mushz = loc.Z; Point3D mushxyzg = new Point3D(mushx, mushy, mushz); firstFlameh.MoveToWorld(mushxyzg, Caster.Map); InternalItem firstFlamei = new InternalItem(Caster.Location, Caster.Map, Caster); mushx = loc.X - 3; mushy = loc.Y; mushz = loc.Z; Point3D mushxyzh = new Point3D(mushx, mushy, mushz); firstFlamei.MoveToWorld(mushxyzh, Caster.Map); } FinishSequence(); }
public void Target(IPoint3D p) { if (!Caster.CanSee(p)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (!CheckLineOfSight(p)) { this.DoFizzle(); Caster.SendAsciiMessage("Target is not in line of sight"); } else if (SpellHelper.CheckTown(p, Caster) && CheckSequence()) { SpellHelper.Turn(Caster, p); SpellHelper.GetSurfaceTop(ref p); int dx = Caster.Location.X - p.X; int dy = Caster.Location.Y - p.Y; int rx = (dx - dy) * 44; int ry = (dx + dy) * 44; bool eastToWest; if (rx >= 0 && ry >= 0) { eastToWest = false; } else if (rx >= 0) { eastToWest = true; } else if (ry >= 0) { eastToWest = true; } else { eastToWest = false; } Effects.PlaySound(p, Caster.Map, 0x20B); int itemID = eastToWest ? 0x3967 : 0x3979; TimeSpan duration = TimeSpan.FromSeconds(3.0 + (Caster.Skills[SkillName.Magery].Value / 3.0)); for (int i = -2; i <= 2; ++i) { Point3D loc = new Point3D(eastToWest ? p.X + i : p.X, eastToWest ? p.Y : p.Y + i, p.Z); bool canFit = SpellHelper.AdjustField(ref loc, Caster.Map, 12, false); if (!canFit) { continue; } Item item = new InternalItem(Caster, itemID, loc, Caster.Map, duration); item.ProcessDelta(); Effects.SendLocationParticles(EffectItem.Create(loc, Caster.Map, EffectItem.DefaultDuration), 0x376A, 9, 10, 5048); } } FinishSequence(); }
public InternalTimer( InternalItem item, TimeSpan duration ) : base( duration ) { m_Item = item; }
public DecorativeSwordWest() : base(0x1566) { Movable = false; m_Item = new InternalItem(this); }
public void FinishSequence(IPoint3D p, bool carre) { if (!Owner.CanSee(p)) { Owner.SendLocalizedMessage(500237); // Target can not be seen. } double time = (int)(Owner.Niveau) * (Maitrise / 10.0); time *= getRatio(); m_timer = new InternalTimer(this, time); m_timer.Start(); bool blok = (m_damageWalk < 1); int id = 0x93; if (!carre) { SpellHelper.GetSurfaceTop(ref p); int dx = Owner.Location.X - p.X; int dy = Owner.Location.Y - p.Y; int rx = (dx - dy) * 44; int ry = (dx + dy) * 44; int number = (int)((Owner.Niveau) * (Maitrise / 60.0)); bool eastToWest; if (rx >= 0 && ry >= 0) { eastToWest = false; } else if (rx >= 0) { eastToWest = true; } else if (ry >= 0) { eastToWest = true; } else { eastToWest = false; } Effects.PlaySound(p, Owner.Map, 0x1F6); for (int i = -(number / 2); i < (number / 2); ++i) { Point3D loc = new Point3D(eastToWest ? p.X + i : p.X, eastToWest ? p.Y : p.Y + i, p.Z); bool canFit = SpellHelper.AdjustField(ref loc, Owner.Map, 22, true); //Effects.SendLocationParticles( EffectItem.Create( loc, Caster.Map, EffectItem.DefaultDuration ), 0x376A, 9, 10, 5025 ); if (!canFit) { continue; } Item item = new InternalItem(loc, Owner.Map, Owner, SortNubiaHelper.getMur(energie), time, blok, m_damageWalk); item.Hue = 0; // SortNubiaHelper.getCompColor(competence); m_items.Add(item); //Effects.SendLocationParticles( item, 0x3728, 9, 10, 5025 ); SortNubiaHelper.makeBigSmoke(item.Location, item.Map); //new InternalItem( loc, Caster.Map, Caster ); } } else { Point3D cp = (Point3D)p; int decal = 4; bool eastToWest = true; for (int u = 0; u < 4; u++) { switch (u) { case 0: cp = (Point3D)p; cp.X += decal; eastToWest = false; break; case 1: cp = (Point3D)p; cp.X -= decal; eastToWest = false; break; case 2: cp = (Point3D)p; cp.Y += decal; eastToWest = true; break; case 3: cp = (Point3D)p; cp.Y -= decal; eastToWest = true; break; } for (int i = -3; i <= 3; ++i) { Point3D loc = new Point3D(eastToWest ? cp.X + i : cp.X, eastToWest ? cp.Y : cp.Y + i, cp.Z); bool canFit = SpellHelper.AdjustField(ref loc, Owner.Map, 22, true); //Effects.SendLocationParticles( EffectItem.Create( loc, Caster.Map, EffectItem.DefaultDuration ), 0x376A, 9, 10, 5025 ); if (!canFit) { continue; } Item item = new InternalItem(loc, Owner.Map, Owner, SortNubiaHelper.getMur(energie), time, blok, m_damageWalk); item.Hue = 2184; //ohaCompHelper.getCompColor(competence); m_items.Add(item); SortNubiaHelper.makeBigSmoke(item.Location, item.Map); //new InternalItem( loc, Caster.Map, Caster ); } } } }
public DecorativeDAxeNorth() : base(0x1569) { Movable = false; m_Item = new InternalItem(this); }
public InternalTimer( InternalItem item ) : base(TimeSpan.Zero, TimeSpan.FromSeconds( 1.0 )) { m_Item = item; }
public DecorativeDAxeWest() : base(0x156A) { Movable = false; m_Item = new InternalItem(this); }
public Tapestry6N() : base(0xFE2) { Movable = false; m_Item = new InternalItem(this); }
public InternalTimer(InternalItem item) : base(TimeSpan.Zero, TimeSpan.FromSeconds(1.0)) { m_Item = item; }
public Tapestry5W() : base( 0xFDF ) { Movable = false; m_Item = new InternalItem( this ); }
public InternalTimer(InternalItem item, TimeSpan duration, Mobile caster, bool talk) : base(duration) { m_Item = item; m_Owner = caster; speak = talk; }
public void Effect(Point3D loc, Map map, bool checkMulti) { WarpBlockerTotem recallBlocker = WarpBlockerTotem.RecallBlockerTriggered(Caster, WarpBlockerTotem.MovementMode.GateIn, loc, map); if (recallBlocker != null) { if (recallBlocker.PreventGateOutResponse != "") { Caster.SendMessage(recallBlocker.PreventGateOutResponse); } else { Caster.SendMessage(WarpBlockerTotem.DefaultGateOutResponse); } } else if (map == null || (!Core.AOS && Caster.Map != map)) { Caster.SendLocalizedMessage(1005570); // You can not gate to another facet. } else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.GateTo)) { Caster.SendLocalizedMessage(501802); // Thy spell doth not appear to work... } else if (map != Map.Felucca) { Caster.SendLocalizedMessage(1019004); // You are not allowed to travel there. } else if (Caster.MurderCounts >= Mobile.MurderCountsRequiredForMurderer && map != Map.Felucca) { Caster.SendLocalizedMessage(1019004); // You are not allowed to travel there. } else if (!SpellHelper.CheckIfOK(Caster.Map, loc.X, loc.Y, loc.Z)) { Caster.SendLocalizedMessage(501942); // That location is blocked. } else if ((checkMulti && SpellHelper.CheckMulti(loc, map))) { Caster.SendLocalizedMessage(501942); // That location is blocked. } else if (SpellHelper.IsSolenHiveLoc(loc)) { Caster.SendLocalizedMessage(501802); // Thy spell doth not appear to work... } else if (SpellHelper.IsStarRoom(loc)) { Caster.SendLocalizedMessage(501802); // Thy spell doth not appear to work... } else if (SpellHelper.IsWindLoc(Caster.Location)) { Caster.SendLocalizedMessage(501802); // Thy spell doth not appear to work... } else if (SpellHelper.IsWindLoc(loc)) { Caster.SendLocalizedMessage(501802); // Thy spell doth not appear to work... } else if (BaseShip.FindShipAt(loc, map) != null) { Caster.SendLocalizedMessage(501802); // Thy spell doth not appear to work... } else if (m_RuneTome != null && m_RuneTome.GateCharges <= 0) { Caster.SendMessage("There are no gate charges left on that item."); } else if (CheckSequence() && CheckCast()) { if (m_RuneTome != null) { --m_RuneTome.GateCharges; } Caster.SendLocalizedMessage(501024); // You open a magical gate to another location //Player Enhancement Customization: Traveler bool traveler = false; //PlayerEnhancementPersistance.IsCustomizationEntryActive(Caster, CustomizationType.Traveler); if (traveler) { //First Gate Effects.PlaySound(Caster.Location, Caster.Map, 0x5CE); Effects.SendLocationParticles(EffectItem.Create(Caster.Location, Caster.Map, TimeSpan.FromSeconds(0.5)), 6899, 10, 30, 0, 0, 5029, 0); InternalItem firstGate = new InternalItem(loc, map); firstGate.Visible = false; firstGate.MoveToWorld(Caster.Location, Caster.Map); //Second Gate Effects.PlaySound(loc, map, 0x5CE); Effects.SendLocationParticles(EffectItem.Create(loc, map, TimeSpan.FromSeconds(0.5)), 6899, 10, 30, 0, 0, 5029, 0); InternalItem secondGate = new InternalItem(Caster.Location, Caster.Map); secondGate.Visible = false; secondGate.MoveToWorld(loc, map); Timer.DelayCall(TimeSpan.FromSeconds(1.25), delegate { if (firstGate != null) { if (!firstGate.Deleted) { firstGate.Visible = true; } } if (secondGate != null) { if (!secondGate.Deleted) { secondGate.Visible = true; } } }); } else { Effects.PlaySound(Caster.Location, Caster.Map, 0x20E); InternalItem firstGate = new InternalItem(loc, map); firstGate.MoveToWorld(Caster.Location, Caster.Map); Effects.PlaySound(loc, map, 0x20E); InternalItem secondGate = new InternalItem(Caster.Location, Caster.Map); secondGate.MoveToWorld(loc, map); } } FinishSequence(); }
public InternalTimer( InternalItem item, TimeSpan duration ) : base( duration ) { Priority = TimerPriority.OneSecond; m_Item = item; }
public DecorativeDAxeNorth() : base(0x1569) { Movable = false; m_Item = new InternalItem( this ); }
public Tapestry5W() : base(0xFDF) { Movable = false; m_Item = new InternalItem(this); }
public DecorativeSwordNorth() : base(0x1565) { Movable = false; m_Item = new InternalItem( this ); }
public InternalTimer( InternalItem item, TimeSpan delay ) : base(delay, TimeSpan.FromSeconds( 1.0 )) { m_Item = item; Priority = TimerPriority.FiftyMS; }
public InternalTimer( InternalItem item, DateTime end ) : base( TimeSpan.Zero, TimeSpan.FromSeconds( 1.0 ) ) { m_Item = item; m_End = end; Priority = TimerPriority.FiftyMS; }
public void Target(IPoint3D p) { if (!Caster.CanSee(p)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (!CheckLineOfSight(p)) { this.DoFizzle(); Caster.SendAsciiMessage("Target is not in line of sight"); } else if (SpellHelper.CheckTown(p, Caster) && CheckSequence()) { SpellHelper.Turn(Caster, p); SpellHelper.GetSurfaceTop(ref p); int dx = Caster.Location.X - p.X; int dy = Caster.Location.Y - p.Y; int rx = (dx - dy) * 44; int ry = (dx + dy) * 44; bool eastToWest; if (rx >= 0 && ry >= 0) { eastToWest = false; } else if (rx >= 0) { eastToWest = true; } else if (ry >= 0) { eastToWest = true; } else { eastToWest = false; } Effects.PlaySound(p, Caster.Map, 0x1F6); for (int i = -2; i < 3; ++i) { Point3D loc = new Point3D(eastToWest ? p.X + i : p.X, eastToWest ? p.Y : p.Y + i, p.Z); bool canFit = SpellHelper.AdjustField(ref loc, Caster.Map, 22, true); //Effects.SendLocationParticles( EffectItem.Create( loc, Caster.Map, EffectItem.DefaultDuration ), 0x376A, 9, 10, 5025 ); if (!canFit) { continue; } Item item = new InternalItem(loc, Caster.Map, Caster); Effects.SendLocationParticles(item, 0x376A, 9, 10, 5025); //new InternalItem( loc, Caster.Map, Caster ); } } FinishSequence(); }
public void Effect(Point3D loc, Map map, bool checkMulti) { if (!map.CanSpawnMobile(loc.X, loc.Y, loc.Z)) { Caster.SendLocalizedMessage(501942); // That location is blocked. } else if (Worlds.AllowEscape(Caster, Caster.Map, Caster.Location, Caster.X, Caster.Y) == false) { Caster.SendMessage("That spell does not seem to work in this place."); } else if (Worlds.RegionAllowedRecall(Caster.Map, Caster.Location, Caster.X, Caster.Y) == false) { Caster.SendMessage("That potion does not seem to work in this place."); } else if (Worlds.RegionAllowedTeleport(map, loc, loc.X, loc.Y) == false) { Caster.SendMessage("The destination seems magically unreachable with this potion."); } else if ((checkMulti && SpellHelper.CheckMulti(loc, map))) { Caster.SendLocalizedMessage(501942); // That location is blocked. } else if (CheckSequence()) { Caster.SendMessage("You open a mystical portal in a mushroom circle"); // You open a magical gate to another location Effects.PlaySound(Caster.Location, Caster.Map, 0x1); int mushx; int mushy; int mushz; InternalItem firstGatea = new InternalItem(loc, map); mushx = Caster.X; mushy = Caster.Y; mushz = Caster.Z; firstGatea.ItemID = 0xD10; Point3D mushxyz = new Point3D(mushx, mushy, mushz); firstGatea.MoveToWorld(mushxyz, Caster.Map); InternalItem firstGateb = new InternalItem(loc, map); mushx = Caster.X; mushy = Caster.Y; firstGateb.ItemID = 0x373A; mushz = Caster.Z + 1; Point3D mushxyza = new Point3D(mushx, mushy, mushz); firstGateb.MoveToWorld(mushxyza, Caster.Map); InternalItem firstGatec = new InternalItem(loc, map); mushx = Caster.X - 1; firstGatec.ItemID = 0xD11; mushy = Caster.Y + 1; mushz = Caster.Z; Point3D mushxyzb = new Point3D(mushx, mushy, mushz); firstGatec.MoveToWorld(mushxyzb, Caster.Map); InternalItem firstGated = new InternalItem(loc, map); firstGated.ItemID = 0xD0C; mushx = Caster.X; mushy = Caster.Y + 2; mushz = Caster.Z; Point3D mushxyzc = new Point3D(mushx, mushy, mushz); firstGated.MoveToWorld(mushxyzc, Caster.Map); InternalItem firstGatee = new InternalItem(loc, map); mushx = Caster.X + 1; firstGatee.ItemID = 0xD0D; mushy = Caster.Y + 1; mushz = Caster.Z; Point3D mushxyzd = new Point3D(mushx, mushy, mushz); firstGatee.MoveToWorld(mushxyzd, Caster.Map); InternalItem firstGatef = new InternalItem(loc, map); firstGatef.ItemID = 0xD0E; mushx = Caster.X + 2; mushy = Caster.Y; mushz = Caster.Z; Point3D mushxyze = new Point3D(mushx, mushy, mushz); firstGatef.MoveToWorld(mushxyze, Caster.Map); InternalItem firstGateg = new InternalItem(loc, map); mushx = Caster.X + 1; firstGateg.ItemID = 0xD0F; mushy = Caster.Y - 1; mushz = Caster.Z; Point3D mushxyzf = new Point3D(mushx, mushy, mushz); firstGateg.MoveToWorld(mushxyzf, Caster.Map); if (Worlds.RegionAllowedTeleport(Caster.Map, Caster.Location, Caster.X, Caster.Y) == true) { Effects.PlaySound(loc, map, 0x1); InternalItem secondGatea = new InternalItem(Caster.Location, Caster.Map); mushx = loc.X; mushy = loc.Y; mushz = loc.Z; secondGatea.ItemID = 0xD10; Point3D mushaxyz = new Point3D(mushx, mushy, mushz); secondGatea.MoveToWorld(mushaxyz, map); InternalItem secondGateb = new InternalItem(Caster.Location, Caster.Map); mushx = loc.X; mushy = loc.Y; secondGateb.ItemID = 0x373A; mushz = loc.Z + 1; Point3D mushaxyza = new Point3D(mushx, mushy, mushz); secondGateb.MoveToWorld(mushaxyza, map); InternalItem secondGatec = new InternalItem(Caster.Location, Caster.Map); mushx = loc.X - 1; secondGatec.ItemID = 0xD11; mushy = loc.Y + 1; mushz = loc.Z - 1; Point3D mushaxyzb = new Point3D(mushx, mushy, mushz); secondGatec.MoveToWorld(mushaxyzb, map); InternalItem secondGated = new InternalItem(Caster.Location, Caster.Map); mushx = loc.X; mushy = loc.Y + 2; secondGated.ItemID = 0xD0C; mushz = loc.Z; Point3D mushaxyzc = new Point3D(mushx, mushy, mushz); secondGated.MoveToWorld(mushaxyzc, map); InternalItem secondGatee = new InternalItem(Caster.Location, Caster.Map); mushx = loc.X + 1; mushy = loc.Y + 1; mushz = loc.Z; secondGatee.ItemID = 0xD0D; Point3D mushaxyzd = new Point3D(mushx, mushy, mushz); secondGatee.MoveToWorld(mushaxyzd, map); InternalItem secondGatef = new InternalItem(Caster.Location, Caster.Map); mushx = loc.X + 2; mushy = loc.Y; mushz = loc.Z; secondGatef.ItemID = 0xD0E; Point3D mushaxyze = new Point3D(mushx, mushy, mushz); secondGatef.MoveToWorld(mushaxyze, map); InternalItem secondGateg = new InternalItem(Caster.Location, Caster.Map); mushx = loc.X + 1; secondGateg.ItemID = 0xD0F; mushy = loc.Y - 1; mushz = loc.Z; Point3D mushaxyzf = new Point3D(mushx, mushy, mushz); secondGateg.MoveToWorld(mushaxyzf, map); } } FinishSequence(); }
public InternalTimer(InternalItem item, TimeSpan delay, bool inLOS, bool canFit) : base(delay, TimeSpan.FromSeconds(1.0)) { m_Item = item; }
public void Effect( Point3D loc, Map map, bool checkMulti ) { if( map == null || (Core.AOS && Caster.Map != map) ) { Caster.SendLocalizedMessage( 1005570 ); // You can not gate to another facet. } else if( !SpellHelper.CheckTravel( Caster, TravelCheckType.GateFrom ) ) { } else if( !SpellHelper.CheckTravel( Caster, map, loc, TravelCheckType.GateTo ) ) { } else if( Caster.Kills >= 5 && map != Map.Felucca ) { Caster.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there. } else if( Caster.Criminal ) { Caster.SendLocalizedMessage( 1005561, "", 0x22 ); // Thou'rt a criminal and cannot escape so easily. } else if( SpellHelper.CheckCombat( Caster ) ) { Caster.SendLocalizedMessage( 1005564, "", 0x22 ); // Wouldst thou flee during the heat of battle?? } //else if( !map.CanSpawnMobile( loc.X, loc.Y, loc.Z ) ) //{ // Caster.SendLocalizedMessage( 501942 ); // That location is blocked. //} //else if( (checkMulti && SpellHelper.CheckMulti( loc, map )) ) //{ // Caster.SendLocalizedMessage( 501942 ); // That location is blocked. //} else if ( Core.AOS && ( GateExistsAt( map, loc ) || GateExistsAt( Caster.Map, Caster.Location ) ) ) // SE restricted stacking gates { Caster.SendLocalizedMessage( 1071242 ); // There is already a gate there. } else if( CheckSequence() ) { Caster.SendLocalizedMessage( 501024 ); // You open a magical gate to another location Effects.PlaySound( Caster.Location, Caster.Map, 0x20E ); InternalItem firstGate = new InternalItem( loc, map ); firstGate.MoveToWorld( Caster.Location, Caster.Map ); Effects.PlaySound( loc, map, 0x20E ); InternalItem secondGate = new InternalItem( Caster.Location, Caster.Map ); secondGate.MoveToWorld( loc, map ); ((Moongate)firstGate).PairedGate = secondGate; ((Moongate)secondGate).PairedGate = firstGate; } FinishSequence(); }
public AnkhEast(bool bloodied) : base(bloodied ? 0x1E5D : 0x4) { Movable = false; m_Item = new InternalItem(bloodied, this); }
public InternalTimer(InternalItem item, TimeSpan delay, bool inLOS, bool canFit) : base(delay, TimeSpan.FromSeconds(1.5)) { m_Item = item; m_InLOS = inLOS; m_CanFit = canFit; Priority = TimerPriority.FiftyMS; }
public AnkhWest(bool bloodied) : base(bloodied ? 0x1D98 : 0x3) { Movable = false; m_Item = new InternalItem(bloodied, this); }
public InternalTimer(InternalItem item, TimeSpan duration) : base(duration) { m_Item = item; }
public Tapestry1N() : base(0xEAA) { Movable = false; m_Item = new InternalItem(this); }
public void Effect(Point3D loc, Map map, bool checkMulti, bool isboatkey = false) { if (Factions.Sigil.ExistsOn(this.Caster)) { this.Caster.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil. } else if (map == null || (!Core.AOS && this.Caster.Map != map)) { this.Caster.SendLocalizedMessage(1005570); // You can not gate to another facet. } else if (!SpellHelper.CheckTravel(this.Caster, TravelCheckType.GateFrom)) { } else if (!SpellHelper.CheckTravel(this.Caster, map, loc, TravelCheckType.GateTo)) { } else if (map == Map.Felucca && this.Caster is PlayerMobile && ((PlayerMobile)this.Caster).Young) { this.Caster.SendLocalizedMessage(1049543); // You decide against traveling to Felucca while you are still young. } else if (this.Caster.Murderer && map.Rules != MapRules.FeluccaRules && !Siege.SiegeShard) { this.Caster.SendLocalizedMessage(1019004); // You are not allowed to travel there. } else if (this.Caster.Criminal) { this.Caster.SendLocalizedMessage(1005561, "", 0x22); // Thou'rt a criminal and cannot escape so easily. } else if (SpellHelper.CheckCombat(this.Caster)) { this.Caster.SendLocalizedMessage(1005564, "", 0x22); // Wouldst thou flee during the heat of battle?? } else if (!map.CanSpawnMobile(loc.X, loc.Y, loc.Z) && !isboatkey) { this.Caster.SendLocalizedMessage(501942); // That location is blocked. } else if ((checkMulti && SpellHelper.CheckMulti(loc, map)) && !isboatkey) { this.Caster.SendLocalizedMessage(501942); // That location is blocked. } else if (Core.SE && (this.GateExistsAt(map, loc) || this.GateExistsAt(this.Caster.Map, this.Caster.Location))) // SE restricted stacking gates { this.Caster.SendLocalizedMessage(1071242); // There is already a gate there. } else if (Server.Engines.CityLoyalty.CityTradeSystem.HasTrade(Caster)) { Caster.SendLocalizedMessage(1151733); // You cannot do that while carrying a Trade Order. } else if (this.CheckSequence()) { Timer.DelayCall(TimeSpan.FromSeconds(1), () => { Caster.SendLocalizedMessage(501024); // You open a magical gate to another location Effects.PlaySound(this.Caster.Location, this.Caster.Map, 0x20E); InternalItem firstGate = new InternalItem(loc, map); firstGate.MoveToWorld(this.Caster.Location, this.Caster.Map); Effects.PlaySound(loc, map, 0x20E); InternalItem secondGate = new InternalItem(this.Caster.Location, this.Caster.Map); secondGate.MoveToWorld(loc, map); firstGate.LinkedGate = secondGate; secondGate.LinkedGate = firstGate; firstGate.BoatGate = BaseBoat.FindBoatAt(firstGate, firstGate.Map) != null; secondGate.BoatGate = BaseBoat.FindBoatAt(secondGate, secondGate.Map) != null; }); } this.FinishSequence(); }
public void Effect(Point3D loc, Map map, bool checkMulti) { if (Factions.Sigil.ExistsOn(Caster)) { Caster.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil. } else if (map == null || (!Core.AOS && Caster.Map != map)) { Caster.SendLocalizedMessage(1005570); // You can not gate to another facet. } else if (!SpellHelper.CheckTravel(Caster, TravelCheckType.GateFrom)) { } else if (!SpellHelper.CheckTravel(Caster, map, loc, TravelCheckType.GateTo)) { } //else if ( map == Map.Felucca && Caster is PlayerMobile && ((PlayerMobile)Caster).Young ) //{ // Caster.SendLocalizedMessage( 1049543 ); // You decide against traveling to Felucca while you are still young. //} //else if ( Caster.Kills >= Mobile.MurderCount && map != Map.Felucca ) //{ // Caster.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there. //} else if (Caster.Criminal) { Caster.SendLocalizedMessage(1005561, "", 0x22); // Thou'rt a criminal and cannot escape so easily. } else if (SpellHelper.CheckCombat(Caster)) { Caster.SendLocalizedMessage(1005564, "", 0x22); // Wouldst thou flee during the heat of battle?? } else if (!map.CanSpawnMobile(loc.X, loc.Y, loc.Z)) { Caster.SendLocalizedMessage(501942); // That location is blocked. } else if ((checkMulti && SpellHelper.CheckMulti(loc, map))) { Caster.SendLocalizedMessage(501942); // That location is blocked. } else if (Core.SE && (GateExistsAt(map, loc) || GateExistsAt(Caster.Map, Caster.Location))) // SE restricted stacking gates { Caster.SendLocalizedMessage(1071242); // There is already a gate there. } else if (CheckSequence()) { Caster.SendLocalizedMessage(501024); // You open a magical gate to another location Effects.PlaySound(Caster.Location, Caster.Map, 0x20E); InternalItem firstGate = new InternalItem(loc, map); firstGate.MoveToWorld(Caster.Location, Caster.Map); Effects.PlaySound(loc, map, 0x20E); InternalItem secondGate = new InternalItem(Caster.Location, Caster.Map); secondGate.MoveToWorld(loc, map); firstGate.Link = secondGate; secondGate.Link = firstGate; } FinishSequence(); }
public void Effect( Point3D loc, Map map, bool checkMulti ) { if ( Factions.Sigil.ExistsOn( Caster ) ) { Caster.SendLocalizedMessage( 1061632 ); // You can't do that while carrying the sigil. } else if ( map == null || (!Core.AOS && Caster.Map != map) ) { Caster.SendLocalizedMessage( 1005570 ); // You can not gate to another facet. } else if ( !SpellHelper.CheckTravel( Caster, TravelCheckType.GateFrom ) ) { } else if ( !SpellHelper.CheckTravel( Caster, map, loc, TravelCheckType.GateTo ) ) { } else if ( map == Map.Felucca && Caster is PlayerMobile && ((PlayerMobile)Caster).Young ) { Caster.SendLocalizedMessage( 1049543 ); // You decide against traveling to Felucca while you are still young. } else if ( Caster.Kills >= 5 && map != Map.Felucca ) { Caster.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there. } else if ( Caster.Criminal ) { Caster.SendLocalizedMessage( 1005561, "", 0x22 ); // Thou'rt a criminal and cannot escape so easily. } else if ( SpellHelper.CheckCombat( Caster ) ) { Caster.SendLocalizedMessage( 1005564, "", 0x22 ); // Wouldst thou flee during the heat of battle?? } else if ( !map.CanSpawnMobile( loc.X, loc.Y, loc.Z ) ) { Caster.SendLocalizedMessage( 501942 ); // That location is blocked. } else if ( (checkMulti && SpellHelper.CheckMulti( loc, map )) ) { Caster.SendLocalizedMessage( 501942 ); // That location is blocked. } else if ( Core.SE && ( GateExistsAt( map, loc ) || GateExistsAt( Caster.Map, Caster.Location ) ) ) // SE restricted stacking gates { Caster.SendLocalizedMessage( 1071242 ); // There is already a gate there. } else if ( CheckSequence() ) { Caster.SendLocalizedMessage( 501024 ); // You open a magical gate to another location Effects.PlaySound( Caster.Location, Caster.Map, 0x20E ); InternalItem firstGate = new InternalItem( loc, map ); firstGate.MoveToWorld( Caster.Location, Caster.Map ); Effects.PlaySound( loc, map, 0x20E ); InternalItem secondGate = new InternalItem( Caster.Location, Caster.Map ); secondGate.MoveToWorld( loc, map ); } FinishSequence(); }
public override void OnDoubleClick(Mobile from) { bool inCombat = (from.Combatant != null && from.InRange(from.Combatant.Location, 20) && from.Combatant.InLOS(from)); CharacterDatabase DB = Server.Items.CharacterDatabase.GetDB(from); int CanUseTent = 0; if (from.Skills[SkillName.Camping].Value < 40) { from.SendMessage("You must be a novice explorer to use this tent."); return; } else if (from.Region.IsPartOf(typeof(PublicRegion))) { from.SendMessage("This is a really nice camping tent."); return; } else if (Server.Misc.Worlds.IsOnBoat(from)) { from.SendMessage("You cannot setup this tent near a boat."); return; } else if (Server.Misc.Worlds.IsOnSpaceship(from.Location, from.Map)) { from.SendMessage("You don't have anywhere to setup camp in this strange place."); return; } else if (inCombat) { from.SendMessage("You cannot setup a tent while in combat."); return; } else if ((from.Region.IsPartOf(typeof(BardDungeonRegion)) || from.Region.IsPartOf(typeof(DungeonRegion))) && from.Skills[SkillName.Camping].Value >= 90) { CanUseTent = 1; } else if (from.Skills[SkillName.Camping].Value < 90 && !Server.Misc.Worlds.IsMainRegion(Server.Misc.Worlds.GetRegionName(from.Map, from.Location)) && !from.Region.IsPartOf(typeof(OutDoorRegion)) && !from.Region.IsPartOf(typeof(OutDoorBadRegion)) && !from.Region.IsPartOf(typeof(VillageRegion))) { from.SendMessage("You are only skilled enough to use this tent outdoors."); return; } else if (from.Skills[SkillName.Camping].Value >= 90 && !from.Region.IsPartOf(typeof(DungeonRegion)) && !from.Region.IsPartOf(typeof(BardDungeonRegion)) && !Server.Misc.Worlds.IsMainRegion(Server.Misc.Worlds.GetRegionName(from.Map, from.Location)) && !from.Region.IsPartOf(typeof(OutDoorRegion)) && !from.Region.IsPartOf(typeof(OutDoorBadRegion)) && !from.Region.IsPartOf(typeof(VillageRegion))) { from.SendMessage("You can only use this tent outdoors or in dungeons."); return; } else { CanUseTent = 1; } if (CanUseTent > 0 && from.CheckSkill(SkillName.Camping, 0.0, 125.0)) { if (IsChildOf(from.Backpack) && Charges > 0) { from.CheckSkill(SkillName.Camping, 0, 125); from.CheckSkill(SkillName.Camping, 0, 125); from.CheckSkill(SkillName.Camping, 0, 125); ConsumeCharge(from); PlayerMobile pc = (PlayerMobile)from; string sX = from.X.ToString(); string sY = from.Y.ToString(); string sZ = from.Z.ToString(); string sMap = Worlds.GetMyMapString(from.Map); string sZone = "the Camping Tent"; if (from.Region.IsPartOf(typeof(DungeonRegion)) || from.Region.IsPartOf(typeof(BardDungeonRegion))) { sZone = "the Dungeon Room"; } string doors = sX + "#" + sY + "#" + sZ + "#" + sMap + "#" + sZone; DB.CharacterPublicDoor = doors; Point3D loc = new Point3D(3709, 3974, 0); if (from.Region.IsPartOf(typeof(DungeonRegion))) { loc = new Point3D(3686, 3330, 0); } else if (from.Region.IsPartOf(typeof(BardDungeonRegion))) { loc = new Point3D(3686, 3330, 0); } else if (from.Skills[SkillName.Camping].Value > 66) { loc = new Point3D(3790, 3966, 0); } TentTeleport(from, loc, Map.Trammel, 0x057, sZone, "enter"); return; } else if (from.InRange(this.GetWorldLocation(), 3) && Charges > 0) { from.CheckSkill(SkillName.Camping, 0, 125); from.CheckSkill(SkillName.Camping, 0, 125); from.CheckSkill(SkillName.Camping, 0, 125); ConsumeCharge(from); PlayerMobile pc = (PlayerMobile)from; string sX = from.X.ToString(); string sY = from.Y.ToString(); string sZ = from.Z.ToString(); string sMap = Worlds.GetMyMapString(from.Map); string sZone = "the Camping Tent"; if (from.Region.IsPartOf(typeof(DungeonRegion)) || from.Region.IsPartOf(typeof(BardDungeonRegion))) { sZone = "the Dungeon Room"; } string doors = sX + "#" + sY + "#" + sZ + "#" + sMap + "#" + sZone; DB.CharacterPublicDoor = doors; Point3D loc = new Point3D(3709, 3974, 0); if (from.Region.IsPartOf(typeof(DungeonRegion))) { loc = new Point3D(3686, 3330, 0); } else if (from.Region.IsPartOf(typeof(BardDungeonRegion))) { loc = new Point3D(3686, 3330, 0); } else if (from.Skills[SkillName.Camping].Value > 66) { loc = new Point3D(3790, 3966, 0); } InternalItem builtTent = new InternalItem(); builtTent.Name = "camping tent"; PublicDoor publicTent = (PublicDoor)builtTent; publicTent.m_PointDest = loc; publicTent.m_MapDest = Map.Trammel; builtTent.MoveToWorld(this.Location, this.Map); from.AddToBackpack(this); TentTeleport(from, loc, Map.Trammel, 0x057, sZone, "enter"); return; } else if (!from.InRange(this.GetWorldLocation(), 3) && Charges > 0) { from.SendLocalizedMessage(502138); // That is too far away for you to use return; } else { from.SendMessage("This tent is too worn from over use, and is no longer of any good."); this.Delete(); return; } } else if (CanUseTent > 0) { from.SendMessage("Your tent is a bit more worn out as you fail to set it up properly."); from.CheckSkill(SkillName.Camping, 0, 125); from.CheckSkill(SkillName.Camping, 0, 125); from.CheckSkill(SkillName.Camping, 0, 125); ConsumeCharge(from); if (Charges < 1) { from.SendMessage("This tent is too worn from over use, and is no longer of any good."); this.Delete(); return; } return; } }
public AnkhWest( bool bloodied ) : base( bloodied ? 0x1D98 : 0x3 ) { Movable = false; m_Item = new InternalItem( bloodied, this ); }
public InternalTimer(InternalItem item, TimeSpan duration) : base(duration) { Priority = TimerPriority.OneSecond; m_Item = item; }