Server Help

Bot Questions - second bot from dll

Cheese - Sat Sep 13, 2008 3:49 pm
Post subject: second bot from dll
is it possible to launch a bot using a plugin using mervbot?

ive been poking around the src code somewhat...
k0zy - Sat Sep 13, 2008 6:38 pm
Post subject:
You can load plugins dynamically using !spawn, I think.
Cheese - Sun Sep 14, 2008 1:10 am
Post subject:
not loading a plugin from a bot...
loading a bot from a plugin


and also, im looking for a good example code of bot fliying, shooting, laying bricks, etc
k0zy - Sun Sep 14, 2008 4:20 am
Post subject:
So you want to spawn another instance of the mervbot.exe or what?
Maverick - Sun Sep 14, 2008 11:27 am
Post subject:
Cheese, maybe this is what you're looking for?

http://maverick.sscentral.com/downloads/details.php?id=42
Samapico - Sun Sep 14, 2008 1:36 pm
Post subject:
I suggest mav's spawnbot


As for a bot moving, there's always the AIbot, don't know if the source of this was public though.
Making it move is far from easy, though... Shooting weapons is not that hard, but moving is another story.
Purge - Sun Sep 14, 2008 3:35 pm
Post subject:
Or this.
Cheese - Mon Sep 15, 2008 12:49 am
Post subject:
purge kept it simple, all his does is have the bot pm itself a merv command.

mavs is actually closer to what i was aiming to do...
he used
tell(makeSpawnBot(name,password+"*"+staffpw,"",arena));
which is what i was looking for, specifically.

i also noticed you used
tell(makeChangeArena(aarena));
where can i find a list of all the possible tell() events?
Purge - Mon Sep 15, 2008 7:38 am
Post subject:
I used !spawn so I can choose which plugins to load. sa_tongue.gif

I think the tell events are located in the dllcore source (not sure).
Maverick - Mon Sep 15, 2008 10:07 am
Post subject:
search for "makeSpawnBot" and you'll find the goodies?
Samapico - Mon Sep 15, 2008 12:16 pm
Post subject:
Mav's bot spawns the bot, then the spawn says something in the chat to the spawner to indicate it is ready, then the spawner goes in the arena where the bot was spawned, and makes it !load the required plugin(s)

I think

Of course, Mav is better placed than me to explain how it works tongue.gif
Cheese - Mon Sep 15, 2008 3:20 pm
Post subject:
Cheese wrote:

where can i find a list of all the possible tell() events?


thats really all i wanted.


also, is there -any way possible- to have the merv core spawn a second bot to another ip/port?
aside from making a dll that has almost the entire core src...

-edit-
search here returned nothing.
checked the wiki, nothing as well...
searching BOTH yahoo and google returned nothing. (about 10 results combined)
Samapico - Mon Sep 15, 2008 3:23 pm
Post subject:
You could always execute a different exe (that has its own mervbot.ini)

and you could use window messages to close the exe as well
Cheese - Tue Sep 16, 2008 4:18 pm
Post subject:
really?
noone knows anything about tell()?
Samapico - Tue Sep 16, 2008 5:57 pm
Post subject:
search in the core, you'll find these

with a couple of right-click -> definition/declaration you can certainly reach them
Cheese - Tue Sep 16, 2008 11:29 pm
Post subject:
that was a good idea =p

after that, found everything almost instantaneously =P

anyone that cares, the BotEvent struct followed by possibilities of use is in dllcore.h, and the definitions are in dllcore.cpp.




















new post:

another hurdle to that i have to cross is:
i can now spawn new bots, but have no way to make them do things instead of the core bot...

for instance, i can tell Bot1 !do, Bot2 enters arena.
but is it possible to make Bot2 say anything after it enters?
Samapico - Wed Sep 17, 2008 11:14 am
Post subject:
One way would be to have them both in the same chat channel, and make the bots communicate 'orders' in there.

Of course, bot2 needs to have a specific plugin loaded to fit what you want to do.

If you simply want bot2 to do things on its own, then yeah, just !load a plugin on him; but if you want him to react on bot1's actions, you'll probably need to make them chat a bit. If they are in the same arena, they can use simple private messages, but if they can be anywhere, chat channel would be the way to go.
Purge - Wed Sep 17, 2008 12:04 pm
Post subject:
Purge wrote:
I used !spawn so I can choose which plugins to load. sa_tongue.gif

I think the tell events are located in the dllcore source (not sure).

Cheese wrote:

really?
noone knows anything about tell()?


Didn't I answer that already?
Cheese - Wed Sep 17, 2008 5:38 pm
Post subject:
well, i think i have reached the limits of what the merv core is capable of.

it simply has no reliable way to generate more then one bot from a dll, in which full control is given over the actions of each individual bot.

even in something as simple as bot1 spawning bot2, bot1 saying "i am bot 1", then bot 2 saying "i am bot 2", is impossible, as the message queueing and nonspecific sending system makes the messaging seemingly random...
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group