кусочек кода с мит хука моего
Code
function Meat_Hook_Actions_BACK_WITH takes nothing returns nothing
local timer tt=GetExpiredTimer()
local integer id=GetHandleId(tt)
local unit g=LoadUnitHandle(udg_H, id, 0)
local integer n=LoadInteger(udg_H, id, 5)
local unit d
if n!=0 then
set d=LoadUnitHandle(udg_H, id, n)
call SetUnitX(g,GetUnitX(d))
call SetUnitY(g,GetUnitY(d))
call RemoveUnit(d)
set n=n-1
call SaveInteger(udg_H, id, 5, n)
else
call PauseTimer(tt)
call FlushChildHashtable(udg_H, id)
call DestroyTimer(tt)
endif
set tt=null
set d=null
set g=null
endfunction