- Joined
- Jan 3, 2010
- Messages
- 359
I've Created this Trigger :
and my question is, how to make it MUI ?
JASS:
scope IntelligenceBlow initializer init
globals
private unit u = null
private real inc = 0
private timer time = CreateTimer()
endglobals
private function Ends takes nothing returns nothing
call UnitRemoveAbility(u, 'B007')
call UnitAddBonus(u, 7, R2I(inc / -1))
endfunction
private function Actions takes nothing returns nothing
set u = GetSpellTargetUnit()
call PauseTimer(time)
if GetUnitAbilityLevel(u, 'B007') > 0 then
call UnitAddBonus(u, 7, R2I(inc / -1))
endif
set inc = GetHeroInt(u, true) * 0.5
call UnitAddBonus(u, 7, R2I(inc))
call CreateSpellBar(u, 'A00K', 0.5, "Intelligence Blow")
call TimerStart(time, 300, false, function Ends)
endfunction
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A00K'
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer i = 0
call TriggerAddAction(t, function Actions)
call TriggerAddCondition(t, Condition(function Conditions))
loop
exitwhen i >= 15
call TriggerRegisterPlayerUnitEvent(t, Player(i), EVENT_PLAYER_UNIT_SPELL_CHANNEL, null)
set i = i + 1
endloop
set t = null
endfunction
endscope
and my question is, how to make it MUI ?