Hey everyone,
Char get stuck sometimes in dp/offline statues. Issue is that the char gets kicked out by 15min inactivity and relogs with reconnector, sometimes doing so for 5-6hours while I'm asleep.
I have one possible solution written down and just wondered how to improve code.
This is a noob solution so far, just to pause bot if it happens.
I want to resume bot with a special check but problem is there's 2 pzone, the offline train and depotCode:local timeStuck = 5 --in minutes auto(120000) if($standtime >= timeStuck * 60 * 1000)then printmessage("char hasn't moved 5 mins") logout() pausebot(true) end
How is it possible to do something like islocation() check within persistent if it is either depot or offline train area like code below?
islocation() won't work as it is persistent not action script with x,y,z, pos. What code could be used to check if surrounding area is offlineTrain/depot?
Code:local timeStuck = 5 --in minutes auto(120000) if(($pzone) and ($standtime >= timeStuck * 60 * 1000))then --check location if depot if(islocation(5))then gotolabel('Start','Depot') --check location if not depot then it's offlineTrain else gotolabel('Start','FromOfflineTrain') end end