예제 #1
0
        private void doWalk(string[] args, Player player)
        {
            Movement movement = new Movement();

            if (player.combat.isFighting)
            {
                player.client.send("Not while fighting!");
                return;
            }

            if (movement.walk(Direction.shortDirectionToInt(args[0].TrimEnd('\r', '\n')), player))
            {
                player.parser.parse("look");
            }
            else
            {
                player.client.send("You can't go that way!");
            }
        }
예제 #2
0
파일: NPC.cs 프로젝트: pboutell/amud-server
        public virtual void updateMovement(DateTime time)
        {
            Movement move = new Movement();

            if (isMobile)
            {
                if (World.randomNumber.Next(75) == 0)
                {
                    move.walk(World.randomNumber.Next(4), this);
                }
            }
        }