Skip to content
Home
Post Code
Jass (Warcraft III)
Wurst
GUI (Warcraft III)
Galaxy (StarCraft II)
GUI (StarCraft II)
C++
Java
Delphi
Text
Search Code
Compare Code
Uploads
Draw
Create New Drawing
View Drawings
Graph
Log in
[code]package Movement function noStuckCond[b]([/b][b])[/b]returns boolean if [b]([/b] not [b]([/b] GetOwningPlayer[b]([/b]GetEnteringUnit[b]([/b][b])[/b][b])[/b] [b]![/b]= Player[b]([/b][color=FFFF77]0[/color][b])[/b] [b])[/b] [b])[/b] return false if [b]([/b] not [b]([/b] GetOwningPlayer[b]([/b]GetEnteringUnit[b]([/b][b])[/b][b])[/b] [b]![/b]= Player[b]([/b][color=FFFF77]1[/color][b])[/b] [b])[/b] [b])[/b] return false if [b]([/b] not [b]([/b] GetOwningPlayer[b]([/b]GetEnteringUnit[b]([/b][b])[/b][b])[/b] [b]![/b]= Player[b]([/b][color=FFFF77]2[/color][b])[/b] [b])[/b] [b])[/b] return false if [b]([/b] not [b]([/b] GetOwningPlayer[b]([/b]GetEnteringUnit[b]([/b][b])[/b][b])[/b] [b]![/b]= Player[b]([/b][color=FFFF77]3[/color][b])[/b] [b])[/b] [b])[/b] return false if [b]([/b] not [b]([/b] GetOwningPlayer[b]([/b]GetEnteringUnit[b]([/b][b])[/b][b])[/b] [b]![/b]= Player[b]([/b][color=FFFF77]4[/color][b])[/b] [b])[/b] [b])[/b] return false if [b]([/b] not [b]([/b] GetOwningPlayer[b]([/b]GetEnteringUnit[b]([/b][b])[/b][b])[/b] [b]![/b]= Player[b]([/b][color=FFFF77]5[/color][b])[/b] [b])[/b] [b])[/b] return false if [b]([/b] not [b]([/b] GetOwningPlayer[b]([/b]GetEnteringUnit[b]([/b][b])[/b][b])[/b] [b]![/b]= Player[b]([/b][color=FFFF77]6[/color][b])[/b] [b])[/b] [b])[/b] return false if [b]([/b] not [b]([/b] GetOwningPlayer[b]([/b]GetEnteringUnit[b]([/b][b])[/b][b])[/b] [b]![/b]= Player[b]([/b][color=FFFF77]7[/color][b])[/b] [b])[/b] [b])[/b] return false if [b]([/b] not [b]([/b] GetOwningPlayer[b]([/b]GetEnteringUnit[b]([/b][b])[/b][b])[/b] [b]![/b]= Player[b]([/b][color=FFFF77]8[/color][b])[/b] [b])[/b] [b])[/b] return false if [b]([/b] not [b]([/b] GetOwningPlayer[b]([/b]GetEnteringUnit[b]([/b][b])[/b][b])[/b] [b]![/b]= Player[b]([/b][color=FFFF77]9[/color][b])[/b] [b])[/b] [b])[/b] return false if [b]([/b] not [b]([/b] GetOwningPlayer[b]([/b]GetEnteringUnit[b]([/b][b])[/b][b])[/b] [b]![/b]= Player[b]([/b][color=FFFF77]10[/color][b])[/b] [b])[/b] [b])[/b] return false if [b]([/b] not [b]([/b] GetOwningPlayer[b]([/b]GetEnteringUnit[b]([/b][b])[/b][b])[/b] [b]![/b]= Player[b]([/b][color=FFFF77]11[/color][b])[/b] [b])[/b] [b])[/b] return false if [b]([/b] not [b]([/b] GetOwningPlayer[b]([/b]GetEnteringUnit[b]([/b][b])[/b][b])[/b] [b]![/b]= Player[b]([/b]PLAYER_NEUTRAL_PASSIVE[b])[/b] [b])[/b] [b])[/b] return false return true function noStuckAction[b]([/b][b])[/b] for unit enemy from GetUnitsInRectOfPlayer[b]([/b]gg_rct_Cop_Move_Spawn, Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b][b])[/b] enemy.issuePointOrder[b]([/b][color=77FF77]"attack"[/color], gg_rct_Attack_Move_Hostile_Reinforcements_Arrive.randomPoint[b]([/b][b])[/b][b])[/b] init trigger t = CreateTrigger[b]([/b] [b])[/b] TriggerRegisterEnterRectSimple[b]([/b] t, gg_rct_Helicopter_Arrives [b])[/b] TriggerRegisterEnterRectSimple[b]([/b] t, gg_rct_Cop_Move_Spawn [b])[/b] TriggerAddCondition[b]([/b] t, Condition[b]([/b] function noStuckCond [b])[/b] [b])[/b] TriggerAddAction[b]([/b] t, function noStuckAction [b])[/b] package Respawn import HashMap import ClosureTimers HashMap<int,int> idList = new HashMap<int,int>[b]([/b][b])[/b] function respawn[b]([/b][b])[/b] int id1 = GetDyingUnit[b]([/b][b])[/b].getTypeId[b]([/b][b])[/b] unit dead = GetDyingUnit[b]([/b][b])[/b] if idList.has[b]([/b]id1[b])[/b] doAfter[b]([/b][color=FFFF77]7[/color], [b]([/b][b])[/b] -> begin createUnit[b]([/b]Player[b]([/b][color=FFFF77]8[/color][b])[/b], idList.get[b]([/b]id1[b])[/b], dead.getPos[b]([/b][b])[/b], angle[b]([/b][color=FFFF77]0[/color][b])[/b][b])[/b] end[b])[/b] init idList.put[b]([/b][color=999999][i]'h00L', 'n002')[/i][/color] idList.put[b]([/b][color=999999][i]'h019', 'n00H')[/i][/color] idList.put[b]([/b][color=999999][i]'hhes', 'n00T')[/i][/color] idList.put[b]([/b][color=999999][i]'z002', 'n003')[/i][/color] idList.put[b]([/b][color=999999][i]'z005', 'n000')[/i][/color] idList.put[b]([/b][color=999999][i]'z000', 'n000')[/i][/color] idList.put[b]([/b][color=999999][i]'z001', 'u00A')[/i][/color] idList.put[b]([/b][color=999999][i]'hpea', 'n000')[/i][/color] idList.put[b]([/b][color=999999][i]'hrif', 'n003')[/i][/color] idList.put[b]([/b][color=999999][i]'hfoo', 'n002')[/i][/color] trigger t= CreateTrigger[b]([/b][b])[/b] t.registerAnyUnitEvent[b]([/b]EVENT_PLAYER_UNIT_DEATH[b])[/b] t.addAction[b]([/b]function respawn[b])[/b] package Spawn import ClosureTimers boolean secondSpawn = false function startSpawn [b]([/b][b])[/b] //doAfter[b]([/b][color=FFFF77]200[/color], [b]([/b][b])[/b]-> begin doPeriodically[b]([/b][color=FFFF77]10[/color], [b]([/b]CallbackPeriodic cb[b])[/b] -> begin DisplayTimedTextToForce[b]([/b] GetPlayersAll[b]([/b][b])[/b], [color=FF7777]15.00[/color], [color=77FF77]"--Wave 1--"[/color] [b])[/b] for int i = [color=FFFF77]0[/color] to [color=FFFF77]10[/color] createUnit[b]([/b]Player[b]([/b][color=FFFF77]11[/color][b])[/b],[color=999999][i]'n002',gg_rct_Graveyard_Spawns_and_move.randomPoint(), angle(0))[/i][/color] for int i = [color=FFFF77]0[/color] to [color=FFFF77]10[/color] createUnit[b]([/b]Player[b]([/b][color=FFFF77]10[/color][b])[/b],[color=999999][i]'u000',gg_rct_Graveyard_Spawns_and_move.randomPoint(), angle(0))[/i][/color] for int i = [color=FFFF77]0[/color] to [color=FFFF77]10[/color] createUnit[b]([/b]Player[b]([/b][color=FFFF77]9[/color][b])[/b],[color=999999][i]'n003',gg_rct_Graveyard_Spawns_and_move.randomPoint(), angle(0))[/i][/color] for int i = [color=FFFF77]0[/color] to [color=FFFF77]10[/color] createUnit[b]([/b]Player[b]([/b][color=FFFF77]8[/color][b])[/b],[color=999999][i]'u002',gg_rct_Graveyard_Spawns_and_move.randomPoint(), angle(0))[/i][/color] createUnit[b]([/b]Player[b]([/b][color=FFFF77]8[/color][b])[/b],[color=999999][i]'u003',gg_rct_Graveyard_Spawns_and_move.randomPoint(), angle(0))[/i][/color] for int i = [color=FFFF77]0[/color] to [color=FFFF77]10[/color] createUnit[b]([/b]Player[b]([/b][color=FFFF77]8[/color][b])[/b],[color=999999][i]'u004',gg_rct_Graveyard_Spawns_and_move.randomPoint(), angle(0))[/i][/color] end[b])[/b] init getTimer[b]([/b][b])[/b].start[b]([/b] [color=FF7777]0.010[/color], function startSpawn [b])[/b] package AntiStuck import ClosureTimers function noStuckCond[b]([/b][b])[/b] returns boolean if [b]([/b] not [b]([/b] GetOwningPlayer[b]([/b]GetEnteringUnit[b]([/b][b])[/b][b])[/b] [b]![/b]= Player[b]([/b][color=FFFF77]0[/color][b])[/b] [b])[/b] [b])[/b] return false if [b]([/b] not [b]([/b] GetOwningPlayer[b]([/b]GetEnteringUnit[b]([/b][b])[/b][b])[/b] [b]![/b]= Player[b]([/b][color=FFFF77]1[/color][b])[/b] [b])[/b] [b])[/b] return false if [b]([/b] not [b]([/b] GetOwningPlayer[b]([/b]GetEnteringUnit[b]([/b][b])[/b][b])[/b] [b]![/b]= Player[b]([/b][color=FFFF77]2[/color][b])[/b] [b])[/b] [b])[/b] return false if [b]([/b] not [b]([/b] GetOwningPlayer[b]([/b]GetEnteringUnit[b]([/b][b])[/b][b])[/b] [b]![/b]= Player[b]([/b][color=FFFF77]3[/color][b])[/b] [b])[/b] [b])[/b] return false if [b]([/b] not [b]([/b] GetOwningPlayer[b]([/b]GetEnteringUnit[b]([/b][b])[/b][b])[/b] [b]![/b]= Player[b]([/b][color=FFFF77]4[/color][b])[/b] [b])[/b] [b])[/b] return false if [b]([/b] not [b]([/b] GetOwningPlayer[b]([/b]GetEnteringUnit[b]([/b][b])[/b][b])[/b] [b]![/b]= Player[b]([/b][color=FFFF77]5[/color][b])[/b] [b])[/b] [b])[/b] return false if [b]([/b] not [b]([/b] GetOwningPlayer[b]([/b]GetEnteringUnit[b]([/b][b])[/b][b])[/b] [b]![/b]= Player[b]([/b][color=FFFF77]6[/color][b])[/b] [b])[/b] [b])[/b] return false if [b]([/b] not [b]([/b] GetOwningPlayer[b]([/b]GetEnteringUnit[b]([/b][b])[/b][b])[/b] [b]![/b]= Player[b]([/b][color=FFFF77]7[/color][b])[/b] [b])[/b] [b])[/b] return false if [b]([/b] not [b]([/b] GetOwningPlayer[b]([/b]GetEnteringUnit[b]([/b][b])[/b][b])[/b] [b]![/b]= Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b] [b])[/b] [b])[/b] return false if [b]([/b] not [b]([/b] GetOwningPlayer[b]([/b]GetEnteringUnit[b]([/b][b])[/b][b])[/b] [b]![/b]= Player[b]([/b]PLAYER_NEUTRAL_PASSIVE[b])[/b] [b])[/b] [b])[/b] return false return true function noStuckAction[b]([/b][b])[/b] doAfter[b]([/b][color=FFFF77]1[/color], [b]([/b][b])[/b] -> begin GetEnteringUnit[b]([/b][b])[/b].issuePointOrder[b]([/b][color=77FF77]"attack"[/color], GroupPickRandomUnit[b]([/b]GetUnitsOfPlayerAll[b]([/b]ForcePickRandomPlayer[b]([/b]GetPlayersEnemies[b]([/b]Player[b]([/b][color=FFFF77]10[/color][b])[/b][b])[/b][b])[/b][b])[/b][b])[/b].getPos[b]([/b][b])[/b][b])[/b] end[b])[/b] function callBack[b]([/b][b])[/b] for unit enemy from GetUnitsOfPlayerAll[b]([/b]Player[b]([/b][color=FFFF77]10[/color][b])[/b][b])[/b] enemy.issuePointOrder[b]([/b][color=77FF77]"attack"[/color], GroupPickRandomUnit[b]([/b]GetUnitsOfPlayerAll[b]([/b]ForcePickRandomPlayer[b]([/b]GetPlayersEnemies[b]([/b]Player[b]([/b][color=FFFF77]10[/color][b])[/b][b])[/b][b])[/b][b])[/b][b])[/b].getPos[b]([/b][b])[/b][b])[/b] for unit enemy from GetUnitsOfPlayerAll[b]([/b]Player[b]([/b][color=FFFF77]8[/color][b])[/b][b])[/b] enemy.issuePointOrder[b]([/b][color=77FF77]"attack"[/color], GroupPickRandomUnit[b]([/b]GetUnitsOfPlayerAll[b]([/b]ForcePickRandomPlayer[b]([/b]GetPlayersEnemies[b]([/b]Player[b]([/b][color=FFFF77]8[/color][b])[/b][b])[/b][b])[/b][b])[/b][b])[/b].getPos[b]([/b][b])[/b][b])[/b] for unit enemy from GetUnitsOfPlayerAll[b]([/b]Player[b]([/b][color=FFFF77]9[/color][b])[/b][b])[/b] enemy.issuePointOrder[b]([/b][color=77FF77]"attack"[/color], GroupPickRandomUnit[b]([/b]GetUnitsOfPlayerAll[b]([/b]ForcePickRandomPlayer[b]([/b]GetPlayersEnemies[b]([/b]Player[b]([/b][color=FFFF77]9[/color][b])[/b][b])[/b][b])[/b][b])[/b][b])[/b].getPos[b]([/b][b])[/b][b])[/b] for unit enemy from GetUnitsOfPlayerAll[b]([/b]Player[b]([/b][color=FFFF77]11[/color][b])[/b][b])[/b] enemy.issuePointOrder[b]([/b][color=77FF77]"attack"[/color], GroupPickRandomUnit[b]([/b]GetUnitsOfPlayerAll[b]([/b]ForcePickRandomPlayer[b]([/b]GetPlayersEnemies[b]([/b]Player[b]([/b][color=FFFF77]11[/color][b])[/b][b])[/b][b])[/b][b])[/b][b])[/b].getPos[b]([/b][b])[/b][b])[/b] init /[b]*[/b] trigger s = CreateTrigger[b]([/b] [b])[/b] TriggerRegisterEnterRectSimple[b]([/b] s, GetPlayableMapRect[b]([/b][b])[/b] [b])[/b] TriggerRegisterTimerEventPeriodic[b]([/b] s, [color=FF7777]35.00[/color] [b])[/b] TriggerAddAction[b]([/b] s, function callBack [b])[/b] trigger t = CreateTrigger[b]([/b] [b])[/b] TriggerRegisterEnterRectSimple[b]([/b] t, GetPlayableMapRect[b]([/b][b])[/b] [b])[/b] TriggerAddCondition[b]([/b] t, Condition[b]([/b] function noStuckCond [b])[/b] [b])[/b] TriggerAddAction[b]([/b] t, function noStuckAction [b])[/b] [b]*[/b]/ package MedicKit function diseaseCond[b]([/b][b])[/b] returns boolean if [b]([/b] not [b]([/b] GetUnitTypeId[b]([/b]GetEnteringUnit[b]([/b][b])[/b][b])[/b] == [color=999999][i]'z000' ) or not ( GetUnitTypeId(GetEnteringUnit()) == 'H016' ) or not ( GetUnitTypeId(GetEnteringUnit()) == 'H017' ) )[/i][/color] return false return true function diseaseAction[b]([/b][b])[/b] GetEnteringUnit[b]([/b][b])[/b].addEffect[b]([/b][color=77FF77]"war3mapImported\\FirstAidBackpack_ByEpsilon.mdx"[/color], [color=77FF77]"chest"[/color][b])[/b] function diseaseLoopAction[b]([/b][b])[/b] for unit enemy from GetUnitsOfPlayerAndTypeId[b]([/b]Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], [color=999999][i]'z000')[/i][/color] enemy.addEffect[b]([/b][color=77FF77]"war3mapImported\\FirstAidBackpack_ByEpsilon.mdx"[/color], [color=77FF77]"chest"[/color][b])[/b] init //=========================================================================== trigger diseased = CreateTrigger[b]([/b] [b])[/b] TriggerRegisterEnterRectSimple[b]([/b] diseased, GetPlayableMapRect[b]([/b][b])[/b] [b])[/b] TriggerAddCondition[b]([/b] diseased, Condition[b]([/b] function diseaseCond [b])[/b] [b])[/b] TriggerAddAction[b]([/b] diseased, function diseaseAction [b])[/b] trigger diseaseOnce = CreateTrigger[b]([/b][b])[/b] TriggerRegisterTimerEventSingle[b]([/b] diseaseOnce, [color=FFFF77]5[/color] [b])[/b] TriggerAddAction[b]([/b] diseaseOnce, function diseaseLoopAction [b])[/b] package GameInit import ClosureTimers function start [b]([/b][b])[/b] SetPlayerAllianceStateBJ[b]([/b] Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], Player[b]([/b][color=FFFF77]0[/color][b])[/b], bj_ALLIANCE_ALLIED_VISION [b])[/b] SetPlayerAllianceStateBJ[b]([/b] Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], Player[b]([/b][color=FFFF77]1[/color][b])[/b], bj_ALLIANCE_ALLIED_VISION [b])[/b] SetPlayerAllianceStateBJ[b]([/b] Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], Player[b]([/b][color=FFFF77]2[/color][b])[/b], bj_ALLIANCE_ALLIED_VISION [b])[/b] SetPlayerAllianceStateBJ[b]([/b] Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], Player[b]([/b][color=FFFF77]3[/color][b])[/b], bj_ALLIANCE_ALLIED_VISION [b])[/b] SetPlayerAllianceStateBJ[b]([/b] Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], Player[b]([/b][color=FFFF77]4[/color][b])[/b], bj_ALLIANCE_ALLIED_VISION [b])[/b] SetPlayerAllianceStateBJ[b]([/b] Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], Player[b]([/b][color=FFFF77]5[/color][b])[/b], bj_ALLIANCE_ALLIED_VISION [b])[/b] SetPlayerAllianceStateBJ[b]([/b] Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], Player[b]([/b][color=FFFF77]6[/color][b])[/b], bj_ALLIANCE_ALLIED_VISION [b])[/b] SetPlayerAllianceStateBJ[b]([/b] Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], Player[b]([/b][color=FFFF77]7[/color][b])[/b], bj_ALLIANCE_ALLIED_VISION [b])[/b] doAfter[b]([/b][color=FFFF77]2[/color], [b]([/b][b])[/b] -> begin createItem[b]([/b][color=999999][i]'kymn', GetPlayableMapRect().randomPoint())[/i][/color] createItem[b]([/b][color=999999][i]'hbth', GetPlayableMapRect().randomPoint())[/i][/color] createItem[b]([/b][color=999999][i]'wild', GetPlayableMapRect().randomPoint())[/i][/color] createItem[b]([/b][color=999999][i]'wild', GetPlayableMapRect().randomPoint())[/i][/color] createItem[b]([/b][color=999999][i]'wild', GetPlayableMapRect().randomPoint())[/i][/color] end[b])[/b] doAfter[b]([/b][color=FFFF77]5[/color], [b]([/b][b])[/b] -> begin createItem[b]([/b][color=999999][i]'ches', gg_rct_Radio_Spawns.randomPoint())[/i][/color] createItem[b]([/b][color=999999][i]'tsct', gg_rct_Generator_Spawns.randomPoint())[/i][/color] createItem[b]([/b][color=999999][i]'hval', GetPlayableMapRect().randomPoint())[/i][/color] end[b])[/b] doAfter[b]([/b][color=FFFF77]1500[/color], [b]([/b][b])[/b] -> begin for unit enemy from GetUnitsOfPlayerAndTypeId[b]([/b]Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], [color=999999][i]'hrif')[/i][/color] enemy.issuePointOrder[b]([/b][color=77FF77]"attack"[/color], gg_rct_Attack_Move_Hostile_Reinforcements_Arrive.randomPoint[b]([/b][b])[/b][b])[/b] for unit enemy from GetUnitsOfPlayerAndTypeId[b]([/b]Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], [color=999999][i]'hfoo')[/i][/color] enemy.issuePointOrder[b]([/b][color=77FF77]"attack"[/color], gg_rct_Attack_Move_Hostile_Reinforcements_Arrive.randomPoint[b]([/b][b])[/b][b])[/b] for unit enemy from GetUnitsOfPlayerAndTypeId[b]([/b]Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], [color=999999][i]'h019')[/i][/color] enemy.issuePointOrder[b]([/b][color=77FF77]"attack"[/color], gg_rct_Attack_Move_Hostile_Reinforcements_Arrive.randomPoint[b]([/b][b])[/b][b])[/b] end[b])[/b] doAfter[b]([/b][color=FF7777]6.5[/color], [b]([/b][b])[/b] -> begin SetPlayerAllianceStateBJ[b]([/b] Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], Player[b]([/b][color=FFFF77]8[/color][b])[/b], bj_ALLIANCE_UNALLIED [b])[/b] SetPlayerAllianceStateBJ[b]([/b] Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], Player[b]([/b][color=FFFF77]9[/color][b])[/b], bj_ALLIANCE_UNALLIED [b])[/b] SetPlayerAllianceStateBJ[b]([/b] Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], Player[b]([/b][color=FFFF77]10[/color][b])[/b], bj_ALLIANCE_UNALLIED [b])[/b] SetPlayerAllianceStateBJ[b]([/b] Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], Player[b]([/b][color=FFFF77]11[/color][b])[/b], bj_ALLIANCE_UNALLIED [b])[/b] SetPlayerAllianceStateBJ[b]([/b] Player[b]([/b][color=FFFF77]11[/color][b])[/b], Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], bj_ALLIANCE_UNALLIED [b])[/b] SetPlayerAllianceStateBJ[b]([/b] Player[b]([/b][color=FFFF77]10[/color][b])[/b], Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], bj_ALLIANCE_UNALLIED [b])[/b] SetPlayerAllianceStateBJ[b]([/b] Player[b]([/b][color=FFFF77]9[/color][b])[/b], Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], bj_ALLIANCE_UNALLIED [b])[/b] SetPlayerAllianceStateBJ[b]([/b] Player[b]([/b][color=FFFF77]8[/color][b])[/b], Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], bj_ALLIANCE_UNALLIED [b])[/b] SetPlayerAllianceStateBJ[b]([/b] Player[b]([/b][color=FFFF77]0[/color][b])[/b], Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], bj_ALLIANCE_ALLIED_VISION [b])[/b] SetPlayerAllianceStateBJ[b]([/b] Player[b]([/b][color=FFFF77]1[/color][b])[/b], Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], bj_ALLIANCE_ALLIED_VISION [b])[/b] SetPlayerAllianceStateBJ[b]([/b] Player[b]([/b][color=FFFF77]2[/color][b])[/b], Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], bj_ALLIANCE_ALLIED_VISION [b])[/b] SetPlayerAllianceStateBJ[b]([/b] Player[b]([/b][color=FFFF77]3[/color][b])[/b], Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], bj_ALLIANCE_ALLIED_VISION [b])[/b] SetPlayerAllianceStateBJ[b]([/b] Player[b]([/b][color=FFFF77]4[/color][b])[/b], Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], bj_ALLIANCE_ALLIED_VISION [b])[/b] SetPlayerAllianceStateBJ[b]([/b] Player[b]([/b][color=FFFF77]5[/color][b])[/b], Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], bj_ALLIANCE_ALLIED_VISION [b])[/b] SetPlayerAllianceStateBJ[b]([/b] Player[b]([/b][color=FFFF77]6[/color][b])[/b], Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], bj_ALLIANCE_ALLIED_VISION [b])[/b] SetPlayerAllianceStateBJ[b]([/b] Player[b]([/b][color=FFFF77]7[/color][b])[/b], Player[b]([/b]PLAYER_NEUTRAL_AGGRESSIVE[b])[/b], bj_ALLIANCE_ALLIED_VISION [b])[/b] end[b])[/b] doPeriodically[b]([/b][color=FFFF77]19[/color], [b]([/b]CallbackPeriodic cb[b])[/b] -> begin gg_unit_n007_0031.issuePointOrder[b]([/b][color=77FF77]"move"[/color], gg_rct_Upper_Move.randomPoint[b]([/b][b])[/b][b])[/b] gg_unit_n007_0042.issuePointOrder[b]([/b][color=77FF77]"move"[/color], gg_rct_City_farm_move.randomPoint[b]([/b][b])[/b][b])[/b] gg_unit_o000_0035.issuePointOrder[b]([/b][color=77FF77]"move"[/color], gg_rct_Forest_move.randomPoint[b]([/b][b])[/b][b])[/b] gg_unit_o000_0041.issuePointOrder[b]([/b][color=77FF77]"move"[/color], gg_rct_City_farm_move.randomPoint[b]([/b][b])[/b][b])[/b] gg_unit_o000_0037.issuePointOrder[b]([/b][color=77FF77]"move"[/color], gg_rct_Upper_Move.randomPoint[b]([/b][b])[/b][b])[/b] gg_unit_h00H_0028.issuePointOrder[b]([/b][color=77FF77]"move"[/color], gg_rct_Forest_move.randomPoint[b]([/b][b])[/b][b])[/b] gg_unit_h00H_0029.issuePointOrder[b]([/b][color=77FF77]"move"[/color], gg_rct_City_farm_move.randomPoint[b]([/b][b])[/b][b])[/b] end[b])[/b] doPeriodically[b]([/b][color=FFFF77]19[/color], [b]([/b]CallbackPeriodic cb[b])[/b] -> begin createItem[b]([/b][color=999999][i]'gold', GetPlayableMapRect().randomPoint())[/i][/color] createItem[b]([/b][color=999999][i]'gold', GetPlayableMapRect().randomPoint())[/i][/color] createItem[b]([/b][color=999999][i]'lmbr', GetPlayableMapRect().randomPoint())[/i][/color] end[b])[/b] print[b]([/b][color=77FF77]"|cffFF9421[100%] |r- Initializing Zombie Defense"[/color][b])[/b] init print[b]([/b][color=77FF77]"|cffFF9421[0%] |r- Initializing Zombie Defense"[/color][b])[/b] getTimer[b]([/b][b])[/b].start[b]([/b] [color=FF7777]0.010[/color], function start [b])[/b] [/code]
select language
jass
java
delphi
C++
php
GSL
galaxy
> visualBasic
wurst
Text
Markdown
select style
default
> bbcode - default
Jasscraft
jasscraft html
visual
lightweight
lightweightNr
goto line:
Compare with:
text copy window
edit this code
post new code
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 )