Forums » General

GuildBot

Oct 02, 2003 cembandit link
Working on GuildBot (not related to bounty bot).
ETA: Two Weeks for Release, One week for basic cmds

Overview
---------
Runs via 3rd party program console in C++ with mfc support. (Visual c++ 6)
Will be open sourced when its ready.
Should be ready within a week or so, unless I go on a drinking benge. The science is mostly worked out, now we are just tweaking the Guild class and its member functions as well as the serilization of data. iostream work from client to program is done. Basic parsing of the vendetta messages into validated strings is done.

You may only belong to one guild at a time. All commands that take no parameters are directed to your guild. Many commands can only be accessed by guildmasters. I may use "levels" of command like irc in the future.

War with another guild will hapen when either guild declares war.
War activates stat tracking in sector 9. Stat tracking will show which guild is killing the other the most in sector 9.
Guildbot will scream bloody murder if a false guild member is detected using a registerd tag. ie; "<GuildBot> Warning! Sir Smokeum [TFVU] is not registerd" this will only happen if the guild tag is registerd. Once every hour or two guildbot will post a random guilds url and info. Suggestions for commands and data storage are welcome. Do not try to steal known guilds by registering them first. I know the other guild masters and will not allow it.

I will be looking into using a html updater to post a web page with guild infos/links/stats, but my html skills are rather limited. Maybe I'll look into using an opensourced lib or control for it.




Commands
------------
Register <guildname> <tag> <password>
//register your guild, the password lets you change the guildmaster so keep it safe

Apply <guildname or tag> <message>
//apply to a guild. guildmaster will get the infos stored in message.

Recruit <playername or guid> <message>
//add a member to your guild. guid is the players number (see errors.log) If the member has //not applied to the guild (Apply) then he will be given the message. If he decideds to Apply
//he will be added to the guild.

Setname <newguildname>
//Change the guilds name.

Settag <newtag>
//Change the guilds tag.

List
//List guilds and tags.

Stats
//Get war stats

SetUrl <url>
//set the url people will get with Info

Info <guildname or tag>
//Retrieve information about a guild

Setsum
//add text to your guilds INFO, ie; "We are a tradeing guild..."

Help
// Cmd list. Help may be past as the first param to any command.

War <guildname or tag>
//Declar war on another guild.

Guildmaster <guildname or tag> <password>
//change the guildmaster

Peace <guildname or tag>
//Declare peace with another guild.

Disban
//disbans a guild

Quit
//quits a guild

Kick <guildmember>
// removes a guildmember
Oct 02, 2003 Dagger link
Cool stuff, cem.
Can't wait 'til it's up.

Oh, and can there be two "guildmasters"?
It'd be good for the Defense Ships, as we're two squads. :)

- arc.
Oct 02, 2003 zamzx zik link
OHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH ME WANTS!
Oct 02, 2003 toshiro link
verry naiss...
i will use this, as it is perfect for the CD guild.
Oct 02, 2003 Icarus link
should be able to store/retrieve a guild blacklist too....
Oct 02, 2003 SirCamps link
That'd be a cool feature, Ic.

Archon, we can talk later, but we might as well register as two guilds.

Cembandit, can we have a persistent blacklist stored on the server that both guilds could access?

Say we use DSG1 as Squadron 1, and DSG2 as Squadron 2.

And since "Defense Ship" is our tag, do we just type that in like this:

/Register "DSG1" "Defense Ship" [insert generic password here]

?
Oct 02, 2003 crazydeb8r link
I am asuming htis is a temp thing until the guild feature is put in game, right?
Oct 02, 2003 Phaserlight link
Temp or not, holy crap! Way to go, cembandit! This sounds like an awesome idea. And this, coming from the founder of [EiG]! ;). I guess if you've been on both sides of the law you know the best way to enforce it.
Oct 02, 2003 UncleDave link
Meh, you come to realise that cembandit isnt *that* bad- he just likes to play the bad guy.

This is a very good idea :P
Oct 02, 2003 ctishman link
Way to go, Cem!

Perhaps this project could be integrated with Vendetta Ice?
Oct 02, 2003 SirCamps link
too many cooks spoil good soup
Oct 02, 2003 Pyro link
Shweeet... One typo, though. "Disban" should be "disband". :P

Suggestion: Add in a guild messaging feature. E.g. msg [guildname] [message] sends a message to every member of the guild...
Oct 02, 2003 ctishman link
True, too many cooks can spoil good soup, but a gourmet restaurant usually has more than one chef, each with his own specialty.
Oct 03, 2003 cembandit link
Thank you for the support. When the project is complete I will be looking for someone to run it that is in game more then I am...but thats a bridge we will cross when we get there. New term - gm = guildmaster. Serilization(binary) saves changed to ascii format for now - CStdioFile...Today I will work on the saving of guild data and pumping the saved info into new CGuild classes when the program starts. Working on a linked list to store the new guilds, looking at useing a guid for each guild, as an index number. A pointer to the guildlist[guid] should then be able to access the guild. Added better encapsulation to the guild class. This ment I had to add more access functions, but what ya gonna do? I'll be more then happy to give help to the vendetta ice, with the basic vendetta -> 3rd party prgram functions, but remember I am a win32 user and programmer. I dont know how to peek into other programs with mac or linux. BountyBot, however, can. He uses linux. I will be thrilled when guilds are added in game, I wouldnt care if they were added the day before I released GB. I would still have all the know-how I have gained, and go to work on DuelBot.

The plan
----------
A. Figure out how to access vendetta via program *done*
B. Create a message loop between vendetta and program *done*
C. Creation of the Guild class to hold data and perform
all guild operations for that guild. *prototyped, some
functions are defined*
D. Save the guild data to a human readable text file.*done*
E. Retrieve the saved data and store it in new (dynamic) guild
classes*in progress*
F. Finish off the Guild Class
G. Tweak the code for improvements and readability, clean out
unused varibles.
H. Create whitespace paper (readme) and more comments in code
where I feel the may be needed.
I. Run GuildBot
J. Fix Guildbot
I.-J.-I.-J.-I.-J.-I.-J.-I.
H.Give GuildBot a new home and release the source


Blacklist <playername or guid>
//add a member to your guilds black list, gm function
//anymember of the guild may use it without the param
//to get the list

Disband
//disbands your guild

Broadcast <message>
//sends a message to all online guild members

Pager <message>
// Adds a message into the guilds pager system
//When called without a param will retrieve all pages
//Used for giving info to offline members
//name will be attached automaticly
//ie "<Mr.Boss[LCN]>: We need to exert more pressure on S11"
Oct 03, 2003 SirCamps link
Cemb, as you may have heard, I just got a new computer and I have an older G4/400 sitting here with nothing to do..... ;-) I could run it on that until you sell it, or does it have to be a peecee?
Oct 03, 2003 roguelazer link
Technically, it'd be easier to impliment on a *nix OS than on a PC (all the current bots are Mac OS or Linux based), but I doubt he took that into account. It's win32 only. I'll try it in Wine if you wanna sent it to me, I almost got Vendetta working in wine once so I think I have a pretty good setup...
Oct 05, 2003 cembandit link
From the wine FAQ
9.2. Will MFC work with Wine? What do I need to do?
Wine is not implementing an MFC replacement nor does it intend to. However it is possible (with a lot of work) to compile the MFC from source and thus produce an mfc42.dll.so library.
Please refer to the Winelib User's Guide for how to do this.

Even then, I use an undocumented function called AfxExtractSubString(). Even though it is not documented by MS, it is fairly popular, so it might be supported. I will try my best to make the program linux friendly after I finish the win32 version. Scrapping the mfc support will take a week or two.

Added a datestamp to the guild.sav entrys. Any guild not accessed by a guildmember in 3 months will decay(any command except Quit). A warning message will be posted to the guild pager. Oh yea, I better go add the pager.... The saveing of the file in human readable form is done, yay! Right now I am adding a check so every guild has a different name and tag, and makeing sure no one creates a guild that is already in a guild. The guild.sav file has this format which repeats for every guild. Version number will not increment untill release. Its there in case I change the save format after people have guilds created, so they will not lose thier guilds. Every guild entry of the same version is the same number of lines long, giveing me a powerful tool for parsing.

seperatortag and version
guildmaster
password
guildname
guildtag
memberlist
url
desc
warlist
wantedlist
recruitlist
applicationlist
pagelist
datestamp

heres a copy and past from my save, this one was created via the Register command, notice the default values for many fields. These will be returned by Info, untill the guildmaster overides them with the proper commands. guild.sav will only exist on the machine running guildbot.

|GUILD Ver 1.0|
The Boss
mypass
Just Another Guild
[JaG]
The Boss
www.ackadia.org
No guild description
Not at war
No one is wanted
No recruits
No applications
No pages
4207402/4207396/4207390
Oct 06, 2003 crazydeb8r link
I DID get vendetta working in wine. It was TERRIBLE but it worked. Dont' really remember how I did it though, I should go back and figure that out.