So, a few problems. I'll go in order of least important to most important:
(1) Your code is prone to null pointer exceptions:
CT.contains(SC) && SC != null
Switch this to check if the object is null first. You should do this for all of your code.
(2)
(a) The sand crab is quite possibly also not in range. If you're not currently fighting the sand crab, somebody else probably is. How far away are the sand crabs you're trying to interact with? My guess is that they're reasonably far, or not easily visible.
(b) Similarly, Sand crabs aren't actually NPCs until you turn them agro by standing beside them. You'll only attack a sand crab if it's already up and around.
(3) You sleep for up to an entire minute in between even checking the actions, totally tossing aside actually doing them.
return random(3000, 60000);
Make this wayyyy less. There are very few scenarios where it would actually make sense to have a gap this big, and this is not one of them.
(4) Please look into a state-based system. There are quite a few tutorials on it in the tutorials section. It'll make the code a lot easier to follow when you/others debug. Similarly, revise your variable names if you want others to be able to read your code. I don't know what CT, RSA, or BT are.
Side note: This should reset agro anytime there isn't an active sand crab around you, given you have >= 35% HP, and have Salmon/are in some area CT.