123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- %loadEvent player-death;
- %loadEvent player-respawn;
- %setVar add-same true;
- %setVars %getQuestLeader;;
- %addList all;
- %setBlock %modLoc $spawnloc1 1 1 0; BARRIER;
- %setBlock %modLoc $spawnloc1 -1 1 0; BARRIER;
- %setBlock %modLoc $spawnloc1 0 1 1; BARRIER;
- %setBlock %modLoc $spawnloc1 0 1 -1; BARRIER;
- %setBlock %modLoc $spawnloc1 0 3 0; BARRIER;
- %setBlock %modLoc $spawnloc2 1 1 0; BARRIER;
- %setBlock %modLoc $spawnloc2 -1 1 0; BARRIER;
- %setBlock %modLoc $spawnloc2 0 1 1; BARRIER;
- %setBlock %modLoc $spawnloc2 0 1 -1; BARRIER;
- %setBlock %modLoc $spawnloc2 0 3 0; BARRIER;
- @join
- %if %getGlobalVar $player-name playedgames; != null goto jump3;
- %setGlobalVar $player-name allwins 0;
- %setGlobalVar $player-name roundwins 0;
- %setGlobalVar $player-name playedgames 0;
- @jump3
- %addListElement all $player-name;
- %setGlobalVar $player-name wins 0;
- %setHealth $player-name 200;
- %setHunger $player-name 200;
- %setSaturation $player-name 50;
- %command clear $player-name;
- %command gamemode survival $player-name;
- %if %getListSize all; == 1 goto jump1;
- %teleportplayer $player-name $spawnloc1;
- %goto jump2;
- @jump1
- %teleportplayer $player-name $spawnloc2;
- @jump2
- %speak $player-name %concat §d 1vs1; §eGewinne drei Runden, um das Spiel zu gewinnen.;
- %if %getListSize all; == 2 goto start;
- %goto checklobby;
- @checklobby
- %wait;
- %if $event == player-join goto join;
- %goto checklobby;
- @start
- %setVar death false;
- %setVar i 0;
- %addList copyofaimchests;
- @copychestlist
- %addListElement copyofaimchests %getListElementAt aimchests $i;;
- %setVar i %add $i 1;;
- %if $i < %getListSize chests; goto copychestlist;
- @fillchests
- %setVar i 0;
- @filllabel
- %setVar index %random 0 %sub %getListSize copyofaimchests; 1;;;
- %blockclone %getListElementAt chests $i; %getListElementAt aimchests $index;;
- %removeListIndex copyofaimchests $index;
- %setVar i %add $i 1;;
- %if $i < %getListSize chests; goto filllabel;
- %speak all %concat §d 1vs1; §eDas Spiel startet in 4 Sekunden.;
- %waitfor 20;
- %speak all %concat §d 1vs1; §eDas Spiel startet in 3 Sekunden.;
- %waitfor 20;
- %speak all %concat §d 1vs1; §eDas Spiel startet in 2 Sekunden.;
- %waitfor 20;
- %speak all %concat §d 1vs1; §eDas Spiel startet in 1 Sekunden.;
- %waitfor 20;
- %setBlock %modLoc $spawnloc1 1 1 0; AIR;
- %setBlock %modLoc $spawnloc1 -1 1 0; AIR;
- %setBlock %modLoc $spawnloc1 0 1 1; AIR;
- %setBlock %modLoc $spawnloc1 0 1 -1; AIR;
- %setBlock %modLoc $spawnloc1 0 3 0; AIR;
- %setBlock %modLoc $spawnloc2 1 1 0; AIR;
- %setBlock %modLoc $spawnloc2 -1 1 0; AIR;
- %setBlock %modLoc $spawnloc2 0 1 1; AIR;
- %setBlock %modLoc $spawnloc2 0 1 -1; AIR;
- %setBlock %modLoc $spawnloc2 0 3 0; AIR;
- %speak all %concat §d 1vs1; §eDie Runde läuft.;
- @wait
- %wait;
- %if $event == player-death goto death;
- %if $event == player-leave goto giveup;
- %if $event == player-hurt && $death == true goto cancel;
- %goto wait;
- @cancel
- %setVar cancel true;
- %goto wait;
- @death
- %setVar death true;
- %speak all %concat §d 1vs1; %concat §e $sec-player-name; hat die Runde gewonnen.;
- %setGlobalVar $sec-player-name wins %add %getGlobalVar $sec-player-name wins; 1;;
- %speak all §d1vs1 %concat §e $player-name : %getGlobalVar $player-name wins;; %concat $sec-player-name : %getGlobalVar $sec-player-name wins;;;
- %setHealth $player-name 200;
- %setHunger $player-name 200;
- %setSaturation $player-name 50;
- %setHealth $sec-player-name 200;
- %setHunger $sec-player-name 200;
- %setSaturation $sec-player-name 50;
- %goto checkplayability;
- @checkplayability
- %if %getGlobalVar $sec-player-name wins; >= 3 goto win;
- %sgoto 40 respawn;
- %goto wait;
- @respawn
- %setBlock %modLoc $spawnloc1 1 1 0; BARRIER;
- %setBlock %modLoc $spawnloc1 -1 1 0; BARRIER;
- %setBlock %modLoc $spawnloc1 0 1 1; BARRIER;
- %setBlock %modLoc $spawnloc1 0 1 -1; BARRIER;
- %setBlock %modLoc $spawnloc1 0 3 0; BARRIER;
- %setBlock %modLoc $spawnloc2 1 1 0; BARRIER;
- %setBlock %modLoc $spawnloc2 -1 1 0; BARRIER;
- %setBlock %modLoc $spawnloc2 0 1 1; BARRIER;
- %setBlock %modLoc $spawnloc2 0 1 -1; BARRIER;
- %setBlock %modLoc $spawnloc2 0 3 0; BARRIER;
- %waitfor 1;
- %respawn $player-name;
- %if $player-name == %getListElementAt all 0; goto respawn1;
- %setVar respawn-loc $spawnloc2;
- %teleportplayer $player-name $spawnloc2;
- %teleportplayer $sec-player-name $spawnloc1;
- %command clear $player-name;
- %command clear $sec-player-name;
- %goto start;
- @respawn1
- %setVar respawn-loc $spawnloc1;
- %teleportplayer $player-name $spawnloc1;
- %teleportplayer $sec-player-name $spawnloc2;
- %command clear $player-name;
- %command clear $sec-player-name;
- %goto start;
- @giveup
- %speak all §d1vs1 %concat §e $player-name; hat das Spiel verlassen.;
- @win
- %speak all §d1vs1 %concat §e $sec-player-name; hat das Spiel gewonnen.;
- %setGlobalVar $sec-player-name allwins %add %getGlobalVar $sec-player-name allwins; 1;;
- %setVar i 0;
- @win1
- %waitfor 2;
- %setVar player %getListElementAt all $i;;
- %command warp games $player;
- %command clear $player;
- %setHealth $player 200;
- %setHunger $player 200;
- %setSaturation $player 50;
- @stats
- %setGlobalVar $player roundwins %add %getGlobalVar $player roundwins; %getGlobalVar $player wins;;;
- %setGlobalVar $player playedgames %add %getGlobalVar $player playedgames; 1;;
- %speak $player §d1vs1 §eStatistik:;
- #%speak $player §d1vs1 §eRang: %getGlobalVar $player rank;;
- %speak $player §d1vs1 §eGewonnene Runden: %getGlobalVar $player roundwins;;
- %speak $player §d1vs1 §eGewonnene Spiele: %getGlobalVar $player allwins;;
- %speak $player §d1vs1 §eGespielte Spiele: %getGlobalVar $player playedgames;;
- %setVar probability %div %mul %getGlobalVar marvinius allwins; 100; %getGlobalVar marvinius playedgames;;;
- %speak marvinius §d1vs1 §eSiegwahrscheinlichkeit: %concat %div $probability 10; %mod $probability 10; "%percent;";;
- %setVar i %add $i 1;;
- %if $i < %getListSize all; goto win1;
- %endQuest 10;
|