コード例 #1
0
        public override void OnThink()
        {
            base.OnThink();

            if (boatspawn == false)
            {
                Map map = this.Map;

                if (map == null)
                {
                    return;
                }

                m_SmallBoat = new SmallBoat();
                Point3D loc     = this.Location;
                Point3D loccrew = this.Location;
                loc                       = new Point3D(this.X, this.Y - 1, this.Z);
                this.Z                    = 0;
                m_SmallBoat.Hue           = 0x5BE;
                m_SmallBoat.PPlank.Hue    = 0x5BE;
                m_SmallBoat.SPlank.Hue    = 0x5BE;
                m_SmallBoat.TillerMan.Hue = 0x5BE;
                m_SmallBoat.Hold.Hue      = 0x5BE;
                m_SmallBoat.BoatDoor.Hue  = 0x5BE;
                m_SmallBoat.MoveToWorld(loc, map);
                m_SmallBoat.MoveToWorld(loc, map);
                boatspawn = true;
            }

            base.OnThink();
            if (DateTime.UtcNow < m_NextPickup)
            {
                return;
            }

            if (m_SmallBoat == null)
            {
                return;
            }

            m_NextPickup = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(5, 10));

            switch (Utility.RandomMinMax(0, 7))
            {
            case 0: Peace(Combatant); break;

            case 1: Undress(Combatant); break;

            case 2: Suppress(Combatant); break;

            case 3: Provoke(Combatant); break;
            }
        }
コード例 #2
0
        public override void OnThink()
        {
            if (boatspawn == false)
            {
                Map map = this.Map;

                if (map == null)
                {
                    return;
                }

                m_SmallBoat = new SmallBoat();
                Point3D loc     = this.Location;
                Point3D loccrew = this.Location;
                loc                       = new Point3D(this.X, this.Y - 1, this.Z);
                this.Z                    = 0;
                m_SmallBoat.Hue           = 0x5BE;
                m_SmallBoat.PPlank.Hue    = 0x5BE;
                m_SmallBoat.SPlank.Hue    = 0x5BE;
                m_SmallBoat.TillerMan.Hue = 0x5BE;
                m_SmallBoat.Hold.Hue      = 0x5BE;
                m_SmallBoat.BoatDoor.Hue  = 0x5BE;
                m_SmallBoat.MoveToWorld(loc, map);
                m_SmallBoat.MoveToWorld(loc, map);
                boatspawn = true;
            }

            base.OnThink();
            if (DateTime.UtcNow < m_NextPickup)
            {
                return;
            }

            if (m_SmallBoat == null)
            {
                return;
            }

            m_NextPickup = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(1, 2));
        }