1vs1.txt 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. %loadEvent player-death;
  2. %loadEvent player-respawn;
  3. %setVar add-same true;
  4. %setVars %getQuestLeader;;
  5. %addList all;
  6. %setBlock %modLoc $spawnloc1 1 1 0; BARRIER;
  7. %setBlock %modLoc $spawnloc1 -1 1 0; BARRIER;
  8. %setBlock %modLoc $spawnloc1 0 1 1; BARRIER;
  9. %setBlock %modLoc $spawnloc1 0 1 -1; BARRIER;
  10. %setBlock %modLoc $spawnloc1 0 3 0; BARRIER;
  11. %setBlock %modLoc $spawnloc2 1 1 0; BARRIER;
  12. %setBlock %modLoc $spawnloc2 -1 1 0; BARRIER;
  13. %setBlock %modLoc $spawnloc2 0 1 1; BARRIER;
  14. %setBlock %modLoc $spawnloc2 0 1 -1; BARRIER;
  15. %setBlock %modLoc $spawnloc2 0 3 0; BARRIER;
  16. @join
  17. %if %getGlobalVar $player-name playedgames; != null goto jump3;
  18. %setGlobalVar $player-name allwins 0;
  19. %setGlobalVar $player-name roundwins 0;
  20. %setGlobalVar $player-name playedgames 0;
  21. @jump3
  22. %addListElement all $player-name;
  23. %setGlobalVar $player-name wins 0;
  24. %setHealth $player-name 200;
  25. %setHunger $player-name 200;
  26. %setSaturation $player-name 50;
  27. %command clear $player-name;
  28. %command gamemode survival $player-name;
  29. %if %getListSize all; == 1 goto jump1;
  30. %teleportplayer $player-name $spawnloc1;
  31. %goto jump2;
  32. @jump1
  33. %teleportplayer $player-name $spawnloc2;
  34. @jump2
  35. %speak $player-name %concat §d 1vs1; §eGewinne drei Runden, um das Spiel zu gewinnen.;
  36. %if %getListSize all; == 2 goto start;
  37. %goto checklobby;
  38. @checklobby
  39. %wait;
  40. %if $event == player-join goto join;
  41. %goto checklobby;
  42. @start
  43. %setVar death false;
  44. %setVar i 0;
  45. %addList copyofaimchests;
  46. @copychestlist
  47. %addListElement copyofaimchests %getListElementAt aimchests $i;;
  48. %setVar i %add $i 1;;
  49. %if $i < %getListSize chests; goto copychestlist;
  50. @fillchests
  51. %setVar i 0;
  52. @filllabel
  53. %setVar index %random 0 %sub %getListSize copyofaimchests; 1;;;
  54. %blockclone %getListElementAt chests $i; %getListElementAt aimchests $index;;
  55. %removeListIndex copyofaimchests $index;
  56. %setVar i %add $i 1;;
  57. %if $i < %getListSize chests; goto filllabel;
  58. %speak all %concat §d 1vs1; §eDas Spiel startet in 4 Sekunden.;
  59. %waitfor 20;
  60. %speak all %concat §d 1vs1; §eDas Spiel startet in 3 Sekunden.;
  61. %waitfor 20;
  62. %speak all %concat §d 1vs1; §eDas Spiel startet in 2 Sekunden.;
  63. %waitfor 20;
  64. %speak all %concat §d 1vs1; §eDas Spiel startet in 1 Sekunden.;
  65. %waitfor 20;
  66. %setBlock %modLoc $spawnloc1 1 1 0; AIR;
  67. %setBlock %modLoc $spawnloc1 -1 1 0; AIR;
  68. %setBlock %modLoc $spawnloc1 0 1 1; AIR;
  69. %setBlock %modLoc $spawnloc1 0 1 -1; AIR;
  70. %setBlock %modLoc $spawnloc1 0 3 0; AIR;
  71. %setBlock %modLoc $spawnloc2 1 1 0; AIR;
  72. %setBlock %modLoc $spawnloc2 -1 1 0; AIR;
  73. %setBlock %modLoc $spawnloc2 0 1 1; AIR;
  74. %setBlock %modLoc $spawnloc2 0 1 -1; AIR;
  75. %setBlock %modLoc $spawnloc2 0 3 0; AIR;
  76. %speak all %concat §d 1vs1; §eDie Runde läuft.;
  77. @wait
  78. %wait;
  79. %if $event == player-death goto death;
  80. %if $event == player-leave goto giveup;
  81. %if $event == player-hurt && $death == true goto cancel;
  82. %goto wait;
  83. @cancel
  84. %setVar cancel true;
  85. %goto wait;
  86. @death
  87. %setVar death true;
  88. %speak all %concat §d 1vs1; %concat §e $sec-player-name; hat die Runde gewonnen.;
  89. %setGlobalVar $sec-player-name wins %add %getGlobalVar $sec-player-name wins; 1;;
  90. %speak all §d1vs1 %concat §e $player-name : %getGlobalVar $player-name wins;; %concat $sec-player-name : %getGlobalVar $sec-player-name wins;;;
  91. %setHealth $player-name 200;
  92. %setHunger $player-name 200;
  93. %setSaturation $player-name 50;
  94. %setHealth $sec-player-name 200;
  95. %setHunger $sec-player-name 200;
  96. %setSaturation $sec-player-name 50;
  97. %goto checkplayability;
  98. @checkplayability
  99. %if %getGlobalVar $sec-player-name wins; >= 3 goto win;
  100. %sgoto 40 respawn;
  101. %goto wait;
  102. @respawn
  103. %setBlock %modLoc $spawnloc1 1 1 0; BARRIER;
  104. %setBlock %modLoc $spawnloc1 -1 1 0; BARRIER;
  105. %setBlock %modLoc $spawnloc1 0 1 1; BARRIER;
  106. %setBlock %modLoc $spawnloc1 0 1 -1; BARRIER;
  107. %setBlock %modLoc $spawnloc1 0 3 0; BARRIER;
  108. %setBlock %modLoc $spawnloc2 1 1 0; BARRIER;
  109. %setBlock %modLoc $spawnloc2 -1 1 0; BARRIER;
  110. %setBlock %modLoc $spawnloc2 0 1 1; BARRIER;
  111. %setBlock %modLoc $spawnloc2 0 1 -1; BARRIER;
  112. %setBlock %modLoc $spawnloc2 0 3 0; BARRIER;
  113. %waitfor 1;
  114. %respawn $player-name;
  115. %if $player-name == %getListElementAt all 0; goto respawn1;
  116. %setVar respawn-loc $spawnloc2;
  117. %teleportplayer $player-name $spawnloc2;
  118. %teleportplayer $sec-player-name $spawnloc1;
  119. %command clear $player-name;
  120. %command clear $sec-player-name;
  121. %goto start;
  122. @respawn1
  123. %setVar respawn-loc $spawnloc1;
  124. %teleportplayer $player-name $spawnloc1;
  125. %teleportplayer $sec-player-name $spawnloc2;
  126. %command clear $player-name;
  127. %command clear $sec-player-name;
  128. %goto start;
  129. @giveup
  130. %speak all §d1vs1 %concat §e $player-name; hat das Spiel verlassen.;
  131. @win
  132. %speak all §d1vs1 %concat §e $sec-player-name; hat das Spiel gewonnen.;
  133. %setGlobalVar $sec-player-name allwins %add %getGlobalVar $sec-player-name allwins; 1;;
  134. %setVar i 0;
  135. @win1
  136. %waitfor 2;
  137. %setVar player %getListElementAt all $i;;
  138. %command warp games $player;
  139. %command clear $player;
  140. %setHealth $player 200;
  141. %setHunger $player 200;
  142. %setSaturation $player 50;
  143. @stats
  144. %setGlobalVar $player roundwins %add %getGlobalVar $player roundwins; %getGlobalVar $player wins;;;
  145. %setGlobalVar $player playedgames %add %getGlobalVar $player playedgames; 1;;
  146. %speak $player §d1vs1 §eStatistik:;
  147. #%speak $player §d1vs1 §eRang: %getGlobalVar $player rank;;
  148. %speak $player §d1vs1 §eGewonnene Runden: %getGlobalVar $player roundwins;;
  149. %speak $player §d1vs1 §eGewonnene Spiele: %getGlobalVar $player allwins;;
  150. %speak $player §d1vs1 §eGespielte Spiele: %getGlobalVar $player playedgames;;
  151. %setVar probability %div %mul %getGlobalVar marvinius allwins; 100; %getGlobalVar marvinius playedgames;;;
  152. %speak marvinius §d1vs1 §eSiegwahrscheinlichkeit: %concat %div $probability 10; %mod $probability 10; "%percent;";;
  153. %setVar i %add $i 1;;
  154. %if $i < %getListSize all; goto win1;
  155. %endQuest 10;