erdokuh.txt 918 B

123456789101112131415161718192021222324252627282930313233
  1. msg("dev", "§bErdokuh §rwurde geladen.");
  2. event.load("entity_hurt");
  3. map.new("countmap");
  4. list.new("respawners");
  5. @wait
  6. wait();
  7. if(and(equal(event, "entity_hurt"), equal(text.class(entity), "EntityCow"), equal(loc.getCoord(entity.getLocation(player), "w"), "games"))) {
  8. cancel = true;
  9. if(equal(map.get(countmap, player_name), null)) {
  10. map.add(countmap, player_name, 0);
  11. }
  12. map.add(countmap, player_name, add(map.get(countmap, player_name), 1));
  13. if(greaterequal(map.get(countmap, player_name), 5)) {
  14. msg(player_name, "§bErdogan, er ist überall!");
  15. map.add(countmap, player_name, 0);
  16. entity.setHealth(player, 0);
  17. list.add(respawners, player);
  18. sgoto(20, "respawn");
  19. goto("wait");
  20. }
  21. msg(player, "§3Du darfst diese Kuh nicht töten, sonst tötet dich Erdogan.");
  22. goto("wait");
  23. }
  24. goto("wait");
  25. @respawn
  26. try() {
  27. player.respawn(list.getIndex(respawners, 0));
  28. } catch {
  29. nothing();
  30. }
  31. goto("wait");