Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: mentalCo. on August 07, 2004, 02:52 PM

Title: some pics of my upcomming bot
Post by: mentalCo. on August 07, 2004, 02:52 PM
(http://server6.uploadit.org/files/mentalCo-ScreenHunter_001.jpg)

heres what a config file for it looks like:


//   %1 speaker
//   %2 timestamp
//   %3 text of speaker.  can be used for channels or name of join/leavers
//   %4 usercount
//   %5 ping of bot  //not added yet
//   %6 ping of speaker  //not added yet
//   %7 currentchannel
//   %8 current mp3
//   %9 current config section
//   %v1-1024 used for storing   //not added yet

[normal]
server=63.240.202.139
username=Clinical
password=blahblah
proxy=202.155.36.189:1080
cdkey=1111111111111
homechannel=clinical
&7&*&*&*&:say I just joined %3
[/normal]

[normal3]
server=63.240.202.139
username=jimmy
password=blahblah
proxy=202.155.36.189:1080
cdkey=1111111111111
homechannel=clinical
&7&*&*&*&:say I just joined %3
[/normal3]

[normal4]
server=63.240.202.139
username=cletis
password=blahblah
proxy=202.155.36.189:1080
cdkey=1111111111111
homechannel=clinical
&7&*&*&*&:say I just joined %3
[/normal4]

[normal5]
server=63.240.202.139
username=hank
password=blahblah
proxy=202.155.36.189:1080
cdkey=1111111111111
homechannel=clinical
&7&*&*&*&:say I just joined %3
[/normal5]

[normal2]
server=63.240.202.139
username=fdasafds
password=blahblah
proxy=202.155.36.189:1080
cdkey=2164972276498
homechannel=clinical
&7&*&*&*&:say I just joined %3
[/normal2]

[flood]
:say @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @
:say @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @
:say @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @
:say @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @
:say @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @
:reconnect 1000
[/flood]

[load]
normal
normal2
normal3
normal4
normal5
[/load]

//the triggers to be accessible no matter what section you're in.
[default]
//&7&*&*&*&:load flood
&5&]FBP[*&*&@*&:say %3
&4&]FBP[*&*&@*&:say %3
&5&]FBP[*&*&^&:reconnect
&4&]FBP[*&*&^&:reconnect
&5&]FBP[*&*&!*&:load %3
&4&]FBP[*&*&!*&:load %3
&5&]FBP[*&*&#&:quit
&4&]FBP[*&*&#&:quit
&5&]FBP[*&*&$*&:mp3 %3
&4&]FBP[*&*&$*&:mp3 %3
[/default]
Title: Re:some pics of my upcomming bot
Post by: mentalCo. on August 07, 2004, 03:50 PM
info:
its a massbot-like prgram similar to the old nbbot.  you can load any number of bots up to 1024.  you can select each bot individually in the list and use it as a chat bot.  also you can make your own triggers and/or scripts for each bot in the cfg.  its very similar to nbbot's trigger format because that was nice.  supports STAR/SEXP at the moment but soon the rest of the games.
Title: Re:some pics of my upcomming bot
Post by: iago on August 07, 2004, 04:12 PM
JavaOp is cooler.  I don't care why.  

http://www.valhallalegends.com/iago/javaop.jpg -- ain't it sexy? It looks even cooler now, but I don't feel like Screenshotting a console :)

<edit> what the hell:
http://www.valhallalegends.com/iago/javaop2.jpg

Dynamically loaded event and packet handlers is sexy.  You can add stuff to the bot without touching my code :)
Title: Re:some pics of my upcomming bot
Post by: Banana fanna fo fanna on August 07, 2004, 06:12 PM
Quote from: iago on August 07, 2004, 04:12 PM
JavaOp is cooler.  I don't care why.  

http://www.valhallalegends.com/iago/javaop.jpg -- ain't it sexy? It looks even cooler now, but I don't feel like Screenshotting a console :)

<edit> what the hell:
http://www.valhallalegends.com/iago/javaop2.jpg

Dynamically loaded event and packet handlers is sexy.  You can add stuff to the bot without touching my code :)

Did that already.

Give it a porn skin!
Title: Re:some pics of my upcomming bot
Post by: mentalCo. on August 07, 2004, 07:01 PM
ya you can load a whole new set of triggers in a section just like nbbot used to do.  im adding javascript parsing in the near future.
Title: Re:some pics of my upcomming bot
Post by: Soul Taker on August 08, 2004, 09:22 AM
"FUCK ART LETS KILL"?
Title: Re:some pics of my upcomming bot
Post by: R.a.B.B.i.T on August 09, 2004, 12:40 AM
I hate to break it to you, but floodbots and massbots are not only pointless, they are stupid.
Title: Re:some pics of my upcomming bot
Post by: Maddox on August 09, 2004, 01:12 AM
Those are some ugly bots.
Title: Re:some pics of my upcomming bot
Post by: Zakath on August 09, 2004, 11:50 AM
Quote from: Maddox on August 09, 2004, 01:12 AM
Those are some ugly bots.

I have to agree. That's one of the ugliest user interfaces I've ever seen.
Title: Re:some pics of my upcomming bot
Post by: Banana fanna fo fanna on August 09, 2004, 03:57 PM
yeah that looks like it was designed to be confusing
Title: Re:some pics of my upcomming bot
Post by: ChR0NiC on August 10, 2004, 02:57 AM
I thought the name "The Slammer" was cute that he actually was trying :P
Title: Re:some pics of my upcomming bot
Post by: Arta on August 10, 2004, 07:30 AM
Shall we lock this to protect the poster from further embarrassment?  8)
Title: Re:some pics of my upcomming bot
Post by: OnlyMeat on August 10, 2004, 08:38 AM
Quote from: iago on August 07, 2004, 04:12 PM
JavaOp is cooler.  I don't care why.  

http://www.valhallalegends.com/iago/javaop.jpg -- ain't it sexy? It looks even cooler now, but I don't feel like Screenshotting a console :)

<edit> what the hell:
http://www.valhallalegends.com/iago/javaop2.jpg

Not heard of the new revolution? it's called GUI :P

Quote from: iago on August 07, 2004, 04:12 PM
Dynamically loaded event and packet handlers is sexy.  You can add stuff to the bot without touching my code :)

Why not just add scripting support?
Title: Re:some pics of my upcomming bot
Post by: hismajesty on August 10, 2004, 09:11 AM
Quote from: OnlyMeat on August 10, 2004, 08:38 AM
Quote from: iago on August 07, 2004, 04:12 PM
JavaOp is cooler.  I don't care why.  

http://www.valhallalegends.com/iago/javaop.jpg -- ain't it sexy? It looks even cooler now, but I don't feel like Screenshotting a console :)

<edit> what the hell:
http://www.valhallalegends.com/iago/javaop2.jpg

Not heard of the new revolution? it's called GUI :P

Why does a moderation bot need a GUI?
Title: Re:some pics of my upcomming bot
Post by: OnlyMeat on August 10, 2004, 09:21 AM
Quote from: hismajesty[yL] on August 10, 2004, 09:11 AM
Quote from: OnlyMeat on August 10, 2004, 08:38 AM
Quote from: iago on August 07, 2004, 04:12 PM
JavaOp is cooler.  I don't care why.  

http://www.valhallalegends.com/iago/javaop.jpg -- ain't it sexy? It looks even cooler now, but I don't feel like Screenshotting a console :)

<edit> what the hell:
http://www.valhallalegends.com/iago/javaop2.jpg

Not heard of the new revolution? it's called GUI :P

Why does a moderation bot need a GUI?

For the user to configure it in the first place?, Unless your bots autoconfigure themselfs :p
Title: GUIs
Post by: Kp on August 10, 2004, 09:34 AM
It seems rather wasteful to design a massive GUI just to configure a bot.  Just document the configuration file format and tell them to use a text editor.
Title: Re:GUIs
Post by: OnlyMeat on August 10, 2004, 10:10 AM
Quote from: Kp on August 10, 2004, 09:34 AM
It seems rather wasteful to design a massive GUI just to configure a bot.  Just document the configuration file format and tell them to use a text editor.

Who said anything about a massive GUI?, a few dialog's massive? lol

Thats what windows is based on windows messaging//GUI interface i.e the purpose of GDI//user32.dll ( Assuming the bot is targeted for windows, if not then well then it wont apply to 90% of users around the globe )

Configuration files are real user friendly :(, why not just get the user to write a help file for you while hes at it?

Then you have the potential for file format errors caused by the user entering the data wrong, as apposed to using a self validating user friendly GUI let the people decide :)

If we follow your logic why does'nt windows or IE just use configuration files that the user must edit directly instead of a clean easy to use self validating GUI?
Title: Re:some pics of my upcomming bot
Post by: hismajesty on August 10, 2004, 10:54 AM
Configuration files are easy, and many times I prefer them over a GUI setup form.

If they can't fill out a username, password, server, cdkey, and channel without messing it up, they shouldn't be using the bot anyway.

Also, if this is like the console based JBBot, it has input boxes when the bot starts.

What does Windows have to do with it? Java is cross-platform, and a lot of this bot was designed/tested on a Linux operating system. If people can't figure it out they can go back to using the kiddie-friendly Stealthbot.
Title: Re:some pics of my upcomming bot
Post by: Banana fanna fo fanna on August 10, 2004, 11:30 AM
Quote from: OnlyMeat on August 10, 2004, 08:38 AM
Quote from: iago on August 07, 2004, 04:12 PM
JavaOp is cooler.  I don't care why.  

http://www.valhallalegends.com/iago/javaop.jpg -- ain't it sexy? It looks even cooler now, but I don't feel like Screenshotting a console :)

<edit> what the hell:
http://www.valhallalegends.com/iago/javaop2.jpg

Not heard of the new revolution? it's called GUI :P

Quote from: iago on August 07, 2004, 04:12 PM
Dynamically loaded event and packet handlers is sexy.  You can add stuff to the bot without touching my code :)

Why not just add scripting support?

Because native java code is faster, and instead, he could write a scripting plugin that is dynamically loaded, so you kill 2 birds with 1 stone.
Title: Re:some pics of my upcomming bot
Post by: iago on August 10, 2004, 12:46 PM
hismajesty and others already answered this, but eh?

For configuration, I use java.util.Properties.  It generates a file that looks like this:
debug=false
cdkey=
trigger=%
port=6112
server=63.240.202.130
username=iago
homeChannel=op e1-
returnPing=true
password=
loud=false
game=warcraft iii


If you can't figure out to edit that, kill yourself.

Next, I want it to run as what Windows people would call a "service".  That is, run in the background when the computer starts.  If I have a console like the one you see, I can redirect stdout to a file and thus, I have a log file.  If I had a gui, I would have to write seperate stuff for running it headless.

Finally, it's going to have a client-server model.  What you're seeing is the server, and the client doesn't exist yet.  The client can be programmed in your favourite language for that platform and interface with the server either locally or remotely.  This offers the flexibility of a strong Java back end with a pretty gtk or vb front end.

And I screenshoted the console, yes, and it looks nicer than yours.  So owned!

New screenshot:
http://www.valhallalegends.com/iago/javaop3.jpg
Title: Re:some pics of my upcomming bot
Post by: Soul Taker on August 10, 2004, 01:07 PM
So not a working link!
Title: Re:some pics of my upcomming bot
Post by: hismajesty on August 10, 2004, 01:16 PM
Quote from: Soul Taker on August 10, 2004, 01:07 PM
So not a working link!

That's because jbbot3 doesn't exist.

http://www.valhallalegends.com/iago/javaop3.jpg
Title: Re:some pics of my upcomming bot
Post by: iago on August 10, 2004, 02:24 PM
Quote from: hismajesty[yL] on August 10, 2004, 01:16 PM
Quote from: Soul Taker on August 10, 2004, 01:07 PM
So not a working link!

That's because jbbot3 doesn't exist.

http://www.valhallalegends.com/iago/javaop3.jpg

It exists, it's just not maintained anymore.  JavaOp is its successor, using much of the same code.

And I edited/fixed the link.
Title: Re:some pics of my upcomming bot
Post by: OnlyMeat on August 10, 2004, 07:02 PM
Quote from: $t0rm on August 10, 2004, 11:30 AM

Because native java code is faster, and instead, he could write a scripting plugin that is dynamically loaded, so you kill 2 birds with 1 stone.

Correct me if im wrong but is'nt java compiled to a pseudo//Byte code format that uses a JIT at runtime to provide native support?

Which means both java and scripting ( and if you encode activex scripts they produce the same sort of byte code output ) are interpreted at runtime?

If they are both interpreted at runtime how can native java be faster ? java is never really native when the code actually runs it;s just interpreted exactly the same as scripting.

Your second point - if you are going to add scripting support why is their a need for dynamic loading? scripting support would be loaded at the start of the program, and if you want it to be some kind of plugin why not just use loadlibrary??, infact if you are making some kinda of server scripting it should really exist in a completely distinct process for safety reasons as you dont want the scripting to cause a gpf while injected into your main process.
Title: Re:some pics of my upcomming bot
Post by: MyndFyre on August 10, 2004, 07:33 PM
Quote from: OnlyMeat on August 10, 2004, 09:21 AM
Quote from: hismajesty[yL] on August 10, 2004, 09:11 AM

Why does a moderation bot need a GUI?

For the user to configure it in the first place?, Unless your bots autoconfigure themselfs :p

My bot reads my mind.
Title: Re:some pics of my upcomming bot
Post by: Eli_1 on August 10, 2004, 07:35 PM
Quote from: Myndfyre on August 10, 2004, 07:33 PM
Quote from: OnlyMeat on August 10, 2004, 09:21 AM
For the user to configure it in the first place?, Unless your bots autoconfigure themselfs :p

My bot reads my mind.


That would cause some major configing issues with 90% of your bot users.
Title: Re:some pics of my upcomming bot
Post by: Tuberload on August 10, 2004, 07:39 PM
Quote from: OnlyMeat on August 10, 2004, 07:02 PM
Quote from: $t0rm on August 10, 2004, 11:30 AM

Because native java code is faster, and instead, he could write a scripting plugin that is dynamically loaded, so you kill 2 birds with 1 stone.

Correct me if im wrong but is'nt java compiled to a pseudo//Byte code format that uses a JIT at runtime to provide native support?

Which means both java and scripting ( and if you encode activex scripts they produce the same sort of byte code output ) are interpreted at runtime?

If they are both interpreted at runtime how can native java be faster ? java is never really native when the code actually runs it;s just interpreted exactly the same as scripting.

None of your points make sense... Being able to dynamically load classes at run time gives you the power of the language you are using, so why would you need a scripting language? Why waste time interpreting a language with a language that is already interpreted...

QuoteYour second point - if you are going to add scripting support why is their a need for dynamic loading? scripting support would be loaded at the start of the program, and if you want it to be some kind of plugin why not just use loadlibrary??, infact if you are making some kinda of server scripting it should really exist in a completely distinct process for safety reasons as you dont want the scripting to cause a gpf while injected into your main process.

What exactly are you arguing about? It sounds like you haven't heard a thing anyone has said so far...
Title: Re:some pics of my upcomming bot
Post by: MyndFyre on August 10, 2004, 07:40 PM
Quote from: OnlyMeat on August 10, 2004, 07:02 PM

Correct me if im wrong but is'nt java compiled to a pseudo//Byte code format that uses a JIT at runtime to provide native support?
That is correct.
Quote from: OnlyMeat on August 10, 2004, 07:02 PM
Which means both java and scripting ( and if you encode activex scripts they produce the same sort of byte code output ) are interpreted at runtime?

If they are both interpreted at runtime how can native java be faster ? java is never really native when the code actually runs it;s just interpreted exactly the same as scripting.
No, it's not *exactly* the same as Scripting.  Java's bytecode is much closer to low-level language, *AND* because it's binary, you don't need to worry about "tokens," which are the text words and operators used in a high-level language.

Also, in script environments, variables are type-evaluated at runtime.  Which means, while Java decides types at compile-time, JavaScript has to worry about making sure methods exist on a variable before calling that method on a variable.

Quote from: OnlyMeat on August 10, 2004, 07:02 PM
Your second point - if you are going to add scripting support why is their a need for dynamic loading? scripting support would be loaded at the start of the program, and if you want it to be some kind of plugin why not just use loadlibrary??, infact if you are making some kinda of server scripting it should really exist in a completely distinct process for safety reasons as you dont want the scripting to cause a gpf while injected into your main process.
Since you missed, JavaOp is written in Java, and since it's meant for cross-platform compatibility, it can't rely on platform-specific functions such as LoadLibraryA and LoadLibraryW.

Title: Re:some pics of my upcomming bot
Post by: Banana fanna fo fanna on August 10, 2004, 07:59 PM
Quote
Correct me if im wrong but is'nt java compiled to a pseudo//Byte code format that uses a JIT at runtime to provide native support?

Correct

Quote
Which means both java and scripting ( and if you encode activex scripts they produce the same sort of byte code output ) are interpreted at runtime?

Correct

Quote
If they are both interpreted at runtime how can native java be faster ? java is never really native when the code actually runs it;s just interpreted exactly the same as scripting.

Well, if your interpreter is written in Java, it's going to be running "java-speed." Thus, your interpreter will be running at "java speed" + "interpreter speed", which is slower than just native java bytecode.

Quote
Your second point - if you are going to add scripting support why is their a need for dynamic loading? scripting support would be loaded at the start of the program, and if you want it to be some kind of plugin why not just use loadlibrary??, infact if you are making some kinda of server scripting it should really exist in a completely distinct process for safety reasons as you dont want the scripting to cause a gpf while injected into your main process.

This is java my friend...we don't get GPFs :)

Why not implement scripting as a plugin? Then you get the best of both worlds, with zero drawbacks?
Title: Re:some pics of my upcomming bot
Post by: iago on August 10, 2004, 08:29 PM
To add to MyndFyre's point, not only does it not have to worry about processing tokens, it can also arrange the code in a tree of sorts (in a logical order for the processor) instead of in an order that is logical for the human writing it.  

I timed CheckRevisions on my computer:
War2/starcraft: 60ms
War3 700ms (the first time, to load the file) and about 150ms after that.  

Compare that to how long it takes in Visual Basic or Perl, and you'll find that Java is considerably faster.
 

<edit> if any mods of this board are still reading, can you move this over to my forum?  This has turned into a discussion about my bot :)
Title: Re:some pics of my upcomming bot
Post by: Banana fanna fo fanna on August 10, 2004, 08:34 PM
I could spend a few days writing a scripting language...or


Class.forName(cfgfile.getProperty("pluginName"));
Title: Re:some pics of my upcomming bot
Post by: Blaze on August 10, 2004, 09:33 PM
Why would you need up to 1024 bots? You can only load 8 connections to b.net from one ip...
Title: Re:some pics of my upcomming bot
Post by: DeTaiLs on August 10, 2004, 10:52 PM
That is why they made little things called proxies
Title: Re:some pics of my upcomming bot
Post by: LordNevar on August 10, 2004, 10:53 PM
Quote from: Kk)Blaze(kK on August 10, 2004, 09:33 PM
Why would you need up to 1024 bots? You can only load 8 connections to b.net from one ip...

I think I just got dumber from reading this statement.
Title: Re:GUIs
Post by: tA-Kane on August 12, 2004, 12:19 PM
Kind've a late reply, but w/e

Quote from: OnlyMeat on August 10, 2004, 10:10 AMAssuming the bot is targeted for windows, if not then well then it wont apply to 90% of users around the globe
That number is dropping every day. In fact, I don't think it's even accurate anymore... I'd say it's closer to 80%

Quote from: OnlyMeat on August 10, 2004, 10:10 AMThen you have the potential for file format errors caused by the user entering the data wrong, as apposed to using a self validating user friendly GUI
Just because it's a gui, it doesn't automatically mean it's "self validating". It's just as easy to fuck up the GUI's load/save code as it is to fuck up a file manually.

Quote from: OnlyMeat on August 10, 2004, 10:10 AMIf we follow your logic why does'nt windows or IE just use configuration files that the user must edit directly instead of a clean easy to use self validating GUI?
The biggest difference is the sheer number of options available in Windows and IE. If you don't know exactly the name of the preference you're looking for, it would take a while to find it, even using a text editor's find feature. With a good GUI, you should be able to find it simply by going through the type categories. For example, if you're looking to enter your CD key, you go to either the connection category (since it's a connection-time thing) or the general preferences category (since the programmer would then be too stupid to put it into a connection category).
Title: Re:some pics of my upcomming bot
Post by: Blaze on August 12, 2004, 12:24 PM
Quote from: Twix on August 10, 2004, 10:52 PM
That is why they made little things called proxies

I know but, who in there right mind would need 1024 bots?
Title: Re:some pics of my upcomming bot
Post by: MyndFyre on August 12, 2004, 01:20 PM
Quote from: Kk)Blaze(kK on August 12, 2004, 12:24 PM
Quote from: Twix on August 10, 2004, 10:52 PM
That is why they made little things called proxies

I know but, who in there right mind would need 1024 bots?

If 1,024 is just an arbitrary limit, I would suggest *not* building it into your bot.

When I was originally designing my bot, I designed it to support three connections (you can see this with the screenshots (http://www.armabot.net/screenshots.aspx) at the bottom), selectable by a ListBox.

As I discovered *very* quickly, three simultaneous connections was a very inhibiting limit.  Suppose this --

1.) I run the channel moderation bot, AoA, for my clan.
2.) I want to idle in Op [vL]
3.) I want to run a channel web chat client (with a plugin for my bot) in AoA's channel.
4.) I want to idle in Op e1- on west.

There I am stuck. :/

I realize this doesn't necessarily apply to loaders.  However, what I'm trying to get at is if you want to use multiple connections, don't design those connections with an arbitrary limit in mind, because one day you may want to get past that limit, and sometimes that's not easy to do if you've been hard-coding that restriction at every turn.
Title: Re:some pics of my upcomming bot
Post by: iago on August 12, 2004, 02:07 PM
On mine, each bot is just an instance of my class so I can make as many bots as I want, technically:

BNetSocket []bots = new BNetSocket[100000];

for(int i = 0; i < 100000; i++)
 bots = new BNetSocket("profile" + i);
Title: Re:some pics of my upcomming bot
Post by: iago on August 13, 2004, 01:55 AM
Another advantage to console is I can run it like this:

iago@darkside:~$ java Main iago > ~/public_html/exile.txt &

And all the output will end up here:
http://iago.valhallalegends.com/~iago/exile.txt

Sexy, eh?