Jump to content
Eternal Lands Official Forums
Sign in to follow this  
ttlanhil

I need ides for my bot!

Recommended Posts

first, the basics. the setup is called yaelbot (yet another eternal lands bot). when you hear me say yaelbot, it means the code and stuff.

 

the next part is technical, so skip it if you wanna get to the interesting part

yaelbot is written in C++ (although in places I code like a C coder, so it's somewhat mixed). there's only one class, stuff is set up in main from a config file, it's capable of running several bots at the same time (thanks to lots of settings in config file, you can run different bots on different servers, several on the same one with different options, etc)

commands are added to the bot through a callback system, so you only need to have the protoype of the function in a header and add it to the init section for a command to be known.

this means there's no fuzzy-matching on command names, but it's easy to set options on commands (what priviledges someone needs to use the command; if it works only in PM or in GM, local, game channels; a usage and description line)

 

the priviledges used for checking access for commands can come one of 4 ways. 1st is if the player name is explicitly set to have a priv. that can be done in config file or by a bot admin while running. 2nd is if the player is in the same guild as the bot (which gives a different priv depending on guild rank, if the bot can check), 3rd is by guild tag, ally and enemy tag colours are setable in config (so you don't have to use the same colour scheme as I'm used to :P ). if all that fails, you get the default level, which is all most people need

 

logging:

there are a number of logging options. one of the logs is for commands only, which will be the most useful (and shortest) one... 2nd is to log all chat seen, 3rd is to log almost everything that goes over the network connection. it's huge, but I can check anything that happened, so it'll be useful (almost meaning everything except actor_commands and login (for password masking))

 

right now there are 8 types of commands: games, admin, info, movement, guild, guildmaster, trade, and general (I won't go listing all the commands, that can be done with the bot in-game if you need the list. I'll also skip admin commands, since, if you can use them, you'll have been told how to :P )

  • games: there are a number of games available. some of them have hundreds of replies (such as reading my fortunes file), some have dozens (like asking the magic 8ball a questinon), some have only the one answer. I have an admire command, but that doesn't work the same as the one gossip has (similar, but not the same). the exact details you'll have to wait for :P
  • info: various informational things. there's already a calculator (which takes complex syntax, can do factorials, powers, brackets work properly, etc), location checker, and there's a database setup (more on that later)
  • movement: people who are set with slightly higher priv can make the bot turn, sit, stand, etc
  • guild: has stuff like #rank so people can check others' ranks. means that only the bot need be rank 19 for a rank 15 to check others' ranks). there's also a rec command, for recruit, to do a accept and set_rank in one go. saves typing and remembering the command names :) I've also added a GLM, for guild leaders message, which the bot will relay to other GMs online at the time. some things you wanna discuss, but not with the whole guild, and private sections of forums are too slow. there's also a command for people outside to send a GM. this, of course, requires the other person have higher than usual priviledge level. this is mainly for people not in another guild, since they can #ig
  • guildmaster commands will be set up so that a yaelbot can be in charge of a guild. for example, there could be a guild for guildless people (no, really, the guild does nothing for them except give them a tag, so they get less recruiting. some people don't wanna be guildified, and avoiding the recruiters could make this option ppealing to them). that'd leave everyone at rank 0, anyone can join/leave, etc
  • trade: eh... you're all familiar with this sort thing already. there's not much done here yet, apart from being able to list its inventory, but I'll probably add some trade stuff eventually
  • general: stuff that doesn't fit in other categories, and things that shouldn't be turned off (the rest can be turned on/off)

database: like the encyclopedia ingame, except that it'll have a wider range of information, as well as being searchable (and other entries are underlined in definitions, so you can see links) and easier to update (some people don't have AUTO_UPDATE on, so they can't get a newer encyc until they manually get the next versin of EL). right now, the system is finished and works fine, but the data files are almost empty.

I have a scraped list of books with prerequisites from CEL's site (with permission, of course) cross-linked with descriptions of the knowledge they give; starting a list of acronyms used in EL may be next (I have a list of many categories already. they just need to be filled in)

I may seek people to help with this later, the data files only need to have a correct name (it's used as a category name) and be in name<tab>description format, so anyone can do it (things that are other entries need to be spelt right, since the linkification is done when the bots start, not by info-writers)

 

so... now that I've covered what it can (or soon will be able to) do... what can I add to it? I'm looking mostly for ideas that benefit large numbers of people, though stuff like guild leader commands that help only a few people can go in too

don't post about stuff like giving free stuff to people... if I'm gonna give out free stuff, I'll run a contest myself. don't ask for stuff like a list of secrets, or stats to fight animals... that won't go in either. if it can't be posted on a public channel, it's unlikely to be in my bot

stuff like games can be just one pre-set line, I have a lot of them already

if you wanna try out what I have so far, get in touch, I can fire it up on the test server

 

ideas?

Edited by ttlanhil

Share this post


Link to post
Share on other sites

One thing that iknow has is a layer of communications channels and the ability to relay messages between them. This is used to communicate between a private irc channel and #gm, a public el channel and a public irc channel, #gm and pm etc. It is built in a way that you can link up backends so messages recieved by one backend will be sent to another.

 

I have also added an object persistance cache, this is used to allow a function to make itself take over all input from a client this was used in my (bad) implementation of a mail systen to allow for multi line input over several pm messages. One thing i never got around to implelmenting was a questionare system where the bot could ask you a series of questions one after another but i could not be bothered.

 

Now on to some of the more useful commands you can work on.

- Guild commands: kick/accept to allow for a player to leave a guild for private training, GMtoPM to have #gm messages sent as pm messages (for training) #gm to speak in #gm with a name prefix ie "#gm (dns) message"

- admin: arbitary local chat backdoor, use #cmd string to speak in local ie "#cmd #accept playername" to accept someone into the guild.

- general: There are a fiew things you can do with web page parseing such as parseing the players online page and stats pages.

Share this post


Link to post
Share on other sites
One thing that iknow has is a layer of communications channels and the ability to relay messages between them.
right now, my bots can relay messages between each other, even across servers... adding stuff like IRC/jabber/whatever is possible, though I then need to worry about more authentication stuff, so it's not on the urgent list
I have also added an object persistance cache, this is used to allow a function to make itself take over all input from a client this was used in my (bad) implementation of a mail systen to allow for multi line input over several pm messages. One thing i never got around to implelmenting was a questionare system where the bot could ask you a series of questions one after another but i could not be bothered.
at some stage I'll save player info to disk, and probably have an int or something for a measurement of what they've done. can have stuff like terms of service in there, no access to some commands until you /bot tos accept
- Guild commands: kick/accept to allow for a player to leave a guild for private training
this requires building a list of people who can come and go, which isn't too hard, but also needs persistance
GMtoPM to have #gm messages sent as pm messages (for training)
once the previous one is done, this would be part of it
#gm to speak in #gm with a name prefix ie "#gm (dns) message"
I have a "#GM-relay from name:" thingy already, that's only for people listed as freinds or higher
- admin: arbitary local chat backdoor,
heh. I have a #do to send as-is (unless it starts with a /, then turn it into a PM) as well as use-click, etc... I can take the bot for a walk across the maps
- general: There are a fiew things you can do with web page parseing such as parseing the players online page and stats pages.
yeah, but those have been done :P (well, apart from, say, using google's API to do populatity comparisons between terms, stuff like that)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×