can ne one convert my e1 into an E2

i own my own small server for me and freinds and lately ive driven my them insane try to to learn e2 from then, so to save there sanity
i need an old e1 i wrote turned into a e2 with an added function
here it is

N@vector stalker
I@Lx Ly Lz D
O@Tx Ty Tz MUL

X = extposx()
Y = extposy()
Z = extposz()

Tx=(X - Lx)
Ty=(Y - Ly)
Tz=(Z - Lz)

MUL=(D > 200 & D < 1800000 ? 1:0 )

:::note:::__ ____
Lx, Ly, Lz are what i wire to the wire detectors world gps pos |
Tx, Ty, Tz are the thruster outputs |
and mul is the on:off function for thruster |
__________________________________________________ _|

this was my e1 stalker that used vector thrusters and i want it in an e2 format but i still want the x y z outputs and i need it to have a target finder function(one with x y z and distance outputs like a real one)
and mabye throw in a keep upright function too?

can ne 1 plz convert it into e2 with the added functions listed

ps want info on the server lemme know ^.^