Code
function Cond1 takes nothing returns boolean
return GetSpellAbilityId() == 'твоя абилка'
endfunction
//===========================================================================
function Move takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit u=LoadUnitHandle(udg_Hash,GetHandleId(t),1)
local real a=LoadReal(udg_Hash,GetHandleId(t),3)
local integer i=LoadInteger(udg_Hash,GetHandleId(t),2)
local integer l=LoadInteger(udg_Hash,GetHandleId(t),4)+1
local real x = GetUnitX(u)
local real y = GetUnitY(u)
call SetUnitX(u,x+50.*Cos(a))//здесь ставиш скорость которую ты поставил в Func1
call SetUnitY(u,y+50.*Sin(a))
if(l==i)then
call PauseTimer(t)
call FlushChildHashtable(udg_Hash,GetHandleId(t))
call DestroyTimer(t)
else
call SaveInteger(udg_Hash,GetHandleId(t),4,l)
endif
set t = null
set u = null
endfunction
//===========================================================================
function Func1 takes nothing returns nothing
local timer t = CreateTimer()
local unit u = GetSpellAbilityUnit()
local real x = GetUnitX(u)
local real y = GetUnitY(u)
local real x2 = GetSpellTargetX()
local real y2 = GetSpellTargetY()
local real dis = SquareRoot((x-x2)*(x-x2)+(y-y2)*(y-y2))
local real fuck = Atan2(y2-y,x2-x)
call SaveUnitHandle(udg_Hash,GetHandleId(t),1,u)
call SaveInteger(udg_Hash,GetHandleId(t),2,R2I(dis)/50)//50 это твоя скорость если хочеш чтоб быстрее ставь быстрее(см Func Move)
call SaveReal(udg_Hash,GetHandleId(t),3,fuck)
call SaveInteger(udg_Hash,GetHandleId(t),4,0)
call TimerStart(t,0.03,true,function Move)
set t = null
set u = null
endfunction
//===========================================================================
function InitTrig_spel takes nothing returns nothing
local trigger tr = CreateTrigger( )
set udg_Hash=InitHashtable()
call TriggerRegisterAnyUnitEventBJ( tr, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( tr, Condition( function Cond1 ) )
call TriggerAddAction( tr, function Func1)
set tr = null
endfunction