Official Everybody Edits Forums

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.

#1 Before February 2015

Vitalijus
Member
From: Lithuania
Joined: 2015-02-15
Posts: 1,384
Website

Is this possible...

Hello i want to ask is it possible to make some space like free to edit and some place isnt, thanks!


wn7I7Oa.png

Offline

#2 Before February 2015

912468
Member
Joined: 2015-02-21
Posts: 212
Website

Re: Is this possible...

Vitalijus wrote:

Hello i want to ask is it possible to make some space like free to edit and some place isnt, thanks!

If you mean like you have minigames which shouldn't be edited and in the rest of the world you can, yes.

What you have to do is you have to check what the player's position is. You can do this in your OnMessage. PlayerIO sends a messsage 'm' with that data.

The area that can't be edited in my example is X=50, Y=50.

Code (read the whole message before adding it to your code!):

private void onMessage(object sender, PlayerIOClient.Message m)         {             if (m.Type == "m")             {                 if ((m.GetInt(1) > 50) && (m.Getint(2) > 50))                 {                     con.Send("say", "/giveedit " + players[m.GetInt(0)]);                 }                 else if ((m.Getint(1) < 50) && (m.GetInt(2) < 50))                 {                     con.Send("say", "/giveedit " + players[m.GetInt(0)]);                 }             }        }

The only problem with this code is that is will send a command each time a player moves. this will make the bot slow, and will probably be very slow.

To solve this, you can use a List to check if a player has edit.
---------------------------------------------------------

This is what you have to do:
Add this below your 'static string worldkey;'

List<string> edit = new List<string>(); List<string> noedit = new List<string>();

Now comes the OnMessage code:

private void onMessage(object sender, PlayerIOClient.Message m)         {             if (m.Type == "add")             {                 players.Add(m.GetInt(0), m.GetString(1));                 noedit.Add(m.GetString(1));             }             if (m.Type == "m")             {                 if (((m.GetInt(1) > 50) && (m.Getint(2) > 50)) && (noedit.Contains(players[m.GetInt(0)]))                 {                     con.Send("say", "/giveedit " + players[m.GetInt(0)]);                     noedit.Remove(players[m.GetInt(0)]);                     edit.Add(players[m.GetInt(0)]);                 }                 else if (((m.Getint(1) < 50) && (m.GetInt(2) < 50)) && (edit.Contains(players[m.GetInt(0)]))                 {                     con.Send("say", "/giveedit " + players[m.GetInt(0)]);                     edit.Remove(players[m.GetInt(0)]);                     noedit.Add(players[m.GetInt(0)]);                 }             }        }

I hope this worked! //forums.everybodyedits.com/img/smilies/wink

912468


vF0MA5o.png

Offline

#3 Before February 2015

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,835

Re: Is this possible...

If you hit an arrow key inside the edit box and moved outside of the box, you would still have edit until you released the key and by doing so sent another packet to the bot.

I would suggest removing a player's edit if they draw outside the box; maybe give them a warning and edit access after 15 seconds or so.

Or you could dig out that EE Physics dll [someone] made, to track more accurately a player's position. But it being possible to draw outside the box from inside the box, you would still need to tell off misbehaving players.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

#4 Before February 2015

Zumza
Member
From: root
Joined: 2015-02-17
Posts: 4,645

Re: Is this possible...

The most easy is to make all world a "free edit". //forums.everybodyedits.com/img/smilies/tongue


Everybody edits, but some edit more than others

Offline

#5 Before February 2015

Vitalijus
Member
From: Lithuania
Joined: 2015-02-15
Posts: 1,384
Website

Re: Is this possible...

The Doctor wrote:

The most easy is to make all world a "free edit". //forums.everybodyedits.com/img/smilies/tongue

No. Lot of you said my bots sucks so I want to make somthing like shift with some updates...


wn7I7Oa.png

Offline

#6 Before February 2015

Zumza
Member
From: root
Joined: 2015-02-17
Posts: 4,645

Re: Is this possible...

Vitalijus wrote:
The Doctor wrote:

The most easy is to make all world a "free edit". //forums.everybodyedits.com/img/smilies/tongue

No. Lot of you said my bots sucks so I want to make somthing like shift with some updates...

There are lot of shift bots with updates... Nothing what you did "sucks" is just already-made/no practical purpose.
You got wonderful ideas but are only copies. You need to make something new!


Everybody edits, but some edit more than others

Offline

Vitalijus1423758941202491

Board footer

Powered by FluxBB

[ Started around 1714034611.5974 - Generated in 0.262 seconds, 15 queries executed - Memory usage: 1.48 MiB (Peak: 1.61 MiB) ]