package Movement

function noStuckCond()returns boolean if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(0) ) ) return false

if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(1) ) ) 
    return false

if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(2) ) ) 
    return false

if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(3) ) ) 
    return false

if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(4) ) ) 
    return false

if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(5) ) ) 
    return false

if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(6) ) ) 
    return false

if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(7) ) ) 
    return false

if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(8) ) ) 
    return false

if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(9) ) ) 
    return false

if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(10) ) ) 
    return false

if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(11) ) ) 
    return false

if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(PLAYER_NEUTRAL_PASSIVE) ) ) 
    return false

return true

function noStuckAction() for unit enemy from GetUnitsInRectOfPlayer(gg_rct_Cop_Move_Spawn, Player(PLAYER_NEUTRAL_AGGRESSIVE)) enemy.issuePointOrder("attack", gg_rct_Attack_Move_Hostile_Reinforcements_Arrive.randomPoint()) init

trigger t = CreateTrigger(  )
 TriggerRegisterEnterRectSimple( t, gg_rct_Helicopter_Arrives )
 TriggerRegisterEnterRectSimple( t, gg_rct_Cop_Move_Spawn )
 TriggerAddCondition( t, Condition( function noStuckCond ) )
 TriggerAddAction( t, function noStuckAction )

package Respawn import HashMap import ClosureTimers

HashMap<int,int> idList = new HashMap<int,int>()

function respawn() int id1 = GetDyingUnit().getTypeId() unit dead = GetDyingUnit() if idList.has(id1) doAfter(7, () -> begin createUnit(Player(8), idList.get(id1), dead.getPos(), angle(0))

        end)

init

idList.put('h00L', 'n002')
idList.put('h019', 'n00H')
idList.put('hhes', 'n00T')
idList.put('z002', 'n003')
idList.put('z005', 'n000')
idList.put('z000', 'n000')
idList.put('z001', 'u00A')
idList.put('hpea', 'n000')
idList.put('hrif', 'n003')
idList.put('hfoo', 'n002')


trigger t= CreateTrigger()
t.registerAnyUnitEvent(EVENT_PLAYER_UNIT_DEATH)
t.addAction(function respawn)

package Spawn import ClosureTimers

boolean secondSpawn = false

function startSpawn ()

//doAfter(200, ()-> begin

    doPeriodically(10, (CallbackPeriodic cb) -> begin 
            DisplayTimedTextToForce( GetPlayersAll(), 15.00, "--Wave 1--" )
            for int i = 0 to 10
                createUnit(Player(11),'n002',gg_rct_Graveyard_Spawns_and_move.randomPoint(), angle(0))
            for int i = 0 to 10
                createUnit(Player(10),'u000',gg_rct_Graveyard_Spawns_and_move.randomPoint(), angle(0))  
            for int i = 0 to 10
                createUnit(Player(9),'n003',gg_rct_Graveyard_Spawns_and_move.randomPoint(), angle(0))   
            for int i = 0 to 10
                createUnit(Player(8),'u002',gg_rct_Graveyard_Spawns_and_move.randomPoint(), angle(0))
            createUnit(Player(8),'u003',gg_rct_Graveyard_Spawns_and_move.randomPoint(), angle(0))
            for int i = 0 to 10
                createUnit(Player(8),'u004',gg_rct_Graveyard_Spawns_and_move.randomPoint(), angle(0)) 
    end)

init getTimer().start( 0.010, function startSpawn )

package AntiStuck import ClosureTimers function noStuckCond() returns boolean if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(0) ) ) return false

if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(1) ) ) 
    return false

if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(2) ) ) 
    return false

if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(3) ) ) 
    return false

if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(4) ) ) 
    return false

if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(5) ) ) 
    return false

if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(6) ) ) 
    return false

if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(7) ) ) 
    return false

if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) 
    return false

if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(PLAYER_NEUTRAL_PASSIVE) ) ) 
    return false

return true

function noStuckAction() doAfter(1, () -> begin GetEnteringUnit().issuePointOrder("attack", GroupPickRandomUnit(GetUnitsOfPlayerAll(ForcePickRandomPlayer(GetPlayersEnemies(Player(10))))).getPos()) end)

function callBack() for unit enemy from GetUnitsOfPlayerAll(Player(10)) enemy.issuePointOrder("attack", GroupPickRandomUnit(GetUnitsOfPlayerAll(ForcePickRandomPlayer(GetPlayersEnemies(Player(10))))).getPos())

    for unit enemy from GetUnitsOfPlayerAll(Player(8))
        enemy.issuePointOrder("attack", GroupPickRandomUnit(GetUnitsOfPlayerAll(ForcePickRandomPlayer(GetPlayersEnemies(Player(8))))).getPos())

    for unit enemy from GetUnitsOfPlayerAll(Player(9))
        enemy.issuePointOrder("attack", GroupPickRandomUnit(GetUnitsOfPlayerAll(ForcePickRandomPlayer(GetPlayersEnemies(Player(9))))).getPos())

    for unit enemy from GetUnitsOfPlayerAll(Player(11))
        enemy.issuePointOrder("attack", GroupPickRandomUnit(GetUnitsOfPlayerAll(ForcePickRandomPlayer(GetPlayersEnemies(Player(11))))).getPos())

init

/* trigger s = CreateTrigger( ) TriggerRegisterEnterRectSimple( s, GetPlayableMapRect() ) TriggerRegisterTimerEventPeriodic( s, 35.00 ) TriggerAddAction( s, function callBack )

trigger t = CreateTrigger(  )
 TriggerRegisterEnterRectSimple( t, GetPlayableMapRect() )
 TriggerAddCondition( t, Condition( function noStuckCond ) )
 TriggerAddAction( t, function noStuckAction ) */

package MedicKit

function diseaseCond() returns boolean if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'z000' ) or not ( GetUnitTypeId(GetEnteringUnit()) == 'H016' ) or not ( GetUnitTypeId(GetEnteringUnit()) == 'H017' ) ) return false return true

function diseaseAction() GetEnteringUnit().addEffect("war3mapImported\FirstAidBackpack_ByEpsilon.mdx", "chest")

function diseaseLoopAction() for unit enemy from GetUnitsOfPlayerAndTypeId(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'z000') enemy.addEffect("war3mapImported\FirstAidBackpack_ByEpsilon.mdx", "chest") init

//===========================================================================

 trigger diseased = CreateTrigger(  )
 TriggerRegisterEnterRectSimple( diseased, GetPlayableMapRect() )
 TriggerAddCondition( diseased, Condition( function diseaseCond ) )
 TriggerAddAction( diseased, function diseaseAction )

 trigger diseaseOnce = CreateTrigger()
 TriggerRegisterTimerEventSingle( diseaseOnce, 5 )
 TriggerAddAction( diseaseOnce, function diseaseLoopAction )   

package GameInit import ClosureTimers

function start ()

 SetPlayerAllianceStateBJ( Player(PLAYER_NEUTRAL_AGGRESSIVE), Player(0), bj_ALLIANCE_ALLIED_VISION )
 SetPlayerAllianceStateBJ( Player(PLAYER_NEUTRAL_AGGRESSIVE), Player(1), bj_ALLIANCE_ALLIED_VISION )
 SetPlayerAllianceStateBJ( Player(PLAYER_NEUTRAL_AGGRESSIVE), Player(2), bj_ALLIANCE_ALLIED_VISION )
 SetPlayerAllianceStateBJ( Player(PLAYER_NEUTRAL_AGGRESSIVE), Player(3), bj_ALLIANCE_ALLIED_VISION )
 SetPlayerAllianceStateBJ( Player(PLAYER_NEUTRAL_AGGRESSIVE), Player(4), bj_ALLIANCE_ALLIED_VISION )
 SetPlayerAllianceStateBJ( Player(PLAYER_NEUTRAL_AGGRESSIVE), Player(5), bj_ALLIANCE_ALLIED_VISION )
 SetPlayerAllianceStateBJ( Player(PLAYER_NEUTRAL_AGGRESSIVE), Player(6), bj_ALLIANCE_ALLIED_VISION )
 SetPlayerAllianceStateBJ( Player(PLAYER_NEUTRAL_AGGRESSIVE), Player(7), bj_ALLIANCE_ALLIED_VISION )


doAfter(2, () -> begin
    createItem('kymn', GetPlayableMapRect().randomPoint())
    createItem('hbth', GetPlayableMapRect().randomPoint())
    createItem('wild', GetPlayableMapRect().randomPoint())
    createItem('wild', GetPlayableMapRect().randomPoint())
    createItem('wild', GetPlayableMapRect().randomPoint())
end)

doAfter(5, () -> begin
    createItem('ches', gg_rct_Radio_Spawns.randomPoint())
    createItem('tsct', gg_rct_Generator_Spawns.randomPoint())
    createItem('hval', GetPlayableMapRect().randomPoint())
end)

doAfter(1500, () -> begin
    for unit enemy from GetUnitsOfPlayerAndTypeId(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'hrif')
        enemy.issuePointOrder("attack", gg_rct_Attack_Move_Hostile_Reinforcements_Arrive.randomPoint()) 
    for unit enemy from GetUnitsOfPlayerAndTypeId(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'hfoo')
        enemy.issuePointOrder("attack", gg_rct_Attack_Move_Hostile_Reinforcements_Arrive.randomPoint()) 
    for unit enemy from GetUnitsOfPlayerAndTypeId(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'h019')
        enemy.issuePointOrder("attack", gg_rct_Attack_Move_Hostile_Reinforcements_Arrive.randomPoint())     
end)


 doAfter(6.5, () -> begin 
    SetPlayerAllianceStateBJ( Player(PLAYER_NEUTRAL_AGGRESSIVE), Player(8), bj_ALLIANCE_UNALLIED )
    SetPlayerAllianceStateBJ( Player(PLAYER_NEUTRAL_AGGRESSIVE), Player(9), bj_ALLIANCE_UNALLIED )
    SetPlayerAllianceStateBJ( Player(PLAYER_NEUTRAL_AGGRESSIVE), Player(10), bj_ALLIANCE_UNALLIED )
    SetPlayerAllianceStateBJ( Player(PLAYER_NEUTRAL_AGGRESSIVE), Player(11), bj_ALLIANCE_UNALLIED )
    SetPlayerAllianceStateBJ( Player(11), Player(PLAYER_NEUTRAL_AGGRESSIVE), bj_ALLIANCE_UNALLIED )
    SetPlayerAllianceStateBJ( Player(10), Player(PLAYER_NEUTRAL_AGGRESSIVE), bj_ALLIANCE_UNALLIED )
    SetPlayerAllianceStateBJ( Player(9), Player(PLAYER_NEUTRAL_AGGRESSIVE), bj_ALLIANCE_UNALLIED )
    SetPlayerAllianceStateBJ( Player(8), Player(PLAYER_NEUTRAL_AGGRESSIVE), bj_ALLIANCE_UNALLIED )
    SetPlayerAllianceStateBJ( Player(0), Player(PLAYER_NEUTRAL_AGGRESSIVE), bj_ALLIANCE_ALLIED_VISION )
    SetPlayerAllianceStateBJ( Player(1), Player(PLAYER_NEUTRAL_AGGRESSIVE), bj_ALLIANCE_ALLIED_VISION )
    SetPlayerAllianceStateBJ( Player(2), Player(PLAYER_NEUTRAL_AGGRESSIVE), bj_ALLIANCE_ALLIED_VISION )
    SetPlayerAllianceStateBJ( Player(3), Player(PLAYER_NEUTRAL_AGGRESSIVE), bj_ALLIANCE_ALLIED_VISION )
    SetPlayerAllianceStateBJ( Player(4), Player(PLAYER_NEUTRAL_AGGRESSIVE), bj_ALLIANCE_ALLIED_VISION )
    SetPlayerAllianceStateBJ( Player(5), Player(PLAYER_NEUTRAL_AGGRESSIVE), bj_ALLIANCE_ALLIED_VISION )
    SetPlayerAllianceStateBJ( Player(6), Player(PLAYER_NEUTRAL_AGGRESSIVE), bj_ALLIANCE_ALLIED_VISION )
    SetPlayerAllianceStateBJ( Player(7), Player(PLAYER_NEUTRAL_AGGRESSIVE), bj_ALLIANCE_ALLIED_VISION )
 end)

 doPeriodically(19, (CallbackPeriodic cb) -> begin
    gg_unit_n007_0031.issuePointOrder("move", gg_rct_Upper_Move.randomPoint())
    gg_unit_n007_0042.issuePointOrder("move", gg_rct_City_farm_move.randomPoint())
    gg_unit_o000_0035.issuePointOrder("move", gg_rct_Forest_move.randomPoint())
    gg_unit_o000_0041.issuePointOrder("move", gg_rct_City_farm_move.randomPoint())
    gg_unit_o000_0037.issuePointOrder("move", gg_rct_Upper_Move.randomPoint())
    gg_unit_h00H_0028.issuePointOrder("move", gg_rct_Forest_move.randomPoint())
    gg_unit_h00H_0029.issuePointOrder("move", gg_rct_City_farm_move.randomPoint())
end) 

 doPeriodically(19, (CallbackPeriodic cb) -> begin
    createItem('gold', GetPlayableMapRect().randomPoint())
    createItem('gold', GetPlayableMapRect().randomPoint())
    createItem('lmbr', GetPlayableMapRect().randomPoint())
end) 

print("|cffFF9421[100%] |r- Initializing Zombie Defense")

init print("|cffFF9421[0%] |r- Initializing Zombie Defense") getTimer().start( 0.010, function start )


goto line:
Compare with:
text copy window edit this code post new code