Kk gw mw tny cara bwt skill slark yang essence shift ntu gmn?
Gw dah coba tpi ga bsa persis di dota
Code:
function Trig_FrostmourneSlash_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_FrostmourneSlash_Actions takes nothing returns nothing
local unit c1=GetAttacker()
local unit t1=GetTriggerUnit()
local effect e
local integer point=1/2*GetHeroLevel(c1)
local integer randomFS=GetRandomInt(1,2)
if GetUnitAbilityLevel(c1,'A004')!=0 and randomFS==1 and GetHeroAgi(t1,false)>10 then
set e=AddSpecialEffectTargetUnitBJ( "chest", t1, "Abilities\\Spells\\Undead\\Cripple\\CrippleTarget.mdl" )
call SetHeroAgi(t1,GetHeroAgi(t1,false)-point,false)
call SetHeroAgi(c1,GetHeroAgi(c1,false)+point,false)
call TriggerSleepAction(2.5)
call SetHeroAgi(t1,GetHeroAgi(t1,false)+point,false)
call SetHeroAgi(c1,GetHeroAgi(c1,false)-point,false)
call DestroyEffect(e)
endif
endfunction
//===========================================================================
function InitTrig_FrostmourneSlash takes nothing returns nothing
set gg_trg_FrostmourneSlash = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_FrostmourneSlash, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_FrostmourneSlash, Condition( function Trig_FrostmourneSlash_Conditions ) )
call TriggerAddAction( gg_trg_FrostmourneSlash, function Trig_FrostmourneSlash_Actions )
call Preload("Abilities\\Spells\\Undead\\Cripple\\CrippleTarget.mdl")
endfunction
Gmn kk ada yang bsa bantu??
Share This Thread