- Joined
- Nov 16, 2006
- Messages
- 2,165
Well, I'm having a little problem with my spell here.
I checked surely everything and it still doesn't work.
I am still wrong, or it is the code. Could someone take a look on it
and tell me if it is right ? Thanks already.
When this spell is casted, the unit (caster) has a 40% chance to become invisible.
~- Fl4meS
I checked surely everything and it still doesn't work.
I am still wrong, or it is the code. Could someone take a look on it
and tell me if it is right ? Thanks already.
Code:
function Trig_Divine_Bow_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A08A'
endfunction
function Trig_Divine_Bow_Actions takes nothing returns nothing
local unit D = GetTriggerUnit()
local unit L
if (GetRandomReal(1.00, 100.00) <= 40) then
set L = CreateUnit(GetOwningPlayer(D), 'h001', GetUnitX(D), GetUnitY(D), 0)
call UnitApplyTimedLife(L, 'BTLF', 2)
call IssueTargetOrder(L, "invisbility", D)
set L = null
endif
set D = null
endfunction
~- Fl4meS