|
mrgrimm // User Search
mrgrimm // User Search
Nov 30, 1998, 1:41am
I was bored last night so I decided I would spend the night trying to
get the SDK to work with VB. After about 5 hours of working on a dll, I
finally got it to work, events/callbacks/everything. All thats left to
do is fix a bug in the aw_int method, it's returing incorrect values.
I'm not sure when I will release the VB AW SDK yet but for now I will be
hanging around in AWTech messing around with it to make sure there arent
any other wierd bugs (it's quite nice :o).
Dec 8, 1999, 2:15am
I didn't correctly implement the callbacks. I forgot to pass the RC value to
them. I have a new version of the ocx which I will release soon which fixes,
and adds, many features. Im also working on some documentation explaining
how to use the Ocx and how to use some of the functions that don't even
closely resemble the original sdk (like AwQuery). For now, if you would like
the current build of the Ocx tgram me in AW (Name: MrGrimm).
-MG
Some other fixes: Click events should work, instances (each instance is now
a separate bot instance), added enums, fixing some IP Address functions (so
it returns a string "x.x.x.x" , not a number).
[View Quote]
> Does anyone have a working example of using callback with Mr.Grim's ocx?
>
> WorldList would be especially appreciated.
>
> Thanks
> Norm Lane
Dec 18, 1999, 12:32am
I have updated the ocx, the website is at
http://members.home.com/grimmcna/
Apr 7, 2000, 1:48am
You can try using LoadLibrary and GetProcAddress. Basically you are just
loading the functions on the fly from the dll instead of using the lib
file ... here's a sample of how it can be done:
///////////////////////////////////
typedef int(*AW_INIT)(int);
typedef void(*AW_TERM)(void);
AW_INIT aw_init;
AW_TERM aw_term;
HINSTANCE hlib;
hlib=LoadLibrary("aw.dll");
aw_init=(AW_INIT)GetProcAddress(hlib,"aw_init");
aw_term=(AW_TERM)GetProcAddress(hlib, "aw_term");
//Do the following while closing the app:
FreeLibrary(hlib);
///////////////////////////////////
[View Quote]john viper wrote:
>
> I got to thinking that I oughta test it to see if it is a 3.0 bug or an
> overall SDK bug.
>
> I downloaded the old 2.2 SDK, recompiled it, and I get the same message,
> therefore it is the SDK overall. Are there any aw SDKs avilable to us
> Borland programmers?
>
> _________________________
> John Viper
> - -
> Go to http://www.getpaid4.com/cgi-bin/emailpanel.cgi?userid=176406 to
> receive FREE newsletters via email!
> Go to http://www.getpaid4.com?ticklejw to make $$$ using YOUR OWN computer
> and sigining subscribers in YOUR OWN emails!
> john viper <ticklejw at bkon.net> wrote in message
> news:38ed1c98 at server1.Activeworlds.com...
> then
|
Apr 9, 2000, 7:31am
You enter the other universe while calling AwCreate:
AwSdkOcx1.AwCreate "universe.domain.com", lngPort
[View Quote]chandler wrote:
>
> i use mrgrimm's OCX..and i was wondering how you make the bot enter another
> universe besides AW (like ameriworld, OW etc.)
|
Apr 16, 2000, 3:02am
You cant use QuickStart to enter another universe.
[View Quote]chandler wrote:
>
> im using mrgrimm's msvb wrapper
> --
> i know the code to get it into other universes, but it wont work...here's
> what my login code is for tagbot:
>
> -------------------------------
> Universe = GetSetting("TagBot", "Universe", "Server")
> CitNum = GetSetting("TagBot", "Universe", "Citnum")
> CitPass = GetSetting("TagBot", "Universe", "PPW")
> World = GetSetting("TagBot", "Universe", "World")
> MyName = GetSetting("TagBot", "Universe", "MyName")
> MyOwner = GetSetting("TagBot", "Universe", "MyOwner")
> timAwWait.Enabled = True
> sdk.AwInit AW_BUILD
> sdk.AwCreate Universe, "5670"
> sdk.QuickStart CitNum, CitPass, MyName, "TagBot build 1", World, 3000, 200,
> 1000, 2250, 0
> --------------------------------
|
Apr 17, 2000, 7:44am
Do something like this..This is a vb version of the QuickStart
with the domain support..I havent tested this but this should
give you an idea:
Public Function QuickStart2(Owner as string, Password as string, _
BotName as string, Application as string, _
World as string, X as long, Y as long, _
Z as long, Yaw as long, Type as long, _
strDomain as string, lngPort as long) as Long
With sdk
rc=.AwCreate(strDomain,lngPort)
If rc <> 0 Then
.AwDestroy
QuickStart2 = rc
Exit Sub
End If
.EnableAllEvents
.EnableAllCallbacks
.AwLoginOwner = Owner
.AwLoginPrivilegePassword = Password
.AwLoginName = BotName
.AwLoginApplication = Application
rc=.AwLogin
if rc <> 0 Then
.AwDestroy
QuickStart2 = rc
Exit Sub
End If
rc=.AwEnter(World, 0)
If rc <> 0 Then
.AwDestroy
QuickStart2 = rc
Exit Sub
End If
.AwMyX = X
.AwMyY = Y
.AwMyZ = Z
.AwMyYaw = Yaw
.AwMyType = Type
rc=.AwStateChange
If rc <> 0 Then
.AwDestroy
QuickStart2 = rc
Exit Sub
End If
End With
QuickStart2 = rc
End Sub
[View Quote]chandler wrote:
>
> what do i use then?
>
> mrgrimm wrote in message <38F9471D.4D1E0A32 at home.com>...
> 200,
|
Jan 5, 2001, 5:12am
I read these newgroups all the time, I just don't bother replying.
I haven't had any problems with querying, it's most likely something in your
code.
-MrGrimm
[View Quote]"the derek" <ImTheDerek at yahoo.com> wrote in message
news:3A553E90.7618BF45 at yahoo.com...
> i know that.. but it isnt getting all the property around the bot..i take
it
> mrgrimm aint on these ngs
>
> grimble wrote:
>
query,
This is
linked
based on
>
|
Jan 27, 2001, 5:11am
Error -1 means aw.dll was not found.
-MrGrimm
[View Quote]"constructeur0" <sdg at fsda.vop> wrote in message
news:3A717D28.5D199791 at fsda.vop...
> HI
> i tried the greeter bot but i get the error -1 when he tries to login in
> with the user id and password.
> And is it possible with the ocx controls to change the server from
> Active Worlds ot EduVerse
>
> Constructeur0
>
|
Feb 11, 2001, 9:41am
The QuickStart function is equivalent to:
Public Function QuickStart(Owner As Long, Password As String, Botname As
String, _
Application As String, World As String, _
X As Long, Y As Long, Z As Long, Yaw As Long, lType As Long)
As Long
Dim rc As Long
rc = awSDK.AwCreate("", 0)
If rc Then
awSDK.AwDestroy
QuickStart = rc
Exit Function
End If
awSDK.EnableDefaultEvents
awSDK.EnableDefaultCallbacks
awSDK.AwLoginOwner = Owner
awSDK.AwLoginPrivilegePassword = Password
awSDK.AwLoginName = Botname
awSDK.AwLoginApplication = Application
rc = awSDK.AwLogin
If rc Then
awSDK.AwDestroy
QuickStart = rc
Exit Function
End If
rc = awSDK.AwEnter(World, 0)
If rc Then
awSDK.AwDestroy
QuickStart = rc
Exit Function
End If
awSDK.AwMyX = X
awSDK.AwMyY = Y
awSDK.AwMyZ = Z
awSDK.AwMyYaw = Yaw
awSDK.AwMyType = lType
rc = awSDK.AwStateChange
If rc Then
awSDK.AwDestroy
QuickStart = rc
Exit Function
End If
QuickStart = 0
End Function
'///////////////////////////////////////////////////////////
QuickStop is equivalent to:
Public Sub QuickStop()
awSDK.AwDestroy
End Sub
-MrGrimm
[View Quote]"brant" <awteen at shoemakervillage.org> wrote in message
news:3a85e2f1 at server1.Activeworlds.com...
> There seems to be a problem with the Quickstart routine of the VB SDK.
For
> example, when I use QuickStart, IP querying a person returns 0.0.0.0 every
> time. However, when I log in the bot the traditional way, the AwAddress
> function works fine.
>
> My suggestion: avoid the QuickStart and QuickStop functions and log in
the
> bot using AW's functions - maybe it will fix the problem.
>
> "the derek" <ImTheDerek at yahoo.com> wrote in message
> news:3A80BE22.D8710AF9 at yahoo.com...
>
>
>
>
|
Apr 2, 2001, 11:45pm
1 - Call sdk.AwEventSet AW_EVENT_AVATAR_ADD
2 - Make sure you are calling sdk.AwWait 0 periodically (I usually have a
Timer fire every second for this).
[View Quote]"trekkerx" <troop2 at empirenet.com> wrote in message
news:3AC91F5B.F5FB7B2C at empirenet.com...
> Thanxs, but it dosnt work. It just sits there... doing nothing... thats
all...
> Same with when a person enters, i have
>
> Private Sub sdk_EventAvatarAdd()
> Sdk.AwWhisper Sdk.AwAvatarSession, "Hello " & Sdk.AwAvatarName
> message "[" & txtBotName.Text & "] : (whisper to " & Sdk.AwAvatarName
& _
> ") Hello " & Sdk.AwAvatarName
> EndSub
>
> Ive been told thats right, but it wont work. It just sits there... doing
> nothing...
>
> jeiden wrote:
>
says
Cuz
version,
info
>
|
Apr 9, 2001, 9:54pm
This method wont work. It allows for other events to be processed while
checking the words in the ListBox.
Instead, try something like this:
lstWords = ListBox containing words/phrases to check for
Public Function ContainsWord(ByRef lstBox As ListBox, ByVal strMessage As
String) As String
Dim i As Integer
' Loop thru the list items
For i = 0 To lstBox.ListCount
' Check if the message contains the value in the list item
If InStr(1, strMessage, LCase(lstBox.List(i)), vbTextCompare) > 0
Then
' Return the found value
ContainsWord = lstBox.List(i)
Exit Function
End If
Next i
ContainsWord = ""
End Function
Private Sub AwSdkOcx_EventChat()
' Check the message
If ContainsWord(lstWords, AwSdkOcx.AwChatMessage) <> "" Then
' The message contained one of the words
' Eject the session
AwSdkOcx.AwEjectDuration = 5 * 60
If AwSdkOcx.AwWorldEject Then
MsgBox "Unable to ejection session " & AwSdkOcx.AwChatSession
Else
MsgBox "Session " & AwSdkOcx.AwChatSession & " ejected"
End If
End If
End Sub
[View Quote]"m a k a v e l i" <tupacisdabest at aol.com> wrote in message
news:3ad236c8$1 at server1.Activeworlds.com...
> Add a Timer to the form and label it "timCheck" then:
>
> Private Sub sdk_EventChat()
>
> timCheck.Interval = 1000
>
> timCheck.Enabled = True
>
> End Sub
>
> Private Sub timCheck_Timer()
>
> Message = LCase(sdk.AwChatMessage)
>
> If lstWord.ListCount = 0 Or lstWord.ListIndex = lstWord.ListCount - 1
> Then
> timCheck.Enabled = False
> Exit Sub
> End If
>
> If X = "" Then
> X = 0
> lstWord.ListIndex = X
> Else
> X = (X + 1)
> lstWord.ListIndex = X
> End If
>
> Word = lstWord.Text
>
> If InStr(Message, Word) <> 0 Then
>
> sdk.AwEjectDuration = (5 * 60)
>
> sdk.AwEjectSession = sdk.AwChatSession
>
> If sdk.AwWorldEject Then
> MsgBox "Unable to ejection session " & sdk.AwChatSession
> Else
> MsgBox "Session " & sdk.AwChatSession & " ejected"
> End If
>
> End If
> End Sub
>
> Add a Module named anything and add this to the Module:
>
> Global X as Integer
> Global Message
>
>
|
May 21, 2001, 9:19am
I checked AwSdkOcx3 and it appears that I forgot to implement
AW_CALLBACK_ADDRESS ... I'll fix this sometime soon.
-MG
[View Quote]"baron" <pk39srt at hotmail.com> wrote in message
news:3b08e18c at server1.Activeworlds.com...
> Two issues, one VB SDK specific and one on Windows API.
>
> According to http://www.activeworlds.com/sdk/aw_address.htm a call to
aw_address returns the IP address for a given session number. In
AW_CALLBACK_ADDRESS the attributes AW_AVATAR_SESSION and AW_AVATAR_ADDRESS
are returned. My problem is this callback does not appear in the procedure
dropdown list for AwSdkOcx3. Is there any other way I can use it? Should it
be missing from the procedure dropdown list in the first place or am I
missing something? I've been messing with this for quite a while but haven't
figured it out.
|
May 25, 2001, 8:42am
Make sure you aren't calling AwTerm when unloading a bot. That would cause
all instances to terminate.
-MG
[View Quote]"moria" <moria at colony.co.uk> wrote in message
news:3b0e0e11 at server1.Activeworlds.com...
> okay error message was way off.. it reads this :-
>
> error -2147417848(80010108)
>
> AWWait of object DAwSdkOcx2 failed
>
> Moria
>
>
>
|
Nov 24, 2001, 9:54pm
http://www.grimmsoft.com/aw/php/
-MrGrimm
[View Quote]"bowen" <bowen at omegauniverse.com> wrote in message
news:3bf7f1de$1 at server1.Activeworlds.com...
> I was wondering, since I saw this on another post in the wishlist NG.. who
> ported the aw sdk to PHP and if there is a copy of it. Thanks ahead of
time
> :)
>
> --Bowen--
>
>
>
|
Aug 9, 2002, 5:33am
It's aw_console_message, not aw_console_messsage (extra s).
-Will
[View Quote]"tomilius" <homeworkkid at msn.com> wrote in message
news:3d535cab at server1.Activeworlds.com...
> It says unideclared identifier! Here's the code:
>
> #define AW_STATIC
>
> #include "aw.h"
> #include <stdio.h>
> #include <stdlib.h>
> #include <string>
>
> void handle_avatar_add (void);
> void handle_chat (void);
> void leftcopy(char* input,char* output,int pos);
> void rightcopy(char* input,char* output,int pos);
> void midcopy(char* input,char* output,int start_pos, int stop_pos);
> int findstr(char* body,char* search);
> void lcase(char* buffer);
> void ucase(char* buffer);
> void* bot1;
> void* bot2;
>
>
> main (int argc, char *argv[])
> {
>
> int rc;
>
> /* check command line */
> if (argc < 3) {
> printf ("Usage: %s number password\n", argv[0]);
> exit (1);
> }
> /* initialize Active Worlds API */
> if (rc = aw_init (AW_BUILD)) {
> printf ("Unable to initialize API (reason %d)\n", rc);
> exit (1);
> }
>
> /* install handler for avatar_add event */
> aw_event_set (AW_EVENT_AVATAR_ADD, handle_avatar_add);
> aw_event_set (AW_EVENT_CHAT, handle_chat);
>
> /* create bot instance */
> if (rc = aw_create (0, 0, &bot1)) {
> printf ("Unable to create bot instance 1 (reason %d)\n", rc);
> exit (1);
> }
> if (rc = aw_create (0, 0, &bot2)) {
> printf ("Unable to create bot instance 2 (reason %d)\n", rc);
> exit (1);
> }
> printf("Logging bots in..\n");
> /* log bot into the universe */
> aw_instance_set(bot1);
> aw_int_set (AW_LOGIN_OWNER, atoi (argv[1]));
> aw_string_set (AW_LOGIN_PRIVILEGE_PASSWORD, argv[2]);
> aw_string_set (AW_LOGIN_APPLICATION, "SDK Sample Application #1");
> aw_string_set (AW_LOGIN_NAME, "TransferBot1");
> if (rc = aw_login ()) {
> printf ("Unable to login bot 1 (reason %d)\n", rc);
> exit (1);
> }
>
> aw_instance_set(bot2);
> aw_int_set (AW_LOGIN_OWNER, atoi (argv[1]));
> aw_string_set (AW_LOGIN_PRIVILEGE_PASSWORD, argv[2]);
> aw_string_set (AW_LOGIN_APPLICATION, "SDK Sample Application #2");
> aw_string_set (AW_LOGIN_NAME, "TransferBot2");
> if (rc = aw_login ()) {
> printf ("Unable to login bot 2 (reason %d)\n", rc);
> exit (1);
> }
> /* log bot into the world called "beta" */
> printf("Traveling to worlds..\n");
> aw_instance_set(bot1);
> if (rc = aw_enter ("tomilius")) {
> printf ("Bot 1 Unable to enter world (reason %d)\n", rc);
> exit (1);
> }
>
> aw_instance_set(bot2);
> if (rc = aw_enter ("AWTeen")) {
> printf ("Bot 2 Unable to enter world (reason %d)\n", rc);
> exit (1);
> }
> printf("Going to coordinates...\n");
> aw_instance_set(bot1);
> /* announce our position in the world */
> //aw_int_set (AW_MY_X, -8000); /* 8E */
> aw_int_set (AW_MY_X,1000);
> //aw_int_set (AW_MY_Z, -37000); /* 37S */
> aw_int_set (AW_MY_Z,1000);
> aw_int_set (AW_MY_YAW, 2250); /* face towards GZ */
> if (rc = aw_state_change ()) {
> printf ("Bot 1 Unable to change state (reason %d)\n", rc);
> exit (1);
> }
>
> aw_instance_set(bot2);
> /* announce our position in the world */
> aw_int_set (AW_MY_X, 2866110); /* 2866.11W */
> aw_int_set (AW_MY_Y, -32300); /* -323A */
> aw_int_set (AW_MY_Z, 2618900); /* 2618.90N */
> aw_int_set (AW_MY_YAW, 2250); /* face towards GZ */
> if (rc = aw_state_change ()) {
> printf ("Bot 2 Unable to change state (reason %d)\n", rc);
> exit (1);
> }
> printf("Logged in and traveled to coordinates!\n");
> printf("Bot 1 has number %d\n",bot1);
> printf("Bot 2 has number %d\n",bot2);
> /* main event loop */
> do
> {
> aw_instance_set(bot1);
> aw_instance_set(bot2);
> }
> while (!aw_wait (-1))
> ;
>
> /* close everything down */
> aw_destroy ();
> aw_term ();
> return 0;
>
> }
>
> void handle_avatar_add (void)
> {
>
> char message[100];
>
> sprintf (message, "Hello %s.", aw_string (AW_AVATAR_NAME));
> aw_whisper(aw_int(AW_AVATAR_SESSION),message);
> // log the event to the console
> printf ("avatar_add: %s\n", aw_string (AW_AVATAR_NAME));
>
> }
>
> void handle_chat (void)
> {
> char *chatmessage;
> char message[256];
> char *name;
> /*char message[100];
> if (aw_int(AW_CHAT_TYPE) == AW_CHAT_WHISPER )
> {
> if(!strcmp(aw_string(AW_AVATAR_NAME),"Tomilius"))
> {
> aw_say(aw_string(AW_CHAT_MESSAGE));
> }
> else
> {
> sprintf (message, "I'm sorry %s, Tomilius doesn't want you making me
> talk.",aw_string (AW_AVATAR_NAME));
> aw_whisper(aw_int (AW_AVATAR_SESSION), message);
> }
> }*/
> if (aw_int(AW_CHAT_TYPE) != AW_CHAT_WHISPER)
> {
> name = aw_string(AW_AVATAR_NAME);
> chatmessage = aw_string(AW_CHAT_MESSAGE);
> printf("Got message from %d - %s: %s\n",aw_instance(),name,chatmessage);
> if (aw_instance() == bot1)
> {
> printf("Set instance to %d to send.\n",bot2);
> aw_instance_set(bot2);
> sprintf(message, "%s: %s",name,chatmessage);
> aw_string_set(AW_CONSOLE_MESSAGE,message);
> aw_int_set(AW_CONSOLE_BLUE,100);
> aw_int_set(AW_CONSOLE_RED,0);
> aw_int_set(AW_CONSOLE_GREEN,0);
> aw_bool_set(AW_CONSOLE_ITALICS,false);
> aw_bool_set(AW_CONSOLE_BOLD,true);
> aw_console_messsage (0);
> }
> else
> {
> printf("Set instance to %d to send.\n",bot1);
> aw_instance_set(bot1);
> sprintf(message, "%s: %s", name, chatmessage);
> aw_say(message);
> }
> }
> }
>
> // left copy
> void leftcopy(char* input,char* output,int pos)
> {
> int index = 0;
> for(int i = 0; i < pos; i++)
> {
> output[index] = input[i];
> index++;
> }
> output[index] = 0;
> }
> // right copy
> void rightcopy(char* input,char* output,int pos)
> {
> int index = 0;
> int len = strlen(input);
> for(int i = pos; i < len; i++)
> {
> output[index] = input[i];
> index++;
> }
> output[index] = 0;
>
> }
> void midcopy(char* input,char* output,int start_pos, int stop_pos)
> {
> int index = 0;
> for(int i = start_pos; i < stop_pos; i++)
> {
> output[index] = input[i];
> index++;
> }
>
> output[index] = 0;
> }
> int findstr(char* body,char* search)
> {
> int len = strlen(body);
> int len2 = strlen(search); // search len
>
> for(int i = 0; i < len; i++)
> {
> if(body[i] == search[0])
> {
> bool ichk = true;
>
> for(int z = 0; z < len2; z++)
> {
> if(body[i+z] == search[z])
> {
> }
> else
> {
> ichk = false;
> }
> }
>
> if(ichk == true)
> {
> return i;
> }
> }
> }
>
> return -1; // failure
> }
> // lower case
> void lcase(char* buffer)
> {
> int len = strlen(buffer);
>
> for(int i = 0; i < len; i++)
> {
> buffer[i] = tolower(buffer[i]);
> }
> }
> // upercase
> void ucase(char* buffer)
> {
> int len = strlen(buffer);
>
> for(int i = 0; i < len; i++)
> {
> buffer[i] = toupper(buffer[i]);
> }
> }
>
>
>
>
>
|
Mar 10, 2001, 6:07am
If the price of these products is really an issue you could goto a place
like http://www.gradware.com/ ... You have to have a College ID for this
though. If you don't have one you can goto a local community college, sign
up for around $15, get the ID, then use it to buy full version software at
academic prices.
Visual C++ Standard goes for $50, Pro for $100, Enterprise for $190.
-Grimm
[View Quote]"trekkerx" <troop2 at empirenet.com> wrote in message
news:3AA98577.E204D024 at empirenet.com...
> I would get MicroSofts, but i dont know where and i dont want to spend 400
> bucks for it
>
> john viper wrote:
>
that
>
|
Nov 25, 2002, 12:03am
The mask it sent when you connect (aw_enter, after a disconnect, etc) and
after calling aw_event_set.
With aw_event_set the mask it not sent immediately. You must first call
aw_wait or any function that has an associated callback (ie: aw_query, not
aw_say). The callback does not have to be set.
-Grimm
[View Quote]"strike rapier" <strike at rapiercom.freeserve.co.uk> wrote in message
news:3ddf6398 at server1.Activeworlds.com...
> Maybe I could just throw in a question here? Does this mask get sent to
the server every time you use AW_EVENT_SET or AW_EVENT_UNSER, or when
connecting to the world?
>
> - Mark
> "joeman" <joeman at bootdown.com> wrote in message
news:3ddeab5d$1 at server1.Activeworlds.com...
world
the
to
>
>
|
Apr 2, 2001, 11:45pm
1 - Call sdk.AwEventSet AW_EVENT_AVATAR_ADD
2 - Make sure you are calling sdk.AwWait 0 periodically (I usually have a
Timer fire every second for this).
[View Quote]"trekkerx" <troop2 at empirenet.com> wrote in message
news:3AC91F5B.F5FB7B2C at empirenet.com...
> Thanxs, but it dosnt work. It just sits there... doing nothing... thats
all...
> Same with when a person enters, i have
>
> Private Sub sdk_EventAvatarAdd()
> Sdk.AwWhisper Sdk.AwAvatarSession, "Hello " & Sdk.AwAvatarName
> message "[" & txtBotName.Text & "] : (whisper to " & Sdk.AwAvatarName
& _
> ") Hello " & Sdk.AwAvatarName
> EndSub
>
> Ive been told thats right, but it wont work. It just sits there... doing
> nothing...
>
> jeiden wrote:
>
says
Cuz
version,
info
>
|
Jun 11, 2003, 4:00pm
These are the only error codes that would be returned by aw_session:
RC_NOT_INITIALIZED
RC_NO_INSTANCE
RC_NO_CONNECTION
-Will
[View Quote]"xelag" <xelag at digitalspace.com> wrote in message
news:81qdevkhodhvrh7q6ipajbhg5edcpafs1l at 4ax.com...
> Notice a peculiarity of this attribute: Not only does it give you the
> session number of the bot, it also changes to an error code when the
> bot gets a universe disconnect.
>
> ActiveWorlds SDK does not have a general disconnection event. It has
> a world disconnect event, and an undocumented change of the session
> number to an error code whenever the universe gets disconnected from
> the bot.
>
> Unfortunately, legitimate session numbers can also coincide with error
> codes,. I mentioned this peculiarity to Roland Vilett, but never got a
> satisfying answer.
>
> In practice, I noticed that since the almost first 500 numbers which
> could correspond to error codes are seldom used as legitimate session
> numbers in the session number recycling process, I have been able to
> use this undocumented oddity to help establish disconnections. There
> are 5 such 'reason' codes which appear as session numbers I use as a
> trigger:
> 27 = no such world
> 429 = unable to connect
> 439 = no connection
> 471 = connection lost
> 489 = world not running (i.e. admin closed world)
>
> Alex
>
>
>
>
> On 9 Jun 2003 15:04:34 -0400, "kah" <kah at kahnews.cjb.net> wrote:
>
>
|
Jun 28, 2003, 7:31am
Active X controls are dlls with a specific interface. AwSdk.dll is still an
ActiveX/COM control, it just has a different extension.
AwSdkOcx#.ocx used MFC, AwSdk.dll/AwSdk2.dll use ATL. Same deal, different
method.
-Will
[View Quote]"strike rapier" <strike at rapiercom.freeserve.co.uk> wrote in message
news:3ef5b017 at server1.Activeworlds.com...
> *HISS*
>
> EVIL OCX CRAP! >:)
>
> The newest is the AwSdkDLL (attached) is the new standard, the format used
> in AwSdkOcx<int> is no longer supported and will not be continued. Besides
> the new version is much nicer...
>
> Documentation... www.activeworlds.com/sdk/
>
> - Mark
>
> "mike zimmer" <mike at remmiz.com> wrote in message
> news:3ef5a2c4$1 at server1.Activeworlds.com...
I
>
>
>
|
Jun 28, 2003, 7:34am
The AwSdk (dll) on the server is not the same one from 1999.
-Will
[View Quote]"brant" <awteen at shoemakervillage.org> wrote in message
news:3ef5f2ae$1 at server1.Activeworlds.com...
> Clarification: The Ultimate Paintball Bot will never use the DLL, becuase
> it was programmed originally in 1999 when Grimm made OCXs. It would be
far
> too extensive to reprogram the application for the DLL version.
>
> Demeter, however, was programmed originally by Grimble, who used the DLL
> version, which was released just before Demeter's release.
>
> -Brant
>
> "mrbruce" <A1CTWorld at aol.com> wrote in message
> news:3ef5c691 at server1.Activeworlds.com...
> paintball
> used
> Besides
> correct?
> who
> last
> and
>
>
|
Jun 28, 2003, 7:38am
It's pretty much the same, except for the function names containing _'s and
variables being accessed via the aw_string/int/bool(_set). A control array
should still work.
-Will
[View Quote]"brant" <awteen at shoemakervillage.org> wrote in message
news:3efae6de$1 at server1.Activeworlds.com...
> 20 minutes! The problem is that the DLL works completely differently than
> the OCX in terms of multiple bots. You can't just use an array of DLL
> "controls." If Ultimate Paintball only used one bot, then it wouldn't be
> that much of a problem.
>
> -Brant
>
> "strike rapier" <strike at rapiercom.freeserve.co.uk> wrote in message
> news:3ef60e9e at server1.Activeworlds.com...
> then
> becuase
be
DLL
> format
forever
> so
down
> bot,
>
>
|
Jul 9, 2003, 10:06pm
ActiveX controls are based upon COM (Component Object Model).
"COM Components built with the ActiveX Template Library are smaller and
faster than components built with MFC, and they only require the ATL
runtime. They are better suited to components - which, by definition are
designed for very specific operations -as they don't offer all the built-in
functionality that the MFC classes provide, whereas MFC is better suited to
applications."
AwSdkOcx#.ocx was built with MFC. AwSdk2.dll was built with ATL. The dll
extension on AwSdk2.dll does -not- mean it isn't an ActiveX(OCX) control.
If "AwSdk 1.1 Type Library" is not listed in the VB components window, click
"Browse...", change "Files of type" to "All Files (*.*)" and browse to
AwSdk2.dll.
-Will
[View Quote]"maxsilver" <maxsilver at email.com> wrote in message
news:3f0b8dca$1 at server1.Activeworlds.com...
> Just a quick question,
>
> I only recently began attempting to create AW Bots and was wondering why
> they stopped making OCX controls and switched to dll files? it seems like
an
> OCX would be a lot easier to use(its the only AW SDK ive gotten to work on
> Visual Basic)
>
>
|
Jul 9, 2003, 9:18pm
This just creates additional dependencies. If you must use the same
interface as AwSdkOcx just create a class wrapper.
-Will
[View Quote]"r i c h a r d" <richard.lazenby1 at ntlworld.com> wrote in message
news:3f0c9a96 at server1.Activeworlds.com...
> I have started work on an unoffical 3.4 ocx form sdk. This is not an
> official AW release or Grimmsoft release. It is only an interface for
> AwSdk2dll the ocx requires the dll sdk to run. I am asking for some people
> try out the functions are events making sure nothing strange happens
during
> usage. The properties Sdk.AwAvatarName have not been added yet you will
need
> to use Sdk.AwString(AW_AVATAR_NAME) for now. While you are testing the
> functions i will start work on adding the properties but there is about
> 200-300 of them
>
> http://www.xeonsoft.co.uk/downloads/awsdkocx6.zip
>
>
|
Apr 9, 2001, 9:54pm
This method wont work. It allows for other events to be processed while
checking the words in the ListBox.
Instead, try something like this:
lstWords = ListBox containing words/phrases to check for
Public Function ContainsWord(ByRef lstBox As ListBox, ByVal strMessage As
String) As String
Dim i As Integer
' Loop thru the list items
For i = 0 To lstBox.ListCount
' Check if the message contains the value in the list item
If InStr(1, strMessage, LCase(lstBox.List(i)), vbTextCompare) > 0
Then
' Return the found value
ContainsWord = lstBox.List(i)
Exit Function
End If
Next i
ContainsWord = ""
End Function
Private Sub AwSdkOcx_EventChat()
' Check the message
If ContainsWord(lstWords, AwSdkOcx.AwChatMessage) <> "" Then
' The message contained one of the words
' Eject the session
AwSdkOcx.AwEjectDuration = 5 * 60
If AwSdkOcx.AwWorldEject Then
MsgBox "Unable to ejection session " & AwSdkOcx.AwChatSession
Else
MsgBox "Session " & AwSdkOcx.AwChatSession & " ejected"
End If
End If
End Sub
[View Quote]"m a k a v e l i" <tupacisdabest at aol.com> wrote in message
news:3ad236c8$1 at server1.Activeworlds.com...
> Add a Timer to the form and label it "timCheck" then:
>
> Private Sub sdk_EventChat()
>
> timCheck.Interval = 1000
>
> timCheck.Enabled = True
>
> End Sub
>
> Private Sub timCheck_Timer()
>
> Message = LCase(sdk.AwChatMessage)
>
> If lstWord.ListCount = 0 Or lstWord.ListIndex = lstWord.ListCount - 1
> Then
> timCheck.Enabled = False
> Exit Sub
> End If
>
> If X = "" Then
> X = 0
> lstWord.ListIndex = X
> Else
> X = (X + 1)
> lstWord.ListIndex = X
> End If
>
> Word = lstWord.Text
>
> If InStr(Message, Word) <> 0 Then
>
> sdk.AwEjectDuration = (5 * 60)
>
> sdk.AwEjectSession = sdk.AwChatSession
>
> If sdk.AwWorldEject Then
> MsgBox "Unable to ejection session " & sdk.AwChatSession
> Else
> MsgBox "Session " & sdk.AwChatSession & " ejected"
> End If
>
> End If
> End Sub
>
> Add a Module named anything and add this to the Module:
>
> Global X as Integer
> Global Message
>
>
|
Feb 25, 2004, 6:15am
Or you can just use:
ip = sdk.long2ip (sdk.aw_int (AW_AVATAR_ADDRESS))
addr = sdk.ip2long (ip)
There's also long2date and date2long to convert timestamps
-MrGrimm
[View Quote]"ep0ch" <deltawolf at deltawolf.com> wrote in message
news:403c021b at server1.Activeworlds.com...
> Since the output from sdk.aw_address(session) is given in Network Byte
Order
> (ie, junk) I coded a conversion code snippit. It will take "389473245" and
> make it into a pretty "65.65.65.65".
>
> Public Declare Function inet_ntoa Lib "wsock32.dll" (ByVal addr As Long)
As
> Long
>
> Public Declare Function lstrcpyA Lib "kernel32" (ByVal RetVal As String,
> ByVal Ptr As Long) As Long
>
> Public Declare Function lstrlenA Lib "kernel32" (lpString As Any) As Long
>
> Public Function GetInetStrFromPtr(Address As Long) As String
>
> GetInetStrFromPtr = GetStrFromPtrA(inet_ntoa(Address))
>
> End Function
>
> Public Function GetStrFromPtrA(ByVal lpszA As Long) As String
>
> GetStrFromPtrA = String$(lstrlenA(ByVal lpszA), 0)
> Call lstrcpyA(ByVal GetStrFromPtrA, ByVal lpszA)
>
> End Function
>
> Usage:
> sdk.aw_address(session)
> var = GetInetStrFromPtr(sdk.aw_int(AW_AVATAR_ADDRESS))
>
> Enjoy! Any bugs or anything just let me know. Also theres a function to
> convert TO the junk if you really need it.
>
> -Ep0ch
>
>
|
May 1, 2001, 12:47am
I have multiple MrGrimm accounts.
[View Quote]"m a k a v e l i" <tupacisdabest at aol.com> wrote in message
news:3aee1ac4 at server1.Activeworlds.com...
> I was doing some research today, there is a cit named "Mr Grimm", and one
> named "Ham Fon".
>
>
|
May 15, 2001, 12:20am
AwMyX is a long, not a string. When handling user input that is supposed to
be numerical you should use val () to convert it. Like so:
sdk.AwMyX = val (txtMyX.Text) * 1000
-MG
[View Quote]"kah" <kah at kahbot.com> wrote in message
news:3b000997 at server1.Activeworlds.com...
> easy way of doing it on login : sdk.AwMyX = txtMyX.Text & "000" and so on
> :-))
>
> KAH
>
> trekkerx wrote in message <3AFF206B.222A9E36 at empirenet.com>...
> would
> or
> mutaplaction
has
> have
effective
> asks
please
means
> should
<3afe9cb8 at server1.Activeworlds.com>...
>
>
|
|