123456789101112131415161718192021222324252627282930313233 |
- msg("dev", "§bErdokuh §rwurde geladen.");
- event.load("entity_hurt");
- map.new("countmap");
- list.new("respawners");
- @wait
- wait();
- if(and(equal(event, "entity_hurt"), equal(text.class(entity), "EntityCow"), equal(loc.getCoord(entity.getLocation(player), "w"), "games"))) {
- cancel = true;
- if(equal(map.get(countmap, player_name), null)) {
- map.add(countmap, player_name, 0);
- }
- map.add(countmap, player_name, add(map.get(countmap, player_name), 1));
- if(greaterequal(map.get(countmap, player_name), 5)) {
- msg(player_name, "§bErdogan, er ist überall!");
- map.add(countmap, player_name, 0);
- entity.setHealth(player, 0);
- list.add(respawners, player);
- sgoto(20, "respawn");
- goto("wait");
- }
- msg(player, "§3Du darfst diese Kuh nicht töten, sonst tötet dich Erdogan.");
- goto("wait");
- }
- goto("wait");
- @respawn
- try() {
- player.respawn(list.getIndex(respawners, 0));
- } catch {
- nothing();
- }
- goto("wait");
|