Example #1
0
        private void OnLogout(LogoutEventArgs e)
        {
            int cnt = 0;

            foreach (Item item in World.Items.Values)
            {
                if (item.Name != null)
                {
                    if (item.Name.Contains("Black Box Portal") || item.Name.Contains("Black Box SoulStone"))
                    {
                        BBTravel BBT = item as BBTravel;

                        if (BBT.Owner == e.Mobile.Name)
                        {
                            item.Delete();

                            cnt++;
                        }
                    }

                    if (item.Name.Contains("Black Box Portal Exit"))
                    {
                        BBTravelEnd BBT = item as BBTravelEnd;

                        if (BBT.Owner == e.Mobile.Name)
                        {
                            item.Delete();

                            cnt++;
                        }
                    }
                }
            }
        }
Example #2
0
 private void StartingSound(BBTravelEnd gate)
 {
     if (gate != null)
     {
         Sound_Timer = new SoundTimer(gate);
         Sound_Timer.Start();
     }
 }
Example #3
0
 private void StartDeleteGate(BBTravelEnd gate)
 {
     if (gate != null)
     {
         Delete_Timer = new DeleteTimer(gate);
         Delete_Timer.Start();
     }
 }
Example #4
0
            protected override void OnTick()
            {
                pm.MoveToWorld(i_Gate.New_Location, i_Gate.New_Map);

                if (i_Gate.IsSpecial)
                {
                    Point3D point3D = new Point3D(pm.X, pm.Y, pm.Z);

                    if (i_Gate.Hue == 1260) //Fire
                    {
                        Effects.SendLocationEffect(i_Gate.New_Location, i_Gate.New_Map, 0x3709, 30);
                    }
                    if (i_Gate.Hue == 1266) //Ice
                    {
                        Effects.SendLocationEffect(i_Gate.New_Location, i_Gate.New_Map, 0x37CC, 40);
                    }
                    if (i_Gate.Hue == 1272) //Toxic
                    {
                        Effects.SendLocationEffect(i_Gate.New_Location, i_Gate.New_Map, 0x374A, 17);
                    }
                    if (i_Gate.Hue == 1283) //Electric
                    {
                        Effects.SendBoltEffect(pm);
                    }
                    if (i_Gate.Hue == 1288) //Mist
                    {
                        Effects.SendLocationEffect(i_Gate.New_Location, i_Gate.New_Map, 0x3728, 13);
                    }
                    if (i_Gate.Hue == 1174) //Explosion
                    {
                        Effects.SendLocationEffect(i_Gate.New_Location, i_Gate.New_Map, 0x36BD, 10);
                    }
                    if (i_Gate.Hue == 1177) //Stone
                    {
                        Effects.SendLocationEffect(i_Gate.New_Location, i_Gate.New_Map, 0x37C4, 31);
                    }
                    if (i_Gate.Hue == 1287) //Shiny
                    {
                        Effects.SendLocationEffect(i_Gate.New_Location, i_Gate.New_Map, 0x375A, 30);
                    }
                }
                else
                {
                    BBTravelEnd i_BlackBoxEnd = new BBTravelEnd(i_Gate.Custom_Hue, pm.Name);

                    i_BlackBoxEnd.MoveToWorld(i_Gate.New_Location, i_Gate.New_Map);
                    Effects.SendLocationEffect(i_Gate.New_Location, i_Gate.New_Map, 0x3728, 13);
                }
                i_Gate.StartSound(i_Gate);

                if (i_Gate.IsSpecial)
                {
                    i_Gate.Delete();
                }
                Stop();
            }
Example #5
0
        private void StartSound(BBTravelEnd BBT)
        {
            foreach (Mobile player in World.Mobiles.Values)
            {
                PlayerMobile pm = player as PlayerMobile;

                if (pm != null && BBT != null)
                {
                    if (pm.Map == BBT.Map)
                    {
                        if (pm.X > (BBT.X - 20) && pm.X < (BBT.X + 20))
                        {
                            if (pm.Y > (BBT.Y - 20) && pm.Y < (BBT.Y + 20))
                            {
                                pm.PlaySound(0x20F);
                            }
                        }
                    }
                }
            }
        }
Example #6
0
 public DeleteTimer(BBTravelEnd gate) : base(TimeSpan.FromSeconds(deleteDelay))
 {
     i_Gate = gate;
 }
Example #7
0
 public SoundTimer(BBTravelEnd gate) : base(TimeSpan.FromMilliseconds(soundDelay))
 {
     i_Gate = gate;
 }