local unit Caster = GetTriggerUnit()
local unit Target = GetSpellTargetUnit()
local location CasterLoc = GetUnitLoc(Caster)
local location TargetLoc = GetUnitLoc(Target)
local real x1 = GetUnitX(Caster)
local real y1 = GetUnitY(Caster)
local real z1 = GetLocationZ(CasterLoc)
local real x2 = GetUnitX(Target)
local real y2 = GetUnitY(Target)
local real z2 = GetLocationZ(TargetLoc)
call SetUnitFlyHeight(Caster, 500, 0)
call UnitAddAbility(Caster, 'Amrf')
call UnitRemoveAbility(Caster, 'Amrf')
call AddLightningEx("DRAB", true, x1, y1, z1, x2, y2, z2)
set Caster = null
set Target = null
set CasterLoc = null
set TargetLoc = null
call RemoveLocation(CasterLoc)
call RemoveLocation(TargetLoc)