Forums » General

Read me if you've made a bot

12»
Mar 22, 2004 red cactus link
I'm making a bot for Vendetta. There. I said it. I'm not going to say what kind of bot it is. All I'm saying is that it's a replica of a bot that was, but is no more. Anyway, that's not important. What's important is that I've got the framework down, it logs into an IRC server/channel, and uses MYSQL to maintain a database. I am now working on the features. Projected date of completion: 3/28/04. Most likely it'll be later than that.

So, my question. Yes, this thread does have a point. I have a question. I'm asking a question. My question is: are events in Vendetta such as /givemoney the same as regular IRC events for all intents and purposes? I.e. can I simply listen for 'givemoney'? Or do they have specific numbers, or what. Also, for down the line, I need to know how to actually put this bot IN Vendetta. Currently I'm using a test channel as Vendetta, but I don't know how to go about making a character for it, and so on.

I think you should answer this question, because it will help out more people than just me.
edit: What I'm saying is, be nice and help a member of the community out.

Thanks,

-rc
Mar 22, 2004 Sheean link
Well, what I have thought about to communicate the bot with vendetta; is to get one of those 'on screen' type programs, and then modify the source so you could output your stuff to that program. Also, to read the information; you could just read the vendetta log (refresh it like every 0.1 sec or so.) So to get it ingame, start vendetta; login, then run the magic program and it should work. Maybe add that the program will start working when you type /start in console, and will stop working when you type /stop so you can turn it on/off in game.

And I think givemoney is just givemoney in the error log.
Mar 22, 2004 red cactus link
What exactly do you mean by 'on screen' type programs? And would this 'on screen' type program enable me to send money as well? And it appears as if I'm going to have to run a virtual X server so I can be running the Vendetta program. I thought that there might be a way to run the bot simply from my program alone, not through Vendetta. But that's ok. However, will I be able to play under my normal character at the same time? Or in order to do that, must I create a separate account for my bot?

-rc
Mar 22, 2004 Sheean link
Well, I think (but I'm not quite sure) that the only way to get a bot working on vendetta is to make the bot actually type it in vendetta as if you are typing it.

With an on-screen keyboard I mean something like this: http://www.jvbrown.edu/images/aw_onscreenkbrd.jpg

You could try to run Vendetta in a virtual server, but I'm not quite sure if Vendetta would run then (haven't tried it.)

You must use a different account for your bot because you can't login twice into the same account (I think, not quite sure.)
Mar 22, 2004 romikq link
Just send the keyboard messages to the vendetta window, using the FindWindow/SendMessage functions from the win32 api under windows or XSendEvent(or the XTest extension) under linux.
Mar 22, 2004 asphyxia link
yeah, the IRC relay runs by tailing vendetta's error.log, and doing stuff based on the input.

to send commands back to vendetta, do that by sending fake events to the vendetta application.

remember, you'd want to incorporate some basic "mutex" like thing. you dont want crossed transmissions.

and if you are working with money, make sure you get confirmation from errors.log that the transfer was successful before you update any database!

rgds,

asphy
Mar 22, 2004 quiveri link
I am also making a bot for vendetta (hopefully) and need some help. email me: animekrazy2004(at)hotmail[dot]com

ill just tell you that it is being named CashBot and will be NT
Mar 22, 2004 stick link
and i'll just tell you that CPGA (cash prize giveaway) bot does stuff with cash... But you know, i'm always up for partnerships :P

Anyway, good luck RC...

On another note: I'll changing CPGA-Bot because a1k0n has taken the timers off the race tracks...

/me glares at a1
Mar 22, 2004 red cactus link
I noticed the missing timers, but I thought it was just because I didn't enter the right way.

Quiveri: the purpose of this thread was to publicly post information for people such as me and yourself to use...

Stick: don't worry, I won't put you out of business :p

romikq: I thank you. I'm on Linux, and this site http://tronche.com/gui/x/xlib/event-handling/XSendEvent.html looks promising.

Thanks everybody for your input. I'm changing my projected date to the 28th, with all this new information I'm receiving.

-rc
Mar 22, 2004 Cam link
alright i'll chip in

I'm running OS X and I use a program called iKey (ha another "i" program :P) to control Vendetta.

vBot itself is a BASH script, because that was the easiest way i could think to make it. (I'm not a programmer)

the first step for any bot programmer is to make a program that can read the last line of the errors.log continuously, at that point you just have to tell the bot what to do if it sees a specific command, and you're done.

cheers
-Cam-
Mar 22, 2004 roguelazer link
Psudocode:

string buf;
buf = system("tail -F ~/.vendetta/errors.log");

That was, um, hard.
Mar 22, 2004 red cactus link
Roguelazer: Thank you. Now, tell me if there's a way to execute X system calls from bash. More specifically, XSendEvent(). :-)

-rc
Mar 22, 2004 grunadulater link
Hmm... it's not possible to make a remote control fighter, is it? Maybe like a drone of some sort that you control with some unused keys?
Mar 22, 2004 danielky link
grunadulater, vBot is a remote control bot. He's brand new too.
See other thread about vBot.
Mar 22, 2004 igrok link
Java can also generate mouse movements, keystrokes, etc. You could call your java program from bash, which would work ok. Look at the Robot class, which generates these events.
Mar 24, 2004 canadians rock link
you use iKey to control Vendetta? I'm not using a Mac, I'm using Win98. Any programs like iKey that I can use for Win98?

[Edit deleted]
Mar 25, 2004 stick link
canadians rock: if you just want the script to send msg's through the errors log... Python for windows (i use it). http://python.org
Mar 26, 2004 canadians rock link
can someone email me and help me with Python (stick) to make my bot coz im stuck

-yc

[Edit] oops, forgot my email: animekrazy2004[at]hotmail[dot]com
Mar 26, 2004 Sheean link
err... it's better if people just answer to you in the forum. So we don't get 10 posts: 'yeah, mail me that too!'
Mar 26, 2004 canadians rock link
the post IS starting to get bigger and longer.....