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.
Pages: 1
Is there any bot that can save a player's stats in a world like the switches he turned on or the coins he got?
Offline
using System; using static System.Threading.Thread; using PlayerIOClient;
class Program {
public static int Main (string[] args) {
Connection con = PlayerIO.QuickConnect.SimpleConnect ("everybody-edits-su9rn58o40itdbnw69plyw", args[0], args[1], null).Multiplayer.JoinRoom (args[2], null);
con.Send ("init");
con.OnMessage += (s, e) => { Console.WriteLine (e); if (e.Type == "init") con.Send ("init2"); }
con.OnDisconnect += (s, r) => { Console.WriteLine (r); return 1; }
Sleep (-1);
}
}
Event reader.
Offline
I started that bot a while ago. It dieded cause I'm lazy.
I think it's possible to save everything. Coins send a coordinate so they're easy, and you can combine mapdata with "ps" and "effect" to store the locations of the switches and effects that are used. Then teleport the player through every purple switch, coin and effect they touched.
Restoring deaths and curse/zombie/lava time left would be slow but still fairly simple.
The main difficulty is with restoring the player's last checkpoint. EEPhysics would probably work, but it's kinda overkill. If a player dies and respawns at a checkpoint, that cp can be saved, but if they don't die then there isn't a simple solution. If player progress is saved to file by some kinda ".save" command then you can /kill that player and check where they respawn, but ideally you want everything to be saved automatically when they leave the world. Emulating the whole physics engine to check if they've hit a checkpoint is a pain in the **** and not 100% accurate, so maybe a save command is the next best thing.
One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.
Offline
Emulating the whole physics engine to check if they've hit a checkpoint is a pain in the **** and not 100% accurate, so maybe a save command is the next best thing.
I think it would get a lot easier when you'd make it yourself a lot easier by checking around each spawnpoint in a 3x3 area, since, as you said, the physics calculation might just skip a block here and there when you're not checking often enough.
If this would be made (semi-)private I'd say: use workarounds: Stuff like portals, keys, coins. Everybody receives messages when those are picked up, so those can be registered by a "overseeing" bot.
Aside from that, if it'd be more of a public bot: Just use commands. You already mentioned the "save" command. Just let that command also save the player's position. That way you don't have to retrieve the player's position every tick or so.
Anyway, to return on the OP's question:
Is there any bot that can save a player's stats in a world like the switches he turned on or the coins he got?
As far as I know:
No public one, although this bot shouldn't have to be very hard to make, depending on the requirements it has (for example, as mentioned, saving player position might be more troublesome, depending on how/when to store it).
Offline
I think it would get a lot easier when you'd make it yourself a lot easier by checking around each spawnpoint in a 3x3 area, since, as you said, the physics calculation might just skip a block here and there when you're not checking often enough.
If a player fell through a checkpoint without moving the bot wouldn't know without emulation. You can't detect a checkpoint touch without full physics emulation and probably even then not 100% accurately.
I think a fail-proof progress saver would have to use a .save command; the player would use the command, press an arrow key to record their position, then be /killed to record their last checkpoint position from "tele".
One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.
Offline
the player would use the command, press an arrow key to record their position
I doubt having the player move after the save command'd be a good idea.
They WILL forget, or WILL forget to read instructions, on in a hurry just leave and don't even see the instructions after they used the command.
Best bet is to save the last known location, either through "teleport" or through the last known location from EEPhysics.
Offline
Pages: 1
[ Started around 1732406316.9018 - Generated in 0.062 seconds, 12 queries executed - Memory usage: 1.43 MiB (Peak: 1.54 MiB) ]