%addList zombies; %addList survivors; %addList waiters; %addList all; %loadEvent player-hurt; %loadEvent block-break; %loadEvent block-place; %loadEvent block-click; %loadEvent player-leave; %setVar phase 0; %setVars %getQuestleader;; @lobby %if %getListSize all; >= $gamesize goto fullhouse; %setVar p $player-name; %addListElement all $p; %addListElement waiters $p; %speak all §2Zombies §8$p §3hat das Spiel betreten.; %speak $p §2Zombies §3Du befindest dich nun in der §2Zombies §3Lobby.; %speak $p §2Zombies §3Wähle deine gewünschte Spawnoption aus, um deine Chancen darauf zu erhöhen.; %setHealth $p 20; %setHunger $p 20; %setSaturation $p 5; %command clear $p; %sbreset $p; %sbadd $p 4 §r; %sbadd $p 3 §2Zombies; %sbadd $p 2 §7Map:; %sbadd $p 1 §3$mapname; %command title $p times 20 60 0; %command title $p subtitle {"text":"%getVar mapname;"}; %command title $p title {"text":"Zombies","color":"dark_green"}; %teleportPlayer $p $lobbyloc; %if %getListSize all; >= $playersneeded && $started != true goto startgame; %if $started == true goto checklobby; @stopstart %setVar started false; %setVar waitfor %sub $playersneeded %getListSize all;;; %speak all §2Zombies §cEs wird auf §2$waitfor §cSpieler gewartet.; @checklobby %wait; %if $event == player-join goto lobby; %if $event == player-hurt || $event == block-break || $event == block-place goto cancellobby; %if $event == block-click && $block-loc == $zombiesblockloc goto joinzombies; %if $event == block-click && $block-loc == $survivorsblockloc goto joinsurvivors; %if $event == player-leave goto leavelobby; %goto checklobby; @cancellobby %setVar cancel true; %goto checklobby; @leavelobby %setVar p $player-name; %speak all §2Zombies §8$p §3hat das Spiel verlassen.; %removeListElement all $p; %removeListElement survivors $p; %removeListElement zombies $p; %removeListElement waiters $p; %setHealth $p 20; %setHunger $p 20; %setSaturation $p 5; %command clear $p; %teleportPlayer $p $gamesworldloc; %sbreset $p; %kick $p; %if %getListSize all; < $playersneeded goto stopstart; %goto checklobby; @fullhouse %speak $p §2Zombies §3Diese Map ist bereits voll.; %kick $player-name; %goto checklobby; @joinzombies %if %checkForListElement zombies $player-name; == true goto checklobby; %speak $player-name §2Zombies §3Du wirst möglicherweise als §6Zombie §3starten.; %addListElement zombies $player-name; %removeListElement waiters $player-name; %removeListElement survivors $player-name; %goto checklobby; @joinsurvivors %if %checkForListElement survivors $player-name; == true goto checklobby; %speak $player-name §2Zombies §3Du wirst möglicherweise als §6Überlebender §3starten.; %addListElement survivors $player-name; %removeListElement waiters $player-name; %removeListElement zombies $player-name; %goto checklobby; @startgame %if %getListSize all; < $playersneeded goto stopstart; %setVar started true; %speak all §2Zombies §3Das Spiel startet in §e30 §3Sekunden.; %sgoto 100 start20; %goto playstartsound; @start20 %if %getListSize all; < $playersneeded goto stopstart; %speak all §2Zombies §3Das Spiel startet in §e20 §3Sekunden.; %sgoto 100 start15; %goto playstartsound; @start15 %if %getListSize all; < $playersneeded goto stopstart; %speak all §2Zombies §3Das Spiel startet in §e15 §3Sekunden.; %sgoto 100 start10; %goto playstartsound; @start10 %if %getListSize all; < $playersneeded goto stopstart; %speak all §2Zombies §3Das Spiel startet in §e10 §3Sekunden.; %sgoto 100 start5; %goto playstartsound; @start5 %if %getListSize all; < $playersneeded goto stopstart; %speak all §2Zombies §3Das Spiel startet in §e5 §3Sekunden.; %sgoto 20 start4; %goto playstartsound; @start4 %if %getListSize all; < $playersneeded goto stopstart; %speak all §2Zombies §3Das Spiel startet in §e4 §3Sekunden.; %sgoto 20 start3; %goto playstartsound; @start3 %if %getListSize all; < $playersneeded goto stopstart; %speak all §2Zombies §3Das Spiel startet in §e3 §3Sekunden.; %sgoto 20 start2; %goto playstartsound; @start2 %if %getListSize all; < $playersneeded goto stopstart; %speak all §2Zombies §3Das Spiel startet in §e2 §3Sekunden.; %sgoto 20 start1; %goto playstartsound; @start1 %if %getListSize all; < $playersneeded goto stopstart; %speak all §2Zombies §3Das Spiel startet in §e1 §3Sekunden.; %sgoto 20 start0; %goto playstartsound; @playstartsound %setVar i 0; @playstartsoundlabel %setVar p %getListElementAt all $i;; %playSoundPlayer $p %getPlayerLoc $p; BLOCK_NOTE_BASS; %setVar i %add $i 1;; %if $i < %getListSize all; goto playstartsoundlabel; %goto checklobby; @start0 %if %getListSize all; < $playersneeded goto stopstart; %speak all §2Zombies §3Das Spiel läuft.; %setVar no-join true; %setVar phase 1; %setVar startsurvivors %getListSize survivors;; %sbadd all 11 §r; %sbadd all 10 §2Zombies; %sbadd all 9 §f; %sbadd all 8 §7Skulls:; %sbadd all 7 %concat §a0 §7/ §750;; %sbadd all 6 §a; %sbadd all 5 §7Villager:; %sbadd all 4 %concat §a0 §7/ §7%getListSize villagerlocs;;; %sbadd all 3 §b; %sbadd all 2 §7Infizierte:; %sbadd all 1 %concat §a0 §7/ §7%getListSize all;;; %setVar i 0; @playstartsoundlabel2 %setVar p %getListElementAt all $i;; %teleportPlayer $p $survivorsspawnloc; %equipEntity %getPlayerId $p; head {id:"minecraft:chainmail_helmet",Count:1b,Damage:0s}; %equipEntity %getPlayerId $p; chest {id:"minecraft:iron_chestplate",Count:1b,tag:{ench:[0:{lvl:2s,id:0s}]},Damage:0s}; %equipEntity %getPlayerId $p; legs {id:"minecraft:golden_leggings",Count:1b,Damage:0s}; %equipEntity %getPlayerId $p; feet {id:"minecraft:iron_boots",Count:1b,tag:{ench:[0:{lvl:2s,id:0s}]},Damage:0s}; %giveItemPlayer $p {id:"minecraft:iron_sword",Count:1b,tag:{ench:[0:{lvl:5s,id:16s},1:{lvl:10s,id:34s}],HideFlags:2,AttributeModifiers:[0:{UUIDMost:1,UUIDLeast:1,Amount:100.0d,Slot:"mainhand",AttributeName:"generic.attackSpeed",Operation:0,Name:"generic.attackSpeed"}]},Damage:0s}; %giveItemPlayer $p {id:"minecraft:bow",Count:1b,tag:{ench:[0:{lvl:2s,id:48s},1:{lvl:1s,id:51s}]},Damage:0s}; %giveItemPlayer $p ARROW; %setVar %concat $p killedplayers; 0; %setVar %concat $p killedvillagers; 0; %setVar %concat $p killedzombies; 0; %setVar %concat $p heads; 0; %setVar %concat $p startedas; survivor; %playSoundPlayer $p %getPlayerLoc $p; BLOCK_NOTE_HARP; %if %hasFly $p; == false goto jumpflyremove; %command fly $p off; @jumpflyremove %if %getPlayerGameMode $p; == SURVIVAL goto jumpgmremove; %command gamemode survival $p; @jumpgmremove %setVar i %add $i 1;; %if $i < %getListSize all; goto playstartsoundlabel2; %playSound $survivorsspawnloc BLOCK_NOTE_HARP; %waitfor 20; %setVar i 0; @villagerlabel %addListElement villagers %spawnmob %getListElementAt villagerlocs $i; {id:"Villager"};; %setEntityVars %getEntityLoc %getListElementAt villagers $i;; Villager; %nameEntity $entity-id 10§c❤; %addEffectToEntity $entity-id slow 1000000 255; %setVar i %add $i 1;; %if $i < %getListSize villagerlocs; goto villagerlabel; @removewaiters %if %getListSize waiters; == 0 goto startinfection; %setVar p %getListElementAt waiters 0;; %addListElement survivors $p; %removeListElement waiters $p; %goto removewaiters; @checkinfection %wait; %if $event == player-hurt || $event == block-break || $event == block-place goto cancelinfection; %if $event == player-leave goto leaveinfection; %goto checkinfection; @leaveinfection %setVar p $player-name; %removeListElement all $p; %removeListElement survivors $p; %removeListElement zombies $p; %removeListElement waiters $p; %setHealth $p 20; %setHunger $p 20; %setSaturation $p 5; %command clear $p; %teleportPlayer $p $gamesworldloc; %kick $p; %if %getListSize all; < $playersneeded goto stopstart2; %goto checkinfection; @cancelinfection %setVar cancel true; %goto checkinfection; @stopstart2 %speak all §2Zombies §3Es sind zu wenig Spieler anwesend. Das Spiel wird abgebrochen.; %setVar i 0; @stopstartlabel %setVar p %getListElementAt all $i;; %command clear $p; %teleportPlayer $p $gamesworldloc; %setVar i %add $i 1;; %if $i < %getListSize all; goto stopstartlabel; %term; @startinfection %if %getListSize all; < $playersneeded goto stopstart2; %speak all §2Zombies §3Die Infektion startet in §e30 §3Sekunden.; %sgoto 200 startinfection20; %goto playstartsound3; @startinfection20 %if %getListSize all; < $playersneeded goto stopstart2; %speak all §2Zombies §3Die Infektion startet in §e20 §3Sekunden.; %sgoto 200 startinfection10; %goto playstartsound3; @startinfection10 %if %getListSize all; < $playersneeded goto stopstart2; %speak all §2Zombies §3Die Infektion startet in §e10 §3Sekunden.; %sgoto 100 startinfection5; %goto playstartsound3; @startinfection5 %if %getListSize all; < $playersneeded goto stopstart2; %speak all §2Zombies §3Die Infektion startet in §e5 §3Sekunden.; %sgoto 20 startinfection4; %goto playstartsound3; @startinfection4 %if %getListSize all; < $playersneeded goto stopstart2; %speak all §2Zombies §3Die Infektion startet in §e4 §3Sekunden.; %sgoto 20 startinfection3; %goto playstartsound3; @startinfection3 %if %getListSize all; < $playersneeded goto stopstart2; %speak all §2Zombies §3Die Infektion startet in §e3 §3Sekunden.; %sgoto 20 startinfection2; %goto playstartsound3; @startinfection2 %if %getListSize all; < $playersneeded goto stopstart2; %speak all §2Zombies §3Die Infektion startet in §e2 §3Sekunden.; %sgoto 20 startinfection1; %goto playstartsound3; @startinfection1 %if %getListSize all; < $playersneeded goto stopstart2; %speak all §2Zombies §3Die Infektion startet in §e1 §3Sekunden.; %sgoto 20 startinfection0; %goto playstartsound3; @playstartsound3 %setVar i 0; @playstartsoundlabel3 %setVar p %getListElementAt all $i;; %playSoundPlayer $p %getPlayerLoc $p; BLOCK_NOTE_BASS; %setVar i %add $i 1;; %if $i < %getListSize all; goto playstartsoundlabel3; %goto checkinfection; @startinfection0 %if %getListSize all; < $playersneeded goto stopstart2; %setVar phase 2; %setVar zombiesize %div %getListSize all; 4;; %if $zombiesize >= $minzombies goto teamchoose; %setVar zombiesize $minzombies; %speak all §2Zombies §e$zombiesize §3Menschen wurden infiziert.; %sbadd all 1 %concat §a$zombiesize §7/ §7%getListSize all;;; @teamchoose %if %getListSize zombies; < $zombiesize goto morezombies; %if %getListSize zombies; == $zombiesize goto equipzombies; %if %getListSize zombies; > $zombiesize goto toomanyzombies; @morezombies %setVar p %getListElementAt survivors %random 0 %sub %getListSize survivors; 1;;;; %addListElement zombies $p; %removeListElement survivors $p; %goto teamchoose; @toomanyzombies %removeListIndex zombies %random 0 %sub %getListSize zombies; 1;;; %goto teamchoose; @equipzombies %setVar i 0; @equipzombieslabel %setVar p %getListElementAt zombies $i;; %setVar %concat $p startedas; zombie; %command clear $p; %teleportPlayer $p $zombiesspawnloc; %equipEntity %getPlayerId $p; head {id:"minecraft:skull",Count:1b,Damage:2s}; %equipEntity %getPlayerId $p; chest {id:"minecraft:leather_chestplate",Count:1b,tag:{display:{color:65535}},Damage:0s}; %equipEntity %getPlayerId $p; legs {id:"minecraft:leather_leggings",Count:1b,tag:{display:{color:255}},Damage:0s}; %equipEntity %getPlayerId $p; feet {id:"minecraft:leather_boots",Count:1b,tag:{display:{color:8421504}},Damage:0s}; %giveItemPlayer $p {id:"minecraft:wooden_sword",Count:1b,tag:{ench:[0:{lvl:4s,id:16s},1:{lvl:10s,id:34s}],HideFlags:2,AttributeModifiers:[0:{UUIDMost:1,UUIDLeast:1,Amount:100.0d,Slot:"mainhand",AttributeName:"generic.attackSpeed",Operation:0,Name:"generic.attackSpeed"}]},Damage:0s}; %giveItemPlayer $p BOW; %giveItemPlayer $p ARROW:0:10; %addEffectToPlayer $p speed 1000000 5; %addEffectToPlayer $p poison 1000000 0; %addEffectToPlayer $p hunger 1000000 0; %setVar i %add $i 1;; %if $i < %getListSize zombies; goto equipzombieslabel; %sgoto 40 loop; %loadEvent player-drop; %loadEvent player-pickup; %loadEvent entity-hurt; %loadEvent entity-kill; %loadEvent player-death; %loadEvent player-respawn; %setVar starttime %getTime;; %goto checkgame; @loop %setVar i 0; @loopzombies %setVar p %getListElementAt zombies $i;; %equipEntity %getPlayerId $p; head {id:"minecraft:skull",Count:1b,Damage:2s}; %equipEntity %getPlayerId $p; chest {id:"minecraft:leather_chestplate",Count:1b,tag:{display:{color:65535}},Damage:0s}; %equipEntity %getPlayerId $p; legs {id:"minecraft:leather_leggings",Count:1b,tag:{display:{color:255}},Damage:0s}; %equipEntity %getPlayerId $p; feet {id:"minecraft:leather_boots",Count:1b,tag:{display:{color:8421504}},Damage:0s}; %setHunger $p 20; %setSaturation $p 5; %setVar i %add $i 1;; %if $i < %getListSize zombies; goto loopzombies; %setVar i 0; @loopsurvivors %setVar p %getListElementAt survivors $i;; %if %distance %getPlayerLoc $p; $zombiesspawnloc; < $nerfradius goto nerf; @back %equipEntity %getPlayerId $p; head {id:"minecraft:chainmail_helmet",Count:1b,Damage:0s}; %equipEntity %getPlayerId $p; chest {id:"minecraft:iron_chestplate",Count:1b,tag:{ench:[0:{lvl:2s,id:0s}]},Damage:0s}; %equipEntity %getPlayerId $p; legs {id:"minecraft:golden_leggings",Count:1b,Damage:0s}; %equipEntity %getPlayerId $p; feet {id:"minecraft:iron_boots",Count:1b,tag:{ench:[0:{lvl:2s,id:0s}]},Damage:0s}; %setHunger $p 20; %setSaturation $p 5; %setVar i %add $i 1;; %if $i < %getListSize survivors; goto loopsurvivors; %sgoto 40 loop; %goto checkgame; @nerf %addEffectToPlayer $p weakness 100 1; %addEffectToPlayer $p slow 100 1; %goto back; @checkgame %wait; %if $event == player-hurt && $player-damage-cause == POISON goto cancel; %if $event == player-hurt && %checkForListElement zombies $player-name; == true && %checkForListElement zombies $sec-player-name; == true goto cancelhurt; %if $event == player-hurt && %checkForListElement survivors $player-name; == true && %checkForListElement survivors $sec-player-name; == true goto cancelhurt; %if $event == entity-kill && $entity-type == VILLAGER goto villagerdestroyed; %if $event == player-drop || $event == block-break || $event == block-place goto cancel; %if $event == player-pickup && %checkForListElement zombies $player-name; == true goto cancel; %if $event == entity-hurt && $entity-type == VILLAGER && %checkForListElement zombies $player-name; == true goto hurtvillager; %if $event == entity-hurt && $entity-type == ZOMBIE && %checkForListElement zombies $player-name; == true goto cancel; %if $event == player-death && $player-killed == true goto death; %if $event == block-click && %checkForListElement headpoints $block-loc; == true && $player-item-type == SKULL_ITEM goto addhead; %if $event == player-leave goto leavegame; %goto checkgame; @addhead %removeItemPlayer $player-name $zombiehead; %setVar skulls %add $skulls 1;; %setVar %concat $player-name heads; %add %getVar %concat $player-name heads;; 1;; %if $skulls > 40 goto othercolor1; %sbadd all 7 %concat §a$skulls §7/ §750;; %goto checkplayability2; @othercolor1 %sbadd all 7 %concat §c$skulls §7/ §750;; %goto checkplayability2; @checkplayability2 %if $skulls < 50 goto checkgame; %speak all §2Zombies §3Die §6Überlebenden §3haben gewonnen, da sie ein Gegenmittel brauen konnten.; %setVar winner survivors; %goto endgame; @cancel %setVar cancel true; %goto checkgame; @cancelhurt %setVar cancel true; %setVar sec-player-name null; %goto checkgame; @hurtvillager %if %getVar %concat $entity-id lasttime;; != null goto jump4; %setVar %concat $entity-id lasttime; 0; @jump4 %if %sub %getTime; %getVar %concat $entity-id lasttime;;; > 500 goto hurtvillager2; %goto checkgame; @hurtvillager2 %setVar %concat $entity-id lasttime; %getTime;; %setVar newlife %sub $entity-health 2;; %setEntityHealth $entity-id $newlife; %nameEntity $entity-id %roundComma %div $newlife 2; 0;§c❤; %goto checkgame; @villagerdestroyed %removeEntity $entity-id; %setVar destroyed %add $destroyed 1;; %if $destroyed >= %sub %getListSize villagerlocs; 2; goto othercolor2; %sbadd all 4 %concat §a$destroyed §7/ §7%getListSize villagerlocs;;; %goto jump2; @othercolor2 %sbadd all 4 %concat §c$destroyed §7/ §7%getListSize villagerlocs;;; @jump2 %setVar %concat $player-name killedzombies; %add %getVar %concat $player-name killedzombies;; 1;; %speak all §2Zombies §cEin Villager wurde von §2$player-name §cinfiziert.; %speak all §2Zombies §e%sub %getListSize villagerlocs; $destroyed; §cverbleibend.; %removeListIndex headpoints %getIndexOfListElement villagers $entity-id;; %removeListElement villagers $entity-id; %setEntityInvulnerable %spawnmob $entity-loc {id:"Zombie",ZombieType:1}; true; %setEntityVars $entity-loc Zombie; %addEffectToEntity $entity-id slow 1000000 255; %goto checkplayability3; @checkplayability3 %if $destroyed < %getListSize villagerlocs; goto checkgame; %speak all §2Zombies §3Die §6Zombies §3haben gewonnen, da alle Villager infiziert wurden.; %setVar winner zombies; %goto endgame; @death %if %checkForListElement survivors $player-name; == true goto zombiesrespawn; %dropItem $player-loc $zombiehead; %if %checkForListElement zombies $player-name; == true goto respawn; %goto checkgame; @zombiesrespawn %setVar infizierte %add $infizierte 1;; %if $infizierte >= %sub $startsurvivors 3; goto othercolor3; %sbadd all 1 %concat §a%getListSize zombies; §7/ §7%getListSize all;;; %goto jump1; @othercolor3 %sbadd all 1 %concat §c%getListSize zombies; §7/ §7%getListSize all;;; @jump1 %if $sec-player-name == null goto nosec; %speak all §2Zombies §e$player-name §3wurde von §2$sec-player-name §3infiziert; %goto jump3; @nosec %speak all §2Zombies §e$player-name §3ist gestorben.; @jump3 %removeListElement survivors $player-name; %addListElement zombies $player-name; %setVar %concat $sec-player-name killedplayers; %add %getVar %concat $sec-player-name killedplayers;; 1;; @respawn %setVar p $player-name; %respawn $p; %setVar respawn-loc $zombiesspawnloc; %sgoto 1 equipafterdeath; %goto checkgame; @equipafterdeath %command clear $p; %equipEntity %getPlayerId $p; head {id:"minecraft:skull",Count:1b,Damage:2s}; %equipEntity %getPlayerId $p; chest {id:"minecraft:leather_chestplate",Count:1b,tag:{display:{color:65535}},Damage:0s}; %equipEntity %getPlayerId $p; legs {id:"minecraft:leather_leggings",Count:1b,tag:{display:{color:255}},Damage:0s}; %equipEntity %getPlayerId $p; feet {id:"minecraft:leather_boots",Count:1b,tag:{display:{color:8421504}},Damage:0s}; %giveItemPlayer $p {id:"minecraft:wooden_sword",Count:1b,tag:{ench:[0:{lvl:4s,id:16s},1:{lvl:10s,id:34s}],HideFlags:2,AttributeModifiers:[0:{UUIDMost:1,UUIDLeast:1,Amount:100.0d,Slot:"mainhand",AttributeName:"generic.attackSpeed",Operation:0,Name:"generic.attackSpeed"}]},Damage:0s}; %giveItemPlayer $p BOW; %giveItemPlayer $p ARROW:0:10; %addEffectToPlayer $p speed 1000000 5; %addEffectToPlayer $p poison 1000000 0; %addEffectToPlayer $p hunger 1000000 0; %setVar sec-player-name null; %goto checkplayability4; @checkplayability4 %if %getListSize survivors; > 0 goto checkgame; %speak all §2Zombies §3Die §6Zombies §3haben gewonnen, da alle Überlebenden infiziert wurden.; %setVar winner zombies; %goto endgame; @checkplayability %if %getListSize zombies; == 0 goto survivorswin; %if %getListSize survivors; == 0 goto zombieswin; %goto checkgame; @survivorswin %speak all §2Zombies §3Die §6Überlebenden §3haben gewonnen, da sich die Zombies zurückgezogen haben.; %setVar winner survivors; %goto endgame; @zombieswin %speak all §2Zombies §3Die §6Zombies §3haben gewonnen, da die Überlebenden aufgegeben haben.; %setVar winner zombies; %goto endgame; @endgame %setVar i 0; @endgamelabel %setVar p %getListElementAt all $i;; %teleportPlayer $p $gamesworldloc; %setHealth $p 20; %setHunger $p 20; %setSaturation $p 5; %command clear $p; %command effect $p clear; %sbreset $p; %speak $p §2Zombies §c-= §2Statistik dieses Spiels §c=-; %speak $p §2Zombies §3Spieler infiziert: §e%getVar %concat $p killedplayers;;; %speak $p §2Zombies §3Villager infiziert: §e%getVar %concat $p killedvillagers;;; %speak $p §2Zombies §3Zombies getötet: §e%getVar %concat $p killedzombies;;; %speak $p §2Zombies §3Köpfe abgegeben: §e%getVar %concat $p heads;;; %if %getVar %concat $p startedas;; == zombie && $winner == zombies goto winaszombie; %if %getVar %concat $p startedas;; == survivor && $winner == survivors goto winassurvivor; %goto nowin; @winaszombie %setVar wintext §eJa, als Zombie.; %goto speakwin; @winassurvivor %setVar wintext §eJa, als Überlebender.; %goto speakwin; @nowin %setVar wintext §eNein.; %goto speakwin; @speakwin %speak $p §2Zombies §3Gewonnen: $wintext; %setVar i %add $i 1;; %if $i < %getListSize all; goto endgamelabel; %removeEntities NPC $middleloc $radius; %removeEntities Item $middleloc $radius; %endQuest 10; @giveup %if $phase == 0 goto leavelobby; %if $phase == 1 goto leaveinfection; %teleportPlayer $player-name $gamesworldloc; @leavegame %setVar p $player-name; %sbreset $p; %removeListElement zombies $player-name; %removeListElement survivors $player-name; %removeListElement all $player-name; %setHealth $player-name 20; %setHunger $player-name 20; %setSaturation $player-name 5; %command clear $player-name; %command effect $player-name clear; %kick $player-name; %goto checkplayability;