Bỏ 20s ra lên số cho skill này nè. Ko có JASSNEWGEN với lại viết nhanh...
Đoạn GUI kia quá nhiều cái rườm rà ko cần đến
Trig_Jump_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A03J'
endfunction
function lvl1 takes nothing returns boolean
return ( GetUnitAbilityLevel(GetTriggerUnit(),'A03J',) == 1 )
endfunction
function lvl2 takes nothing returns boolean
return ( GetUnitAbilityLevel (GetTriggerUnit(),'A03J') == 2 )
endfunction
function lvl3 takes nothing returns boolean
return ( GetUnitAbilityLevel (GetTriggerUnit(),'A03J') == 3 )
endfunction
function Trig_Jump_Actions takes nothing returns nothing
local unit dum
local unit u = GetTriggerUnit()
local location loc = GetUnitLoc(u)
local unit t = GetSpellTargetLoc()
local effect e = AddSpecialEffectTargetUnitBJ( "weapon,right", u, "Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missi le_mini.mdl" )
call PauseUnit(u, false)
call SetUnitInvulnerable( u, true )
call SetUnitFacingToFaceLocTimed( u, t, 0.00 )
call SetUnitAnimation( u, "slam" )
call SetUnitTimeScalePercent( u, 50.00 )
call UnitAddAbility( u,'Amrf' )
call SetUnitFlyHeightBJ( u, 500.00, 500.00 )
call EnableTrigger( gg_trg_Move )
call TriggerSleepAction( 0.70 )
call SetUnitFlyHeightBJ( u, 0.00, 500.00 )
call TriggerSleepAction( 0.70 )
call DisableTrigger( gg_trg_Move )
call SetUnitTimeScalePercent( u, 100.00 )
call UnitRemoveAbility(u, 'Amrf')
call SetUnitInvulnerable( u, false )
call PauseUnit(u, false )
if ( lvl1()) then
set dum = CreateUnitAtLoc(GetOwningPlayer(u), 'e006', t, bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( lvl2()) then
set dum = CreateUnitAtLoc(GetOwningPlayer(u), 'e007', t, bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( lvl3()) then
set dum = CreateUnitAtLoc( GetOwningPlayer(u),'e008', t, bj_UNIT_FACING )
else
call DoNothing( )
endif
call IssueImmediateOrder( dum, "stomp" )
call RemoveUnit( dum )
call DestroyEffect( e )
call RemoveLocation(loc)
set u = null
set t = null
set loc = null
endfunction
//================================================== =========================
function InitTrig_Jump takes nothing returns nothing]
local trigger TT = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( TT, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( TT, Condition( function Trig_Jump_Conditions ) )
call TriggerAddAction( TT, function Trig_Jump_Actions )
set TT = null
endfunction
Move :
function Trig_Move_Actions takes nothing returns nothing
local unit t = GetSpellTargetUnit()
local unit u = GetTriggerUnit()
local location p = GetUnitLoc(u)
local location mvp = PolarProjectionBJ(p, ( DistanceBetweenPoints(p, t) / 100.00 ), GetUnitFacing(u))
call SetUnitPositionLoc( u, vmp )
call RemoveLocation(p)
call RemoveLocation(vmp)
set u = null
set t = null
set p = null
set vmp = null
endfunction
//================================================== =========================
function InitTrig_Move takes nothing returns nothing
local trigger trig = CreateTrigger()
call DisableTrigger( gg_trg_Move )
call TriggerRegisterTimerEvent( trig, 0.01, true )
call TriggerAddAction( trig, function Trig_Move_Actions )
set trig = null
endfunction