skywars.txt 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532
  1. %addList teamcolors;
  2. %addListElement teamcolors §4;
  3. %addListElement teamcolors §c;
  4. %addListElement teamcolors §6;
  5. %addListElement teamcolors §e;
  6. %addListElement teamcolors §2;
  7. %addListElement teamcolors §a;
  8. %addListElement teamcolors §b;
  9. %addListElement teamcolors §3;
  10. %addListElement teamcolors §1;
  11. %addListElement teamcolors §9;
  12. %addListElement teamcolors §d;
  13. %addListElement teamcolors §5;
  14. %addListElement teamcolors §f;
  15. %addListElement teamcolors §7;
  16. %addListElement teamcolors §8;
  17. %addListElement teamcolors §0;
  18. %addList teamcolortext;
  19. %addListElement teamcolortext §4dunkelrote;
  20. %addListElement teamcolortext §crote;
  21. %addListElement teamcolortext §6orange;
  22. %addListElement teamcolortext §egelbe;
  23. %addListElement teamcolortext §2dunkelgrüne;
  24. %addListElement teamcolortext §agrüne;
  25. %addListElement teamcolortext §btürkise;
  26. %addListElement teamcolortext §3dunkeltürkise;
  27. %addListElement teamcolortext §1dunkelblaue;
  28. %addListElement teamcolortext §9blaue;
  29. %addListElement teamcolortext §dpinke;
  30. %addListElement teamcolortext §5violette;
  31. %addListElement teamcolortext §fweiße;
  32. %addListElement teamcolortext §7graue;
  33. %addListElement teamcolortext §8dunkelgraue;
  34. %addListElement teamcolortext §0schwarze;
  35. %addList teamcolortext2;
  36. %addListElement teamcolortext2 §4Dunkelrot;
  37. %addListElement teamcolortext2 §cRot;
  38. %addListElement teamcolortext2 §6Orange;
  39. %addListElement teamcolortext2 §eGelb;
  40. %addListElement teamcolortext2 §2Dunkelgrün;
  41. %addListElement teamcolortext2 §aGrün;
  42. %addListElement teamcolortext2 §bTürkis;
  43. %addListElement teamcolortext2 §3Dunkeltürkis;
  44. %addListElement teamcolortext2 §1Dunkelblau;
  45. %addListElement teamcolortext2 §9Blau;
  46. %addListElement teamcolortext2 §dPink;
  47. %addListElement teamcolortext2 §5Violett;
  48. %addListElement teamcolortext2 §fWeiß;
  49. %addListElement teamcolortext2 §7Grau;
  50. %addListElement teamcolortext2 §8Dunkelgrau;
  51. %addListElement teamcolortext2 §0Schwarz;
  52. %addList teamnames;
  53. %addListElement teamnames darkredteam;
  54. %addListElement teamnames redteam;
  55. %addListElement teamnames orangeteam;
  56. %addListElement teamnames yellowteam;
  57. %addListElement teamnames darkgreenteam;
  58. %addListElement teamnames greenteam;
  59. %addListElement teamnames aquateam;
  60. %addListElement teamnames darkaquateam;
  61. %addListElement teamnames darkblueteam;
  62. %addListElement teamnames blueteam;
  63. %addListElement teamnames purpleteam;
  64. %addListElement teamnames darkpurpleteam;
  65. %addListElement teamnames whiteteam;
  66. %addListElement teamnames greyteam;
  67. %addListElement teamnames darkgreyteam;
  68. %addListElement teamnames blackteam;
  69. %loadEvent player-hurt;
  70. %loadEvent block-break;
  71. %loadEvent block-place;
  72. %loadEvent block-click;
  73. %loadEvent air-click;
  74. %loadEvent inv-click;
  75. %loadEvent player-leave;
  76. %addList spectators;
  77. %addList allteams;
  78. %setVar i 0;
  79. @createteams
  80. %addList %getListElementAt teamnames $i;;
  81. %addListElement allteams %getListElementAt teamnames $i;;
  82. %setVar %concat %getListElementAt teamnames $i; kills; 0;
  83. %if %inc i; < $teams then goto createteams;
  84. %addList waiters;
  85. %addList all;
  86. %addMap players;
  87. %setVars %getQuestLeader;;
  88. @lobby
  89. %if %getListSize all; >= $gamesize goto fullhouse;
  90. %setVar p $player-name;
  91. %speak $p §eSkyWars §eDu befindest dich nun in der §bSkyWars §eLobby.;
  92. %speak all §eSkyWars §8$p §3hat das Spiel betreten.;
  93. %addGlobalMapElement swstartkit %getPlayerUUID $p; true;
  94. %setHealth $p 20;
  95. %setHunger $p 20;
  96. %setSaturation $p 5;
  97. %command clear $p;
  98. %command title $p times 20 60 0;
  99. %command title $p subtitle {"text":"%getVar mapname;"};
  100. %command title $p title {"text":"SkyWars","color":"yellow"};
  101. %sbreset $p;
  102. %sbadd $p 5 §r;
  103. %sbadd $p 4 §eSkyWars;
  104. %sbadd $p 3 $mapname;
  105. %sbadd $p 2 $7$playersperteam;
  106. %sbadd $p 1 §6Coins: §r%ggV $p swcoins;;
  107. %teleportPlayer $p $lobbyloc;
  108. %addListElement all $p;
  109. %addListElement waiters $p;
  110. %addMapElement players $p waiters;
  111. %if %getListSize all; >= $playersneeded && $started != true then goto startgame;
  112. %if $started == true then goto checklobby;
  113. @waiting
  114. %setVar started false;
  115. %setVar waitfor %sub $playersneeded %getListSize all;;;
  116. %speak all §eSkyWars §3Es wird auf §e$waitfor §3Spieler gewartet.;
  117. @checklobby
  118. %wait;
  119. %if $event == player-join then goto lobby;
  120. %if $event == player-hurt || $event == block-break || $event == block-place then goto cancel;
  121. %if $event == air-click || $event == block-click && $player-item-type == CHEST then goto showkits;
  122. %if $event == block-click then goto blockclickevent;
  123. %if $event == player-leave then goto leavelobby;
  124. %if $event == inv-click && $inv-name == §8Kits && $inv-slot == 0 then goto cancel;
  125. %if $event == inv-click && $inv-name == §8Kits && $inv-type == CHEST then goto maybuykit;
  126. %if $inv-slot == 1 || $inv-slot == 8 && $event == inv-click then closeMenu $player-name;
  127. %if $event == inv-click && $inv-slot == 0 then goto buykit;
  128. %if $event == inv-click then goto cancel;
  129. %goto checklobby;
  130. @cancel
  131. %setVar cancel true;
  132. %goto checklobby;
  133. @blockclickevent
  134. %if %checkForListElement teamblocks $block-loc; == true then goto jointeam;
  135. %goto checklobby;
  136. @buykit
  137. %setVar mapname %getVar %concat $player-name buykit;;;
  138. %getGlobalMap $mapname $mapname;
  139. %setVar cancel true;
  140. %if %checkForMapKey $mapname $player-name; == true then goto checklobby;
  141. %setVar price %getMapValueAt kits %getIndexOfListElement kitnames %getVar %concat $player-name buykit;;;;;
  142. %if %ggV $player-name swcoins; < $price then goto checklobby;
  143. %addGlobalMapElement $mapname %getPlayerUUID $player-name; true;
  144. %sgV $player-name swcoins %sub %ggV $player-name swcoins; $price;;
  145. %speak $player-name §eSkyWars §3Du hast dir das Kit %getVar %concat $player-name buykit;; §3gekauft.;
  146. %goto showkits;
  147. @showkits
  148. %setVar i 1;
  149. @getmaplabel
  150. %setVar mapname %getListElementAt kitnames $i;;
  151. %getGlobalMap $mapname $mapname;
  152. %if %checkForMapKey $mapname $player-name; == true then setMenuItem 0 $i %getListElementAt boughtkits %sub $i 1;;;;
  153. %if %inc i; < %getListSize kitnames; then goto getmaplabel;
  154. %openmenu 0 $player-name;
  155. %goto checklobby;
  156. @maybuykit
  157. %setVar cancel true;
  158. %setVar mapname $item-name;
  159. %getGlobalMap $mapname $mapname;
  160. %if %checkForMapKey $mapname $player-name; == true then goto choosekit;
  161. %setVar %concat $player-name buykit; $item-name;
  162. %loadmenu 1 1 '$item-name §fKaufen? §6Preis: §f%getMapValueAt kits %getIndexOfListElement kitnames $item-name ';;;
  163. %setMenuItem 1 0 {id:"minecraft:wool",Count:1b,tag:{display:{Name:"§aJa"}},Damage:13s};
  164. %setMenuItem 1 1 {id:"minecraft:wool",Count:1b,tag:{display:{Name:"§cNein"}},Damage:14s};
  165. %setMenuItem 1 8 {id:"minecraft:wooden_door",Count:1b,tag:{display:{Name:"§fAbbrechen"}},Damage:0s};
  166. %openMenu 1 $player-name;
  167. %goto checklobby;
  168. @choosekit
  169. %speak $player-name §eSkyWars §3Du hast das Kit $item-name $eausgewählt.;
  170. %sgV $p lastkit $item-name;
  171. %goto checklobby;
  172. @leavelobby
  173. %setVar p $player-name;
  174. %speak all §eSkyWars §8$p §3hat das Spiel verlassen.;
  175. %removeListElement all $p;
  176. %removeListElement waiters $p;
  177. %removeListElement %getMapValue players $p; $p;
  178. %removeMapElement players $p;
  179. %setHealth $p 20;
  180. %setHunger $p 20;
  181. %setSaturation $p 5;
  182. %command clear $p;
  183. %sbreset $p;
  184. %teleportPlayer $p $gamesworldloc;
  185. %kick $p;
  186. %if %getListSize all; < $playersneeded then goto waiting;
  187. %goto checklobby;
  188. @jointeam
  189. %setVar p $player-name;
  190. %if %checkForListElement %getMapValue players $p; $p; == true then goto alreadyteam;
  191. %if %getListSize %getMapValue players $p;; >= $teamsize then goto fullteam;
  192. %setVar index %getIndexOfListElement teamblocks $block-loc;;
  193. %removeListElement %getMapValue players $p; $p;
  194. %setVar newteam %getListElementAt teamnames $index;;
  195. %addListElement $newteam $p;
  196. %addMapElement players $newteam;
  197. %speak $p §eSkyWars §3Du bist nun im %getListElementAt teamcolortext $index;n Team.;
  198. %goto checklobby;
  199. @alreadyteam
  200. %speak $p §eSkyWars §3Du bist bereits in diesem Team.;
  201. %goto checklobby;
  202. @fullteam
  203. %speak $p §eSkyWars §3Dieses Team ist voll.;
  204. %goto checklobby;
  205. @fullhouse
  206. %speak $player-name §eSkyWars §3Diese Map ist bereits voll.;
  207. %kick $player-name;
  208. %goto checklobby;
  209. @startgame
  210. %if %getListSize all; < $playersneeded then goto waiting;
  211. %setVar started true;
  212. %speak all §eSkyWars §3Das Spiel startet in §e20 §3Sekunden.;
  213. %sgoto 100 start15;
  214. %goto playstartsound;
  215. @start15
  216. %if %getListSize all; < $playersneeded then goto waiting;
  217. %speak all §eSkyWars §3Das Spiel startet in §e15 §3Sekunden.;
  218. %sgoto 100 start10;
  219. %goto playstartsound;
  220. @start10
  221. %if %getListSize all; < $playersneeded then goto waiting;
  222. %speak all §eSkyWars §3Das Spiel startet in §e10 §3Sekunden.;
  223. %sgoto 100 start5;
  224. %goto playstartsound;
  225. @start5
  226. %if %getListSize all; < $playersneeded then goto waiting;
  227. %speak all §eSkyWars §3Das Spiel startet in §e5 §3Sekunden.;
  228. %sgoto 20 start4;
  229. %goto playstartsound;
  230. @start4
  231. %if %getListSize all; < $playersneeded then goto waiting;
  232. %speak all §eSkyWars §3Das Spiel startet in §e4 §3Sekunden.;
  233. %sgoto 20 start3;
  234. %goto playstartsound;
  235. @start3
  236. %if %getListSize all; < $playersneeded then goto waiting;
  237. %speak all §eSkyWars §3Das Spiel startet in §e3 §3Sekunden.;
  238. %sgoto 20 start2;
  239. %goto playstartsound;
  240. @start2
  241. %if %getListSize all; < $playersneeded then goto waiting;
  242. %speak all §eSkyWars §3Das Spiel startet in §e2 §3Sekunden.;
  243. %sgoto 20 start1;
  244. %goto playstartsound;
  245. @start1
  246. %if %getListSize all; < $playersneeded then goto waiting;
  247. %speak all §eSkyWars §3Das Spiel startet in §e1 §3Sekunde.;
  248. %sgoto 20 start0;
  249. %goto playstartsound;
  250. @playstartsound
  251. %setVar i 0;
  252. @playstartsoundlabel
  253. %setVar p %getListElementAt all $i;;
  254. %playSoundPlayer $p %getPlayerLoc $p; BLOCK_NOTE_BASS;
  255. %if %inc i; < %getListSize all; then goto playstartsoundlabel;
  256. %goto checklobby;
  257. @start0
  258. %if %getListSize all; < $playersneeded then goto waiting;
  259. %speak all §eSkyWars §3Das Spiel beginnt.;
  260. %setVar no-join true;
  261. %setVar phase 1;
  262. %setVar i 0;
  263. @playstartsoundlabel2
  264. %setVar p %getListElementAt all $i;;
  265. %setVar index %getIndexOfListElement teamnames %getMapValue players $p;;;
  266. %teleportPlayer $p %getListElementAt spawnlocs $index;;
  267. %playSound %getListElementAt spawnlocs $index; BLOCK_NOTE_HARP;
  268. %if %gGV $p swcoins; == null then sGV $p swcoins 0;
  269. %if %gGV $p lastkit; == null then sGV $p lastkit §cStarterkit;
  270. %setVar %concat $p kills; 0;
  271. %if %gGV $p swplayedgames; == null then sGV $p swplayedgames 0;
  272. %if %gGV $p swwongames; == null then sGV $p swwongames 0;
  273. %if %gGV $p swkills; != null then sGV $p swkills 0;
  274. %sGV $p swplayedgames %add %gGV $p swplayedgames; 1;;
  275. %playSoundPlayer $p %getPlayerLoc $p; BLOCK_NOTE_HARP;
  276. %if %hasFly $p; == true then command fly $p off;
  277. %if %getPlayerGameMode $p; == CREATIVE then command gamemode survival $p;
  278. %if %inc i; < %getListSize all; then goto playstartsoundlabel2;
  279. %sbreset all;
  280. %sbadd all 6 §r;
  281. %sbadd all 5 §eSkyWars;
  282. %sbadd all 4 §7Teams verbleibend: §r%getListSize allteams;;
  283. %sbadd all 3 §7Spieler verbleibend: §r%getListSize all;;
  284. %sbadd all 2 §7Deine Kills: §r0;
  285. %sbadd all 1 §7Team Kills: §r0;
  286. %unloadEvent air-click;
  287. %unloadEvent inv-click;
  288. %unloadEvent player-hurt;
  289. %loadEvent player-death;
  290. %loadEvent player-respawn;
  291. %setVar i 0;
  292. @removezeroteams
  293. %setVar teamsize %getListSize %getListElementAt teamnames $i;;;
  294. %if $teamsize == 0 then removeListElement allteams %getListElementAt teamnames $i;;
  295. %if %inc i; < $teams then goto removezeroteams;
  296. %setVar i 0;
  297. @resetchests
  298. %setVar chest %getListElementAt chestlocs $i;;
  299. %setBlock $chest %concat CHEST: %blockData $chest;;;
  300. %if %inc i; < %getListSize chestlocs; then goto resetchests;
  301. #kisten befüllen
  302. %setVar i 0;
  303. @equipplayer
  304. %setVar p %getListElementAt all $i;;
  305. %setVar itemlistname %concat %getListElementAt kits %getIndexOfListElement kitnames %ggV $p lastkit;;; items;;
  306. %setVar equiplistname %concat %getListElementAt kits %getIndexOfListElement kitnames %ggV $p lastkit;;; equip;;
  307. %if %getListSize $itemlistname; == 0 then goto overridegiveitems;
  308. %setVar itemindex 0;
  309. @giveplayeritems
  310. %giveItemPlayer $p %getListElementAt itemlistname $itemindex;;
  311. %if %inc itemindex; < %getListSize itemlistname; then goto giveplayeritems;
  312. @overridegiveitems
  313. %if %getListSize $equiplistname; == 0 then goto overridegiveequip;
  314. %equipEntity %getPlayerID $p; head %getListElementAt equiplistname $equipindex;;
  315. %equipEntity %getPlayerID $p; chest %getListElementAt equiplistname $equipindex;;
  316. %equipEntity %getPlayerID $p; legs %getListElementAt equiplistname $equipindex;;
  317. %equipEntity %getPlayerID $p; feet %getListElementAt equiplistname $equipindex;;
  318. @overridegiveequip
  319. %if %inc i; < %getListSize all; then goto equipplayer;
  320. @startloop
  321. %sgoto 100 loop;
  322. @checkgame
  323. %wait;
  324. %if $event == player-death && $player-killed == true then goto death;
  325. %if $event == player-respawn then goto respawn;
  326. %if $event == block-break || $event == block-place goto blockaction;
  327. %if $event == player-leave then goto leavegame;
  328. %if $event == block-click && %checkForListElement spectators $player-name; == true then setVar cancel true;
  329. %goto checkgame;
  330. @loop
  331. %if %getListSize spectators; == 0 then goto startloop;
  332. %setVar i 0;
  333. @spectatorslabel
  334. %setVar p %getListElementAt spectators $i;;
  335. %if %distance %getPlayerLoc $p; $middleloc; > $radius then teleportPlayer $p $middleloc;
  336. %if %inc i; < %getListSize spectators; then goto spectatorslabel;
  337. %goto startloop;
  338. @blockaction
  339. %setVar cancel true;
  340. %if $event == block-place && $block-type-before == STATIONARY_WATER then goto checkgame;
  341. %if $event == block-place && $block-type-before == LONG_GRASS then goto checkgame;
  342. %if $event == block-break && %checkForListElement placedblocks $block-loc; == false then goto checkgame;
  343. %setVar cancel false;
  344. %addListElement placedblocks $block-loc;
  345. %goto checkgame;
  346. @respawn
  347. %command gamemode 3 $player-name;
  348. %teleportPlayer $player-name $middleloc;
  349. %if %checkForListElement spectators $player-name; != true then addListElement spectators $player-name;
  350. %goto checkgame;
  351. @death
  352. %setVar color %getListElementAt teamcolors %getIndexOfListElement teamnames %getMapValue players $player-name;;;;
  353. %if $sec-player-name != null then goto deathbyplayer;
  354. %speak all §eSkyWars %concat $color $player-name; §bist gestorben.;
  355. %goto deathcore;
  356. @deathbyplayer
  357. %setVar oppcolor %getListElementAt teamcolors %getIndexOfListElement teamnames %getMapValue players $sec-player-name;;;;
  358. %speak all §eSkyWars %concat $color $player-name; §bist durch %concat $oppcolor $sec-player-name; §bgestorben.;
  359. %setVar %concat $sec-player-name kills; %add %getVar %concat $sec-player-name kills;; 1;;
  360. %sGV $sec-player-name swkills %add %gGV $sec-player-name swkills; 1;;
  361. %sGV $sec-player-name swcoins %add %gGV $sec-player-name swcoins; 100;;
  362. %speak $sec-player-name §eSkyWars §r+100 §6Coins;
  363. %sbadd $p 2 §7Deine Kills: §r%getVar %concat $sec-player-name kills;;;
  364. %setVar i 0;
  365. %setVar teamname %getMapValue players $p;;
  366. %setVar %concat $teamname kills; %add %getVar %concat $teamname kills;; 1;;
  367. @teamslabel
  368. %setVar teamplayer %getListElementAt $teamname $i;;
  369. %sbadd $p 1 §7Team Kills: §r%getVar %concat $teamname kills;;;
  370. %if %inc i; < %getListSize $teamname; then goto teamslabel;
  371. %goto deathcore;
  372. @deathcore
  373. %setVar sec-player-name null;
  374. %setVar p $player-name;
  375. %removeListElement all $p;
  376. %setVar teamname %getMapValue players $p;;
  377. %removeListElement $teamname $p;
  378. %removeMapElement players $p;
  379. %setHealth $p 20;
  380. %setHunger $p 20;
  381. %setSaturation $p 5;
  382. %command clear $p;
  383. %setVar teamsize %getListSize $teamname;;
  384. %if $teamsize == 0 then removeListElement allteams $teamname;
  385. %sbadd all 4 §7Teams verbleibend: §r%getListSize allteams;;
  386. %sbadd all 3 §7Spieler verbleibend: §r%getListSize all;;
  387. %if %getListSize allteams; == 0 then goto win;
  388. %goto checkgame;
  389. @giveup
  390. %if $phase == 0 then goto leavelobby;
  391. %teleportPlayer $player-name $gamesworldloc;
  392. @leavegame
  393. %setVar p $player-name;
  394. %speak all §eSkyWars §8$p §3hat das Spiel verlassen.;
  395. %removeListElement all $p;
  396. %setVar teamname %getMapValue players $p;;
  397. %removeListElement $teamname $p;
  398. %removeMapElement players $p;
  399. %setHealth $p 20;
  400. %setHunger $p 20;
  401. %setSaturation $p 5;
  402. %command clear $p;
  403. %sbreset $p;
  404. %kick $p;
  405. %setVar teamsize %getListSize $teamname;;
  406. %if $teamsize == 0 then removeListElement allteams $teamname;
  407. %if %getListSize allteams; == 0 then goto win;
  408. %sbadd all 4 §7Teams verbleibend: §r%getListSize allteams;;
  409. %sbadd all 3 §7Spieler verbleibend: §r%getListSize all;;
  410. %goto checkgame;
  411. @win
  412. %setVar winnerteam %getListElementAt allteams 0;;
  413. %setVar winner %getListElementAt teamcolortext2 %getIndexOfListElement teamnames $winnerteam;;;
  414. %goto wincore;
  415. @wincore
  416. %setVar endtime %getTime;;
  417. %speak all §eSkyWars §bTeam $winner §bhat gewonnen!;
  418. %if %getListSize spectators; == 0 then goto overridespectators;
  419. %setVar i 0;
  420. @convertspectators
  421. %addListElement all %getListElementAt spectators $i;;
  422. %teleportPlayer %getListElementAt spectators $i; $gamesworldloc;
  423. %command gamemode SURVIVAL %getListElementAt spectators $i;;
  424. %if %inc i; < %getListSize spectators; then goto convertspectators;
  425. @overridespectators
  426. %removeList spectators;
  427. %setVar i 0;
  428. @winnerteam
  429. %setVar p %getListElementAt $winnerteam $i;;
  430. %sGV $p swwongames %add %gGV $p swwongames; 1;;
  431. %sGV $p swcoins %add %gGV $p swcoins; 500;;
  432. %speak $p §eSkyWars §r+500 §6Coins;
  433. %addGlobalMapElement swranks %getPlayerUUID $p; %ggV $p swwongames;;
  434. %if %inc i; < %getListSize $winnerteam; then goto winnerteam;
  435. %getGlobalMap swranks swranks;
  436. %sortMap swranks;
  437. %inverseMap swranks;
  438. %setVar i 0;
  439. @tpout
  440. %setVar p %getListElementAt all $i;;
  441. %sbreset $p;
  442. %teleportPlayer $p $gamesworldloc;
  443. %setHealth $p 20;
  444. %setHunger $p 20;
  445. %setSaturation $p 5;
  446. %command clear $p;
  447. %speak $p §eSkyWars §7-= §bStatistik dieses Spiels §7=-;
  448. %setVar time %div %sub $endtime $starttime; 1000;;
  449. %speak $p §eSkyWars §bZeit§8: §r%round %div $time 60;; Minuten %round %mod $time 60;; Sekunden;
  450. %speak $p §eSkyWars §bDeine Kills§8: §r%getVar %concat $p kills;;;
  451. %speak $p §eSkyWars §bDeine Kills gesamt§8: §r%gGV $p swkills;;
  452. %speak $p §eSkyWars §bGespielte Spiele§8: §r%gGV $p swplayedgames;;
  453. %speak $p §eSkyWars §bGewonnene Spiele§8: §r%gGV $p swwongames;;
  454. %speak $p §eSkyWars §bSiegwahrscheinlichkeit§8: §r%roundComma %mul %div %gGV $p swwongames; %gGV $p swplayedgames;; 100; 2;%percent;;
  455. %speak $p §eSkyWars §bDein Rang§8: §r%add %getIndexOfMapKey swranks %getPlayerUUID $p;; 1;;
  456. %if %inc i; < %getListSize all; then goto tpout;
  457. %if %getListSize placedblocks; == 0 then goto end;
  458. %setVar i 0;
  459. %setVar counter 0;
  460. @resetblocks
  461. %setBlock %getListElementAt placedblocks $i; AIR;
  462. %setVar counter %add $counter 1;;
  463. %if $counter == 400 then gosub waitforeins;
  464. %if %inc i; < %getListSize placedblocks; then goto resetblocks;
  465. @end
  466. %waitfor 40;
  467. %removeEntities Item $middleloc $radius;
  468. %removeEntities Arrow $middleloc $radius;
  469. %term;
  470. @waitforeins
  471. %waitfor 1;
  472. %setVar counter 0;
  473. %return;