Board ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
tom russell // User Search
tom russell // User SearchRe: Mega BOT V. 1.02 FINALLY UP AND READY FOR DEMONSTRATION D/L . . .Jul 28, 1999, 12:11am
How about adding a control to allow the user to specify the port? I've
noticed that it is uncommon for bot programmers to do this, which limits its use and is quite easy to add. Tom Russell What's wrong with my codeAug 3, 1999, 2:17am
That would mean putting aw.lib in this directory, right?
C:\Program Files\Microsoft Visual Studio\VC98\Lib I've been thinking about how to make a .dll(or .lib) out of Ed Sumerfield's AWCPP C++ framework, and I'm thinking that it would go in this directory, so this kind of straightened that out for me. Thanks. Tom Russell [View Quote] Getting Co-Ordinates based on Session ID?Aug 4, 1999, 10:33pm
Here's a way to keep track of avatars in the area of your running instance.
I think this applies to what you're doing. It's a code snippet from Ed Sumerfield's AWCPP wrapper. #include <map> using namespace std; typedef struct { AvatarThem *avatar; // this is an object with members for session, position, etc. void *context; // just space to store relevant info. } StoreContent; typedef map <int, StoreContent *, less<int> > AvatarStorage; [View Quote] Re: Struct...Aug 5, 1999, 9:12pm
In the AWCPP classes, there are no #includes in the .hpp files, although
they depend on definitions existing in other .hpp files. For example, there's no #include Avatar.hpp in AvatarMe.hpp. When I try to compile AvatarMe.C, I get compiler complaints. How can this be? Tom Russell [View Quote] BOT Universe Logins using IP address ( Some Problems it may cause ).Aug 9, 1999, 9:35pm
Re: Struct...Aug 9, 1999, 9:54pm
Ok. I'm going to go through the files and simply #include <AWCPP.h> in all
the .cpp files, and if that doesn't work(which I suspect is the case), then I'll put it in all my .h files. Thanks. Tom Russell [View Quote] Re: Struct...Aug 10, 1999, 1:55am
Yes! That totally handled the whole thing! All I had to do after including
AWCPP.h in all my .cpp files was figure out where all the ostream& ambiguities were coming from. As it turned out, I had included <iostream.h> (and referenced ostream&) in one or more compilation units in which the declarations in the standard library had been made global by my utilization of the following statement: using namespace std; Very cool. Back on track. Tom Russell [View Quote] Re: AWCPP WrapperAug 12, 1999, 11:06pm
Well, here's the first part of the port. I am making available the files
necessary to build awcpp.lib. from Ed Sumerfield's AWCPP C++ classes, the object framework you can use to create all kinds of cool stuff without too much trouble(hopefully). I haven't figured out how to interface it with a Windows GUI (like a dialog box) yet, but hopefully someone with more experience with this will see the value in this object package and work out some of those porting issues. For now, however, all that's required is that you load up the workspace and create the .lib file. There are a number of sample programs that are ready to run, which I've included. Have fun and let me know if you need any help. Happy botting... Tom Russell [View Quote] Have I lost my mind, or is this Error IMPOSSIBLE to Trace?Sep 7, 1999, 9:42pm
This is a multi-part message in MIME format.
------=_NextPart_000_004D_01BEF94F.F3C725C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I am assuming that your bot name variable "chBotName" was actually not = getting filled and you've gotten it working using Walter's advice. Tom Russell [View Quote] ------=_NextPart_000_004D_01BEF94F.F3C725C0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN"> <HTML> <HEAD> <META content=3Dtext/html;charset=3Diso-8859-1 = http-equiv=3DContent-Type><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 = Transitional//EN"> <META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>I am assuming that your bot name = variable =20 "chBotName" was actually not getting filled and you've gotten = it=20 working using Walter's advice.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Tom Russell</FONT></DIV> <BLOCKQUOTE=20 style=3D"BORDER-LEFT: #000000 solid 2px; MARGIN-LEFT: 5px; PADDING-LEFT: = 5px"> [View Quote] rc;</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> aw_destroy();<BR> Whois = =3D=20 FALSE;</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> sprintf(reply2,"=20 ");<BR> m_StatusLog.Append = (status);<BR> m_StatusLog.Append=20 (status);<BR> m_StatusLog.Append=20 (status);<BR> sprintf(reply2,"Attempting to Login to=20 :");<BR> m_StatusLog.Append=20 (status);<BR> sprintf(reply2,"The Universe %s using SDK = Build=20 %d", chUniverse, AW_BUILD);<BR> m_StatusLog.Append=20 (status);</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2><BR> if (rc =3D aw_init=20 (AW_BUILD))<BR> Login_Error (rc);</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial = size=3D2> else<BR> {<BR> aw_int_set=20 (AW_LOGIN_OWNER, (nCitnum));<BR> aw_string_set=20 (AW_LOGIN_PRIVILEGE_PASSWORD, chPassword);<BR> sprintf=20 (message,"Ultra Bot = %s",chVersion);<BR> aw_string_set=20 (AW_LOGIN_APPLICATION, message);<BR> aw_string_set=20 (AW_LOGIN_NAME, chBotName);<BR> aw_int_set (AW_MY_X,=20 0);<BR> aw_int_set (AW_MY_Y, = 0);<BR> aw_int_set=20 (AW_MY_Z, 0);<BR> aw_int_set (AW_MY_YAW,=20 0);<BR> aw_int_set (AW_MY_TYPE, = 253);<BR> }</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> if (rc =3D aw_create=20 (chIP,nPort,0))<BR> Login_Error=20 (rc);<BR> <BR> else if (rc =3D aw_login=20 ())<BR> Login_Error = (rc);<BR> <BR> else if=20 (rc =3D aw_enter (chWorld,0))<BR> Login_Error=20 (rc);<BR> <BR> else if (rc =3D=20 aw_state_change ())<BR> Login_Error (rc);</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> if (rc =3D=3D = 0)<BR> return=20 TRUE;<BR><BR> else<BR> return = FALSE;<BR>}</FONT></DIV> <DIV> </DIV> <DIV> </DIV> <DIV> </DIV> <DIV> </DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>void Login_Error (int=20 m_nError)<BR>{</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial=20 size=3D2><BR> switch(m_nError)<BR> {<BR> case=20 1:<BR> sprintf (message,"Citizen Number Has=20 Expired");<BR> break;<BR> case=20 3:<BR> sprintf (message,"Citizen Number=20 Invalid");<BR> break;<BR> case=20 4:<BR> sprintf (message,"Message Too=20 Long");<BR> break;<BR> case = 5:<BR> sprintf=20 (message,"Passwords Cannot Contain=20 Spaces");<BR> break;<BR> case = 6:<BR> sprintf=20 (message,"Password Is Too=20 Long");<BR> break;<BR> case = 7:<BR> sprintf=20 (message,"Password Is Too=20 Short");<BR> break;<BR> case = 8:<BR> sprintf=20 (message,"Range Too = Large");<BR> break;<BR> case=20 9:<BR> sprintf (message,"Range Too=20 Short");<BR> break;<BR> case = 10:<BR> sprintf=20 (message,"Too Many = Users");<BR> break;<BR> case=20 11:<BR> sprintf (message,"Too Few=20 Users");<BR> break;<BR> case = 12:<BR> sprintf=20 = (message,"RC_LICENSE_WORLD_CONTAINS_SPACE");<BR> bre= ak;<BR> case=20 13:<BR> sprintf (message,"Invalid=20 Password");<BR> break;<BR> case=20 14:<BR> sprintf=20 = (message,"RC_UNABLE_TO_MAIL_BACK_NUMBER");<BR> break= ;<BR> case=20 15:<BR> sprintf=20 = (message,"RC_LICENSE_WORLD_TOO_SHORT");<BR> break;<B= R> case=20 16:<BR> sprintf=20 = (message,"RC_LICENSE_WORLD_TOO_LONG");<BR> break;<BR= > case=20 17:<BR> sprintf=20 = (message,"RC_SERVER_OUT_OF_MEMORY");<BR> break;<BR>&= nbsp;case=20 27:<BR> sprintf (message,"World Is Not=20 Running");<BR> break;<BR> case=20 31:<BR> sprintf=20 = (message,"RC_NOT_LOGGED_IN");<BR> break;<BR> ca= se=20 32:<BR> sprintf=20 = (message,"RC_UNAUTHORIZED");<BR> break;<BR> cas= e=20 33:<BR> sprintf=20 = (message,"RC_ALREADY_LICENSED");<BR> break;<BR> = ;case=20 34:<BR> sprintf=20 = (message,"RC_NO_SUCH_LICENSE");<BR> break;<BR> = case=20 39:<BR> sprintf=20 = (message,"RC_IDENTITY_ALREADY_IN_USE");<BR> break;<B= R> case=20 40:<BR> sprintf=20 = (message,"RC_UNABLE_TO_REPORT_LOCATION");<BR> break;= <BR> case=20 41:<BR> sprintf=20 = (message,"RC_INVALID_EMAIL"); <BR> break;<BR>&n= bsp;case=20 42:<BR> sprintf (message,"Citizen Number Doesn't=20 Exist");<BR> break;<BR> case = 43:<BR> sprintf=20 (message,"Invalid = Password");<BR> break;<BR> case=20 58:<BR> sprintf (message,"Upgrade=20 Required");<BR> break;<BR> case=20 59:<BR> sprintf (message,"BOT Limit=20 Reached");<BR> break;<BR> case=20 64:<BR> sprintf=20 = (message,"RC_LICENSE_STARTS_WITH_NUMBER");<BR> break= ;<BR> case=20 66:<BR> sprintf=20 = (message,"RC_NO_SUCH_EJECTION");<BR> break;<BR> = ;case=20 67:<BR> sprintf (message,"No Such Session=20 Number");<BR> break;<BR> case=20 100:<BR> sprintf=20 = (message,"RC_EMAIL_CONTAINS_INVALID_CHAR");<BR> brea= k;<BR> case=20 101:<BR> sprintf=20 = (message,"RC_EMAIL_ENDS_WITH_BLANK");<BR> break;<BR>= case=20 102:<BR> sprintf=20 = (message,"RC_EMAIL_MISSING_DOT");<BR> break;<BR>&nbs= p;case=20 103:<BR> sprintf=20 = (message,"RC_EMAIL_MISSING_AT");<BR> break;<BR> = ;case=20 104:<BR> sprintf=20 = (message,"RC_EMAIL_STARTS_WITH_BLANK");<BR> break;<B= R> case=20 105:<BR> sprintf=20 = (message,"RC_EMAIL_TOO_LONG");<BR> break;<BR> c= ase=20 106:<BR> sprintf=20 = (message,"RC_EMAIL_TOO_SHORT");<BR> break;<BR> = case=20 107:<BR> sprintf=20 = (message,"RC_NAME_ALREADY_USED");<BR> break;<BR>&nbs= p;case=20 108:<BR> sprintf=20 = (message,"RC_NAME_CONTAINS_INVALID_CHAR");<BR> break= ;<BR> case=20 109:<BR> sprintf=20 = (message,"RC_NAME_CONTAINS_INVALID_BLANK");<BR> brea= k;<BR> case=20 110:<BR> sprintf=20 = (message,"RC_NAME_DOESNT_EXIST");<BR> break;<BR>&nbs= p;case=20 111:<BR> sprintf=20 = (message,"RC_NAME_ENDS_WITH_BLANK");<BR> break;<BR>&= nbsp;case=20 112:<BR> sprintf=20 = (message,"RC_NAME_TOO_LONG");<BR> break;<BR> ca= se=20 113:<BR> sprintf=20 = (message,"RC_NAME_TOO_SHORT");<BR> break;<BR> c= ase=20 114:<BR> sprintf=20 = (message,"RC_NAME_UNUSED");<BR> break;<BR> case= =20 115:<BR> sprintf=20 = (message,"RC_PASSWORD_TOO_LONG");<BR> break;<BR>&nbs= p;case=20 116:<BR> sprintf=20 = (message,"RC_PASSWORD_TOO_SHORT");<BR> break;<BR>&nb= sp;case=20 117:<BR> sprintf=20 = (message,"RC_PASSWORD_IS_WRONG");<BR> break;<BR>&nbs= p;case=20 126:<BR> sprintf=20 = (message,"RC_NUMBER_ALREADY_USED");<BR> break;<BR>&n= bsp;case=20 127:<BR> sprintf=20 = (message,"RC_NUMBER_OUT_OF_RANGE");<BR> break;<BR>&n= bsp;case=20 128:<BR> sprintf (message,"Privilege Password Too=20 Short");<BR> break;<BR> case=20 203:<BR> sprintf=20 = (message,"RC_NOT_CHANGE_OWNER");<BR> break;<BR> = ;case=20 204:<BR> sprintf=20 = (message,"RC_CANT_FIND_OLD_ELEMENT");<BR> break;<BR>= case=20 211:<BR> sprintf=20 = (message,"RC_CANT_CHANGE_OWNER");<BR> break;<BR>&nbs= p;case=20 216:<BR> sprintf=20 = (message,"RC_CANT_BUILD_HERE");<BR> break;<BR> = case=20 232:<BR> sprintf=20 = (message,"RC_NOT_ALLOWED");<BR> break;<BR> case= =20 300:<BR> sprintf=20 = (message,"RC_ENCROACHES");<BR> break;<BR> case = 301:<BR> sprintf=20 = (message,"RC_NO_SUCH_OBJECT");<BR> break;<BR> c= ase=20 302:<BR> sprintf=20 = (message,"RC_NOT_DELETE_OWNER");<BR> break;<BR> = ;case=20 303:<BR> sprintf=20 = (message,"RC_TOO_MANY_BYTES");<BR> break;<BR> c= ase=20 306:<BR> sprintf=20 = (message,"RC_UNREGISTERED_OBJECT");<BR> break;<BR>&n= bsp;case=20 308:<BR> sprintf=20 = (message,"RC_ELEMENT_ALREADY_EXISTS");<BR> break;<BR= > case=20 311:<BR> sprintf=20 = (message,"RC_NO_BUILD_RIGHTS");<BR> break;<BR> = case=20 313:<BR> sprintf (message,"Object Outside Of World = Property=20 Limits");<BR> break;<BR> case=20 314:<BR> sprintf=20 = (message,"RC_RESTRICTED_OBJECT");<BR> break;<BR>&nbs= p;case=20 400:<BR> sprintf=20 = (message,"RC_OUT_OF_MEMORY");<BR> break;<BR> ca= se=20 401:<BR> sprintf=20 = (message,"RC_NOT_YET");<BR> break;<BR> case=20 402:<BR> sprintf=20 (message,"TIMEOUT");<BR> break;<BR> case=20 403:<BR> sprintf=20 = (message,"RC_NULL_POINTER");<BR> break;<BR> cas= e=20 404:<BR> sprintf (message,"Unable To Contact=20 Universe");<BR> break;<BR> case=20 405:<BR> sprintf (message,"Unable To Contact=20 World");<BR> break;<BR> case=20 406:<BR> sprintf (message,"Invalid World=20 Name");<BR> break;<BR> case = 415:<BR> sprintf=20 = (message,"RC_SEND_FAILED");<BR> break;<BR> case= =20 416:<BR> sprintf=20 = (message,"RC_RECEIVE_FAILED");<BR> break;<BR> c= ase=20 421:<BR> sprintf=20 = (message,"RC_STREAM_EMPTY");<BR> break;<BR> cas= e=20 422:<BR> sprintf=20 = (message,"RC_STREAM_MESSAGE_TOO_LONG");<BR> break;<B= R> case=20 423:<BR> sprintf (message,"World Name Too=20 Long");<BR> break;<BR> case = 426:<BR> sprintf=20 (message,"Message Too = Long");<BR> break;<BR> case=20 429:<BR> sprintf (message,"Unable To Connect to %s : = %d",chIP,nPort);<BR> break;<BR> case=20 439:<BR> sprintf (message,"No=20 Connection");<BR> break;<BR> case=20 442:<BR> sprintf (message,"Unable To Initialize=20 Network");<BR> break;<BR> case=20 443:<BR> sprintf=20 = (message,"Incorrect_Message_Length");<BR> break;<BR>= case=20 444:<BR> sprintf=20 = (message,"RC_NOT_INITIALIZED");<BR> break;<BR> = case=20 445:<BR> sprintf (message,"No BOT Instance=20 Exists.");<BR> break;<BR> case=20 446:<BR> sprintf=20 = (message,"RC_OUT_BUFFER_FULL");<BR> break;<BR> = case=20 447:<BR> sprintf=20 = (message,"RC_INVALID_CALLBACK");<BR> break;<BR> = ;case=20 448:<BR> sprintf=20 = (message,"RC_INVALID_ATTRIBUTE");<BR> break;<BR>&nbs= p;case=20 449:<BR> sprintf=20 = (message,"RC_TYPE_MISMATCH");<BR> break;<BR> ca= se=20 450:<BR> sprintf=20 = (message,"RC_STRING_TOO_LONG");<BR> break;<BR> = case=20 451:<BR> sprintf=20 = (message,"RC_READ_ONLY");<BR> break;<BR> case=20 453:<BR> sprintf=20 = (message,"RC_INVALID_INSTANCE");<BR> break;<BR> = ;case=20 454:<BR> sprintf=20 = (message,"RC_VERSION_MISMATCH");<BR> break;<BR> = ;case=20 461:<BR> sprintf=20 = (message,"RC_IN_BUFFER_FULL");<BR> break;<BR> c= ase=20 463:<BR> sprintf=20 = (message,"RC_PROTOCOL_ERROR");<BR> break;<BR> c= ase=20 464:<BR> sprintf=20 = (message,"RC_QUERY_IN_PROGRESS");<BR> break;<BR>&nbs= p;case=20 466:<BR> sprintf=20 = (message,"RC_EJECTED");<BR> break;<BR> case=20 467:<BR> sprintf=20 = (message,"RC_NOT_WELCOME");<BR> break;<BR> case= =20 471:<BR> sprintf=20 = (message,"RC_CONNECTION_LOST");<BR> break;<BR> = case=20 474:<BR> sprintf=20 = (message,"RC_NOT_AVAILABLE");<BR> break; = <BR> }</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial = size=3D2> m_StatusLog.DoClear();</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> if (m_nError =3D=3D=20 0)<BR> {<BR> PlaySound=20 ("Audio/Logfinish.wav",NULL,SND_ASYNC);</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> sprintf(reply2, = "Bot Name :=20 [%s]", chBotName);<BR> m_HistoryEdit.Append=20 (status);<BR> sprintf(reply2, "Citizen Number : = %d",=20 nCitnum);<BR> m_HistoryEdit.Append=20 (status);<BR> sprintf (reply2,"=20 ");<BR> m_HistoryEdit.Append=20 (status);<BR> sprintf(reply2, "Universe : %s",=20 chUniverse);<BR> m_HistoryEdit.Append=20 (status);<BR> sprintf(reply2, "World : %s",=20 chWorld);<BR> m_HistoryEdit.Append=20 (status);<BR> sprintf(reply2, "Location : Not Coded=20 Yet");<BR> m_HistoryEdit.Append=20 (status);<BR> sprintf (reply2,"=20 ");<BR> m_StatusLog.Append=20 (status);<BR> sprintf(reply2, "Time Running : Not = Coded=20 Yet");<BR> m_StatusLog.Append=20 (status);<BR> }</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial = size=3D2> else<BR> {<BR> PlaySound=20 ("Audio/Error.wav",NULL,SND_ASYNC);</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> sprintf (reply2,"=20 ");<BR> m_StatusLog.Append=20 (status);<BR> m_StatusLog.Append=20 (status);<BR> m_StatusLog.Append = (status);<BR> sprintf=20 (reply2,"LOGIN = FAILURE");<BR> m_StatusLog.Append=20 (status);<BR> sprintf (reply2,"Reason :=20 %s",message);<BR> m_StatusLog.Append=20 (status);<BR> }</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>}</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial=20 = size=3D2>-----------------------------------------------------------</FON= T></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>Thanks in advance,</FONT></DIV> <DIV><FONT face=3DArial size=3D2>Andon Coleman</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>Senior Software = Engineer</FONT></DIV> <DIV><FONT face=3DArial size=3D2>R&D</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>Nothing, Inc.</FONT></DIV> <DIV> </DIV> <DIV> </DIV></FONT></DIV></BLOCKQUOTE></BODY></HTML> ------=_NextPart_000_004D_01BEF94F.F3C725C0-- AW_EVENT_AVATAR_ADD/DELETEOct 12, 1999, 2:21am
I noticed that when an avatar teleports or moves out of the range of one
instance and into another, sometimes the sequence of ADD/DELETE events is reversed. In my program, I maintain a list of pointers to avatar objects and the instances which recieve events associated with each avatar. This is making it difficult, as the instance is often wrong when I go to speak to an avatar from the program. Has anyone run into this problem and devised a solution? Tom Russell |