If you just want to warp in whenever you're out of range, put this line right above the line for Incinerate
Register("Lightning Warp", ret => BestTarget.Distance > XX);
where XX is the maximum range you used for incinerate.
In practice, this runs into a couple of complications, the biggest of which is warping into bad and dying. You'll also run into situations where a ranged mob will 'kite' you, backing up every time you get close, causing you to warp constantly instead of using incinerate.
The conditions I ended up using are in the line below. I'm sure that someone with more experience can make one less clunky, but this works well enough for my purposes.
Register("Lightning Warp", ret => BestTarget.Distance > 25 && LokiPoe.ObjectManager.Me.HealthPercent > 95 && !NumberOfMobsNear(BestTarget, 70, 1) && HasAura(LokiPoe.ObjectManager.Me, "incinerate_counter", 2));
The effect of the conditions, in order, is that it will use it when the distance is greater than 25, health % is greater than 95, no other mobs are within 70 of the primary target, and I have at least two stacks of incinerate (to avoid warping in at the start of the battle, and to avoid chain warping on mobs that constantly move).
It doesn't actually kick in too often; mostly against ranged rares and uniques, and normal ranged mobs that dont deal enough to trigger my CoDT Lightning Warp.