msg("dev", "§bTrolling §rwurde geladen."); event.load("player_join_server"); event.load("player_leave"); h = 0; //Laufvariable/Index, zu welchem Spieler alle tped werden taktrate = 5; //in ms zeitbegrenzung = 0; //in sek. 0 = unbegrenzt if(zeitbegrenzung != 0) { sgoto(zeitbegrenzung * 20, "term"); } //Liste anlegen list.new("names"); list.add(names, "FinbarTheViking"); list.add(names, "ImKillerKatze"); size = list.getSize(names); //String-Namen in Player-Datentyp konvertieren list.new("names2"); i = -1; while(inc("i") < size) { list.add(names2, read.player(list.getIndex(names, i))); } //Liste kopieren removeVar("names"); list.new("names"); i = -1; while(inc("i") < size) { list.add(names, list.getIndex(names2, i)); } @loop try() { tpto = list.getIndex(names2, h++); if(h == size) { h = 0; } i = -1; while(inc("i") < size) { entity.teleport(list.getIndex(names, i), entity.getLocation(tpto)); } } catch { nothing(); } sgoto(taktrate, "loop"); @wait wait(); if(event == "player_join_server") { if(list.contains(names, player)) { list.add(names2, player); inc("size"); } goto("wait"); } if(event == "player_leave") { list.remove(names2, player); dec("size"); goto("wait"); } goto("wait"); @term term();