123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470 |
- %setVar phase 0;
- %setVar no-quest-msg true;
- %loadEvent player-leave;
- %loadEvent player-hurt;
- %loadEvent block-break;
- %loadEvent block-place;
- %addList all;
- %addMap all;
- %addMap times;
- %setVar time %getTime;;
- %setVar i %sub %getListSize spawns; 1;;
- @maplabel
- %addMapElement times %getListELementAt spawns $i; $time;
- %if %dec i; >= 0 then goto maplabel;
- %loadMenu 0 1 §8Shop;
- %setMenuItem 0 0 {id:"minecraft:stone_pressure_plate",Count:1b,tag:{display:{Lore:[0:"§7Setzt eine Mine an deiner momentanen Position.",1:"§rPreis: §a5 Smaragde"],Name:"§eMine"}},Damage:0s};
- %setMenuItem 0 1 {id:"minecraft:potion",Count:1b,tag:{HideFlags:35,Potion:"minecraft:swiftness",display:{Lore:[0:"§7Verdopple deine Geschwindigkeit.",1:"§rPreis: §a15 Smaragde"],Name:"§eGeschwindigkeit"}},Damage:0s};
- %setMenuItem 0 2 {id:"minecraft:iron_chestplate",Count:1b,tag:{HideFlags:2,display:{Lore:[0:"§7Schützt dich vor Direkttreffern.",1:"§rPreis: §a10 Smaragde"],Name:"§eRüstung"}},Damage:0s};
- %setMenuItem 0 3 {id:"minecraft:blaze_rod",Count:1b,tag:{display:{Lore:[0:"§7Töte deine Gegner mit der Hilfe von Gottes Licht.",1:"§rPreis: §a30 Smaragde"],Name:"§eGottes Licht"}},Damage:0s};
- %setVars %getQuestleader;;
- @lobby
- %if %getListSize all; >= 10 then goto fullhouse;
- %speak $player-name §cRageMode §eDu befindest dich nun in der §bRageMode §eLobby.;
- %command clear $player-name;
- %teleportPlayer $player-name $lobby;
- %setHealth $player-name 20;
- %setHunger $player-name 20;
- %setSaturation $player-name 1000000;
- %addListElement all $player-name;
- %addMapElement all $player-name 0;
- %command title $player-name times 20 60 0;
- %command title $player-name subtitle {"text":"%getVar mapname;"};
- %command title $player-name title {"text":"RageMode","color":"red"};
- %sbreset $player-name;
- %sbadd $player-name 98 §6RageMode;
- %sbadd $player-name 97 §cTeams verboten;
- %sbadd $player-name 96 §r;
- %sbadd $player-name 95 §eMap;
- %sbadd $player-name 94 $mapname;
- %goto checkstart;
- @fullhouse
- %speak $player-name §cRageMode §eDas Spiel ist voll.;
- %kick $player-name;
- %goto startgame;
- @checklobby
- %wait;
- %if $event == player-join then goto lobby;
- %if $event == player-hurt || $event == block-break || $event == block-place then goto cancellobby;
- %if $event == player-leave then goto leavelobby;
- %goto checklobby;
- @cancellobby
- %setVar cancel true;
- %goto checklobby;
- @leavelobby
- %sbreset $player-name;
- %removeListElement all $player-name;
- %removeMapElement all $p;
- %teleportPlayer $player-name $lobby;
- %kick $player-name;
- %command clear $player-name;
- %goto checklobby;
- @stopstart
- %setVar started false;
- %speak all §cRageMode Es wird auf weitere Spieler gewartet.;
- %goto checklobby;
- @checkstart
- %if %getListSize all; > 1 && $started != true then goto start20;
- %goto checklobby;
- @start20
- %setVar started true;
- %speak all §cRageMode §eDas Spiel startet in §b20 §eSekunden.;
- %sgoto 100 start15;
- %goto playstartsound;
- @start15
- %if %getListSize all; < 2 then goto stopstart;
- %speak all §cRageMode §eDas Spiel startet in §b15 §eSekunden.;
- %sgoto 100 start10;
- %goto playstartsound;
- @start10
- %if %getListSize all; < 2 then goto stopstart;
- %speak all §cRageMode §eDas Spiel startet in §b10 §eSekunden.;
- %sgoto 100 start5;
- %goto playstartsound;
- @start5
- %if %getListSize all; < 2 then goto stopstart;
- %speak all §cRageMode §eDas Spiel startet in §b5 §eSekunden.;
- %command title $player-name subtitle {"text":"%getVar mapname;"};
- %command title $player-name title {"text":"RageMode","color":"red"};
- %sgoto 20 start4;
- %goto playstartsound;
- @start4
- %if %getListSize all; < 2 then goto stopstart;
- %speak all §cRageMode §eDas Spiel startet in §b4 §eSekunden.;
- %sgoto 20 start3;
- %goto playstartsound;
- @start3
- %if %getListSize all; < 2 then goto stopstart;
- %speak all §cRageMode §eDas Spiel startet in §b3 §eSekunden.;
- %sgoto 20 start2;
- %goto playstartsound;
- @start2
- %if %getListSize all; < 2 then goto stopstart;
- %speak all §cRageMode §eDas Spiel startet in §b2 §eSekunden.;
- %sgoto 20 start1;
- %goto playstartsound;
- @start1
- %if %getListSize all; < 2 then goto stopstart;
- %speak all §cRageMode §eDas Spiel startet in §b1 §eSekunden.;
- %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; then goto playstartsoundlabel;
- %goto checklobby;
- @start0
- %if %getListSize all; < 2 then goto stopstart;
- %setVar no-join true;
- %setVar phase 1;
- %speak all §cRageMode §eDas Spiel läuft.;
- %loadEvent player-drop;
- %loadEvent inv-click;
- %loadEvent item-hit;
- %loadEvent item-hit-ground;
- %loadEvent air-click;
- %setVar starttime %getTime;;
- %sbreset all;
- %sbadd all 98 §6RageMode;
- %sbadd all 97 §aGoal: §f25;
- %setVar i 0;
- %setVar id 96;
- @sblabel1
- %setVar p %getListElementAt all $i;;
- %sbadd all $id 00 §8$p;
- %sbadd $p $id 00 §e$p;
- %setVar i %add $i 1;;
- %setVar id %sub $id 1;;
- %if $i < %getListSize all; then goto sblabel1;
- %sbadd all $id §f;
- %sbadd all %sub $id 1; Emeralds: §a0;
- %setVar i 0;
- @transfer
- %setVar p %getListElementAt all $i;;
- @position
- %setVar position %getListElementAt spawns %random 0 %sub %getListSize spawns; 1;;;;
- %if %sub %getTime; %getMapValue times $position;; < 5000 then goto position;
- %if %getVar %concat $p lastposition;; == $position then goto position;
- %setVar %concat $p lastposition; $position;
- %teleportPlayer $p $position;
- %addMapElement times $position %getTime;;
- %playsoundPlayer $p %getPlayerLoc $p; BLOCK_NOTE_HARP;
- %playsoundPlayer $p $position BLOCK_NOTE_HARP;
- %if %hasFly $p; == false then goto jumpflyremove;
- %command fly $p off;
- @jumpflyremove
- %if %getPlayerGameMode $p; == SURVIVAL then goto jumpgmremove;
- %command gamemode SURVIVAL $p;
- @jumpgmremove
- %giveItemPlayer $p {id:"minecraft:bow",Count:1b,tag:{ench:[0:{lvl:1s,id:51s}],display:{Name:"§eRageBow"}},Damage:0s};
- %giveItemPlayer $p {id:"minecraft:iron_sword",Count:1b,tag:{HideFlags:2,display:{Name:"§cRageKnife"}},Damage:0s};
- %giveItemPlayer $p {id:"minecraft:iron_axe",Count:1b,tag:{HideFlags:2,display:{Name:"§bCombatAxe"}},Damage:0s};
- %giveItemPlayer $p ARROW;
- #%giveItemPlayer $p {id:"minecraft:chest",Count:1b,tag:{display:{Name:"§aShop"}},Damage:0s};
- %setVar %concat $p kills; 0;
- %setVar %concat $p theoretickills; 0;
- %setVar %concat $p deaths; 0;
- %setVar %concat $p killstreak; 0;
- %setVar %concat $p maxkillstreak; 0;
- %setVar %concat $p messerkills; 0;
- %setVar %concat $p axekills; 0;
- %setVar %concat $p emeralds; 0;
- %setVar i %add $i 1;;
- %if $i < %getListSize all; then goto transfer;
- %sgoto 18000 endgame;
- @checkgame
- %wait;
- %if $event == air-click && $action == RIGHT_CLICK_AIR && $player-item-type == CHEST then goto showmenu;
- %if $event == air-click && $player-item-type == BOW then setVar cancel false;
- %if $event == air-click || $event == block-click && $player-item-type == IRON_AXE then goto shootAxe;
- %if $event == item-hit && $item-type == IRON_AXE then goto thrownAxeHit;
- %if $event == player-hurt && $player-damage-cause == PROJECTILE && $projectile-type == ARROW then goto bowHit;
- %if $event == player-hurt && $player-damage-cause == FALL then setVar cancel true;
- %if $event == player-hurt && $sec-player-item-type == IRON_SWORD then goto swordHit;
- %if $event == player-hurt && $sec-player-item-type == IRON_AXE then goto axeHit;
- %if $event == inv-click && $inv-type == CHEST then goto choosemenu;
- %if $event == block-click && $player-item-type == CHEST then goto showmenu;
- %if $event == block-place && $block-type == CHEST then goto showmenu;
- %if $event == player-hurt || $event == block-break || $event == block-place || $event == inv-click || $event == player-drop then setVar cancel true;
- %if $event == item-hit-ground then goto dropaxe;
- %if $event == player-leave then goto giveup;
- %goto checkgame;
- @showmenu
- %setVar cancel true;
- %openMenu 0 $player-name;
- %goto checkgame;
- @choosemenu
- %if $inv-slot == 0 then goto mine;
- %if $inv-slot == 1 then goto speed;
- %if $inv-slot == 2 then goto chestplate;
- %if $inv-slot == 3 then goto light;
- %goto checkgame;
- @mine
- %setVar cancel true;
- %goto checkgame;
- @speed
- %setVar cancel true;
- %goto checkgame;
- @chestplate
- %setVar cancel true;
- %goto checkgame;
- @light
- %setVar cancel true;
- %goto checkgame;
- @dropaxe
- %setVar loc $item-loc;
- %dropItem $loc {id:"minecraft:iron_axe",Count:1b,tag:{HideFlags:2,display:{Name:"§bCombatAxe"}},Damage:0s};
- %goto checkgame;
- @shootAxe
- %shootItem $player-name 1.8 0.4 0.4 0.4 IRON_AXE;
- %removeItemPlayer $player-name %getItemInMainHand $player-name;;
- %goto checkgame;
- @axeHit
- %setVar p $player-name;
- %setVar sp $sec-player-name;
- %removeItemPlayer $sp %getItemInMainHand $sp;;
- %goto axeCore;
- @thrownAxeHit
- %setVar sp $player-name;
- %setVar i 0;
- @thrownAxeHitLabel
- %setVar p %getListElementAt ents $i;;
- %if %checkForListElement all $p; == true then goto axeCore;
- %if %inc i; < %getListSize ents; then goto thrownAxeHitLabel;
- %goto dropaxe;
- @axeCore
- %setVar action1 axeHit;
- %setVar cancel true;
- %if $p == $sp then goto checkgame;
- %playsoundPlayer $p %getPlayerLoc $p; ENTITY_WITHER_SPAWN;
- %speak $sp §cRageMode §eDu hast §8$p §emit der Axt getötet;
- %speak $p §cRageMode §eDu wurdest von §8$sp §emit der Axt getötet;
- %speak $p §cRageMode §rDeine Kills: §c-25 §rProzent.;
- %setVar %concat $p theoretickills; %rounddown %div %mul %getVar %concat $p theoretickills;; 3; 4;;;;
- %addMapElement all $p %getVar %concat $p theoretickills;;;
- %setVar %concat $sp axekills; %add %getVar %concat $sp axekills;; 1;;
- %goto core;
- @swordHit
- %setVar cancel true;
- %setVar p $player-name;
- %setVar sp $sec-player-name;
- %if $p == $sp then goto checkgame;
- %speak $sp §cRageMode §eDu hast §8$p §egetötet;
- %speak $p §cRageMode §eDu wurdest von §8$sp §egetötet;
- %setVar %concat $sp messerkills; %add %getVar %concat $sp messerkills;; 1;;
- %goto core;
- @bowHit
- %setVar cancel true;
- %setVar p $player-name;
- %setVar sp $sec-player-name;
- %if $p == $sp then goto checkgame;
- %speak $sp §cRageMode §eDu hast §8$p §egetötet;
- %speak $p §cRageMode §eDu wurdest von §8$sp §egetötet;
- %goto core;
- @core
- %setVar emeraldid %sub 95 %getListSize all;;;
- %speak $sp §cRageMode §e+§r1 §aEmerald;
- %setVar %concat $sp emeralds; %add %getVar %concat $sp emeralds;; 1;;
- %sbadd $sp $emeraldid Emeralds: §a%getVar %concat $sp emeralds;;;
- %if $p != %getVar %concat $sp nemesis;; then goto overridenemesis;
- %speak $sp §cRageMode §eDu hast deinen §cNemesis Gegner §egetötet;
- %setVar %concat $sp kills; %add %getVar %concat $sp kills;; 1;;
- %speak $sp §cRageMode §e+§r1 §aEmerald;
- %setVar %concat $sp emeralds; %add %getVar %concat $sp emeralds;; 1;;
- %sbadd $sp $emeraldid Emeralds: §a%getVar %concat $sp emeralds;;;
- @overridenemesis
- %setVar %concat $p deaths; %add %getVar %concat $p deaths;; 1;;
- %setVar %concat $sp kills; %add %getVar %concat $sp kills;; 1;;
- %setVar %concat $sp theoretickills; %add %getVar %concat $sp theoretickills;; 1;;
- %addMapElement all $sp %getVar %concat $sp theoretickills;;;
- %command clear $p;
- %setVar %concat $p nemesis; $sp;
- %setVar %concat $sp nemesis; null;
- %setVar %concat $p killstreak; 0;
- %setVar %concat $sp killstreak; %add %getVar %concat $sp killstreak;; 1;;
- %setVar index1 %sub 96 %getIndexOfListElement all $p;;;
- %setVar index2 %sub 96 %getIndexOfListElement all $sp;;;
- %sortMap all;
- %inverseMap all;
- %setVar i 0;
- %setVar id 96;
- @sblabel2
- %setVar player %getMapKeyAt all $i;;
- %sbadd all $id %getMapValue all $player; §8$player;
- %sbadd $player $id %getMapValue all $player; §e$player;
- %setVar id %sub $id 1;;
- %if %inc i; < %getMapSize all; then goto sblabel2;
- %setVar i 0;
- %setVar id 96;
- @sblabel4
- %setVar player %getMapKeyAt all $i;;
- %if %getVar %concat $player nemesis;; == null then goto noNemesis;
- %setVar nemesisplayer %getVar %concat $player nemesis;;;
- %setVar index %sub 96 %getIndexOfMapKey all $nemesisplayer;;;
- %sbadd $player $index %getMapValue all $nemesisplayer; §c$nemesisplayer;
- @noNemesis
- %setVar id %sub $id 1;;
- %if %inc i; < %getMapSize all; then goto sblabel4;
- %giveItemPlayer $p {id:"minecraft:bow",Count:1b,tag:{ench:[0:{lvl:1s,id:51s}],display:{Name:"§eRageBow"}},Damage:0s};
- %giveItemPlayer $p {id:"minecraft:iron_sword",Count:1b,tag:{HideFlags:2,display:{Name:"§cRageKnife"}},Damage:0s};
- %giveItemPlayer $p {id:"minecraft:iron_axe",Count:1b,tag:{HideFlags:2,display:{Name:"§bCombatAxe"}},Damage:0s};
- %giveItemPlayer $p ARROW;
- #%giveItemPlayer $p {id:"minecraft:chest",Count:1b,tag:{display:{Name:"§aShop"}},Damage:0s};
- %if %getVar %concat $sp killstreak;; > %getVar %concat $sp maxkillstreak;; then goto newmax;
- %goto newposition;
- @newmax
- %setVar %concat $sp maxkillstreak; %add %getVar %concat $sp maxkillstreak;; 1;;
- %goto newposition;
- @newposition
- %setVar position %getListElementAt spawns %random 0 %sub %getListSize spawns; 1;;;;
- %if %sub %getTime; %getMapValue times $position;; < 5000 then goto newposition;
- %if %getVar %concat $p lastposition;; == $position then goto newposition;
- %setVar %concat $p lastposition; $position;
- %teleportPlayer $p $position;
- %if $action1 == axeHit then playsoundPlayer $p $position ENTITY_WITHER_SPAWN;
- %setVar action1 null;
- %addMapElement times $position %getTime;;
- %goto checkwin;
- @checkwin
- %if %getVar %concat $sp theoretickills;; >= 25 then goto win;
- %setVar sec-player-name null;
- %goto checkgame;
- @endgame
- %setVar winner %getMapKeyAt all 0;;
- %goto wincore;
- @win
- %setVar winner $sp;
- %goto wincore;
- @win2
- %setVar winner %getListElementAt all 0;;
- %goto wincore;
- @wincore
- %speak all §cRageMode §8$winner §ehat §cRageMode §egewonnen;
- %setVar endtime %getTime;;
- %goto stats;
- @stats
- %setVar i 0;
- @transferout
- %setVar p %getListElementAt all $i;;
- %teleportPlayer $p $gamesworldloc;
- %command clear $p;
- %sbreset $p;
- %speak $p §cRageMode §7-= §eStatistik dieses Spiels §7=-;
- %setVar time %round %div %sub $endtime $starttime; 1000;;;
- %speak $p §cRageMode §7Zeit§8: §e%round %div $time 60;; Minuten %mod $time 60; Sekunden;
- %speak $p §cRageMode §7Kills§8: §e%getVar %concat $p kills;;;
- %speak $p §cRageMode §7Tode§8: §e%getVar %concat $p deaths;;;
- %speak $p §cRageMode §7Killstreak§8: §e%getVar %concat $p maxkillstreak;;;
- %speak $p §cRageMode §7Messer-Kills§8: §e%getVar %concat $p messerkills;;;
- %speak $p §cRageMode §7Axt-Kills§8: §e%getVar %concat $p axekills;;;
- %setVar winningtext §7Gewonnen§8: §eNein;
- %if $p != $winner then goto notthewinner;
- %setVar winningtext §7Gewonnen§8: §eJa;
- @notthewinner
- %speak $p §cRageMode $winningtext;
- @rank
- %if %gGV $p globalrmkills; != null then goto ignorenullkills;
- %sGV $p globalrmkills 0;
- @ignorenullkills
- %sGV $p globalrmkills %add %gGV $p globalrmkills; %getVar %concat $p kills;;;;
- %addGlobalMapElement rmranks %getPlayerUUID $p; %gGV $p globalrmkills;;
- %getGlobalMap rmranks rmranks;
- %sortMap rmranks;
- %inverseMap rmranks;
- %speak $p §cRageMode §7Dein Rang§8: §e%add %getIndexOfMapKey rmranks %getPlayerUUID $p;; 1;;
- %if %inc i; < %getListSize all; then goto transferout;
- %removeEntities Item $middleloc $radius;
- %endQuest 10;
- @giveup
- %if $phase == 0 then goto leavelobby;
- %setVar p $player-name;
- %teleportPlayer $p $gamesworldloc;
- %sbreset $p;
- %removeListElement all $p;
- %removeMapElement all $p;
- %kick $p;
- %sortMap all;
- %inverseMap all;
- %setVar i 0;
- @sblabel3
- %setVar p %getMapKeyAt all $i;;
- %setVar id 96;
- %sbadd all $id %getMapValue all $p; §8$p;
- %sbadd $p $id %getMapValue all $p; §e$p;
- %if %getVar %concat $p nemesis;; == null then goto noNemesis2;
- %setVar sp %getVar %concat $p nemesis;;;
- %setVar index %sub 96 %getIndexOfMapKey all $sp;;;
- %sbadd $p $index %getMapValue all $p; §c$sp;
- @noNemesis2
- %setVar id %sub $id 1;;
- %if %inc i; < %getMapSize all; then goto sblabel3;
- %sbadd all $id §f;
- %sbadd all %sub $id 1; Emeralds: §a0;
- %if %getListSize all; <= 1 then goto win2;
- %goto checkgame;
|