Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using BotCreate.Data;
- using PlayerIOClient;
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Text;
- using System.Threading;
- using System.Windows.Forms;
- namespace OpenWorldGodMode
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private Connection con;
- private void button1_Click(object sender, EventArgs e)
- {
- Thread join = new Thread(delegate()
- {
- Dictionary<string, string> stuff = new Dictionary<string, string>();
- stuff["name"] = worldname.Text;
- stuff["needsedit"] = "yup";
- stuff["editkey"] = editkey.Text;
- Client cClient = PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", "guest", "guest", null);
- Random r = new Random();
- r.Next(100000, 900000);r.Next(100000, 900000);r.Next(100000, 900000);
- con = cClient.Multiplayer.CreateJoinRoom("OW-OpenWorldGodMode-" + r.Next(100000, 900000), "Everybodyedits" + cClient.BigDB.Load("config", "config")["version"], true, stuff, stuff);
- con.OnMessage += con_OnMessage;
- con.Send("init");
- MessageBox.Show("Your world has been created.");
- });
- join.Start();
- MessageBox.Show("You will be informed when your world is created.");
- }
- void con_OnMessage(object sender, PlayerIOClient.Message e)
- {
- if (e.Type == "init")
- con.Send("init2");
- }
- }
- }
Add Comment
Please, Sign In to add comment