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 haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. Join the 6th Melee Mapping Contest for a chance to have your map featured in this year's Hive Cup!
    Dismiss Notice
  5. Shoot to thrill, play to kill. Sate your hunger with the 33rd Modeling Contest!
    Dismiss Notice
  6. Do you hear boss music? It's the 17th Mini Mapping Contest!
    Dismiss Notice
  7. Let your favorite entries duke it out in the 15th Techtree Contest Poll.
    Dismiss Notice
  8. Weave light to take you to your highest hopes - the 6th Special Effect Contest is here!
    Dismiss Notice
  9. 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

Afterlife v4.0.w3x
Variables
Buffs
OpenWound
BrokenLeg
AmmoStack
Stack
Areas
Hotel
Library
Railway Station
Restaurant
School
Pumping Plant
Shop
Stadium
Concert hall
Bar
PlayerInfo
Start Info
kick
kick 2
kick 3
kick 4
kick 5
kick 6
kick 7
kick 8
ping
ping avaibel
pingstart
ping
Turret
Xp gain
Xp gain 20mm
Ammosys
Ammosys 20mm
Reloading
Reloading 20mm
Map Start
Gate
CanRestart
Start Ini
Map InI
Restart
Herodead
SaveLoadTrigger
Set crypt
saveCrypt
loadCrypt
Leaderboard
renew force
Multiboard
renew
Reload Triggers Pistols
Reloading MR
Realoding Glock 18
Reloading 26mm Flare Pistol
Reloading Firestar
Reloading IMI Barak2
Reloading Colt Python 357
Reloading Desert Eagle 44
Reloading SIG Sauer Pro 2340
Reloading SmithWesson 500
Reloading Baretta 9000S
Reloading HecklerKoch USP
Reloading Mauser M2
Reloading Coonan 357
Reloading FN Five Seven
Reloading Beretta 93R
Reload Triggers Auto Rifels/SMGs
Reloading SOW
Reloading Scorp
Reloading Thomsen
Reloading Revelli
Reloading G36
Reloading HK21
Reloading Steyr AUG A1
Reloading Mac10
Reloading FN P90
Reloading AK 47
Reloading IMI M Galil
Reloading FN SCAR H
Reloading FN Minime
Reloading SIG SSG 552 Commando
Reloading M4A1
Reloading Micro Uzi
Reloading PP90M1
Reloading HK UMP 45
Reloading HK MP7 PDW
Reloading HK MP5
Reload Triggers Sniperrifels
Reloading Steyr Scout Tactical
Reloading AI Arctic Warfare Rifle
Reloading Winchester 44
Reload Triggers Shotguns
Reload IZH27
Reloading Valtro PM 5
Reloading AA 12
Reloading Saiga 12
Reloading Benelli Nova Tactical
Browning
Reloading Ithaca
Reload Triggers Grenade Launchers
Reloading EX41
Reloading HK69
Changing Weapon
Change to Bereta 9000S
Change to Bow
Change to Mauser
Change to Coonan 357
Change to IMI Barak
Change to AI AWR
Change to Desert Eagle
Change to Chainsaw
Change to Colt Python
Change to IZH 27
Change to 26mm Pistol
Change to MR Prototype 12
Change to HK 69
Change to Winchester 44
Change to Ithaca
Change to EX41
Change to SIG Sauer
Change to Valtro PM 5
Change to Saiga 12
Change to AA12
Change to HecklerKoch USP
Change to SmithWesson 500
Change to Mac 10
Change to TommyGun
Change to Steyr AUG A1
Change to G36 Special
Change to IMI M Galil
Change to Steyr Scout
Change to FN P 90
Change to FN SCAR
Change to Firestar
Change to SIG SSG 552
Change to Five Seven
Change to FN Minime
Change to HK 21
Change to Nova Tactical
Change to Browning Shotgun
Change to M4A1
Change to AK 47
Change to UZI
Change to Scorpion
Change to PP90M1
Change to Revelli
Change to HK UMP 45
Change to SOW Prototype 042
Change to HK MP5
Change to HK MP7
Change to Beretta 93
Change to Glock 18
Weapon Ammo Values
Set costume on pickup
Uses the Weapon
Fire Mode
IMI M Galil Auto
IMI M Galil SEMI
AA12 Auto
AA12 Semi
Steyr AUG Auto
Steyr AUG SEMI
G36 Special AUTO
G36 Special SEMI
AK47 Auto
AK47 SEMI
SOW Prototype AUTO
SOW Prototype SEMI
FN SCAR Auto
FN SCAR SEMI
Beretta 93R SEMI
Beretta 93R Burn
Glock 18 SEMI
Glock 18 Auto
SIG Commando Auto
SIG Commando Semi
M4A1 Auto
M4A1 Semi
P90 Auto
P90 Semi
Scorpion AUTO
Scorpion SEMI
Micro Uzi Auto
Micro Uzi Semi
TommyGun Auto
TommyGun Semi
PP90M1 Auto
PP90M1 SemiAuto
Mac 10 Auto
Mac 10 Semi
MP5 Auto
MP5 Semi
HK UMP Auto
HK UMP Semi
MP7 Auto
MP7 Semi
Shooting
Shooting vs Reload
Shooting Five Seven
Bow Kill
Shooting BowRed
Shooting Desert Eagle
Shooting Winchester
Shooting Colt Python
Shooting SIG Sauer
Shooting Coonan 357
Shooting Steyr Scout
Shooting AI AWR
Shooting Chainsaw
Shooting IZH27
Shooting 26mm Pistol
Shooting HK 69
Shooting with Rocket
Shooting HK USP
Shooting Mauser
Shooting Bereta9000
Shooting Galil
Shooting AK47
Shooting AUG
Shooting G36
Shooting SIG COMM
Shooting FN SCAR
Shooting AA12
Shooting M4A1
Shooting Firestar
Shooting Revelli
Shooting IMI Barak
Shooting Baretta 93
Shooting Glock 18
Shooting Benelli
Shooting Browning
Shooting Ithaca
Shooting EX41
Shooting Valtro
Shooting Saiga 12
Shooting SM 500
Shooting MR Prototype 12
Shooting FN Minime
Shooting HK 21
Shooting Uzi
Shooting vz65 Scorpion
Shooting PP90M1
Shooting mac 10
Shooting P90
Shooting mp5
Shooting hk ump 45
Shooting SOW Prototype 042
Shooting TommyGun
Shooting MP7
Other Triggers
LearnsSkill
Bandage Removes Buff
remove 0 ammo
Drop Weapon
Knife
Doors
Secret
Flare
stim
Gre
Land Flare
rpg
Buttons
Lift
Lift 2
Lift 3
Lift 4
Lift 5
Balance
ZombiesAttack
Balanced Players
Leavers
Time before
Items
Eine Waffe
Eine Armor
Move items
New Item Spawn
Waves
Set Global Location
ZombieDrop
BossDrop
Timer
KilledBoss
1 WAVE
Coming W1
Boss W1
2 WAVE
Coming W2
Boss W2
3 WAVE
Coming W3
Boss W3
4 WAVE
Coming W4
Boss W4
5 WAVE
Coming W5
Boss W5
6 WAVE
Coming W6
Boss W6
7 WAVE
Coming W7
Boss W7
8 WAVE
Coming W8
Boss W8
9 WAVE
Coming W9
Boss W9
10 WAVE
Coming W10
Boss W10
Cinematic
Part2
Step1
Step2
Step3
Step4
Step5
Step6
Step7
Step8
Step9
Step10
Step11 This must be disabled at start
Step12
Step13
Step14
StepAdditional
Step15
Step16
end
Animation
Animation2
Reborn Zombies
walkin 2 wounded
wounded 2 prarasite
mutated 2 walkin
Variaben benutzt

Info TextColor |CFFC70000

SPN = Spielernummer
Temp Array
SP+100
SP+110 = save encoder
SP+10 = xp to next round
1 =antiSinge
2 = Global Hero Location
//TESH.scrollpos=0
//TESH.alwaysfold=0
function AddOpenWound takes unit berta returns nothing
    local location here
    set here = GetUnitLoc(berta)
    call CreateNUnitsAtLoc( 1, 'u00J', Player(bj_PLAYER_NEUTRAL_EXTRA), here, bj_UNIT_FACING )
    call SetUnitLifeBJ( berta, GetUnitStateSwap(UNIT_STATE_LIFE, berta) + 1 )
    call IssueTargetOrderBJ( GetLastCreatedUnit(), "attack", berta )
    call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
    call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
    call RemoveLocation(here)
endfunction

function AddBrokenLeg takes unit berta returns nothing
    local location here
    set here = GetUnitLoc(berta)
    call CreateNUnitsAtLoc( 1, 'u00K', Player(bj_PLAYER_NEUTRAL_EXTRA), here, bj_UNIT_FACING )
    call SetUnitLifeBJ( berta, GetUnitStateSwap(UNIT_STATE_LIFE, berta) + 1 )
    call IssueTargetOrderBJ( GetLastCreatedUnit(), "attack", berta )
    call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
    call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
    call RemoveLocation(here)
endfunction

function BuffCheck takes unit myUnit returns integer
    local integer mybuff
    set mybuff = 0
    if (GetUnitAbilityLevel(myUnit, 'Bpsi') > 0) then
        set mybuff = mybuff +1
    endif
    if (GetUnitAbilityLevel(myUnit, 'Bssi') > 0) then
        set mybuff = mybuff +2
    endif
    return mybuff
endfunction

function ReAddBuff takes integer cola, unit pepsi returns nothing
if (cola == 1) then
call AddOpenWound(pepsi)
elseif (cola == 2) then
call AddBrokenLeg(pepsi)
elseif (cola == 3) then
call AddOpenWound(pepsi)
call AddBrokenLeg(pepsi)
endif
endfunction

function SetSkills takes integer owner returns nothing
    local integer loopy
    set udg_setskills[owner] = true
    if (udg_SkillA[owner] > 0) then 
    set loopy = 1
    loop
        exitwhen loopy > udg_SkillA[owner]
        call SelectHeroSkill( udg_Hero[owner], 'A005' )
        set loopy = loopy + 1
    endloop
    endif
    
    if (udg_SkillB[owner] > 0) then
    set loopy = 1
    loop
        exitwhen loopy > udg_SkillB[owner]
        call SelectHeroSkill( udg_Hero[owner], 'A00E' )
        set loopy = loopy + 1
    endloop
    endif
    
    if (udg_SkillC[owner] > 0) then
    set loopy = 1
    loop
        exitwhen loopy > udg_SkillC[owner]
        call SelectHeroSkill( udg_Hero[owner], 'A006' )
        set loopy = loopy + 1
    endloop
    endif
    
    if (udg_SkillD[owner] > 0) then
    set loopy = 1
    loop
        exitwhen loopy > udg_SkillD[owner]
        call SelectHeroSkill( udg_Hero[owner], 'A00N' )
        call SelectHeroSkill( udg_Hero[owner], 'A018' )
        call SelectHeroSkill( udg_Hero[owner], 'A019' )
        set loopy = loopy + 1
    endloop
    endif
    
    set udg_setskills[owner] = false
endfunction

function ChangeUnit takes unit oldUnit, integer newUnitId, string attach returns unit
    local real lifetrans
    local real manatrans
    local integer owner
    local integer index
    local unit    newUnit
    local item    indexItem
    local boolean wasHidden
    set lifetrans = GetUnitLifePercent(oldUnit)
    set manatrans = GetUnitManaPercent(oldUnit)
    set owner = GetConvertedPlayerId(GetOwningPlayer(oldUnit))
    set udg_BuffInt[owner] = BuffCheck(oldUnit)
    
    // If we have bogus data, don't attempt the replace.
    if (oldUnit == null) then
        set bj_lastReplacedUnit = oldUnit
        return oldUnit
    endif
    // Hide the original unit.
    set wasHidden = IsUnitHidden(oldUnit)
    call ShowUnit(oldUnit, false)
    // Create the replacement unit.
    set newUnit = CreateUnit(GetOwningPlayer(oldUnit), newUnitId, GetUnitX(oldUnit), GetUnitY(oldUnit), GetUnitFacing(oldUnit))
     // Mirror properties of the old unit onto the new unit.
    //call PauseUnit(newUnit, IsUnitPaused(oldUnit))
    call SetResourceAmount(newUnit, GetResourceAmount(oldUnit))

    // If both the old and new units are heroes, handle their hero info.
    if (IsUnitType(oldUnit, UNIT_TYPE_HERO) and IsUnitType(newUnit, UNIT_TYPE_HERO)) then
        call SetHeroXP(newUnit, GetHeroXP(oldUnit), false)

        set index = 0
        loop
            set indexItem = UnitItemInSlot(oldUnit, index)
            if (indexItem != null) then
                call UnitRemoveItem(oldUnit, indexItem)
                call UnitAddItem(newUnit, indexItem)
            endif

            set index = index + 1
            exitwhen index >= bj_MAX_INVENTORY
        endloop
    endif

    // Remove or kill the original unit.  It is sometimes unsafe to remove
    // hidden units, so kill the original unit if it was previously hidden.
    if wasHidden then
        call KillUnit(oldUnit)
        call RemoveUnit(oldUnit)
    else
        call RemoveUnit(oldUnit)
    endif    
    call DestroyEffectBJ( udg_PlayerAttach[owner] )
    set udg_PlayerAttach[owner] = AddSpecialEffectTargetUnitBJ( "weapon", newUnit, attach )
    call SetUnitColor( newUnit, ConvertPlayerColor(12) )
    call SetUnitLifePercentBJ( newUnit, lifetrans)
    call SetUnitManaPercentBJ( newUnit, manatrans)
    call SelectUnitForPlayerSingle( newUnit, GetOwningPlayer(newUnit) )
    set udg_Hero[owner] = newUnit
    call ReAddBuff(udg_BuffInt[owner],udg_Hero[owner])
    call SetSkills(owner)
    return newUnit
endfunction


Name Type Is Array Initial Value
alpha string Yes
blubber integer No
boardplace integer No
BuffInt integer Yes
CinematicHero1 unit No
CinematicHero2 unit No
CinematicZombie unit No
color1 real No
color2 real No
ColorSave string Yes
ColorStr string Yes
deathcheck boolean Yes
effect string Yes
FindPing itemcode Yes
glb_HeroLocation location Yes
Group group Yes
GroupInt integer No
Hero unit Yes UnitNull
Hummer1 unit No
Hummer2 unit No
Kills integer Yes 0
killsboard multiboard No
Lettersofusername1 string Yes
load_code integer Yes 0
loadcache string Yes
Marine1 unit No
Marine2 unit No
Marine3 unit No
maxammo integer No
Mutantcinematic unit No
newHero unitcode Yes
Ping string Yes
PingItgr integer Yes
PlayerAttach effect Yes
Proof boolean Yes
reloading boolean Yes
Save_Code string Yes
Save_Y string Yes
setskills boolean Yes
singel integer No 0
SkillA integer Yes
SkillB integer Yes
SkillC integer Yes
SkillD integer Yes
Spawns rect Yes
Tank unit No
Tank2 unit No
temp integer Yes
TimerRunned integer No
Timertmp timer No
tmp_Point2 location No
tmpEffect effect No
tmpPoint location No
ToPing string Yes
TriggerPlayerNr player No
Wait real No
WaveOn integer No 1
WaveTrigger trigger Yes
//TESH.scrollpos=6
//TESH.alwaysfold=0
function Trig_Unbezeichneter_Ausl__ser_002_Conditions takes nothing returns boolean
    local integer xena
    set xena = GetUnitTypeId(GetAttacker())
    if ( xena == 'u001' or xena == 'u000' or xena == 'u000' or xena == 'u003' or xena == 'u00C' or xena == 'u002' or xena == 'u00I' or xena == 'u004') then
        if (IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) then
            return true
        endif
    return false
    endif
    return false
endfunction

function Trig_Unbezeichneter_Ausl__ser_002_Actions takes nothing returns nothing
    local integer rant
    set rant = GetRandomInt(0,10)
    if (rant > 5 ) then
        call AddOpenWound(GetTriggerUnit())
    endif
endfunction

//===========================================================================
function InitTrig_OpenWound takes nothing returns nothing
    set gg_trg_OpenWound = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_OpenWound, EVENT_PLAYER_UNIT_ATTACKED )
    call TriggerAddCondition( gg_trg_OpenWound, Condition( function Trig_Unbezeichneter_Ausl__ser_002_Conditions ) )
    call TriggerAddAction( gg_trg_OpenWound, function Trig_Unbezeichneter_Ausl__ser_002_Actions )
endfunction

 
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_9002_Conditions takes nothing returns boolean
    local integer xena
    set xena = GetUnitTypeId(GetAttacker())
    if ( xena == 'u006' or xena == 'u007' or xena == 'u009' or xena == 'u00E') then
        if (IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) then
            return true
        endif
        return false
    endif
    return false
endfunction

function Trig_9002_Actions takes nothing returns nothing
    local integer rant
    set rant = GetRandomInt(0,10)
    if (rant < GetUnitLevel(GetAttacker())) then
        call AddBrokenLeg(GetTriggerUnit())
    endif
endfunction

//===========================================================================
function InitTrig_BrokenLeg takes nothing returns nothing
    set gg_trg_BrokenLeg = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_BrokenLeg, EVENT_PLAYER_UNIT_ATTACKED )
    call TriggerAddCondition( gg_trg_BrokenLeg, Condition( function Trig_9002_Conditions ) )
    call TriggerAddAction( gg_trg_BrokenLeg, function Trig_9002_Actions )
endfunction

 
//TESH.scrollpos=25
//TESH.alwaysfold=0
function Trig_Stack_Conditions takes nothing returns boolean
    if ( not ( GetItemType(GetManipulatedItem()) == ITEM_TYPE_CHARGED ) ) then
        return false
    endif
    return true
endfunction


function Trig_Stack_Actions takes nothing returns nothing
    local integer x
    local integer y
    local integer z
    local integer v
    set x = GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))
    set y = 0
    set v = 0
    if ( GetItemUserData(GetManipulatedItem()) == 0 ) then
        call SetItemUserData( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) * 5 ) )
    else
    endif
    set z = 0
    loop
        exitwhen z > 6
        if (( GetItemTypeId(UnitItemInSlot(udg_Hero[x], z)) == GetItemTypeId(GetManipulatedItem()) ) and ( (GetItemCharges(UnitItemInSlot(udg_Hero[x], z)) + GetItemCharges(GetManipulatedItem())) <= (GetItemUserData(UnitItemInSlot(udg_Hero[x], z))))) then
            set y = ( y + 1 )
            if (y >= 2 )  then
                call SetItemCharges( UnitItemInSlot(udg_Hero[x], v),  (GetItemCharges(UnitItemInSlot(udg_Hero[x], v)) + GetItemCharges(UnitItemInSlot(udg_Hero[x], z))))
                call RemoveItem( UnitItemInSlot(udg_Hero[x], z))
            elseif ((y == 1) and (v == 0)) then
                set v = z
            endif
        else
        endif
        set z = z + 1
    endloop
endfunction

//===========================================================================
function InitTrig_Stack takes nothing returns nothing
    set gg_trg_Stack = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Stack, EVENT_PLAYER_UNIT_PICKUP_ITEM )
    call TriggerAddCondition( gg_trg_Stack, Condition( function Trig_Stack_Conditions ) )
    call TriggerAddAction( gg_trg_Stack, function Trig_Stack_Actions )
endfunction



 
Hotel
  Events
    Unit - A unit enters Hotel <gen>
  Conditions
    ((Triggering unit) is A Hero) Equal to True
  Actions
    Game - Display to (Player group((Owner of (Triggering unit)))) the text: |CFFC70000 You entered the |cff00aeefHotel
Library
  Events
    Unit - A unit enters Library <gen>
  Conditions
    ((Triggering unit) is A Hero) Equal to True
  Actions
    Game - Display to (Player group((Owner of (Triggering unit)))) the text: |CFFC70000 You entered the |cff00aeefLibrary
Railway Station
  Events
    Unit - A unit enters Railway_Station <gen>
  Conditions
    ((Triggering unit) is A Hero) Equal to True
  Actions
    Game - Display to (Player group((Owner of (Triggering unit)))) the text: |CFFC70000 You entered the |cff00aeefRailway Station
Restaurant
  Events
    Unit - A unit enters Restaurant <gen>
  Conditions
    ((Triggering unit) is A Hero) Equal to True
  Actions
    Game - Display to (Player group((Owner of (Triggering unit)))) the text: |CFFC70000 You entered the |cff00aeefRestaurant
School
  Events
    Unit - A unit enters School <gen>
  Conditions
    ((Triggering unit) is A Hero) Equal to True
  Actions
    Game - Display to (Player group((Owner of (Triggering unit)))) the text: |CFFC70000 You entered the |cff00aeefSchool
Pumping Plant
  Events
    Unit - A unit enters Sewerage_Pumping_Plant <gen>
  Conditions
    ((Triggering unit) is A Hero) Equal to True
  Actions
    Game - Display to (Player group((Owner of (Triggering unit)))) the text: |CFFC70000 You entered the |cff00aeefPumping Plant
Shop
  Events
    Unit - A unit enters Shop <gen>
  Conditions
    ((Triggering unit) is A Hero) Equal to True
  Actions
    Game - Display to (Player group((Owner of (Triggering unit)))) the text: |CFFC70000 You entered the |cff00aeefShop
Stadium
  Events
    Unit - A unit enters Water_Stadium <gen>
  Conditions
    ((Triggering unit) is A Hero) Equal to True
  Actions
    Game - Display to (Player group((Owner of (Triggering unit)))) the text: |CFFC70000 You entered the |cff00aeefWater Stadium
Concert hall
  Events
    Unit - A unit enters Concert_Hall <gen>
  Conditions
    ((Triggering unit) is A Hero) Equal to True
  Actions
    Game - Display to (Player group((Owner of (Triggering unit)))) the text: |CFFC70000 You entered the |cff00aeefConcert Hall
Bar
  Events
    Unit - A unit enters Bar <gen>
  Conditions
    ((Triggering unit) is A Hero) Equal to True
  Actions
    Game - Display to (Player group((Owner of (Triggering unit)))) the text: |CFFC70000 You entered the |cff00aeefBar
Start Info
  Events
    Time - Elapsed game time is 15.00 seconds
  Conditions
  Actions
    Sound - Play Hint <gen>
    Game - Display to (All players) for 30.00 seconds the text: |CFFC70000The Weapons need a specific Ammotype, the Ammotype is displayed in the Itemdescription. Make sure you have the right Ammotype. !!Be sure you have turned the extended Tool Tips on!!|r
kick 2
  Events
    Player - Player 1 (Red) types a chat message containing -kick 2 (stringnoformat) as An exact match
  Conditions
  Actions
    Game - Defeat Player 2 (Blue) with the message: Kicked!
kick 3
  Events
    Player - Player 1 (Red) types a chat message containing -kick 3 (stringnoformat) as An exact match
  Conditions
  Actions
    Game - Defeat Player 3 (Teal) with the message: Kicked!
kick 4
  Events
    Player - Player 1 (Red) types a chat message containing -kick 4 (stringnoformat) as An exact match
  Conditions
  Actions
    Game - Defeat Player 4 (Purple) with the message: Kicked!
kick 5
  Events
    Player - Player 1 (Red) types a chat message containing -kick 5 (stringnoformat) as An exact match
  Conditions
  Actions
    Game - Defeat Player 5 (Yellow) with the message: Niederlage!
kick 6
  Events
    Player - Player 1 (Red) types a chat message containing -kick 6 (stringnoformat) as An exact match
  Conditions
  Actions
    Game - Defeat Player 6 (Orange) with the message: Kicked!
kick 7
  Events
    Player - Player 1 (Red) types a chat message containing -kick 7 (stringnoformat) as An exact match
  Conditions
  Actions
    Game - Defeat Player 7 (Green) with the message: Kicked!
kick 8
  Events
    Player - Player 1 (Red) types a chat message containing -kick 8 (stringnoformat) as An exact match
  Conditions
  Actions
    Game - Defeat Player 8 (Pink) with the message: Kicked!
ping avaibel
  Events
    Unit - A unit Gains a level
  Conditions
    (Hero level of (Triggering unit)) Equal to 10
  Actions
    Game - Display to (Player group((Owner of (Triggering unit)))) the text: You can use now the Ping Skill
    Sound - Play Hint <gen>
    Quest - Flash the quest dialog button
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_pingstart_Actions takes nothing returns nothing
    local integer pepsi
    set udg_ToPing[GetConvertedPlayerId(GetTriggerPlayer())] = StringCase(SubStringBJ(GetEventPlayerChatString(), 7, 10), false)
    if ( GetUnitLevel(udg_Hero[GetConvertedPlayerId(GetTriggerPlayer())]) >= 10 and udg_deathcheck[GetConvertedPlayerId(GetTriggerPlayer())] == false ) then
        set pepsi = 0
        loop
            exitwhen pepsi > 66
            if ( udg_ToPing[GetConvertedPlayerId(GetTriggerPlayer())] == udg_Ping[pepsi] ) then
                call ConditionalTriggerExecute( gg_trg_ping )
            else
            endif
            set pepsi = pepsi + 1
        endloop
    else
        if ( udg_deathcheck[GetConvertedPlayerId(GetTriggerPlayer())] == false ) then
            call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "|CFFC70000You are not Skilled enough" )
        else
            call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "|CFFC70000Dead People can't ping" )
        endif
    endif
endfunction

//===========================================================================
function InitTrig_pingstart takes nothing returns nothing
    set gg_trg_pingstart = CreateTrigger(  )
    call TriggerRegisterPlayerChatEvent( gg_trg_pingstart, Player(0), "-ping", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_pingstart, Player(1), "-ping", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_pingstart, Player(2), "-ping", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_pingstart, Player(3), "-ping", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_pingstart, Player(4), "-ping", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_pingstart, Player(5), "-ping", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_pingstart, Player(6), "-ping", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_pingstart, Player(7), "-ping", false )
    call TriggerAddAction( gg_trg_pingstart, function Trig_pingstart_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_ping_Func002Func003A takes nothing returns nothing
    local location udg_tmpPoint
    if ( GetItemType(GetEnumItem()) == ITEM_TYPE_CHARGED ) then
        set udg_tmpPoint = GetItemLoc(GetEnumItem())
        call PingMinimapLocForForceEx( GetPlayersAll(), udg_tmpPoint, 5.00, bj_MINIMAPPINGSTYLE_SIMPLE, 80.00, 40.00, 80.00 )
        call RemoveLocation(udg_tmpPoint)
    endif
endfunction

function Trig_ping_Func003Func003A takes nothing returns nothing
    local location udg_tmpPoint
    if ( GetItemType(GetEnumItem()) == ITEM_TYPE_PURCHASABLE or GetItemType(GetEnumItem()) == ITEM_TYPE_ARTIFACT ) then
        set udg_tmpPoint = GetItemLoc(GetEnumItem())
        call PingMinimapLocForForceEx( GetPlayersAll(), udg_tmpPoint, 5.00, bj_MINIMAPPINGSTYLE_SIMPLE, 33.00, 33.00, 33.00 )
        call RemoveLocation(udg_tmpPoint)
    endif
endfunction

function Trig_ping_Func004Func003A takes nothing returns nothing
    local location udg_tmpPoint
    if ( GetItemType(GetEnumItem()) == ITEM_TYPE_PURCHASABLE ) then
        set udg_tmpPoint = GetItemLoc(GetEnumItem())
        call PingMinimapLocForForceEx( GetPlayersAll(), udg_tmpPoint, 5.00, bj_MINIMAPPINGSTYLE_SIMPLE, 33.00, 33.00, 33.00 )
        call RemoveLocation(udg_tmpPoint)
    endif
endfunction

function Trig_ping_Func005Func003A takes nothing returns nothing
    local location udg_tmpPoint
    if ( GetItemType(GetEnumItem()) == ITEM_TYPE_ARTIFACT ) then
        set udg_tmpPoint = GetItemLoc(GetEnumItem())
        call PingMinimapLocForForceEx( GetPlayersAll(), udg_tmpPoint, 5.00, bj_MINIMAPPINGSTYLE_SIMPLE, 33.00, 33.00, 33.00 )
        call RemoveLocation(udg_tmpPoint)
    endif
endfunction

function Trig_ping_Func006Func003A takes nothing returns nothing
    local location udg_tmpPoint
    local integer IDitem
    set IDitem = GetItemTypeId(GetEnumItem())
    if ( IDitem == 'I008' or IDitem == 'I019' or  IDitem == 'I018' or IDitem == 'I017') then
        set udg_tmpPoint = GetItemLoc(GetEnumItem())
        call PingMinimapLocForForceEx( GetPlayersAll(), udg_tmpPoint, 5.00, bj_MINIMAPPINGSTYLE_SIMPLE, 0.00, 50.00, 0.00 )
        call RemoveLocation(udg_tmpPoint)
    endif
endfunction

function Trig_ping_Func007Func003A takes nothing returns nothing
    local location udg_tmpPoint
    if ( GetItemType(GetEnumItem()) == ITEM_TYPE_PERMANENT ) then
        set udg_tmpPoint = GetItemLoc(GetEnumItem())
        call PingMinimapLocForForceEx( GetPlayersAll(), udg_tmpPoint, 5.00, bj_MINIMAPPINGSTYLE_SIMPLE, 0.00, 0.00, 50.00 )
        call RemoveLocation(udg_tmpPoint)
    endif
endfunction

function Trig_ping_Func008Func003A takes nothing returns nothing
    local location udg_tmpPoint
    local integer IDitem
    set IDitem = GetItemTypeId(GetEnumItem())
    if ( IDitem == 'I01O' or IDitem == 'I00V' or IDitem == 'I00M' or IDitem == 'I002' or IDitem == 'I003' or IDitem == 'I001' or IDitem == 'I00D' or IDitem == 'I006' or IDitem == 'I00T') then
        set udg_tmpPoint = GetItemLoc(GetEnumItem())
        call PingMinimapLocForForceEx( GetPlayersAll(), udg_tmpPoint, 5.00, bj_MINIMAPPINGSTYLE_SIMPLE, 80.00, 40.00, 80.00 )
        call RemoveLocation(udg_tmpPoint)
    endif
endfunction

function Trig_ping_Func009Func003A takes nothing returns nothing
    local location udg_tmpPoint
    local integer IDitem
    set IDitem = GetItemTypeId(GetEnumItem())
    if ( IDitem == 'I010' or IDitem == 'I001' or IDitem == 'I006' or IDitem == 'I00B' or IDitem == 'I002' or IDitem == 'I003' ) then
        set udg_tmpPoint = GetItemLoc(GetEnumItem())
        call PingMinimapLocForForceEx( GetPlayersAll(), udg_tmpPoint, 5.00, bj_MINIMAPPINGSTYLE_SIMPLE, 80.00, 40.00, 80.00 )
        call RemoveLocation(udg_tmpPoint)
    endif
endfunction

function Trig_ping_Func010Func003A takes nothing returns nothing
    local location udg_tmpPoint
    local integer IDitem
    set IDitem = GetItemTypeId(GetEnumItem())
    if ( IDitem == 'I00G' or IDitem == 'I00H' or IDitem == 'I01F' or IDitem == 'I00O' or IDitem == 'I00T' ) then
        set udg_tmpPoint = GetItemLoc(GetEnumItem())
        call PingMinimapLocForForceEx( GetPlayersAll(), udg_tmpPoint, 5.00, bj_MINIMAPPINGSTYLE_SIMPLE, 80.00, 40.00, 80.00 )
        call RemoveLocation(udg_tmpPoint)
    endif
endfunction

function Trig_ping_Func011Func003A takes nothing returns nothing
    local location udg_tmpPoint
    local integer IDitem
    set IDitem = GetItemTypeId(GetEnumItem())
    if ( IDitem == 'I012' or IDitem == 'I01H' or IDitem == 'I004' or IDitem == 'I011' or IDitem == 'I01U') then
        set udg_tmpPoint = GetItemLoc(GetEnumItem())
        call PingMinimapLocForForceEx( GetPlayersAll(), udg_tmpPoint, 5.00, bj_MINIMAPPINGSTYLE_SIMPLE, 80.00, 0.00, 0.00 )
        call RemoveLocation(udg_tmpPoint)
    endif
endfunction

function Trig_ping_Func012Func002Func001Func002A takes nothing returns nothing
    local location udg_tmpPoint
    if ( GetItemTypeId(GetEnumItem()) == udg_FindPing[(udg_PingItgr[GetConvertedPlayerId(GetTriggerPlayer())] - 10 )] ) then
        set udg_tmpPoint = GetItemLoc(GetEnumItem())
        call PingMinimapLocForForceEx( GetPlayersAll(), udg_tmpPoint, 5.00, bj_MINIMAPPINGSTYLE_SIMPLE, 50.00, 50.00, 50.00 )
        call RemoveLocation(udg_tmpPoint)
    endif
endfunction

function Trig_ping_Func013Func002Func001Func003A takes nothing returns nothing
    local location udg_tmpPoint
    if ( GetItemTypeId(GetEnumItem()) == udg_FindPing[( udg_PingItgr[GetConvertedPlayerId(GetTriggerPlayer())] - 10 )] ) then
        set udg_tmpPoint = GetItemLoc(GetEnumItem())
        call PingMinimapLocForForceEx( GetPlayersAll(), udg_tmpPoint, 5.00, bj_MINIMAPPINGSTYLE_SIMPLE, 50.00, 50.00, 50.00 )
        call RemoveLocation(udg_tmpPoint)
    endif
endfunction

function Trig_ping_Func014Func002Func001Func003A takes nothing returns nothing
    local location udg_tmpPoint
    if ( GetItemTypeId(GetEnumItem()) == udg_FindPing[( udg_PingItgr[GetConvertedPlayerId(GetTriggerPlayer())] - 10 )] ) then
        set udg_tmpPoint = GetItemLoc(GetEnumItem())
        call PingMinimapLocForForceEx( GetPlayersAll(), udg_tmpPoint, 5.00, bj_MINIMAPPINGSTYLE_SIMPLE, 50.00, 50.00, 50.00 )
        call RemoveLocation(udg_tmpPoint)
    endif
endfunction

function Trig_ping_Func015Func002Func001Func003A takes nothing returns nothing
    local location udg_tmpPoint
    if ( GetItemTypeId(GetEnumItem()) == udg_FindPing[( udg_PingItgr[GetConvertedPlayerId(GetTriggerPlayer())] - 10 )] ) then
        set udg_tmpPoint = GetItemLoc(GetEnumItem())
        call PingMinimapLocForForceEx( GetPlayersAll(), udg_tmpPoint, 5.00, bj_MINIMAPPINGSTYLE_SIMPLE, 80.00, 40.00, 80.00 )
        call RemoveLocation(udg_tmpPoint)
    endif
endfunction

function Trig_ping_Func016Func003A takes nothing returns nothing
    local location udg_tmpPoint
    local integer IDitem
    set IDitem = GetItemTypeId(GetEnumItem())
    if ( IDitem == 'I01I' or IDitem == 'I01L' ) then
        set udg_tmpPoint = GetItemLoc(GetEnumItem())
        call PingMinimapLocForForceEx( GetPlayersAll(), udg_tmpPoint, 5.00, bj_MINIMAPPINGSTYLE_SIMPLE, 70.00, 80.00, 10.00 )
        call RemoveLocation(udg_tmpPoint)
    endif
endfunction



function Trig_ping_Actions takes nothing returns nothing
    local rect PingRect
    local integer level
    local string pingstr
    set level = GetHeroLevel(udg_Hero[GetConvertedPlayerId(GetTriggerPlayer())])
    set pingstr = udg_ToPing[GetConvertedPlayerId(GetTriggerPlayer())]
    set PingRect = RectFromCenterSizeBJ(GetUnitLoc(udg_Hero[GetConvertedPlayerId(GetTriggerPlayer())]), ( 60.00 * ( 30.00 + I2R(level) ) ), ( 60.00 * ( 30.00 + I2R(level) ) ))
    if ( level >= 10 and  level <= 90 and pingstr == "ammo") then
        call DisplayTextToForce( GetPlayersAll(), ( "Pinging " + ( pingstr + ( ( " within Range of " + ( I2S(( 60 * ( 30 + level ) )) + " Units" ) ) + "." ) ) ) )
        call EnumItemsInRectBJ( PingRect, function Trig_ping_Func002Func003A )
        return
    endif
   
    if ( level >= 20 and level <= 40 and pingstr == "wepn") then
        call DisplayTextToForce( GetPlayersAll(), ( "Pinging " + ( pingstr + ( ( " within Range of " + ( I2S(( 60 * ( 30 + level ) )) + " Units" ) ) + "." ) ) ) )
        call EnumItemsInRectBJ( PingRect, function Trig_ping_Func003Func003A )
        return
    endif
   
    if ( level >= 30 and level <= 160 and pingstr == "guns") then
        call DisplayTextToForce( GetPlayersAll(), ( "Pinging " + ( pingstr + ( ( " within Range of " + ( I2S(( 60 * ( 30 + level ) )) + " Units" ) ) + "." ) ) ) )
        call EnumItemsInRectBJ( PingRect, function Trig_ping_Func004Func003A )
        return
    else
    endif
    if ( level >= 40 and level <= 160 and pingstr == "wep2" ) then
        call DisplayTextToForce( GetPlayersAll(), ( "Pinging " + ( pingstr + ( ( " within Range of " + ( I2S(( 60 * ( 30 + level ) )) + " Units" ) ) + "." ) ) ) )
        call EnumItemsInRectBJ( PingRect, function Trig_ping_Func005Func003A )
        return
    else
    endif
    if ( level >= 50 and pingstr == "medi") then
        call DisplayTextToForce( GetPlayersAll(), ( "Pinging " + ( pingstr + ( ( " within Range of " + ( I2S(( 60 * ( 30 + level ) )) + " Units" ) ) + "." ) ) ) )
        call EnumItemsInRectBJ( PingRect, function Trig_ping_Func006Func003A )
        return
    else
    endif
    if ( level >= 60 and pingstr == "armr") then
        call DisplayTextToForce( GetPlayersAll(), ( "Pinging " + ( pingstr + ( ( " within Range of " + ( I2S(( 60 * ( 30 + level ) )) + " Units" ) ) + "." ) ) ) )
        call EnumItemsInRectBJ( PingRect, function Trig_ping_Func007Func003A )
        return
    else
    endif
    if ( level >= 70 and level <= 180 and pingstr == "guam" ) then
        call DisplayTextToForce( GetPlayersAll(), ( "Pinging " + ( pingstr + ( ( " within Range of " + ( I2S(( 60 * ( 30 + level ) )) + " Units" ) ) + "." ) ) ) )
        call EnumItemsInRectBJ( PingRect, function Trig_ping_Func008Func003A )
        return
    else
    endif
    if ( level >= 80 and level <= 180 and pingstr == "smam") then
        call DisplayTextToForce( GetPlayersAll(), ( "Pinging " + ( pingstr + ( ( " within Range of " + ( I2S(( 60 * ( 30 + level ) )) + " Units" ) ) + "." ) ) ) )
        call EnumItemsInRectBJ( PingRect, function Trig_ping_Func009Func003A )
        return
    else
    endif
    if ( level >= 90 and level <= 180 and pingstr == "riam" ) then
        call DisplayTextToForce( GetPlayersAll(), ( "Pinging " + ( pingstr + ( ( " within Range of " + ( I2S(( 60 * ( 30 + level ) )) + " Units" ) ) + "." ) ) ) )
        call EnumItemsInRectBJ( PingRect, function Trig_ping_Func010Func003A )
        return
    else
    endif
    if ( level >= 100 and pingstr == "expl") then
        call DisplayTextToForce( GetPlayersAll(), ( "Pinging " + ( pingstr + ( ( " within Range of " + ( I2S(( 60 * ( 30 + level ) )) + " Units" ) ) + "." ) ) ) )
        call EnumItemsInRectBJ( PingRect, function Trig_ping_Func011Func003A )
        return
    else
    endif
    if ( level >= 120 ) then
        set udg_PingItgr[GetConvertedPlayerId( GetTriggerPlayer(  ) )] = 11
        loop
            exitwhen udg_PingItgr[GetConvertedPlayerId( GetTriggerPlayer(  ) )] > 23
            if ( pingstr == udg_Ping[udg_PingItgr[GetConvertedPlayerId(GetTriggerPlayer())]] ) then
                call DisplayTextToForce( GetPlayersAll(), ( "Pinging " + ( pingstr + ( ( " within Range of " + ( I2S(( 60 * ( 30 + level ) )) + " Units" ) ) + "." ) ) ) )
                call EnumItemsInRectBJ( PingRect, function Trig_ping_Func012Func002Func001Func002A )
                return
            else
            endif
            set udg_PingItgr[GetConvertedPlayerId( GetTriggerPlayer(  ) )] = udg_PingItgr[GetConvertedPlayerId( GetTriggerPlayer(  ) )] + 1
        endloop
    else
    endif
    if ( level >= 140 ) then
        set udg_PingItgr[GetConvertedPlayerId( GetTriggerPlayer(  ) )] = 24
        loop
            exitwhen udg_PingItgr[GetConvertedPlayerId( GetTriggerPlayer(  ) )] > 31
            if ( pingstr == udg_Ping[udg_PingItgr[GetConvertedPlayerId(GetTriggerPlayer())]] ) then
                call DisplayTextToForce( GetPlayersAll(), ( "Pinging " + ( pingstr + ( ( " within Range of " + ( I2S(( 60 * ( 30 + level ) )) + " Units" ) ) + "." ) ) ) )
                call EnumItemsInRectBJ( PingRect, function Trig_ping_Func013Func002Func001Func003A )
                return
            else
            endif
            set udg_PingItgr[GetConvertedPlayerId( GetTriggerPlayer(  ) )] = udg_PingItgr[GetConvertedPlayerId( GetTriggerPlayer(  ) )] + 1
        endloop
    else
    endif
    if ( level >= 160 ) then
        set udg_PingItgr[GetConvertedPlayerId( GetTriggerPlayer(  ) )] = 32
        loop
            exitwhen udg_PingItgr[GetConvertedPlayerId( GetTriggerPlayer(  ) )] > 49
            if ( pingstr == udg_Ping[udg_PingItgr[GetConvertedPlayerId(GetTriggerPlayer())]] ) then
                call DisplayTextToForce( GetPlayersAll(), ( "Pinging " + ( pingstr + ( ( " within Range of " + ( I2S(( 60 * ( 30 + level ) )) + " Units" ) ) + "." ) ) ) )
                call EnumItemsInRectBJ( PingRect, function Trig_ping_Func014Func002Func001Func003A )
                return
            else
            endif
            set udg_PingItgr[GetConvertedPlayerId( GetTriggerPlayer(  ) )] = udg_PingItgr[GetConvertedPlayerId( GetTriggerPlayer(  ) )] + 1
        endloop
    else
    endif
    if ( level >= 180 ) then
        set udg_PingItgr[GetConvertedPlayerId( GetTriggerPlayer(  ) )] = 50
        loop
            exitwhen udg_PingItgr[GetConvertedPlayerId( GetTriggerPlayer(  ) )] > 65
            if ( pingstr == udg_Ping[udg_PingItgr[GetConvertedPlayerId(GetTriggerPlayer())]] ) then
                call DisplayTextToForce( GetPlayersAll(), ( "Pinging " + ( pingstr + ( ( " within Range of " + ( I2S(( 60 * ( 30 + level ) )) + " Units" ) ) + "." ) ) ) )
                call EnumItemsInRectBJ( PingRect, function Trig_ping_Func015Func002Func001Func003A )
                return
            else
            endif
            set udg_PingItgr[GetConvertedPlayerId( GetTriggerPlayer(  ) )] = udg_PingItgr[GetConvertedPlayerId( GetTriggerPlayer(  ) )] + 1
        endloop
    else
    endif
    if ( level >= 200 and pingstr == "sent") then
        call DisplayTextToForce( GetPlayersAll(), ( "Pinging " + ( pingstr + ( ( " within Range of " + ( I2S(( 60 * ( 30 + level ) )) + " Units" ) ) + "." ) ) ) )
        call EnumItemsInRectBJ( PingRect, function Trig_ping_Func016Func003A )
        return
    else
    endif
    call RemoveRect(PingRect)
endfunction

//===========================================================================
function InitTrig_ping takes nothing returns nothing
    set gg_trg_ping = CreateTrigger(  )
    call TriggerAddAction( gg_trg_ping, function Trig_ping_Actions )
endfunction
Xp gain
  Events
    Unit - A unit Dies
  Conditions
    (Unit-type of (Killing unit)) Equal to .17 cal. Stantionary Machine-Gun
  Actions
    Custom script: local location udg_tmpPoint
    Set VariableSet tmpPoint = (Position of (Killing unit))
    Custom script: set bj_wantDestroyGroup = true
    Unit Group - Pick every unit in (Units within 4096.00 of tmpPoint.) and do (Actions)
      Loop - Actions
        Hero - Add (1 + ((200 - (Level of (Picked unit))) / 10)) experience to (Picked unit), Show level-up graphics
    Custom script: call RemoveLocation(udg_tmpPoint)
Xp gain 20mm
  Events
    Unit - A unit Dies
  Conditions
    (Unit-type of (Killing unit)) Equal to 20mm Stantionary Gun
  Actions
    Custom script: local location udg_tmpPoint
    Set VariableSet tmpPoint = (Position of (Killing unit))
    Custom script: set bj_wantDestroyGroup = true
    Unit Group - Pick every unit in (Units within 4096.00 of tmpPoint.) and do (Actions)
      Loop - Actions
        Hero - Add (1 + ((200 - (Level of (Picked unit))) / 10)) experience to (Picked unit), Show level-up graphics
    Custom script: call RemoveLocation(udg_tmpPoint)
Ammosys
  Events
    Unit - A unit Is attacked
  Conditions
    (Unit-type of (Attacking unit)) Equal to .17 cal. Stantionary Machine-Gun
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Mana of (Attacking unit)) Greater than 0.00
      Then - Actions
        Sound - Play UMP_45__Full_Auto_u <gen> at 100% volume, attached to (Attacking unit)
        Special Effect - Create a special effect attached to the weapon (attachpoint) of (Attacking unit) using Konstrukt_MinigunEffectAttachment.MDX
        Special Effect - Destroy (Last created special effect)
        Unit - Set mana of (Attacking unit) to ((Mana of (Attacking unit)) - 1)
      Else - Actions
        Unit - Order (Attacking unit) to Stop.
Ammosys 20mm
  Events
    Unit - A unit Is attacked
  Conditions
    (Unit-type of (Attacking unit)) Equal to 20mm Stantionary Gun
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Mana of (Attacking unit)) Greater than 0.00
      Then - Actions
        Sound - Play 20mm <gen> at 100% volume, attached to (Attacking unit)
        Unit - Set mana of (Attacking unit) to ((Mana of (Attacking unit)) - 1)
      Else - Actions
        Unit - Order (Attacking unit) to Stop.
Reloading
  Events
    Unit - A unit Begins channeling an ability
  Conditions
    (Ability being cast) Equal to Turrent Ammo Pack
  Actions
    Sound - Play FN_Minime_reload <gen> at 100% volume, attached to (Target unit of ability being cast)
Reloading 20mm
  Events
    Unit - A unit Begins channeling an ability
  Conditions
    (Ability being cast) Equal to Turrent Ammo Pack 20mm
  Actions
    Sound - Play Steyr_Scout_Reload <gen> at 100% volume, attached to (Target unit of ability being cast)
Gate
  Events
    Time - Elapsed game time is 5 seconds
  Conditions
  Actions
    Destructible - Make Gate 4745 <gen> Invulnerable
call AMHS_DisableFogEngine()
call AMHS_DisableInvisEngine()
call AMHS_EnableInvisEngine()
call AMHS_EnableFogEngine(

call PolledWait(2))
CanRestart
  Events
    Time - Every 2 seconds of game time
  Conditions
    And - All (Conditions) are true
      Conditions
        deathcheck[1] Equal to True
        deathcheck[2] Equal to True
        deathcheck[3] Equal to True
        deathcheck[4] Equal to True
        deathcheck[5] Equal to True
        deathcheck[6] Equal to True
        deathcheck[7] Equal to True
        deathcheck[8] Equal to True
  Actions
    Trigger - Turn off (This trigger)
    Countdown Timer - Pause Timertmp
    Game - Display to (All players) the text: ((Name of Player 1 (Red)) + can now restart the map with -restart)
    Sound - Play Hint <gen>
    Wait 30.00 seconds
    Trigger - Turn on (This trigger)
Start Ini
  Events
    Map initialization
  Conditions
  Actions
    Set VariableSet Spawns[0] = Spawn_0 <gen>
    Set VariableSet Spawns[1] = Spawn_1 <gen>
    Set VariableSet Spawns[2] = Spawn__2 <gen>
    Set VariableSet Spawns[3] = Spawn__3 <gen>
    Set VariableSet Spawns[4] = Spawn_Mini_1 <gen>
    Set VariableSet Spawns[5] = Spawn_Mini_2 <gen>
    Set VariableSet Spawns[6] = Spawn_Mini_3 <gen>
    Set VariableSet Spawns[7] = Spawn_Mini_4 <gen>
    Set VariableSet Ping[0] = wepn
    Set VariableSet Ping[1] = ammo
    Set VariableSet Ping[2] = guns
    Set VariableSet Ping[3] = wep2
    Set VariableSet Ping[4] = medi
    Set VariableSet Ping[5] = armr
    Set VariableSet Ping[6] = guam
    Set VariableSet Ping[7] = smam
    Set VariableSet Ping[8] = riam
    Set VariableSet Ping[9] = expl
    Set VariableSet Ping[10] = wepn
    Set VariableSet Ping[11] = br9s
    Set VariableSet Ping[12] = br9r
    Set VariableSet Ping[13] = copy
    Set VariableSet Ping[14] = fnfs
    Set VariableSet Ping[15] = fire
    Set VariableSet Ping[16] = husp
    Set VariableSet Ping[17] = imib
    Set VariableSet Ping[18] = dgel
    Set VariableSet Ping[19] = maus
    Set VariableSet Ping[20] = saur
    Set VariableSet Ping[21] = sm50
    Set VariableSet Ping[22] = flpi
    Set VariableSet Ping[23] = coon
    -------- -- --------
    Set VariableSet Ping[24] = smp5
    Set VariableSet Ping[25] = smp7
    Set VariableSet Ping[26] = sump
    Set VariableSet Ping[27] = mc10
    Set VariableSet Ping[28] = muzi
    Set VariableSet Ping[29] = pp90
    Set VariableSet Ping[30] = fp90
    Set VariableSet Ping[31] = scor
    Set VariableSet Ping[32] = colt
    Set VariableSet Ping[33] = scar
    Set VariableSet Ping[34] = gali
    Set VariableSet Ping[35] = dbsg
    Set VariableSet Ping[36] = itac
    Set VariableSet Ping[37] = comm
    Set VariableSet Ping[38] = saug
    Set VariableSet Ping[39] = scou
    Set VariableSet Ping[40] = valt
    Set VariableSet Ping[41] = winc
    Set VariableSet Ping[42] = fnme
    Set VariableSet Ping[43] = ak47
    Set VariableSet Ping[44] = brow
    Set VariableSet Ping[45] = awmr
    Set VariableSet Ping[46] = saig
    Set VariableSet Ping[47] = ex41
    Set VariableSet Ping[48] = hk69
    Set VariableSet Ping[49] = neli
    -------- -- --------
    Set VariableSet Ping[50] = 12gu
    Set VariableSet Ping[51] = 4.6r
    Set VariableSet Ping[52] = 5.56
    Set VariableSet Ping[53] = 7.62
    Set VariableSet Ping[54] = 9mmr
    Set VariableSet Ping[55] = ss19
    Set VariableSet Ping[56] = .223
    Set VariableSet Ping[57] = 26mm
    Set VariableSet Ping[58] = .338
    Set VariableSet Ping[59] = .35m
    Set VariableSet Ping[60] = 40mm
    Set VariableSet Ping[61] = .35s
    Set VariableSet Ping[62] = .40r
    Set VariableSet Ping[63] = .44m
    Set VariableSet Ping[64] = .45r
    Set VariableSet Ping[65] = .500
    Set VariableSet Ping[66] = sent
    Set VariableSet FindPing[1] = Beretta 9000S
    Set VariableSet FindPing[2] = Beretta 93R
    Set VariableSet FindPing[3] = Colt Python .357
    Set VariableSet FindPing[4] = FN Five-Seven
    Set VariableSet FindPing[5] = Firestar 9mm
    Set VariableSet FindPing[6] = Heckler&Koch USP
    Set VariableSet FindPing[7] = IMI Barak
    Set VariableSet FindPing[8] = Desert Eagle .44
    Set VariableSet FindPing[9] = Mauser M2 .45
    Set VariableSet FindPing[10] = SIG Sauer Pro 2340
    Set VariableSet FindPing[11] = Smith&Wesson .500
    Set VariableSet FindPing[12] = 26mm Flare Pistol
    Set VariableSet FindPing[13] = Coonan .357
    -------- -- --------
    Set VariableSet FindPing[14] = H&K MP-5 (.40S&W)
    Set VariableSet FindPing[15] = H&K MP-7 PDW
    Set VariableSet FindPing[16] = H&K UMP-45
    Set VariableSet FindPing[17] = Ingram Mac10
    Set VariableSet FindPing[18] = Micro Uzi
    Set VariableSet FindPing[19] = PP90-M1
    Set VariableSet FindPing[20] = FN P90
    Set VariableSet FindPing[21] = Vz.65 Scorpion
    Set VariableSet FindPing[22] = Colt M4A1
    Set VariableSet FindPing[23] = FN SCAR-H
    Set VariableSet FindPing[24] = IMI M-Galil
    Set VariableSet FindPing[25] = IZH-27 Double-Barreled Shotgun
    Set VariableSet FindPing[26] = Ithaca 37
    Set VariableSet FindPing[27] = SIG SSG 552 Commando
    Set VariableSet FindPing[28] = Steyr AUG A1
    Set VariableSet FindPing[29] = Steyr Scout Tactical
    Set VariableSet FindPing[30] = Valtro PM-5
    Set VariableSet FindPing[31] = Winchester .44
    Set VariableSet FindPing[32] = FN Minime
    Set VariableSet FindPing[33] = AK-47
    Set VariableSet FindPing[34] = Browning Fusion Elite
    Set VariableSet FindPing[35] = Al Arctic Warfare Rifle
    Set VariableSet FindPing[36] = Saiga-12
    Set VariableSet FindPing[37] = EX-41 Pump-Action Launcher
    Set VariableSet FindPing[38] = H&K 69
    Set VariableSet FindPing[39] = Benelli Nova Tactical
    Set VariableSet FindPing[40] = 12 Gauge Shotgun Shells
    Set VariableSet FindPing[41] = 4,6mm Rounds
    Set VariableSet FindPing[42] = 5,56mm Rounds
    Set VariableSet FindPing[43] = 7,62mm Rounds
    Set VariableSet FindPing[44] = 9mm Rounds
    Set VariableSet FindPing[45] = SS190 Rounds
    Set VariableSet FindPing[46] = .223 Ammo Belt
    Set VariableSet FindPing[47] = 26mm Flare Shells
    Set VariableSet FindPing[48] = .338 Lapua Magnum
    Set VariableSet FindPing[49] = .357 Magnum
    Set VariableSet FindPing[50] = 40mm Grenade Shells
    Set VariableSet FindPing[51] = .357 SIG Rounds
    Set VariableSet FindPing[52] = .40 S&W Rounds
    Set VariableSet FindPing[53] = .44 Magnum
    Set VariableSet FindPing[54] = .45 ACP Rounds
    Set VariableSet FindPing[55] = .500 Magnum
    Quest - Create a Required quest titled How to reload ? with the description If you need to reload your weapon, first of all you must be attached with it. Then you have to click to its icon in your inventory. But you have also have right ammunition for that weapon in your inventory., using icon path ReplaceableTextures\CommandButtons\BTN 338 Lapua Magnum Ammo.tga
    Quest - Create a Required quest titled What ammo do i need ? with the description When you get a new weapon, first of all read about it in your inventory. There its written what ammotype it uses. Then try to find that kind of ammo on the map., using icon path ReplaceableTextures\WorldEditUI\Editor-Random-Item.blp
    Quest - Create a Required quest titled SMG or Rifle ? with the description If you don't know what is better for you then read this. SMG (Sub-Machine-Guns) use pistol ammunition (9mm, .45 ACP and other), so you can use same ammunition for both - pistol and smg. But rifles have more range and more damage. Its harded to find ammunition for them on the map., using icon path ReplaceableTextures\WorldEditUI\Editor-Random-Item.blp
    Quest - Create a Required quest titled It shoots TOO fast ! with the description If your weapon is shooting too fast and ammunition runs down fast too, then switch the weapon to single-shot mode (Semi-Auto mode).A lot of SMG's and Rifles have this ability., using icon path ReplaceableTextures\CommandButtons\BTN SEMI-AUTO Mode.tga
    Quest - Create a Required quest titled Out of ammunition ? with the description If you have no ammunition for both - primary and secondary weapons, but enemy is close, then use your knife., using icon path ReplaceableTextures\CommandButtons\BTN Knife.tga
    Quest - Create a Required quest titled The Mission ? with the description Your Mission is too stand against any threats till the reinforcment arrives., using icon path ReplaceableTextures\CommandButtons\BTN Knife.tga
    Quest - Create a Optional quest titled Credits with the description Orginal Map & Idea Alex-KnightTrigger enhancing by ck-GodlessThx too:All TestersVisit us: www.chaoskrieger.com, using icon path ReplaceableTextures\CommandButtons\BTNBookOfTheDead.blp
    Quest - Create a Optional quest titled HELP?! with the description Here are the basic Commands:-load XXXXXX-XXXXXX loads the xp which was saved in an other game-save saves the Xp and give back an code, can be used once per Round-restart (red only) if all heros are down you can restart the map-ping XXXX pings diffent items look into the Ping Command quest (lvl 10 cap), using icon path ReplaceableTextures\CommandButtons\BTNBookOfTheDead.blp
    Quest - Create a Optional quest titled Ping Command with the description Here are the Commands and the level caps:Level 10-90|n -ping ammo pings ammo suppliesLevel 20-40|n -ping wepn pings all kind of weaponsLevel 30-160|n -ping guns pings all handgunsLevel 40-160|n -ping wep2 ping weapons exc. handgunsLevel 50-160|n -ping medi pings medical suppliesLevel 60 |n -ping armr pings armorsLevel 70-180|n -ping guam pings ammo supplies for handgunsLevel 80-180|n -ping smam pings ammo supplies for SMGsLevel 90-180|n -ping riam pings ammo supplies for RifelsLevel 100 |n -ping expl pings explosivesLevel 120 |n -ping XXXX u can ping an spezific handgun (lookup in item discription)Level 140 |n -ping XXXX u can ping an spezific SMG (lookup in item discription)Level 160 |n -ping XXXX u can ping an spezific Rifel (lookup in item discription)Level 180 |n -ping XXXX u can ping an spezific ammo type (lookup in item discription)Level 200 |n -ping sent pings AutoTurrets and .17 cal Ammo, using icon path ReplaceableTextures\CommandButtons\BTNBookOfTheDead.blp
    Set VariableSet ColorStr[1] = |CFFFF0000
    Set VariableSet ColorStr[2] = |CFF0000FF
    Set VariableSet ColorStr[3] = |CFF18E7BD
    Set VariableSet ColorStr[4] = |CFF520084
    Set VariableSet ColorStr[5] = |CFFFFFF00
    Set VariableSet ColorStr[6] = |CFFFF8A08
    Set VariableSet ColorStr[7] = |CFF18BE00
    Set VariableSet ColorStr[8] = |CFFE759AD
    Set VariableSet WaveTrigger[1] = Coming_W1 <gen>
    Set VariableSet WaveTrigger[2] = Coming_W2 <gen>
    Set VariableSet WaveTrigger[3] = Coming_W3 <gen>
    Set VariableSet WaveTrigger[4] = Coming_W4 <gen>
    Set VariableSet WaveTrigger[5] = Coming_W5 <gen>
    Set VariableSet WaveTrigger[6] = Coming_W6 <gen>
    Set VariableSet WaveTrigger[7] = Coming_W7 <gen>
    Set VariableSet WaveTrigger[8] = Coming_W8 <gen>
    Set VariableSet WaveTrigger[9] = Coming_W9 <gen>
    Set VariableSet WaveTrigger[10] = Coming_W10 <gen>
    Set VariableSet WaveTrigger[11] = Boss_W1 <gen>
    Set VariableSet WaveTrigger[12] = Boss_W2 <gen>
    Set VariableSet WaveTrigger[13] = Boss_W3 <gen>
    Set VariableSet WaveTrigger[14] = Boss_W4 <gen>
    Set VariableSet WaveTrigger[15] = Boss_W5 <gen>
    Set VariableSet WaveTrigger[16] = Boss_W6 <gen>
    Set VariableSet WaveTrigger[17] = Boss_W7 <gen>
    Set VariableSet WaveTrigger[18] = Boss_W8 <gen>
    Set VariableSet WaveTrigger[19] = Boss_W9 <gen>
    Set VariableSet WaveTrigger[20] = Boss_W10 <gen>
    Game - Preload Konstrukt_AdvancedLightMarine.MDX (anyfile)
    Game - Preload Konstrukt_AssaultRifleMissile.MDX (anyfile)
    Game - Preload Konstrukt_MinigunEffectAttachment.MDX (anyfile)
    Game - Preload Konstrukt_MinigunMissile.MDX (anyfile)
    Game - Preload Konstrukt_ShotgunAttachment.MDX (anyfile)
    Game - Preload Konstrukt_ShotgunEffektAttachment.MDX (anyfile)
    Game - Preload Konstrukt_ShotgunMissile.MDX (anyfile)
    Game - Preload Konstrukt_SniperAttachment.MDX (anyfile)
    Game - Preload Konstrukt_SniperMissile01.MDX (anyfile)
    Game - Preload Konstrukt_SubmachinegunAttachment.MDX (anyfile)
    Game - Preload NewGroundEX.mdx (anyfile)
    Game - Preload NewMassiveEX.mdx (anyfile)
    Game - Preload pistol2.MDX (anyfile)
    Game - Preload PTR-5SniperRifle-Attachment.mdx (anyfile)
    Game - Preload MWP_AK47Attachment.mdx (anyfile)
    Game - Preload MWP_AssaultRifleAttachment.mdx (anyfile)
    Game - Preload MWP_HeavySupportRilfeAttachment.mdx (anyfile)
    Game - Preload MWP_MachineGunAttachment.mdx (anyfile)
    Game - Preload MWP_SemiMachineGunAttachment.mdx (anyfile)
    Game - Preload MWP_ShotgunAttachment.mdx (anyfile)
    Game - Preload MWP_SuperShotgunAttachment.mdx (anyfile)
    Game - Begin preloading with a 1.00 second timeout
    Trigger - Run Restart <gen> (ignoring conditions)
//TESH.scrollpos=331
//TESH.alwaysfold=0
function Trig_Map_InI_Func009Func002C takes nothing returns boolean
    if ( not ( GetPlayerSlotState(GetEnumPlayer()) == PLAYER_SLOT_STATE_PLAYING ) ) then
        return false
    endif
    if ( not ( GetPlayerController(GetEnumPlayer()) != MAP_CONTROL_COMPUTER ) ) then
        return false
    endif
    return true
endfunction

function Trig_Map_InI_Func009A takes nothing returns nothing
    call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetPlayerStartLocationLoc(GetEnumPlayer()), 1.00 )
    if ( Trig_Map_InI_Func009Func002C() ) then
        set udg_singel = ( udg_singel + 1 )
    else
        call DoNothing(  )
    endif
endfunction

function Trig_Map_InI_Actions takes nothing returns nothing
    local location udg_tmpPoint
    local integer bla
    set udg_singel = 0
    call FogMaskEnableOn()
    call UseTimeOfDayBJ( false )
    call SetTimeOfDay( 0.00 )
    call PolledWait(0.5)
    call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1992" )
    call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1993" )
    call ForForce( GetPlayersAllies(Player(0)), function Trig_Map_InI_Func009A )
    call PolledWait(2)
    set bla = 1
    loop
        exitwhen bla > 5
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I008', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00A', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I029', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I01D', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00C', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I005', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00U', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I000', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00E', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I007', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set bla = bla + 1
    endloop
    call TriggerSleepAction( 0.05 )
    set bla = 1
    loop
        exitwhen bla > 10
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I004', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I01O', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set bla = bla + 1
    endloop
    set bla = 1
    loop
        exitwhen bla > 3
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I01K', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I01X', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I01M', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I01J', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00W', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I01R', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I01W', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00N', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set bla = bla + 1
    endloop
    call TriggerSleepAction( 0.33 )
    set bla = 1
    loop
        exitwhen bla > 3
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00F', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I01Q', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I01P', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I01S', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00S', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00J', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00K', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00P', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I01B', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I01C', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00I', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00Y', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00L', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00X', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I009', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set bla = bla + 1
    endloop
    set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
    call CreateItemLoc( 'I01G', udg_tmpPoint )
    call RemoveLocation(udg_tmpPoint)
    set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
    call CreateItemLoc( 'I01V', udg_tmpPoint )
    call RemoveLocation(udg_tmpPoint)
    set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
    call CreateItemLoc( 'I01T', udg_tmpPoint )
    call RemoveLocation(udg_tmpPoint)
    set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
    call CreateItemLoc( 'I02A', udg_tmpPoint )
    call RemoveLocation(udg_tmpPoint)
    set bla = 1
    loop
        exitwhen bla > 2
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I01E', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00Q', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00R', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00P', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I01A', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00Z', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I01N', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I016', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set bla = bla + 1
    endloop
    // Item Creation
    call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1995" )
    set bla = 1
    loop
        exitwhen bla > 10
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I018', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I012', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I013', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I02D', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set bla = bla + 1
    endloop
    set bla = 1
    loop
        exitwhen bla > 5
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I01I', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I02E', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I019', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I01H', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I014', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I015', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set bla = bla + 1
    endloop
    call TriggerSleepAction( 0.33 )
    set bla = 1
    loop
        exitwhen bla > 15
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I017', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I011', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set bla = bla + 1
    endloop
    // Drop Ammo across map
    call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1997" )
    set bla = 1
    loop
        exitwhen bla > 30
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00O', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00H', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00G', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I003', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set bla = bla + 1
    endloop
    call TriggerSleepAction( 0.33 )
    set bla = 1
    loop
        exitwhen bla > 20
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I001', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I006', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00B', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I002', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I01Y', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set bla = bla + 1
    endloop
    set bla = 1
    loop
        exitwhen bla > 15
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I010', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00M', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00T', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00V', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
         set bla = bla + 1
    endloop
    call TriggerSleepAction( 0.33 )
    set bla = 1
    loop
        exitwhen bla > 10
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I01L', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I02F', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I01F', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I00D', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set udg_tmpPoint = GetRandomLocInRect(GetPlayableMapRect())
        call CreateItemLoc( 'I01U', udg_tmpPoint )
        call RemoveLocation(udg_tmpPoint)
        set bla = bla + 1
    endloop
    // Map Infos
    call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1998" )
    // CPU AllSeeingEye
    call FogEnableOn()
    call FogMaskEnableOff()
    call CreateFogModifierRectBJ( true, Player(11), FOG_OF_WAR_VISIBLE, GetPlayableMapRect() )
    call FogModifierStart( GetLastCreatedFogModifier() )
    call CreateFogModifierRectBJ( true, Player(10), FOG_OF_WAR_VISIBLE, GetPlayableMapRect() )
    call FogModifierStart( GetLastCreatedFogModifier() )
    call CreateFogModifierRectBJ( true, Player(9), FOG_OF_WAR_VISIBLE, GetPlayableMapRect() )
    call FogModifierStart( GetLastCreatedFogModifier() )
    call CreateFogModifierRectBJ( true, Player(8), FOG_OF_WAR_VISIBLE, GetPlayableMapRect() )
    call FogModifierStart( GetLastCreatedFogModifier() )
    call TriggerExecute( gg_trg_Move_items )
    call TriggerExecute( gg_trg_Balanced_Players )
    //call AMHS_ReplayEngine()
    //call AMHS_MiniMapProtectEngine()
    call PolledWait(1)
    call TriggerExecute(gg_trg_Time_before)
endfunction

//===========================================================================
function InitTrig_Map_InI takes nothing returns nothing
    set gg_trg_Map_InI = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Map_InI, function Trig_Map_InI_Actions )
endfunction

 
Restart
  Events
    Player - Player 1 (Red) types a chat message containing -restart (stringnoformat) as An exact match
  Conditions
    And - All (Conditions) are true
      Conditions
        deathcheck[1] Equal to True
        deathcheck[2] Equal to True
        deathcheck[3] Equal to True
        deathcheck[4] Equal to True
        deathcheck[5] Equal to True
        deathcheck[6] Equal to True
        deathcheck[7] Equal to True
        deathcheck[8] Equal to True
  Actions
    Trigger - Turn off (This trigger)
    Trigger - Turn off Timer <gen>
    Countdown Timer - Destroy (Last created timer window)
    Destructible - Close Iron Gate 2179 <gen>
    Set VariableSet WaveOn = 1
    Set VariableSet TimerRunned = 0
    For each (Integer A) from 1 to 8, do (Actions)
      Loop - Actions
        Set VariableSet temp[((Integer A) + 10)] = (Hero experience of Hero[(Integer A)])
    Player Group - Pick every player in (All players) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Picked player) Equal to Neutral Passive
          Then - Actions
            Do nothing
          Else - Actions
            Unit Group - Pick every unit in (Units owned by (Picked player).) and do (Remove (Picked unit) from the game)
    Item - Pick every item in (Entire map) and do (Remove (Picked item))
    Wait 0.25 seconds
    Trigger - Run Map_InI <gen> (ignoring conditions)
Herodead
  Events
    Unit - A unit Dies
  Conditions
    ((Triggering unit) is A Hero) Equal to True
  Actions
    Set VariableSet deathcheck[(Player number of (Owner of (Triggering unit)))] = True
x
B
7
Y
h
k
O
!
3
L
V
u
$
J
1
E
§
Set crypt
  Events
    Map initialization
  Conditions
  Actions
    -------- alpha last 39 --------
    Set VariableSet alpha[8] = 0
    Set VariableSet alpha[39] = 1
    Set VariableSet alpha[28] = 2
    Set VariableSet alpha[12] = 3
    Set VariableSet alpha[20] = 4
    Set VariableSet alpha[38] = 5
    Set VariableSet alpha[21] = 6
    Set VariableSet alpha[37] = 7
    Set VariableSet alpha[17] = 8
    Set VariableSet alpha[31] = 9
    Set VariableSet alpha[30] = a
    Set VariableSet alpha[15] = b
    Set VariableSet alpha[2] = c
    Set VariableSet alpha[19] = d
    Set VariableSet alpha[22] = e
    Set VariableSet alpha[36] = f
    Set VariableSet alpha[23] = g
    Set VariableSet alpha[34] = h
    Set VariableSet alpha[23] = i
    Set VariableSet alpha[18] = j
    Set VariableSet alpha[28] = k
    Set VariableSet alpha[5] = l
    Set VariableSet alpha[29] = m
    Set VariableSet alpha[4] = n
    Set VariableSet alpha[16] = o
    Set VariableSet alpha[1] = p
    Set VariableSet alpha[39] = q
    Set VariableSet alpha[24] = r
    Set VariableSet alpha[35] = s
    Set VariableSet alpha[7] = t
    Set VariableSet alpha[33] = u
    Set VariableSet alpha[10] = v
    Set VariableSet alpha[6] = w
    Set VariableSet alpha[25] = x
    Set VariableSet alpha[32] = y
    Set VariableSet alpha[11] = z
    Set VariableSet alpha[26] = +
    Set VariableSet alpha[3] = -
    Set VariableSet alpha[27] = _
    Set VariableSet alpha[14] = (
    Set VariableSet alpha[9] = )
    -------- ColorSave --------
    Set VariableSet ColorSave[0] = |CFF00AEEF8
    Set VariableSet ColorSave[1] = |CFFED1C24c
    Set VariableSet ColorSave[2] = |CFF00FF00M
    Set VariableSet ColorSave[3] = |CFFED1C24q
    Set VariableSet ColorSave[4] = |CFFFFF200?
    Set VariableSet ColorSave[5] = |CFF00FF00P
    Set VariableSet ColorSave[6] = |CFFED1C24r
    Set VariableSet ColorSave[7] = |CFF00FF00H
    Set VariableSet ColorSave[8] = |CFF00AEEF5
    Set VariableSet ColorSave[9] = |CFFFFF200%
    Set VariableSet ColorSave[10] = |CFFED1C24a
    Set VariableSet ColorSave[11] = |CFF00FF00D
    Set VariableSet ColorSave[12] = |CFFED1C24y
    Set VariableSet ColorSave[13] = |CFF00AEEF6
    Set VariableSet ColorSave[14] = |CFFED1C24f
    Set VariableSet ColorSave[15] = |CFF00FF00W
    Set VariableSet ColorSave[16] = |CFFED1C24s
    -------- 2. --------
    Set VariableSet ColorSave[17] = |CFF00FF00R
    Set VariableSet ColorSave[18] = |CFFED1C24j
    Set VariableSet ColorSave[19] = |CFF00FF00C
    Set VariableSet ColorSave[20] = |CFF00AEEF4
    Set VariableSet ColorSave[21] = |CFFED1C24o
    Set VariableSet ColorSave[22] = |CFF00FF00Z
    Set VariableSet ColorSave[23] = |CFFFFF200=
    Set VariableSet ColorSave[24] = |CFFED1C24n
    Set VariableSet ColorSave[25] = |CFF00FF00A
    Set VariableSet ColorSave[26] = |CFFED1C24m
    Set VariableSet ColorSave[27] = |CFF00FF00G
    Set VariableSet ColorSave[28] = |CFF00AEEF9
    Set VariableSet ColorSave[29] = |CFFFFF200+
    Set VariableSet ColorSave[30] = |CFF00FF00S
    Set VariableSet ColorSave[31] = |CFFED1C24e
    Set VariableSet ColorSave[32] = |CFF00FF00T
    Set VariableSet ColorSave[33] = |CFFED1C24v
    -------- 3. --------
    Set VariableSet ColorSave[34] = |CFFED1C24p
    Set VariableSet ColorSave[35] = |CFF00FF00U
    Set VariableSet ColorSave[36] = |CFFED1C24d
    Set VariableSet ColorSave[37] = |CFFFFF200@
    Set VariableSet ColorSave[38] = |CFF00FF00K
    Set VariableSet ColorSave[39] = |CFFED1C24z
    Set VariableSet ColorSave[40] = |CFF00AEEF0
    Set VariableSet ColorSave[41] = |CFFED1C24t
    Set VariableSet ColorSave[42] = |CFF00FF00N
    Set VariableSet ColorSave[43] = |CFFED1C24b
    Set VariableSet ColorSave[44] = |CFFFFF200#
    Set VariableSet ColorSave[45] = |CFFED1C24i
    Set VariableSet ColorSave[46] = |CFF00FF00F
    Set VariableSet ColorSave[47] = |CFF00FF00X
    Set VariableSet ColorSave[48] = |CFF00AEEF2
    Set VariableSet ColorSave[49] = |CFFED1C24g
    Set VariableSet ColorSave[50] = |CFF00FF00Q
    -------- 4. --------
    Set VariableSet ColorSave[51] = |CFFED1C24x
    Set VariableSet ColorSave[52] = |CFF00FF00B
    Set VariableSet ColorSave[53] = |CFF00AEEF7
    Set VariableSet ColorSave[54] = |CFF00FF00Y
    Set VariableSet ColorSave[55] = |CFFED1C24h
    Set VariableSet ColorSave[56] = |CFFED1C24k
    Set VariableSet ColorSave[57] = |CFF00FF00O
    Set VariableSet ColorSave[58] = |CFFFFF200!
    Set VariableSet ColorSave[59] = |CFF00AEEF3
    Set VariableSet ColorSave[60] = |CFF00FF00L
    Set VariableSet ColorSave[61] = |CFF00FF00V
    Set VariableSet ColorSave[62] = |CFFED1C24u
    Set VariableSet ColorSave[63] = |CFFFFF200$
    Set VariableSet ColorSave[64] = |CFF00FF00J
    Set VariableSet ColorSave[65] = |CFF00AEEF1
    Set VariableSet ColorSave[66] = |CFF00FF00E
    Set VariableSet ColorSave[67] = |CFFFFF200§
    -------- Hex --------
    Set VariableSet Save_Y[0] = 8
    Set VariableSet Save_Y[1] = c
    Set VariableSet Save_Y[2] = M
    Set VariableSet Save_Y[3] = q
    Set VariableSet Save_Y[4] = ?
    Set VariableSet Save_Y[5] = P
    Set VariableSet Save_Y[6] = r
    Set VariableSet Save_Y[7] = H
    Set VariableSet Save_Y[8] = 5
    Set VariableSet Save_Y[9] = %
    Set VariableSet Save_Y[10] = a
    Set VariableSet Save_Y[11] = D
    Set VariableSet Save_Y[12] = y
    Set VariableSet Save_Y[13] = 6
    Set VariableSet Save_Y[14] = f
    Set VariableSet Save_Y[15] = W
    Set VariableSet Save_Y[16] = s
    -------- Hex --------
    Set VariableSet Save_Y[17] = R
    Set VariableSet Save_Y[18] = j
    Set VariableSet Save_Y[19] = C
    Set VariableSet Save_Y[20] = 4
    Set VariableSet Save_Y[21] = o
    Set VariableSet Save_Y[22] = Z
    Set VariableSet Save_Y[23] = =
    Set VariableSet Save_Y[24] = n
    Set VariableSet Save_Y[25] = A
    Set VariableSet Save_Y[26] = m
    Set VariableSet Save_Y[27] = G
    Set VariableSet Save_Y[28] = 9
    Set VariableSet Save_Y[29] = +
    Set VariableSet Save_Y[30] = S
    Set VariableSet Save_Y[31] = e
    Set VariableSet Save_Y[32] = T
    Set VariableSet Save_Y[33] = v
    -------- Hex --------
    Set VariableSet Save_Y[34] = p
    Set VariableSet Save_Y[35] = U
    Set VariableSet Save_Y[36] = d
    Set VariableSet Save_Y[37] = @
    Set VariableSet Save_Y[38] = K
    Set VariableSet Save_Y[39] = z
    Set VariableSet Save_Y[40] = 0
    Set VariableSet Save_Y[41] = t
    Set VariableSet Save_Y[42] = N
    Set VariableSet Save_Y[43] = b
    Set VariableSet Save_Y[44] = #
    Set VariableSet Save_Y[45] = i
    Set VariableSet Save_Y[46] = F
    Set VariableSet Save_Y[47] = X
    Set VariableSet Save_Y[48] = 2
    Set VariableSet Save_Y[49] = g
    Set VariableSet Save_Y[50] = Q
    -------- Hex --------
    Set VariableSet Save_Y[51] = x
    Set VariableSet Save_Y[52] = B
    Set VariableSet Save_Y[53] = 7
    Set VariableSet Save_Y[54] = Y
    Set VariableSet Save_Y[55] = h
    Set VariableSet Save_Y[56] = k
    Set VariableSet Save_Y[57] = O
    Set VariableSet Save_Y[58] = !
    Set VariableSet Save_Y[59] = 3
    Set VariableSet Save_Y[60] = L
    Set VariableSet Save_Y[61] = V
    Set VariableSet Save_Y[62] = u
    Set VariableSet Save_Y[63] = $
    Set VariableSet Save_Y[64] = J
    Set VariableSet Save_Y[65] = 1
    Set VariableSet Save_Y[66] = E
    Set VariableSet Save_Y[67] = §
//TESH.scrollpos=92
//TESH.alwaysfold=0
function Trig_saveCrypt_Actions takes nothing returns nothing
    local string loadcache
    local player TriggerPlayerNr
    local integer x
    local integer y
    local integer z
    local integer a
    local integer b
    local integer c
    local integer d
    local string array Letter
    local boolean array Proof
    local integer array tmp
    local integer array x16
    local integer e
    local integer f
    set TriggerPlayerNr = GetTriggerPlayer()
    set b = 0
    set c = 0
    set d = 0
    set a = 0
    set x = 4
    set y = 0
    set z = 0
    set udg_TriggerPlayerNr = GetTriggerPlayer()
    call DisplayTextToForce( GetForceOfPlayer(TriggerPlayerNr), "|CFFED1C24W|CFFED1F24a|CFFED2324r|CFFED2624n|CFFEE2A24i|CFFEE2E24n|CFFEE3124g|CFFEE3524! |CFFEF3C24C|CFFEF4023o|CFFEF4423d|CFFF04723e |CFFF04F23i|CFFF05223s |CFFF15A23c|CFFF15D23a|CFFF16123s|CFFF26522e |CFFF25E22s|CFFF25B22e|CFFF15722n|CFFF15322s|CFFF15022e|CFFF14C22t|CFFF04822i|CFFF04522v|CFFF04123! |CFFEF3A23W|CFFEF3623a|CFFEF3223r|CFFEF2F23n|CFFEE2B23i|CFFEE2723n|CFFEE2423g|CFFEE2023!" )
    call DisplayTimedTextToForce( GetForceOfPlayer(TriggerPlayerNr), 60.00, "|CFFED1C24 lower Case; |CFF00FF00 Cap. Letters; |CFF00AEEF Numbers; |CFFFFF200 special" )
    call DisplayTextToForce( GetForceOfPlayer(TriggerPlayerNr), "|cff0080FFSaveing....|r" )
    call TriggerSleepAction( 0.50 )
    if ( udg_Proof[( GetConvertedPlayerId(TriggerPlayerNr) + 100 )] == false ) then
        set udg_Proof[( 100 + GetConvertedPlayerId(TriggerPlayerNr) )] = true
        set a = GetHeroXP(udg_Hero[GetConvertedPlayerId(TriggerPlayerNr)])
        set b = 0
        // Checksum aufbauen
        set f = GetHeroXP(udg_Hero[GetConvertedPlayerId(TriggerPlayerNr)])
        set d = 0
        set z = 0
        set y = 0
        loop
            exitwhen y > 9
            if ( a >= 1000000 ) then
                set a = ( a - 1000000 )
                set b = ( b + 1 )
            else
            endif
            set y = y + 1
        endloop
        set y = 0
        loop
            exitwhen y > 9
            if ( a >= 100000 ) then
                set a = ( a - 100000 )
                set b = ( b + 1 )
            else
            endif
            set y = y + 1
        endloop
        set y = 0
        loop
            exitwhen y > 9
            if ( a >= 10000 ) then
                set a = ( a - 10000 )
                set b = ( b + 1 )
            else
            endif
            set y = y + 1
        endloop
        set y = 0
        loop
            exitwhen y > 9
            if ( a >= 1000 ) then
                set a = ( a - 1000 )
                set b = ( b + 1 )
            else
            endif
            set y = y + 1
        endloop
        set y = 0
        loop
            exitwhen y > 9
            if ( a >= 100 ) then
                set a = ( a - 100 )
                set b = ( b + 1 )
            else
            endif
            set y = y + 1
        endloop
        set y = 0
        loop
            exitwhen y > 9
            if ( a >= 10 ) then
                set a = ( a - 10 )
                set b = ( b + 1 )
            else
            endif
            set y = y + 1
        endloop
        set y = 0
        loop
            exitwhen y > 9
            if ( a >= 1 ) then
                set a = ( a - 1 )
                set b = ( b + 1 )
            else
            endif
            set y = y + 1
        endloop
        set c = StringLength(GetPlayerName(TriggerPlayerNr))
        set y = 1
        loop
            exitwhen y > c
            set Letter[y] = SubStringBJ(StringCase(GetPlayerName(TriggerPlayerNr), false), y, y)
            set y = y + 1
        endloop
        set y = 1
        loop
            exitwhen y > c
            set x = 1
            loop
                exitwhen x > 39
                if ( Letter[y] == udg_alpha[x] ) then
                    set d = ( d + x )
                else    
                endif
                set x = x + 1
            endloop
            set y = y + 1
        endloop
        // --------------------------
        set d = ( d * StringLength(GetPlayerName(TriggerPlayerNr)) )
        set d = ( d * b )
        set z = ( ( f - ModuloInteger(f, 100) ) / 100 )
        set d = ( d - z )
        set e = 1
        loop
            exitwhen e > 10
            if ( d < 111111 ) then
                set d = ( d + 13037 )
                set e = 2
            else
                set e = 10
            endif
            set e = e + 1
        endloop
        set a = d
        // Xp in hex
        set x16[0] = ModuloInteger(f, 16)
        set f = ( f - x16[0] )
        set f = ( f / 16 )
        set x16[1] = ModuloInteger(f, 16)
        set f = ( f - x16[1] )
        set f = ( f / 16 )
        set x16[2] = ModuloInteger(f, 16)
        set f = ( f - x16[2] )
        set f = ( f / 16 )
        set x16[3] = ModuloInteger(f, 16)
        set f = ( f - x16[3] )
        set f = ( f / 16 )
        set x16[4] = ModuloInteger(f, 16)
        set f = ( f - x16[4] )
        set f = ( f / 16 )
        set x16[5] = ModuloInteger(f, 16)
        set f = ( f - x16[5] )
        // Buchstabensalat
        set y = 4
        loop
            exitwhen y > 9
            set z = GetRandomInt(1, 5)
            set tmp[y] = ( tmp[y] + (z * 10) )
            set y = y + 1
        endloop
        set z = GetRandomInt(1, 4)
        if ( z == 4 ) then
            set x16[0] = ( x16[0] + 34 )
        else
            if ( z == 3 ) then
                set x16[0] = ( x16[0] + 17 )
            else
                if ( z == 2 ) then
                    set x16[0] = ( x16[0] + 51 )
                else
                endif
            endif
        endif
        set z = GetRandomInt(1, 4)
        if ( z == 4 ) then
            set x16[1] = ( x16[1] + 51 )
        else
            if ( z == 3 ) then
                set x16[1] = ( x16[1] + 17 )
            else
                if ( z == 2 ) then
                    set x16[1] = ( x16[1] + 34 )
                else
                endif
            endif
        endif
        set z = GetRandomInt(1, 4)
        if ( z == 4 ) then
            set x16[2] = ( x16[2] + 51 )
        else
            if ( z == 3 ) then
                set x16[2] = ( x16[2] + 34 )
            else
                if ( z == 2 ) then
                    set x16[2] = ( x16[2] + 17 )
                else
                endif
            endif
        endif
        set z = GetRandomInt(1, 4)
        if ( z == 4 ) then
            set x16[3] = ( x16[3] + 17 )
        else
            if ( z == 3 ) then
                set x16[3] = ( x16[3] + 51 )
            else
                if ( z == 2 ) then
                    set x16[3] = ( x16[3] + 34 )
                else
                endif
            endif
        endif
        set z = GetRandomInt(1, 4)
        if ( z == 4 ) then
            set x16[4] = ( x16[4] + 51 )
        else
            if ( z == 3 ) then
                set x16[4] = ( x16[4] + 34 )
            else
                if ( z == 2 ) then
                    set x16[4] = ( x16[4] + 17 )
                else
                endif
            endif
        endif
        set z = GetRandomInt(1, 4)
        if ( z == 4 ) then
            set x16[5] = ( x16[5] + 17 )
        else
            if ( z == 3 ) then
                set x16[5] = ( x16[5] + 34 )
            else
                if ( z == 2 ) then
                    set x16[5] = ( x16[5] + 51 )
                else
                endif
            endif
        endif
        // Checksum verstecken
        set y = 0
        loop
            exitwhen y > 9
            if ( a >= 100000 ) then
                set a = ( a - 100000 )
                set tmp[9] = ( tmp[9] + 1 )
            else
            endif
            set y = y + 1
        endloop
        set y = 0
        loop
            exitwhen y > 9
            if ( a >= 10000 ) then
                set a = ( a - 10000 )
                set tmp[8] = ( tmp[8] + 1 )
            else
            endif
            set y = y + 1
        endloop
        set y = 0
        loop
            exitwhen y > 9
            if ( a >= 1000 ) then
                set a = ( a - 1000 )
                set tmp[7] = ( tmp[7] + 1 )
            else
            endif
            set y = y + 1
        endloop
        set y = 0
        loop
            exitwhen y > 9
            if ( a >= 100 ) then
                set a = ( a - 100 )
                set tmp[6] = ( tmp[6] + 1 )
            else
            endif
            set y = y + 1
        endloop
        set y = 0
        loop
            exitwhen y > 9
            if ( a >= 10 ) then
                set a = ( a - 10 )
                set tmp[5] = ( tmp[5] + 1 )
            else
            endif
            set y = y + 1
        endloop
        set y = 0
        loop
            exitwhen y > 9
            if ( a >= 1 ) then
                set a = ( a - 1 )
                set tmp[4] = ( tmp[4] + 1 )
            else
            endif
            set y = y + 1
        endloop
        // Ladecode auspucken
        set Letter[1] = ( ( ( udg_ColorSave[tmp[4]] + udg_ColorSave[x16[5]] ) + ( udg_ColorSave[x16[3]] + ( udg_ColorSave[tmp[6]] + ( udg_ColorSave[tmp[9]] + udg_ColorSave[x16[1]] ) ) ) ) )
        set Letter[0] = ( Letter[1] + ( "|r-" + ( udg_ColorSave[tmp[5]] + ( udg_ColorSave[tmp[7]] + ( udg_ColorSave[x16[2]] + ( udg_ColorSave[tmp[8]] + ( udg_ColorSave[x16[0]] + udg_ColorSave[x16[4]] ) ) ) ) ) ) )
        call DisplayTextToForce( GetForceOfPlayer(TriggerPlayerNr), "Saving Generator: |cff32cd32Started|r" )
        call TriggerSleepAction( 0.25 )
        call DisplayTimedTextToForce( GetForceOfPlayer(TriggerPlayerNr), 60.00, ( "Your brand new Savecode: " + Letter[0] ) )
        set udg_Save_Code[GetConvertedPlayerId(TriggerPlayerNr)] = Letter [0]
    else
        call DisplayTextToForce( GetForceOfPlayer(TriggerPlayerNr), "Saving Generator: |cffD90000Failed.|r" )
        call TriggerSleepAction( 0.25 )
        call DisplayTimedTextToForce( GetForceOfPlayer(TriggerPlayerNr), 60.00, ( "Your Savecode: " + udg_Save_Code[GetConvertedPlayerId(TriggerPlayerNr)] ) )
    endif
    set TriggerPlayerNr = null
    set loadcache = null
endfunction

//===========================================================================
function InitTrig_saveCrypt takes nothing returns nothing
    set gg_trg_saveCrypt = CreateTrigger(  )
    call DisableTrigger( gg_trg_saveCrypt )
    call TriggerRegisterPlayerChatEvent( gg_trg_saveCrypt, Player(0), "-save", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_saveCrypt, Player(1), "-save", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_saveCrypt, Player(2), "-save", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_saveCrypt, Player(3), "-save", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_saveCrypt, Player(4), "-save", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_saveCrypt, Player(5), "-save", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_saveCrypt, Player(6), "-save", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_saveCrypt, Player(7), "-save", true )
    call TriggerAddAction( gg_trg_saveCrypt, function Trig_saveCrypt_Actions )
endfunction
function Trig_loadCrypt_Actions takes nothing returns nothing
    local string loadcache
    local player TriggerPlayerNr
    local integer x
    local integer y
    local integer z
    local integer a
    local integer b
    local integer c
    local integer d
    local string array Letter
    local boolean array Proof
    local integer array tmp
    set TriggerPlayerNr = GetTriggerPlayer()
    set loadcache = GetEventPlayerChatString()
    set b = 0
    set c = 0
    set d = 0
    set a = 0
    set x = 4
    set y = 0
    set z = 0
    call DisplayTextToForce( GetForceOfPlayer(TriggerPlayerNr), "|cff0080FFCode Input noticed..|r" )
    call TriggerSleepAction( 0.50 )
    loop
        exitwhen x > 9
        set Proof[x] = false
        set x = x + 1
    endloop
    if (( StringLength(loadcache)) == 19 ) then
        // XP laden
        set x = 0
        loop
            exitwhen x > 67
            if (( SubStringBJ(loadcache, 18, 18) == udg_Save_Y[x] )) and ( Proof[1] == false) then
                if ( x <= 16 ) then
                    set b = ( b + ( 1 * x ) )
                    set Proof[1] = true
                elseif ( x <= 33 ) then
                    set Proof[1] = true
                    set b = ( b + ( 1 * ( x - 17 ) ) )
                elseif ( x <= 50 ) then
                    set Proof[1] = true
                    set b = ( b + ( 1 * ( x - 34 ) ) )
                elseif ( x <= 67 ) then
                    set Proof[1] = true
                    set b = ( b + ( 1 * ( x - 51 ) ) )
                endif
            endif
            if (( SubStringBJ(loadcache, 12, 12)) == udg_Save_Y[x] ) and ( Proof[2] == false ) then
                if ( x <= 16 ) then
                    set b = ( b + ( 16 * x ) )
                    set Proof[2] = true
                elseif ( x <= 33 ) then
                        set Proof[2] = true
                        set b = ( b + ( 16 * ( x - 17 ) ) )
                elseif ( x <= 50 ) then
                            set Proof[2] = true
                            set b = ( b + ( 16 * ( x - 34 ) ) )
                elseif ( x <= 67 ) then
                                set Proof[2] = true
                                set b = ( b + ( 16 * ( x - 51 ) ) )
                endif
            endif
            if (( SubStringBJ(loadcache, 16, 16)) == udg_Save_Y[x] ) and ( Proof[3] == false )then
                if ( x <= 16  ) then
                    set b = ( b + ( 256 * x ) )
                    set Proof[3] = true
                elseif ( x <= 33 ) then
                        set Proof[3] = true
                        set b = ( b + ( 256 * ( x - 17 ) ) )
                    elseif ( x <= 50 ) then
                            set Proof[3] = true
                            set b = ( b + ( 256 * ( x - 34 ) ) )
                        elseif ( x <= 67 ) then
                                set Proof[3] = true
                                set b = ( b + ( 256 * ( x - 51 ) ) )
                endif
            endif
            if (( SubStringBJ(loadcache, 9, 9)) == udg_Save_Y[x] )  and ( Proof[4] == false ) then
                if ( x <= 16 ) then
                    set b = ( b + ( 4096 * x ) )
                    set Proof[4] = true
                elseif ( x <= 33 ) then
                        set Proof[4] = true
                        set b = ( b + ( 4096 * ( x - 17 ) ) )
                    elseif ( x <= 50 ) then
                            set Proof[4] = true
                            set b = ( b + ( 4096 * ( x - 34 ) ) )
                        elseif ( x <= 67 ) then
                                set Proof[4] = true
                                set b = ( b + ( 4096 * ( x - 51 ) ) )
                endif
            endif
            if (( SubStringBJ(loadcache, 19, 19)) == udg_Save_Y[x] ) and ( Proof[5] == false ) then
                if ( x <= 16 ) then
                    set b = ( b + ( 65536 * x ) )
                    set Proof[5] = true
                elseif ( x <= 33 ) then
                        set Proof[5] = true
                        set b = ( b + ( 65536 * ( x - 17 ) ) )
                    elseif ( x <= 50 ) then
                            set Proof[5] = true
                            set b = ( b + ( 65536 * ( x - 34 ) ) )
                        elseif ( x <= 67 ) then
                                set Proof[5] = true
                                set b = ( b + ( 65536 * ( x - 51 ) ) )
                endif
            endif
            if (( SubStringBJ(loadcache, 8, 8)) == udg_Save_Y[x] ) and ( Proof[6] == false ) then
                if ( x <= 16 ) then
                    set b = ( b + ( 1048576 * x ) )
                    set Proof[6] = true
                elseif ( x <= 33 ) then
                        set Proof[6] = true
                        set b = ( b + ( 1048576 * ( x - 17 ) ) )
                    elseif ( x <= 50 ) then
                            set Proof[6] = true
                            set b = ( b + ( 1048576 * ( x - 34 ) ) )
                        elseif ( x <= 67 ) then
                                set Proof[6] = true
                                set b = ( b + ( 1048576 * ( x - 51 ) ) )
                endif
            endif
            set x = x + 1
        endloop
        // -Checksum aufbauen
        set tmp[3] = b
        set tmp[2] = 0
        set tmp[1] = StringLength(GetPlayerName(TriggerPlayerNr))
        set y = 1
        loop
            exitwhen y > tmp[1]
            set Letter[y] = SubStringBJ(StringCase(GetPlayerName(TriggerPlayerNr), false), y, y)
            set y = y + 1
        endloop
        set y = 1
        loop
            exitwhen y > tmp[1]
            set x = 1
            loop
                exitwhen x > 39
                if (Letter[y] == udg_alpha[x]) then
                    set c = ( c + x )
                else
                    call DoNothing()
                endif
                set x = x + 1
            endloop
            set y = y + 1
        endloop
        set c = ( c * StringLength(GetPlayerName(TriggerPlayerNr)))
        set y = 0
        loop
            exitwhen y > 9
            if ( tmp[3] >= 1000000 ) then
                set tmp[3] = ( tmp[3] - 1000000 )
                set tmp[2] = ( tmp[2] + 1 )
            else
                call DoNothing(  )
            endif
            set y = y + 1
        endloop
        set y = 0
        loop
            exitwhen y > 9
            if ( tmp[3] >= 100000 ) then
                set tmp[3] = ( tmp[3] - 100000 )
                set tmp[2] = ( tmp[2] + 1 )
            else
                call DoNothing(  )
            endif
            set y = y + 1
        endloop
        set y = 0
        loop
            exitwhen y > 9
            if ( tmp[3] >= 10000 ) then
                set tmp[3] = ( tmp[3] - 10000 )
                set tmp[2] = ( tmp[2] + 1 )
            else
                call DoNothing(  )
            endif
            set y = y + 1
        endloop
        set y = 0
        loop
            exitwhen y > 9
            if ( tmp[3] >= 1000) then
                set tmp[3] = ( tmp[3] - 1000 )
                set tmp[2] = ( tmp[2] + 1 )
            else
                call DoNothing(  )
            endif
            set y = y + 1
        endloop
        set y = 0
        loop
            exitwhen y > 9
            if ( tmp[3] >= 100) then
                set tmp[3] = ( tmp[3] - 100 )
                set tmp[2] = ( tmp[2] + 1 )
            else
                call DoNothing(  )
            endif
            set y = y + 1
        endloop
        set y = 0
        loop
            exitwhen y > 9
            if ( tmp[3] >= 10 ) then
                set tmp[3] = ( tmp[3] - 10 )
                set tmp[2] = ( tmp[2] + 1 )
            else
                call DoNothing(  )
            endif
            set y = y + 1
        endloop
        set y = 0
        loop
            exitwhen y > 9
            if ( tmp[3] >= 1 ) then
                set tmp[3] = ( tmp[3] - 1 )
                set tmp[2] = ( tmp[2] + 1 )
            else
                call DoNothing(  )
            endif
            set y = y + 1
        endloop
        set c = ( c * tmp[2] )
        set a = ( ( b - ModuloInteger(b, 100) ) / 100 )
        set c = ( c - a )
        set z = 1
        loop
            exitwhen z > 10
            if ( c < 111111 ) then
                set c = ( c + 13037 )
                set z = 2
            else
                set z = 10
            endif
            set z = z + 1
        endloop
        // -Checksum laden
        set x = 0
        loop
            exitwhen x > 60
            if ((SubStringBJ(loadcache, 11, 11)) == udg_Save_Y[x]) then
                if (  x <= 9 ) then
                    set d = ( d + ( 100000 * x ) )
                elseif  ( x <= 19 ) then
                        set d = ( d + ( 100000 * ( x - 10 ) ) )
                    elseif  ( x <= 29 ) then
                            set d = ( d + ( 100000 * ( x - 20 ) ) )
                        elseif ( x <= 39 ) then
                                set d = ( d + ( 100000 * ( x - 30 ) ) )
                            elseif ( x <= 49 ) then
                                    set d = ( d + ( 100000 * ( x - 40 ) ) )
                                elseif ( x <= 59 ) then
                                        set d = ( d + ( 100000 * ( x - 50 ) ) )
                                    else
                                        set d = ( d + ( 100000 * ( x - 60 ) ) )
                                    endif
            endif
            if ((SubStringBJ(loadcache, 17, 17)) == udg_Save_Y[x]) then
                if ( x <= 9 ) then
                    set d = ( d + ( 10000 * x ) )
                elseif ( x <= 19 ) then
                        set d = ( d + ( 10000 * ( x - 10 ) ) )
                    elseif ( x <= 29 ) then
                            set d = ( d + ( 10000 * ( x - 20 ) ) )
                        elseif  ( x <= 39 ) then
                                set d = ( d + ( 10000 * ( x - 30 ) ) )
                            elseif ( x <= 49 ) then
                                    set d = ( d + ( 10000 * ( x - 40 ) ) )
                                elseif ( x <= 59 ) then
                                        set d = ( d + ( 10000 * ( x - 50 ) ) )
                                    else
                                        set d = ( d + ( 10000 * ( x - 60 ) ) )
                                    endif
            endif
            if ((SubStringBJ(loadcache, 15, 15)) == udg_Save_Y[x]) then
                if ( x <= 9 ) then
                    set d = ( d + ( 1000 * x ) )
                elseif ( x <= 19 ) then
                        set d = ( d + ( 1000 * ( x - 10 ) ) )
                    elseif ( x <= 29 ) then
                            set d = ( d + ( 1000 * ( x - 20 ) ) )
                        elseif ( x <= 39 ) then
                                set d = ( d + ( 1000 * ( x - 30 ) ) )
                            elseif ( x <= 49 ) then
                                    set d = ( d + ( 1000 * ( x - 40 ) ) )
                                elseif ( x <= 59 ) then
                                        set d = ( d + ( 1000 * ( x - 50 ) ) )
                                    else
                                        set d = ( d + ( 1000 * ( x - 60 ) ) )
                                    endif
            endif
            if ((SubStringBJ(loadcache, 10, 10)) == udg_Save_Y[x]) then
                if ( x <= 9 ) then
                    set d = ( d + ( 100 * x ) )
                elseif (  x <= 19 ) then
                        set d = ( d + ( 100 * ( x - 10 ) ) )
                    elseif ( x <= 29 ) then
                            set d = ( d + ( 100 * ( x - 20 ) ) )
                        elseif ( x <= 39 ) then
                                set d = ( d + ( 100 * ( x - 30 ) ) )
                            elseif ( x <= 49 ) then
                                    set d = ( d + ( 100 * ( x - 40 ) ) )
                                elseif ( x <= 59 ) then
                                        set d = ( d + ( 100 * ( x - 50 ) ) )
                                    else
                                        set d = ( d + ( 100 * ( x - 60 ) ) )
                                    endif
            endif
            if ((SubStringBJ(loadcache, 14, 14)) == udg_Save_Y[x]) then
                if ( x <= 9 ) then
                    set d = ( d + ( 10 * x ) )
                elseif ( x <= 19 ) then
                        set d = ( d + ( 10 * ( x - 10 ) ) )
                    elseif ( x <= 29 ) then
                            set d = ( d + ( 10 * ( x - 20 ) ) )
                        elseif ( x <= 39 ) then
                                set d = ( d + ( 10 * ( x - 30 ) ) )
                            elseif (  x <= 49 ) then
                                    set d = ( d + ( 10 * ( x - 40 ) ) )
                                elseif ( x <= 59 ) then
                                        set d = ( d + ( 10 * ( x - 50 ) ) )
                                    else
                                        set d = ( d + ( 10 * ( x - 60 ) ) )
                                    endif
            endif
            if ((SubStringBJ(loadcache, 7, 7)) == udg_Save_Y[x]) then
                if ( x <= 9 ) then
                    set d = ( d + ( 1 * x ) )
                elseif ( x <= 19 ) then
                        set d = ( d + ( 1 * ( x - 10 ) ) )
                    elseif ( x <= 29 ) then
                            set d = ( d + ( 1 * ( x - 20 ) ) )
                        elseif ( x <= 39 ) then
                                set d = ( d + ( 1 * ( x - 30 ) ) )
                            elseif ( x <= 49 ) then
                                    set d = ( d + ( 1 * ( x - 40 ) ) )
                                elseif ( x <= 59 ) then
                                        set d = ( d + ( 1 * ( x - 50 ) ) )
                                    else
                                        set d = ( d + ( 1 * ( x - 60 ) ) )
                                    endif
            endif
            set x = x + 1
        endloop
        // Checksum vergleich
        if ( c == d ) then
            set Proof[7] = true
        else
            set Proof[7] = false
        endif
        // XP "laden"
        call DisplayTextToForce( GetForceOfPlayer(TriggerPlayerNr), "|cff0080FFChecking Authorization...|r")
        call TriggerSleepAction( 1.50 )
        if (((Proof[7] == true and Proof[6] == true) and (Proof[5] == true and Proof[4] == true)) and ((Proof[3] == true and Proof[2] == true) and Proof[1] == true)) then
            call DisplayTextToForce( GetForceOfPlayer(TriggerPlayerNr), "Authorization: |cff32cd32Approved. Code confirmed|r" )
            call TriggerSleepAction( 0.25 )
            call DisplayTextToForce( GetForceOfPlayer(TriggerPlayerNr), "|cff0080FFDecrypting Code... Adding Exp....|r" )
            call TriggerSleepAction( 0.25 )
            call SetHeroXP( udg_Hero[GetConvertedPlayerId(TriggerPlayerNr)], b, false )
        else
            call TriggerSleepAction( 0.50 )
            call DisplayTextToForce( GetForceOfPlayer(TriggerPlayerNr), "Authorization: |cffD90000Denied. Invalid Code.|r" )
        endif
    else
        call TriggerSleepAction( 0.50 )
        call DisplayTextToForce( GetForceOfPlayer(TriggerPlayerNr), "Authorization: |cffD90000Invalid. Code lenght Error.|r" )
    endif
    set TriggerPlayerNr = null
    set loadcache = null
endfunction

//===========================================================================
function InitTrig_loadCrypt takes nothing returns nothing
    set gg_trg_loadCrypt = CreateTrigger(  )
    call DisableTrigger( gg_trg_loadCrypt )
    call TriggerRegisterPlayerChatEvent( gg_trg_loadCrypt, Player(0), "-load ", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_loadCrypt, Player(1), "-load ", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_loadCrypt, Player(2), "-load ", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_loadCrypt, Player(3), "-load ", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_loadCrypt, Player(4), "-load ", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_loadCrypt, Player(5), "-load ", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_loadCrypt, Player(6), "-load ", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_loadCrypt, Player(7), "-load ", false )
    call TriggerAddAction( gg_trg_loadCrypt, function Trig_loadCrypt_Actions )
endfunction

 
renew force
  Events
    Time - Every 2.00 seconds of game time
  Conditions
  Actions
    Set VariableSet boardplace = 2
    For each (Integer A) from 2 to 9, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Player(((Integer A) - 1))) is an ally of Player 1 (Red).) Equal to True
            ((Player(((Integer A) - 1))) slot status) Equal to Is playing
            ((Player(((Integer A) - 1))) controller) Not equal to Computer
          Then - Actions
            Set VariableSet color1 = 0.00
            Set VariableSet color2 = 100.00
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Percentage life of Hero[((Integer A) - 1)]) Greater than 50.00
              Then - Actions
                Set VariableSet color1 = (2.00 x (100.00 - (Percentage life of Hero[((Integer A) - 1)])))
                Set VariableSet color2 = 100.00
              Else - Actions
                Set VariableSet color1 = 100.00
                Set VariableSet color2 = (1.00 x (2.00 x (Percentage life of Hero[((Integer A) - 1)])))
            Multiboard - Set the text for killsboard item in column 1, row boardplace to ((ColorStr[((Integer A) - 1)] + (( + ((String(((Integer A) - 1))) + ) ))) + (Name of (Player(((Integer A) - 1)))))
            Multiboard - Set the text for killsboard item in column 2, row boardplace to (Name of Hero[((Integer A) - 1)])
            Multiboard - Set the text for killsboard item in column 3, row boardplace to (String((Life of Hero[((Integer A) - 1)]), 2, 0))
            Multiboard - Set the color for killsboard item in column 3, row boardplace to (color1%, color2%, 0.00%) with 0% transparency
            Multiboard - Set the text for killsboard item in column 4, row boardplace to (String((Hero experience of Hero[((Integer A) - 1)])))
            Multiboard - Set the text for killsboard item in column 5, row boardplace to ((String(Kills[(Player number of (Player(((Integer A) - 1))))])) + |r)
            Set VariableSet boardplace = (boardplace + 1)
          Else - Actions
            Do nothing
    Multiboard - Change the number of rows for killsboard to (boardplace - 1)
Multiboard
  Events
    Time - Elapsed game time is 0.50 seconds
  Conditions
  Actions
    Multiboard - Destroy killsboard
    Multiboard - Create a multiboard with 5 columns and 9 rows, titled Just some Stats.
    Set VariableSet killsboard = (Last created multiboard)
    Set VariableSet boardplace = 2
    Multiboard - Set the text for killsboard item in column 1, row 1 to Name
    Multiboard - Set the text for killsboard item in column 2, row 1 to Wpn
    Multiboard - Set the text for killsboard item in column 3, row 1 to Hp
    Multiboard - Set the text for killsboard item in column 4, row 1 to Exp
    Multiboard - Set the text for killsboard item in column 5, row 1 to Kills
    Multiboard - Set the width for (Last created multiboard) item in column 1, row 0 to 8.00% of the total screen width
    Multiboard - Set the width for (Last created multiboard) item in column 2, row 0 to 8.00% of the total screen width
    Multiboard - Set the width for (Last created multiboard) item in column 4, row 0 to 6.00% of the total screen width
    For each (Integer B) from 1 to 5, do (Actions)
      Loop - Actions
        For each (Integer A) from 1 to 9, do (Actions)
          Loop - Actions
            Multiboard - Set the display style for killsboard item in column (Integer B), row (Integer A) to Show text and Hide icons
    For each (Integer A) from 2 to 9, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Player(((Integer A) - 1))) is an ally of Player 1 (Red).) Equal to True
            ((Player(((Integer A) - 1))) slot status) Equal to Is playing
            ((Player(((Integer A) - 1))) controller) Not equal to Computer
          Then - Actions
            Multiboard - Set the text for killsboard item in column 1, row boardplace to ((ColorStr[((Integer A) - 1)] + (( + ((String(((Integer A) - 1))) + ) ))) + (Name of (Player(((Integer A) - 1)))))
            Multiboard - Set the text for killsboard item in column 2, row boardplace to (Name of Hero[((Integer A) - 1)])
            Multiboard - Set the text for killsboard item in column 3, row boardplace to (String((Life of Hero[((Integer A) - 1)]), 2, 0))
            Multiboard - Set the color for killsboard item in column 3, row boardplace to (0.00%, 100.00%, 0.00%) with 0% transparency
            Multiboard - Set the text for killsboard item in column 4, row boardplace to (String((Hero experience of Hero[((Integer A) - 1)])))
            Multiboard - Set the text for killsboard item in column 5, row boardplace to ((String(Kills[(Player number of (Player(((Integer A) - 1))))])) + |r)
            Set VariableSet boardplace = (boardplace + 1)
          Else - Actions
            Do nothing
    Multiboard - Change the number of rows for killsboard to (boardplace - 1)
    Wait 25.00 seconds
    Multiboard - Show killsboard
renew
  Events
    Unit - A unit Dies
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Owner of (Dying unit)) Equal to Player 9 (Gray)
        (Owner of (Dying unit)) Equal to Player 10 (Light Blue)
        (Owner of (Dying unit)) Equal to Player 11 (Dark Green)
        (Owner of (Dying unit)) Equal to Player 12 (Brown)
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Killing unit) is A Hero) Equal to True
      Then - Actions
        Set VariableSet Kills[(Player number of (Owner of (Killing unit)))] = (Kills[(Player number of (Owner of (Killing unit)))] + 1)
      Else - Actions
        Do nothing
    Trigger - Run renew_force <gen> (checking conditions)
//TESH.scrollpos=4
//TESH.alwaysfold=0
function Trig_Reloading_MR_Conditions takes nothing returns boolean
    if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H02A' ) ) then
        return false
    endif
    if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I02B' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Reloading_MR_Actions takes nothing returns nothing
    local integer udg_maxammo
    local integer ammotype
    set udg_maxammo = 5
    set ammotype = udg_FindPing[48]
    call TriggerSleepAction( 0.10 )
    if ( GetItemCharges(GetManipulatedItem()) < udg_maxammo ) then
        if ( UnitHasItemOfTypeBJ(GetTriggerUnit(), ammotype) == false ) then
        else
            set udg_reloading[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = true
            call PlaySoundOnUnitBJ( gg_snd_MR_Prototype12_RELOAD, 100, GetManipulatingUnit() )
            call TriggerSleepAction( 4.00 )
            call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) + GetItemCharges(GetManipulatedItem()) ) )
            call SetItemCharges( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) - GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) ) )
            if ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), GetItemTypeId(GetManipulatedItem()))) > udg_maxammo ) then
                call SetItemCharges( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) + ( GetItemCharges(GetManipulatedItem()) - udg_maxammo ) ) )
            endif
            if ( GetItemCharges(GetManipulatedItem()) > udg_maxammo ) then
                call SetItemCharges( GetManipulatedItem(), udg_maxammo )
            call SetItemUserData( GetManipulatedItem(), GetItemCharges(GetManipulatedItem()) )
            endif
        endif
    else
    endif
    set udg_reloading[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = false
endfunction

//===========================================================================
function InitTrig_Reloading_MR takes nothing returns nothing
    set gg_trg_Reloading_MR = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Reloading_MR, EVENT_PLAYER_UNIT_USE_ITEM )
    call TriggerAddCondition( gg_trg_Reloading_MR, Condition( function Trig_Reloading_MR_Conditions ) )
    call TriggerAddAction( gg_trg_Reloading_MR, function Trig_Reloading_MR_Actions )
endfunction


 
//TESH.scrollpos=20
//TESH.alwaysfold=0
function Trig_Realoding_Glock_18_Func002Func002C takes nothing returns boolean
    if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'H020' ) ) then
        return true
    endif
    if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'H01Z' ) ) then
        return true
    endif
    return false
endfunction

function Trig_Realoding_Glock_18_Func002C takes nothing returns boolean
    if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I022' ) ) then
        return false
    endif
    if ( not Trig_Realoding_Glock_18_Func002Func002C() ) then
        return false
    endif
    return true
endfunction

function Trig_Realoding_Glock_18_Conditions takes nothing returns boolean
    if ( not Trig_Realoding_Glock_18_Func002C() ) then
        return false
    endif
    return true
endfunction

function Trig_Realoding_Glock_18_Actions takes nothing returns nothing
    local integer udg_maxammo
    local integer ammotype
    set udg_maxammo = 33
    set ammotype = udg_FindPing[44]
    call TriggerSleepAction( 0.10 )
    if ( GetItemCharges(GetManipulatedItem()) < udg_maxammo ) then
        if ( UnitHasItemOfTypeBJ(GetTriggerUnit(), ammotype) == false ) then
        else
            set udg_reloading[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = true
            call PlaySoundOnUnitBJ( gg_snd_Beretta_PX4_Storm_R, 100, GetManipulatingUnit() )
            call TriggerSleepAction( 3.00 )
            call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) + GetItemCharges(GetManipulatedItem()) ) )
            call SetItemCharges( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) - GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) ) )
            if ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), GetItemTypeId(GetManipulatedItem()))) > udg_maxammo ) then
                call SetItemCharges( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) + ( GetItemCharges(GetManipulatedItem()) - udg_maxammo ) ) )
            endif
            if ( GetItemCharges(GetManipulatedItem()) > udg_maxammo ) then
                call SetItemCharges( GetManipulatedItem(), udg_maxammo )
            call SetItemUserData( GetManipulatedItem(), GetItemCharges(GetManipulatedItem()) )
            endif
        endif
    else
    endif
    set udg_reloading[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = false
endfunction

//===========================================================================
function InitTrig_Realoding_Glock_18 takes nothing returns nothing
    set gg_trg_Realoding_Glock_18 = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Realoding_Glock_18, EVENT_PLAYER_UNIT_USE_ITEM )
    call TriggerAddCondition( gg_trg_Realoding_Glock_18, Condition( function Trig_Realoding_Glock_18_Conditions ) )
    call TriggerAddAction( gg_trg_Realoding_Glock_18, function Trig_Realoding_Glock_18_Actions )
endfunction

 
function Trig_Reloading_26mmFlarePistol_Conditions takes nothing returns boolean
    if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H01K' ) ) then
        return false
    endif
    if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01N' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Reloading_26mmFlarePistol_Actions takes nothing returns nothing
    local integer udg_maxammo
    local integer ammotype
    set udg_maxammo = 1
    set ammotype = udg_FindPing[47]
    call TriggerSleepAction( 0.10 )
    if ( GetItemCharges(GetManipulatedItem()) < udg_maxammo ) then
        if ( UnitHasItemOfTypeBJ(GetTriggerUnit(), ammotype) == false ) then
        else
            set udg_reloading[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = true
            call TriggerSleepAction( 1.00 )
            call PlaySoundOnUnitBJ( gg_snd_Flare_pistol_reload, 100, GetManipulatingUnit() )
            call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) + GetItemCharges(GetManipulatedItem()) ) )
            call SetItemCharges( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) - GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) ) )
            if ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), GetItemTypeId(GetManipulatedItem()))) > udg_maxammo ) then
                call SetItemCharges( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) + ( GetItemCharges(GetManipulatedItem()) - udg_maxammo ) ) )
            endif
            if ( GetItemCharges(GetManipulatedItem()) > udg_maxammo ) then
                call SetItemCharges( GetManipulatedItem(), udg_maxammo )
            call SetItemUserData( GetManipulatedItem(), GetItemCharges(GetManipulatedItem()) )
            endif
        endif
    else
    endif
    set udg_reloading[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = false
endfunction

//===========================================================================
function InitTrig_Reloading_26mm_Flare_Pistol takes nothing returns nothing
    set gg_trg_Reloading_26mm_Flare_Pistol = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Reloading_26mm_Flare_Pistol, EVENT_PLAYER_UNIT_USE_ITEM )
    call TriggerAddCondition( gg_trg_Reloading_26mm_Flare_Pistol, Condition( function Trig_Reloading_26mmFlarePistol_Conditions ) )
    call TriggerAddAction( gg_trg_Reloading_26mm_Flare_Pistol, function Trig_Reloading_26mmFlarePistol_Actions )
endfunction

 
function Trig_Reloading_Firestar_Conditions takes nothing returns boolean
    if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H002' ) ) then
        return false
    endif
    if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I007' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Reloading_Firestar_Actions takes nothing returns nothing
    local integer udg_maxammo
    local integer ammotype
    set udg_maxammo = 7
    set ammotype = udg_FindPing[44]
    call TriggerSleepAction( 0.10 )
    if ( GetItemCharges(GetManipulatedItem()) < udg_maxammo ) then
        if ( UnitHasItemOfTypeBJ(GetTriggerUnit(), ammotype) == false ) then
        else
            set udg_reloading[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = true
            call PlaySoundOnUnitBJ( gg_snd_Firestar_Reload, 100, GetManipulatingUnit() )
            call TriggerSleepAction( 2.30 )
            call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) + GetItemCharges(GetManipulatedItem()) ) )
            call SetItemCharges( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) - GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) ) )
            if ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), GetItemTypeId(GetManipulatedItem()))) > udg_maxammo ) then
                call SetItemCharges( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) + ( GetItemCharges(GetManipulatedItem()) - udg_maxammo ) ) )
            endif
            if ( GetItemCharges(GetManipulatedItem()) > udg_maxammo ) then
                call SetItemCharges( GetManipulatedItem(), udg_maxammo )
            call SetItemUserData( GetManipulatedItem(), GetItemCharges(GetManipulatedItem()) )
            endif
        endif
    else
    endif
    set udg_reloading[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = false
endfunction

//===========================================================================
function InitTrig_Reloading_Firestar takes nothing returns nothing
    set gg_trg_Reloading_Firestar = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Reloading_Firestar, EVENT_PLAYER_UNIT_USE_ITEM )
    call TriggerAddCondition( gg_trg_Reloading_Firestar, Condition( function Trig_Reloading_Firestar_Conditions ) )
    call TriggerAddAction( gg_trg_Reloading_Firestar, function Trig_Reloading_Firestar_Actions )
endfunction

 
function Trig_Reloading_IMI_Barak2_Conditions takes nothing returns boolean
    if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H01I' ) ) then
        return false
    endif
    if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01J' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Reloading_IMI_Barak2_Actions takes nothing returns nothing
    local integer udg_maxammo
    local integer ammotype
    set udg_maxammo = 17
    set ammotype = udg_FindPing[44]
    call TriggerSleepAction( 0.10 )
    if ( GetItemCharges(GetManipulatedItem()) < udg_maxammo ) then
        if ( UnitHasItemOfTypeBJ(GetTriggerUnit(), ammotype) == false ) then
        else
            set udg_reloading[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = true
            call PlaySoundOnUnitBJ( gg_snd_IMI_SP_21_Barak_Reload, 100, GetManipulatingUnit() )
            call TriggerSleepAction( 2.20 )
            call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) + GetItemCharges(GetManipulatedItem()) ) )
            call SetItemCharges( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) - GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) ) )
            if ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), GetItemTypeId(GetManipulatedItem()))) > udg_maxammo ) then
                call SetItemCharges( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) + ( GetItemCharges(GetManipulatedItem()) - udg_maxammo ) ) )
            endif
            if ( GetItemCharges(GetManipulatedItem()) > udg_maxammo ) then
                call SetItemCharges( GetManipulatedItem(), udg_maxammo )
            call SetItemUserData( GetManipulatedItem(), GetItemCharges(GetManipulatedItem()) )
            endif
        endif
    else
    endif
    set udg_reloading[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = false    
endfunction

//===========================================================================
function InitTrig_Reloading_IMI_Barak2 takes nothing returns nothing
    set gg_trg_Reloading_IMI_Barak2 = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Reloading_IMI_Barak2, EVENT_PLAYER_UNIT_USE_ITEM )
    call TriggerAddCondition( gg_trg_Reloading_IMI_Barak2, Condition( function Trig_Reloading_IMI_Barak2_Conditions ) )
    call TriggerAddAction( gg_trg_Reloading_IMI_Barak2, function Trig_Reloading_IMI_Barak2_Actions )
endfunction

 
function Trig_Reloading_Colt_Python_357_Conditions takes nothing returns boolean
    if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H00Z' ) ) then
        return false
    endif
    if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00W' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Reloading_Colt_Python_357_Actions takes nothing returns nothing    
    local integer udg_maxammo
    local integer ammotype
    set udg_maxammo = 6
    set ammotype = udg_FindPing[49]
    call TriggerSleepAction( 0.10 )
    if ( GetItemCharges(GetManipulatedItem()) < udg_maxammo ) then
        if ( UnitHasItemOfTypeBJ(GetTriggerUnit(), ammotype) == false ) then
        else
            set udg_reloading[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = true
            call PlaySoundOnUnitBJ( gg_snd_Colt_Pyton_Elite_Reload, 100, GetManipulatingUnit() )
            call TriggerSleepAction( 2.80 )
            call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) + GetItemCharges(GetManipulatedItem()) ) )
            call SetItemCharges( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) - GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) ) )
            if ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), GetItemTypeId(GetManipulatedItem()))) > udg_maxammo ) then
                call SetItemCharges( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) + ( GetItemCharges(GetManipulatedItem()) - udg_maxammo ) ) )
            endif
            if ( GetItemCharges(GetManipulatedItem()) > udg_maxammo ) then
                call SetItemCharges( GetManipulatedItem(), udg_maxammo )
            call SetItemUserData( GetManipulatedItem(), GetItemCharges(GetManipulatedItem()) )
            endif
        endif
    else
    endif
    set udg_reloading[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = false
endfunction

//===========================================================================
function InitTrig_Reloading_Colt_Python_357 takes nothing returns nothing
    set gg_trg_Reloading_Colt_Python_357 = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Reloading_Colt_Python_357, EVENT_PLAYER_UNIT_USE_ITEM )
    call TriggerAddCondition( gg_trg_Reloading_Colt_Python_357, Condition( function Trig_Reloading_Colt_Python_357_Conditions ) )
    call TriggerAddAction( gg_trg_Reloading_Colt_Python_357, function Trig_Reloading_Colt_Python_357_Actions )
endfunction

 
function Trig_Reloading_Desert_Eagle_44_Conditions takes nothing returns boolean
    if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H00Y' ) ) then
        return false
    endif
    if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00U' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Reloading_Desert_Eagle_44_Actions takes nothing returns nothing
    local integer udg_maxammo
    local integer ammotype
    set udg_maxammo = 7
    set ammotype = udg_FindPing[53]
    call TriggerSleepAction( 0.10 )
    if ( GetItemCharges(GetManipulatedItem()) < udg_maxammo ) then
        if ( UnitHasItemOfTypeBJ(GetTriggerUnit(), ammotype) == false ) then
            else
            set udg_reloading[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = true
            call PlaySoundOnUnitBJ( gg_snd_Desert_Eagle_Reload, 100, GetManipulatingUnit() )
            call TriggerSleepAction( 1.90 )
            call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) + GetItemCharges(GetManipulatedItem()) ) )
            call SetItemCharges( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) - GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) ) )
            if ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), GetItemTypeId(GetManipulatedItem()))) > udg_maxammo ) then
                call SetItemCharges( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) + ( GetItemCharges(GetManipulatedItem()) - udg_maxammo ) ) )
            endif
            if ( GetItemCharges(GetManipulatedItem()) > udg_maxammo ) then
                call SetItemCharges( GetManipulatedItem(), udg_maxammo )
            call SetItemUserData( GetManipulatedItem(), GetItemCharges(GetManipulatedItem()) )
            endif
        endif
    else
    endif
    set udg_reloading[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = false
endfunction

//===========================================================================
function InitTrig_Reloading_Desert_Eagle_44 takes nothing returns nothing
    set gg_trg_Reloading_Desert_Eagle_44 = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Reloading_Desert_Eagle_44, EVENT_PLAYER_UNIT_USE_ITEM )
    call TriggerAddCondition( gg_trg_Reloading_Desert_Eagle_44, Condition( function Trig_Reloading_Desert_Eagle_44_Conditions ) )
    call TriggerAddAction( gg_trg_Reloading_Desert_Eagle_44, function Trig_Reloading_Desert_Eagle_44_Actions )
endfunction

 
function Trig_Reloading_SIG_Sauer_Pro_2340_Conditions takes nothing returns boolean
    if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H00R' ) ) then
        return false
    endif
    if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00N' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Reloading_SIG_Sauer_Pro_2340_Actions takes nothing returns nothing
    local integer udg_maxammo
    local integer ammotype
    set udg_maxammo = 13
    set ammotype = udg_FindPing[51]
    call TriggerSleepAction( 0.10 )
    if ( GetItemCharges(GetManipulatedItem()) < udg_maxammo ) then
        if ( UnitHasItemOfTypeBJ(GetTriggerUnit(), ammotype) == false ) then
        else
            set udg_reloading[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = true
            call PlaySoundOnUnitBJ( gg_snd_Sig_Sauer_SSG_Pro_Reload, 100, GetManipulatingUnit() )
            call TriggerSleepAction( 2.30 )
            call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) + GetItemCharges(GetManipulatedItem()) ) )
            call SetItemCharges( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) - GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) ) )
            if ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), GetItemTypeId(GetManipulatedItem()))) > udg_maxammo ) then
                call SetItemCharges( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) + ( GetItemCharges(GetManipulatedItem()) - udg_maxammo ) ) )
            endif
            if ( GetItemCharges(GetManipulatedItem()) > udg_maxammo ) then
                call SetItemCharges( GetManipulatedItem(), udg_maxammo )
            call SetItemUserData( GetManipulatedItem(), GetItemCharges(GetManipulatedItem()) )
            endif
        endif
    else
    endif
    set udg_reloading[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = false
endfunction

//===========================================================================
function InitTrig_Reloading_SIG_Sauer_Pro_2340 takes nothing returns nothing
    set gg_trg_Reloading_SIG_Sauer_Pro_2340 = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Reloading_SIG_Sauer_Pro_2340, EVENT_PLAYER_UNIT_USE_ITEM )
    call TriggerAddCondition( gg_trg_Reloading_SIG_Sauer_Pro_2340, Condition( function Trig_Reloading_SIG_Sauer_Pro_2340_Conditions ) )
    call TriggerAddAction( gg_trg_Reloading_SIG_Sauer_Pro_2340, function Trig_Reloading_SIG_Sauer_Pro_2340_Actions )
endfunction

 
function Trig_Reloading_SmithWesson_500_Conditions takes nothing returns boolean
    if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H007' ) ) then
        return false
    endif
    if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I009' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Reloading_SmithWesson_500_Actions takes nothing returns nothing
    local integer udg_maxammo
    local integer ammotype
    set udg_maxammo = 5
    set ammotype = udg_FindPing[55]
    call TriggerSleepAction( 0.10 )
    if ( GetItemCharges(GetManipulatedItem()) < udg_maxammo ) then
        if ( UnitHasItemOfTypeBJ(GetTriggerUnit(), ammotype) == false ) then
        else
            set udg_reloading[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = true
            call PlaySoundOnUnitBJ( gg_snd__500_Smith_Wesson_Reload, 100, GetManipulatingUnit() )
            call TriggerSleepAction( 4.00 )
            call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) + GetItemCharges(GetManipulatedItem()) ) )
            call SetItemCharges( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) - GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) ) )
            if ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), GetItemTypeId(GetManipulatedItem()))) > udg_maxammo ) then
                call SetItemCharges( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) + ( GetItemCharges(GetManipulatedItem()) - udg_maxammo ) ) )
            endif
            if ( GetItemCharges(GetManipulatedItem()) > udg_maxammo ) then
                call SetItemCharges( GetManipulatedItem(), udg_maxammo )
            call SetItemUserData( GetManipulatedItem(), GetItemCharges(GetManipulatedItem()) )
            endif
        endif
    else
    endif
    set udg_reloading[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = false
endfunction

//===========================================================================
function InitTrig_Reloading_SmithWesson_500 takes nothing returns nothing
    set gg_trg_Reloading_SmithWesson_500 = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Reloading_SmithWesson_500, EVENT_PLAYER_UNIT_USE_ITEM )
    call TriggerAddCondition( gg_trg_Reloading_SmithWesson_500, Condition( function Trig_Reloading_SmithWesson_500_Conditions ) )
    call TriggerAddAction( gg_trg_Reloading_SmithWesson_500, function Trig_Reloading_SmithWesson_500_Actions )
endfunction

 
function Trig_Reloading_Baretta_9000S_Conditions takes nothing returns boolean
    if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H003' ) ) then
        return false
    endif
    if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01M' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Reloading_Baretta_9000S_Actions takes nothing returns nothing
    local integer udg_maxammo
    local integer ammotype
    set udg_maxammo = 14
    set ammotype = udg_FindPing[52]
    call TriggerSleepAction( 0.10 )
    if ( GetItemCharges(GetManipulatedItem()) < udg_maxammo ) then
        if ( UnitHasItemOfTypeBJ(GetTriggerUnit(), ammotype) == false ) then
        else
            set udg_reloading[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = true
            call PlaySoundOnUnitBJ( gg_snd_APS_Reload, 100, GetManipulatingUnit() )
            call TriggerSleepAction( 2.70 )
            call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) + GetItemCharges(GetManipulatedItem()) ) )
            call SetItemCharges( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) - GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) ) )
            if ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), GetItemTypeId(GetManipulatedItem()))) > udg_maxammo ) then
                call SetItemCharges( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) + ( GetItemCharges(GetManipulatedItem()) - udg_maxammo ) ) )
            endif
            if ( GetItemCharges(GetManipulatedItem()) > udg_maxammo ) then
                call SetItemCharges( GetManipulatedItem(), udg_maxammo )
            call SetItemUserData( GetManipulatedItem(), GetItemCharges(GetManipulatedItem()) )
            endif
        endif
    else
    endif
    set udg_reloading[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = false
endfunction

//===========================================================================
function InitTrig_Reloading_Baretta_9000S takes nothing returns nothing
    set gg_trg_Reloading_Baretta_9000S = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Reloading_Baretta_9000S, EVENT_PLAYER_UNIT_USE_ITEM )
    call TriggerAddCondition( gg_trg_Reloading_Baretta_9000S, Condition( function Trig_Reloading_Baretta_9000S_Conditions ) )
    call TriggerAddAction( gg_trg_Reloading_Baretta_9000S, function Trig_Reloading_Baretta_9000S_Actions )
endfunction

 
function Trig_Reloading_HecklerKoch_USP_Conditions takes nothing returns boolean
    if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H006' ) ) then
        return false
    endif
    if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01W' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Reloading_HecklerKoch_USP_Actions takes nothing returns nothing
    local integer udg_maxammo
    local integer ammotype
    set udg_maxammo = 12
    set ammotype = udg_FindPing[54]
    call TriggerSleepAction( 0.10 )
    if ( GetItemCharges(GetManipulatedItem()) < udg_maxammo ) then
        if ( UnitHasItemOfTypeBJ(GetTriggerUnit(), ammotype) == false ) then
        else
            set udg_reloading[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = true
            call PlaySoundOnUnitBJ( gg_snd_H_K_USP_Reload, 100, GetManipulatingUnit() )
            call TriggerSleepAction( 2.30 )
            call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) + GetItemCharges(GetManipulatedItem()) ) )
            call SetItemCharges( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) - GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) ) )
            if ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), GetItemTypeId(GetManipulatedItem()))) > udg_maxammo ) then
                call SetItemCharges( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), ammotype)) + ( GetItemCharges(GetManipulatedItem()) - udg_maxammo ) ) )
            endif
            if ( GetItemCharges(GetManipulatedItem()) > udg_maxammo ) then
                call SetItemCharges( GetManipulatedItem(), udg_maxammo )
            call SetItemUserData( GetManipulatedItem(), GetItemCharges(GetManipulatedItem()) )
            endif
        endif
    else
    endif
    set udg_reloading[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = false
endfunction

//===========================================================================
function InitTrig_Reloading_HecklerKoch_USP takes nothing returns nothing
    set gg_trg_Reloading_HecklerKoch_USP = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Reloading_HecklerKoch_USP, EVENT_PLAYER_UNIT_USE_ITEM )
    call TriggerAddCondition( gg_trg_Reloading_HecklerKoch_USP, Condition( function Trig_Reloading_HecklerKoch_USP_Conditions ) )
    call TriggerAddAction( gg_trg_Reloading_HecklerKoch_USP, function Trig_Reloading_HecklerKoch_USP_Actions )
endfunction

 
function Trig_Reloading_Mauser_M2_Conditions takes nothing returns boolean
    if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H01J' ) ) then
        return false