How to write script to disconnect from one to another char

Hello Ryan and everyone

I want to create script for change character form one character to next character and when finish the script go to next character (My plan use phbot to do daily quest by each character)
first i start phbot with Manager and it can select character

I try to write script to command disconnect and use relog on disconnect and
tried so hard about inject opcode and anything it can’t work

help me pls to solve this :smiley: