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

Trigger Viewer

Survivors_1.63d.w3x
Variables
Initialization
init starting regions
playercount
create craftingTable dummies
colors
visibility time and more
crafting points
remove fire sound
ping bases
ping bases beginning
init bases
zoom
neutral passive ally
Gamemode and Difficulty
init gamemode
show dialoge
select dialoge options
select difficulty
---------------------------
pvp spawn
enable pvp after night 1
---------------------------
pve ffa spawn
timer expiration
daynight timer expires
preparation timer expires
FAQ
infos and help
tips init
show hints
health thirst hunger energy
energy loss
periodic energy gain
hunger
thirst
thirst and hunger dmg
eat apple
eat mushroom
eat bread
eat berry
eat raw meat
eat cooked meat
eat raw fish
eat cooked fish
drop animal meat
drink water
changing classes
items init
strenghtedUnits init
units init
weapon initalization
toFist
toWeapon
toAxe
toSpear
toPickaxe
toHoe
toBow
toShovel
toRod
toBoneBow
toCrossbow
toMultibreak
toBattleAxe
toHellCleaver
toRifle
toStrenghtedWeaponUnit
buildings
wall drops unwanted items
demolish
open gates
close gates
torch check for coal
torch activate
torch init
fountain gain mana
fountain drink
fountain water leak
furnace melt
fire pit cook
alchemy table sfx
alchemy table sfx destroy
alchemy table brew
init enter mine
enter mine
leave mine
mine collapse
enter deeper mine
leave deeper mine
demolish torch
resting
altar of kings
tower in mine PVP
use anvil
enter portal
leave portal
unlock recipes
---------------------------
give appropriate recipe page
recipes spellbook init
next receipts 1
next receipts 2
next receipts 3
next receipts 4
previous receipts 2
previous receipts 3
previous receipts 4
previous receipts 5
---------------------------
unlock axe
unlock pickaxe
unlock sword
unlock bow
unlock hoe
unlock barricade
unlock gate
unlock torch
unlock fire pit
unlock boots
unlock bunker tower
---------------------------
unlock chest
unlock net
unlock watch tower
unlock waterskin
unlock backpack
unlock armor
unlock reinforced gate
unlock stone wall
unlock bone tower
---------------------------
unlock bone bow
unlock repair hammer
unlock fountain
unlock furnace
unlock bucket
unlock vial
unlock anvil
unlock steel wall
unlock boulder tower
---------------------------
unlock lava tower
unlock shovel
unlock bed
unlock alchemy table
unlock mine
unlock fishing rod
unlock deeper mine
unlock spear
unlock crossbow
unlock altar of kings
unlock battle axe
unlock portal
unlock hell armor
unlock hell cleaver
crafting
crafting table cooldown 1
crafting table cooldown 2
crafting table cooldown 3
crafting table cooldown 4
crafting table cooldown 5
crafting table cooldown 6
crafting table cooldown 7
crafting table cooldown 8
crafting table cooldown over 1
crafting table cooldown over 2
crafting table cooldown over 3
crafting table cooldown over 4
crafting table cooldown over 5
crafting table cooldown over 6
crafting table cooldown over 7
crafting table cooldown over 8
crafting table destroy
---------------------------
craft items 1
craft items 2
craft items 3
craft items 4
craft items 5
craft items 6
craft items 7
craft items 8
craft specialist items
level
gain experience item
gain experience ability
gain experience periodically
gain experience attack
gain experience kill
items
equip strenghted weapon
sfx items restrictions
repair kit restriction
reduce charges 1
reduce charges 2
boots
gargoyle wings movement
wheat on wrong terrain
wheat fully grown
fill waterskin
use waterskin
drop armor from buildings etc
armor restriction
armor equip
armor drop
armor sfx change
armor charges
armor init
equip repair hammer
drop repair hammer
repair hammer change
repair hammer charges
fill bucket
use water bucket
shovel use
drop leather
drop string
fishing rod
spawn mushrooms
lava armor equip
lava armor remove
backpack
backpack sfx change
init backpack
activate backpack
deactivate backpack
pick up item
teleport to player
teleport to player 2
effects
rifle sound effect
rifle sound group
building working effect
plow init
hoe
resting effect
lava damage
remove tree
explosive damage
mining
lumber
stones
copper
gold
iron
diamond
lava stone
coal
wheat
berry bush
Is Unit Moving
Is Unit Moving
Unit Indexer
ItemStackNSplit
EasyItemStacknSplitGUI
respawn units
respawn
respawn mine monsters
register mine creeps
monsters
WHERE TO CHANGE BOSS TRIGGER
gargoyle ensnared group
damage monsters at day
monster unit init
monster region init
new monster spawn
monstercount
---------------------------
drop items
destroy wheat
---------------------------
perks
perk init
learn perk
give perk
hint perk
hunter damage
hunter damage bonus
hunter damageGroup
hunger survivor
thirst survivor
fisherman fishing
fisherman init
fisherman show xp
nightowl
nightowl dummy
nightowl regeneration
make bear enemy
tame ability
tame item drop fix
shear sheep
bear feed
tamed bear death
detect stag
medic heal
medic heal timer 1
medic heal timer 2
medic heal timer 3
medic heal timer 4
medic heal timer 5
medic heal timer 6
medic heal timer 7
medic heal timer 8
specialist item restriction
player
hero revive trigger
grave revive
death
leave
max level cp
get crafting points
friendly attack
multiboard
Update Multiboard
Create PVE Multiboard
Create FFA Multiboard
Create PVP Multiboard
saveloadsystem
CodeGen Init
CodeGen Save
CodeGen Load
debug
testKill
testTP
testMonstercount
testRevive
testLevelUp
testCraftingPoints
testDaytime
testAttributes
testVisibility
tower upgrades
stone tower
stone tower 2
stone tower 3
---------------------------
scout tower
scout tower 2
scout tower 3
scout tower 4
---------------------------
wooden tower
wooden tower 2
wooden tower 3
---------------------------
boulder tower
boulder tower 2
boulder tower 3
---------------------------
bunker tower
bunker tower 2
bunker tower 3
---------------------------
bone Tower
bone Tower 2
---------------------------
lava tower
lava tower 2
lava tower 3
gylphs
add gylph abilities
remove glyph abilities
neutral buildings
init neutral building spawns
spawn neutral buildigns
take building over
lose neutral building
give reward
hell
endboss
reset everything
open gate
endboss checkTeammember MSG
startCinematic
devil death
send hell wave
wave beat
enter hell portal
select option
setup end dialog
anderes
lava spawn
lava int
move dummy drakes
Enter map-specific custom script code below. This text will be included in the map script after variables are declared and before any trigger code.
//TESH.scrollpos=0
//TESH.alwaysfold=0
function CodeGen_SaveToDisk takes string loadcode, string filename returns nothing
    call PreloadGenClear()
    call PreloadGenStart()
    call Preload(loadcode)
    call PreloadGenEnd(filename)
    call ClearSelection()
endfunction

function CodeGen_Init takes nothing returns nothing
    local integer i = 1
    local integer b = udg_SaveLoad_Base
    local integer m = udg_SaveLoad_MaxValue
    loop
        exitwhen i >= udg_SaveLoad_MaxValue
        set udg_SaveLoad_Char[i] = SubString(udg_SaveLoad_Alphabet, i, i+1)
        set i = i + 1
    endloop
    set udg_SaveLoad_Alphabet = SubString(udg_SaveLoad_Alphabet, 0, 1) + SubString(udg_SaveLoad_Alphabet, m + 1, b)
    set udg_SaveLoad_Base     = b - m
endfunction

function CodeGen_ConvertItem takes integer id returns integer
    local integer i = 1
    loop
        exitwhen i > udg_SaveLoad_ItemCount
        if (id == udg_SaveLoad_Item[i]) then
            return i
        endif
        set i = i + 1
    endloop
    return 0
endfunction

function CodeGen_ConvertUnit takes integer id returns integer
    local integer i = 1
    loop
        exitwhen i > udg_SaveLoad_HeroCount
        if (id == udg_SaveLoad_Hero[i]) then
            return i
        endif
        set i = i + 1
    endloop
    return 0
endfunction

function CodeGen_Encode takes integer i returns string
    local integer b
    local string s = ""
    
    if i <= udg_SaveLoad_Base then
        return SubString(udg_SaveLoad_Alphabet, i, i + 1)
    endif
    
    loop
        exitwhen i <= 0
        set b = i - (i / udg_SaveLoad_Base) * udg_SaveLoad_Base
        set s = SubString(udg_SaveLoad_Alphabet, b, b + 1) + s
        set i = i / udg_SaveLoad_Base
    endloop
    
    return s
endfunction

function CodeGen_StrPos takes string s returns integer
    local integer i = 0
    loop
        exitwhen i > udg_SaveLoad_Base
        if s == SubString(udg_SaveLoad_Alphabet, i, i + 1) then
            return i
        endif
        set i = i + 1
    endloop
    return -1
endfunction

function CodeGen_Decode takes string s returns integer
    local integer a = 0
    
    loop
        exitwhen StringLength(s) == 1
        set a = a * udg_SaveLoad_Base + udg_SaveLoad_Base * CodeGen_StrPos(SubString(s, 0, 1))
        set s = SubString(s, 1, 99)
    endloop
    
    return a+CodeGen_StrPos(s)
endfunction

function CodeGen_StringChecksum takes string in returns integer
    local integer i = 0
    local integer l = StringLength(in)
    local integer t = 0
    local integer o = 0
    loop
        exitwhen i >= l
        set t = CodeGen_Decode(SubString(in, i, i + 1))
        set o = o + t
        set i = i + 1
    endloop
    return o
endfunction

function CodeGen_Color takes string char returns string
    local integer i = 0
    local integer l = StringLength(udg_SaveLoad_Full)
    local string x  = ""
    loop
        exitwhen i >= l
        set x = SubString(udg_SaveLoad_Full, i, i + 1)
        if char == x then
            if (x=="0" or S2I(x) > 0) then
                return udg_SaveLoad_Number + char + "|r"
            elseif StringCase(x, false) == x then
                return udg_SaveLoad_Lower + char + "|r"
            elseif StringCase(x, true) == x then
                return udg_SaveLoad_Upper + char + "|r"
            endif
        endif
        set i = i + 1
    endloop
    return char
endfunction

function CodeGen_Format takes string s returns string
    local integer i = 0
    local integer x = StringLength(s)
    local integer j = 1
    local string s2 = ""
    
    loop
        exitwhen i >= x
        
        set s2 = s2 + CodeGen_Color(SubString(s, i, i + 1))
        
        if (j >= udg_SaveLoad_HyphenSpace and i != (x-1)) then
            set j = 0
            set s2 = s2 + udg_SaveLoad_SeperationChar
        endif
        
        set j = j + 1
        set i = i + 1
    endloop
    
    return s2
endfunction

function CodeGen_Strip takes string s returns string
    local integer i  = 0
    local integer x  = StringLength(s)
    local string out = ""
    local string a   = ""
    
    loop
        exitwhen i >= x
        set a = SubString(s, i, i + 1)
        if (a != udg_SaveLoad_SeperationChar) then
            set out = out + a
        endif
        set i = i + 1
    endloop
    
    return out
endfunction

// yeeahh descriptive variables
function CodeGen_Load takes string s returns nothing
    local string str = CodeGen_Strip(s)
    local string tmp = ""
    local string c   = ""
    local integer x  = 0
    local integer i  = 1
    local integer l  = 0
    local integer j  = 1
    local integer f  = 0
    local boolean b  = true
    
    set udg_SaveLoad_Valid = false
    
    if (udg_SaveLoad_Security) then
        loop
            exitwhen i > 3
            if (CodeGen_Decode(SubString(str, 0, i)) == CodeGen_StringChecksum(SubString(str, i, 999))) then
                set udg_SaveLoad_Valid = true
                set str = SubString(str, i, 999)
                set i = 4
            endif
            set i = i + 1
        endloop
    endif
    
    if (not udg_SaveLoad_Valid) then
        set udg_SaveLoad_Error = "Invalid Code"
        return
    endif
    
    set i = 0
    set l = StringLength(str)
    
    if (udg_SaveLoad_CheckName) then
        set c = CodeGen_Encode(CodeGen_StringChecksum(GetPlayerName(GetTriggerPlayer())))
        set i = StringLength(c)
        if (c != SubString(str, l - i, i)) then
            set udg_SaveLoad_Valid = false
            set udg_SaveLoad_Error = "Wrong username"
            return
        endif
        set l = l - i
    endif
    
    set i = 0
    
    loop
        exitwhen i >= l
        set tmp = SubString(str, i, i + 1)
        
        set b = true
        set f = 0
        set j = 1
        
        loop
            exitwhen f >= (udg_SaveLoad_MaxValue)
            if (tmp == udg_SaveLoad_Char[f]) then
                set j = f + 2
                set udg_Load[x] = CodeGen_Decode(SubString(str, i + 1, i + (j)))
                set b = false
                set f = udg_SaveLoad_MaxValue
            endif
            set f = f + 1
        endloop
        
        if (b) then
            set udg_Load[x] = CodeGen_Decode(tmp)
        endif
        
        set i = i + j
        set x = x + 1
    endloop
    
    set udg_SaveLoad_Valid = true
endfunction

function CodeGen_Compile takes nothing returns string
    local integer i  = 0
    local integer j  = 0
    local string out = ""
    local string ln  = ""
    local string x   = ""

    loop
        exitwhen i > udg_SaveCount
        set x = CodeGen_Encode(udg_Save[i])
        set j = StringLength(x)

        if (j > 1) then
            set out = out + udg_SaveLoad_Char[j-1]
        endif
        
        set out = out + x
        set i = i + 1
    endloop

    if (udg_SaveLoad_CheckName) then
        set out = out + CodeGen_Encode(CodeGen_StringChecksum(GetPlayerName(GetTriggerPlayer())))
    endif
    
    if (udg_SaveLoad_Security) then
        set out = CodeGen_Encode(CodeGen_StringChecksum(out)) + out
    endif
    
    if udg_SaveLoad_SaveToDisk and GetLocalPlayer() == GetTriggerPlayer() then
        call CodeGen_SaveToDisk(out, udg_SaveLoad_Directory + "\\" + udg_SaveLoad_Filename)
    endif
                
    return CodeGen_Format(out)
endfunction
Name Type Is Array Initial Value
allPlayers force No
armor_sfx string Yes
attributes integer Yes
aux_attackedUnit unit No
aux_item item No
backpack_sfx effect Yes
bases rect Yes
Code StringExt No
colors string Yes
count_craftingtable integer Yes
craftingtable_SFX_unit unit Yes
craftingTableTimer timer Yes
creep_respawn_locations location Yes
creep_respawn_value integer No
currentArmor_sfx effect Yes
currentRecipeAbility abilcode Yes
currentRecipePage integer Yes 1
damageTakenGroup group No
daynightTimer timer No
daynightTimerWindow timerdialog No
devil unit No
devil_cinematic unit No
dialog_difficulty dialog No
dialog_difficulty_buttons button Yes
dialogeButtonTeammode button Yes
dialogTeammode dialog No
difficulty string No
drawAttentionInteger integer No
drinkInteger integer No
EasyItem__ERRORSOUND string No
EasyItem__SPLIT boolean No
EasyItem__SPLITDROP boolean No
EasyItem__SPLITSIZE integer No
EasyItem__SPLITSTACK boolean No
EasyItem__SPLITSTACKDELAY real No
EasyItem__USEITEMLEVEL boolean No
EasyItem_integer integervar Yes
EasyItem_item item No
EasyItem_items item Yes
EasyItem_point location Yes
EasyItem_sound sound No
EasyItem_string string Yes
EasyItem_timer timer No
EasyItem_unit unit No
EasyItem_units unit Yes
endDialog dialog No
endDialogButton button Yes
ensnsaredGargoyleGroup group No
ffa boolean No
firstDayTimer timer No
FishermanChooseItemInt integer No
FishermanItems itemcode Yes
FishermanItemString string Yes
FishermanItemXP integer Yes
FishermanLevel integer Yes 1
FishermanLevelXPCap integer Yes
fishermanXP integer Yes
graveGroup group No
haveBear boolean Yes
hellspawn_int integer No
Hero unit No
heroes unit Yes
heroGroup group No
hoe_ability abilcode Yes
hunter_damageGroup group No
icons imagefile Yes
isNight boolean No
Item item No
items itemcode Yes
lavaDmgInt integer No
lavaDrakes unit Yes
lavaSpawn_Int integer No
lavaspawn_regions rect Yes
leftHand_sfx effect Yes
Load integer Yes
loadComplete boolean Yes
LoadCount integer No
loadInt integer No
maxStrenghtedUnits integer No
maxUnits integer No
mb_integer integer No
medicTimer_1 timer No
medicTimer_2 timer No
medicTimer_3 timer No
medicTimer_4 timer No
medicTimer_5 timer No
medicTimer_6 timer No
medicTimer_7 timer No
medicTimer_8 timer No
mine_bool boolean No
mineEnter rect Yes
monster_ID integer No
monsterCount integer No
monsters unitcode Yes
monsterSpawnAmount integer No
monsterSpawnInt integer No
monsterSpawns rect Yes
monsterSpawnStrength integer No
multiboard multiboard No
neutralBuilding unit Yes
neutralBuildingSpawns rect Yes
neutralDestructible destructable Yes
numberOfHeroesFinalFight integer No
numberOfTeams integer No
perkInit abilcode Yes
perkInteger integer No
perkPlayers integer Yes
perkPlayerString string Yes [no perk]
perkString string Yes
pickPerkinit abilcode Yes
player_backpack unit Yes
player_hero unit Yes
player_survivedNights integer Yes
playercount integer No
playerDead boolean Yes
playerRank integer Yes
playerSpotInMultiboard integer Yes
preparationTimer timer No
preparationTimerWindow timerdialog No
ranks string Yes 1
rec_alchemyTable boolean No
rec_altarofkings boolean No
rec_anvil boolean No
rec_armor boolean No
rec_axe boolean No
rec_backpack boolean No
rec_barricade boolean No
rec_battleaxe boolean No
rec_bed boolean No
rec_bonebow boolean No
rec_boneTower boolean No
rec_boots boolean No
rec_boulderTower boolean No
rec_bow boolean No
rec_bucket boolean No
rec_bunkerTower boolean No
rec_chest boolean No
rec_crossbow boolean No
rec_deepMine boolean No
rec_firepit boolean No
rec_fishRod boolean No
rec_fountain boolean No
rec_furnace boolean No
rec_hellarmor boolean No
rec_hellcleaver boolean No
rec_hoe boolean No
rec_lavaTower boolean No
rec_mine boolean No
rec_net boolean No
rec_pickaxe boolean No
rec_portal boolean No
rec_reinfGate boolean No
rec_repairHammer boolean No
rec_shovel boolean No
rec_spear boolean No
rec_steelWall boolean No
rec_stoneWall boolean No
rec_sword boolean No
rec_torch boolean No
rec_vial boolean No
rec_watchtower boolean No
rec_waterskin boolean No
rec_woodenGate boolean No
RespawnLoc location No
ReviveLoc location No
rifleman_soundEffectGroup group No
rows integer No
Save integer Yes
SaveCount integer No
SaveLoad_Abilities abilcode Yes
SaveLoad_AbilityCount integer No
SaveLoad_Alphabet string No
SaveLoad_Base integer No
SaveLoad_Char string Yes
SaveLoad_CheckName boolean No
SaveLoad_Directory string No
SaveLoad_Error string No
SaveLoad_Filename string No
SaveLoad_Full string No
SaveLoad_Hero unitcode Yes
SaveLoad_HeroCount integer No
SaveLoad_HyphenSpace integer No
SaveLoad_Item itemcode Yes
SaveLoad_ItemCount integer No
SaveLoad_Lower string No
SaveLoad_MaxValue integer No
SaveLoad_Number string No
SaveLoad_SaveToDisk boolean No
SaveLoad_Security boolean No
SaveLoad_SeperationChar string No
SaveLoad_Upper string No
SaveLoad_Valid boolean No
start_regions rect Yes
statPoints integer Yes
strenghted_items itemcode Yes
strenghtedInt integer No
strenghtedUnits unitcode Yes
survivedNights integer No
teamcheck boolean Yes
teammode boolean No
teamnumberForPlayer integer Yes
temp_bHasUnitBeenStored boolean Yes
temp_boolArr boolean Yes
temp_CreepSpawnLoc location No
temp_CustomizedTime integer Yes
temp_intArr integer Yes
temp_MaxCustomizedArray integer No
temp_player player No
temp_playerGroup force No
temp_RevivingCreeps group No
temp_SecondsPerLevel integer No
temp_TimeFrequencyMAX integer Yes
temp_TimeLeft integer Yes
temp_UnitGroup group No
temp_unitType unitcode No
temp_UnitTypes unitcode Yes
temp_UnitTypes_ForTime unitcode Yes
TempEff boolean No
TempLoc location No
TempLoc2 location No
TempLoc3 location No
TempReal real No
TempUnit unit No
TempX real No
TempY real No
thirstInt integer No
tips string Yes
tmp_integer integer No
tmp_real real No
tmpPlayer player No
tmpString string No
tmpTeam force No
tmpUnit unit No
toFist_int integer No
UDex integer No
UDexGen integer No
UDexNext integer Yes
UDexPrev integer Yes
UDexRecycle integer No
UDexUnits unit Yes
UDexWasted integer No
UMovNext integer Yes
UMovPrev integer Yes
UnitIndexerEnabled boolean No
UnitIndexEvent real No
UnitMoving boolean Yes
UnitMovingEvent real No
UnitMovingX real Yes
UnitMovingY real Yes
units unitcode Yes
waterFountainInteger integer No
weaponInteger integer No
weapons_sfxString string Yes
zzzzt1 timer No
zzzzt2 timer No
zzzzt3 timer No
zzzzt4 timer No
zzzzt5 timer No
zzzzt6 timer No
zzzzt7 timer No
zzzzt8 timer No
init starting regions
  Events
    Map initialization
  Conditions
  Actions
    Set start_regions[1] = possible_player_spawn_1 <gen>
    Set start_regions[2] = possible_player_spawn_2 <gen>
    Set start_regions[3] = possible_player_spawn_3 <gen>
    Set start_regions[4] = possible_player_spawn_4 <gen>
    Set start_regions[5] = possible_player_spawn_5 <gen>
    Set start_regions[6] = possible_player_spawn_6 <gen>
    Set start_regions[7] = possible_player_spawn_7 <gen>
    Set start_regions[8] = possible_player_spawn_8 <gen>
    Set start_regions[9] = possible_player_spawn_9 <gen>
    Set start_regions[10] = possible_player_spawn_10 <gen>
playercount
  Events
    Map initialization
  Conditions
  Actions
    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) controller) Equal to User
            ((Picked player) slot status) Equal to Is playing
          Then - Actions
            Set playercount = (playercount + 1)
            Set monsterSpawnStrength = (monsterSpawnStrength + 1)
          Else - Actions
create craftingTable dummies
  Events
    Time - Elapsed game time is 0.10 seconds
  Conditions
  Actions
    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) controller) Equal to User
            ((Picked player) slot status) Equal to Is playing
          Then - Actions
            Unit - Create 1 no weapon or tool equipped (dummy_CraftingTable) for (Picked player) at (Center of (Playable map area)) facing Default building facing degrees
            Unit - Create 1 wait 60 seconds (dummy_CraftingTable) for (Picked player) at (Center of (Playable map area)) facing Default building facing degrees
            Unit - Create 1 just 2 crafting tables are allowed (dummy_CraftingTable) for (Picked player) at (Center of (Playable map area)) facing Default building facing degrees
            Unit - Create 1 wait 15 seconds (dummy_medicPerk) for (Picked player) at (Center of (Playable map area)) facing Default building facing degrees
          Else - Actions
colors
  Events
    Map initialization
  Conditions
  Actions
    Set colors[1] = |cffff0000
    Set colors[2] = |cff0000ff
    Set colors[3] = |cff00ffff
    Set colors[4] = |cff550088
    Set colors[5] = |cffffff00
    Set colors[6] = |cffff8800
    Set colors[7] = |cff00ff00
    Set colors[8] = |cffee55bb
    Set colors[9] = |cff999999
    Set colors[10] = |cff77bbff
visibility time and more
  Events
    Time - Elapsed game time is 0.10 seconds
  Conditions
  Actions
    Environment - Set sky to Felwood Sky
    Visibility - Enable black mask
    Visibility - Create an initially Enabled visibility modifier for Player 12 (Brown) emitting Visibility across greenland <gen>
    Game - Set the time of day to 12
    Game - Turn the day/night cycle Off
    Game - Set Restrict resource trading to allies to On
    Game - Set Use handicaps to Off
crafting points
  Events
    Map initialization
  Conditions
  Actions
    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
            playercount Equal to 1
          Then - Actions
            Player - Set (Picked player) Current lumber to 15
          Else - Actions
            Player - Set (Picked player) Current lumber to 6
remove fire sound
  Events
    Map initialization
  Conditions
  Actions
    Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is A structure) Equal to True)) and do (Actions)
      Loop - Actions
        Set TempUnit = (Picked unit)
        Custom script: call UnitRemoveAbility(udg_TempUnit, 'Afih')
        Custom script: call UnitRemoveAbility(udg_TempUnit, 'Afio')
        Custom script: call UnitRemoveAbility(udg_TempUnit, 'Afiu')
        Custom script: call UnitRemoveAbility(udg_TempUnit, 'Afin')
        Custom script: call UnitRemoveAbility(udg_TempUnit, 'Afir')
ping bases
  Events
    Player - Player 1 (Red) types a chat message containing -base as An exact match
    Player - Player 2 (Blue) types a chat message containing -base as An exact match
    Player - Player 3 (Teal) types a chat message containing -base as An exact match
    Player - Player 4 (Purple) types a chat message containing -base as An exact match
    Player - Player 5 (Yellow) types a chat message containing -base as An exact match
    Player - Player 6 (Orange) types a chat message containing -base as An exact match
    Player - Player 7 (Green) types a chat message containing -base as An exact match
    Player - Player 8 (Pink) types a chat message containing -base as An exact match
  Conditions
  Actions
    For each (Integer A) from 1 to 14, do (Actions)
      Loop - Actions
        Set TempLoc = (Center of bases[(Integer A)])
        Cinematic - Ping minimap for (Player group((Triggering player))) at TempLoc for 5.00 seconds
        Custom script: call RemoveLocation(udg_TempLoc)
ping bases beginning
  Events
    Time - Elapsed game time is 420.00 seconds
  Conditions
  Actions
    Game - Display to (All players) the text: The night starts soon, start building your base to be safe from monsters.
    For each (Integer A) from 1 to 13, do (Actions)
      Loop - Actions
        Set TempLoc = (Center of bases[(Integer A)])
        Cinematic - Ping minimap for (All players) at TempLoc for 10.00 seconds
        Custom script: call RemoveLocation(udg_TempLoc)
init bases
  Events
    Map initialization
  Conditions
  Actions
    Set bases[1] = base_1 <gen>
    Set bases[2] = base_2 <gen>
    Set bases[3] = base_3 <gen>
    Set bases[4] = base_4 <gen>
    Set bases[5] = base_5 <gen>
    Set bases[6] = base_6 <gen>
    Set bases[7] = base_7 <gen>
    Set bases[8] = base_8 <gen>
    Set bases[9] = base_9 <gen>
    Set bases[10] = base_10 <gen>
    Set bases[11] = base_11 <gen>
    Set bases[12] = base_12 <gen>
    Set bases[13] = base_13 <gen>
zoom
  Events
    Player - Player 1 (Red) types a chat message containing -zoom as A substring
    Player - Player 2 (Blue) types a chat message containing -zoom as A substring
    Player - Player 3 (Teal) types a chat message containing -zoom as A substring
    Player - Player 4 (Purple) types a chat message containing -zoom as A substring
    Player - Player 5 (Yellow) types a chat message containing -zoom as A substring
    Player - Player 6 (Orange) types a chat message containing -zoom as A substring
    Player - Player 7 (Green) types a chat message containing -zoom as A substring
    Player - Player 8 (Pink) types a chat message containing -zoom as A substring
  Conditions
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Substring((Entered chat string), 7, (Length of (Entered chat string)))) Equal to
      Then - Actions
        Skip remaining actions
      Else - Actions
        Camera - Set (Triggering player)'s camera Distance to target to (Real((Substring((Entered chat string), 7, (Length of (Entered chat string)))))) over 0.20 seconds
neutral passive ally
  Events
    Map initialization
  Conditions
  Actions
    Player Group - Pick every player in (All players) and do (Actions)
      Loop - Actions
        Player - Make (Picked player) treat Neutral Passive as an Ally
init gamemode
  Events
    Time - Elapsed game time is 0.10 seconds
  Conditions
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        playercount Equal to 1
      Then - Actions
        Dialog - Change the title of dialog_difficulty to Select Difficulty
        Dialog - Create a dialog button for dialog_difficulty labelled |cff7cfc00Easy|r
        Set dialog_difficulty_buttons[1] = (Last created dialog Button)
        Dialog - Create a dialog button for dialog_difficulty labelled |cfff0f0f0Normal|r
        Set dialog_difficulty_buttons[2] = (Last created dialog Button)
        Dialog - Create a dialog button for dialog_difficulty labelled |cffff0000Hard|r
        Set dialog_difficulty_buttons[3] = (Last created dialog Button)
        Dialog - Create a dialog button for dialog_difficulty labelled |cffa0a0a0Nightmare|r
        Set dialog_difficulty_buttons[4] = (Last created dialog Button)
        Dialog - Show dialog_difficulty for Player 1 (Red)
        Player Group - Pick every player in (All players) and do (Actions)
          Loop - Actions
            Player - Disable Altar of Kings for (Picked player)
      Else - Actions
        Trigger - Run show_dialoge <gen> (ignoring conditions)
        Game - Display to (All players) for 60.00 seconds the text: (colors[1] + ((Name of Player 1 (Red)) + |r is picking a gamemode.))
show dialoge
  Events
  Conditions
  Actions
    Dialog - Change the title of dialogTeammode to Select Gamemode
    Dialog - Create a dialog button for dialogTeammode labelled PVE
    Set dialogeButtonTeammode[1] = (Last created dialog Button)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        playercount Equal to 8
      Then - Actions
        Dialog - Create a dialog button for dialogTeammode labelled PVP - 2 Teams
        Set dialogeButtonTeammode[2] = (Last created dialog Button)
        Dialog - Create a dialog button for dialogTeammode labelled PVP - 4 Teams
        Set dialogeButtonTeammode[4] = (Last created dialog Button)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        playercount Equal to 6
      Then - Actions
        Dialog - Create a dialog button for dialogTeammode labelled PVP - 2 Teams
        Set dialogeButtonTeammode[2] = (Last created dialog Button)
        Dialog - Create a dialog button for dialogTeammode labelled PVP - 3 Teams
        Set dialogeButtonTeammode[3] = (Last created dialog Button)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        playercount Equal to 4
      Then - Actions
        Dialog - Create a dialog button for dialogTeammode labelled PVP - 2 Teams
        Set dialogeButtonTeammode[2] = (Last created dialog Button)
      Else - Actions
    Dialog - Create a dialog button for dialogTeammode labelled FFA
    Set dialogeButtonTeammode[5] = (Last created dialog Button)
    Dialog - Show dialogTeammode for Player 1 (Red)
select dialoge options
  Events
    Dialog - A dialog button is clicked for dialogTeammode
  Conditions
  Actions
    -------- PVE --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Clicked dialog button) Equal to dialogeButtonTeammode[1]
      Then - Actions
        Set teammode = False
        Cinematic - Clear the screen of text messages for (All players)
        Game - Display to (All players) the text: [PVE] gamemode has been picked. -save/-load is now enabled
        Dialog - Change the title of dialog_difficulty to Select Difficulty
        Dialog - Create a dialog button for dialog_difficulty labelled |cff7cfc00Easy|r
        Set dialog_difficulty_buttons[1] = (Last created dialog Button)
        Dialog - Create a dialog button for dialog_difficulty labelled |cfff0f0f0Normal|r
        Set dialog_difficulty_buttons[2] = (Last created dialog Button)
        Dialog - Create a dialog button for dialog_difficulty labelled |cffff0000Hard|r
        Set dialog_difficulty_buttons[3] = (Last created dialog Button)
        Dialog - Create a dialog button for dialog_difficulty labelled |cffa0a0a0Nightmare|r
        Set dialog_difficulty_buttons[4] = (Last created dialog Button)
        Dialog - Show dialog_difficulty for Player 1 (Red)
      Else - Actions
        Game - Display to (All players) for 30 seconds the text: The PVP/FFA mode in Survivors is just a feature and still 'work in progress' which is why the mode may contain some bugs.
        Trigger - Turn on enable_pvp_after_night_1 <gen>
        Trigger - Turn on tower_in_mine_PVP <gen>
        Player - Disable Altar of Kings for (Picked player)
        Countdown Timer - Start preparationTimer as a One-shot timer that will expire in 180.00 seconds
        Countdown Timer - Create a timer window for (Last started timer) with title Preparation Time:
        Set preparationTimerWindow = (Last created timer window)
        Countdown Timer - Show (Last created timer window)
    -------- FFA --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Clicked dialog button) Equal to dialogeButtonTeammode[5]
      Then - Actions
        Set teammode = False
        Set ffa = True
        Cinematic - Clear the screen of text messages for (All players)
        Game - Display to (All players) the text: [FFA] gamemode has been picked.
        Trigger - Turn on show_hints <gen>
        Trigger - Turn on hint_perk <gen>
        Trigger - Run pve_ffa_spawn <gen> (ignoring conditions)
        Trigger - Run Create_FFA_Multiboard <gen> (ignoring conditions)
        Player Group - Pick every player in (All players) and do (Actions)
          Loop - Actions
            For each (Integer A) from 1 to 8, do (Actions)
              Loop - Actions
                Player - Make (Picked player) treat (Player((Integer A))) as an Enemy
      Else - Actions
    -------- PVP --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Clicked dialog button) Equal to dialogeButtonTeammode[2]
      Then - Actions
        Set teammode = True
        Set numberOfTeams = 2
        Cinematic - Clear the screen of text messages for (All players)
        Game - Display to (All players) the text: [PVP - 2 Teams] gamemode has been picked.
        Player Group - Pick every player in (All players) and do (Actions)
          Loop - Actions
            For each (Integer A) from 1 to 8, do (Actions)
              Loop - Actions
                Player - Make (Picked player) treat (Player((Integer A))) as an Enemy
        Trigger - Turn on show_hints <gen>
        Trigger - Turn on hint_perk <gen>
        Trigger - Run pvp_spawn <gen> (ignoring conditions)
        Trigger - Run Create_PVP_Multiboard <gen> (ignoring conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Clicked dialog button) Equal to dialogeButtonTeammode[3]
      Then - Actions
        Set teammode = True
        Set numberOfTeams = 3
        Cinematic - Clear the screen of text messages for (All players)
        Game - Display to (All players) the text: [PVP - 3 Teams] gamemode has been picked.
        Player Group - Pick every player in (All players) and do (Actions)
          Loop - Actions
            For each (Integer A) from 1 to 8, do (Actions)
              Loop - Actions
                Player - Make (Picked player) treat (Player((Integer A))) as an Enemy
        Trigger - Turn on show_hints <gen>
        Trigger - Turn on hint_perk <gen>
        Trigger - Run pvp_spawn <gen> (ignoring conditions)
        Trigger - Run Create_PVP_Multiboard <gen> (ignoring conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Clicked dialog button) Equal to dialogeButtonTeammode[4]
      Then - Actions
        Set teammode = True
        Set numberOfTeams = 4
        Cinematic - Clear the screen of text messages for (All players)
        Game - Display to (All players) the text: [PVP - 4 Teams] gamemode has been picked.
        Player Group - Pick every player in (All players) and do (Actions)
          Loop - Actions
            For each (Integer A) from 1 to 8, do (Actions)
              Loop - Actions
                Player - Make (Picked player) treat (Player((Integer A))) as an Enemy
        Trigger - Turn on show_hints <gen>
        Trigger - Turn on hint_perk <gen>
        Trigger - Run pvp_spawn <gen> (ignoring conditions)
        Trigger - Run Create_PVP_Multiboard <gen> (ignoring conditions)
      Else - Actions
select difficulty
  Events
    Dialog - A dialog button is clicked for dialog_difficulty
  Conditions
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Clicked dialog button) Equal to dialog_difficulty_buttons[1]
      Then - Actions
        Game - Display to (All players) the text: The difficulty has been set to [|cff7cfc00Easy|r]
        Set difficulty = easy
        Set monsterSpawnAmount = 20
        Countdown Timer - Start preparationTimer as a One-shot timer that will expire in 480.00 seconds
        Countdown Timer - Create a timer window for (Last started timer) with title Preparation Time:
        Set preparationTimerWindow = (Last created timer window)
        Countdown Timer - Show (Last created timer window)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Clicked dialog button) Equal to dialog_difficulty_buttons[2]
      Then - Actions
        Game - Display to (All players) the text: The difficulty has been set to [Normal]
        Set difficulty = normal
        Set monsterSpawnAmount = 30
        Countdown Timer - Start preparationTimer as a One-shot timer that will expire in 420.00 seconds
        Countdown Timer - Create a timer window for (Last started timer) with title Preparation Time:
        Set preparationTimerWindow = (Last created timer window)
        Countdown Timer - Show (Last created timer window)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Clicked dialog button) Equal to dialog_difficulty_buttons[3]
      Then - Actions
        Game - Display to (All players) the text: The difficulty has been set to [|cffff0000Hard|r]
        Set difficulty = hard
        Set monsterSpawnAmount = 35
        Countdown Timer - Start preparationTimer as a One-shot timer that will expire in 300.00 seconds
        Set isNight = False
        Countdown Timer - Create a timer window for (Last started timer) with title Preparation Time:
        Set preparationTimerWindow = (Last created timer window)
        Countdown Timer - Show (Last created timer window)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Clicked dialog button) Equal to dialog_difficulty_buttons[4]
      Then - Actions
        Player Group - Pick every player in (All players) and do (Actions)
          Loop - Actions
            Player - Disable Altar of Kings for (Picked player)
        Game - Display to (All players) the text: The difficulty has been set to [|cffa0a0a0Nightmare|r]. 'Revive' and 'Resource Respawn' has been disabled.
        Set difficulty = nightmare
        Set monsterSpawnAmount = 35
        Countdown Timer - Start preparationTimer as a One-shot timer that will expire in 420.00 seconds
        Set isNight = False
        Countdown Timer - Create a timer window for (Last started timer) with title Preparation Time:
        Set preparationTimerWindow = (Last created timer window)
        Countdown Timer - Show (Last created timer window)
      Else - Actions
    Trigger - Turn on CodeGen_Load <gen>
    Trigger - Turn on CodeGen_Save <gen>
    Trigger - Turn on show_hints <gen>
    Trigger - Turn on hint_perk <gen>
    Trigger - Run pve_ffa_spawn <gen> (ignoring conditions)
    Trigger - Run Create_PVE_Multiboard <gen> (ignoring conditions)
pvp spawn
  Events
  Conditions
  Actions
    Trigger - Turn on tower_in_mine_PVP <gen>
    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) controller) Equal to User
            ((Picked player) slot status) Equal to Is playing
          Then - Actions
            Player Group - Add (Picked player) to allPlayers
          Else - Actions
    For each (Integer A) from 1 to numberOfTeams, do (Actions)
      Loop - Actions
        Player Group - Remove all players from tmpTeam
        Set tmp_integer = (Random integer number between 1 and 10)
        Set TempLoc = (Random point in start_regions[tmp_integer])
        For each (Integer B) from 1 to (playercount / numberOfTeams), do (Actions)
          Loop - Actions
            Set tmpPlayer = (Random player from allPlayers)
            Player Group - Remove tmpPlayer from allPlayers
            Player Group - Add tmpPlayer to tmpTeam
            Set teamnumberForPlayer[(Player number of tmpPlayer)] = (Integer A)
            Player Group - Pick every player in tmpTeam and do (Actions)
              Loop - Actions
                Player - Make (Picked player) treat tmpPlayer as an Ally with shared vision
                Player - Make tmpPlayer treat (Picked player) as an Ally with shared vision
            Unit - Create 1 Fist for tmpPlayer at TempLoc facing Default building facing degrees
            Set player_hero[(Player number of tmpPlayer)] = (Last created unit)
            Unit Group - Add (Last created unit) to heroGroup
            Camera - Pan camera for tmpPlayer to (Position of (Last created unit)) over 0 seconds
            Game - Display to (All players) the text: (colors[(Player number of tmpPlayer)] + ((Name of tmpPlayer) + (|r has joined Team + (String((Integer A))))))
enable pvp after night 1
  Events
    Unit - A unit Is attacked
  Conditions
    (Owner of (Attacking unit)) Not equal to Player 12 (Brown)
    (Owner of (Attacked unit)) Not equal to Player 12 (Brown)
    (Owner of (Attacking unit)) Not equal to Player 11 (Dark Green)
    (Owner of (Attacked unit)) Not equal to Player 11 (Dark Green)
    (Owner of (Attacked unit)) Not equal to Neutral Passive
    (Owner of (Attacked unit)) Not equal to Neutral Hostile
    (Owner of (Attacking unit)) Not equal to Neutral Hostile
    Or - Any (Conditions) are true
      Conditions
        teammode Equal to True
        ffa Equal to True
  Actions
    Game - Display to (Player group((Owner of (Attacking unit)))) the text: PVP will be enabled after the first night.
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        survivedNights Equal to 0
      Then - Actions
        Unit - Order (Attacking unit) to Stop
      Else - Actions
pve ffa spawn
  Events
  Conditions
  Actions
    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) controller) Equal to User
            ((Picked player) slot status) Equal to Is playing
          Then - Actions
            Set tmp_integer = (Random integer number between 1 and 10)
            Unit - Create 1 Fist for (Picked player) at (Random point in start_regions[tmp_integer]) facing Default building facing degrees
            Set player_hero[(Player number of (Picked player))] = (Last created unit)
            Unit Group - Add (Last created unit) to heroGroup
            Camera - Pan camera for (Picked player) to (Position of (Last created unit)) over 0 seconds
          Else - Actions
daynight timer expires
  Events
    Time - daynightTimer expires
  Conditions
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        isNight Equal to False
      Then - Actions
        -------- NIGHT --------
        Set isNight = True
        Trigger - Turn on new_monster_spawn <gen>
        Trigger - Turn on gargoyle_ensnared_group <gen>
        Trigger - Turn off damage_monsters_at_day <gen>
        Countdown Timer - Change the title of daynightTimerWindow to Nighttime:
        Game - Display to (All players) the text: The night has started. Beware of zombies.
        Game - Set the time of day to 24.00
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            survivedNights Equal to 4
          Then - Actions
            Player - Set the current research level of R007 (techcode) to playercount for Player 12 (Brown)
            Sound - Play CreepSleepLoop1 <gen>
            Game - Display to (All players) for 10.00 seconds the text: A very powerful monster has been sighted nearby. Beware!
            Set TempLoc = (Random point in monsterSpawns[(Random integer number between 1 and 10)])
            Unit - Create 1 Dreadlord for Player 12 (Brown) at TempLoc facing Default building facing degrees
            Unit - Order (Last created unit) to Night Elf Demon Hunter - Activate Immolation
            Custom script: call RemoveLocation(udg_TempLoc)
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            survivedNights Equal to 5
          Then - Actions
            Game - Display to (All players) for 10.00 seconds the text: Beware of invisible monsters! Craft a torch to detect them.
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            survivedNights Equal to 9
          Then - Actions
            Player - Set the current research level of R008 (techcode) to playercount for Player 12 (Brown)
            Sound - Play CreepSleepLoop1 <gen>
            Game - Display to (All players) for 10.00 seconds the text: A very powerful monster has been sighted nearby. Beware!
            Set TempLoc = (Random point in monsterSpawns[(Random integer number between 1 and 10)])
            Unit - Create 1 Crypt Lord for Player 12 (Brown) at TempLoc facing Default building facing degrees
            Unit - Order (Last created unit) to Undead Necromancer - Activate Raise Dead
            Custom script: call RemoveLocation(udg_TempLoc)
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            survivedNights Equal to 14
          Then - Actions
            Player - Set the current research level of R009 (techcode) to playercount for Player 12 (Brown)
            Sound - Play CreepSleepLoop1 <gen>
            Game - Display to (All players) for 10.00 seconds the text: A very powerful monster has been sighted nearby. Beware!
            Set TempLoc = (Random point in monsterSpawns[(Random integer number between 1 and 10)])
            Unit - Create 1 Pit Lord for Player 12 (Brown) at TempLoc facing Default building facing degrees
            Custom script: call RemoveLocation(udg_TempLoc)
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            survivedNights Equal to 19
          Then - Actions
            Player - Set the current research level of R00A (techcode) to playercount for Player 12 (Brown)
            Sound - Play CreepSleepLoop1 <gen>
            Game - Display to (All players) for 10.00 seconds the text: A very powerful monster has been sighted nearby. Beware!
            Set TempLoc = (Random point in monsterSpawns[(Random integer number between 1 and 10)])
            Unit - Create 1 Wyrm for Player 12 (Brown) at TempLoc facing Default building facing degrees
            Custom script: call RemoveLocation(udg_TempLoc)
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            survivedNights Equal to 24
          Then - Actions
            Player - Set the current research level of R00C (techcode) to playercount for Player 12 (Brown)
            Sound - Play CreepSleepLoop1 <gen>
            Game - Display to (All players) for 10.00 seconds the text: A very powerful monster has been sighted nearby. Beware!
            Set TempLoc = (Random point in monsterSpawns[(Random integer number between 1 and 10)])
            Unit - Create 1 Doom Guard for Player 12 (Brown) at TempLoc facing Default building facing degrees
            Custom script: call RemoveLocation(udg_TempLoc)
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            survivedNights Equal to 29
          Then - Actions
            Player - Set the current research level of R00F (techcode) to playercount for Player 12 (Brown)
            Sound - Play CreepSleepLoop1 <gen>
            Game - Display to (All players) for 10.00 seconds the text: A very powerful monster has been sighted nearby. Beware!
            Set TempLoc = (Random point in monsterSpawns[(Random integer number between 1 and 10)])
            Unit - Create 1 Archimonde for Player 12 (Brown) at TempLoc facing Default building facing degrees
            Custom script: call RemoveLocation(udg_TempLoc)
          Else - Actions
        Visibility - Create an initially Enabled visibility modifier for Player 12 (Brown) emitting Visibility across greenland <gen>
        Wait 1.00 seconds
        Visibility - Disable (Last created visibility modifier)
      Else - Actions
        -------- DAY --------
        Trigger - Turn off gargoyle_ensnared_group <gen>
        Set survivedNights = (survivedNights + 1)
        Trigger - Run give_reward <gen> (checking conditions)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            survivedNights Equal to 1
            Or - Any (Conditions) are true
              Conditions
                teammode Equal to True
                ffa Equal to True
          Then - Actions
            Trigger - Turn off enable_pvp_after_night_1 <gen>
            Game - Display to (All players) the text: PVP has now been enabled!
          Else - Actions
        Set isNight = False
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            difficulty Equal to easy
          Then - Actions
            Multiboard - Change the title of (Last created multiboard) to (Survived Nights: + ((String(survivedNights)) + [|cff7cfc00Easy|r]))
          Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                difficulty Equal to normal
              Then - Actions
                Multiboard - Change the title of (Last created multiboard) to (Survived Nights: + ((String(survivedNights)) + [Normal]))
              Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    difficulty Equal to hard
                  Then - Actions
                    Multiboard - Change the title of (Last created multiboard) to (Survived Nights: + ((String(survivedNights)) + [|cffff0000Hard|r]))
                  Else - Actions
                    Multiboard - Change the title of (Last created multiboard) to (Survived Nights: + ((String(survivedNights)) + [|cffa0a0a0Nightmare|r]))
        Trigger - Turn off new_monster_spawn <gen>
        Trigger - Turn on damage_monsters_at_day <gen>
        Trigger - Run Update_Multiboard <gen> (checking conditions)
        Countdown Timer - Change the title of daynightTimerWindow to Daytime:
        Game - Set the time of day to 12.00
        For each (Integer A) from 1 to 8, do (Actions)
          Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                perkPlayerString[(Integer A)] Equal to Beast Master
              Then - Actions
                Player - Set the current research level of R006 (techcode) to ((Current research level of R006 (techcode) for (Player((Integer A)))) + 1) for (Player((Integer A)))
              Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            difficulty Equal to easy
          Then - Actions
            Player - Set the current research level of R005 (techcode) to ((Current research level of R005 (techcode) for Player 12 (Brown)) + 1) for Player 12 (Brown)
            Player - Set the current research level of R005 (techcode) to ((Current research level of R005 (techcode) for Player 11 (Dark Green)) + 1) for Player 11 (Dark Green)
          Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                difficulty Equal to normal
              Then - Actions
                Player - Set the current research level of R000 (techcode) to ((Current research level of R000 (techcode) for Player 12 (Brown)) + 1) for Player 12 (Brown)
                Player - Set the current research level of R000 (techcode) to ((Current research level of R000 (techcode) for Player 11 (Dark Green)) + 1) for Player 11 (Dark Green)
              Else - Actions
                Player - Set the current research level of R00B (techcode) to ((Current research level of R00B (techcode) for Player 12 (Brown)) + 1) for Player 12 (Brown)
                Player - Set the current research level of R00B (techcode) to ((Current research level of R00B (techcode) for Player 11 (Dark Green)) + 1) for Player 11 (Dark Green)
        Player - Set the current research level of R00D (techcode) to ((Current research level of R00D (techcode) for Player 12 (Brown)) + 1) for Player 12 (Brown)
        Player - Set the current research level of R00E (techcode) to ((Current research level of R00E (techcode) for Player 11 (Dark Green)) + 1) for Player 11 (Dark Green)
preparation timer expires
  Events
    Time - preparationTimer expires
  Conditions
  Actions
    Countdown Timer - Destroy preparationTimerWindow
    Countdown Timer - Start daynightTimer as a Repeating timer that will expire in 180.00 seconds
    Countdown Timer - Create a timer window for (Last started timer) with title Daytime:
    Set daynightTimerWindow = (Last created timer window)
    Countdown Timer - Show (Last created timer window)
infos and help
  Events
    Map initialization
  Conditions
  Actions
    Quest - Create a Required quest titled How to play with the description Mine ressources and build a base at daytime, When the night comes, different monsters spawn and will try to kill you. Start off by chopping some trees (attack the trees) and craft some basic tools such as the axe or pickaxe. If you have questions, check the questlog F9 where you will find all your answers., using icon path ReplaceableTextures\WorldEditUI\Editor-Random-Building.blp
    Quest - Create a Required quest titled Gamemodes with the description [pve]The -save/-load command only works in the pve mode. Altar of Kings can only be built in PVE.[pvp]Recipes are still being unlocked for everyone else (hostile players included). The nights in PVP are easier than in the PVE mode. PVP will be allowed after the first night., using icon path ReplaceableTextures\CommandButtons\BTNMedivh.blp
    Quest - Create a Required quest titled Item Stack and Split with the description ===== Split =====All items with multiple charges, except tools and weapons, can be split by double right-clicking the stack. If the inventory is full, the split item stack will be dropped to the ground.===== Stack =====All items (except for swords) can be stacked., using icon path ReplaceableTextures\WorldEditUI\Editor-Random-Item.blp
    Quest - Create a Required quest titled Levels with the description Current max level is 500. Each level gives your hero +1 HP. Each level 50 grants you a special bonus. On level 500 you will receive +3 crafting points every 90 seconds.Level 50: 2 berriesLevel 100: Wooden AxeLevel 150: Wooden Axe and PickaxeLevel 200: Stone Axe and Wooden PickaxeLevel 250: Stone Axe and Stone Pickaxe Level 300: Copper Axe and Stone PickaxeLevel 400: Copper Axe and Copper Pickaxe, using icon path ReplaceableTextures\CommandButtons\BTNBattleStations.blp
    Quest - Create a Required quest titled Experience with the description You gain 1 experience every second. You also gain experience by building, crafting, attacking or doing other things., using icon path ReplaceableTextures\WorldEditUI\Editor-Random-Unit.blp
    Quest - Create a Required quest titled Crafting Points/Recipes with the description Crafting Points are displayed on the top of the screen. You get 3 crafting points every level. They are used to learn new recipes. Learning a recipe, unlocks it for every player in the game. On level 500 you recive 3 crafting points every 90 seconds., using icon path ReplaceableTextures\CommandButtons\BTNStatUp.blp
    Quest - Create a Required quest titled Hunger/Thirst/Energy with the description Hunger, Thirst and Energy are displayed as hero attributes. If your hunger or thirst drops below 2, your hero starts taking damage. To drink, simply stand into water. If energy drops below 2, you won't be able to mine anymore and hitpoints won't regenerate anymore. Simply rest for a while or sle, using icon path ReplaceableTextures\WorldEditUI\Editor-Random-Unit.blp
    Quest - Create a Required quest titled Mine with the description You find coal, copper and gold in the mine. Simply learn the receipt to build a mine. To find more rare minerals such as iron or diamonds, you will need to learn the receipt for 'Deeper Mine'., using icon path ReplaceableTextures\CommandButtons\BTNGoldMine.blp
    Quest - Create a Required quest titled Commands with the description -base (pings good places to build your base)-save (saves your level and survived nights)-load <code> (loads the saved progress)-zoom <distance> (zoom in or out)-gm (opens the gamemode selection for player 1), using icon path ReplaceableTextures\CommandButtons\BTNSpy.blp
    Quest - Create a Required quest titled Death with the description If you die you can be revived from a teammate with the medic perk or if someone uses the Altar of Kings., using icon path ReplaceableTextures\CommandButtons\BTNSacrificialSkull.blp
    Quest - Create a Required quest titled Beast Master Perk with the description You can tame as many animals as possibleThe bear gains a damage and hit point bonus for each animal kill.The sheep can produce strings.The pig/rabbit/racoon can carry your items and have a weak attack.The stag has an ability to ping nearby animals and can also carry your items.All animals gain +1 hit point for each hero level., using icon path ReplaceableTextures\CommandButtons\BTNGrizzlyBear.blp
    Quest - Create a Optional quest titled Stick with the description [Slot 2] Lumber[Slot 4] Lumber, using icon path ReplaceableTextures\CommandButtons\BTNNatureTouchGrow.blp
    Quest - Create a Optional quest titled Arrow with the description [Slot 1] Stone[Slot 3] String[Slot 5] Stick, using icon path ReplaceableTextures\CommandButtons\BTNPiercingArrows.blp
    Quest - Create a Optional quest titled String with the description String drops from sheeps., using icon path ReplaceableTextures\CommandButtons\BTNWeb.blp
    Quest - Create a Optional quest titled Wire with the description [Slot 1] Copper[Slot 3] Copper[Slot 5] Copper, using icon path ReplaceableTextures\CommandButtons\BTNChip.blp
    Quest - Create a Optional quest titled Bread with the description [Slot 1] Wheat[Slot 2] Wheat, using icon path ReplaceableTextures\CommandButtons\BTNINV_Misc_Food_11.blp
    Quest - Create a Optional quest titled Glass with the description Burn sand to get glass., using icon path ReplaceableTextures\CommandButtons\BTNMoonStone.blp
    Quest - Create a Optional quest titled Plastic with the description Plastic can be obtained by melting plastic bag in the furnace or by fishing with the fisherman perk., using icon path ReplaceableTextures\CommandButtons\BTNHeartOfSearinox.blp
    Quest - Create a Required quest titled Changelogs with the description changes v1.63d:-reduced lava damage-lava birds hp increased-decreased model of mine since it took alot of space away-players can now leave hell (bugfix)-changed spear recipe -> stick stick stone-crossbow dmg increased 50-70 -> 80-95-new specialist item: rifle, slow attack very high range 200-200 dmg, using icon path ReplaceableTextures\CommandButtons\BTNMedalionOfCourage.blp
    Quest - Create a Required quest titled Feedback with the description Email: avire-1337@live.deHiveworkshop: NordmarBattle.net EU: firecheAsk questions and find players in the official fb group: https://www.facebook.com/groups/wc3survivors/, using icon path ReplaceableTextures\CommandButtons\BTNManual.blp
tips init
  Events
    Map initialization
  Conditions
  Actions
    Set tips[1] = |c00FFFC01Hint:|r craft a torch to lighten up areas at night.
    Set tips[2] = |c00FFFC01Hint:|r hostile air units spawn after 3 nights.
    Set tips[3] = |c00FFFC01Hint:|r if hunger or thirst drops to 1, you start taking damage.
    Set tips[4] = |c00FFFC01Hint:|r use the -save/-load commands to save and load your progress.
    Set tips[5] = |c00FFFC01Hint:|r build a mine to find rare minerals.
    Set tips[6] = |c00FFFC01Hint:|r play as a team and give eachother roles to get as far as possible.
    Set tips[7] = |c00FFFC01Hint:|r berries and wheat can only be harvested with a hoe or bare hands.
    Set tips[8] = |c00FFFC01Hint:|r plastic bags drop sometimes when killing an undead villager.
    Set tips[9] = |c00FFFC01Hint:|r you can place torches into buildings/towers
    Set tips[10] = |c00FFFC01Hint:|r all monsters become stronger after every survived night.
    Set tips[11] = |c00FFFC01Hint:|r tamed animals get stronger every night
    Set tips[12] = |c00FFFC01Hint:|r you can place towers in the mine.
    Set tips[13] = |c00FFFC01Hint:|r the spear is a great starting weapon.
    Set tips[14] = |c00FFFC01Hint:|r each level increases your hitpoint cap by 1.
    Set tips[15] = |c00FFFC01Hint:|r max level is currently 500.
    Set tips[16] = |c00FFFC01Hint:|r to drink you simply need to stand into water.
    Set tips[17] = |c00FFFC01Hint:|r every raw meat/fish can be cooked.
    Set tips[18] = |c00FFFC01Hint:|r type -zoom XXX to zoom in or out.
    Set tips[19] = |c00FFFC01Hint:|r type -base to ping possible base areas.
    Set tips[20] = |c00FFFC01Hint:|r find active players in the facebook survivors group: www.facebook.com/groups/wc3survivors/
    Set tips[21] = |c00FFFC01Hint:|r when you die you can be revived at night from a player with the medic perk or with the Altar of Kings.
    Set tips[22] = |c00FFFC01Hint:|r it's always good to have someone learn the medic perk.
    Set tips[23] = |c00FFFC01Hint:|r armor regenerates hit points during nighttime.
    Set tips[24] = |c00FFFC01Hint:|r certain building such as the bed, fire pit, altar, anvil and alchemy table can be shared with other players.
    Set tips[25] = |c00FFFC01Hint:|r every fifth night a boss unit spawns.
    Set tips[26] = |c00FFFC01Hint:|r to collect lava with a bucket, simply stand at the entrace of a lava area and click on the bucket.
    Set tips[27] = |c00FFFC01Hint:|r every boss drops a Soul of Life in PVE which can then be used to revive other players.
    Set tips[28] = |c00FFFC01Hint:|r build multiple wall rows during boss nights.
    Set tips[29] = |c00FFFC01Hint:|r tamed sheeps can drop up to 2 strings every 4 minutes.
    Set tips[30] = |c00FFFC01Hint:|r voidwalkers are invisible monsters and spawn after night 5. Torches detect and reveal them.
    Set tips[31] = |c00FFFC01Hint:|r almost all towers can be upgraded.
    Set tips[32] = |c00FFFC01Hint:|r multiple players can sit in a bunker tower (just share control first)
    Set tips[33] = |c00FFFC01Hint:|r the chance of a gargoyle wing drop increases when a gargoyle is ensared.
    Set tips[34] = |c00FFFC01Hint:|r place the portal somewhere safe in the mine.
show hints
  Events
    Time - Every 120.00 seconds of game time
  Conditions
  Actions
    Game - Display to (All players) for 30.00 seconds the text: tips[(Random integer number between 1 and 34)]
energy loss
  Events
    Unit - A unit Is attacked
  Conditions
    ((Attacking unit) is A Hero) Equal to True
    (Unit-type of (Attacking unit)) Not equal to Fist
    perkPlayerString[(Player number of (Owner of (Attacking unit)))] Not equal to Survivor
  Actions
    Hero - Modify Intelligence of (Attacking unit): Subtract 1
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Intelligence of (Attacking unit) (Exclude bonuses)) Less than 2
      Then - Actions
        Game - Display to (Player group((Owner of (Triggering unit)))) the text: Your hero is exhausted. Rest until he regained some energy.
        Trigger - Turn off toFist <gen>
        Trigger - Turn off get_crafting_points <gen>
        Unit - Create 1 no weapon or tool equipped (dummy_CraftingTable) for (Owner of (Attacking unit)) at (Center of (Playable map area)) facing Default building facing degrees
        Unit - Replace (Attacking unit) with a Fist using The old unit's relative life and mana
        Hero - Modify Strength of (Last replaced unit): Set to (Strength of (Attacking unit) (Exclude bonuses))
        Hero - Modify Agility of (Last replaced unit): Set to (Agility of (Attacking unit) (Exclude bonuses))
        Hero - Modify Intelligence of (Last replaced unit): Set to (Intelligence of (Attacking unit) (Exclude bonuses))
        Hero - Set (Last replaced unit) experience to (Hero experience of (Attacking unit)), Hide level-up graphics
        Selection - Select (Last replaced unit) for (Owner of (Attacking unit))
        Trigger - Turn on get_crafting_points <gen>
        Trigger - Turn on toFist <gen>
      Else - Actions
periodic energy gain
  Events
    Time - Every 3.00 seconds of game time
  Conditions
  Actions
    Set temp_UnitGroup = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
    Unit Group - Pick every unit in temp_UnitGroup and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Unit-type of (Picked unit)) Not equal to Backpack
          Then - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Intelligence of (Picked unit) (Exclude bonuses)) Less than 100
              Then - Actions
                Hero - Modify Intelligence of (Picked unit): Add 1
              Else - Actions
          Else - Actions
    Custom script: call DestroyGroup(udg_temp_UnitGroup)
hunger
  Events
    Time - Every 14.00 seconds of game time
  Conditions
  Actions
    Set temp_UnitGroup = (Units in (Playable map area) matching (((Triggering unit) is A Hero) Equal to True))
    Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Unit-type of (Picked unit)) Not equal to Backpack
            (Unit-type of (Picked unit)) Not equal to Grave
            (Level of Survivor for (Picked unit)) Equal to 0
          Then - Actions
            Hero - Modify Strength of (Picked unit): Subtract 1
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                Or - Any (Conditions) are true
                  Conditions
                    (Strength of (Picked unit) (Exclude bonuses)) Equal to 15
                    (Strength of (Picked unit) (Exclude bonuses)) Equal to 10
                    (Strength of (Picked unit) (Exclude bonuses)) Equal to 5
              Then - Actions
                Game - Display to (Player group((Owner of (Picked unit)))) the text: Don't forget to eat or you will take damage.
              Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Strength of (Picked unit) (Exclude bonuses)) Less than 2
              Then - Actions
                Game - Display to (Player group((Owner of (Picked unit)))) the text: You need to eat something!
              Else - Actions
          Else - Actions
    Custom script: call DestroyGroup(udg_temp_UnitGroup)
thirst
  Events
    Time - Every 12.00 seconds of game time
  Conditions
  Actions
    Set temp_UnitGroup = (Units in (Playable map area) matching (((Triggering unit) is A Hero) Equal to True))
    Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Unit-type of (Picked unit)) Not equal to Backpack
            (Unit-type of (Picked unit)) Not equal to Grave
            (Level of Survivor for (Picked unit)) Equal to 0
          Then - Actions
            Hero - Modify Agility of (Picked unit): Subtract 1
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Agility of (Picked unit) (Exclude bonuses)) Equal to 15
              Then - Actions
                Game - Display to (Player group((Owner of (Picked unit)))) the text: Don't forget to drink or you will take damage.
              Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Agility of (Picked unit) (Exclude bonuses)) Less than 2
              Then - Actions
                Game - Display to (Player group((Owner of (Picked unit)))) the text: You need to drink something!
              Else - Actions
          Else - Actions
    Custom script: call DestroyGroup(udg_temp_UnitGroup)
thirst and hunger dmg
  Events
    Time - Every 1.00 seconds of game time
  Conditions
  Actions
    For each (Integer thirstInt) from 1 to 8, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Or - Any (Conditions) are true
              Conditions
                (Agility of player_hero[thirstInt] (Exclude bonuses)) Less than 2
                (Strength of player_hero[thirstInt] (Exclude bonuses)) Less than 2
          Then - Actions
            Unit - Set life of player_hero[thirstInt] to ((Life of player_hero[thirstInt]) - ((Max life of player_hero[thirstInt]) x 0.05))
          Else - Actions
eat apple
  Events
    Unit - A unit Uses an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Apple
    (Unit-type of (Triggering unit)) Not equal to Backpack
    ((Triggering unit) is A Hero) Equal to True
    ((Triggering unit) is A structure) Not equal to True
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Strength of (Triggering unit) (Exclude bonuses)) Less than 91
      Then - Actions
        Hero - Modify Strength of (Triggering unit): Add 10
      Else - Actions
        Hero - Modify Strength of (Triggering unit): Set to 100
eat mushroom
  Events
    Unit - A unit Uses an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Mushroom
    ((Triggering unit) is A Hero) Equal to True
    (Unit-type of (Triggering unit)) Not equal to Backpack
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Intelligence of (Triggering unit) (Exclude bonuses)) Less than 86
      Then - Actions
        Hero - Modify Intelligence of (Triggering unit): Add 15
      Else - Actions
        Hero - Modify Intelligence of (Triggering unit): Set to 100
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Life of (Triggering unit)) Less than 21.00
      Then - Actions
        Unit - Set life of (Triggering unit) to 1.00
      Else - Actions
        Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) - 20.00)
eat bread
  Events
    Unit - A unit Uses an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Bread
    (Unit-type of (Triggering unit)) Not equal to Backpack
    ((Triggering unit) is A Hero) Equal to True
    ((Triggering unit) is A structure) Not equal to True
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Strength of (Triggering unit) (Exclude bonuses)) Less than 71
      Then - Actions
        Hero - Modify Strength of (Triggering unit): Add 30
      Else - Actions
        Hero - Modify Strength of (Triggering unit): Set to 100
eat berry
  Events
    Unit - A unit Uses an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Berry
    (Unit-type of (Triggering unit)) Not equal to Backpack
    ((Triggering unit) is A structure) Not equal to True
    ((Triggering unit) is A Hero) Equal to True
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Strength of (Triggering unit) (Exclude bonuses)) Less than 91
      Then - Actions
        Hero - Modify Strength of (Triggering unit): Add 10
      Else - Actions
        Hero - Modify Strength of (Triggering unit): Set to 100
eat raw meat
  Events
    Unit - A unit Uses an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Raw Meat
    (Unit-type of (Triggering unit)) Not equal to Backpack
    ((Triggering unit) is A structure) Not equal to True
    ((Triggering unit) is A Hero) Equal to True
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Strength of (Triggering unit) (Exclude bonuses)) Less than 96
      Then - Actions
        Hero - Modify Strength of (Triggering unit): Add 5
      Else - Actions
        Hero - Modify Strength of (Triggering unit): Set to 100
eat cooked meat
  Events
    Unit - A unit Uses an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Cooked Meat
    (Unit-type of (Triggering unit)) Not equal to Backpack
    ((Triggering unit) is A structure) Not equal to True
    ((Triggering unit) is A Hero) Equal to True
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Strength of (Triggering unit) (Exclude bonuses)) Less than 81
      Then - Actions
        Hero - Modify Strength of (Triggering unit): Add 20
      Else - Actions
        Hero - Modify Strength of (Triggering unit): Set to 100
eat raw fish
  Events
    Unit - A unit Uses an item
  Conditions
    (Unit-type of (Triggering unit)) Not equal to Backpack
    ((Triggering unit) is A structure) Not equal to True
    ((Triggering unit) is A Hero) Equal to True
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Item-type of (Item being manipulated)) Equal to Trout (Common Fish)
      Then - Actions
        Hero - Add 10 experience to (Triggering unit), Hide level-up graphics
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Strength of (Triggering unit) (Exclude bonuses)) Less than 98
          Then - Actions
            Hero - Modify Strength of (Triggering unit): Add 2
          Else - Actions
            Hero - Modify Strength of (Triggering unit): Set to 100
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Item-type of (Item being manipulated)) Equal to Perch (Uncommon Fish)
      Then - Actions
        Hero - Add 15 experience to (Triggering unit), Hide level-up graphics
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Strength of (Triggering unit) (Exclude bonuses)) Less than 96
          Then - Actions
            Hero - Modify Strength of (Triggering unit): Add 4
          Else - Actions
            Hero - Modify Strength of (Triggering unit): Set to 100
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Item-type of (Item being manipulated)) Equal to Pike (Rare Fish)
      Then - Actions
        Hero - Add 20 experience to (Triggering unit), Hide level-up graphics
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Strength of (Triggering unit) (Exclude bonuses)) Less than 93
          Then - Actions
            Hero - Modify Strength of (Triggering unit): Add 7
          Else - Actions
            Hero - Modify Strength of (Triggering unit): Set to 100
      Else - Actions
eat cooked fish
  Events
    Unit - A unit Uses an item
  Conditions
    (Unit-type of (Triggering unit)) Not equal to Backpack
    ((Triggering unit) is A structure) Not equal to True
    ((Triggering unit) is A Hero) Equal to True
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Item-type of (Item being manipulated)) Equal to Cooked Trout
      Then - Actions
        Hero - Add 20 experience to (Triggering unit), Hide level-up graphics
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Strength of (Triggering unit) (Exclude bonuses)) Less than 95
          Then - Actions
            Hero - Modify Strength of (Triggering unit): Add 5
          Else - Actions
            Hero - Modify Strength of (Triggering unit): Set to 100
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Item-type of (Item being manipulated)) Equal to Cooked Perch
      Then - Actions
        Hero - Add 30 experience to (Triggering unit), Hide level-up graphics
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Strength of (Triggering unit) (Exclude bonuses)) Less than 90
          Then - Actions
            Hero - Modify Strength of (Triggering unit): Add 10
          Else - Actions
            Hero - Modify Strength of (Triggering unit): Set to 100
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Item-type of (Item being manipulated)) Equal to Cooked Pike
      Then - Actions
        Hero - Add 40 experience to (Triggering unit), Hide level-up graphics
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Strength of (Triggering unit) (Exclude bonuses)) Less than 80
          Then - Actions
            Hero - Modify Strength of (Triggering unit): Add 20
          Else - Actions
            Hero - Modify Strength of (Triggering unit): Set to 100
      Else - Actions
drop animal meat
  Events
    Unit - A unit Dies
  Conditions
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Or - Any (Conditions) are true
          Conditions
            (Unit-type of (Triggering unit)) Equal to Rabbit
            (Unit-type of (Triggering unit)) Equal to Stag
            (Unit-type of (Triggering unit)) Equal to Sheep
            (Unit-type of (Triggering unit)) Equal to Pig
            (Unit-type of (Triggering unit)) Equal to Raccoon
      Then - Actions
        Set TempLoc = (Position of (Triggering unit))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            perkPlayerString[(Player number of (Owner of (Killing unit)))] Not equal to Hunter
          Then - Actions
            Item - Create Raw Meat at TempLoc
          Else - Actions
            Item - Create Raw Meat at TempLoc
            Item - Create Raw Meat at TempLoc
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Triggering unit)) Equal to Bear
      Then - Actions
        Set TempLoc = (Position of (Triggering unit))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            perkPlayerString[(Player number of (Owner of (Killing unit)))] Not equal to Hunter
          Then - Actions
            Item - Create Raw Meat at TempLoc
            Item - Create Raw Meat at TempLoc
            Item - Create Raw Meat at TempLoc
          Else - Actions
            Item - Create Raw Meat at TempLoc
            Item - Create Raw Meat at TempLoc
            Item - Create Raw Meat at TempLoc
            Item - Create Raw Meat at TempLoc
            Item - Create Raw Meat at TempLoc
            Item - Create Raw Meat at TempLoc
      Else - Actions
    Custom script: call RemoveLocation(udg_TempLoc)
drink water
  Events
    Time - Every 1.00 seconds of game time
  Conditions
  Actions
    For each (Integer drinkInteger) from 1 to 8, do (Actions)
      Loop - Actions
        Set TempLoc = (Position of player_hero[drinkInteger])
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Terrain type at TempLoc) Equal to Lordaeron Summer - Rough Dirt
          Then - Actions
            Custom script: call RemoveLocation(udg_TempLoc)
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Agility of player_hero[drinkInteger] (Exclude bonuses)) Less than 96
              Then - Actions
                Hero - Modify Agility of player_hero[drinkInteger]: Add 5
              Else - Actions
                Hero - Modify Agility of player_hero[drinkInteger]: Set to 100
          Else - Actions
items init
  Events
    Map initialization
  Conditions
  Actions
    -------- Swords --------
    Set items[0] = Wooden Sword
    Set items[1] = Stone Sword
    Set items[2] = Copper Sword
    Set items[3] = Gold Sword
    Set items[4] = Iron Sword
    Set items[5] = Diamond Sword
    -------- Axe --------
    Set items[6] = Wooden Axe
    Set items[7] = Stone Axe
    Set items[8] = Copper Axe
    Set items[9] = Gold Axe
    Set items[10] = Iron Axe
    Set items[11] = Diamond Axe
    -------- Pickaxe --------
    Set items[12] = Wooden Pickaxe
    Set items[13] = Stone Pickaxe
    Set items[14] = Copper Pickaxe
    Set items[15] = Gold Pickaxe
    Set items[16] = Iron Pickaxe
    Set items[17] = Diamond Pickaxe
    -------- Hoe --------
    Set items[18] = Wooden Hoe
    Set items[19] = Stone Hoe
    Set items[20] = Copper Hoe
    Set items[21] = Gold Hoe
    Set items[22] = Iron Hoe
    Set items[23] = Diamond Hoe
    -------- Bow --------
    Set items[24] = Bow
    -------- shovel --------
    Set items[25] = Shovel
    -------- Rod --------
    Set items[26] = Fishing Rod
    -------- Spear --------
    Set items[27] = Spear
    -------- Bone Bow --------
    Set items[28] = Bone Bow
    -------- Crossbow --------
    Set items[29] = Crossbow
    -------- Multibreak --------
    Set items[30] = Wooden Multibreak
    Set items[31] = Stone Multibreak
    Set items[32] = Copper Multibreak
    Set items[33] = Gold Multibreak
    Set items[34] = Iron Multibreak
    Set items[35] = Diamond Multibreak
    -------- Battle Axe --------
    Set items[36] = Battle Axe
    -------- Hell Cleaver --------
    Set items[37] = Hell Cleaver
    -------- Rifle --------
    Set items[38] = Rifle
    -------- armor --------
    Set items[40] = Leather Armor
    Set items[41] = Copper Armor
    Set items[42] = Gold Armor
    Set items[43] = Iron Armor
    Set items[44] = Diamond Armor
strenghtedUnits init
  Events
    Time - Elapsed game time is 0.10 seconds
  Conditions
  Actions
    Set maxStrenghtedUnits = 7
    Set strenghted_items[1] = Wooden Sword (Strengthened)
    Set strenghted_items[2] = Stone Sword (Strengthened)
    Set strenghted_items[3] = Copper Sword (Strengthened)
    Set strenghted_items[4] = Gold Sword (Strengthened)
    Set strenghted_items[5] = Iron Sword (Strengthened)
    Set strenghted_items[6] = Diamond Sword (Strengthened)
    Set strenghted_items[7] = Battle Axe (Strengthened)
    Set strenghted_items[11] = Wooden Sword
    Set strenghted_items[12] = Stone Sword
    Set strenghted_items[13] = Copper Sword
    Set strenghted_items[14] = Gold Sword
    Set strenghted_items[15] = Iron Sword
    Set strenghted_items[16] = Diamond Sword
    Set strenghted_items[17] = Battle Axe
    Set strenghtedUnits[1] = Strenghted Wooden Sword
    Set strenghtedUnits[2] = Strenghted Stone Sword
    Set strenghtedUnits[3] = Strenghted Copper Sword
    Set strenghtedUnits[4] = Strenghted Gold Sword
    Set strenghtedUnits[5] = Strenghted Iron Sword
    Set strenghtedUnits[6] = Strenghted Diamond Sword
    Set strenghtedUnits[7] = Strenghted Battle Axe
units init
  Events
    Map initialization
  Conditions
  Actions
    Set maxUnits = 38
    -------- Swords --------
    Set units[0] = Wooden Sword
    Set units[1] = Stone Sword
    Set units[2] = Copper Sword
    Set units[3] = Gold Sword
    Set units[4] = Iron Sword
    Set units[5] = Diamond Sword
    -------- Axe --------
    Set units[6] = Wooden Axe
    Set units[7] = Stone Axe
    Set units[8] = Copper Axe
    Set units[9] = Gold Axe
    Set units[10] = Iron Axe
    Set units[11] = Diamond Axe
    -------- Pickaxe --------
    Set units[12] = Wooden Pickaxe
    Set units[13] = Stone Pickaxe
    Set units[14] = Copper Pickaxe
    Set units[15] = Gold Pickaxe
    Set units[16] = Iron Pickaxe
    Set units[17] = Diamond Pickaxe
    -------- Hoe --------
    Set units[18] = Wooden Hoe
    Set units[19] = Stone Hoe
    Set units[20] = Copper Hoe
    Set units[21] = Gold Hoe
    Set units[22] = Iron Hoe
    Set units[23] = Diamond Hoe
    -------- Bow --------
    Set units[24] = Bow
    -------- Shovel --------
    Set units[25] = Shovel
    -------- Rod --------
    Set units[26] = Fishing Rod
    -------- Spear --------
    Set units[27] = Spear
    -------- Bone Bow --------
    Set units[28] = Bone Bow
    -------- Crossbow --------
    Set units[29] = Crossbow
    -------- Multibreak --------
    Set units[30] = Wooden Multibreak
    Set units[31] = Stone Multibreak
    Set units[32] = Copper Multibreak
    Set units[33] = Gold Multibreak
    Set units[34] = Iron Multibreak
    Set units[35] = Diamond Multibreak
    -------- Battle Axe --------
    Set units[36] = Battle Axe
    -------- Hell Cleaver --------
    Set units[37] = Hell Cleaver
    -------- Rifle --------
    Set units[38] = Rifle
weapon initalization
  Events
    Map initialization
  Conditions
  Actions
    -------- Wooden Sword --------
    Set weapons_sfxString[0] = WoodenSword.mdx
    -------- Stone Sword --------
    Set weapons_sfxString[1] = Sword.mdx
    -------- Copper Sword --------
    Set weapons_sfxString[2] = CopperSword.mdx
    -------- Gold Sword --------
    Set weapons_sfxString[3] = GoldSword.mdx
    -------- Iron Sword --------
    Set weapons_sfxString[4] = IronSword.mdx
    -------- Diamond Sword --------
    Set weapons_sfxString[5] = DiamondSword.mdx
    -------- BattleAxe (für strenghtedItem SFX nur) --------
    Set weapons_sfxString[6] = Dwarven Double Axe.mdx
without wait 0.01 seconds..the game crashes
toFist
  Events
    Unit - A unit Loses an item
  Conditions
    (Unit-type of (Triggering unit)) Not equal to Fist
    (Unit-type of (Triggering unit)) Not equal to Backpack
    ((Triggering unit) is A Hero) Equal to True
    ((Triggering unit) is alive) Equal to True
  Actions
    For each (Integer A) from 1 to maxUnits, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Item-type of (Item being manipulated)) Equal to items[(Integer A)]
            (Unit-type of (Triggering unit)) Equal to units[(Integer A)]
          Then - Actions
            Unit Group - Remove (Triggering unit) from heroGroup
            Wait 0.01 seconds
            Trigger - Turn off get_crafting_points <gen>
            Set TempLoc = (Center of (Playable map area))
            Unit - Create 1 no weapon or tool equipped (dummy_CraftingTable) for (Owner of (Triggering unit)) at TempLoc facing Default building facing degrees
            Custom script: call RemoveLocation(udg_TempLoc)
            Unit - Replace (Triggering unit) with a Fist using The old unit's relative life and mana
            Hero - Modify Strength of (Last replaced unit): Set to (Strength of (Triggering unit) (Exclude bonuses))
            Hero - Modify Agility of (Last replaced unit): Set to (Agility of (Triggering unit) (Exclude bonuses))
            Hero - Modify Intelligence of (Last replaced unit): Set to (Intelligence of (Triggering unit) (Exclude bonuses))
            Hero - Set (Last replaced unit) experience to (Hero experience of (Triggering unit)), Hide level-up graphics
            Selection - Select (Last replaced unit) for (Owner of (Triggering unit))
            Set player_hero[(Player number of (Owner of (Triggering unit)))] = (Last replaced unit)
            Unit Group - Add (Last replaced unit) to heroGroup
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Hero level of (Last replaced unit)) Equal to 500
              Then - Actions
                Special Effect - Create a special effect attached to the head of (Last replaced unit) using RoyalCrown.mdx
              Else - Actions
            Trigger - Turn on get_crafting_points <gen>
          Else - Actions
    For each (Integer A) from 1 to maxStrenghtedUnits, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Item-type of (Item being manipulated)) Equal to strenghted_items[(Integer A)]
            (Unit-type of (Triggering unit)) Equal to strenghtedUnits[(Integer A)]
          Then - Actions
            Unit Group - Remove (Triggering unit) from heroGroup
            Wait 0.01 seconds
            Trigger - Turn off get_crafting_points <gen>
            Set TempLoc = (Center of (Playable map area))
            Unit - Create 1 no weapon or tool equipped (dummy_CraftingTable) for (Owner of (Triggering unit)) at TempLoc facing Default building facing degrees
            Custom script: call RemoveLocation(udg_TempLoc)
            Unit - Replace (Triggering unit) with a Fist using The old unit's relative life and mana
            Hero - Modify Strength of (Last replaced unit): Set to (Strength of (Triggering unit) (Exclude bonuses))
            Hero - Modify Agility of (Last replaced unit): Set to (Agility of (Triggering unit) (Exclude bonuses))
            Hero - Modify Intelligence of (Last replaced unit): Set to (Intelligence of (Triggering unit) (Exclude bonuses))
            Hero - Set (Last replaced unit) experience to (Hero experience of (Triggering unit)), Hide level-up graphics
            Selection - Select (Last replaced unit) for (Owner of (Triggering unit))
            Set player_hero[(Player number of (Owner of (Triggering unit)))] = (Last replaced unit)
            Unit Group - Add (Last replaced unit) to heroGroup
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Hero level of (Last replaced unit)) Equal to 500
              Then - Actions
                Special Effect - Create a special effect attached to the head of (Last replaced unit) using RoyalCrown.mdx
              Else - Actions
            Trigger - Turn on get_crafting_points <gen>
          Else - Actions
toWeapon
  Events
    Unit - A unit Uses an item
  Conditions
    (Unit-type of (Triggering unit)) Not equal to Backpack
    ((Triggering unit) is A structure) Not equal to True
    ((Triggering unit) is A Hero) Equal to True
  Actions
    For each (Integer weaponInteger) from 0 to 5, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Item-type of (Item being manipulated)) Equal to items[weaponInteger]
          Then - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Intelligence of (Triggering unit) (Exclude bonuses)) Greater than or equal to 5
              Then - Actions
                For each (Integer B) from 1 to 6, do (Actions)
                  Loop - Actions
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        (Item carried by (Triggering unit) in slot (Integer B)) Equal to (Item being manipulated)
                      Then - Actions
                        Item - Set charges remaining in (Item carried by (Triggering unit) in slot (Integer B)) to ((Charges remaining in (Item carried by (Triggering unit) in slot (Integer B))) + 1)
                      Else - Actions
                Set temp_UnitGroup = (Units owned by (Owner of (Triggering unit)) of type no weapon or tool equipped (dummy_CraftingTable))
                Unit Group - Pick every unit in temp_UnitGroup and do (Actions)
                  Loop - Actions
                    Unit - Remove (Picked unit) from the game
                Custom script: call DestroyGroup(udg_temp_UnitGroup)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (Unit-type of (Triggering unit)) Not equal to units[weaponInteger]
                  Then - Actions
                    Unit Group - Remove (Triggering unit) from heroGroup
                    Trigger - Turn off toFist <gen>
                    Trigger - Turn off get_crafting_points <gen>
                    Unit - Replace (Triggering unit) with a units[weaponInteger] using The old unit's relative life and mana
                    Special Effect - Create a special effect attached to the left hand of (Last replaced unit) using weapons_sfxString[weaponInteger]
                    Hero - Modify Strength of (Last replaced unit): Set to (Strength of (Triggering unit) (Exclude bonuses))
                    Hero - Modify Agility of (Last replaced unit): Set to (Agility of (Triggering unit) (Exclude bonuses))
                    Hero - Modify Intelligence of (Last replaced unit): Set to (Intelligence of (Triggering unit) (Exclude bonuses))
                    Selection - Select (Last replaced unit) for (Owner of (Triggering unit))
                    Set player_hero[(Player number of (Owner of (Triggering unit)))] = (Last replaced unit)
                    Unit Group - Add (Last replaced unit) to heroGroup
                    Trigger - Turn on get_crafting_points <gen>
                    Trigger - Turn on toFist <gen>
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        (Hero level of (Last replaced unit)) Equal to 500
                      Then - Actions
                        Special Effect - Create a special effect attached to the head of (Last replaced unit) using RoyalCrown.mdx
                      Else - Actions
                  Else - Actions
                    Unit Group - Remove (Triggering unit) from heroGroup
                    Trigger - Turn off toFist <gen>
                    Trigger - Turn off get_crafting_points <gen>
                    Set TempLoc = (Center of (Playable map area))
                    Unit - Create 1 no weapon or tool equipped (dummy_CraftingTable) for (Owner of (Triggering unit)) at TempLoc facing Default building facing degrees
                    Custom script: call RemoveLocation(udg_TempLoc)
                    Unit - Replace (Triggering unit) with a Fist using The old unit's relative life and mana
                    Hero - Modify Strength of (Last replaced unit): Set to (Strength of (Triggering unit) (Exclude bonuses))
                    Hero - Modify Agility of (Last replaced unit): Set to (Agility of (Triggering unit) (Exclude bonuses))
                    Hero - Modify Intelligence of (Last replaced unit): Set to (Intelligence of (Triggering unit) (Exclude bonuses))
                    Hero - Set (Last replaced unit) experience to (Hero experience of (Triggering unit)), Hide level-up graphics
                    Selection - Select (Last replaced unit) for (Owner of (Triggering unit))
                    Set player_hero[(Player number of (Owner of (Triggering unit)))] = (Last replaced unit)
                    Unit Group - Add (Last replaced unit) to heroGroup
                    Trigger - Turn on get_crafting_points <gen>
                    Trigger - Turn on toFist <gen>
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        (Hero level of (Last replaced unit)) Equal to 500
                      Then - Actions
                        Special Effect - Create a special effect attached to the head of (Last replaced unit) using RoyalCrown.mdx
                      Else - Actions
              Else - Actions
                Unit Group - Remove (Triggering unit) from heroGroup
                Game - Display to (Player group((Owner of (Triggering unit)))) the text: Your hero is exhausted. Rest until he regained some energy.
                Trigger - Turn off toFist <gen>
                Trigger - Turn off get_crafting_points <gen>
                Set TempLoc = (Center of (Playable map area))
                Unit - Create 1 no weapon or tool equipped (dummy_CraftingTable) for (Owner of (Triggering unit)) at TempLoc facing Default building facing degrees
                Custom script: call RemoveLocation(udg_TempLoc)
                Unit - Replace (Triggering unit) with a Fist using The old unit's relative life and mana
                Hero - Modify Strength of (Last replaced unit): Set to (Strength of (Triggering unit) (Exclude bonuses))
                Hero - Modify Agility of (Last replaced unit): Set to (Agility of (Triggering unit) (Exclude bonuses))
                Hero - Modify Intelligence of (Last replaced unit): Set to (Intelligence of (Triggering unit) (Exclude bonuses))
                Hero - Set (Last replaced unit) experience to (Hero experience of (Triggering unit)), Hide level-up graphics
                Selection - Select (Last replaced unit) for (Owner of (Triggering unit))
                Set player_hero[(Player number of (Owner of (Triggering unit)))] = (Last replaced unit)
                Unit Group - Add (Last replaced unit) to heroGroup
                Trigger - Turn on get_crafting_points <gen>
                Trigger - Turn on toFist <gen>
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (Hero level of (Last replaced unit)) Equal to 500
                  Then - Actions
                    Special Effect - Create a special effect attached to the head of (Last replaced unit) using RoyalCrown.mdx
                  Else - Actions
          Else - Actions
toAxe
  Events
    Unit - A unit Uses an item
  Conditions
    (Unit-type of (Triggering unit)) Not equal to Backpack
    ((Triggering unit) is A Hero) Equal to True
    ((Triggering unit) is A structure) Not equal to True
  Actions
    For each (Integer A) from 6 to 11, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Item-type of (Item being manipulated)) Equal to items[(Integer A)]
          Then - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Intelligence of (Triggering unit) (Exclude bonuses)) Greater than or equal to 5
              Then - Actions
                Item - Set charges remaining in (Item carried by (Triggering unit) of type items[(Integer A)]) to ((Charges remaining in (Item carried by (Triggering unit) of type items[(Integer A)])) + 1)
                Set temp_UnitGroup = (Units owned by (Owner of (Triggering unit)) of type no weapon or tool equipped (dummy_CraftingTable))
                Unit Group - Pick every unit in temp_UnitGroup and do (Actions)
                  Loop - Actions
                    Unit - Remove (Picked unit) from the game
                Custom script: call DestroyGroup(udg_temp_UnitGroup)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (Unit-type of (Triggering unit)) Not equal to units[(Integer A)]
                  Then - Actions
                    Unit Group - Remove (Triggering unit) from heroGroup
                    Trigger - Turn off toFist <gen>
                    Trigger - Turn off get_crafting_points <gen>
                    Unit - Replace (Triggering unit) with a units[(Integer A)] using The old unit's relative life and mana
                    Special Effect - Create a special effect attached to the left hand of (Last replaced unit) using CopperAxe.mdx
                    Set tmpUnit = (Last replaced unit)
                    Hero - Modify Strength of (Last replaced unit): Set to (Strength of (Triggering unit) (Exclude bonuses))
                    Hero - Modify Agility of (Last replaced unit): Set to (Agility of (Triggering unit) (Exclude bonuses))
                    Hero - Modify Intelligence of (Last replaced unit): Set to (Intelligence of (Triggering unit) (Exclude bonuses))
                    Selection - Select (Last replaced unit) for (Owner of (Triggering unit))
                    Set player_hero[(Player number of (Owner of (Triggering unit)))] = (Last replaced unit)
                    Unit Group - Add (Last replaced unit) to heroGroup
                    Trigger - Turn on get_crafting_points <gen>
                    Trigger - Turn on toFist <gen>
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        (Hero level of (Last replaced unit)) Equal to 500
                      Then - Actions
                        Special Effect - Create a special effect attached to the head of (Last replaced unit) using RoyalCrown.mdx
                      Else - Actions
                  Else - Actions
                    Unit Group - Remove (Triggering unit) from heroGroup
                    Trigger - Turn off toFist <gen>
                    Trigger - Turn off get_crafting_points <gen>
                    Set TempLoc = (Center of (Playable map area))
                    Unit - Create 1 no weapon or tool equipped (dummy_CraftingTable) for (Owner of (Triggering unit)) at TempLoc facing Default building facing degrees
                    Custom script: call RemoveLocation(udg_TempLoc)
                    Unit - Replace (Triggering unit) with a Fist using The old unit's relative life and mana
                    Hero - Modify Strength of (Last replaced unit): Set to (Strength of (Triggering unit) (Exclude bonuses))
                    Hero - Modify Agility of (Last replaced unit): Set to (Agility of (Triggering unit) (Exclude bonuses))
                    Hero - Modify Intelligence of (Last replaced unit): Set to (Intelligence of (Triggering unit) (Exclude bonuses))
                    Hero - Set (Last replaced unit) experience to (Hero experience of (Triggering unit)), Hide level-up graphics
                    Selection - Select (Last replaced unit) for (Owner of (Triggering unit))
                    Set player_hero[(Player number of (Owner of (Triggering unit)))] = (Last replaced unit)
                    Unit Group - Add (Last replaced unit) to heroGroup
                    Trigger - Turn on get_crafting_points <gen>
                    Trigger - Turn on toFist <gen>
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        (Hero level of (Last replaced unit)) Equal to 500
                      Then - Actions
                        Special Effect - Create a special effect attached to the head of (Last replaced unit) using RoyalCrown.mdx
                      Else - Actions
              Else - Actions
                Unit Group - Remove (Triggering unit) from heroGroup
                Game - Display to (Player group((Owner of (Triggering unit)))) the text: Your hero is exhausted. Rest until he regained some energy.
                Trigger - Turn off toFist <gen>
                Trigger - Turn off get_crafting_points <gen>
                Set TempLoc = (Center of (Playable map area))
                Unit - Create 1 no weapon or tool equipped (dummy_CraftingTable) for (Owner of (Triggering unit)) at TempLoc facing Default building facing degrees
                Custom script: call RemoveLocation(udg_TempLoc)
                Unit - Replace (Triggering unit) with a Fist using The old unit's relative life and mana
                Hero - Modify Strength of (Last replaced unit): Set to (Strength of (Triggering unit) (Exclude bonuses))
                Hero - Modify Agility of (Last replaced unit): Set to (Agility of (Triggering unit) (Exclude bonuses))
                Hero - Modify Intelligence of (Last replaced unit): Set to (Intelligence of (Triggering unit) (Exclude bonuses))
                Hero - Set (Last replaced unit) experience to (Hero experience of (Triggering unit)), Hide level-up graphics
                Selection - Select (Last replaced unit) for (Owner of (Triggering unit))
                Set player_hero[(Player number of (Owner of (Triggering unit)))] = (Last replaced unit)
                Unit Group - Add (Last replaced unit) to heroGroup
                Trigger - Turn on get_crafting_points <gen>
                Trigger - Turn on toFist <gen>
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (Hero level of (Last replaced unit)) Equal to 500
                  Then - Actions
                    Special Effect - Create a special effect attached to the head of (Last replaced unit) using RoyalCrown.mdx
                  Else - Actions
          Else - Actions
toSpear
  Events
    Unit - A unit Uses an item
  Conditions
    (Unit-type of (Triggering unit)) Not equal to Backpack
    ((Triggering unit) is A structure) Not equal to True
    ((Triggering unit) is A Hero) Equal to True
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Item-type of (Item being manipulated)) Equal to items[27]
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Intelligence of (Triggering unit) (Exclude bonuses)) Greater than or equal to 5
          Then - Actions
            Item - Set charges remaining in (Item carried by (Triggering unit) of type items[27]) to ((Charges remaining in (Item carried by (Triggering unit) of type items[27])) + 1)
            Set temp_UnitGroup = (Units owned by (Owner of (Triggering unit)) of type no weapon or tool equipped (dummy_CraftingTable))
            Unit Group - Pick every unit in temp_UnitGroup and do (Actions)
              Loop - Actions
                Unit - Remove (Picked unit) from the game
            Custom script: call DestroyGroup(udg_temp_UnitGroup)
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Unit-type of (Triggering unit)) Not equal to units[27]
              Then - Actions
                Unit Group - Remove (Triggering unit) from heroGroup
                Trigger - Turn off toFist <gen>
                Trigger - Turn off get_crafting_points <gen>
                Unit - Replace (Triggering unit) with a units[27] using The old unit's relative life and mana
                Special Effect - Create a special effect attached to the left hand of (Last replaced unit) using Spear.mdx
                Hero - Modify Strength of (Last replaced unit): Set to (Strength of (Triggering unit) (Exclude bonuses))
                Hero - Modify Agility of (Last replaced unit): Set to (Agility of (Triggering unit) (Exclude bonuses))
                Hero - Modify Intelligence of (Last replaced unit): Set to (Intelligence of (Triggering unit) (Exclude bonuses))
                Selection - Select (Last replaced unit) for (Owner of (Triggering unit))
                Set player_hero[(Player number of (Owner of (Triggering unit)))] = (Last replaced unit)
                Unit Group - Add (Last replaced unit) to heroGroup
                Trigger - Turn on get_crafting_points <gen>
                Trigger - Turn on toFist <gen>
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (Hero level of (Last replaced unit)) Equal to 500
                  Then - Actions
                    Special Effect - Create a special effect attached to the head of (Last replaced unit) using RoyalCrown.mdx
                  Else - Actions
              Else - Actions
                Unit Group - Remove (Triggering unit) from heroGroup
                Trigger - Turn off toFist <gen>
                Trigger - Turn off get_crafting_points <gen>
                Set TempLoc = (Center of (Playable map area))
                Unit - Create 1 no weapon or tool equipped (dummy_CraftingTable) for (Owner of (Triggering unit)) at TempLoc facing Default building facing degrees
                Custom script: call RemoveLocation(udg_TempLoc)
                Unit - Replace (Triggering unit) with a Fist using The old unit's relative life and mana
                Hero - Modify Strength of (Last replaced unit): Set to (Strength of (Triggering unit) (Exclude bonuses))
                Hero - Modify Agility of (Last replaced unit): Set to (Agility of (Triggering unit) (Exclude bonuses))
                Hero - Modify Intelligence of (Last replaced unit): Set to (Intelligence of (Triggering unit) (Exclude bonuses))
                Hero - Set (Last replaced unit) experience to (Hero experience of (Triggering unit)), Hide level-up graphics
                Selection - Select (Last replaced unit) for (Owner of (Triggering unit))
                Set player_hero[(Player number of (Owner of (Triggering unit)))] = (Last replaced unit)
                Unit Group - Add (Last replaced unit) to heroGroup
                Trigger - Turn on get_crafting_points <gen>
                Trigger - Turn on toFist <gen>
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (Hero level of (Last replaced unit)) Equal to 500
                  Then - Actions
                    Special Effect - Create a special effect attached to the head of (Last replaced unit) using RoyalCrown.mdx
                  Else - Actions
          Else - Actions
            Unit Group - Remove (Triggering unit) from heroGroup
            Game - Display to (Player group((Owner of (Triggering unit)))) the text: Your hero is exhausted. Rest until he regained some energy.
            Trigger - Turn off toFist <gen>
            Trigger - Turn off get_crafting_points <gen>
            Set TempLoc = (Center of (Playable map area))
            Unit - Create 1 no weapon or tool equipped (dummy_CraftingTable) for (Owner of (Triggering unit)) at TempLoc facing Default building facing degrees
            Custom script: call RemoveLocation(udg_TempLoc)
            Unit - Replace (Triggering unit) with a Fist using The old unit's relative life and mana
            Hero - Modify Strength of (Last replaced unit): Set to (Strength of (Triggering unit) (Exclude bonuses))
            Hero - Modify Agility of (Last replaced unit): Set to (Agility of (Triggering unit) (Exclude bonuses))
            Hero - Modify Intelligence of (Last replaced unit): Set to (Intelligence of (Triggering unit) (Exclude bonuses))
            Hero - Set (Last replaced unit) experience to (Hero experience of (Triggering unit)), Hide level-up graphics
            Selection - Select (Last replaced unit) for (Owner of (Triggering unit))
            Set player_hero[(Player number of (Owner of (Triggering unit)))] = (Last replaced unit)
            Unit Group - Add (Last replaced unit) to heroGroup
            Trigger - Turn on get_crafting_points <gen>
            Trigger - Turn on toFist <gen>
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Hero level of (Last replaced unit)) Equal to 500
              Then - Actions
                Special Effect - Create a special effect attached to the head of (Last replaced unit) using RoyalCrown.mdx
              Else - Actions
      Else - Actions
toPickaxe
  Events
    Unit - A unit Uses an item
  Conditions
    (Unit-type of (Triggering unit)) Not equal to Backpack
    ((Triggering unit) is A structure) Not equal to True
    ((Triggering unit) is A Hero) Equal to True
  Actions
    For each (Integer A) from 12 to 17, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Item-type of (Item being manipulated)) Equal to items[(Integer A)]
          Then - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Intelligence of (Triggering unit) (Exclude bonuses)) Greater than or equal to 5
              Then - Actions
                Item - Set charges remaining in (Item carried by (Triggering unit) of type items[(Integer A)]) to ((Charges remaining in (Item carried by (Triggering unit) of type items[(Integer A)])) + 1)
                Set temp_UnitGroup = (Units owned by (Owner of (Triggering unit)) of type no weapon or tool equipped (dummy_CraftingTable))
                Unit Group - Pick every unit in temp_UnitGroup and do (Actions)
                  Loop - Actions
                    Unit - Remove (Picked unit) from the game
                Custom script: call DestroyGroup(udg_temp_UnitGroup)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (Unit-type of (Triggering unit)) Not equal to units[(Integer A)]
                  Then - Actions
                    Unit Group - Remove (Triggering unit) from heroGroup
                    Trigger - Turn off toFist <gen>
                    Trigger - Turn off get_crafting_points <gen>
                    Unit - Replace (Triggering unit) with a units[(Integer A)] using The old unit's relative life and mana
                    Special Effect - Create a special effect attached to the left hand of (Last replaced unit) using Pickaxe.mdx
                    Set tmpUnit = (Last replaced unit)
                    Hero - Modify Strength of (Last replaced unit): Set to (Strength of (Triggering unit) (Exclude bonuses))
                    Hero - Modify Agility of (Last replaced unit): Set to (Agility of (Triggering unit) (Exclude bonuses))
                    Hero - Modify Intelligence of (Last replaced unit): Set to (Intelligence of (Triggering unit) (Exclude bonuses))
                    Selection - Select (Last replaced unit) for (Owner of (Triggering unit))
                    Set player_hero[(Player number of (Owner of (Triggering unit)))] = (Last replaced unit)
                    Unit Group - Add (Last replaced unit) to heroGroup
                    Trigger - Turn on get_crafting_points <gen>
                    Trigger - Turn on toFist <gen>
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        (Hero level of (Last replaced unit)) Equal to 500
                      Then - Actions
                        Special Effect - Create a special effect attached to the head of (Last replaced unit) using RoyalCrown.mdx
                      Else - Actions
                  Else - Actions
                    Unit Group - Remove (Triggering unit) from heroGroup
                    Trigger - Turn off toFist <gen>
                    Trigger - Turn off get_crafting_points <gen>
                    Set TempLoc = (Center of (Playable map area))
                    Unit - Create 1 no weapon or tool equipped (dummy_CraftingTable) for (Owner of (Triggering unit)) at TempLoc facing Default building facing degrees
                    Custom script: call RemoveLocation(udg_TempLoc)
                    Unit - Replace (Triggering unit) with a Fist using The old unit's relative life and mana
                    Hero - Modify Strength of (Last replaced unit): Set to (Strength of (Triggering unit) (Exclude bonuses))
                    Hero - Modify Agility of (Last replaced unit): Set to (Agility of (Triggering unit) (Exclude bonuses))
                    Hero - Modify Intelligence of (Last replaced unit): Set to (Intelligence of (Triggering unit) (Exclude bonuses))
                    Hero - Set (Last replaced unit) experience to (Hero experience of (Triggering unit)), Hide level-up graphics
                    Selection - Select (Last replaced unit) for (Owner of (Triggering unit))
                    Set player_hero[(Player number of (Owner of (Triggering unit)))] = (Last replaced unit)
                    Unit Group - Add (Last replaced unit) to heroGroup
                    Trigger - Turn on get_crafting_points <gen>
                    Trigger - Turn on toFist <gen>
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        (Hero level of (Last replaced unit)) Equal to 500
                      Then - Actions
                        Special Effect - Create a special effect attached to the head of (Last replaced unit) using RoyalCrown.mdx
                      Else - Actions
              Else - Actions
                Unit Group - Remove (Triggering unit) from heroGroup
                Game - Display to (Player group((Owner of (Triggering unit)))) the text: Your hero is exhausted. Rest until he regained some energy.
                Trigger - Turn off toFist <gen>
                Trigger - Turn off get_crafting_points <gen>
                Set TempLoc = (Center of (Playable map area))
                Unit - Create 1 no weapon or tool equipped (dummy_CraftingTable) for (Owner of (Triggering unit)) at TempLoc facing Default building facing degrees
                Custom script: call RemoveLocation(udg_TempLoc)
                Unit - Replace (Triggering unit) with a Fist using The old unit's relative life and mana
                Hero - Modify Strength of (Last replaced unit): Set to (Strength of (Triggering unit) (Exclude bonuses))
                Hero - Modify Agility of (Last replaced unit): Set to (Agility of (Triggering unit) (Exclude bonuses))
                Hero - Modify Intelligence of (Last replaced unit): Set to (Intelligence of (Triggering unit) (Exclude bonuses))
                Hero - Set (Last replaced unit) experience to (Hero experience of (Triggering unit)), Hide level-up graphics
                Selection - Select (Last replaced unit) for (Owner of (Triggering unit))