Its looking better. First, update the description. Maybe,
desc = The charactor will follow waypoints
Then maybe add
:waypointstate=5:animate=5,waypointreverse
Now he will not stop at the end of the chain. He will turn around.
I'm assuming that you created two different way point lines and have overlapped them "connected them" at some point in the middle of at least one chain.
If you had a red waypoint chain going from West to East and blue waypoint chain going North to South and they made a T shape (the last blue waypoint overlaps a waypoint in the middle of the red chain) and the character started at the first blue wavepoint (way down south) and starting walking north, the condition
:waypointstate=5 will
no longer be true at the northern "end" of the blue chain. Now, the condition
:waypointstate=4 will be true and the entity will need to make a random decision on which direction to go .
:waypointstate=4:animate=5,waypointrandom
Both ends of the red chain and the southern end of the blue chain will trigger
:waypointstate=5:animate=5,waypointreverse
Certain waypointstates seem to always go with the same action.
:waypointstate=0:waypointstart
:waypointstate=3:waypointnext
:waypointstate=4:waypointrandom
:waypointstate=5:waypointreverse