Working trade script but randomly goes clientless (any solution?)

Hello everyone!

I’ve encountered a strange issue. I’ve made two very simple trade scripts (old trade) that work. One for hotan to donwhang and the other for opposite route. Now the issue I’m running into is that the bot occasionally (seemingly random) will go into clientless mode. It will still flawlessly execute the script, however I’d like to be able to check on my runs and react accordingly if I need to step in.

The script only uses the mount, walk, buy, teleport and sell commands. So far every time the bot has gone into clientless mode it happened while in either Hotan or Donwhang (usually during buying or selling). It doesn’t happen every single run but often enough to hinder. I can’t seem to find a pattern or the cause of the clientless switch.

Would anybdoy here have any idea what could cause it to go clientless and how I can prevent this?

Cheers!