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

benedanika
Guest

Help in bot pls!

I need help in most stuff for my bot called BeneBot. Here's a very long list on the stuff I need:

-Key activation: (solved)
----------
con.Send(worldkey + "r, g or b");
----------
-Admin system: (almost solved, need admin-only commands (working on it))
-Kicking and banning system: (solved, refer to the bottom (at Stuff I found out MYSELF))
Banning: not tested
-Kicking non-chat, guests, ppl with a certain level and ppl with certain smileys: (partly solved)

Non-chat: refer to the bottom (at Stuff I found out MYSELF)

-Placing and removing blocks: (solved, will add more soon)

Normal Blocks:
con.Send(worldkey or watever you have for that, layer (0 foreground, 1 background), x position, y position, block ID);
Snake example:
case "b":
                             if (m.GetInt(3) == 9)
                             {
                                   con.Send(worldkey, 0, m.GetInt(1), m.GetInt(2), 0);
                             }
(Gray basic turns to air when placed. Doesn't work for borders tho xD)

Some side notes:
To delete blocks, use ID 0.
X/Y 1 is where you spawn, x+ is right and y+ is down. Use 0 X or 0 Y to change the borders (in this case you can only place basic blocks and black block)

-Looking into one piece of chat instead of the whole thing: (not tested, I need it word by word btw)
-Checking for multiline text's texts (looking at one line instead of whole thing): (not tested)
-DIGBOT: (failing (yep not solved, but prob I can do it alone, don't bother yourself with this))
-Checking for people with stats:

-Level: (not tested)
-Coin amount (both yellow and blue): (not tested)
-If they have potion effect/how much time their potion still has: (not tested)

-Giving god, and other stuff that doesn't exist in commands: (partly not tested, other not solved (god is actually giving edit))
-Afk timeout (aka someone doesnt move for 5 minutes then kick): (not solved, but working on it)
-Changing map stuff, e.g. name, code, clear etc: (almost solved... and no don't send "code", i'll try that later)
Title:
----------
con.Send("name",the new room title (string));
----------
Clear:
----------
con.Send("clear");
----------
Save:
----------
con.Send("save");
----------
Load:
----------
con.Send("say","/loadlevel");
----------
Reset:
----------
con.Send("say","/reset");
----------
Code:
???
Open/close world:
----------
con.Send("say","/visible true/false");
----------

Other stuff that I auto found out with the source:
Give crown to bot.
----------
con.Send(worldkey + "k");
----------
Change godmode of bot.
----------
con.Send("god",true/false)
----------
Bot auto-gets crown (lol):
----------
if (m.Type == "k")
{
con.Send(worldkey + "k");
}
----------

Stuff I found out MYSELF:

Nonchatter:
For "add"
----------
if (!m.GetBoolean(7))
                       {
                             con.Send("say", "/kick " + m.GetString(1) + " " + textBox5.Text);
                       }
----------

Kick:
----------
con.Send("say","/kick playerName reason...");
----------

Trust me, this could even help other people with these stuff.
NOTE: I may add more stuff.

Last edited by benedanika (Dec 8 2014 10:09:36 am)

#2 Before February 2015

Mr. Force
Guest

Re: Help in bot pls!

Admin System:

List<string> adminList = new List<string> { "write ur admins here" };

Ban System:

List<string> banList = new List<string> { "write ur banned people here" };

And then at case "add":
for banList:

if (banList.Contains(m.GetString(1))) { con.Send("say", "/kick " + m.GetString(1)); }

for adminList:

if (adminList.Contains(m.GetString(1))) { con.Send("say", "/giveedit " m.GetString(1)); }

I dont know if this will help you but good luck.

Last edited by Mr. Force (Nov 17 2014 11:47:21 am)

#3 Before February 2015

Jabatheblob1
Member
Joined: 2015-03-01
Posts: 856

Re: Help in bot pls!

Key Activation:

 public void key(string keyColor)         {             switch (keyColor)             {                 case "red":                     {                         con.Send(bldatam + "r");                     }                     break;                 case "green":                     {                         con.Send(bldatam + "g");                     }                     break;                 case "blue":                     {                         con.Send(bldatam + "b");                     }                     break;             }         }

Admin System: Already solved.
Kicking and Banning System: Already solved.
Kicking Non-Chats and Ceratin Smileys:

 if (m.Type == "add")             {                 if (!m.GetBoolean(8))                 {                     con.Send("say", "/kick " + m.GetString(1) + " Sorry no none chats");                 }                 if (m.GetInt(2) == 2)                 {                     con.Send("say", "/kick " + m.GetString(1) + " Sorry that smiley isn't allowed");                 } 	    }

Placing and Removing Blocks:

   con.Send(bldatam, Layer, Xcoord, Ycoord, BlockId);

Looking at Certain Chat:

public List<string> log = new List<string>(); if(m.Type == "say") { 	log.Add(username + ": " + m.GetString(1)); 	string Message = log[LineOfLog]; }

Looking at a Certain Line in a File:

public string checkTextFile(int lineNumber, string filePath)         {             StreamReader sr = new StreamReader(filePath);             string[] lines = sr.ReadToEnd().Split('\n');             sr.Dispose();             return lines[lineNumber];         }

Digbot:

 if (m.Type == "m")             {                 con.Send(bldatam, 0, (m.GetInt(1) / 16) + m.GetInt(7), (m.GetInt(2) / 16) + m.GetInt(8), 4);             }

Checking for People With Stats: I don't know what you mean by this
Level: I don't know what you mean by this
Coins: This can require a class or a array of users either way it's more code than i would like to post.
Potions: Same as above
Other Commands: Too many commands to post.


If you would like me to make a bot for you, go here.

Offline

#4 Before February 2015

benedanika
Guest

Re: Help in bot pls!

omg thx for all that!
note to the one saying admin list: ok its done but now how to make admin commands?

#5 Before February 2015

benedanika
Guest

Re: Help in bot pls!

oh wait error on key

#6 Before February 2015

benedanika
Guest

Re: Help in bot pls!

well bdatam is an error so wtf

#7 Before February 2015

Jabatheblob1
Member
Joined: 2015-03-01
Posts: 856

Re: Help in bot pls!

bldatam is a string
also known as worldKey


If you would like me to make a bot for you, go here.

Offline

#8 Before February 2015

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

Re: Help in bot pls!

To get bldatam value you need to derot the 5 argument on init event type, so:

if(m.Type=="init")     bldatam=derot(m.getString(5));

This is a nice example: http://pastebin.com/ruREkhqJ
Instead of asking   why don't you learn/discover yourself?
Don't understand   me wrong. I like to help, but there should be a limit!


Everybody edits, but some edit more than others

Offline

#9 Before February 2015

benedanika
Guest

Re: Help in bot pls!

By the way, I just noticed that the key activation is CHECKING, not actually doing it through bot. Srsly... wtf

#10 Before February 2015

benedanika
Guest

Re: Help in bot pls!

HOLY crap OMG WTF IT WORKED

#11 Before February 2015

benedanika
Guest

Re: Help in bot pls!

and now.. how to check who says something?

#12 Before February 2015

ZeldaXD
EE Homeboy
From: Cyprus
Joined: 2015-02-15
Posts: 1,539
Website

Re: Help in bot pls!

is the m.getint(0) at "say", it will give you the id of the user tho, so you will need to convert it to string


gLjTZE1.png

Offline

#13 Before February 2015

Jabatheblob1
Member
Joined: 2015-03-01
Posts: 856

Re: Help in bot pls!

which is found in "add" ^^


If you would like me to make a bot for you, go here.

Offline

#14 Before February 2015

benedanika
Guest

Re: Help in bot pls!

And you know how to find this user? I can't get it to work.

#15 Before February 2015

benedanika
Guest

Re: Help in bot pls!

Oh now I found a website with alot info, but most of them don't work like the bool is still there for chat check while its int32, but nevermind

Last edited by benedanika (Nov 22 2014 10:53:15 am)

#16 Before February 2015

Mr. Force
Guest

Re: Help in bot pls!

If u need Admin only commands, put this code under ur command for admins
Example:

if (m.GetString(1) == "!edit")) { if (AdminList.Contains(Players[m.GetInt(0)])) { con.Send("say", "meow"); } 

#17 Before February 2015

bosoca
Guest

Re: Help in bot pls!

Lol bene the troll we meet again >.>

#18 Before February 2015

benedanika
Guest

Re: Help in bot pls!

dude stop this madness

#19 Before February 2015

benedanika
Guest

Re: Help in bot pls!

now i need some help with something else... checking for blocks in the world? also not in the database, in the world itself

#20 Before February 2015

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

Re: Help in bot pls!

I don't know what you mean by world not database but... If you want to get all blocks id, value etc. This info is in "init"
Basic eg:
http://pastebin.com/9uFrYtYp
You can simplifi it depends on your needs.

Last edited by The Doctor (Dec 6 2014 6:35:24 am)


Everybody edits, but some edit more than others

Offline

#21 Before February 2015

benedanika
Guest

Re: Help in bot pls!

by world i mean how the game is played

#22 Before February 2015

benedanika
Guest

Re: Help in bot pls!

oh i found out the nonchat kick system!
adding it to the want list

#23 Before February 2015

lrussell
Member
From: Saturn's Titan
Joined: 2015-02-15
Posts: 843
Website

Re: Help in bot pls!

benedanika wrote:

by world i mean how the game is played

If you want every block in a saved level, you can use my web-based API.
http://api.everybodyedits.info/WorldDat … dt06vvya0I (just replace the ID with your own).

You'll need Json.Net to deserialize it to a "World" object, just use WebClient's DownloadString to get the data.
Also, you'll need to reference System.Drawing to get Point.

Here's the classes:

public class World         {             public string Id, Name = "Untitled World", OwnerId, Owner;             public int Plays, Width = 200, Height = 200, Woots, TotalWoots;             public bool AllowPotions, Visible;             public Color BackgroundColor;             public List<WorldData> WorldData = new List<WorldData>();         }          public class WorldData         {             public int type, layer, rotation, id, goal;             public string target, text;             public List<Point> locs = new List<Point>();         }

Offline

#24 Before February 2015

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

Re: Help in bot pls!

Hi Benedanika

I saw that there were a few things not solved, so here's the code for things I know:

Look wich level a player has:

if (m.Type == "add") {     player.level=m.GetInt(12); }

Potions:

if (m.Type == "p") {     userID = m.GetInt(0);     potionID = m.GetInt(1);     active = m.GetBoolean(2); }

giving godmode is actually in chat:

connection.Send("say", "/giveedit " + playername);

Other things that aren't in chat:
*Change Smiley:

connection.Send(worldkey + "f", smileyID);

*Quickchat:

connection.Send("autosay", textID);

*Get edit:

connection.Send("access", code);

*Enable / Disable god mode:

connection.Send("god", true or false);

*Get the trophy:

connection.Send("levelcomplete");

*Open / Close world:
     to open:
             

connection.Send("say", "/visible true");

     to close:
             

connection.Send("say", "/visible false");

For the coins you just count one up to the player.
For the blue coins, look here

I hope this information helped. //forums.everybodyedits.com/img/smilies/wink

912468

Last edited by 912468 (Dec 7 2014 1:41:00 pm)


vF0MA5o.png

Offline

#25 Before February 2015

lrussell
Member
From: Saturn's Titan
Joined: 2015-02-15
Posts: 843
Website

Re: Help in bot pls!

912468 wrote:

... For the blue coins, look here ...

That isn't needed anymore, since adding blue coin doors they send a message like orange coins do.

Offline

benedanika 1423758916202516

Board footer

Powered by FluxBB

[ Started around 1711636691.0611 - Generated in 0.183 seconds, 10 queries executed - Memory usage: 1.63 MiB (Peak: 1.85 MiB) ]