Monitoring of pipelines carrying oil, gas and water is necessary to avoid the wastage of these natural resources. Linear Wireless Sensor Network (LWSN) is one of the best ways to monitor these pipelines efficiently. In LWSN, the positioning of nodes and the routing scheme can be used to avoid the losses occur during transportation of these resources to their corresponding destinations. This paper modifies the Lion Optimization Algorithm by using the lightning procedure of cloud for defining the position of sensor nodes while for routing jump and redirect routing scheme is used. In this algorithm, the lions travel from one location to the other as the light moves from cloud towards the ground. The algorithm proves its significance by showing significant improvement while comparing its performance with four existing algorithms including Lion Optimization Algorithm, Genetic Algorithm, Ant Colony Optimization and without optimization. The performance parameters considered during simulation are delay, throughput and lifetime.