edward // User Search

edward // User Search

1  |  

Available Bots?

Nov 23, 1999, 6:24am
I am not quite sure what you are after Andrew but I have some sample bots that I
ship with my interface to the Active Worlds SDK.


What are you looking for?

[View Quote] > Does anyone have any bots that they give away? I have looked around at
> Imabot, Xelagot, and other kinds of bots like that. I am talking more of the
> homegrown variety. Also, I would be willing to help with beta-testing of
> bots. Let me know.
> Thanks,
> Andrew Bugera(Agent1)

SDK C++ buggers...

Nov 14, 1999, 8:35pm
You need to think about the OO model you are using. Think about the bot
objects and the Window objects as being separate, which I guess you are
doing now because that is your problem. Then define the interface
between the two.

For example, lets say you have a bot that has botsay and botchat
methods. You also have a gui class that has a showchat and an entersay

Each object will have to pass information to the other object. The bot
must pass chat text to the window and the window must pass say text to
the bot.

class Bot
botchat {
window. showchat(message);
botsay (char message) {

class window
showchat(message) {
Login = message;
refresh windows;
entersay {

The only other thing you have to do is let the bot know which window
object it is interfacing with and then tell the window which bot it is
interfacing with.

main {

Bot b = new Bot();
Window w = new Window();

b.setWindow( w );
w.setBot( b );

This is a simple design pattern and can be extended depending on the
flexability that you need.

[View Quote] > Got a problem... it's probably not hard to fix, i'm just missing
> something...
> making a GUI SDK bot... and can't get the chat message from the void
> chat() function back to the C++ side of it to print to the chat
> window... anyone understand?
> I'll post some example code to try to illustrate my problem...
> //preprocessing...
> void chat(void);
> CString Message;
> ...
> CSDKDlg::OnLogin( ){
> ... //login junk...
> aw_event_set(AW_EVENT_CHAT, chat);
> .../rest of login junk...
> (btw, the Chat Window variable in the dialog box is 'CString Login')
> }
> void chat(void) {
> Message = aw_string(AW_AVATAR_NAME) + ": ";
> Message += aw_string(AW_CHAT_MESSAGE) + "\r\n";
> }
> now, up to this point, it works all fine... but how do I send the
> Message BACK into the CString Login so it will refresh on the chat
> window???
> any takers? Ask if you need more code posted... I'm not sure if this
> makes it clear enough...
> Veleno
> Co-Owner of "damascus"
> 297593

AW SDK Thread-safe?

Mar 1, 2000, 6:42pm
It will have lots of problems with that.

The API requires that you use aw_instance to select the bot and then make
the call required. In a multi threaded process there is no guarantee that
once the aw_instance is called that another bot thread will not cut in and
perform some action.

Your only solution is to use fork or the windows equivalent
Win32::CreateProcess. Sorry not a big window chappy.

[View Quote]

1  |  
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn