1. Are you planning to upload your awesome map to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  5. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  6. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  7. The results are out! Check them out.
    Dismiss Notice
  8. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  9. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  10. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Trigger Viewer

Duel of Gods (2).w3x
Variables
Simple Lightning Handling System
LH Loop
LH Setup
LH Unit2Unit
LH Unit2Point
LH Point2Unit
LH Point2Point
U2U FieryRay
UNIT TO POINT
POINT TO UNIT
POINT TO POINT
EventRunners
OnDeath
Changes Owner
OnAttack
Begins Casting
Starts Casting
Finishes Casting
Order No Target
Order Point
Order Target
Enters Region
Leaves Region
ElapsedGameTime 1
Sells Unit
Sells Item
Learns Skill
Uses an Item
Timer Expires
TimedEvents
Events005
Events050
Events100
Events500
Seconds16 Siegemaster
System - Projectiles
Read Me
CPS Loop
CPS Creating
CPS Init
ExampleArrow
NullTrig
Knockback
Knockback 2D
Example
Initialisierung
GameModesOwnership
Melee Initialization
OneSecondElapsed
MagicalStats
AttackStats
DefensiveStats
DummyDeath
WavesInitialization
HeroSold
UnitDummySold
TowerSettings
TowerDeathGoldBounty
TowerDeathSettingsCMID
TowerDeathSettingsAMID
TowerDeathSettingsCTOP
TowerDeathSettingsATOP
TowerDeathSettingsABOT
TowerDeathSettingsCBOT
WinLostTrigger
WinSiege
PlayersIncome
CS Increment
Player3SelectEvent
StatsP3
DestructiblesCleanUp
DebugUnits
PWUP Remove
GoldenSealWin
MinionSpawnRun
MinionSpawnRun SIEGE
MinionsSpawn1
ImprovementTime
UnrescueSet
AI
AI HeroPick
HeroCastsCDTimer
Commands
TesterCommands
TestCommand
OtherCommands
TestInitMessage
TestDisable
AIJaina
JainaAttackOrders
UnitAbilities
SiegeMaster FoD
SiegePyroBreak Death
SiegePyroAttack
SiegeCthulluEntangle
DoomBringerKill
SiegeMasterKill
SiegeMannorothFirebolt
SiegeDoomBringerSilence
Ghoul Death
SiegeMannorothDeath
CreepCamp
DrakeRunTimerC
DrakeRespawnC
DrakeRunTimerA
DrakeRespawnA
DrakeCampC1
DrakeCampA1
GolemRunTimerC
GolemRespawnC
GolemRunTimerA
GolemRespawnA
GolemCampC1
GolemCampA1
SpiderRunTimerC
SpiderRespawnC
SpiderRunTimerA
SpiderRespawnA
SpiderCampC1
SpiderCampA1
WyvernRunTimerC
WyvernRespawnC
WyvernRunTimerA
WyvernRespawnA
WyvernCampC1
WyvernCampA1
EagleCampRunTimerC
EagleTimerRespawnC
EagleCampRunTimerA
EagleTimerRespawnA
EaglesCampC
EagleCampInstA
WyrmRunTimerC
WyrmRespawnC
WyrmRunTimerA
WyrmRespawnA
WyrmCamp1Spawn
WyrmCamp A
BoarRespawnC
BoarRespawnA
BoarCampCSpawn
BoarCampA
JunglerSetDyingUnit
JunglerSet2
WolvesRespawnC
WolvesRespawnA
WolvesCampC
WolvesCampA
PrimRunTimerC
PrimRespawnC
PrimRunTimerA
PrimRespawnA
PrimigenianCampA
PrimigenianCamp1Spawn
PrimigenianTentsDeath
PrimigenianTentsDeath A
PrimigenianOffspring Attack
PrimigenianOffspring Attack A
Jungler
Exacra
Exacra Lesser
GaleWinds
FeralHowl
Maim
BoarQuillSpray
TakeDown
SapLife
SapLifeAutomaim
BreathFireAuto
Revitalize
HydraRespawn
HydraKill
HydraReg
ThunderingFix
FixCC1
FixCC2
JungleBounty
Bounties
GoldenBoarKill
PrimigenianKill
DamageLibrary
DamageEvent
PrimalEvents
CleavingEvents
PhysicalUnitEvents
PhysicalHeroEvents
PhysicalAimChance
PhysicalAchillesArmor
PhysicalEvasion
PhysicalCriticalStrike
PhysicalBash
PhysicalPostAbilities
PhysicalCleavingAttack
PhysicalAttackForceBonus
PhysicalAmplifications
PhysicalBackfireDamage
PhysicalReductions
PhysicalArmor
PhysicalPostArmor
BlockChance Normal
PhysicalPostAbilitiesAndLifeSteal2
SpellCreepEvents
SpellHeroEvents1
SpellHeroEvents2
SpellLockChance
SpellDenyChance
SpellCritical
SpellBash
SpellFirelordBurst
SpellAttackForce
SpellAmplifications
SpellBackfireDamage
SpellReductions
HealingAmplification
SpellMagicResistance
BlockChance Magic
SpellLifeDrainMath
Magic Vamp
SpellAndHealingText
PhysicalText
DamagePostEvents
TowerAttackAttacker
LifeStealCure
OnAttackHeroDamage
OnAttackHeroDamageAlly
OnAttackHeroDamageN
OnAttackMagicDamageNormal
OnAttackMagicDamageForked
OnAttackMagicDamageNormalDummy
AOEDummyMagicDamage
OnAttackTrueDamage
AOEDummyMagicDamage U
HeroGeneralTriggers
MaxLevelAchieve
LearnsGeneralAdds
FuryKillHeroes
NoManaHeroes
HeroKillBounty
HeroKillBounty Cheat
HeroKillBountyDuel
AnimSpeed1
AnimSpeed2
HeroDeath
HeroReviveFix
DissipationEnd
HeroDiesDUHDUH
HeroRelocationDeath
HeroItemDetection
HeroItemCriticalDetection
HeroItemBashDetection
HeroItemTemperDetection
HeroItemBlockChanceDetection
HeroItemAimChanceDetection
HeroItemEvasionDetection
HeroItemLockChanceDetection
HeroItemNegationDetection
HeroItemArmorPenDetection
HeroItemMagicPenDetection
HeroItemCleavingADDetection
HeroItemSpellPowerDetection
HeroItemArmorDetection
Hero AD Detection
HeroItemMagicResistanceDetection
HeroItemCriticalCastDetection
HeroItemSpellBashDetection
HeroItemLifeStealDetection
HeroItemMagicVampDetection
HeroItemManaEssenceDetectionControl
HeroItemManaEssenceDetectionLVLUP
HeroManaSpendEvents
SpecialHeroEvents
FirekingDamage
ItemControls1
ManalessReplaces
Manaless DROPS
ImmortalHearthCase1
Unique Item Control
ItemBuy
ItemCase 1
ItemCase 2
ItemCase 3
ItemCase 4
ItemCase 5
ItemCase 6
WarShopBuy
BasicItemBuy
ArchslayerList
ArchslayerBuy
Relic of Teleportation
RelicTeleport List
CarrionNecklace Buy
CarrionNecklace List
Feralbane Buy
Feralbane List
PoachersChoice Buy
PoachersChoice List
WildStalker Buy
WildStalker List
HitbackBuckler Buy
HitbackBuckler List
FierceDefender Buy
FierceDefender List
DeathMask Buy
DeathMaskList
NegationStaff Buy
NegationStaff List
FaeryWand Buy
FaeryWandList
Deathguard Buy
Deathguard List
Scepter of Evocations Buy
Scepter of Evocations List
Hearth Immortal Buy
Hearth Immortal List
BloodyGem Buy
BloodyGem List
Book of the Living Buy
Book of the Living List
PurifierBuy
PurifierList
StormRodBuy
StormRodList
ElectrumGlovesBuy
ElectrumGlovesList
TribalRod Buy
TribalRod List
Hellfire Cloak Buy
Hellfire Cloak List
Felfire Gem Buy
FelfireGem List
Legacy of Sargeras BUY
LegacySargeras List
SobiMask Buy
Sobi Mask List
Scroll of YoggSaron Buy
Scroll of YoggSaron List
Scepter of Control Buy
Scepter of Control List
DarkAncient Buy
DarkAncient List
FirekingScimitar Buy
FirekingList
Crown of Honor Buy
Crown of Honor List
Hydras Eye Buy
Hydras Eye List
Shadowblade Buy Complex
Shadowblade List
StartingItemsList
CoreItemList
AngelsRingBuy
AngelsRingList
SwiftnessBootsBuy
SwiftnessBootsList
EnduranceShoes Buy
EnduranceShoes List
InsigthBootsBuy
InsigthBootsList
SpectralBootsBuy
SpectralBootsList
BloodrinkerBuy
BloodrinkerList
ScarletLadyBuy Complex
ScarletLadyList
PiercingSpearBuy
PiercingSpearList
CrescentMoonBuy Complex
CrescentMoonList
SpiritCorrupterBuy
SpiritCorrupterList
StoneOfWisdomBuy
StoneOfWisdomList
ManaEssenceBuy
ManaEssenceList
CelureanBladeBuy
CeruleanBladeList
Grims Cloak Complex
GrimsCloakList
ManastealerBuy Complex
ManastealerList
SunRayBuy
SunRayList
Dinasty Talisman Buy
DinastyTalismanList
AchillesArmorBuy
AchillesArmorList
FlashingEyeBuy
FlashingEyeList
RingOfProtectionBuy
RingOfProtectionList
LuckyCharmBuy Complex
LuckyCharmList
WarcastBuyComplex
WarcastList
ShamanClawsBuy
ShamanClawsList
StormClawsBuy Complex
StormClawsList
MysticalGemstoneBuy
MysticalGemstoneList
HekatesTorchBuy Complex
HekatesList
ReanimationStaffBuyComplex
RaenimStaffList
SerathilBuy
SerathilList
Dreadbringer Complex
DreadbringerList
Wrathmace Complex
WrathmaceList
BattleScepterBuy
BattleScepterList
GreedyTakerBuy
GreedyTakerList
RunnerBootsBuy
RunnerBootsList
BurningMalevolence Buy
BurningMalevolence List
FervorBuy
Untitled Trigger 001
FervorItemList
FeralBuy
FeralItemListDisplay
FuryBuy
FuryItemListDisplay
MaledictumEdgeBuy
MaledictumEdgeItems
ConsumableItemBuy
DeselectItemListKill
ItemAbilities
BurningMalevolence
ReanimatedINT
Blade of Shadows
JunglerPotUse
JuglerPotCharge
JunglerPotUse2
JuglerPotCharge2
DeathMaskKill
EnduranceShoesKill
SpectralBootsBoost
RecallingAdd
RecallingFinish
DinastyHeal
RecallingTakeOut
ForceChargue
SpiritCorrupterKill
MaledictumKill
CelureanBladeKill
ScarletLadyHeroKill
LawOfTheDamnedHeroKill
GreedyTakerKill
ForceStacks6
ItemControlStaffDeny
ControlScepterConversion
ReturnControl
InstantRecallControl
DarkAncientCast
FaeWandCast
EvocationStart
EvocationStaph
PurgeRemoveStuns
TowerAttackPattern
TowerAttackHeroes
TowerAttackHeroesAnullate
MinionRoutMid
MinionRout0
MinionRoutMid1
MinionRoutMid2
MinionRoutMid3
MinionRoutMid4
MinionRoutMid5
MinionRoutMid6
MinionRoutMid7
MinionRoutMid8
MinionRoutMid9
MinionRoutMid10
MinionSummonEngroupMid
MinionRoutBot
MinionRoutBot1
MinionRoutBot2
MinionRoutBot3
MinionRoutBot4
MinionRoutBot5
MinionRoutBot6
MinionRoutBot7
MinionRoutBot8
MinionRoutBot9
MinionRoutBot10
MinionSummonEngroupBot
MinionRoutTop
MinionRoutTop1
MinionRoutTop2
MinionRoutTop3
MinionRoutTop4
MinionRoutTop5
MinionRoutTop6
MinionRoutTop7
MinionRoutTop8
MinionRoutTop9
MinionRoutTop10
MinionRoutTop11
MinionSummonEngroupTop
Into the Duel
JoinDuel
DuelTimer
AntiJainaTP Duel
Devilspawn Imp
Firecrackers
FirecrackersAtt
TrickInvi
AntiBackstabDamage
DarkStarAddGroup
BurningLady
PhoenixEmbrace
PhoenixEmbrace2
Firedance Damage
Firedance Extra ManaCost
PhoenixSpiritPoint
PhoenixSpiritArt
FieryRayAngle
LigthStrike
Strategist
LockandLoad
FlareDetonation
Exterminate1
Exterminate2
Exterminate3
MarkHunter
ExplosiveBarrel
HellSkull
CheatHealing
StormGuard
ThunderShield1
ThunderShieldReturn
CrushingWave1Var
TempestVar
Royal Master
Polymorph
ObliterateStart
ObliterateEnd
DistortionAnim
BattleGolemAdjust
RiftKill
RiftStun
ReturnMaster
ReturnClick
BattleGolemsAttack
Gravekeeper
AberrationUp
RainOfDeadEntry
RainOfDeadEntryDamage
ExplodeCorpse
GraveCall INT
DarkPromiseSummon
FeedAberration
CryptLord
CarrionBeetleAdjust
UnburrowFix
UnburrowFix2
SpawnFliesKill
CLordDeath
BeetlesDie
PrimalBite
Dark Lady
LifeDrain DarkRanger
LifeDrain stop
LifeDrainDamage
VanishmentStart
VanishmentFinishAndRun
VanishmentIllusionsRun
VanishReplacementClick
VanishAttackOrder
CharmLevelChangues
CharmConversion
CharmGreaterLevelDeny
CharmedHeroActions
CharmedHeroDeConversion
CharmedHeroKilled
Firelord
LavaSpawnAttack
SoulBurnInit
Erase
BurstKill
VolcanoStart
VolcanoFinish
MoltenSkinDeath
VolcanoStop
OnAttackVolcanoDPS
MoonPriestess
OwlStrikeAutoHero
OwlCast
OwlSummon
EluneBleed
BlindSightReduction
FaerieHeal
StarfallStart
StarfallFinish
Archmage
WaterElementalsAttack
FireVeilDamage
WaterElementalAdjust
WaterElementalDamageSet
FireAttackJaina
MassTP Eff
Return
Clouds
MassTPdetect
MassTPBlink
MassTPAssistanceStart
MassTPAssistanceEff
MassTPAssistanceCancel
Lich
Death and Decay Slow
Death and Decay Cancel
Death and Decay Effect Null
FrostNova
LichKillPas
LichKillPasDamage
GlacialGrasp
FrostArmorOnCast
DarkRitual
DarkRitualKill
UnholyIcePlagueStart
Sea Witch
ManaShieldActivate
ManaShieldDeact
FrostArrowDamage
EternitySting
Eternitys Sting Damage
Snake Eyes
Snake Eyes Kill
Maelstrom
Maelstrom Config
Maelstrom Cast
Maelstrom Loop
KoTG
TranquilityINT
Rejuvenation
RejuvEFF
Bowrunner
BowrunnerAgiKill
Thracian Rage Heal
ThunderingHoovesINT
ThunderOrbINT
ThunderingHooves
ThunderHoovesDamage
AimedShotStart
AimedShotStop
ThunderOrbDeath
Deathsinger
GhostCoilIllusionDeath
GhostCoilKill
HauntingTouch
HauntedExplosion
Dark Cry Sound
GhostCoilInit
GhostCoilIllusionLocation
GhostCoilGroup
GhostCoilBackup
Torment
TormentEffect
DeathsongKill
DeathsongRemove
PitLord
HellChargeStart
HellChargeDamage
ToThePit
ToThePitBaseReturn
HorrendousKill
MountainKing
MKDEBUFF
Tribes Master
EarthboundCastDamage
RedFury RED
RedFury ColorControl
Sun King
SiphonManaCast
PowerSurgeStart
PowerSurgeStop
BanishStop
Warden
ShadowCaptureGroupAdd
ShadowCaptureTrueRemove
ShadowCaptureTrueRemove 2
ShadowCaptureAttack
ShadowCaptureCast
MiniVengeances
BlinkAoE Vengeances
AttackReturnVengeances
FanKnives
AttackAoE Vengeances
Kartenspezifischen eigenen Skript-Code unten eingeben. Dieser Text wird in das Karten-Skript nach der Deklaration der Variablen und vor jeglichem Auslöser-Code eingefügt.
//TESH.scrollpos=0
//TESH.alwaysfold=0
// Map header custom code

// SimError by Vexorian at wc3c.net

// Sim Error (modified)

function CSS_SimError takes string s returns nothing
    local string msg = "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n|cffffcc00" + s + "|r"
    local player ForPlayer = GetTriggerPlayer()
    local sound error = CreateSoundFromLabel("InterfaceError", false, false, false, 10, 10)

    if GetLocalPlayer() == ForPlayer then
        call ClearTextMessages()
        call DisplayTimedTextToPlayer(ForPlayer, 0.52, 0.96, 2.00, msg)
        call StartSound(error)
    endif

    set ForPlayer = null
endfunction

function CSS_SimNotification takes string s returns nothing
    local string msg = "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n|cff32cd32" + s + "|r"
    local player ForPlayer = GetTriggerPlayer()
    local sound notify = CreateSoundFromLabel("ItemReward", false, false, false, 10, 10)

    if GetLocalPlayer() == ForPlayer then
        call ClearTextMessages()
        call DisplayTimedTextToPlayer(ForPlayer, 0.52, 0.96, 2.00, msg)
        call StartSound (notify)
    endif

    set ForPlayer = null
endfunction

// Bound Int by Magtheridon96 at hiveworkshop.com

// BoundInt

function BoundInt takes integer i, integer min, integer max returns integer
    return IMaxBJ(IMinBJ(i, max), min)
endfunction

// Bonus Handling Code

function CSS_AddBonus takes unit u, integer amount, integer bonusType returns nothing
    local integer max = udg_CSS_Power[17]
    local integer min = -udg_CSS_Power[17]
    local integer i = 16
    local integer j = LoadInteger (udg_CSS_Hashtable, GetHandleId(u), bonusType)

    if amount > max - 1 or amount < min then
        call CSS_SimError ("Value too high or too low")
        return
    endif

    if amount + j >= max or amount + j <= min then
        call CSS_SimError ("Current value at maximum or minimum")
        return
    endif

    set amount = amount + j
    call BoundInt (amount, min, max - 1)

    if bonusType < 0 or bonusType > 10 then
        call CSS_SimError ("CSS Error: Invalid bonus type (" + I2S(bonusType) + ")")
        return
    elseif bonusType == 8 or bonusType == 9 then

        if bonusType == 8 and amount*1. + GetUnitState(u, UNIT_STATE_MAX_LIFE) <= 0 then
            call CSS_SimError ("Unit's current max life is lower than the negative bonus amount. Unable to subtract.")
            return
        elseif bonusType == 9 and amount*1. + GetUnitState(u, UNIT_STATE_MAX_MANA) <= 0 then
            call CSS_SimError ("Unit's current max mana is lower than the negative bonus amount. Unable to subtract.")
            return
        endif

        call SaveInteger(udg_CSS_Hashtable, GetHandleId(u), bonusType, amount)

        if amount < 0 then
            set amount = max + amount
        else
            call UnitRemoveAbility(u, udg_CSS_Abilities[(bonusType + 1)*18 - 1])
        endif

        loop
            if amount >= udg_CSS_Power[i] then
                call UnitAddAbility(u, udg_CSS_Abilities[bonusType*18 + i])
                call UnitMakeAbilityPermanent(u, true, udg_CSS_Abilities[bonusType*18 + i])
                set amount = amount - udg_CSS_Power[i]
            else
                call UnitRemoveAbility(u, udg_CSS_Abilities[bonusType*18 + i])
            endif
        
            set i = i - 1
            exitwhen i < 0
        endloop

        if LoadInteger(udg_CSS_Hashtable, GetHandleId(u), bonusType) < 0 then
            call UnitAddAbility(u, udg_CSS_Abilities[(bonusType + 1)*18 - 1])
            call UnitMakeAbilityPermanent(u, true, udg_CSS_Abilities[(bonusType + 1)*18 - 1])
        endif

    else

        call SaveInteger(udg_CSS_Hashtable, GetHandleId(u), bonusType, amount)

        if amount < 0 then
            set amount = max + amount
            call UnitAddAbility(u, udg_CSS_Abilities[(bonusType + 1)*18 - 1])
            call UnitMakeAbilityPermanent(u, true, udg_CSS_Abilities[(bonusType + 1)*18 - 1])
        else
            call UnitRemoveAbility(u, udg_CSS_Abilities[(bonusType+1)*18 - 1])
        endif

        loop
            if amount >= udg_CSS_Power[i] then
                call UnitAddAbility(u, udg_CSS_Abilities[bonusType*18 + i])
                call UnitMakeAbilityPermanent(u, true, udg_CSS_Abilities[bonusType*18 + i])
                set amount = amount - udg_CSS_Power[i]
            else
                call UnitRemoveAbility(u, udg_CSS_Abilities[bonusType*18 + i])
            endif
        
            set i = i - 1
            exitwhen i < 0
        endloop

    endif
endfunction
Name Type Is Array Initial Value
A00TimedEffect effect Yes
AACharmBackInt integer No
AACryptLordGroup group No
AADinastyAGI integer Yes
AADinastyINT integer Yes
AADinastySTR integer Yes
AAltarInt_A integer No
AAltarInt_C integer No
AAManorothMid unit No
AchillesINT integer No
ADASPHero real Yes
ADASPTestGroup group Yes
ADASPTestGroupReal group No
ADPHero real Yes
ADPTestGroup group Yes
AimINT integer No
AIPlayerGroup force No
allocatedAttacks integer No
allocCounter integer No
AllPlayers force No
AllyFireDamage group No
AlternateTagGroup group No
AM_BAR_COLOUR string Yes
AM_BAR_COUNT integer No
AM_BAR_STRING string No
AM_BARS_COLOURED integer Yes
AM_CHOSEN_HERO unit Yes
AM_CREEP_DENIES integer Yes
AM_CREEP_KILLS integer Yes
AM_DOMINATION_TEXT string No
AM_GAME_TIMER boolean No
AM_HERO_DEATHS integer Yes
AM_HERO_ICON_PATH string Yes
AM_HERO_KILLS integer Yes
AM_HERO_TYPE unitcode Yes
AM_HERO_TYPE_COUNT integer No
AM_LB leaderboard Yes
AM_MB multiboard Yes
AM_MULTIPLIER real Yes
AM_NAME string No
AM_PG force Yes
AM_PG_ALL force No
AM_PLAYER_HERO_ICON_PATH integer Yes
AM_PLAYER_VALUE integer Yes
AM_SHOW_OPPONENT_VALUE boolean No
AM_TEAM_ONE_NAME string No
AM_TEAM_TWO_NAME string No
AM_TIME_MINUTES integer No
AM_TIME_SECONDS integer No
AM_VALUE_ICON string No
AM_VALUE_NAME string No
amount real No
APRatio real No
AssistanceTPUNIT1 group No
AssistanceTPUNIT2 group No
Astral_Homeguard group No
AstralMinionFightMid group Yes
AstralMinionRoutBot group Yes
AstralMinionRoutMid group Yes
AstralMinionRoutTop group Yes
AstralRoutFix group No
AstralsGroup force No
ATTACK_TYPE_UNIVERSAL attacktype No
AttackForceINT integer No
BlindedGroup group No
BlockChanceAmount real Yes
BoarA1 unit No
BoarA2 unit No
BoarA3 unit No
BoarC_C1 unit No
BoarC_C2 unit No
BoarC_C3 unit No
BoarTimerA timer No
BoarTimerC timer No
BotElite_A unitcode No
BotElite_C unitcode No
BotFront_A unitcode No
BotFront_C unitcode No
BotRanged_A unitcode No
BotRanged_C unitcode No
BRACERS_SPELL_DAMAGE_REDUCTION real No
BurstKillAoESource group No
CCamp10C1 group No
CCamp10C1Timer integer No
CCamp10C2 group No
CCamp10C2Timer integer No
CCamp10C3 group No
CCamp10C3Timer integer No
CCamp11C1 group No
CCamp11C1Timer integer No
CCamp11C2 group No
CCamp11C2Timer integer No
CCamp11C3 group No
CCamp11C3Timer integer No
CCamp12C1 group No
CCamp12C1Timer integer No
CCamp12C2 group No
CCamp12C2Timer integer No
CCamp12C3 group No
CCamp12C3Timer integer No
CCamp13C1 group No
CCamp13C1Timer integer No
CCamp13C2 group No
CCamp13C2Timer integer No
CCamp14C1 group No
CCamp14C1Timer integer No
CCamp14C2 group No
CCamp14C2Timer integer No
CCamp14C3 group No
CCamp14C3Timer integer No
CCamp15C1 group No
CCamp15C1Timer integer No
CCamp15C2 group No
CCamp15C2Timer integer No
CCamp15C3 group No
CCamp15C3Timer integer No
CCamp16C1 group No
CCamp16C1Timer integer No
CCamp16C2 group No
CCamp16C2Timer integer No
CCamp1C1 group No
CCamp1C1Timer integer No
CCamp1C2 group No
CCamp1C2Timer integer No
CCamp1C3 group No
CCamp1C3Timer integer No
CCamp2C1 group No
CCamp2C1Timer integer No
CCamp2C2 group No
CCamp2C2Timer integer No
CCamp2C3 group No
CCamp2C3Timer integer No
CCamp3C1 group No
CCamp3C1Timer integer No
CCamp3C2 group No
CCamp3C2Timer integer No
CCamp3C3 group No
CCamp3C3Timer integer No
CCamp4C1 group No
CCamp4C1Timer integer No
CCamp4C2 group No
CCamp4C2Timer integer No
CCamp4C3 group No
CCamp4C3Timer integer No
CCamp5C1 group No
CCamp5C1Timer integer No
CCamp5C2 group No
CCamp5C2Timer integer No
CCamp5C3 group No
CCamp5C3Timer integer No
CCamp6C1 group No
CCamp6C1Timer integer No
CCamp6C2 group No
CCamp6C2Timer integer No
CCamp7C1 group No
CCamp7C1Timer integer No
CCamp7C2 group No
CCamp7C2Timer integer No
CCamp7C3 group No
CCamp7C3Timer integer No
CCamp8C1 group No
CCamp8C1Timer integer No
CCamp8C2 group No
CCamp8C2Timer integer No
CCamp9C1 group No
CCamp9C1Timer integer No
CCamp9C2 group No
CCamp9C2Timer integer No
CCamp9C3 group No
CCamp9C3Timer integer No
CDR_Ability1 abilcode No
CDR_Ability2 abilcode No
CDR_Ability3 abilcode No
CDR_Ability4 abilcode No
Celestial_Homeguard group No
CelestialMinionFightMid group Yes
CelestialMinionRoutBot group Yes
CelestialMinionRoutMid group Yes
CelestialMinionRoutTop group Yes
CelestialsGroup force No
CharmedHeroConverted group No
CharmedHeroPlayerMark group Yes
CharmedHeroPreCon group No
CharmedHeroTimer group Yes
CharmedHeroTimerBack group Yes
CharmedUnits group No
CharmInt integer No
CharmRemoval group Yes
CheatDyingINT integer Yes
CheatHealUnit unit No
CheatKillerINT integer Yes
CleaveAttMomentDummy group No
CleaveAttMomentTarget group No
CODE integer No
ColdShadowGroup group No
Colour string Yes
ControlStaffGroup group No
CPS_Angle real No
CPS_AoE real Yes
CPS_ArcReal real Yes
CPS_AttackType attacktype Yes
CPS_Damage real Yes
CPS_DamageType damagetype Yes
CPS_Destroy boolean Yes
CPS_Dummy unit No
CPS_DummyType unitcode No
CPS_HArc boolean Yes
CPS_HArcLeftRight boolean Yes
CPS_HArcWidth real Yes
CPS_Height real Yes
CPS_Impact modelfile Yes
CPS_Loop integervar No
CPS_Missile unit Yes
CPS_MissileDistance real Yes
CPS_MUI integer No
CPS_Off boolean No
CPS_Point location Yes
CPS_Source unit Yes
CPS_SourcePoint location Yes
CPS_Speed real Yes
CPS_Target unit No
CPS_TargetUnit unit Yes
CPS_TraveledDistance real Yes
CPS_Tree destructable No
CPS_Trigger trigger Yes
CPS_UnitOrPoint boolean Yes
CPS_VArc boolean Yes
CPS_VArcHeight real Yes
CriticalCastMultiplier real Yes
CriticalMultiplier real No 2.00
CriticalTextGroup group No
CriticalTextGroupSpell group No
CrushingWaveSource group No
CryptLordInt integer No
CSS_Abilities abilcode Yes
CSS_Counter integer No
CSS_CustomSwitch boolean No
CSS_EventMainItem item No
CSS_EventMainItemStacked item Yes
CSS_EventSocketItem item No
CSS_EventSocketItemStacked item Yes
CSS_EventUnit unit No
CSS_EventUnitStacked unit Yes
CSS_GemBonusBoolean boolean No
CSS_GemLevel integer No
CSS_Hashtable hashtable No
CSS_Power integer Yes
CSS_PreloadBoolean boolean No true
CSS_SocketingEnabled boolean No
CSS_String string Yes
DAMAGE_TYPE_DETECTOR integer No
damageEvent trigger No
damageEventTrigger real No
damageHandler trigger No
damageType integer No
DarkAncientCastGroup group Yes
DarkAncientTRUE group No
DarkPromiseGroup group Yes
DarkRitualDealer group No
DarkRitualSpellPower integer Yes
DarkRitualTimer integer Yes
DarkStarGroup group No
DeathDecayGroup group No
DeathMaskInt integer Yes
DeathsongUnit group No
DemonbaneBonusInt integer No
DemonHunterGroup group No
DenyINT integer No
DestinyItem itemcode No
DevilOneINT integer No
DizzyAddGroup group No
DrakeA1 unit No
DrakeA2 unit No
DrakeA3 unit No
DrakeC1 unit No
DrakeC2 unit No
DrakeC3 unit No
DrakeTimerA timer No
DrakeTimerC timer No
Duel_INT integer No
DuelTimer integer No
DummyAoEDamageMagic group No
DummyAoEDamageMagicU group No
DummyDamageUnit unit Yes
Eagles_A1 unit No
Eagles_A2 unit No
Eagles_A3 unit No
Eagles_C1 unit No
Eagles_C2 unit No
Eagles_C3 unit No
EaglesTimerA timer No
EaglesTimerC timer No
EluneBleed group No
ElunesChosenGroup group No
EternitysStingDealer group No
EternitysStingDealer2 group No
EternitysStingImpact group No
EternitysStingStarter group No
EternitysStingTargets group No
ETHEREAL_DAMAGE_FACTOR real No
EvasionINT integer No
EVENT_SOCKET_FINISH real No
EvocationGroup group No
ExterminateUnit unit Yes
FA_Caster unit No
FA_Point location No
FA_Target unit No
FaerieRemove unit No
FaeWandGroup group Yes
FaeWandGroupTrue group No
FieryAttackGroup group No
FireAttacksJaina group Yes
FirekingDamage group Yes
FirekingDuration group Yes
FirekingINT integer No
FirekingTarget unit No
FNovaTarget group No
FogBlue real No
FogDensity real No
FogDensityInterval integer No
FogEnd real No
FogGreen real No
FogRed real No
FogStart real No
ForceReload group No
ForggA1 unit No
ForggA2 unit No
ForggA3 unit No
ForggC_C1 unit No
ForggC_C2 unit No
ForggC_C3 unit No
ForkedLightningDealer2 group No
ForkedLightningTargets group No
FrostArmorPwps itemcode Yes
FrostboltRootItem itemcode Yes
FrostGraspItems itemcode Yes
FrostNovaDealer group No
FrostNovaDealerSelf group No
FTADP3 texttag No
FTASP3 texttag No
GhostCoil_BackupPoint location Yes
GhostCoil_Unit unit Yes
GhostCoilBackupGroup group No
GhostCoilBackupInt integer Yes
GhostCoilIllusion group No
GhostCoilIllusionReal group No
GolemA1 unit No
GolemA2 unit No
GolemC1 unit No
GolemC2 unit No
GolemTimerA timer No
GolemTimerC timer No
GraveAstralGroup group No
GraveCall_INT integer No
GraveCelestialGroup group No
GraveCorrection group No
GreedyTakerGreedGold real Yes
GreenDrakePoison group No
GreenImmolationOnEffect group No
h hashtable No
HauntedExplosion group Yes
HauntedFireEnemyItem itemcode Yes
HauntedFireShield group Yes
HauntedFireShieldA group No
HauntedFireShieldPreBuff group Yes
HealGroup group No
HealTypeAttack attacktype No
HealTypeDamage damagetype No
HellChargeTimer group No
HeroAimChance integer Yes
HeroArmorAmount integer Yes
HeroArmorPen integer Yes
HeroBackstabPercent integer Yes
HeroBashChance integer Yes
HeroBlockChance integer Yes
HeroCDR integer Yes
HeroCleavingAttack integer Yes
HeroCriticalChance integer Yes
HeroCriticalChanceSpell integer Yes
HeroDenyChance integer Yes
HeroEvasionChance integer Yes
HeroLifeSteal integer Yes
HeroLockChance integer Yes
HeroMagicPen integer Yes
HeroMagicVamp integer Yes
HeroNegationChance integer Yes
HeroSlotSPBonus integer Yes
HeroSpellBashChance integer Yes
HeroTemperAmount integer Yes
HydraINT real Yes
HydraKillerINT integer Yes
HydraTimer timer No
HydraUnit unit No
ID_Run boolean Yes
InvulnerableFixGroup group No
InvulnerableGroup group No
ItemCarryInt integer No
ItemChargeCap integer No
ItemPrice integer No
ItemSlot1CriticalBonus integer Yes
ItemSlot2CriticalBonus integer Yes
ItemSlot3CriticalBonus integer Yes
ItemSlot4CriticalBonus integer Yes
ItemSlot5CriticalBonus integer Yes
ItemSlot6CriticalBonus integer Yes
KB2D_AllowTreeDestroy boolean No
KB2D_Angle real No
KB2D_Cutter unit No
KB2D_Dest destructable No
KB2D_Distance real No
KB2D_Duration real No
KB2D_Hash hashtable No
KB2D_Hit boolean No
KB2D_Key integer No
KB2D_Loc location No
KB2D_Loop real No
KB2D_LoopGroup group No
KB2D_Offset location No
KB2D_SFX string No
KB2D_Source unit No
KB2D_Target unit No
KB2D_TempGroup group No
KB2D_TempKey integer No
KB2D_Timer real No
KB2D_TouchRadius real No
KB2D_U unit No
Laner_MidC player No
LH_CurrentIndex integer No
LH_Duration real Yes
LH_DurationSet real No
LH_Interval real No
LH_Lightning lightning Yes
LH_Lightning_FireShoot lightning Yes
LH_Lightning_GreenRay lightning Yes
LH_Lightning_ShadowRay lightning Yes
LH_LightningAlpha real Yes
LH_LightningFadeInterval real Yes
LH_LightningName string Yes
LH_LightningNameSet string No
LH_Location location No
LH_MaxIndex integer No
LH_PointSource location Yes
LH_PointSourceSet location No
LH_PointSourceZ real Yes
LH_PointSourceZSet real No
LH_PointTarget location Yes
LH_PointTargetSet location No
LH_PointTargetZ real Yes
LH_PointTargetZSet real No
LH_UnitSource unit Yes
LH_UnitSourceSet unit No
LH_UnitTarget unit Yes
LH_UnitTargetSet unit No
LH_UnitZ real No
LHBoonlean_FireShoot boolean No
LHBoonlean_GreenRay boolean No
LHBoonlean_ShadowRay boolean No
LifeDrainNoCritGroup group No
LifeDrainUnit group No
LifeStealDummGroup group No
LOCK_INT integer No
LockAndLoad group Yes
LongShotINT integer Yes
LongShotSource group No
LongShotTarget unit Yes
LongShotTime integer Yes
LongShotUnit unit Yes
M_Angle real No
M_AnglePlus real No
M_Caster unit No
M_Damage real Yes
M_DamageLoop real No
M_Denominator real No
M_DistanceBase real No
M_Duration real Yes
M_Hash hashtable No
M_Levels integer No
M_Loops real No
M_Numerator real No
M_Picked unit No
M_PickedHandle integer No
M_PickedLoc location No
M_PickedV unit No
M_PickedVLoc location No
M_Radius real No
M_SFXOffset location No
M_Speed real No
M_SpeedBase real No
M_SuckOffset location No
M_SuckSFX string No
M_TargetLoc location No
M_THandle integer No
M_Tornado unit No
M_TornadoGroup group No
M_TornadoSFX string No
M_VictimGroup group No
M_VictimGroup2 group No
M_VictimGroup3 group No
MagicINT integer No
MagicResist integer Yes
MagicResistUnit unit Yes
ManaBefore real Yes
ManaDifference real Yes
ManaNow real Yes
ManaSpendsTrueNo integer Yes
MarkOfTheHunterINT integer Yes
MassTPAssistanceGroup group No
MathReal1 real No
MathReal2 real No
MathReal3 real No
MaxManaBefore real Yes
MaxManaNow real Yes
MidElite_C unitcode No
MidEliteA unitcode No
MidFront_A unitcode No
MidFront_C unitcode No
MidRanged_A unitcode No
MidRanged_C unitcode No
MinionFightAssured group No
NoLoopGroup group No
NoStructureDamageGroup group No
NoTopInt integer No
ObliterationPointX real Yes
ObliterationPointY real Yes
OnAttackHeroDamage group No
OnAttackHeroDamageN group No
OnAttackMagicDamage group No
OnAttackMagicDamageN group No
OnAttackTrueDamage group No
OnDummyMagicDamageN group No
OnlyMidINT integer No
OriginalIntDH integer No
PHero unit Yes
PHeroE string Yes
PHeroEBaseCD real Yes
PHeroEOrderString string Yes
PHeroEScaling real Yes
PHeroETimer timer Yes
PHeroF string Yes
PHeroFTimer timer Yes
PHeroGroup group No
PHeroHorrendous real Yes
PHeroQ string Yes
PHeroQBaseCD real Yes
PHeroQScaling real Yes
PHeroQSpellLVL integer Yes
PHeroQTimer timer Yes
PHeroR string Yes
PHeroRBaseCD real Yes
PHeroRScaling real Yes
PHeroRSpellLVL integer Yes
PHeroRTimer timer Yes
PHeroW string Yes
PHeroWBaseCD real Yes
PHeroWScaling real Yes
PHeroWSpellLVL integer Yes
PHeroWTimer timer Yes
PhoenixSpiritUnit group No
PHYSICAL integer No
PhysicalSpellDeal group No
PickedEff group Yes
PreCriticalDamage real No
PrimTimerA timer No
PrimTimerC timer No
Projectile_AoE real No
Projectile_AttackType attacktype No
Projectile_Damage real No
Projectile_DamageType damagetype No
Projectile_DestroyTree boolean No
Projectile_HArc boolean No
Projectile_HArcLeftOrRight boolean No
Projectile_HArcWidth real No
Projectile_Height real No
Projectile_Impact string No
Projectile_Model modelfile No
Projectile_Size real No
Projectile_Source unit No
Projectile_Speed real No
Projectile_TargetPoint location No
Projectile_TargetUnit unit No
Projectile_Trigger trigger No
Projectile_UnitOrPoint boolean No
Projectile_VArc boolean No
Projectile_VArcHeight real No
pureAmount real No
PyreitchGroup group No
RandomChance integer No
ReanimatedFuryInt integer No
RecallingGroup group No
RedDragonKill group No
RedDrakeINT real Yes
RedFuryGroup group No
RejuvenationINT integer No
RejuvGroup group No
runAllocatedAttacks trigger No
SavedAmount real No
ScarletLadyInt real Yes
SET_MAX_LIFE integer No
ShadowbladeGroup group No
ShadowCaptureGroup group No
ShadowCaptureGroupRemove group No
ShoranUnit unit No
SiegeModeINT integer No
source unit No
SourcePlayer player No
SourcePlayerNumber integer No
SPELL integer No
SPELL_DAMAGE_REDUCTION_ITEM integer No
SPELL_RESISTANCE_AUTO_DETECT boolean No
SpellDamageSource group No
SpellDamageText group No
SpellPowerUnit unit Yes
SpiderA1 unit No
SpiderA2 unit No
SpiderA3 unit No
SpiderC1 unit No
SpiderC2 unit No
SpiderC3 unit No
SpiderTimerA timer No
SpiderTimerC timer No
SpikedShellGroup group No
SPSD_Caster unit No
SPSD_TargetPoint location No
SPSD_TargetUnit unit No
StarfallDPoint group No
StarfallGroup group No
StarFallWave group No
StaticOrbSource group No
Step1Item item No
Step1ItemInt integer No
Step2Item item No
Step2ItemInt integer No
Step3Item item No
Step3ItemInt integer No
Step4Item item No
Step4ItemInt integer No
Step5Item item No
Step5ItemItn integer No
Step6Item item No
Step6ItemItn integer No
StormSphereINT integer No
StormWyrmKill group No
SummonedUnitGroup group No
target unit No
TargetPlayer player No
TargetPlayerNumber integer No
Temp_Ap real No
Temp_Group group No
Temp_Group2 group No
Temp_Int integer No
Temp_Int2 integer No
Temp_Int3 integer No
Temp_Int4 integer No
Temp_Item item No
Temp_ItemType itemcode No
Temp_ItemType2 itemcode No
Temp_Mod real No
Temp_Player player No
Temp_Player2 player No
Temp_PlayerGroup force No
Temp_Point location No
Temp_Point2 location No
Temp_Point3 location No
Temp_PointEX1 location No
Temp_Real real No
Temp_Real2 real No
Temp_Real3 real No
Temp_Region rect No
Temp_Research techcode No
Temp_Slot integer No
Temp_String1 string No Hello
Temp_String2 string No
Temp_Unit unit No
Temp_Unit2 unit No
TempDevilOne unit No
TempNumber real No
TempOnAttackMagicDamage real No
TempPoint location No
TempPoint2 location No
TempSlotBonus integer No
TestTurn integer No
ThoovesGroup group No
ThracianRageDealer group No
ThracianRageLevel real Yes
ThunderArrowLevel real Yes
ThunderHoovesInt integer No
ThunderHydraUnit unit No
ThunderShieldINT integer Yes
TopElite_C unitcode No
TopEliteAstral unitcode No
TopFront_C unitcode No
TopFrontAstral unitcode No
TopRanged_Astral unitcode No
TopRanged_C unitcode No
TormentUnit group No
totalAllocs integer No
ToThePitGroup group No
TowerAI group No
TowerAttackHero group No
TowerHeroAttacked group No
TowerHeroAttacked_Unit group No
TranquilityINT integer No
TRIGGER_CLEANUP_PERIOD real No
TrueDamage attacktype No
TrueDamageD damagetype No
TrueDamageGroup group No
TrueDamageShow group No
UnburrowCL group No
UnholyIceGroup group No
UNIT_MAX_LIFE real No
UNIT_MIN_LIFE real No
VanishmentAfterInv group No
VanishmentGroup group Yes
VanishmentInteger integer No
VanishmentOriginalUnit group Yes
VanishmentPoint location Yes
VenomstingerPoison group No
VolcanGroup group No
Volcano destructable Yes
VolcanoLastWave group No
VolcanoLava destructable Yes
VolcanoLava2 destructable Yes
VolcanReal real Yes
VolcanTempGroup group No
VolcanUber unit Yes
WarPointIntegerCS integer Yes
WarPointIntIncome integer Yes
WarShopAD_INT integer Yes
WarShopSP_INT integer Yes
WarStompItem itemcode Yes
WaveCrushingAngle real Yes
WaveTempestAngle real Yes
WaveTime3 integer No
WolvesA1 unit No
WolvesA2 unit No
WolvesA3 unit No
WolvesC_C1 unit No
WolvesC_C2 unit No
WolvesC_C3 unit No
WolvesTimerA timer No
WolvesTimerC timer No
WyrmA1 unit No
WyrmA2 unit No
WyrmA3 unit No
WyrmC_C1 unit No
WyrmC_C2 unit No
WyrmC_C3 unit No
WyrmTimerA timer No
WyrmTimerC timer No
WyvernA1 unit No
WyvernA2 unit No
WyvernA3 unit No
WyvernC1 unit No
WyvernC2 unit No
WyvernC3 unit No
WyvernTimerA timer No
WyvernTimerC timer No
ZAngleFieryRay real Yes
ZDummyUnit unit No
LH Loop
  Events
  Conditions
  Actions
    Custom script: local real x1
    Custom script: local real y1
    Custom script: local real z1
    Custom script: local real x2
    Custom script: local real y2
    Custom script: local real z2
    For each (Integer LH_CurrentIndex) from 1 to LH_MaxIndex, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            LH_UnitSource[LH_CurrentIndex] Not equal to No unit
          Then - Actions
            Custom script: set x1 = GetUnitX(udg_LH_UnitSource[udg_LH_CurrentIndex])
            Custom script: set y1 = GetUnitY(udg_LH_UnitSource[udg_LH_CurrentIndex])
            Custom script: call MoveLocation(udg_LH_Location, x1, y1)
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (LH_UnitSource[LH_CurrentIndex] is A ground unit) Equal to True
              Then - Actions
                Custom script: set z1 = GetLocationZ(udg_LH_Location) + udg_LH_UnitZ
              Else - Actions
                Custom script: set z1 = GetLocationZ(udg_LH_Location) + GetUnitFlyHeight(udg_LH_UnitSource[udg_LH_CurrentIndex])
          Else - Actions
            Custom script: set x1 = GetLocationX(udg_LH_PointSource[udg_LH_CurrentIndex])
            Custom script: set y1 = GetLocationY(udg_LH_PointSource[udg_LH_CurrentIndex])
            Custom script: call MoveLocation(udg_LH_Location, x1, y1)
            Custom script: set z1 = GetLocationZ(udg_LH_Location) + udg_LH_PointSourceZ[udg_LH_CurrentIndex]
            -------- For UnitSource Location --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            LH_UnitTarget[LH_CurrentIndex] Not equal to No unit
          Then - Actions
            Custom script: set x2 = GetUnitX(udg_LH_UnitTarget[udg_LH_CurrentIndex])
            Custom script: set y2 = GetUnitY(udg_LH_UnitTarget[udg_LH_CurrentIndex])
            Custom script: call MoveLocation(udg_LH_Location, x2, y2)
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (LH_UnitTarget[LH_CurrentIndex] is A ground unit) Equal to True
              Then - Actions
                Custom script: set z2 = GetLocationZ(udg_LH_Location) + udg_LH_UnitZ
              Else - Actions
                Custom script: set z2 = GetLocationZ(udg_LH_Location) + GetUnitFlyHeight(udg_LH_UnitTarget[udg_LH_CurrentIndex])
          Else - Actions
            Custom script: set x2 = GetLocationX(udg_LH_PointTarget[udg_LH_CurrentIndex])
            Custom script: set y2 = GetLocationY(udg_LH_PointTarget[udg_LH_CurrentIndex])
            Custom script: call MoveLocation(udg_LH_Location, x2, y2)
            Custom script: set z2 = GetLocationZ(udg_LH_Location) + udg_LH_PointTargetZ[udg_LH_CurrentIndex]
            -------- For TargetSource Location --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            LH_Duration[LH_CurrentIndex] Greater than 0.00
          Then - Actions
            Set LH_Duration[LH_CurrentIndex] = (LH_Duration[LH_CurrentIndex] - LH_Interval)
            Set LH_LightningAlpha[LH_CurrentIndex] = (LH_LightningAlpha[LH_CurrentIndex] - LH_LightningFadeInterval[LH_CurrentIndex])
            Custom script: if udg_LH_LightningAlpha[udg_LH_CurrentIndex] < 0.00 then
            Custom script: set udg_LH_Duration[udg_LH_CurrentIndex] = -0.01
            Custom script: else
            Custom script: call MoveLightningEx(udg_LH_Lightning[udg_LH_CurrentIndex], true, x1, y1, z1, x2, y2, z2)
            -------- ShadowRayConfig --------
            Custom script: call SetLightningColor(udg_LH_Lightning_ShadowRay[udg_LH_CurrentIndex], 0.25, 0.00, 1.00, udg_LH_LightningAlpha[udg_LH_CurrentIndex])
            -------- FireShoot --------
            Custom script: call SetLightningColor(udg_LH_Lightning_FireShoot[udg_LH_CurrentIndex], 1.00, 0.60, 0.10, udg_LH_LightningAlpha[udg_LH_CurrentIndex])
            -------- GreenRay --------
            Custom script: call SetLightningColor(udg_LH_Lightning_GreenRay[udg_LH_CurrentIndex], 0.15, 1.00, 0.30, udg_LH_LightningAlpha[udg_LH_CurrentIndex])
            Custom script: endif
          Else - Actions
            Lightning - Destroy LH_Lightning[LH_CurrentIndex]
            Custom script: call RemoveLocation(udg_LH_PointSource[udg_LH_CurrentIndex])
            Custom script: call RemoveLocation(udg_LH_PointTarget[udg_LH_CurrentIndex])
            -------- CustomLH --------
            Set LH_Lightning_GreenRay[LH_CurrentIndex] = LH_Lightning_GreenRay[LH_MaxIndex]
            Set LH_Lightning_ShadowRay[LH_CurrentIndex] = LH_Lightning_ShadowRay[LH_MaxIndex]
            Set LH_Lightning_FireShoot[LH_CurrentIndex] = LH_Lightning_FireShoot[LH_MaxIndex]
            -------- ... --------
            Set LH_PointSource[LH_CurrentIndex] = LH_PointSource[LH_MaxIndex]
            Set LH_PointTarget[LH_CurrentIndex] = LH_PointTarget[LH_MaxIndex]
            Set LH_Duration[LH_CurrentIndex] = LH_Duration[LH_MaxIndex]
            Set LH_Lightning[LH_CurrentIndex] = LH_Lightning[LH_MaxIndex]
            Set LH_UnitSource[LH_CurrentIndex] = LH_UnitSource[LH_MaxIndex]
            Set LH_UnitTarget[LH_CurrentIndex] = LH_UnitTarget[LH_MaxIndex]
            Set LH_PointSourceZ[LH_CurrentIndex] = LH_PointSourceZ[LH_MaxIndex]
            Set LH_PointTargetZ[LH_CurrentIndex] = LH_PointTargetZ[LH_MaxIndex]
            Set LH_LightningName[LH_CurrentIndex] = LH_LightningName[LH_MaxIndex]
            Set LH_LightningAlpha[LH_CurrentIndex] = LH_LightningAlpha[LH_MaxIndex]
            Set LH_LightningFadeInterval[LH_CurrentIndex] = LH_LightningFadeInterval[LH_MaxIndex]
            Set LH_CurrentIndex = (LH_CurrentIndex - 1)
            Set LH_MaxIndex = (LH_MaxIndex - 1)
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                LH_MaxIndex Equal to 0
              Then - Actions
                Trigger - Turn off (This trigger)
              Else - Actions
Default melee game initialization for all players
LH Setup
  Events
    Map initialization
  Conditions
  Actions
    -------- ---------- --------
    -------- DATA CONFIGURABLE --------
    -------- LH_UnitZ = The Z adjustment to unit that is classified as Ground Unit (so that the Lightning do not created at base of the unit) --------
    Set LH_UnitZ = 60.00
    -------- END OF CONFIGURABLE --------
    -------- ---------- --------
    -------- LIGHTNING NAME --------
    -------- CLPB - CHAIN LIGHTNING PRIMARY --------
    -------- CLSB - CHAIN LIGHTNING SECONDARY --------
    -------- DRAB - DRAIN --------
    -------- DRAL - DRAIN LIFE --------
    -------- DRAM - DRAIN MANA --------
    -------- AFOD - FINGER OF DEATH --------
    -------- FORK - FORKED LIGHTNING --------
    -------- HWPB - HEALING WAVE PRIMARY --------
    -------- HWSB - HEALING WAVE SECONDARY --------
    -------- CHIM - LIGHTNING ATTACK --------
    -------- LEAS - MAGIC LEASH --------
    -------- MBUR - MANA BURN --------
    -------- MFPB - MANA FLARE --------
    -------- SPLK - SPIRIT LINK --------
    -------- ---------- --------
    -------- AT ALL TIME, YOU MUST INCLUDE THESE 3 VARIABLES --------
    -------- LH_MaxIndex = LH_MaxIndex + 1 --------
    -------- LH_Duration[LH_MaxIndex] = Duration of the Lightning --------
    -------- LH_LightningName[LH_MaxIndex] = The name of your Lightning (refer above list) --------
    -------- ---------- --------
    -------- DO NOT TOUCH THIS IF YOU DON'T KNOW WHAT YOU ARE DOING --------
    Set LH_CurrentIndex = 0
    Set LH_Location = (Center of (Playable map area))
    Set LH_Interval = 0.03
    Trigger - Add to LH_Loop <gen> the event (Every LH_Interval seconds of game time)
    -------- INSTRUCTIONS --------
    -------- ---------- --------
    -------- Requirement for Unit2Unit function --------
    -------- ---------- --------
    -------- LH_DurationSet = The duration of the Lightning --------
    -------- LH_LightningNameSet = The name of the Lighting --------
    -------- LH_UnitSourceSet = The source of the Lightning starts from this unit --------
    -------- LH_UnitTargetSet = The target of the Lightning from source to this unit --------
    -------- ---------- --------
    -------- Requirement for Unit2Point function --------
    -------- LH_DurationSet = The duration of the Lightning --------
    -------- LH_LightningNameSet = The name of the Lighting --------
    -------- LH_PointTargetZSet = The Z height of your lightning at target point --------
    -------- LH_UnitSourceSet = The Lightning (Source) is attached to this unit --------
    -------- LH_PointTargetSet = The Lightning (Target) is attached to this point --------
    -------- ---------- --------
    -------- Requirement for Point2Unit function --------
    -------- LH_DurationSet = The duration of the Lightning --------
    -------- LH_LightningNameSet = The name of the Lighting --------
    -------- LH_PointSourceZSet = The Z height of Lightning at Source --------
    -------- LH_PointSourceSet = The Lightning (Source) is attached to this point --------
    -------- LH_UnitTargetSet = The Lightning (Target) is attached to this unit --------
    -------- ---------- --------
    -------- Requirement for Point2Point function --------
    -------- LH_DurationSet = The duration of the Lightning --------
    -------- LH_LightningNameSet = The name of the Lighting --------
    -------- LH_PointSourceZSet = The Z height of Lightning at Source --------
    -------- LH_PointTargetZSet = The Z height of Lightning at Target --------
    -------- LH_PointSourceSet = The Lightning (Source) is attached to this point --------
    -------- LH_PointTargetSet = The Lightning (Target) is attached to this point --------
    -------- ---------- --------
LH Unit2Unit
  Events
  Conditions
  Actions
    Custom script: local real x1
    Custom script: local real y1
    Custom script: local real z1
    Custom script: local real x2
    Custom script: local real y2
    Custom script: local real z2
    Set LH_MaxIndex = (LH_MaxIndex + 1)
    Set LH_Duration[LH_MaxIndex] = LH_DurationSet
    Set LH_LightningName[LH_MaxIndex] = LH_LightningNameSet
    Set LH_UnitSource[LH_MaxIndex] = LH_UnitSourceSet
    Set LH_UnitTarget[LH_MaxIndex] = LH_UnitTargetSet
    Set LH_LightningFadeInterval[LH_MaxIndex] = ((1.00 / LH_DurationSet) x LH_Interval)
    Set LH_LightningAlpha[LH_MaxIndex] = 1.00
    Custom script: set x1 = GetUnitX(udg_LH_UnitSource[udg_LH_MaxIndex])
    Custom script: set y1 = GetUnitY(udg_LH_UnitSource[udg_LH_MaxIndex])
    Custom script: call MoveLocation(udg_LH_Location, x1, y1)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (LH_UnitSource[LH_MaxIndex] is A ground unit) Equal to True
      Then - Actions
        Custom script: set z1 = GetLocationZ(udg_LH_Location) + udg_LH_UnitZ
      Else - Actions
        Custom script: set z1 = GetLocationZ(udg_LH_Location) + GetUnitFlyHeight(udg_LH_UnitSource[udg_LH_MaxIndex])
    Custom script: set x2 = GetUnitX(udg_LH_UnitTarget[udg_LH_MaxIndex])
    Custom script: set y2 = GetUnitY(udg_LH_UnitTarget[udg_LH_MaxIndex])
    Custom script: call MoveLocation(udg_LH_Location, x2, y2)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (LH_UnitTarget[LH_MaxIndex] is A ground unit) Equal to True
      Then - Actions
        Custom script: set z2 = GetLocationZ(udg_LH_Location) + udg_LH_UnitZ
      Else - Actions
        Custom script: set z2 = GetLocationZ(udg_LH_Location) + GetUnitFlyHeight(udg_LH_UnitTarget[udg_LH_MaxIndex])
    Custom script: set udg_LH_Lightning[udg_LH_MaxIndex] = AddLightningEx(udg_LH_LightningName[udg_LH_MaxIndex], true, x1, y1, z1, x2, y2, z2)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        LHBoonlean_ShadowRay Equal to True
      Then - Actions
        Custom script: set udg_LH_Lightning_ShadowRay[udg_LH_MaxIndex] = udg_LH_Lightning[udg_LH_MaxIndex]
        Set LHBoonlean_ShadowRay = False
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        LHBoonlean_FireShoot Equal to True
      Then - Actions
        Custom script: set udg_LH_Lightning_FireShoot[udg_LH_MaxIndex] = udg_LH_Lightning[udg_LH_MaxIndex]
        Set LHBoonlean_FireShoot = False
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        LHBoonlean_GreenRay Equal to True
      Then - Actions
        Custom script: set udg_LH_Lightning_GreenRay[udg_LH_MaxIndex] = udg_LH_Lightning[udg_LH_MaxIndex]
        Set LHBoonlean_FireShoot = False
      Else - Actions
    Trigger - Turn on LH_Loop <gen>
LH Unit2Point
  Events
  Conditions
  Actions
    Custom script: local real x1
    Custom script: local real y1
    Custom script: local real z1
    Custom script: local real x2
    Custom script: local real y2
    Custom script: local real z2
    Set LH_MaxIndex = (LH_MaxIndex + 1)
    Set LH_Duration[LH_MaxIndex] = LH_DurationSet
    Set LH_LightningName[LH_MaxIndex] = LH_LightningNameSet
    Set LH_PointTargetZ[LH_MaxIndex] = LH_PointTargetZSet
    Set LH_UnitSource[LH_MaxIndex] = LH_UnitSourceSet
    Set LH_PointTarget[LH_MaxIndex] = LH_PointTargetSet
    Set LH_LightningFadeInterval[LH_MaxIndex] = ((1.00 / LH_DurationSet) x LH_Interval)
    Set LH_LightningAlpha[LH_MaxIndex] = 1.00
    Custom script: set x1 = GetUnitX(udg_LH_UnitSource[udg_LH_MaxIndex])
    Custom script: set y1 = GetUnitY(udg_LH_UnitSource[udg_LH_MaxIndex])
    Custom script: call MoveLocation(udg_LH_Location, x1, y1)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (LH_UnitSource[LH_MaxIndex] is A ground unit) Equal to True
      Then - Actions
        Custom script: set z1 = GetLocationZ(udg_LH_Location) + udg_LH_UnitZ
      Else - Actions
        Custom script: set z1 = GetLocationZ(udg_LH_Location) + GetUnitFlyHeight(udg_LH_UnitSource[udg_LH_MaxIndex])
    Set LH_UnitTarget[LH_MaxIndex] = No unit
    Custom script: set x2 = GetLocationX(udg_LH_PointTarget[udg_LH_MaxIndex])
    Custom script: set y2 = GetLocationY(udg_LH_PointTarget[udg_LH_MaxIndex])
    Custom script: call MoveLocation(udg_LH_Location, x2, y2)
    Custom script: set z2 = GetLocationZ(udg_LH_Location) + udg_LH_PointTargetZ[udg_LH_MaxIndex]
    Custom script: set udg_LH_Lightning[udg_LH_MaxIndex] = AddLightningEx(udg_LH_LightningName[udg_LH_MaxIndex], true, x1, y1, z1, x2, y2, z2)
    Trigger - Turn on LH_Loop <gen>
LH Point2Unit
  Events
  Conditions
  Actions
    Custom script: local real x1
    Custom script: local real y1
    Custom script: local real z1
    Custom script: local real x2
    Custom script: local real y2
    Custom script: local real z2
    Set LH_MaxIndex = (LH_MaxIndex + 1)
    Set LH_Duration[LH_MaxIndex] = LH_DurationSet
    Set LH_LightningName[LH_MaxIndex] = LH_LightningNameSet
    Set LH_PointSourceZ[LH_MaxIndex] = LH_PointSourceZSet
    Set LH_PointSource[LH_MaxIndex] = LH_PointSourceSet
    Set LH_UnitTarget[LH_MaxIndex] = LH_UnitTargetSet
    Set LH_LightningFadeInterval[LH_MaxIndex] = ((1.00 / LH_DurationSet) x LH_Interval)
    Set LH_LightningAlpha[LH_MaxIndex] = 1.00
    Set LH_UnitSource[LH_MaxIndex] = No unit
    Custom script: set x1 = GetLocationX(udg_LH_PointSource[udg_LH_MaxIndex])
    Custom script: set y1 = GetLocationY(udg_LH_PointSource[udg_LH_MaxIndex])
    Custom script: call MoveLocation(udg_LH_Location, x1, y1)
    Custom script: set z1 = GetLocationZ(udg_LH_Location) + udg_LH_PointSourceZ[udg_LH_MaxIndex]
    Custom script: set x2 = GetUnitX(udg_LH_UnitTarget[udg_LH_MaxIndex])
    Custom script: set y2 = GetUnitY(udg_LH_UnitTarget[udg_LH_MaxIndex])
    Custom script: call MoveLocation(udg_LH_Location, x2, y2)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (LH_UnitTarget[LH_MaxIndex] is A ground unit) Equal to True
      Then - Actions
        Custom script: set z2 = GetLocationZ(udg_LH_Location) + udg_LH_UnitZ
      Else - Actions
        Custom script: set z2 = GetLocationZ(udg_LH_Location) + GetUnitFlyHeight(udg_LH_UnitTarget[udg_LH_MaxIndex])
    Custom script: set udg_LH_Lightning[udg_LH_MaxIndex] = AddLightningEx(udg_LH_LightningName[udg_LH_MaxIndex], true, x1, y1, z1, x2, y2, z2)
    Trigger - Turn on LH_Loop <gen>
LH Point2Point
  Events
  Conditions
  Actions
    Custom script: local real x1
    Custom script: local real y1
    Custom script: local real z1
    Custom script: local real x2
    Custom script: local real y2
    Custom script: local real z2
    Set LH_MaxIndex = (LH_MaxIndex + 1)
    Set LH_Duration[LH_MaxIndex] = LH_DurationSet
    Set LH_LightningName[LH_MaxIndex] = LH_LightningNameSet
    Set LH_PointSourceZ[LH_MaxIndex] = LH_PointSourceZSet
    Set LH_PointTargetZ[LH_MaxIndex] = LH_PointTargetZSet
    Set LH_PointSource[LH_MaxIndex] = LH_PointSourceSet
    Set LH_PointTarget[LH_MaxIndex] = LH_PointTargetSet
    Set LH_LightningFadeInterval[LH_MaxIndex] = ((1.00 / LH_DurationSet) x LH_Interval)
    Set LH_LightningAlpha[LH_MaxIndex] = 1.00
    Set LH_UnitSource[LH_MaxIndex] = No unit
    Custom script: set x1 = GetLocationX(udg_LH_PointSource[udg_LH_MaxIndex])
    Custom script: set y1 = GetLocationY(udg_LH_PointSource[udg_LH_MaxIndex])
    Custom script: call MoveLocation(udg_LH_Location, x1, y1)
    Custom script: set z1 = GetLocationZ(udg_LH_Location) + udg_LH_PointSourceZ[udg_LH_MaxIndex]
    Set LH_UnitTarget[LH_MaxIndex] = No unit
    Custom script: set x2 = GetLocationX(udg_LH_PointTarget[udg_LH_MaxIndex])
    Custom script: set y2 = GetLocationY(udg_LH_PointTarget[udg_LH_MaxIndex])
    Custom script: call MoveLocation(udg_LH_Location, x2, y2)
    Custom script: set z2 = GetLocationZ(udg_LH_Location) + udg_LH_PointTargetZ[udg_LH_MaxIndex]
    Custom script: set udg_LH_Lightning[udg_LH_MaxIndex] = AddLightningEx(udg_LH_LightningName[udg_LH_MaxIndex], true, x1, y1, z1, x2, y2, z2)
    Trigger - Turn on LH_Loop <gen>
U2U FieryRay
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to Fiery Ray (Neutral Hostile)
  Actions
    Set LH_LightningNameSet = FORK
    Set LH_UnitSourceSet = (Triggering unit)
    Set LH_DurationSet = 1.25
    Set LH_UnitTargetSet = (Target unit of ability being cast)
    Set LHBoonlean_FireShoot = True
    Trigger - Run LH_Unit2Unit <gen> (ignoring conditions)
UNIT TO POINT
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to SET_MAX_LIFE
  Actions
    -------- ---------- --------
    -------- Requirement for Unit2Point function --------
    -------- LH_DurationSet = The duration of the Lightning --------
    -------- LH_LightningNameSet = The name of the Lighting --------
    -------- LH_PointTargetZSet = The Z height of your lightning at target point --------
    -------- LH_UnitSourceSet = The Lightning (Source) is attached to this unit --------
    -------- LH_PointTargetSet = The Lightning (Target) is attached to this point --------
    -------- ---------- --------
    Set LH_DurationSet = 5.00
    Set LH_LightningNameSet = CLPB
    Set LH_PointTargetZSet = 600.00
    Set LH_UnitSourceSet = (Triggering unit)
    Set LH_PointTargetSet = (Target point of ability being cast)
    -------- ---------- --------
    Trigger - Run LH_Unit2Point <gen> (ignoring conditions)
POINT TO UNIT
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to TeamGlow
  Actions
    -------- ---------- --------
    -------- Requirement for Point2Unit function --------
    -------- LH_DurationSet = The duration of the Lightning --------
    -------- LH_LightningNameSet = The name of the Lighting --------
    -------- LH_PointSourceZSet = The Z height of Lightning at Source --------
    -------- LH_PointSourceSet = The Lightning (Source) is attached to this point --------
    -------- LH_UnitTargetSet = The Lightning (Target) is attached to this unit --------
    Set LH_DurationSet = 5.00
    Set LH_LightningNameSet = SPLK
    Set LH_PointSourceZSet = 1000.00
    Set LH_PointSourceSet = ((Position of (Triggering unit)) offset by (Random real number between 0 and 600.00) towards (Random angle) degrees)
    Set LH_UnitTargetSet = (Triggering unit)
    -------- ---------- --------
    Trigger - Run LH_Point2Unit <gen> (ignoring conditions)
POINT TO POINT
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to ShrapnelAttackRifleman
  Actions
    -------- ---------- --------
    -------- Requirement for Point2Point function --------
    -------- LH_DurationSet = The duration of the Lightning --------
    -------- LH_LightningNameSet = The name of the Lighting --------
    -------- LH_PointSourceZSet = The Z height of Lightning at Source --------
    -------- LH_PointTargetZSet = The Z height of Lightning at Target --------
    -------- LH_PointSourceSet = The Lightning (Source) is attached to this point --------
    -------- LH_PointTargetSet = The Lightning (Target) is attached to this point --------
    Set LH_DurationSet = 5.00
    Set LH_LightningNameSet = MFPB
    Set LH_PointSourceZSet = (Random real number between 0 and 1000.00)
    Set LH_PointTargetZSet = (Random real number between 0 and 1000.00)
    Set LH_PointSourceSet = ((Position of (Triggering unit)) offset by (Random real number between 0 and 600.00) towards (Random angle) degrees)
    Set LH_PointTargetSet = ((Position of (Triggering unit)) offset by (Random real number between 0 and 600.00) towards (Random angle) degrees)
    -------- ---------- --------
    Trigger - Run LH_Point2Point <gen> (ignoring conditions)
OnDeath
  Events
    Unit - A unit Dies
  Conditions
  Actions
    Trigger - Run DeathMaskKill <gen> (checking conditions)
    Trigger - Run DummyDeath <gen> (checking conditions)
    Trigger - Run TowerDeathGoldBounty <gen> (checking conditions)
    Trigger - Run TowerDeathSettingsABOT <gen> (checking conditions)
    Trigger - Run TowerDeathSettingsAMID <gen> (checking conditions)
    Trigger - Run TowerDeathSettingsATOP <gen> (checking conditions)
    Trigger - Run TowerDeathSettingsCBOT <gen> (checking conditions)
    Trigger - Run TowerDeathSettingsCMID <gen> (checking conditions)
    Trigger - Run TowerDeathSettingsCTOP <gen> (checking conditions)
    Trigger - Run WinLostTrigger <gen> (checking conditions)
    Trigger - Run CS_Increment <gen> (checking conditions)
    Trigger - Run Ghoul_Death <gen> (checking conditions)
    Trigger - Run DrakeRunTimerA <gen> (checking conditions)
    Trigger - Run DrakeRunTimerC <gen> (checking conditions)
    Trigger - Run GolemRunTimerA <gen> (checking conditions)
    Trigger - Run GolemRunTimerC <gen> (checking conditions)
    Trigger - Run SpiderRunTimerA <gen> (checking conditions)
    Trigger - Run SpiderRunTimerC <gen> (checking conditions)
    Trigger - Run WyrmRunTimerA <gen> (checking conditions)
    Trigger - Run WyrmRunTimerC <gen> (checking conditions)
    Trigger - Run WyvernRunTimerA <gen> (checking conditions)
    Trigger - Run WyvernRunTimerC <gen> (checking conditions)
    Trigger - Run EagleCampRunTimerA <gen> (checking conditions)
    Trigger - Run EagleCampRunTimerC <gen> (checking conditions)
    Trigger - Run PrimRunTimerA <gen> (checking conditions)
    Trigger - Run PrimRunTimerC <gen> (checking conditions)
    Trigger - Run HydraKill <gen> (checking conditions)
    Trigger - Run PrimigenianTentsDeath <gen> (checking conditions)
    Trigger - Run PrimigenianTentsDeath_A <gen> (checking conditions)
    Trigger - Run Bounties <gen> (checking conditions)
    Trigger - Run FuryKillHeroes <gen> (checking conditions)
    Trigger - Run HeroDiesDUHDUH <gen> (checking conditions)
    Trigger - Run HeroKillBounty <gen> (checking conditions)
    Trigger - Run HeroKillBounty_Cheat <gen> (checking conditions)
    Trigger - Run HeroKillBountyDuel <gen> (checking conditions)
    Trigger - Run DissipationEnd <gen> (checking conditions)
    Trigger - Run JuglerPotCharge <gen> (checking conditions)
    Trigger - Run JuglerPotCharge2 <gen> (checking conditions)
    Trigger - Run EnduranceShoesKill <gen> (checking conditions)
    Trigger - Run SpiritCorrupterKill <gen> (checking conditions)
    Trigger - Run MaledictumKill <gen> (checking conditions)
    Trigger - Run CelureanBladeKill <gen> (checking conditions)
    Trigger - Run ScarletLadyHeroKill <gen> (checking conditions)
    Trigger - Run LawOfTheDamnedHeroKill <gen> (checking conditions)
    Trigger - Run GreedyTakerKill <gen> (checking conditions)
    Trigger - Run PhoenixSpiritArt <gen> (checking conditions)
    Trigger - Run ExplosiveBarrel <gen> (checking conditions)
    Trigger - Run RiftKill <gen> (checking conditions)
    Trigger - Run SpawnFliesKill <gen> (checking conditions)
    Trigger - Run CLordDeath <gen> (checking conditions)
    Trigger - Run BeetlesDie <gen> (checking conditions)
    Trigger - Run CharmedHeroKilled <gen> (checking conditions)
    Trigger - Run BurstKill <gen> (checking conditions)
    Trigger - Run MoltenSkinDeath <gen> (checking conditions)
    Trigger - Run MassTPAssistanceEff <gen> (checking conditions)
    Trigger - Run LichKillPas <gen> (checking conditions)
    Trigger - Run LichKillPasDamage <gen> (checking conditions)
    Trigger - Run DarkRitualKill <gen> (checking conditions)
    Trigger - Run Snake_Eyes_Kill <gen> (checking conditions)
    Trigger - Run BowrunnerAgiKill <gen> (checking conditions)
    Trigger - Run ThunderOrbDeath <gen> (checking conditions)
    Trigger - Run GhostCoilKill <gen> (checking conditions)
    Trigger - Run GhostCoilIllusionDeath <gen> (checking conditions)
    Trigger - Run DeathsongKill <gen> (checking conditions)
    Trigger - Run DeathsongRemove <gen> (checking conditions)
    Trigger - Run ToThePitBaseReturn <gen> (checking conditions)
    Trigger - Run HorrendousKill <gen> (checking conditions)
    Trigger - Run AOEDummyMagicDamage <gen> (checking conditions)
    Trigger - Run ShadowCaptureTrueRemove_2 <gen> (checking conditions)
    Trigger - Run ShadowCaptureTrueRemove <gen> (checking conditions)
Changes Owner
  Events
    Unit - A unit Changes owner
  Conditions
  Actions
    Trigger - Run DrakeRunTimerA <gen> (checking conditions)
    Trigger - Run DrakeRunTimerC <gen> (checking conditions)
    Trigger - Run GolemRunTimerA <gen> (checking conditions)
    Trigger - Run GolemRunTimerC <gen> (checking conditions)
    Trigger - Run SpiderRunTimerA <gen> (checking conditions)
    Trigger - Run SpiderRunTimerC <gen> (checking conditions)
    Trigger - Run WyrmRunTimerA <gen> (checking conditions)
    Trigger - Run WyrmRunTimerC <gen> (checking conditions)
    Trigger - Run WyvernRunTimerA <gen> (checking conditions)
    Trigger - Run WyvernRunTimerC <gen> (checking conditions)
    Trigger - Run EagleCampRunTimerA <gen> (checking conditions)
    Trigger - Run EagleCampRunTimerC <gen> (checking conditions)
    Trigger - Run PrimRunTimerA <gen> (checking conditions)
    Trigger - Run PrimRunTimerC <gen> (checking conditions)
OnAttack
  Events
    Unit - A unit Is attacked
  Conditions
  Actions
    Trigger - Run RejuvEFF <gen> (checking conditions)
    Trigger - Run OnAttackVolcanoDPS <gen> (checking conditions)
    Trigger - Run AttackReturnVengeances <gen> (checking conditions)
    Trigger - Run JainaAttackOrders <gen> (checking conditions)
    Trigger - Run TowerAttackHeroes <gen> (checking conditions)
    Trigger - Run TowerAttackHeroesAnullate <gen> (checking conditions)
    Trigger - Run LifeDrainDamage <gen> (checking conditions)
    Trigger - Run EluneBleed <gen> (checking conditions)
    Trigger - Run FireAttackJaina <gen> (checking conditions)
    Trigger - Run FrostArrowDamage <gen> (checking conditions)
    Trigger - Run Eternitys_Sting_Damage <gen> (checking conditions)
    Trigger - Run AttackAoE_Vengeances <gen> (checking conditions)
    Trigger - Run HellChargeDamage <gen> (checking conditions)
    Trigger - Run HauntedExplosion <gen> (checking conditions)
    Trigger - Run TormentEffect <gen> (checking conditions)
    Trigger - Run PrimigenianOffspring_Attack <gen> (checking conditions)
    Trigger - Run PrimigenianOffspring_Attack_A <gen> (checking conditions)
    Trigger - Run ShadowCaptureAttack <gen> (checking conditions)
    Trigger - Run RedFury_ColorControl <gen> (checking conditions)
Begins Casting
  Events
  Conditions
  Actions
Starts Casting
  Events
  Conditions
  Actions
Finishes Casting
  Events
  Conditions
  Actions
Order No Target
  Events
  Conditions
  Actions
Order Point
  Events
  Conditions
  Actions
Order Target
  Events
  Conditions
  Actions
Enters Region
  Events
  Conditions
  Actions
Leaves Region
  Events
  Conditions
  Actions
ElapsedGameTime 1
  Events
  Conditions
  Actions
Sells Unit
  Events
  Conditions
  Actions
Sells Item
  Events
  Conditions
  Actions
Learns Skill
  Events
  Conditions
  Actions
Uses an Item
  Events
  Conditions
  Actions
Timer Expires
  Events
  Conditions
  Actions
Events005
  Events
    Time - Every 0.05 seconds of game time
  Conditions
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        TempDevilOne Not equal to No unit
      Then - Actions
        Unit - Remove All buffs from TempDevilOne
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Number of units in DarkStarGroup) Greater than 0
      Then - Actions
        Unit Group - Pick every unit in DarkStarGroup and do (Actions)
          Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                ((Picked unit) has buff Berserk) Equal to False
              Then - Actions
                Animation - Change (Picked unit)'s vertex coloring to (100%, 100%, 100%) with 0% transparency
                Unit - Set life of (Picked unit) to (Max life of (Picked unit))
                Set Temp_Point = (Position of (Picked unit))
                Unit - Cause (Picked unit) to damage circular area after 0 seconds of radius 600.00 at Temp_Point, dealing 0.40 damage of attack type Spells and damage type Universal
                Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Undead\Unsummon\UnsummonTarget.mdl
                Special Effect - Destroy (Last created special effect)
                Special Effect - Create a special effect at Temp_Point using Objects\Spawnmodels\Undead\UDeathMedium\UDeath.mdl
                Special Effect - Destroy (Last created special effect)
                Custom script: call RemoveLocation (udg_Temp_Point)
                Unit Group - Remove (Picked unit) from DarkStarGroup
              Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        GraveCall_INT Greater than 0
      Then - Actions
        Set Temp_Group = (Units in (Entire map) matching (((Matching unit) has buff Animate Dead) Equal to True))
        Unit Group - Pick every unit in Temp_Group and do (Actions)
          Loop - Actions
            Set Temp_Point = (Position of (Picked unit))
            Unit - Explode (Picked unit)
            Unit - Create 1 Zombie for (Owner of (Picked unit)) at Temp_Point facing Temp_Point
            Unit - Add a 60.00 second Generic expiration timer to (Last created unit)
            Custom script: call RemoveLocation (udg_Temp_Point)
        Custom script: call DestroyGroup (udg_Temp_Group)
        Set GraveCall_INT = (GraveCall_INT - 1)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Number of units in DizzyAddGroup) Greater than 0
      Then - Actions
        Unit Group - Pick every unit in DizzyAddGroup and do (Actions)
          Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                ((Picked unit) has buff Dizziness) Equal to True
              Then - Actions
                Unit Group - Remove (Picked unit) from DizzyAddGroup
              Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    ((Picked unit) is alive) Equal to True
                    (Life of (Picked unit)) Greater than 0.00
                  Then - Actions
                    Hero - Create RuneDizzy and give it to (Picked unit)
                  Else - Actions
                    Unit Group - Remove (Picked unit) from DizzyAddGroup
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Number of units in AACryptLordGroup) Greater than 0
      Then - Actions
        Unit Group - Pick every unit in AACryptLordGroup and do (Actions)
          Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                ((Picked unit) is in UnburrowCL) Equal to False
                (Unit-type of (Picked unit)) Equal to Crypt Lord Burrow
              Then - Actions
                Animation - Play (Picked unit)'s morph animation
                Animation - Change (Picked unit)'s animation speed to 1000000.00% of its original speed
              Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                ((Picked unit) is in UnburrowCL) Equal to True
                (Unit-type of (Picked unit)) Equal to Crypt Lord
              Then - Actions
                Animation - Reset (Picked unit)'s animation
                Animation - Remove the defend animation tag to (Picked unit)
                Unit Group - Remove (Picked unit) from UnburrowCL
              Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        StormSphereINT Greater than 0
      Then - Actions
        Set Temp_Group = (Units of type DummyAttacker ThunderOrb)
        Unit Group - Pick every unit in Temp_Group and do (Actions)
          Loop - Actions
            Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) + 4)
            Set Temp_Ap = (Real((Custom value of (Picked unit))))
            Animation - Change (Picked unit)'s size to (Temp_Ap%, Temp_Ap%, Temp_Ap%) of its original size
        Custom script: call DestroyGroup (udg_Temp_Group)
        Set StormSphereINT = (StormSphereINT - 1)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Number of units in LongShotSource) Greater than 0
      Then - Actions
        Unit Group - Pick every unit in LongShotSource and do (Actions)
          Loop - Actions
            Set Temp_Int = (Player number of (Owner of (Picked unit)))
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                LongShotINT[Temp_Int] Greater than or equal to 1
              Then - Actions
                Set LongShotTime[Temp_Int] = (LongShotTime[Temp_Int] + 5)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    LongShotINT[Temp_Int] Equal to 1
                    LongShotTime[Temp_Int] Greater than or equal to 52
                  Then - Actions
                    Unit - Order (Picked unit) to Stop
                  Else - Actions
              Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (LongShotTarget[Temp_Int] is visible to (Owner of (Picked unit))) Equal to False
              Then - Actions
                Unit - Order (Picked unit) to Stop
              Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Number of units in BlindedGroup) Greater than 0
      Then - Actions
        Unit Group - Pick every unit in BlindedGroup and do (Actions)
          Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                ((Picked unit) has buff Curse) Equal to True
              Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    ((Picked unit) is A Hero) Equal to True
                    ((Picked unit) is an illusion) Equal to False
                  Then - Actions
                    Visibility - Create an initially Enabled visibility modifier for (Owner of (Picked unit)) emitting Fog of war across (Entire map)
                    Visibility - Destroy (Last created visibility modifier)
                    Visibility - Create an initially Enabled visibility modifier for (Owner of (Picked unit)) emitting Visibility from (Position of (Picked unit)) to a radius of 300.00
                    Visibility - Destroy (Last created visibility modifier)
                  Else - Actions
              Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    ((Picked unit) is A Hero) Equal to True
                  Then - Actions
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        ((Owner of (Picked unit)) is in AstralsGroup) Equal to True
                      Then - Actions
                        Player Group - Pick every player in AstralsGroup and do (Actions)
                          Loop - Actions
                            Player - For (Picked player), turn Shared vision On toward (Owner of (Picked unit))
                      Else - Actions
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        ((Owner of (Picked unit)) is in CelestialsGroup) Equal to True
                      Then - Actions
                        Player Group - Pick every player in CelestialsGroup and do (Actions)
                          Loop - Actions
                            Player - For (Picked player), turn Shared vision On toward (Owner of (Picked unit))
                      Else - Actions
                  Else - Actions
                Unit Group - Remove (Picked unit) from BlindedGroup
      Else - Actions
Events050
  Events
    Time - Every 0.50 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 UnholyIceGroup) Greater than 0
      Then - Actions
        Unit Group - Pick every unit in UnholyIceGroup and do (Actions)
          Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                ((Picked unit) has buff Berserk) Equal to False
              Then - Actions
                Unit - Remove 1secondTimer (Tornado) from (Picked unit)
                Unit - Remove 00AutoDamage buff from (Picked unit)
                Unit Group - Remove (Picked unit) from UnholyIceGroup
              Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Number of units in StormWyrmKill) Greater than 0
      Then - Actions
        Unit Group - Pick every unit in StormWyrmKill and do (Actions)
          Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                ((Picked unit) is alive) Equal to True
                ((Picked unit) is Polymorphed) Equal to False
              Then - Actions
                Hero - Create Manual of Health and give it to (Picked unit)
                Unit Group - Remove (Picked unit) from StormWyrmKill
              Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Number of units in RedDragonKill) Greater than 0
      Then - Actions
        Unit Group - Pick every unit in RedDragonKill and do (Actions)
          Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                ((Picked unit) is alive) Equal to True
                ((Picked unit) is Polymorphed) Equal to False
              Then - Actions
                Hero - Create AD1 and give it to (Picked unit)
                Unit Group - Remove (Picked unit) from RedDragonKill
              Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Number of units in EvocationGroup) Greater than 0
      Then - Actions
        Unit Group - Pick every unit in EvocationGroup and do (Actions)
          Loop - Actions
            Set Temp_Ap = ((Real((Intelligence of (Picked unit) (Include bonuses)))) + (Real((Custom value of (Picked unit)))))
            Set APRatio = (Temp_Ap x 0.05)
            Set APRatio = (APRatio x 0.50)
            Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (7.50 + APRatio))
            Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + (15.00 + APRatio))
            Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
            Special Effect - Destroy (Last created special effect)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Number of units in ColdShadowGroup) Greater than 0
      Then - Actions
        Unit Group - Pick every unit in ColdShadowGroup and do (Actions)
          Loop - Actions
            Set Temp_Real = (Random real number between 0.25 and 1.00)
            Set Temp_Real = (Temp_Real x 100.00)
            Animation - Change (Picked unit)'s size to (Temp_Real%, Temp_Real%, Temp_Real%) of its original size
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        RejuvenationINT Greater than 0
      Then - Actions
        Set Temp_Group = (Units in (Entire map) matching (((Matching unit) has buff Tranquility (Target)) Equal to True))
        Unit Group - Pick every unit in Temp_Group and do (Actions)
          Loop - Actions
            Set Temp_Point = (Position of (Picked unit))
            Unit - Create 1 DummyAttacker for (Owner of (Picked unit)) at Temp_Point facing Temp_Point
            Unit Group - Add (Last created unit) to HealGroup
            Unit - Cause (Last created unit) to damage (Picked unit), dealing (((((Max life of (Picked unit)) - (Life of (Picked unit))) x 0.03) + ((Max life of (Picked unit)) x 0.01)) + 0.00) damage of attack type HealTypeAttack and damage type HealTypeDamage
            Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
            Custom script: call RemoveLocation (udg_Temp_Point)
        Custom script: call DestroyGroup (udg_Temp_Group)
        Set Temp_Group = (Units in (Entire map) matching (((Matching unit) has buff Tranquility (Target) 2) Equal to True))
        Unit Group - Pick every unit in Temp_Group and do (Actions)
          Loop - Actions
            Set Temp_Point = (Position of (Picked unit))
            Unit - Create 1 DummyAttacker for (Owner of (Picked unit)) at Temp_Point facing Temp_Point
            Unit Group - Add (Last created unit) to HealGroup
            Unit - Cause (Last created unit) to damage (Picked unit), dealing (((((Max life of (Picked unit)) - (Life of (Picked unit))) x 0.06) + ((Max life of (Picked unit)) x 0.01)) + 0.00) damage of attack type HealTypeAttack and damage type HealTypeDamage
            Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
            Custom script: call RemoveLocation (udg_Temp_Point)
        Custom script: call DestroyGroup (udg_Temp_Group)
      Else - Actions
    Custom script: call DestroyGroup (udg_Temp_Group)
Events100
  Events
    Time - Every 1.00 seconds of game time
  Conditions
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        SiegeModeINT Greater than 0
      Then - Actions
        Set Temp_Point = (Position of TempDevilOne)
        Environment - Create Blight for Player 1 (Red) from Temp_Point to a radius of 512.00
        Custom script: call RemoveLocation (udg_Temp_Point)
      Else - Actions
    Trigger - Run DuelTimer <gen> (checking conditions)
    Trigger - Run HeroRelocationDeath <gen> (checking conditions)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Number of units in ToThePitGroup) Greater than 0
      Then - Actions
        Unit Group - Pick every unit in ToThePitGroup and do (Actions)
          Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Unit-type of (Picked unit)) Not equal to DummyNull
                Or - Any (Conditions) are true
                  Conditions
                    (PitSummonPlace <gen> contains (Picked unit)) Equal to False
                    ((Picked unit) is dead) Equal to True
              Then - Actions
                Unit Group - Remove (Picked unit) from ToThePitGroup
              Else - Actions
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ReanimatedFuryInt Greater than 0
      Then - Actions
        Player Group - Pick every player in AllPlayers and do (Actions)
          Loop - Actions
            Set Temp_Group = (Units owned by (Picked player) matching (((Matching unit) has buff Animate Dead) Equal to True))
            Unit Group - Pick every unit in Temp_Group and do (Actions)
              Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    ((Picked unit) has buff Unholy Frenzy) Equal to False
                  Then - Actions
                    Set Temp_Point = (Position of (Picked unit))
                    Unit - Create 1 DummyAttacker for (Picked player) at Temp_Point facing Temp_Point
                    Hero - Create Unholy Frenzy and give it to (Last created unit)
                    Hero - Order (Last created unit) to use (Last created item) on (Picked unit)
                    Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
                    Custom script: call RemoveLocation (udg_Temp_Point)
                  Else - Actions
        Set ReanimatedFuryInt = (ReanimatedFuryInt - 1)
      Else - Actions
Events500
  Events
    Time - Every 7.50 seconds of game time
  Conditions
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        SiegeModeINT Greater than 0
      Then - Actions
        Set Temp_Group = (Units of type Cthullu's Loyalist)
        Unit Group - Pick every unit in Temp_Group and do (Actions)
          Loop - Actions
            Hero - Create 00DivineShieldCthullu and give it to (Picked unit)
      Else - Actions
    Custom script: call DestroyGroup (udg_Temp_Group)
Seconds16 Siegemaster
  Events
    Time - Every 20.00 seconds of game time
  Conditions
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        SiegeModeINT Greater than 0
      Then - Actions
        Set Temp_Point = (Position of TempDevilOne)
        Unit - Order TempDevilOne to Special Archimonde - Dark Portal Temp_Point
        Custom script: call RemoveLocation (udg_Temp_Point)
      Else - Actions
//TESH.scrollpos=32
//TESH.alwaysfold=0
                           <<==>>CUSTOM PROJECTILES SYSTEM<<==>>
                                    <<==>>Ver 1.2c<<==>>
                            <<==>>Created by LeoNguyen112<<==>>

  I. Features:
o Simply create a straight projectile
o Create a projectile with vertical arc (normal missile) or horizontal arc (like
DotA's Wild Axe of Rexxar)
o Create a projectile toward a unit or location
o Can activate following trigger when hit (allow you to create attaching effect)

  II. Installation:
1. Import missiledummy.mdx with contained in this map to your map
2. Create a new dummy which uses the model above and have Harvest ability.
3. Copy triggers: CPS Loop, CPS Creating, CPS Init to your map.
4. In trigger CPS Init, Set CPS_Dummy = "Your missile dummy"

  III. Variables'
Functions:
Projectile_AttackType: attack type of damage
Projectile_Damage: impact damage (real)
Projectile_DamageType: type of impact damage
Projectile_Impact: effect will be created at the impact
Projectile_Model: model of projectile
Projectile_Height: flying height of projectile
Projectile_Size: size (%) of projectile, this value decides both Length, Width, Height.
Projectile_Speed: flying range of projectile every 0.02 second
Projectile_Source: source unit of projectile
Projectile_TargetUnit: target unit of projectile
Projectile_TargetPoint: target point of projectile
Projectile_UnitOrPoint: this value decides target type of projectile
  - True: target type of projectile is unit.
  - False: target type of projectile is point. When it is false, you need to set the
  following variable:
  - Projectile_AoE - decide projectile's area of effect.
  - Projectile_DestroyTree - allow to destroy trees or not (true/false)
Projectile_Trigger: trigger will be activated at the projectile'
s impact
Projectile_HArc: true = projectile will move with horizontal arc, false = without arc.
  Once this value is true, there are variables you need to set:
  - Projectile_HArcWidth: decide arc's width, it also depends on projectile's speed
  - Projectile_HArcLeftOrRight: true = left, false = right
Projectile_VArc: true = projectile will move with vertical arc, false = without arc.
  Once this value is true, there is a variable you need to set:
  - Projectile_VArcHeight: decide arc's height, it also depend on projectile's speed
 
  IV. How to Use:
1. You need 1 trigger to set all (or what neccesary) variables above, then run
CPS Creating by using:
   "Custom script:   call TriggerExecute( gg_trg_CPS_Creating )"
2. To use a following trigger:
  a) You can use directly stored Projectile System's data through those variables:
   + SPSD_Caster
   + SPSD_TargetUnit
   + SPSD_TargetPoint (it'
s unnecessary to remove leak this variable, because the
   system will automatically do it)
  b) In my onpinion, you should set those variables above into yours own and then use
  it normally:
   + Set ABC_Caster = SPSD_Caster
   + Set ABC_Target = SPSD_TargetUnit
   + Set ABC_Point = SPSD_TargetPoint
         (ABC is your spell's name)
3. See "Example Spells" - "Frost Arrow / Immolation Arrow Spell" if you need some
example about how to use following trigger.

  V. Special Thanks to:
    o redscores for the dummy model.
    o Magtheridon96 for useful tips.
    o GhostHunter123
    o Almia
CPS Loop
  Events
    Time - Every 0.03 seconds of game time
  Conditions
  Actions
    Set CPS_Off = True
    For each (Integer CPS_Loop) from 1 to CPS_MUI, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            CPS_Missile[CPS_Loop] Not equal to No unit
          Then - Actions
            Set CPS_Point[9] = (Position of CPS_Missile[CPS_Loop])
            Set CPS_Point[10] = (Position of CPS_TargetUnit[CPS_Loop])
            Set CPS_Point[11] = (CPS_SourcePoint[CPS_Loop] offset by CPS_TraveledDistance[CPS_Loop] towards (Angle from CPS_SourcePoint[CPS_Loop] to CPS_Point[10]) degrees)
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Distance between CPS_Point[10] and CPS_Point[11]) Greater than or equal to (CPS_Speed[CPS_Loop] + 10.00)
              Then - Actions
                -------- [][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][] --------
                -------- MOVE PROJECTILE --------
                -------- [][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][] --------
                Set CPS_Point[12] = (CPS_Point[11] offset by CPS_Speed[CPS_Loop] towards (Angle from CPS_Point[11] to CPS_Point[10]) degrees)
                Set CPS_ArcReal[0] = (Distance between CPS_SourcePoint[CPS_Loop] and CPS_Point[10])
                Set CPS_ArcReal[1] = (CPS_ArcReal[0] / 2.00)
                Set CPS_Point[13] = (CPS_SourcePoint[CPS_Loop] offset by CPS_ArcReal[1] towards (Angle from CPS_SourcePoint[CPS_Loop] to CPS_Point[10]) degrees)
                Set CPS_ArcReal[2] = (Distance between CPS_Point[12] and CPS_Point[13])
                Set CPS_TraveledDistance[CPS_Loop] = (CPS_TraveledDistance[CPS_Loop] + CPS_Speed[CPS_Loop])
                Unit - Move CPS_Missile[CPS_Loop] instantly to CPS_Point[12], facing CPS_Point[10]
                -------- [][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][] --------
                -------- HORIZONTAL ARC PROJECTILE'S CREATING --------
                -------- [][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][] --------
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    CPS_HArc[CPS_Loop] Equal to True
                  Then - Actions
                    Set CPS_ArcReal[3] = ((CPS_ArcReal[2] / CPS_ArcReal[1]) x CPS_HArcWidth[CPS_Loop])
                    Set CPS_ArcReal[4] = (CPS_ArcReal[1] - CPS_ArcReal[2])
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        (Distance between CPS_Point[12] and CPS_Point[10]) Greater than or equal to CPS_ArcReal[1]
                      Then - Actions
                        Set CPS_MissileDistance[CPS_Loop] = (CPS_MissileDistance[CPS_Loop] + CPS_ArcReal[3])
                      Else - Actions
                        Set CPS_MissileDistance[CPS_Loop] = (CPS_MissileDistance[CPS_Loop] - CPS_ArcReal[3])
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        CPS_HArcLeftRight[CPS_Loop] Equal to True
                      Then - Actions
                        Set CPS_Point[14] = (CPS_Point[12] offset by CPS_MissileDistance[CPS_Loop] towards ((Angle from CPS_Point[11] to CPS_Point[10]) + 90.00) degrees)
                      Else - Actions
                        Set CPS_Point[14] = (CPS_Point[12] offset by CPS_MissileDistance[CPS_Loop] towards ((Angle from CPS_Point[11] to CPS_Point[10]) - 90.00) degrees)
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        (Distance between CPS_Point[12] and CPS_Point[10]) Greater than or equal to CPS_ArcReal[1]
                      Then - Actions
                        Set CPS_ArcReal[5] = (Angle from CPS_Point[9] to CPS_Point[14])
                      Else - Actions
                        Set CPS_ArcReal[5] = (Angle from CPS_Point[14] to CPS_Point[10])
                    Unit - Move CPS_Missile[CPS_Loop] instantly to CPS_Point[14], facing CPS_ArcReal[5] degrees
                    Custom script: call RemoveLocation(udg_CPS_Point[14])
                  Else - Actions
                -------- [][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][] --------
                -------- VERTICAL ARC PROJECTILE'S SETTING --------
                -------- [][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][] --------
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    CPS_VArc[CPS_Loop] Equal to True
                  Then - Actions
                    Set CPS_ArcReal[3] = ((CPS_ArcReal[2] / CPS_ArcReal[1]) x CPS_VArcHeight[CPS_Loop])
                    Set CPS_ArcReal[4] = (CPS_ArcReal[1] - CPS_ArcReal[2])
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        (Distance between CPS_Point[12] and CPS_Point[10]) Greater than or equal to CPS_ArcReal[1]
                      Then - Actions
                        Set CPS_ArcReal[5] = ((Current flying height of CPS_Missile[CPS_Loop]) + CPS_ArcReal[3])
                        Set CPS_ArcReal[6] = (2.50 x (Atan((CPS_ArcReal[5] / CPS_ArcReal[4]))))
                      Else - Actions
                        Set CPS_ArcReal[5] = ((Current flying height of CPS_Missile[CPS_Loop]) - CPS_ArcReal[3])
                        Set CPS_ArcReal[6] = (1.50 x (Atan((CPS_ArcReal[4] / CPS_ArcReal[5]))))
                    Custom script: call SetUnitAnimationByIndex( udg_CPS_Missile[udg_CPS_Loop], R2I(udg_CPS_ArcReal[6]) )
                    Animation - Change CPS_Missile[CPS_Loop] flying height to CPS_ArcReal[5] at 0.00
                  Else - Actions
                Custom script: call RemoveLocation(udg_CPS_Point[12])
                Custom script: call RemoveLocation(udg_CPS_Point[13])
              Else - Actions
                -------- [][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][] --------
                -------- CAUSE DAMAGE AND CREATE EFFECTS --------
                -------- [][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][] --------
                Set SPSD_Caster = CPS_Source[CPS_Loop]
                Set SPSD_TargetUnit = CPS_TargetUnit[CPS_Loop]
                Set SPSD_TargetPoint = (Position of CPS_TargetUnit[CPS_Loop])
                Custom script: if udg_CPS_Trigger[udg_CPS_Loop] != null then
                Custom script: call TriggerExecute(udg_CPS_Trigger[udg_CPS_Loop])
                Custom script: endif
                Set CPS_Point[12] = (Position of CPS_TargetUnit[CPS_Loop])
                Special Effect - Create a special effect at CPS_Point[12] using CPS_Impact[CPS_Loop]
                Special Effect - Destroy (Last created special effect)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    CPS_UnitOrPoint[CPS_Loop] Equal to True
                  Then - Actions
                    Unit - Cause CPS_Source[CPS_Loop] to damage CPS_TargetUnit[CPS_Loop], dealing CPS_Damage[CPS_Loop] damage of attack type CPS_AttackType[CPS_Loop] and damage type CPS_DamageType[CPS_Loop]
                  Else - Actions
                    -------- [][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][] --------
                    -------- DESTROY TREES --------
                    -------- [][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][] --------
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        CPS_Destroy[CPS_Loop] Equal to True
                      Then - Actions
                        Destructible - Pick every destructible within CPS_AoE[CPS_Loop] of CPS_Point[12] and do (Actions)
                          Loop - Actions
                            Set CPS_Tree = (Picked destructible)
                            Set CPS_Point[8] = (Position of CPS_Tree)
                            Unit - Order CPS_Dummy to Harvest CPS_Tree
                            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              If - Conditions
                                (String((Current order of CPS_Dummy))) Equal to harvest
                              Then - Actions
                                Destructible - Kill CPS_Tree
                              Else - Actions
                            Unit - Order CPS_Dummy to Stop
                            Custom script: call RemoveLocation(udg_CPS_Point[8])
                      Else - Actions
                    Custom script: set bj_wantDestroyGroup = true
                    Unit Group - Pick every unit in (Units within CPS_AoE[CPS_Loop] of CPS_Point[12]) and do (Actions)
                      Loop - Actions
                        Set CPS_Target = (Picked unit)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          If - Conditions
                            (CPS_Target is A structure) Equal to False
                            (CPS_Target is Mechanical) Equal to False
                            (CPS_Target is alive) Equal to True
                            (CPS_Target belongs to an enemy of (Owner of CPS_Source[CPS_Loop])) Equal to True
                          Then - Actions
                            Unit - Cause CPS_Source[CPS_Loop] to damage CPS_Target, dealing CPS_Damage[CPS_Loop] damage of attack type CPS_AttackType[CPS_Loop] and damage type CPS_DamageType[CPS_Loop]
                          Else - Actions
                    Unit - Remove CPS_TargetUnit[CPS_Loop] from the game
                Custom script: call RemoveLocation(udg_CPS_Point[12])
                Custom script: call RemoveLocation(udg_CPS_SourcePoint[udg_CPS_Loop])
                Custom script: call RemoveLocation(udg_SPSD_TargetPoint)
                Unit - Remove CPS_Missile[CPS_Loop] from the game
                Set CPS_Missile[CPS_Loop] = No unit
            Custom script: call RemoveLocation(udg_CPS_Point[9])
            Custom script: call RemoveLocation(udg_CPS_Point[10])
            Custom script: call RemoveLocation(udg_CPS_Point[11])
            Set CPS_Off = False
          Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        CPS_Off Equal to True
      Then - Actions
        Set CPS_MUI = 0
        Trigger - Turn off (This trigger)
      Else - Actions
CPS Creating
  Events
  Conditions
  Actions
    Set CPS_MUI = (CPS_MUI + 1)
    Set CPS_AoE[CPS_MUI] = Projectile_AoE
    Set CPS_AttackType[CPS_MUI] = Projectile_AttackType
    Set CPS_Damage[CPS_MUI] = Projectile_Damage
    Set CPS_DamageType[CPS_MUI] = Projectile_DamageType
    Set CPS_Destroy[CPS_MUI] = Projectile_DestroyTree
    Set CPS_Impact[CPS_MUI] = Projectile_Impact
    Set CPS_UnitOrPoint[CPS_MUI] = Projectile_UnitOrPoint
    Set CPS_Speed[CPS_MUI] = Projectile_Speed
    Set CPS_VArc[CPS_MUI] = Projectile_VArc
    Set CPS_VArcHeight[CPS_MUI] = Projectile_VArcHeight
    Set CPS_Height[CPS_MUI] = Projectile_Height
    Set CPS_HArc[CPS_MUI] = Projectile_HArc
    Set CPS_HArcWidth[CPS_MUI] = Projectile_HArcWidth
    Set CPS_HArcLeftRight[CPS_MUI] = Projectile_HArcLeftOrRight
    Set CPS_Source[CPS_MUI] = Projectile_Source
    Set CPS_SourcePoint[CPS_MUI] = (Position of Projectile_Source)
    Set CPS_Trigger[CPS_MUI] = Projectile_Trigger
    Set CPS_TraveledDistance[CPS_MUI] = 0.00
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Projectile_UnitOrPoint Equal to True
      Then - Actions
        Set CPS_TargetUnit[CPS_MUI] = Projectile_TargetUnit
        Set CPS_Point[2] = (Position of Projectile_TargetUnit)
        Set CPS_Angle = (Angle from CPS_SourcePoint[CPS_MUI] to CPS_Point[2])
        Custom script: call RemoveLocation(udg_CPS_Point[2])
      Else - Actions
        Unit - Create 1 CPS_DummyType for (Owner of CPS_Source[CPS_MUI]) at Projectile_TargetPoint facing Default building facing degrees
        Set CPS_TargetUnit[CPS_MUI] = (Last created unit)
        Set CPS_Point[2] = (Position of CPS_TargetUnit[CPS_MUI])
        Set CPS_Angle = (Angle from CPS_Point[1] to CPS_Point[2])
        Custom script: call RemoveLocation(udg_CPS_Point[2])
    Unit - Create 1 CPS_DummyType for (Owner of Projectile_Source) at CPS_SourcePoint[CPS_MUI] facing CPS_Angle degrees
    Set CPS_Missile[CPS_MUI] = (Last created unit)
    Custom script: if UnitAddAbility(udg_CPS_Missile[udg_CPS_MUI], 'Amrf') and UnitRemoveAbility(udg_CPS_Missile[udg_CPS_MUI], 'Amrf') then
    Custom script: endif
    Unit - Move CPS_Missile[CPS_MUI] instantly to CPS_SourcePoint[CPS_MUI]
    Animation - Change CPS_Missile[CPS_MUI] flying height to Projectile_Height at 0.00
    Animation - Change CPS_Missile[CPS_MUI]'s size to (Projectile_Size%, 0.00%, 0.00%) of its original size
    Special Effect - Create a special effect attached to the origin of CPS_Missile[CPS_MUI] using Projectile_Model
    Set CPS_MissileDistance[CPS_MUI] = 0.00
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Projectile_VArc Equal to False
      Then - Actions
        Custom script: call SetUnitAnimationByIndex( udg_CPS_Missile[udg_CPS_MUI] , 90 )
      Else - Actions
    Custom script: call RemoveLocation(udg_Projectile_TargetPoint)
    Custom script: call TriggerExecute( gg_trg_CPS_Init )
    Trigger - Turn on CPS_Loop <gen>
CPS Init
  Events
    Map initialization
  Conditions
  Actions
    Set CPS_DummyType = DummyNull
    -------- [][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][] --------
    -------- RESET SETTINGS --------
    -------- [][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][] --------
    Set Projectile_AoE = 0.00
    Set Projectile_AttackType = Magic
    Set Projectile_Damage = 0.00
    Set Projectile_DamageType = Normal
    Set Projectile_DestroyTree = False
    Set Projectile_HArc = False
    Set Projectile_Height = 50.00
    Set Projectile_Impact = none
    Set Projectile_Model = none
    Set Projectile_Size = 100.00
    Set Projectile_Source = No unit
    Set Projectile_Speed = 25.00
    Set Projectile_TargetUnit = No unit
    Custom script: set udg_Projectile_Trigger = null
    Set Projectile_UnitOrPoint = True
    Set Projectile_VArc = False
    -------- [][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][] --------
    -------- DUMMY CREATING --------
    -------- [][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][]X[][] --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        CPS_Dummy Equal to No unit
      Then - Actions
        Set TempPoint = (Center of (Playable map area))
        Unit - Create 1 CPS_DummyType for Neutral Passive at TempPoint facing Default building facing degrees
        Unit - Add Harvest (Gold and Lumber) to (Last created unit)
        Set CPS_Dummy = (Last created unit)
        Custom script: call RemoveLocation(udg_TempPoint)
      Else - Actions
ExampleArrow
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to DAMAGE_TYPE_DETECTOR
  Actions
    Set Projectile_AttackType = Magic
    Set Projectile_Damage = 100.00
    Set Projectile_DamageType = Magic
    Set Projectile_Impact = Abilities\Spells\Other\FrostArrows\NagaColdArrowMissile.mdl
    Set Projectile_Height = 60.00
    Set Projectile_Model = Abilities\Spells\Other\FrostArrows\NagaColdArrowMissile.mdl
    Set Projectile_Source = (Triggering unit)
    Set Projectile_Speed = 25.00
    Set Projectile_TargetUnit = (Target unit of ability being cast)
    Set Projectile_Trigger = NullTrig <gen>
    Set Projectile_UnitOrPoint = True
    Set Projectile_VArc = True
    Set Projectile_VArcHeight = 30.00
    Set Projectile_Size = 100.00
    Custom script: call TriggerExecute( gg_trg_CPS_Creating )
NullTrig
  Events
  Conditions
  Actions
Knockback 2D
  Events
    Map initialization
  Conditions
  Actions
    Custom script: set udg_KB2D_Hash = InitHashtable()
    -------- -------------------------------------------- --------
    -------- Creating Tree Cutter --------
    -------- -------------------------------------------- --------
    Set KB2D_Loc = (Center of (Playable map area))
    Unit - Create 1 Peasant for Neutral Passive at KB2D_Loc facing Default building facing degrees
    Set KB2D_Cutter = (Last created unit)
    Unit - Hide KB2D_Cutter
    Custom script: call UnitAddAbility(udg_KB2D_Cutter,'Aloc')
    Custom script: call RemoveLocation(udg_KB2D_Loc)
    -------- -------------------------------------------- --------
    -------- Determines the Knockback Loop --------
    -------- -------------------------------------------- --------
    Set KB2D_Loop = 0.04
    -------- -------------------------------------------- --------
    -------- -------------------------------------------- --------
    Custom script: call ExecuteFunc("InitKnockback2D")
    Custom script: endfunction
    -------- -------------------------------------------- --------
    -------- This function destroys knockback --------
    -------- -------------------------------------------- --------
    Custom script: function DestroyKnockback takes nothing returns nothing
    Hashtable - Clear all child hashtables of child KB2D_Key in KB2D_Hash
    Unit Group - Remove KB2D_U from KB2D_LoopGroup
    Custom script: endfunction
    -------- -------------------------------------------- --------
    -------- This function applies knockback to unit --------
    -------- -------------------------------------------- --------
    -------- Requires --------
    -------- KB2D_Target --------
    -------- KB2D_Angle --------
    -------- KB2D_Duration --------
    -------- KB2D_Distance --------
    -------- KB2D_SFX --------
    -------- KB2D_AllowDestroyTree --------
    -------- -------------------------------------------- --------
    Custom script: function ApplyKnockbackEffect takes nothing returns nothing
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        And - All (Conditions) are true
          Conditions
            (KB2D_Target is A structure) Equal to False
            (KB2D_Target is A flying unit) Equal to False
            (KB2D_Target is alive) Equal to True
            (KB2D_Target is in KB2D_LoopGroup) Equal to False
      Then - Actions
        Custom script: call SaveReal(udg_KB2D_Hash,udg_KB2D_TempKey,1,udg_KB2D_Angle)
        Custom script: call SaveReal(udg_KB2D_Hash,udg_KB2D_TempKey,2,udg_KB2D_Duration)
        Custom script: call SaveReal(udg_KB2D_Hash,udg_KB2D_TempKey,3,udg_KB2D_Distance)
        Hashtable - Save KB2D_SFX as 5 of KB2D_TempKey in KB2D_Hash
        Hashtable - Save KB2D_AllowTreeDestroy as 6 of KB2D_TempKey in KB2D_Hash
        Unit Group - Add KB2D_Target to KB2D_LoopGroup
      Else - Actions
    Custom script: endfunction
    -------- -------------------------------------------- --------
    -------- This function applies speed --------
    -------- -------------------------------------------- --------
    Custom script: function ApplyKnockbackSpeed takes nothing returns real
    Custom script: local real velocity = (udg_KB2D_Distance/udg_KB2D_Duration) * (udg_KB2D_Loop * 2)
    Custom script: local real friction = (velocity/udg_KB2D_Duration) * (udg_KB2D_Loop * udg_KB2D_Loop)
    Custom script: return velocity - friction
    Custom script: endfunction
    -------- -------------------------------------------- --------
    -------- This function applies knockback coordinates --------
    -------- -------------------------------------------- --------
    Custom script: function ApplyKnockbackCoordinates takes nothing returns nothing
    Custom script: local real speed = ApplyKnockbackSpeed()
    Custom script: call SetUnitX(udg_KB2D_U, GetUnitX(udg_KB2D_U) + speed * Cos(udg_KB2D_Angle * bj_DEGTORAD))
    Custom script: call SetUnitY(udg_KB2D_U, GetUnitY(udg_KB2D_U) + speed * Sin(udg_KB2D_Angle * bj_DEGTORAD))
    Custom script: endfunction
    -------- -------------------------------------------- --------
    -------- This function checks the collision size --------
    -------- -------------------------------------------- --------
    Custom script: function GetUnitCollisionSize takes nothing returns integer
    -------- -------------------------------------------- --------
    -------- This is based from tier 3 halls,thanks to Vexorian for this code :D --------
    -------- -------------------------------------------- --------
    Custom script: local integer maxcollision = 196
    Custom script: local integer a = 0
    Custom script: local integer radius = maxcollision
    Custom script: local real x = GetUnitX(udg_KB2D_U)
    Custom script: local real y = GetUnitY(udg_KB2D_U)
    Custom script: loop
    Custom script: if IsUnitInRangeXY(udg_KB2D_U, x + radius, y, 0) then
    Custom script: set a = radius
    Custom script: else
    Custom script: set maxcollision = radius
    Custom script: endif
    Custom script: exitwhen maxcollision - a <= 1
    Custom script: set radius = (maxcollision + a) / 2
    Custom script: endloop
    Custom script: set radius = radius - maxcollision + a
    Custom script: return radius
    Custom script: endfunction
    -------- -------------------------------------------- --------
    -------- This function applies the bouncing angle --------
    -------- -------------------------------------------- --------
    Custom script: function GetKnockbackAngle takes nothing returns nothing
    Custom script: set udg_KB2D_TouchRadius = I2R(GetUnitCollisionSize()) + 50
    Set KB2D_Offset = (KB2D_Loc offset by KB2D_TouchRadius towards KB2D_Angle degrees)
    Set KB2D_Hit = False
    Destructible - Pick every destructible within KB2D_TouchRadius of KB2D_Offset and do (Actions)
      Loop - Actions
        Set KB2D_Dest = (Picked destructible)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Current life of KB2D_Dest) Greater than 0.00
          Then - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                KB2D_AllowTreeDestroy Equal to True
              Then - Actions
                Unit - Order KB2D_Cutter to Harvest (Picked destructible)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (Current order of KB2D_Cutter) Equal to (Order(harvest))
                  Then - Actions
                    Destructible - Kill (Picked destructible)
                  Else - Actions
              Else - Actions
            Set KB2D_Hit = True
          Else - Actions
        Unit - Order KB2D_Cutter to Stop
    Set KB2D_TempGroup = (Units within KB2D_TouchRadius of KB2D_Loc matching (((((Matching unit) is A flying unit) Equal to False) and (((Matching unit) is Ethereal) Equal to False)) and ((((Matching unit) is alive) Equal to True) and ((Matching unit) Not equal to KB2D_U))))
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Or - Any (Conditions) are true
          Conditions
            (Number of units in KB2D_TempGroup) Greater than 0
            (Terrain pathing at KB2D_Offset of type Walkability is off) Equal to True
            KB2D_Hit Equal to True
      Then - Actions
        Set KB2D_Angle = (360.00 - KB2D_Angle)
        Set KB2D_Offset = (KB2D_Loc offset by KB2D_TouchRadius towards KB2D_Angle degrees)
        Custom script: call SaveReal(udg_KB2D_Hash,udg_KB2D_Key,3,udg_KB2D_Distance * 0.4)
        Set KB2D_Hit = False
        Destructible - Pick every destructible within KB2D_TouchRadius of KB2D_Offset and do (Actions)
          Loop - Actions
            Set KB2D_Dest = (Picked destructible)
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Current life of KB2D_Dest) Greater than 0.00
              Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    KB2D_AllowTreeDestroy Equal to True
                  Then - Actions
                    Unit - Order KB2D_Cutter to Harvest (Picked destructible)
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        (Current order of KB2D_Cutter) Equal to (Order(harvest))
                      Then - Actions
                        Destructible - Kill (Picked destructible)
                      Else - Actions
                  Else - Actions
                Set KB2D_Hit = True
              Else - Actions
            Unit - Order KB2D_Cutter to Stop
        Set KB2D_TempGroup = (Units within KB2D_TouchRadius of KB2D_Loc matching (((((Matching unit) is A flying unit) Equal to False) and (((Matching unit) is Ethereal) Equal to False)) and ((((Matching unit) is alive) Equal to True) and ((Matching unit) Not equal to KB2D_U))))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Or - Any (Conditions) are true
              Conditions
                (Number of units in KB2D_TempGroup) Greater than 0
                (Terrain pathing at KB2D_Offset of type Walkability is off) Equal to True
                KB2D_Hit Equal to True
          Then - Actions
            Set KB2D_Angle = ((KB2D_Angle + 180.00) mod 360.00)
            Set KB2D_Offset = (KB2D_Loc offset by KB2D_TouchRadius towards KB2D_Angle degrees)
            Set KB2D_Hit = False
            Destructible - Pick every destructible within KB2D_TouchRadius of KB2D_Offset and do (Actions)
              Loop - Actions
                Set KB2D_Dest = (Picked destructible)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (Current life of KB2D_Dest) Greater than 0.00
                  Then - Actions
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        KB2D_AllowTreeDestroy Equal to True
                      Then - Actions
                        Unit - Order KB2D_Cutter to Harvest (Picked destructible)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          If - Conditions