What is the way?

If i write/short a calls when the script is bearish, then the script take a turn and make a bull run, in this case i want to book my profit and stop that un limited loss of call writing? what is the way?

Never do naked shorting. Try strategies such as bull spread or iron condor to minimize your risk. Also pre-decide your exits if market goes against you

The next thing for u to do is to learn about Trailing Stop-Loss and Cover Order Entry. There are so many queries already answered in tradingqna on this and u need to search with keywords.

Example you write a call option say at 210 rupees premium, the market turned against you and the option premium starts to increase say 215 --> 220 --> 230 etc. Now all you have to do just reduce your further loss by setting a stop loss, say at 250 premium. So you need to place a stop loss BUY order with limit or market setting at price of 250. When premium reaches 250 those many contracts will be bought by you, and you will exit your option writing position. Your margin money also will be returned to you, subtracting your losses, in this case 250 - 210, which is 40 rupees per share/unit.