zombies.txt 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604
  1. %addList zombies;
  2. %addList survivors;
  3. %addList waiters;
  4. %addList all;
  5. %loadEvent player-hurt;
  6. %loadEvent block-break;
  7. %loadEvent block-place;
  8. %loadEvent block-click;
  9. %loadEvent player-leave;
  10. %setVar phase 0;
  11. %setVars %getQuestleader;;
  12. @lobby
  13. %if %getListSize all; >= $gamesize goto fullhouse;
  14. %setVar p $player-name;
  15. %addListElement all $p;
  16. %addListElement waiters $p;
  17. %speak all §2Zombies §8$p §3hat das Spiel betreten.;
  18. %speak $p §2Zombies §3Du befindest dich nun in der §2Zombies §3Lobby.;
  19. %speak $p §2Zombies §3Wähle deine gewünschte Spawnoption aus, um deine Chancen darauf zu erhöhen.;
  20. %setHealth $p 20;
  21. %setHunger $p 20;
  22. %setSaturation $p 5;
  23. %command clear $p;
  24. %sbreset $p;
  25. %sbadd $p 4 §r;
  26. %sbadd $p 3 §2Zombies;
  27. %sbadd $p 2 §7Map:;
  28. %sbadd $p 1 §3$mapname;
  29. %command title $p times 20 60 0;
  30. %command title $p subtitle {"text":"%getVar mapname;"};
  31. %command title $p title {"text":"Zombies","color":"dark_green"};
  32. %teleportPlayer $p $lobbyloc;
  33. %if %getListSize all; >= $playersneeded && $started != true goto startgame;
  34. %if $started == true goto checklobby;
  35. @stopstart
  36. %setVar started false;
  37. %setVar waitfor %sub $playersneeded %getListSize all;;;
  38. %speak all §2Zombies §cEs wird auf §2$waitfor §cSpieler gewartet.;
  39. @checklobby
  40. %wait;
  41. %if $event == player-join goto lobby;
  42. %if $event == player-hurt || $event == block-break || $event == block-place goto cancellobby;
  43. %if $event == block-click && $block-loc == $zombiesblockloc goto joinzombies;
  44. %if $event == block-click && $block-loc == $survivorsblockloc goto joinsurvivors;
  45. %if $event == player-leave goto leavelobby;
  46. %goto checklobby;
  47. @cancellobby
  48. %setVar cancel true;
  49. %goto checklobby;
  50. @leavelobby
  51. %setVar p $player-name;
  52. %speak all §2Zombies §8$p §3hat das Spiel verlassen.;
  53. %removeListElement all $p;
  54. %removeListElement survivors $p;
  55. %removeListElement zombies $p;
  56. %removeListElement waiters $p;
  57. %setHealth $p 20;
  58. %setHunger $p 20;
  59. %setSaturation $p 5;
  60. %command clear $p;
  61. %teleportPlayer $p $gamesworldloc;
  62. %sbreset $p;
  63. %kick $p;
  64. %if %getListSize all; < $playersneeded goto stopstart;
  65. %goto checklobby;
  66. @fullhouse
  67. %speak $p §2Zombies §3Diese Map ist bereits voll.;
  68. %kick $player-name;
  69. %goto checklobby;
  70. @joinzombies
  71. %if %checkForListElement zombies $player-name; == true goto checklobby;
  72. %speak $player-name §2Zombies §3Du wirst möglicherweise als §6Zombie §3starten.;
  73. %addListElement zombies $player-name;
  74. %removeListElement waiters $player-name;
  75. %removeListElement survivors $player-name;
  76. %goto checklobby;
  77. @joinsurvivors
  78. %if %checkForListElement survivors $player-name; == true goto checklobby;
  79. %speak $player-name §2Zombies §3Du wirst möglicherweise als §6Überlebender §3starten.;
  80. %addListElement survivors $player-name;
  81. %removeListElement waiters $player-name;
  82. %removeListElement zombies $player-name;
  83. %goto checklobby;
  84. @startgame
  85. %if %getListSize all; < $playersneeded goto stopstart;
  86. %setVar started true;
  87. %speak all §2Zombies §3Das Spiel startet in §e30 §3Sekunden.;
  88. %sgoto 100 start20;
  89. %goto playstartsound;
  90. @start20
  91. %if %getListSize all; < $playersneeded goto stopstart;
  92. %speak all §2Zombies §3Das Spiel startet in §e20 §3Sekunden.;
  93. %sgoto 100 start15;
  94. %goto playstartsound;
  95. @start15
  96. %if %getListSize all; < $playersneeded goto stopstart;
  97. %speak all §2Zombies §3Das Spiel startet in §e15 §3Sekunden.;
  98. %sgoto 100 start10;
  99. %goto playstartsound;
  100. @start10
  101. %if %getListSize all; < $playersneeded goto stopstart;
  102. %speak all §2Zombies §3Das Spiel startet in §e10 §3Sekunden.;
  103. %sgoto 100 start5;
  104. %goto playstartsound;
  105. @start5
  106. %if %getListSize all; < $playersneeded goto stopstart;
  107. %speak all §2Zombies §3Das Spiel startet in §e5 §3Sekunden.;
  108. %sgoto 20 start4;
  109. %goto playstartsound;
  110. @start4
  111. %if %getListSize all; < $playersneeded goto stopstart;
  112. %speak all §2Zombies §3Das Spiel startet in §e4 §3Sekunden.;
  113. %sgoto 20 start3;
  114. %goto playstartsound;
  115. @start3
  116. %if %getListSize all; < $playersneeded goto stopstart;
  117. %speak all §2Zombies §3Das Spiel startet in §e3 §3Sekunden.;
  118. %sgoto 20 start2;
  119. %goto playstartsound;
  120. @start2
  121. %if %getListSize all; < $playersneeded goto stopstart;
  122. %speak all §2Zombies §3Das Spiel startet in §e2 §3Sekunden.;
  123. %sgoto 20 start1;
  124. %goto playstartsound;
  125. @start1
  126. %if %getListSize all; < $playersneeded goto stopstart;
  127. %speak all §2Zombies §3Das Spiel startet in §e1 §3Sekunden.;
  128. %sgoto 20 start0;
  129. %goto playstartsound;
  130. @playstartsound
  131. %setVar i 0;
  132. @playstartsoundlabel
  133. %setVar p %getListElementAt all $i;;
  134. %playSoundPlayer $p %getPlayerLoc $p; BLOCK_NOTE_BASS;
  135. %setVar i %add $i 1;;
  136. %if $i < %getListSize all; goto playstartsoundlabel;
  137. %goto checklobby;
  138. @start0
  139. %if %getListSize all; < $playersneeded goto stopstart;
  140. %speak all §2Zombies §3Das Spiel läuft.;
  141. %setVar no-join true;
  142. %setVar phase 1;
  143. %setVar startsurvivors %getListSize survivors;;
  144. %sbadd all 11 §r;
  145. %sbadd all 10 §2Zombies;
  146. %sbadd all 9 §f;
  147. %sbadd all 8 §7Skulls:;
  148. %sbadd all 7 %concat §a0 §7/ §750;;
  149. %sbadd all 6 §a;
  150. %sbadd all 5 §7Villager:;
  151. %sbadd all 4 %concat §a0 §7/ §7%getListSize villagerlocs;;;
  152. %sbadd all 3 §b;
  153. %sbadd all 2 §7Infizierte:;
  154. %sbadd all 1 %concat §a0 §7/ §7%getListSize all;;;
  155. %setVar i 0;
  156. @playstartsoundlabel2
  157. %setVar p %getListElementAt all $i;;
  158. %teleportPlayer $p $survivorsspawnloc;
  159. %equipEntity %getPlayerId $p; head {id:"minecraft:chainmail_helmet",Count:1b,Damage:0s};
  160. %equipEntity %getPlayerId $p; chest {id:"minecraft:iron_chestplate",Count:1b,tag:{ench:[0:{lvl:2s,id:0s}]},Damage:0s};
  161. %equipEntity %getPlayerId $p; legs {id:"minecraft:golden_leggings",Count:1b,Damage:0s};
  162. %equipEntity %getPlayerId $p; feet {id:"minecraft:iron_boots",Count:1b,tag:{ench:[0:{lvl:2s,id:0s}]},Damage:0s};
  163. %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};
  164. %giveItemPlayer $p {id:"minecraft:bow",Count:1b,tag:{ench:[0:{lvl:2s,id:48s},1:{lvl:1s,id:51s}]},Damage:0s};
  165. %giveItemPlayer $p ARROW;
  166. %setVar %concat $p killedplayers; 0;
  167. %setVar %concat $p killedvillagers; 0;
  168. %setVar %concat $p killedzombies; 0;
  169. %setVar %concat $p heads; 0;
  170. %setVar %concat $p startedas; survivor;
  171. %playSoundPlayer $p %getPlayerLoc $p; BLOCK_NOTE_HARP;
  172. %if %hasFly $p; == false goto jumpflyremove;
  173. %command fly $p off;
  174. @jumpflyremove
  175. %if %getPlayerGameMode $p; == SURVIVAL goto jumpgmremove;
  176. %command gamemode survival $p;
  177. @jumpgmremove
  178. %setVar i %add $i 1;;
  179. %if $i < %getListSize all; goto playstartsoundlabel2;
  180. %playSound $survivorsspawnloc BLOCK_NOTE_HARP;
  181. %waitfor 20;
  182. %setVar i 0;
  183. @villagerlabel
  184. %addListElement villagers %spawnmob %getListElementAt villagerlocs $i; {id:"Villager"};;
  185. %setEntityVars %getEntityLoc %getListElementAt villagers $i;; Villager;
  186. %nameEntity $entity-id 10§c❤;
  187. %addEffectToEntity $entity-id slow 1000000 255;
  188. %setVar i %add $i 1;;
  189. %if $i < %getListSize villagerlocs; goto villagerlabel;
  190. @removewaiters
  191. %if %getListSize waiters; == 0 goto startinfection;
  192. %setVar p %getListElementAt waiters 0;;
  193. %addListElement survivors $p;
  194. %removeListElement waiters $p;
  195. %goto removewaiters;
  196. @checkinfection
  197. %wait;
  198. %if $event == player-hurt || $event == block-break || $event == block-place goto cancelinfection;
  199. %if $event == player-leave goto leaveinfection;
  200. %goto checkinfection;
  201. @leaveinfection
  202. %setVar p $player-name;
  203. %removeListElement all $p;
  204. %removeListElement survivors $p;
  205. %removeListElement zombies $p;
  206. %removeListElement waiters $p;
  207. %setHealth $p 20;
  208. %setHunger $p 20;
  209. %setSaturation $p 5;
  210. %command clear $p;
  211. %teleportPlayer $p $gamesworldloc;
  212. %kick $p;
  213. %if %getListSize all; < $playersneeded goto stopstart2;
  214. %goto checkinfection;
  215. @cancelinfection
  216. %setVar cancel true;
  217. %goto checkinfection;
  218. @stopstart2
  219. %speak all §2Zombies §3Es sind zu wenig Spieler anwesend. Das Spiel wird abgebrochen.;
  220. %setVar i 0;
  221. @stopstartlabel
  222. %setVar p %getListElementAt all $i;;
  223. %command clear $p;
  224. %teleportPlayer $p $gamesworldloc;
  225. %setVar i %add $i 1;;
  226. %if $i < %getListSize all; goto stopstartlabel;
  227. %term;
  228. @startinfection
  229. %if %getListSize all; < $playersneeded goto stopstart2;
  230. %speak all §2Zombies §3Die Infektion startet in §e30 §3Sekunden.;
  231. %sgoto 200 startinfection20;
  232. %goto playstartsound3;
  233. @startinfection20
  234. %if %getListSize all; < $playersneeded goto stopstart2;
  235. %speak all §2Zombies §3Die Infektion startet in §e20 §3Sekunden.;
  236. %sgoto 200 startinfection10;
  237. %goto playstartsound3;
  238. @startinfection10
  239. %if %getListSize all; < $playersneeded goto stopstart2;
  240. %speak all §2Zombies §3Die Infektion startet in §e10 §3Sekunden.;
  241. %sgoto 100 startinfection5;
  242. %goto playstartsound3;
  243. @startinfection5
  244. %if %getListSize all; < $playersneeded goto stopstart2;
  245. %speak all §2Zombies §3Die Infektion startet in §e5 §3Sekunden.;
  246. %sgoto 20 startinfection4;
  247. %goto playstartsound3;
  248. @startinfection4
  249. %if %getListSize all; < $playersneeded goto stopstart2;
  250. %speak all §2Zombies §3Die Infektion startet in §e4 §3Sekunden.;
  251. %sgoto 20 startinfection3;
  252. %goto playstartsound3;
  253. @startinfection3
  254. %if %getListSize all; < $playersneeded goto stopstart2;
  255. %speak all §2Zombies §3Die Infektion startet in §e3 §3Sekunden.;
  256. %sgoto 20 startinfection2;
  257. %goto playstartsound3;
  258. @startinfection2
  259. %if %getListSize all; < $playersneeded goto stopstart2;
  260. %speak all §2Zombies §3Die Infektion startet in §e2 §3Sekunden.;
  261. %sgoto 20 startinfection1;
  262. %goto playstartsound3;
  263. @startinfection1
  264. %if %getListSize all; < $playersneeded goto stopstart2;
  265. %speak all §2Zombies §3Die Infektion startet in §e1 §3Sekunden.;
  266. %sgoto 20 startinfection0;
  267. %goto playstartsound3;
  268. @playstartsound3
  269. %setVar i 0;
  270. @playstartsoundlabel3
  271. %setVar p %getListElementAt all $i;;
  272. %playSoundPlayer $p %getPlayerLoc $p; BLOCK_NOTE_BASS;
  273. %setVar i %add $i 1;;
  274. %if $i < %getListSize all; goto playstartsoundlabel3;
  275. %goto checkinfection;
  276. @startinfection0
  277. %if %getListSize all; < $playersneeded goto stopstart2;
  278. %setVar phase 2;
  279. %setVar zombiesize %div %getListSize all; 4;;
  280. %if $zombiesize >= $minzombies goto teamchoose;
  281. %setVar zombiesize $minzombies;
  282. %speak all §2Zombies §e$zombiesize §3Menschen wurden infiziert.;
  283. %sbadd all 1 %concat §a$zombiesize §7/ §7%getListSize all;;;
  284. @teamchoose
  285. %if %getListSize zombies; < $zombiesize goto morezombies;
  286. %if %getListSize zombies; == $zombiesize goto equipzombies;
  287. %if %getListSize zombies; > $zombiesize goto toomanyzombies;
  288. @morezombies
  289. %setVar p %getListElementAt survivors %random 0 %sub %getListSize survivors; 1;;;;
  290. %addListElement zombies $p;
  291. %removeListElement survivors $p;
  292. %goto teamchoose;
  293. @toomanyzombies
  294. %removeListIndex zombies %random 0 %sub %getListSize zombies; 1;;;
  295. %goto teamchoose;
  296. @equipzombies
  297. %setVar i 0;
  298. @equipzombieslabel
  299. %setVar p %getListElementAt zombies $i;;
  300. %setVar %concat $p startedas; zombie;
  301. %command clear $p;
  302. %teleportPlayer $p $zombiesspawnloc;
  303. %equipEntity %getPlayerId $p; head {id:"minecraft:skull",Count:1b,Damage:2s};
  304. %equipEntity %getPlayerId $p; chest {id:"minecraft:leather_chestplate",Count:1b,tag:{display:{color:65535}},Damage:0s};
  305. %equipEntity %getPlayerId $p; legs {id:"minecraft:leather_leggings",Count:1b,tag:{display:{color:255}},Damage:0s};
  306. %equipEntity %getPlayerId $p; feet {id:"minecraft:leather_boots",Count:1b,tag:{display:{color:8421504}},Damage:0s};
  307. %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};
  308. %giveItemPlayer $p BOW;
  309. %giveItemPlayer $p ARROW:0:10;
  310. %addEffectToPlayer $p speed 1000000 5;
  311. %addEffectToPlayer $p poison 1000000 0;
  312. %addEffectToPlayer $p hunger 1000000 0;
  313. %setVar i %add $i 1;;
  314. %if $i < %getListSize zombies; goto equipzombieslabel;
  315. %sgoto 40 loop;
  316. %loadEvent player-drop;
  317. %loadEvent player-pickup;
  318. %loadEvent entity-hurt;
  319. %loadEvent entity-kill;
  320. %loadEvent player-death;
  321. %loadEvent player-respawn;
  322. %setVar starttime %getTime;;
  323. %goto checkgame;
  324. @loop
  325. %setVar i 0;
  326. @loopzombies
  327. %setVar p %getListElementAt zombies $i;;
  328. %equipEntity %getPlayerId $p; head {id:"minecraft:skull",Count:1b,Damage:2s};
  329. %equipEntity %getPlayerId $p; chest {id:"minecraft:leather_chestplate",Count:1b,tag:{display:{color:65535}},Damage:0s};
  330. %equipEntity %getPlayerId $p; legs {id:"minecraft:leather_leggings",Count:1b,tag:{display:{color:255}},Damage:0s};
  331. %equipEntity %getPlayerId $p; feet {id:"minecraft:leather_boots",Count:1b,tag:{display:{color:8421504}},Damage:0s};
  332. %setHunger $p 20;
  333. %setSaturation $p 5;
  334. %setVar i %add $i 1;;
  335. %if $i < %getListSize zombies; goto loopzombies;
  336. %setVar i 0;
  337. @loopsurvivors
  338. %setVar p %getListElementAt survivors $i;;
  339. %if %distance %getPlayerLoc $p; $zombiesspawnloc; < $nerfradius goto nerf;
  340. @back
  341. %equipEntity %getPlayerId $p; head {id:"minecraft:chainmail_helmet",Count:1b,Damage:0s};
  342. %equipEntity %getPlayerId $p; chest {id:"minecraft:iron_chestplate",Count:1b,tag:{ench:[0:{lvl:2s,id:0s}]},Damage:0s};
  343. %equipEntity %getPlayerId $p; legs {id:"minecraft:golden_leggings",Count:1b,Damage:0s};
  344. %equipEntity %getPlayerId $p; feet {id:"minecraft:iron_boots",Count:1b,tag:{ench:[0:{lvl:2s,id:0s}]},Damage:0s};
  345. %setHunger $p 20;
  346. %setSaturation $p 5;
  347. %setVar i %add $i 1;;
  348. %if $i < %getListSize survivors; goto loopsurvivors;
  349. %sgoto 40 loop;
  350. %goto checkgame;
  351. @nerf
  352. %addEffectToPlayer $p weakness 100 1;
  353. %addEffectToPlayer $p slow 100 1;
  354. %goto back;
  355. @checkgame
  356. %wait;
  357. %if $event == player-hurt && $player-damage-cause == POISON goto cancel;
  358. %if $event == player-hurt && %checkForListElement zombies $player-name; == true && %checkForListElement zombies $sec-player-name; == true goto cancelhurt;
  359. %if $event == player-hurt && %checkForListElement survivors $player-name; == true && %checkForListElement survivors $sec-player-name; == true goto cancelhurt;
  360. %if $event == entity-kill && $entity-type == VILLAGER goto villagerdestroyed;
  361. %if $event == player-drop || $event == block-break || $event == block-place goto cancel;
  362. %if $event == player-pickup && %checkForListElement zombies $player-name; == true goto cancel;
  363. %if $event == entity-hurt && $entity-type == VILLAGER && %checkForListElement zombies $player-name; == true goto hurtvillager;
  364. %if $event == entity-hurt && $entity-type == ZOMBIE && %checkForListElement zombies $player-name; == true goto cancel;
  365. %if $event == player-death && $player-killed == true goto death;
  366. %if $event == block-click && %checkForListElement headpoints $block-loc; == true && $player-item-type == SKULL_ITEM goto addhead;
  367. %if $event == player-leave goto leavegame;
  368. %goto checkgame;
  369. @addhead
  370. %removeItemPlayer $player-name $zombiehead;
  371. %setVar skulls %add $skulls 1;;
  372. %setVar %concat $player-name heads; %add %getVar %concat $player-name heads;; 1;;
  373. %if $skulls > 40 goto othercolor1;
  374. %sbadd all 7 %concat §a$skulls §7/ §750;;
  375. %goto checkplayability2;
  376. @othercolor1
  377. %sbadd all 7 %concat §c$skulls §7/ §750;;
  378. %goto checkplayability2;
  379. @checkplayability2
  380. %if $skulls < 50 goto checkgame;
  381. %speak all §2Zombies §3Die §6Überlebenden §3haben gewonnen, da sie ein Gegenmittel brauen konnten.;
  382. %setVar winner survivors;
  383. %goto endgame;
  384. @cancel
  385. %setVar cancel true;
  386. %goto checkgame;
  387. @cancelhurt
  388. %setVar cancel true;
  389. %setVar sec-player-name null;
  390. %goto checkgame;
  391. @hurtvillager
  392. %if %getVar %concat $entity-id lasttime;; != null goto jump4;
  393. %setVar %concat $entity-id lasttime; 0;
  394. @jump4
  395. %if %sub %getTime; %getVar %concat $entity-id lasttime;;; > 500 goto hurtvillager2;
  396. %goto checkgame;
  397. @hurtvillager2
  398. %setVar %concat $entity-id lasttime; %getTime;;
  399. %setVar newlife %sub $entity-health 2;;
  400. %setEntityHealth $entity-id $newlife;
  401. %nameEntity $entity-id %roundComma %div $newlife 2; 0;§c❤;
  402. %goto checkgame;
  403. @villagerdestroyed
  404. %removeEntity $entity-id;
  405. %setVar destroyed %add $destroyed 1;;
  406. %if $destroyed >= %sub %getListSize villagerlocs; 2; goto othercolor2;
  407. %sbadd all 4 %concat §a$destroyed §7/ §7%getListSize villagerlocs;;;
  408. %goto jump2;
  409. @othercolor2
  410. %sbadd all 4 %concat §c$destroyed §7/ §7%getListSize villagerlocs;;;
  411. @jump2
  412. %setVar %concat $player-name killedzombies; %add %getVar %concat $player-name killedzombies;; 1;;
  413. %speak all §2Zombies §cEin Villager wurde von §2$player-name §cinfiziert.;
  414. %speak all §2Zombies §e%sub %getListSize villagerlocs; $destroyed; §cverbleibend.;
  415. %removeListIndex headpoints %getIndexOfListElement villagers $entity-id;;
  416. %removeListElement villagers $entity-id;
  417. %setEntityInvulnerable %spawnmob $entity-loc {id:"Zombie",ZombieType:1}; true;
  418. %setEntityVars $entity-loc Zombie;
  419. %addEffectToEntity $entity-id slow 1000000 255;
  420. %goto checkplayability3;
  421. @checkplayability3
  422. %if $destroyed < %getListSize villagerlocs; goto checkgame;
  423. %speak all §2Zombies §3Die §6Zombies §3haben gewonnen, da alle Villager infiziert wurden.;
  424. %setVar winner zombies;
  425. %goto endgame;
  426. @death
  427. %if %checkForListElement survivors $player-name; == true goto zombiesrespawn;
  428. %dropItem $player-loc $zombiehead;
  429. %if %checkForListElement zombies $player-name; == true goto respawn;
  430. %goto checkgame;
  431. @zombiesrespawn
  432. %setVar infizierte %add $infizierte 1;;
  433. %if $infizierte >= %sub $startsurvivors 3; goto othercolor3;
  434. %sbadd all 1 %concat §a%getListSize zombies; §7/ §7%getListSize all;;;
  435. %goto jump1;
  436. @othercolor3
  437. %sbadd all 1 %concat §c%getListSize zombies; §7/ §7%getListSize all;;;
  438. @jump1
  439. %if $sec-player-name == null goto nosec;
  440. %speak all §2Zombies §e$player-name §3wurde von §2$sec-player-name §3infiziert;
  441. %goto jump3;
  442. @nosec
  443. %speak all §2Zombies §e$player-name §3ist gestorben.;
  444. @jump3
  445. %removeListElement survivors $player-name;
  446. %addListElement zombies $player-name;
  447. %setVar %concat $sec-player-name killedplayers; %add %getVar %concat $sec-player-name killedplayers;; 1;;
  448. @respawn
  449. %setVar p $player-name;
  450. %respawn $p;
  451. %setVar respawn-loc $zombiesspawnloc;
  452. %sgoto 1 equipafterdeath;
  453. %goto checkgame;
  454. @equipafterdeath
  455. %command clear $p;
  456. %equipEntity %getPlayerId $p; head {id:"minecraft:skull",Count:1b,Damage:2s};
  457. %equipEntity %getPlayerId $p; chest {id:"minecraft:leather_chestplate",Count:1b,tag:{display:{color:65535}},Damage:0s};
  458. %equipEntity %getPlayerId $p; legs {id:"minecraft:leather_leggings",Count:1b,tag:{display:{color:255}},Damage:0s};
  459. %equipEntity %getPlayerId $p; feet {id:"minecraft:leather_boots",Count:1b,tag:{display:{color:8421504}},Damage:0s};
  460. %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};
  461. %giveItemPlayer $p BOW;
  462. %giveItemPlayer $p ARROW:0:10;
  463. %addEffectToPlayer $p speed 1000000 5;
  464. %addEffectToPlayer $p poison 1000000 0;
  465. %addEffectToPlayer $p hunger 1000000 0;
  466. %setVar sec-player-name null;
  467. %goto checkplayability4;
  468. @checkplayability4
  469. %if %getListSize survivors; > 0 goto checkgame;
  470. %speak all §2Zombies §3Die §6Zombies §3haben gewonnen, da alle Überlebenden infiziert wurden.;
  471. %setVar winner zombies;
  472. %goto endgame;
  473. @checkplayability
  474. %if %getListSize zombies; == 0 goto survivorswin;
  475. %if %getListSize survivors; == 0 goto zombieswin;
  476. %goto checkgame;
  477. @survivorswin
  478. %speak all §2Zombies §3Die §6Überlebenden §3haben gewonnen, da sich die Zombies zurückgezogen haben.;
  479. %setVar winner survivors;
  480. %goto endgame;
  481. @zombieswin
  482. %speak all §2Zombies §3Die §6Zombies §3haben gewonnen, da die Überlebenden aufgegeben haben.;
  483. %setVar winner zombies;
  484. %goto endgame;
  485. @endgame
  486. %setVar i 0;
  487. @endgamelabel
  488. %setVar p %getListElementAt all $i;;
  489. %teleportPlayer $p $gamesworldloc;
  490. %setHealth $p 20;
  491. %setHunger $p 20;
  492. %setSaturation $p 5;
  493. %command clear $p;
  494. %command effect $p clear;
  495. %sbreset $p;
  496. %speak $p §2Zombies §c-= §2Statistik dieses Spiels §c=-;
  497. %speak $p §2Zombies §3Spieler infiziert: §e%getVar %concat $p killedplayers;;;
  498. %speak $p §2Zombies §3Villager infiziert: §e%getVar %concat $p killedvillagers;;;
  499. %speak $p §2Zombies §3Zombies getötet: §e%getVar %concat $p killedzombies;;;
  500. %speak $p §2Zombies §3Köpfe abgegeben: §e%getVar %concat $p heads;;;
  501. %if %getVar %concat $p startedas;; == zombie && $winner == zombies goto winaszombie;
  502. %if %getVar %concat $p startedas;; == survivor && $winner == survivors goto winassurvivor;
  503. %goto nowin;
  504. @winaszombie
  505. %setVar wintext §eJa, als Zombie.;
  506. %goto speakwin;
  507. @winassurvivor
  508. %setVar wintext §eJa, als Überlebender.;
  509. %goto speakwin;
  510. @nowin
  511. %setVar wintext §eNein.;
  512. %goto speakwin;
  513. @speakwin
  514. %speak $p §2Zombies §3Gewonnen: $wintext;
  515. %setVar i %add $i 1;;
  516. %if $i < %getListSize all; goto endgamelabel;
  517. %removeEntities NPC $middleloc $radius;
  518. %removeEntities Item $middleloc $radius;
  519. %endQuest 10;
  520. @giveup
  521. %if $phase == 0 goto leavelobby;
  522. %if $phase == 1 goto leaveinfection;
  523. %teleportPlayer $player-name $gamesworldloc;
  524. @leavegame
  525. %setVar p $player-name;
  526. %sbreset $p;
  527. %removeListElement zombies $player-name;
  528. %removeListElement survivors $player-name;
  529. %removeListElement all $player-name;
  530. %setHealth $player-name 20;
  531. %setHunger $player-name 20;
  532. %setSaturation $player-name 5;
  533. %command clear $player-name;
  534. %command effect $player-name clear;
  535. %kick $player-name;
  536. %goto checkplayability;