Thread

Ite.. prob with sdk.AwWorldEject (Sdk)

Ite.. prob with sdk.AwWorldEject // Sdk

1  |  

lanezeri

Jan 6, 2001, 6:58pm
The help page gives an example to eject from the chat text.. I need to know
how to make it eject a citizen from a name I put in a textbox.. anyone know
what to do?

grimble

Jan 6, 2001, 8:25pm
OK, this is going to be a little more work that you probably expect.

aw_world_eject (as you probably know) needs the session number of the user.
When you are processing a chat message, you have the session number from the
SDK. When you want to go from an avatar name, you first need to get the
session number for that name. Unfortunately, the SDK only allows you to
resolve the citizen details from the name ... which unfortunately do not
include the current session number is any - probably something to do with
the way the active users are keyed in the world server.

This means that you will need to maintain a session table within the bot,
monitoring the AW_AVATAR_ADD and AW_AVATAR_DELETE events and store newly
arriving users and deleting the old ones. Then, when you use their name from
in the bot command, you find the session from your own stores and eject
using that session number. A comparatively large amount of work for simple
requirement, I know, but that's the way.

One thing to remember is that you only get the AW_AVATAR_ADD/DELETE messages
from within the bot's speaking radius so ...

(a) The bot's position needs to be announced (aw_state_change) and so must
be visible in the world, and
(b) The bot will only know about avatars within the speaking radius relating
to the rights of the citizen number used.

If you have a large world ... you will need several bots, all reporting to a
central session table. I don't believe there are any such restrictions on
the actual aw_world_eject call because its a world related command.

I'm sure there are sites on the web with simple session table code you you
can use to save you a bit of time. Otherwise, let us know what you're using
(C/C++, VB, Delphi, Java, etc) and maybe someone could donate a
mini-projects as an example for you to use instead.

Good luck.

Grims



[View Quote]

lanezeri

Jan 6, 2001, 8:53pm
Thanks! I think I got it.. I just need to test it..

the derek

Jan 7, 2001, 11:38pm
ive got some sample code on my site
http://www.mailoto.com/bots/scripts.html
there is a script there to show how to store avatar names & sessions

[View Quote] > The help page gives an example to eject from the chat text.. I need to know
> how to make it eject a citizen from a name I put in a textbox.. anyone know
> what to do?

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