Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?
You are not logged in.
I am currently making a bot and I would like to know how can the bot teleport every player to a specific location.
Any help is appreciated.
Thanks in advance.
Offline
All you need to do is iterate over all the players in the room and issue a teleport command for them all. Assuming you have a sane list of players already stored somewhere, one which provides the name of each player, you can do something like the following pseudocode.
int x = 100;
int y = 50;
for( player p in player_list ){
connection.send("say", String.Format("/teleport {0} {1} {2}", p.name, x, y) );
}
Edit: made Proc happier
Offline
All you need to do is iterate over all the players in the room and issue a teleport command for them all. Assuming you have a sane list of players already stored somewhere, one which provides the name of each player, you can do something like the following pseudocode.
string x = "100"; string y = "50"; for( player p in player_list ){ connection.send("say", "/teleport " + p.name + " " + x + " " + y); }
Thank you! That's what I was looking for!
Offline
Or the easier solution: you can pace a spawn point on that position
And send a world reset message.
Everybody edits, but some edit more than others
Offline
[ Started around 1732357669.4242 - Generated in 0.027 seconds, 10 queries executed - Memory usage: 1.38 MiB (Peak: 1.48 MiB) ]