- Joined
- Jun 22, 2012
- Messages
- 472
HOW TO IMPORT

Events

Conditions

Actions


-------- 1. IMPORT CUSTOM 2 ABILITIES AND CUSTOM BUFF --------


-------- OPTIONAL: IMPORT DWARVEN KNIGHT MODEL --------


-------- 2. COPY ALL TRIGGERS FROM THE "BEAR GRASP" FOLDER. --------


-------- 3. SET RIGHT PARAMETERS IN THE "BEAR GRASP CONFIGURATION". --------


-------- 4. BE SURE ALL CUSTOM OBJECT WERE SET PROPERLY LIKE IN THE TEMPLATE --------
BEAR GRASP CONFIGURATION

Events


Time - Elapsed game time is 0.01 seconds

Conditions

Actions


-------- CREATE GROUPS, SETTING DAMAGES, SETTING CUSTOM BUFFS AND ABILITIES. --------


Hashtable - Create a hashtable


Set BGRASP_HASH = (Last created hashtable)


Custom script: set udg_BGRASP_GROUP = CreateGroup()


Unit Group - Remove all units from BGRASP_GROUP


Custom script: set udg_BGRASP_GROUP_IMMUNE = CreateGroup()


Unit Group - Remove all units from BGRASP_GROUP_IMMUNE


Custom script: set udg_BGRASP_GROUP_KNOCK = CreateGroup()


Unit Group - Remove all units from BGRASP_GROUP_KNOCK


Set BGRASP_DummyAbility = Dummy Transparency


Set BGRASP_MAINABILITY = Bear Grasp


Set BGRASP_BUFF = Bear Grasp


Set BGRASP_DAMAGETYPE = Force


Set BGRASP_DAMAGETYPE_BASH = Force


Set BGRASP_ATTACKTYPE = Normal


Set BGRASP_ATTACKTYPE_BASH = Spells


-------- CONFIGURATION --------


-------- YOU CAN ADD MORE ARRAY FOR A FEW ABILITY LEVELS --------


-------- PERIOD OF DAMAGING DEVOURED UNIT, SEC --------


Set BGRASP_PERIOD[1] = 0.20


Set BGRASP_PERIOD[2] = 0.15


Set BGRASP_PERIOD[3] = 0.10


-------- DAMAGE THE DEVOURED UNIT, PTS --------


Set BGRASP_DAMAGE[1] = 5.00


Set BGRASP_DAMAGE[2] = 6.00


Set BGRASP_DAMAGE[3] = 7.00


-------- HEAL WHILE DEALS DAMAGE TO THE DEVOURED UNIT, PTS --------


Set BGRASP_HEAL[1] = 5.00


Set BGRASP_HEAL[2] = 6.00


Set BGRASP_HEAL[3] = 7.00


-------- STARTING DELAY, SEC --------


Set BGRASP_DELAY[1] = 1.30


Set BGRASP_DELAY[2] = 1.30


Set BGRASP_DELAY[3] = 1.30


-------- DISTANCE TO HOLD THE DEVOURED UNIT ON FRONT OF THE BEAR --------


Set BGRASP_VISUALDISTANCEOFCATCH[1] = 100.00


Set BGRASP_VISUALDISTANCEOFCATCH[2] = 100.00


Set BGRASP_VISUALDISTANCEOFCATCH[3] = 100.00


-------- HEIGHT OF DEVOURED UNIT TO BE HOLD BY THE BEAR, PTS + HEIGHT OF THE BEAR ITSELF --------


Set BGRASP_VISUALHEIGHT[1] = 20.00


Set BGRASP_VISUALHEIGHT[2] = 20.00


Set BGRASP_VISUALHEIGHT[3] = 20.00


-------- CATCH THE UNIT ANGLE, DEGREE --------


Set BGRASP_BASH_ANGLERANGE[1] = 160.00


Set BGRASP_BASH_ANGLERANGE[2] = 160.00


Set BGRASP_BASH_ANGLERANGE[3] = 160.00


-------- CATCH THE UNIT DISTANCE, PTS --------


Set BGRASP_BASH_DISTANCEOFTAKING[1] = 150.00


Set BGRASP_BASH_DISTANCEOFTAKING[2] = 150.00


Set BGRASP_BASH_DISTANCEOFTAKING[3] = 150.00


-------- RAM ATTACK DAMAGE BY BASHING ENEMIES WITH DEVOURED UNIT, PTS --------


Set BGRASP_BASH_DAMAGE_BASIC[1] = 25.00


Set BGRASP_BASH_DAMAGE_BASIC[2] = 40.00


Set BGRASP_BASH_DAMAGE_BASIC[3] = 100.00


-------- RAM ATTACK DAMAGE BY BASHING ENEMIES WITH DEVOURED UNIT (DAMAGE DEPENDS ON LEVEL OF CATCHED UNIT (HERO), PTS/LEVEL --------


Set BGRASP_BASH_DAMAGE_DEPENDED[1] = 5.00


Set BGRASP_BASH_DAMAGE_DEPENDED[2] = 6.00


Set BGRASP_BASH_DAMAGE_DEPENDED[3] = 8.00


-------- IMMUNE TO DAMAGE AFTER GETTING DAMAGE FROM THE BASH, SEC --------


-------- KNOCKBACK SPEEDRATE (0=NO KNOCKBACK) --------


Set BGRASP_KNOCK_SPEEDRATE[1] = 850.00


Set BGRASP_KNOCK_SPEEDRATE[2] = 850.00


Set BGRASP_KNOCK_SPEEDRATE[3] = 850.00


-------- KNOCKBACK DURATION, SEC (0=NO KNOCKBACK) --------


Set BGRASP_KNOCK_DURATION[1] = 0.20


Set BGRASP_KNOCK_DURATION[2] = 0.20


Set BGRASP_KNOCK_DURATION[3] = 0.20


-------- IMMUNE TO BEAR GRASP RAM ATTACK, SEC --------


-------- (MUST BE SLIGHTLY HIGHER THAN KNOCKBACK DURATION IF THE KNOCKBACK IS ALLOWED FOR THE CURRENT LEVEL) --------


Set BGRASP_IMMUNE[1] = 0.21


Set BGRASP_IMMUNE[2] = 0.21


Set BGRASP_IMMUNE[3] = 0.21


-------- KNOCKBACK BASH DISTANCE, PTS --------


Set BGRASP_KNOCK_DISTANCEOFTAKING[1] = 140.00


Set BGRASP_KNOCK_DISTANCEOFTAKING[2] = 140.00


Set BGRASP_KNOCK_DISTANCEOFTAKING[3] = 140.00


-------- KNOCKBACK BASH ANGLE, DEGREE --------


Set BGRASP_KNOCK_ANGLERANGE[1] = 120.00


Set BGRASP_KNOCK_ANGLERANGE[2] = 120.00


Set BGRASP_KNOCK_ANGLERANGE[3] = 120.00


-------- MAX LEVEL OF CREATURE (-1=DISABLE GRASP 0=TAKE ALL LEVELS) IF NOT GIANT, MECHANISM OR HERO --------


Set BGRASP_MAXLEVEL[1] = 3


Set BGRASP_MAXLEVEL[2] = 5


Set BGRASP_MAXLEVEL[3] = 0


-------- CONDITION: GIANTS ALLOWED (-1=NO, 0=ANY LEVEL ELSE SET MAX ALLOWED LEVEL) --------


Set BGRASP_CONDIT_GIANTS[1] = -1


Set BGRASP_CONDIT_GIANTS[2] = 5


Set BGRASP_CONDIT_GIANTS[3] = 0


-------- CONDITION: HEROES ALLOWED (-1=NO, 0=ANY LEVEL ELSE SET MAX ALLOWED LEVEL) --------


Set BGRASP_CONDIT_HERO[1] = 3


Set BGRASP_CONDIT_HERO[2] = 5


Set BGRASP_CONDIT_HERO[3] = 0


-------- CONDITION: MECHANISMS ALLOWED (-1=NO, 0=ANY LEVEL ELSE SET MAX ALLOWED LEVEL) --------


Set BGRASP_CONDIT_MECHANISM[1] = -1


Set BGRASP_CONDIT_MECHANISM[2] = -1


Set BGRASP_CONDIT_MECHANISM[3] = -1


-------- THE BONUS MOVEMENT SPEED AND DURATION OF THE EFFECT IS SET IN THE OBJECT EDITOR --------
BEAR GRASP LOOP

Events


Time - Every 0.04 seconds of game time

Conditions

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Number of units in BGRASP_GROUP) Greater than 0



Then - Actions




Set BGRASP_REAL[0] = 0.04




Unit Group - Pick every unit in BGRASP_GROUP and do (Actions)





Loop - Actions






Set BGRASP_UNIT[0] = (Picked unit)






Unit - Add BGRASP_DummyAbility to BGRASP_UNIT[0]






Custom script: set udg_BGRASP_INTEGER = GetHandleIdBJ( udg_BGRASP_UNIT[0])






Set BGRASP_POINT[0] = (Position of BGRASP_UNIT[0])






Set BGRASP_REAL[1] = (Load 3 of BGRASP_INTEGER from BGRASP_HASH)






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








(Load 3 of BGRASP_INTEGER from BGRASP_HASH) Greater than 0.00







Then - Actions








Set BGRASP_REAL[1] = (BGRASP_REAL[1] - BGRASP_REAL[0])








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










(Load 3 of BGRASP_INTEGER from BGRASP_HASH) Less than or equal to 0.00









Then - Actions










Hashtable - Save (X of BGRASP_POINT[0]) as 1 of BGRASP_INTEGER in BGRASP_HASH










Hashtable - Save (Y of BGRASP_POINT[0]) as 2 of BGRASP_INTEGER in BGRASP_HASH









Else - Actions







Else - Actions








Set BGRASP_REAL[1] = (X of BGRASP_POINT[0])








Set BGRASP_REAL[2] = (Y of BGRASP_POINT[0])






Hashtable - Save BGRASP_REAL[1] as 3 of BGRASP_INTEGER in BGRASP_HASH






Custom script: call RemoveLocation( udg_BGRASP_POINT[0] )






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








And - All (Conditions) are true









Conditions










(BGRASP_UNIT[0] is alive) Equal to True










(BGRASP_UNIT[0] is hidden) Not equal to True










(BGRASP_UNIT[0] has buff BGRASP_BUFF) Equal to True










Or - Any (Conditions) are true











Conditions












(Load 3 of BGRASP_INTEGER from BGRASP_HASH) Greater than 0.00












And - All (Conditions) are true













Conditions














(Load 3 of BGRASP_INTEGER from BGRASP_HASH) Less than or equal to 0.00














Or - Any (Conditions) are true















Conditions
















BGRASP_REAL[1] Not equal to (Load 1 of BGRASP_INTEGER from BGRASP_HASH)
















BGRASP_REAL[2] Not equal to (Load 2 of BGRASP_INTEGER from BGRASP_HASH)







Then - Actions








Set BGRASP_POINT[0] = (Position of BGRASP_UNIT[0])








Hashtable - Save (X of BGRASP_POINT[0]) as 1 of BGRASP_INTEGER in BGRASP_HASH








Hashtable - Save (Y of BGRASP_POINT[0]) as 2 of BGRASP_INTEGER in BGRASP_HASH








Set BGRASP_UNIT[1] = (Load 0 of BGRASP_INTEGER in BGRASP_HASH)








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










BGRASP_UNIT[1] Equal to No unit









Then - Actions










Set BGRASP_GROUPTEMP1 = (Units within (Load 4 of BGRASP_INTEGER from BGRASP_HASH) of BGRASP_POINT[0] matching ((((Matching unit) is in BGRASP_GROUP_IMMUNE) Not equal to True) and ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is alive) Equal to True) an










Unit Group - Pick every unit in BGRASP_GROUPTEMP1 and do (Actions)











Loop - Actions












Set BGRASP_UNIT[2] = (Picked unit)












Set BGRASP_POINT[1] = (Position of BGRASP_UNIT[2])












Set BGRASP_REAL[1] = (Facing of BGRASP_UNIT[0])












Set BGRASP_REAL[2] = (Angle from BGRASP_POINT[0] to BGRASP_POINT[1])












Set BGRASP_REAL[3] = (BGRASP_REAL[1] - BGRASP_REAL[2])












If (All Conditions are True) then do (Then Actions) else do (Else Actions)













If - Conditions














BGRASP_REAL[3] Less than or equal to 0.00














BGRASP_REAL[3] Greater than or equal to -90.00













Then - Actions














Set BGRASP_REAL[3] = (BGRASP_REAL[3] + 360.00)













Else - Actions












If (All Conditions are True) then do (Then Actions) else do (Else Actions)













If - Conditions














BGRASP_REAL[3] Greater than or equal to 360.00













Then - Actions














Set BGRASP_REAL[3] = (BGRASP_REAL[3] - 360.00)













Else - Actions












If (All Conditions are True) then do (Then Actions) else do (Else Actions)













If - Conditions














Or - Any (Conditions) are true















Conditions
















And - All (Conditions) are true

















Conditions


















BGRASP_REAL[3] Greater than or equal to (360.00 - ((Load 5 of BGRASP_INTEGER from BGRASP_HASH) / 2.00))


















BGRASP_REAL[3] Less than or equal to 360.00
















And - All (Conditions) are true

















Conditions


















BGRASP_REAL[3] Greater than or equal to 0.00


















BGRASP_REAL[3] Less than or equal to (0.00 + ((Load 5 of BGRASP_INTEGER from BGRASP_HASH) / 2.00))













Then - Actions














If (All Conditions are True) then do (Then Actions) else do (Else Actions)















If - Conditions
















(BGRASP_UNIT[2] is Mechanical) Equal to True















Then - Actions
















If (All Conditions are True) then do (Then Actions) else do (Else Actions)

















If - Conditions


















And - All (Conditions) are true



















Conditions




















Or - Any (Conditions) are true





















Conditions






















(Load 8 of BGRASP_INTEGER from BGRASP_HASH) Equal to 0






















And - All (Conditions) are true























Conditions
























(Load 8 of BGRASP_INTEGER from BGRASP_HASH) Greater than 0
























(Level of BGRASP_UNIT[2]) Less than or equal to (Load 8 of BGRASP_INTEGER from BGRASP_HASH)

















Then - Actions

















Else - Actions


















Unit Group - Remove BGRASP_UNIT[2] from BGRASP_GROUPTEMP1















Else - Actions














If (All Conditions are True) then do (Then Actions) else do (Else Actions)















If - Conditions
















(BGRASP_UNIT[2] is A Hero) Equal to True
















(BGRASP_UNIT[2] is in BGRASP_GROUPTEMP1) Equal to True















Then - Actions
















If (All Conditions are True) then do (Then Actions) else do (Else Actions)

















If - Conditions


















And - All (Conditions) are true



















Conditions




















Or - Any (Conditions) are true





















Conditions






















(Load 7 of BGRASP_INTEGER from BGRASP_HASH) Equal to 0






















And - All (Conditions) are true























Conditions
























(Load 7 of BGRASP_INTEGER from BGRASP_HASH) Greater than 0
























(Hero level of BGRASP_UNIT[2]) Less than or equal to (Load 7 of BGRASP_INTEGER from BGRASP_HASH)

















Then - Actions

















Else - Actions


















Unit Group - Remove BGRASP_UNIT[2] from BGRASP_GROUPTEMP1















Else - Actions














Custom script: if ( IsUnitType(udg_BGRASP_UNIT[2], UNIT_TYPE_GIANT) == true ) then














Custom script: else














If (All Conditions are True) then do (Then Actions) else do (Else Actions)















If - Conditions
















(BGRASP_UNIT[2] is in BGRASP_GROUPTEMP1) Equal to True
















Or - Any (Conditions) are true

















Conditions


















(Load 10 of BGRASP_INTEGER from BGRASP_HASH) Equal to 0


















And - All (Conditions) are true



















Conditions




















(Load 10 of BGRASP_INTEGER from BGRASP_HASH) Greater than 0




















(Level of BGRASP_UNIT[2]) Less than or equal to (Load 10 of BGRASP_INTEGER from BGRASP_HASH)















Then - Actions















Else - Actions
















Unit Group - Remove BGRASP_UNIT[2] from BGRASP_GROUPTEMP1














Custom script: endif














If (All Conditions are True) then do (Then Actions) else do (Else Actions)















If - Conditions
















(BGRASP_UNIT[2] is in BGRASP_GROUPTEMP1) Equal to True















Then - Actions
















If (All Conditions are True) then do (Then Actions) else do (Else Actions)

















If - Conditions


















Or - Any (Conditions) are true



















Conditions




















(Load 6 of BGRASP_INTEGER from BGRASP_HASH) Equal to 0




















And - All (Conditions) are true





















Conditions






















(Load 6 of BGRASP_INTEGER from BGRASP_HASH) Greater than 0






















(Level of BGRASP_UNIT[2]) Less than or equal to (Load 6 of BGRASP_INTEGER from BGRASP_HASH)

















Then - Actions

















Else - Actions


















Unit Group - Remove BGRASP_UNIT[2] from BGRASP_GROUPTEMP1















Else - Actions













Else - Actions














Unit Group - Remove BGRASP_UNIT[2] from BGRASP_GROUPTEMP1












Custom script: call RemoveLocation( udg_BGRASP_POINT[1] )










Custom script: set udg_BGRASP_UNIT[1] = FirstOfGroup(udg_BGRASP_GROUPTEMP1)










If (All Conditions are True) then do (Then Actions) else do (Else Actions)











If - Conditions












BGRASP_UNIT[1] Not equal to No unit











Then - Actions












Hashtable - Save BGRASP_DELAY[(Level of BGRASP_MAINABILITY for BGRASP_UNIT[0])] as 3 of BGRASP_INTEGER in BGRASP_HASH












Hashtable - Save 0.00 as 24 of BGRASP_INTEGER in BGRASP_HASH












Custom script: set udg_BGRASP_INTEGER2 = GetHandleIdBJ( udg_BGRASP_UNIT[1])












Hashtable - Clear all child hashtables of child BGRASP_INTEGER2 in BGRASP_HASH












Unit - Add BGRASP_DummyAbility to BGRASP_UNIT[1]












Unit Group - Add BGRASP_UNIT[1] to BGRASP_GROUP_IMMUNE












Unit Group - Remove BGRASP_UNIT[1] from BGRASP_GROUP_KNOCK












Unit - Remove BGRASP_BUFF buff from BGRASP_UNIT[1]












Hashtable - Save Handle OfBGRASP_UNIT[1] as 0 of BGRASP_INTEGER in BGRASP_HASH












Custom script: call DestroyEffectBJ( AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\BattleRoar\\RoarCaster.mdl", udg_BGRASP_UNIT[1], "origin") )











Else - Actions










Custom script: call DestroyGroup( udg_BGRASP_GROUPTEMP1 )









Else - Actions










Do nothing








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










BGRASP_UNIT[1] Not equal to No unit









Then - Actions










Set BGRASP_REAL[1] = (Load 24 of BGRASP_INTEGER from BGRASP_HASH)










Set BGRASP_REAL[1] = (BGRASP_REAL[1] + BGRASP_REAL[0])










If (All Conditions are True) then do (Then Actions) else do (Else Actions)











If - Conditions












BGRASP_REAL[1] Greater than or equal to (Load 23 of BGRASP_INTEGER from BGRASP_HASH)











Then - Actions












Set BGRASP_REAL[1] = 0.00












Unit - Cause BGRASP_UNIT[0] to damage BGRASP_UNIT[1], dealing (Load 25 of BGRASP_INTEGER from BGRASP_HASH) damage of attack type BGRASP_ATTACKTYPE and damage type BGRASP_DAMAGETYPE












Custom script: call DestroyEffectBJ( AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl", udg_BGRASP_UNIT[1], "chest") )












If (All Conditions are True) then do (Then Actions) else do (Else Actions)













If - Conditions














(BGRASP_UNIT[1] is an illusion) Not equal to True













Then - Actions














Unit - Set life of BGRASP_UNIT[0] to ((Life of BGRASP_UNIT[0]) + (Load 26 of BGRASP_INTEGER from BGRASP_HASH))













Else - Actions











Else - Actions










Hashtable - Save BGRASP_REAL[1] as 24 of BGRASP_INTEGER in BGRASP_HASH










If (All Conditions are True) then do (Then Actions) else do (Else Actions)











If - Conditions












(BGRASP_UNIT[1] is alive) Equal to True












(BGRASP_UNIT[1] is hidden) Not equal to True












(BGRASP_UNIT[1] is visible to (Owner of BGRASP_UNIT[0])) Equal to True











Then - Actions












Set BGRASP_POINT[1] = (BGRASP_POINT[0] offset by (Load 11 of BGRASP_INTEGER from BGRASP_HASH) towards ((Facing of BGRASP_UNIT[0]) + 0.00) degrees)












Unit - Move BGRASP_UNIT[1] instantly to BGRASP_POINT[1], facing ((Angle from BGRASP_POINT[0] to BGRASP_POINT[1]) + 90.00) degrees












Custom script: call RemoveLocation( udg_BGRASP_POINT[1] )












If (All Conditions are True) then do (Then Actions) else do (Else Actions)













If - Conditions














(Level of Crow Form for BGRASP_UNIT[1]) Equal to 0













Then - Actions














Unit - Add Crow Form to BGRASP_UNIT[1]














Unit - Remove Crow Form from BGRASP_UNIT[1]













Else - Actions












Set BGRASP_REAL[1] = ((0.00 + (Current flying height of BGRASP_UNIT[0])) + (Load 12 of BGRASP_INTEGER from BGRASP_HASH))












Animation - Change BGRASP_UNIT[1] flying height to BGRASP_REAL[1] at 0.00












If (All Conditions are True) then do (Then Actions) else do (Else Actions)













If - Conditions














(BGRASP_UNIT[1] is an illusion) Not equal to True













Then - Actions














Set BGRASP_GROUPTEMP1 = (Units within (Load 14 of BGRASP_INTEGER from BGRASP_HASH) of BGRASP_POINT[0] matching (((((Matching unit) is in BGRASP_GROUP_IMMUNE) Not equal to True) and (((Matching unit) is in BGRASP_GROUP_KNOCK) Not equal to True)) and ((((Matching unit) is A structure)














Unit Group - Pick every unit in BGRASP_GROUPTEMP1 and do (Actions)















Loop - Actions
















Set BGRASP_UNIT[2] = (Picked unit)
















Set BGRASP_POINT[1] = (Position of BGRASP_UNIT[2])
















Set BGRASP_REAL[1] = (Facing of BGRASP_UNIT[0])
















Set BGRASP_REAL[2] = (Angle from BGRASP_POINT[0] to BGRASP_POINT[1])
















Set BGRASP_REAL[3] = (BGRASP_REAL[1] - BGRASP_REAL[2])
















If (All Conditions are True) then do (Then Actions) else do (Else Actions)

















If - Conditions


















BGRASP_REAL[3] Less than or equal to 0.00


















BGRASP_REAL[3] Greater than or equal to -90.00

















Then - Actions


















Set BGRASP_REAL[3] = (BGRASP_REAL[3] + 360.00)

















Else - Actions
















If (All Conditions are True) then do (Then Actions) else do (Else Actions)

















If - Conditions


















BGRASP_REAL[3] Greater than or equal to 360.00

















Then - Actions


















Set BGRASP_REAL[3] = (BGRASP_REAL[3] - 360.00)

















Else - Actions
















If (All Conditions are True) then do (Then Actions) else do (Else Actions)

















If - Conditions


















Or - Any (Conditions) are true



















Conditions




















And - All (Conditions) are true





















Conditions






















BGRASP_REAL[3] Greater than or equal to (360.00 - ((Load 5 of BGRASP_INTEGER from BGRASP_HASH) / 2.00))






















BGRASP_REAL[3] Less than or equal to 360.00




















And - All (Conditions) are true





















Conditions






















BGRASP_REAL[3] Greater than or equal to 0.00






















BGRASP_REAL[3] Less than or equal to (0.00 + ((Load 5 of BGRASP_INTEGER from BGRASP_HASH) / 2.00))

















Then - Actions


















Custom script: call DestroyEffectBJ( AddSpecialEffectTarget("Abilities\\Spells\\Human\\Defend\\DefendCaster.mdl", udg_BGRASP_UNIT[0], "origin") )


















Custom script: call DestroyEffectBJ( AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\MissileDeath.mdl", udg_BGRASP_UNIT[2], "chest") )


















If (All Conditions are True) then do (Then Actions) else do (Else Actions)



















If - Conditions




















(BGRASP_UNIT[1] is A Hero) Equal to True



















Then - Actions




















Unit - Cause BGRASP_UNIT[0] to damage BGRASP_UNIT[2], dealing ((Load 27 of BGRASP_INTEGER from BGRASP_HASH) + ((Real((Hero level of BGRASP_UNIT[1]))) x (Load 28 of BGRASP_INTEGER from BGRASP_HASH))) damage of attack type BGRASP_ATTACKTYPE_BASH and damage type BGRASP_DAMAGETYPE_BASH



















Else - Actions




















Unit - Cause BGRASP_UNIT[0] to damage BGRASP_UNIT[2], dealing ((Load 27 of BGRASP_INTEGER from BGRASP_HASH) + ((Real((Level of BGRASP_UNIT[1]))) x (Load 28 of BGRASP_INTEGER from BGRASP_HASH))) damage of attack type BGRASP_ATTACKTYPE_BASH and damage type BGRASP_DAMAGETYPE_BASH


















Custom script: set udg_BGRASP_INTEGER2 = GetHandleIdBJ( udg_BGRASP_UNIT[2])


















If (All Conditions are True) then do (Then Actions) else do (Else Actions)



















If - Conditions




















(Load 15 of BGRASP_INTEGER from BGRASP_HASH) Greater than 0.00



















Then - Actions




















Hashtable - Save (Load 15 of BGRASP_INTEGER from BGRASP_HASH) as 22 of BGRASP_INTEGER2 in BGRASP_HASH




















Unit Group - Add BGRASP_UNIT[2] to BGRASP_GROUP_IMMUNE



















Else - Actions


















If (All Conditions are True) then do (Then Actions) else do (Else Actions)



















If - Conditions




















(Load 16 of BGRASP_INTEGER from BGRASP_HASH) Greater than 0.00




















(Load 17 of BGRASP_INTEGER from BGRASP_HASH) Greater than 0.00



















Then - Actions




















Hashtable - Save (Load 16 of BGRASP_INTEGER from BGRASP_HASH) as 19 of BGRASP_INTEGER2 in BGRASP_HASH




















Hashtable - Save (Load 17 of BGRASP_INTEGER from BGRASP_HASH) as 20 of BGRASP_INTEGER2 in BGRASP_HASH




















Hashtable - Save BGRASP_REAL[2] as 21 of BGRASP_INTEGER2 in BGRASP_HASH




















Unit Group - Add BGRASP_UNIT[2] to BGRASP_GROUP_KNOCK




















Unit - Add BGRASP_DummyAbility to BGRASP_UNIT[2]




















Hashtable - Save BGRASP_DELAY[(Level of BGRASP_MAINABILITY for BGRASP_UNIT[0])] as 3 of BGRASP_INTEGER in BGRASP_HASH



















Else - Actions

















Else - Actions


















Unit Group - Remove BGRASP_UNIT[2] from BGRASP_GROUPTEMP1
















Custom script: call RemoveLocation( udg_BGRASP_POINT[1] )














Custom script: call DestroyGroup( udg_BGRASP_GROUPTEMP1 )













Else - Actions











Else - Actions












If (All Conditions are True) then do (Then Actions) else do (Else Actions)













If - Conditions














(Level of Crow Form for BGRASP_UNIT[1]) Equal to 0













Then - Actions














Unit - Add Crow Form to BGRASP_UNIT[1]














Unit - Remove Crow Form from BGRASP_UNIT[1]













Else - Actions












Animation - Change BGRASP_UNIT[1] flying height to (Default flying height of BGRASP_UNIT[1]) at 0.00












Unit - Remove BGRASP_DummyAbility from BGRASP_UNIT[1]












Set BGRASP_POINT[0] = (Position of BGRASP_UNIT[1])












Unit - Move BGRASP_UNIT[1] instantly to BGRASP_POINT[0]












Custom script: call RemoveLocation( udg_BGRASP_POINT[0] )












Hashtable - Save 0.00 as 24 of BGRASP_INTEGER in BGRASP_HASH












Unit Group - Remove BGRASP_UNIT[1] from BGRASP_GROUP_IMMUNE












Hashtable - Save Handle OfNo unit as 0 of BGRASP_INTEGER in BGRASP_HASH









Else - Actions










Do nothing








Custom script: call RemoveLocation( udg_BGRASP_POINT[0] )







Else - Actions








Unit Group - Remove BGRASP_UNIT[0] from BGRASP_GROUP








Unit - Remove BGRASP_BUFF buff from BGRASP_UNIT[0]








Set BGRASP_UNIT[1] = (Load 0 of BGRASP_INTEGER in BGRASP_HASH)








Unit - Remove BGRASP_DummyAbility from BGRASP_UNIT[0]








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










BGRASP_UNIT[1] Not equal to No unit









Then - Actions










If (All Conditions are True) then do (Then Actions) else do (Else Actions)











If - Conditions












(Level of Crow Form for BGRASP_UNIT[1]) Equal to 0











Then - Actions












Unit - Add Crow Form to BGRASP_UNIT[1]












Unit - Remove Crow Form from BGRASP_UNIT[1]











Else - Actions










Animation - Change BGRASP_UNIT[1] flying height to (Default flying height of BGRASP_UNIT[1]) at 0.00










Set BGRASP_POINT[0] = (Position of BGRASP_UNIT[1])










Unit - Move BGRASP_UNIT[1] instantly to BGRASP_POINT[0]










Custom script: call RemoveLocation( udg_BGRASP_POINT[0] )










Unit Group - Remove BGRASP_UNIT[1] from BGRASP_GROUP_IMMUNE










Unit - Remove BGRASP_DummyAbility from BGRASP_UNIT[1]










Unit - Turn collision for BGRASP_UNIT[1] On










Custom script: set udg_BGRASP_INTEGER2 = GetHandleIdBJ( udg_BGRASP_UNIT[1])










Hashtable - Save Handle OfNo unit as 0 of BGRASP_INTEGER in BGRASP_HASH










Hashtable - Clear all child hashtables of child BGRASP_INTEGER2 in BGRASP_HASH









Else - Actions








Hashtable - Clear all child hashtables of child BGRASP_INTEGER in BGRASP_HASH






Set BGRASP_UNIT[0] = No unit






Set BGRASP_UNIT[1] = No unit



Else - Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Number of units in BGRASP_GROUP_KNOCK) Greater than 0



Then - Actions




Set BGRASP_REAL[0] = 0.04




Unit Group - Pick every unit in BGRASP_GROUP_KNOCK and do (Actions)





Loop - Actions






Set BGRASP_UNIT[0] = (Picked unit)






Custom script: set udg_BGRASP_INTEGER = GetHandleIdBJ( udg_BGRASP_UNIT[0])






Set BGRASP_REAL[1] = (Load 19 of BGRASP_INTEGER from BGRASP_HASH)






Set BGRASP_REAL[1] = (BGRASP_REAL[1] - BGRASP_REAL[0])






Set BGRASP_POINT[0] = (Position of BGRASP_UNIT[0])






Set BGRASP_POINT[1] = (BGRASP_POINT[0] offset by ((Load 20 of BGRASP_INTEGER from BGRASP_HASH) x BGRASP_REAL[0]) towards (Load 21 of BGRASP_INTEGER from BGRASP_HASH) degrees)






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








(Load 19 of BGRASP_INTEGER from BGRASP_HASH) Less than or equal to 0.00







Then - Actions








Set BGRASP_REAL[1] = 0.00








Unit Group - Remove BGRASP_UNIT[0] from BGRASP_GROUP_KNOCK








Unit - Remove BGRASP_DummyAbility from BGRASP_UNIT[0]







Else - Actions






Hashtable - Save BGRASP_REAL[1] as 19 of BGRASP_INTEGER in BGRASP_HASH






Custom script: call DestroyEffectBJ( AddSpecialEffectLoc("Abilities\\Spells\\Human\\FlakCannons\\FlakTarget.mdl", udg_BGRASP_POINT[0]) )






Unit - Move BGRASP_UNIT[0] instantly to BGRASP_POINT[1]






Custom script: call RemoveLocation( udg_BGRASP_POINT[0] )






Custom script: call RemoveLocation( udg_BGRASP_POINT[1] )






Set BGRASP_UNIT[0] = No unit



Else - Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Number of units in BGRASP_GROUP_IMMUNE) Greater than 0



Then - Actions




Set BGRASP_REAL[0] = 0.04




Unit Group - Pick every unit in BGRASP_GROUP_IMMUNE and do (Actions)





Loop - Actions






Set BGRASP_UNIT[0] = (Picked unit)






Custom script: set udg_BGRASP_INTEGER = GetHandleIdBJ( udg_BGRASP_UNIT[0])






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








(Load 22 of BGRASP_INTEGER from BGRASP_HASH) Greater than 0.00







Then - Actions








Set BGRASP_REAL[1] = (Load 22 of BGRASP_INTEGER from BGRASP_HASH)








Set BGRASP_REAL[1] = (BGRASP_REAL[1] - BGRASP_REAL[0])








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










BGRASP_REAL[1] Less than or equal to 0.00









Then - Actions










Set BGRASP_REAL[1] = 0.00










Unit Group - Remove BGRASP_UNIT[0] from BGRASP_GROUP_IMMUNE










If (All Conditions are True) then do (Then Actions) else do (Else Actions)











If - Conditions












(BGRASP_UNIT[0] is in BGRASP_GROUP_KNOCK) Equal to True











Then - Actions












Unit Group - Remove BGRASP_UNIT[0] from BGRASP_GROUP_KNOCK












Unit - Remove BGRASP_DummyAbility from BGRASP_UNIT[0]












Set BGRASP_POINT[0] = (Position of BGRASP_UNIT[0])












Unit - Move BGRASP_UNIT[0] instantly to BGRASP_POINT[0]












Custom script: call RemoveLocation( udg_BGRASP_POINT[0] )











Else - Actions










Hashtable - Clear all child hashtables of child BGRASP_INTEGER in BGRASP_HASH









Else - Actions










Hashtable - Save BGRASP_REAL[1] as 22 of BGRASP_INTEGER in BGRASP_HASH







Else - Actions






Set BGRASP_UNIT[0] = No unit



Else - Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Number of units in BGRASP_GROUP) Equal to 0




(Number of units in BGRASP_GROUP_KNOCK) Equal to 0




(Number of units in BGRASP_GROUP_IMMUNE) Equal to 0



Then - Actions




Trigger - Turn off (This trigger)



Else - Actions