Beispiel #1
0
            protected override void OnTick()
            {
                if (m_tarjan != null)
                {
                    if (m_tarjan.Warmode == false)
                    {
                        TarjanStatue MyStatue = new TarjanStatue();
                        Map          map      = m_tarjan.Map;
                        Point3D      sloc     = new Point3D(5559, 1121, 45);
                        MyStatue.MoveToWorld(sloc, map);

                        Effects.SendLocationParticles(EffectItem.Create(MyStatue.Location, MyStatue.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 2023);
                        m_tarjan.PlaySound(0x1FE);
                        Effects.SendLocationParticles(EffectItem.Create(m_tarjan.Location, m_tarjan.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023);
                        m_tarjan.Delete();
                    }
                    else
                    {
                        TarjanTimer thisTimer = new TarjanTimer(m_tarjan);
                        thisTimer.Start();
                    }
                }
            }
Beispiel #2
0
        public override bool OnBeforeDeath()
        {
            TarjanStatue MyStatue = new TarjanStatue();
            TarjanBox    MyChest  = new TarjanBox();

            Map map = this.Map;

            bool    validLocation = false;
            Point3D loc           = this.Location;
            Point3D sloc          = new Point3D(5559, 1121, 45);

            for (int j = 0; !validLocation && j < 10; ++j)
            {
                int x = X + Utility.Random(3) - 1;
                int y = Y + Utility.Random(3) - 1;
                int z = map.GetAverageZ(x, y);

                if (validLocation = map.CanFit(x, y, this.Z, 16, false, false))
                {
                    loc = new Point3D(x, y, Z);
                }
                else if (validLocation = map.CanFit(x, y, z, 16, false, false))
                {
                    loc = new Point3D(x, y, z);
                }
            }

            MyChest.MoveToWorld(loc, map);
            MyStatue.MoveToWorld(sloc, map);

            QuestGlow MyGlow = new QuestGlow();

            MyGlow.MoveToWorld(loc, map);

            return(base.OnBeforeDeath());
        }