|
function aaa1 takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit dw=I2U(GetStoredInteger(udg_GC,I2S(H2I(t)),"dw"))
local integer i=GetStoredInteger(udg_GC,I2S(H2I(t)),"zs")
local real jd=GetStoredReal(udg_GC,I2S(H2I(t)),"jd")
local real x
local real y
if i>75 then
set x=GetUnitX(dw)
set y=GetUnitX(dw)
call UnitDamagePoint( dw, 0, 500.00, x, y, 300.00, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS )
call SetUnitPathing( dw, true )
call UnitRemoveAbility( dw, 'A00Z' )
call UnitRemoveAbility( dw, 'A03Z' )
call SetUnitTimeScale( dw, 1 )
call SetUnitInvulnerable( dw, false )
call SetUnitFlyHeight( dw, 0.00, 10000.00 )
set dw=null
call PauseTimer(t)
call DestroyTimer(t)
call FlushStoredMission(udg_GC,I2S(H2I(t)))
set t=null
else
set x=GetUnitX(dw)+Cos(Deg2Rad(jd))*15
set y=GetUnitY(dw)+Sin(Deg2Rad(jd))*15
call SetUnitX( dw, x )
call SetUnitY( dw, y )
if i>35 then
call SetUnitFlyHeight( dw, 5*(75-i), 1000.00 )
else
call SetUnitFlyHeight( dw, 5*i, 1000.00 )
endif
set i=i+1
call StoreInteger(udg_GC,I2S(H2I(t)),"zs",i)
endif
set t=null
set dw=null
endfunction
function aaa takes nothing returns nothing
local unit dw=GetTriggerUnit()
local timer t=CreateTimer()
local location loc=GetUnitLoc(dw)
local location loc1=GetSpellTargetLoc()
local real x=GetLocationX(loc1)
local real y=GetLocationY(loc1)
local real jd=AngleBetweenPoints(loc,loc1 )
call SetUnitTimeScale( dw, 0.30 )
call SetUnitInvulnerable( dw, true )
call UnitAddAbility( dw, 'A00Z' )
call UnitAddAbility( dw, 'A03Z' )
call SetUnitPathing( dw, false )
call StoreInteger(udg_GC,I2S(H2I(t)),"dw",H2I(dw))
call StoreReal(udg_GC,I2S(H2I(t)),"jd",jd)
call StoreReal(udg_GC,I2S(H2I(t)),"x",x)
call StoreReal(udg_GC,I2S(H2I(t)),"y",y)
call StoreInteger(udg_GC,I2S(H2I(t)),"zs",0)
call TimerStart(t,0.01,true,function aaa1)
call RemoveLocation(loc)
call RemoveLocation(loc1)
set t=null
set dw=null
set loc=null
set loc1=null
endfunction |
|