WastedSavior
A day without sunshine is like, well, night.
- Reaction score
- 213
function Trig_Hunter_in_the_Night_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Udre' ) ) then
return false
endif
return true
endfunction
function Trig_Hunter_in_the_Night_Func002Func003C takes nothing returns boolean
if ( not ( GetTimeOfDay() >= 6.00 ) ) then
return false
endif
if ( not ( GetTimeOfDay() <= 18.00 ) ) then
return false
endif
return true
endfunction
function Trig_Hunter_in_the_Night_Func002C takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A086' ) ) then
return false
endif
return true
endfunction
function Trig_Hunter_in_the_Night_Func003Func002C takes nothing returns boolean
if ( not ( GetTimeOfDay() >= 6.00 ) ) then
return false
endif
if ( not ( GetTimeOfDay() <= 18.00 ) ) then
return false
endif
return true
endfunction
function Trig_Hunter_in_the_Night_Func003C takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A08E' ) ) then
return false
endif
return true
endfunction
function Trig_Hunter_in_the_Night_Actions takes nothing returns nothing
if ( Trig_Hunter_in_the_Night_Func002C() ) then
call UnitAddAbilityBJ( 'S00A', GetTriggerUnit() )
if ( Trig_Hunter_in_the_Night_Func002Func003C() ) then
call SetUnitAbilityLevelSwapped( 'S00A', GetTriggerUnit(), 5 )
else
call SetUnitAbilityLevelSwapped( 'S00A', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A086', GetTriggerUnit()) )
endif
else
call DoNothing( )
endif
if ( Trig_Hunter_in_the_Night_Func003C() ) then
call UnitAddAbilityBJ( 'A08C', GetTriggerUnit() )
if ( Trig_Hunter_in_the_Night_Func003Func002C() ) then
call SetUnitAbilityLevelSwapped( 'A08C', GetTriggerUnit(), 5 )
else
call SetUnitAbilityLevelSwapped( 'A08C', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A08E', GetTriggerUnit()) )
endif
else
call DoNothing( )
endif
endfunction
//====================================================================== =====
function InitTrig_Hunter_in_the_Night takes nothing returns nothing
set gg_trg_Hunter_in_the_Night = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hunter_in_the_Night, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Hunter_in_the_Night, Condition( function Trig_Hunter_in_the_Night_Conditions ) )
call TriggerAddAction( gg_trg_Hunter_in_the_Night, function Trig_Hunter_in_the_Night_Actions )
endfunction
Hunter in the night
Events
Unit - A unit Learns a skill
Conditions
(Unit-type of (Triggering unit)) Equal to Footman
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Learned Hero Skill) Equal to Blizzard
Then - Actions
Unit - Add Banish to (Triggering unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(In-game time of day) Greater than or equal to 6.00
(In-game time of day) Less than or equal to 18.00
Then - Actions
Unit - Set level of Banish for (Triggering unit) to 5
Else - Actions
Unit - Set level of Banish for (Triggering unit) to (Level of Blizzard for (Triggering unit))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Learned Hero Skill) Equal to Flame Strike
Then - Actions
Unit - Add Battle Roar to (Triggering unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(In-game time of day) Greater than or equal to 6.00
(In-game time of day) Less than or equal to 18.00
Then - Actions
Unit - Set level of Battle Roar for (Triggering unit) to 5
Else - Actions
Unit - Set level of Battle Roar for (Triggering unit) to (Level of Flame Strike for (Triggering unit))
Else - Actions
werewolf
Events
Time - Every 2.00 seconds of game time
Conditions
Actions
Set werewolf = (Units in (Playable map area) matching ((Unit-type of (Picked unit)) Equal to Lycanthrope))
Set werewolf_1 = (Units in (Playable map area) matching ((Unit-type of (Picked unit)) Equal to Lycanthrope))
Unit Group - Pick every unit in werewolf and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(In-game time of day) Greater than or equal to 6.00
(In-game time of day) Less than or equal to 18.00
Then - Actions
Unit - Set level of Werewolf (move & attack) for (Triggering unit) to 4
Unit - Set level of Werewolf Leech for (Triggering unit) to 4
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has buff Werewolf ) Equal to True
Then - Actions
Unit - Add Shapeshift to (Triggering unit)
Unit - Order (Triggering unit) to Night Elf Demon Hunter - Metamorphosis
Wait 2.00 seconds
Unit - Remove Shapeshift from (Triggering unit)
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has buff Werewolf ) Equal to False
Then - Actions
Unit - Add Shapeshift to (Triggering unit)
Unit - Order (Triggering unit) to Night Elf Demon Hunter - Metamorphosis
Wait 2.00 seconds
Unit - Remove Shapeshift from (Triggering unit)
Else - Actions
Unit - Set level of Werewolf (move & attack) for (Triggering unit) to (Level of Werewolf for (Triggering unit))
Unit - Set level of Werewolf Leech for (Triggering unit) to (Level of Werewolf for (Triggering unit))
Unit Group - Pick every unit in werewolf_1 and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(In-game time of day) Greater than or equal to 6.00
(In-game time of day) Less than or equal to 18.00
Then - Actions
Unit - Set level of Werewolf (move & attack) for (Triggering unit) to 4
Unit - Set level of Werewolf Leech for (Triggering unit) to 4
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has buff Werewolf ) Equal to True
Then - Actions
Unit - Add Shapeshift to (Triggering unit)
Unit - Order (Triggering unit) to Night Elf Demon Hunter - Metamorphosis
Wait 2.00 seconds
Unit - Remove Shapeshift from (Triggering unit)
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has buff Werewolf ) Equal to False
Then - Actions
Unit - Add Shapeshift to (Triggering unit)
Unit - Order (Triggering unit) to Night Elf Demon Hunter - Metamorphosis
Wait 2.00 seconds
Unit - Remove Shapeshift from (Triggering unit)
Else - Actions
Unit - Set level of Werewolf (move & attack) for (Triggering unit) to (Level of Werewolf for (Triggering unit))
Unit - Set level of Werewolf Leech for (Triggering unit) to (Level of Werewolf for (Triggering unit))
Custom script: call DestroyGroup(udg_werewolf)
Custom script: call DestroyGroup(udg_werewolf_1)
AceHart said:The event "every X seconds" doesn't set a "Triggering unit".
AceHart said:Your trigger uses, for example:
Unit - Set level of Werewolf (move & attack) for (Triggering unit) to 4
Now, given that there isn't a "Triggering unit"... it won't do much.
AceHart said:> I love how you're giving it to me piece by piece...
Thanks. I try my very best![]()
Happy mapping,
AceHart
werewolf
Events
Time - Every 2.00 seconds of game time
Conditions
Actions
Set werewolf = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Lycanthrope))
Set werewolf_1 = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Lycanthrope))
Unit Group - Pick every unit in werewolf and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(In-game time of day) Greater than or equal to 6.00
(In-game time of day) Less than or equal to 18.00
Then - Actions
Unit - Set level of Werewolf (move & attack) for (Picked unit) to 4
Unit - Set level of Werewolf Leech for (Picked unit) to 4
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has buff Werewolf ) Equal to True
Then - Actions
Unit - Add Shapeshift to (Picked unit)
Unit - Order (Picked unit) to Night Elf Demon Hunter - Metamorphosis
Wait 2.00 seconds
Unit - Remove Shapeshift from (Picked unit)
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has buff Werewolf ) Equal to False
Then - Actions
Unit - Add Shapeshift to (Picked unit)
Unit - Order (Picked unit) to Night Elf Demon Hunter - Metamorphosis
Wait 2.00 seconds
Unit - Remove Shapeshift from (Picked unit)
Else - Actions
Unit - Set level of Werewolf (move & attack) for (Picked unit) to (Level of Werewolf for (Picked unit))
Unit - Set level of Werewolf Leech for (Picked unit) to (Level of Werewolf for (Picked unit))
Unit Group - Pick every unit in werewolf_1 and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(In-game time of day) Greater than or equal to 6.00
(In-game time of day) Less than or equal to 18.00
Then - Actions
Unit - Set level of Werewolf (move & attack) for (Picked unit) to 4
Unit - Set level of Werewolf Leech for (Picked unit) to 4
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has buff Werewolf ) Equal to True
Then - Actions
Unit - Add Shapeshift to (Picked unit)
Unit - Order (Picked unit) to Night Elf Demon Hunter - Metamorphosis
Wait 2.00 seconds
Unit - Remove Shapeshift from (Picked unit)
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has buff Werewolf ) Equal to False
Then - Actions
Unit - Add Shapeshift to (Picked unit)
Unit - Order (Picked unit) to Night Elf Demon Hunter - Metamorphosis
Wait 2.00 seconds
Unit - Remove Shapeshift from (Picked unit)
Else - Actions
Unit - Set level of Werewolf (move & attack) for (Picked unit) to (Level of Werewolf for (Picked unit))
Unit - Set level of Werewolf Leech for (Picked unit) to (Level of Werewolf for (Picked unit))
Custom script: call DestroyGroup(udg_werewolf)
Custom script: call DestroyGroup(udg_werewolf_1)