Using a L7818 for current limitation is really odd, as 18 V over the current setting resistor is really a lot.
If at all a LM317 would be suitable, but it has a different pinout.
The 3 pins regulator already have a current limit inside, though fixed, but there are a few types to chose from:
78Lxx for some 100 mA
78Mxx for some 500 mA
78xx for some 1000-1500 mA
78Sxx for some 2 A
For just protecting a circuit in case of a short or failure, this is often good enough.