andon13 // User Search

andon13 // User Search

1  |  

Ultra BOT correction . . .

Feb 2, 2000, 10:27pm
This is a multi-part message in MIME format.

------=_NextPart_000_0030_01BF6DB2.85227F20
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Apparently the stupid News Server corrupts your files when you post =
here, so . . .

go to : UltraBOT.novaflare.com to download the Installer.exe, and simply =
run it.

Best Regards,
Andon M. Coleman

Senior Programmer
R&D

Nothing, Inc.

------=_NextPart_000_0030_01BF6DB2.85227F20
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2722.2800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial>
<DIV><FONT face=3DArial>Apparently the stupid News Server corrupts your =
files when=20
you post here, so . . .</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>go to : UltraBOT.novaflare.com to download the=20
Installer.exe, and simply run it.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>Best Regards,</FONT></DIV>
<DIV><FONT face=3DArial>Andon M. Coleman</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>Senior Programmer</FONT></DIV>
<DIV><FONT face=3DArial>R&amp;D</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>Nothing, =
Inc.</FONT></DIV></FONT></DIV></BODY></HTML>

------=_NextPart_000_0030_01BF6DB2.85227F20--

MIDI / WAV Play Command --- MP3 & REAL AUDIO not implimented yet, but Create URL or Send URL will make this easy

Jul 25, 1999, 2:44pm
ENJOY :)

NOTES:
These lines are used as the VERY first lines after the AW_EVENT_CHAT Handler
.. . .

aw_state_change ();
char *reply[255];
CString msg = aw_string (AW_CHAT_MESSAGE);
CString msg2=msg;
CString msg3=msg;

msg2.MakeLower();
msg3.MakeLower();
msg2.GetLength();
msg3.GetLength();


THESE NEXT LINES CAN BE PLACED ANYWHERE WITHIN THE HANDLER.


if(msg2.Find("play ") == -1){}

else
{
char action[255];

CString chFormat="MEDIA";
CString msg2="FILEXT";
CString SPEAKER_OBJECT="wavspk.rwx";
CString location="UNDEFINED";

msg2.Replace("FILEXT",msg3.Mid(msg3.Find("play")));
msg2.Replace("play ",NULL);
msg.Replace(msg.Left(msg3.Find(msg2)),NULL);
sprintf (action, "create noise %s", msg);

if (msg2.Find("http://") == -1){location.Replace("UNDEFINED","Local");}
else
{
location.Replace("UNDEFINED","External");
}

if (msg2.Find(".mid") == -1)
{
if (msg2.Find(".wav") == -1)
{
if (msg2.Find(".mp3") == -1)
{
if (msg2.Find(".ra") == -1){
chFormat.Replace("MEDIA","FALSE");
}

else
{
chFormat.Replace("MEDIA","Real Audio");

}}


else
{
chFormat.Replace("MEDIA","Mpeg Layer 3 Audio");
}}

else
{
chFormat.Replace("MEDIA","Wave Audio");
}}

else
{
if (msg2.Find(".midifarm.") == -1){chFormat.Replace("MEDIA","MIDI
Music");SPEAKER_OBJECT.Replace("wavspk.rwx","midispk.rwx");sprintf (action,
"create sound %s", msg);}
else
{
chFormat.Replace("MEDIA","FALSE");
}}



if (chFormat == "FALSE")
{chFormat.Replace("FALSE",msg.Mid(msg.Find(".")));sprintf
((char*)reply,"Unknown Audio Type [ '%s' ]!",chFormat);aw_whisper (aw_int
(AW_CHAT_SESSION), (char*)reply);}

else
{
sprintf ((char*)reply,"Now Playing --- %s %s file
[ '%s' ]",location,chFormat,msg);
aw_say ((char*)reply);

char description[255];

aw_int_set (AW_OBJECT_X, AW_MY_X);
aw_int_set (AW_OBJECT_Y, AW_MY_Y);
aw_int_set (AW_OBJECT_Z, AW_MY_Z);
aw_int_set (AW_OBJECT_YAW, AW_MY_YAW);
aw_string_set (AW_OBJECT_MODEL, SPEAKER_OBJECT);
aw_object_delete ();

sprintf (description, "Ultra DJ V. 0.63 --- Part of Andon13's Ultra BOT .
.. .",chFormat,msg);

aw_string_set (AW_OBJECT_ACTION, action);
aw_string_set (AW_OBJECT_DESCRIPTION, description);
aw_object_add ();

}

}

if(msg2.Find("stop play") == -1){}
else
{
aw_object_delete ();
}






AND THAT'S IT . . .

All you need to do now is type :
Play <MIDI / WAV>

where "<MIDI / WAV>" = the location of the Midi or Wave file you wish to
play . . .

Yet another hard to follow SDK Documentation FLAW . . .

Jul 27, 1999, 7:55am
Here's the flaw . . .

void handle_chat (void)
{

int rc;
int address;
char msg[256];
/* provide IP addresses in response to spoken requests */
if (!strcmp (aw_string (AW_CHAT_MESSAGE), "What is my address?"))
if (rc = aw_address (AW_CHAT_SESSION))
aw_say ("Sorry, I cannot determine your IP address");
else {
address = aw_int (AW_AVATAR_ADDRESS);
sprintf (msg, "Your IP address is %s",
inet_ntoa (*(struct in_addr*)&address);
aw_say (msg);
}
}




FIRST OFF, you fail to mention ANYWHERE that :
inet_ntoa is a member of winsock2.h and that you need to import ws2_32.lib
into the project for it to work. . .

SECOND, I find someone asking the bot for their own IP address to be rather
a stupid use for the function . . .

Here's my REVISED version : )

For this to work you must:


a.) #include "winsock2.h"

&

b.) Import ws2_32.lib into the Project . . .



char msg[256];
int address;
int session_id = aw_int (AW_CLICKED_SESSION);
aw_address(session_id);
address = aw_int (AW_AVATAR_ADDRESS);
sprintf ((char*)reply,"Whois results for %s", aw_string
(AW_CLICKED_NAME));
aw_say ((char*)reply);
sprintf (msg, "IP address: %s", inet_ntoa (*(struct in_addr*)&address));
aw_say (msg);


.. . . As you can tell, this was created as a way to find out the IP address
of a person simply by clicking on them : )

-Andon Coleman

Re: pls help

Dec 16, 1999, 6:45pm
This is a multi-part message in MIME format.

------=_NextPart_000_0034_01BF4654.E8DC1D80
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I don't know about that . . . I can do things 3 times as fast in Visual =
C++ then I can in Visual Basic . . . And YES, that *IS* creating MFC =
based apps . . .

And, Visual C++ / Visual Basic don't compile "DOS" based apps in the =
first place . . . It's all Win32 . . . Even if it is a Console app, it's =
still Win32.
[View Quote] I agree. Windows API isn't the easiest. And MFC doesn't make it any
better. If you really want a graphical user interface, then VB is the
answer. VC/C++ is for producing the "fastest" code, but VB beats out
in the race for productivity. Mr. Grimm's OCX is very useful for add-
ing the SDK API to VB. (http://members.home.com/grimmcna/).


=3D=3D=3D=3D
Aaron Hill (Redmond, Wash.)
Electronic Mail: serac at lightmail.com
IRC Nickname: serac (on EF-Net)
ICQ UIN: 46803963
ActiveWorlds
Citizenship: serac



------=_NextPart_000_0034_01BF4654.E8DC1D80
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2722.1300" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial>I don't know about that . . .&nbsp;I can do =
things 3 times=20
as fast in Visual C++ then I can in Visual Basic . . . And YES, that =
*IS*=20
creating MFC based apps . . .</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>And, Visual C++ / Visual Basic don't compile =
"DOS" based=20
apps in the first place . . . It's all Win32 . . . Even if it is a =
Console app,=20
it's still Win32.</FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV>serac &lt;<A=20
href=3D"mailto:serac at lightmail.com">serac at lightmail.com</A>&gt; wrote =
in message=20
<A=20
=
href=3D"news:384da107 at server1.Activeworlds.com">news:384da107 at server1.Act=
iveworlds.com</A>...</DIV>&gt;=20
I recommend this - if your new to C - don't use win apps - I've made =
a<BR>&gt;=20
succesfull paintball bot with very little help and I still make DOS=20
aps,<BR>&gt; simply because Windows is so much harder - especially =
with the=20
button<BR>&gt; handlers.<BR><BR>I agree.&nbsp; Windows API isn't the=20
easiest.&nbsp; And MFC doesn't make it any<BR>better.&nbsp; If you =
really want=20
a graphical user interface, then VB is the<BR>answer.&nbsp; VC/C++ is =
for=20
producing the "fastest" code, but VB beats out<BR>in the race for=20
productivity.&nbsp; Mr. Grimm's OCX is very useful for add-<BR>ing the =
SDK API=20
to VB.&nbsp; (<A=20
=
href=3D"http://members.home.com/grimmcna/)">http://members.home.com/grimm=
cna/)</A>.<BR><BR><BR>=3D=3D=3D=3D<BR>Aaron=20
Hill (Redmond, Wash.)<BR>Electronic Mail: <A=20
=
href=3D"mailto:serac at lightmail.com">serac at lightmail.com</A><BR>&nbsp;&nbs=
p; IRC=20
Nickname: serac (on =
EF-Net)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ICQ=20
UIN: 46803963<BR>ActiveWorlds<BR>&nbsp;&nbsp;&nbsp; Citizenship:=20
serac<BR><BR></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0034_01BF4654.E8DC1D80--

Auto-Update method for C++ (Requires MFC)

Dec 16, 1999, 8:36pm
This is a multi-part message in MIME format.

------=_NextPart_000_0045_01BF47EA.B526C700
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hehe, forgot to mention that in order for the Banner Message to work, =
you must insert an extra linebreak after it . . . With WordPad, you =
cannot add an empty linebreak, so you'll have to hit enter and then =
space . . .

Anyway, sorry I forgot to mention this :)

Best regards,
Andon M. Coleman

Senior Programmer
R&D

Nothing, Inc.
[View Quote] NOTE: This code does require some modification on your part . . . If =
you're too lazy to do that, then you shouldn't even be programming :)


I ran into a problem early in the design stages when I first came up =
with the idea that my BOT (Ultra BOT) should have an Auto-Upgrade =
mechanism . . . The problem I was facing was that I didn't have a =
dedicated server to run a "Version Server" on. I did however have web =
space on a Static Address. So I decided to use this to my advantage, and =
develop an Auto-Update method that read from a proprietary script =
language. Thus my Auto-Update mechanism was born!

I believe the source code is commented enough, so I don't feel I need =
to explain sections of the code very much (But if you do have a question =
about it, feel free to E-Mail me at : gizmo98 at earthlink.net or Telegram =
me, as Andon13 . . .)

But I do feel the Script language itself needs a bit of explaining . . =
..

=20
=20
=20
Let me try to explain it here . . .

The first three things in the script are :
%MV (Master Version), %NF (Number of Files), and %ND (Number of =
Directories)

%MV is the overall version . . . Anything added / updated when you =
upload a new Version.dat should reflect this number . . .
Notes about %MV : If it is equal to the %MV stored on the Client's =
computer, by default the Message of the Day will be displayed. If it's =
higher, the Generic "New Version" MessageBox will pop-up, and if it's =
lower an error message will be generated . . . Also, it is important to =
think of the Master Version and File Versions as Update Numbers rather =
than Version Numbers . . .

%NF is equal to the number of total files in the Update script . . .
%ND is equal to the number of secondary directories used . . .

=20
Next we move on to the files . . .

The format for the LOCAL File Location is :
xL <FILE NAME>, where x is the File Number and <FILE NAME> is the path =
to be used.

The format for the EXTERNAL (URL) File Location is :
xF <URL>, where x is the File Number and <URL> is the URL of the file.

The format for the File Version is :
xV <VER>, where x is the File Number and <VER> is the Update number =
you assign to the file.

Lastly,
%BM is the "Banner Message" . . . There is support in the Auto-Update =
mechanism for a custom message using this . . .
A very good example is given in Ultra BOT, which is currently in =
Closed BETA (I need more "intelligent" testers though =3D)).

Any questions about this should be easily explained by tinkering with =
the version.dat and the Sample Auto-Update app, which the FULL source =
code is included for.

FINAL NOTES on Script :
You need to include a file that will download to ReleaseNotes.txt . . =
.. This will be displayed as soon as the Updater finishes downloading all =
of the files, and after it's been read, will launch your program again.
The version.dat script requires you save / modify it using WordPad =
(provided with Windows) or any other program that saves Line Breaks as : =
"\r\n" instead of "\n" - Save it as a "Text Document" (You may have to =
rename it from "version.dat.txt" to "version.dat" . . . Stupid WordPad!)
Also, when uploading, you must upload it as a binary file to preserve =
the "\r\n" linebreaks . . . If you *DO NOT* do both of these, the =
Version Check / Updater won't know what it's reading.




Known Bug:
Directory creation used to work, but now creates an incorrectly named =
directory . . . If you figure out why, I'd love to hear it :)

I hope this helps you a lot (even if the documentation isn't the =
greatest =3DP)

Best regards,
Andon M. Coleman

Senior Programmer
R&D

Nothing, Inc.







------=_NextPart_000_0045_01BF47EA.B526C700
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2722.1300" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial>Hehe, forgot to mention that in order for the =
Banner=20
Message to work, you must insert an extra linebreak after it . . . With =
WordPad,=20
you cannot add an empty linebreak, so you'll have to hit enter and then =
space .=20
.. .</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>Anyway, sorry I forgot to mention this =
:)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>Best regards,</FONT></DIV>
<DIV><FONT face=3DArial>Andon M. Coleman</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>Senior Programmer</FONT></DIV>
<DIV><FONT face=3DArial>R&amp;D</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>Nothing, Inc.</FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV>andon13 &lt;<A=20
href=3D"mailto:gizmo98 at earthlink.net">gizmo98 at earthlink.net</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:3859650f at server1.Activeworlds.com">news:3859650f at server1.Act=
iveworlds.com</A>...</DIV>
<DIV><FONT face=3DArial>Hello everyone . . . It's me again. I haven't =
posted=20
anything here in ages (partly due to the fact that I didn't know how =
to=20
anymore).</FONT></DIV>
<DIV><FONT face=3DArial>Anyway, what I'm posting here is a method to =
Check the=20
version of a program, and if it's older then the one stored on the =
NET,=20
upgrade . . .</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>NOTE: This code does require some modification =
on your=20
part . . . If you're too lazy to do that, then you shouldn't even be=20
programming :)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>I ran into a problem early in the design =
stages when I=20
first came up with the idea that my BOT (Ultra BOT) should have an=20
Auto-Upgrade mechanism . . . The problem I was facing was that I =
didn't have a=20
dedicated server to run a "Version Server" on. I did however have web =
space on=20
a Static Address. So I decided to use this to my advantage, and =
develop an=20
Auto-Update method that read from a proprietary script language. Thus =
my=20
Auto-Update mechanism was born!</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>I believe the source code is commented enough, =
so I=20
don't feel&nbsp;I need to explain sections of the code very much (But =
if you=20
do have a question about it, feel free to E-Mail me at : <A=20
href=3D"mailto:gizmo98 at earthlink.net">gizmo98 at earthlink.net</A> or =
Telegram me,=20
as Andon13 . . .)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>But I do feel the Script language itself needs =
a bit of=20
explaining . . .</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial>Let me try to explain it here . . =
..</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>The first three things in the script are =
:</FONT></DIV>
<DIV><FONT face=3DArial>%MV (Master Version), %NF (Number of Files), =
and %ND=20
(Number of Directories)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>%MV is the overall version . . . Anything =
added /=20
updated when you upload a new Version.dat should reflect this number . =
..=20
.</FONT></DIV>
<DIV><FONT face=3DArial>Notes about %MV : If it is equal to the %MV =
stored on=20
the Client's computer, by default the Message of the Day will be =
displayed. If=20
it's higher, the Generic "New Version" MessageBox will pop-up, and if =
it's=20
lower an error message will be generated . . . Also, it is important =
to think=20
of the Master Version and File Versions as Update Numbers rather than =
Version=20
Numbers . . .</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>%NF is equal to the number of total files in =
the Update=20
script . . .</FONT></DIV>
<DIV><FONT face=3DArial>%ND is equal to the number of secondary =
directories used=20
. . .</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial>Next we move on to the files . . =
..</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>The format for the LOCAL File Location is =
:</FONT></DIV>
<DIV><FONT face=3DArial>xL &lt;FILE NAME&gt;, where x is the File =
Number and=20
&lt;FILE NAME&gt; is the path to be used.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>The format for the EXTERNAL (URL) File =
Location is=20
:</FONT></DIV>
<DIV><FONT face=3DArial>xF &lt;URL&gt;, where x is the File Number and =

&lt;URL&gt; is the URL of the file.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>The format for the File Version is =
:</FONT></DIV>
<DIV><FONT face=3DArial>xV &lt;VER&gt;, where x is the File Number and =

&lt;VER&gt; is the&nbsp;Update number you assign to the =
file.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>Lastly,</FONT></DIV>
<DIV><FONT face=3DArial>%BM is the "Banner Message" . . . There is =
support in=20
the Auto-Update mechanism for a custom message using this . . =
..</FONT></DIV>
<DIV><FONT face=3DArial>A very good example is given in Ultra BOT, =
which&nbsp;is=20
currently in Closed BETA (I need more&nbsp;"intelligent" testers=20
though&nbsp;=3D)).</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>Any questions about this should be easily =
explained by=20
tinkering with the version.dat and the Sample Auto-Update app, which =
the FULL=20
source code is included for.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>FINAL NOTES on Script :</FONT></DIV>
<DIV><FONT face=3DArial>You need to include a file&nbsp;that will =
download to=20
ReleaseNotes.txt . . . This will be displayed as soon as the Updater =
finishes=20
downloading all of the files, and after it's been read, will launch =
your=20
program again.</FONT></DIV>
<DIV><FONT face=3DArial>The version.dat script requires you save / =
modify it=20
using WordPad (provided with Windows) or any other program that saves =
Line=20
Breaks as : "\r\n" instead of "\n" - Save it as a "Text Document" (You =
may=20
have to rename it from "version.dat.txt" to "version.dat" . . . Stupid =

WordPad!)</FONT></DIV>
<DIV><FONT face=3DArial>Also, when uploading, you must upload it as a =
binary=20
file to preserve the "\r\n" linebreaks . . . If you *DO NOT* do both =
of these,=20
the Version Check / Updater won't know what it's reading.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>Known Bug:</FONT></DIV>
<DIV><FONT face=3DArial>Directory creation used to work, but now =
creates an=20
incorrectly named directory . . . If you figure out why, I'd love to =
hear it=20
:)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>I hope this helps you a lot (even if the =
documentation=20
isn't the greatest =3DP)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>Best regards,</FONT></DIV>
<DIV><FONT face=3DArial>Andon M. Coleman</FONT></DIV>
<DIV><BR><FONT face=3DArial>Senior Programmer</FONT></DIV>
<DIV><FONT face=3DArial>R&amp;D</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>Nothing, Inc.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0045_01BF47EA.B526C700--

GDI Problems with Win32 . . .

Dec 26, 1999, 7:22pm
This is a multi-part message in MIME format.

------=_NextPart_000_0008_01BF4FBB.67A7EBC0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

void CAvatarMap::OnPaint()=20
{
CPaintDC dc(this); // device context for painting

CPaintDC Map(GetDlgItem(IDC_MapControl)); // device context for =
painting
=20
CRect rect;
GetDlgItem(IDC_MapControl)->GetClientRect (&rect);

CPoint Center;
Center =3D rect.CenterPoint();

Map.SetMapMode(MM_ISOTROPIC);
Map.SetViewportExt (rect.Width(), rect.Height());
Map.SetWindowExt (rect.Width(),rect.Height());

// Draws the Axis lines
Map.MoveTo (Center.x,rect.top);
Map.LineTo (Center.x,rect.bottom);
Map.MoveTo (rect.left,Center.y);
Map.LineTo (rect.right,Center.y);

// Draws the Border
Map.MoveTo (rect.left, rect.top);
Map.LineTo (rect.left, rect.bottom);
Map.MoveTo (rect.right, rect.top);
Map.LineTo (rect.right, rect.bottom);
Map.MoveTo (rect.left, rect.top);
Map.LineTo (rect.right, rect.top);
Map.MoveTo (rect.left, rect.bottom);
Map.LineTo (rect.right, rect.bottom);

// Draws the Avatar Blips
POSITION pos;
for( pos =3D list.GetHeadPosition(); pos !=3D NULL; )
{
CString NextPerson =3D list.GetNext( pos );
char NAME[18];
sprintf(NAME,"%s",NextPerson);

CString MyName;
MyName.Format("[%s]",aw_string(AW_LOGIN_NAME));

if (NextPerson =3D=3D MyName)
Map.SetViewportOrg (rect.Width() / 2, rect.Height() / 2);

else
{
int NS =3D GetNS(NAME);
int WE =3D GetWE(NAME);
NS -=3D aw_int(AW_MY_X);
WE -=3D aw_int(AW_MY_Z);
NS *=3D .015;
WE *=3D .015;
NS *=3D .0001;
WE *=3D .0001;

if (NS < 0)
NS =3D abs(NS);

else
NS /=3D 2;

if (WE < 0)
WE =3D abs(WE);

else
WE /=3D 2;

CString Testing; // This =
is my problem . . .
Testing.Format("NS: %d, EW: %d",NS,WE); // According to this, the =
output is alwyas the same
MessageBox(Testing); // Is there =
anything easily spotable that is wrong with my code above?

Map.Ellipse(WE-5,NS-5,WE+5,NS+5);
}
}
=20
CDialog::OnPaint();
}

If this code isn't enough, I can send you the entire Visual C++ Project =
.. . . I'm new to GDI, so don't laugh at my code :)

Thanks,
Andon M. Coleman

Senior Programmer
R&D

Nothing, Inc.

------=_NextPart_000_0008_01BF4FBB.67A7EBC0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2722.2800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial>void CAvatarMap::OnPaint() =
<BR>{<BR>&nbsp;CPaintDC=20
dc(this); // device context for painting</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>&nbsp;CPaintDC Map(GetDlgItem(IDC_MapControl)); =
// device=20
context for painting<BR>&nbsp;<BR>&nbsp;CRect=20
rect;<BR>&nbsp;GetDlgItem(IDC_MapControl)-&gt;GetClientRect=20
(&amp;rect);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>&nbsp;CPoint Center;<BR>&nbsp;Center =3D=20
rect.CenterPoint();</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT=20
face=3DArial>&nbsp;Map.SetMapMode(MM_ISOTROPIC);<BR>&nbsp;Map.SetViewport=
Ext=20
(rect.Width(), rect.Height());<BR>&nbsp;Map.SetWindowExt=20
(rect.Width(),rect.Height());</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>&nbsp;// Draws the Axis =
lines<BR>&nbsp;Map.MoveTo=20
(Center.x,rect.top);<BR>&nbsp;Map.LineTo=20
(Center.x,rect.bottom);<BR>&nbsp;Map.MoveTo=20
(rect.left,Center.y);<BR>&nbsp;Map.LineTo =
(rect.right,Center.y);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>&nbsp;// Draws the Border<BR>&nbsp;Map.MoveTo=20
(rect.left,&nbsp; rect.top);<BR>&nbsp;Map.LineTo (rect.left,&nbsp;=20
rect.bottom);<BR>&nbsp;Map.MoveTo (rect.right, =
rect.top);<BR>&nbsp;Map.LineTo=20
(rect.right, rect.bottom);<BR>&nbsp;Map.MoveTo (rect.left,&nbsp;=20
rect.top);<BR>&nbsp;Map.LineTo (rect.right, =
rect.top);<BR>&nbsp;Map.MoveTo=20
(rect.left,&nbsp; rect.bottom);<BR>&nbsp;Map.LineTo (rect.right,=20
rect.bottom);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>&nbsp;// Draws the Avatar Blips</FONT></DIV>
<DIV><FONT face=3DArial>&nbsp;POSITION pos;<BR>&nbsp;for( pos =3D=20
list.GetHeadPosition(); pos !=3D NULL; =
)<BR>&nbsp;{<BR>&nbsp;&nbsp;CString=20
NextPerson =3D list.GetNext( pos );<BR>&nbsp;&nbsp;char=20
NAME[18];<BR>&nbsp;&nbsp;sprintf(NAME,"%s",NextPerson);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>&nbsp;&nbsp;CString=20
MyName;<BR>&nbsp;&nbsp;MyName.Format("[%s]",aw_string(AW_LOGIN_NAME));</F=
ONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>&nbsp;&nbsp;if (NextPerson =3D=3D=20
MyName)<BR>&nbsp;&nbsp;&nbsp;Map.SetViewportOrg (rect.Width() / 2, =
rect.Height()=20
/ 2);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT =
face=3DArial>&nbsp;&nbsp;else<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;int=20
NS =3D GetNS(NAME);<BR>&nbsp;&nbsp;&nbsp;int WE =3D=20
GetWE(NAME);<BR>&nbsp;&nbsp;&nbsp;NS -=3D =
aw_int(AW_MY_X);<BR>&nbsp;&nbsp;&nbsp;WE=20
-=3D aw_int(AW_MY_Z);<BR>&nbsp;&nbsp;&nbsp;NS *=3D =
..015;<BR>&nbsp;&nbsp;&nbsp;WE *=3D=20
..015;<BR>&nbsp;&nbsp;&nbsp;NS *=3D .0001;<BR>&nbsp;&nbsp;&nbsp;WE *=3D=20
..0001;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>&nbsp;&nbsp;&nbsp;if (NS &lt;=20
0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;NS =3D abs(NS);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT =
face=3DArial>&nbsp;&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;&nbsp;NS /=3D=20
2;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>&nbsp;&nbsp;&nbsp;if (WE &lt;=20
0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;WE =3D abs(WE);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT =
face=3DArial>&nbsp;&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;&nbsp;WE /=3D=20
2;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>&nbsp;&nbsp;&nbsp;CString=20
Testing;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//=20
This is my problem . .&nbsp;.<BR>&nbsp;&nbsp;&nbsp;Testing.Format("NS: =
%d, EW:=20
%d",NS,WE);&nbsp;&nbsp;&nbsp; //&nbsp;According to this, the output is =
alwyas=20
the same<BR>&nbsp;&nbsp;&nbsp;MessageBox(Testing);&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp; //=20
Is there anything easily spotable that is wrong with my code =
above?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT=20
face=3DArial>&nbsp;&nbsp;&nbsp;Map.Ellipse(WE-5,NS-5,WE+5,NS+5);<BR>&nbsp=
;&nbsp;}<BR>&nbsp;}<BR>&nbsp;<BR>&nbsp;CDialog::OnPaint();<BR>}</FONT></D=
IV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>If this code isn't enough, I can send you the =
entire=20
Visual C++ Project . . . I'm new to GDI, so don't laugh at my code=20
:)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>Thanks,</FONT></DIV>
<DIV><FONT face=3DArial>Andon M. Coleman</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>Senior Programmer</FONT></DIV>
<DIV><FONT face=3DArial>R&amp;D</FONT></DIV>
<DIV><BR><FONT face=3DArial>Nothing, Inc.</FONT></DIV></BODY></HTML>

------=_NextPart_000_0008_01BF4FBB.67A7EBC0--

GDI Problems with Win32 . . .

Dec 27, 1999, 2:08pm
This is a multi-part message in MIME format.

------=_NextPart_000_01C1_01BF505B.367D71A0
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_01C2_01BF505B.367D71A0"


------=_NextPart_001_01C2_01BF505B.367D71A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Let's try this :)
[View Quote] Norm

------=_NextPart_001_01C2_01BF505B.367D71A0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Let's try this :)</FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV>sagaman &lt;<A=20
href=3D"mailto:sagaman at sagatech.com">sagaman at sagatech.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:3866c96f at server1.Activeworlds.com">news:3866c96f at server1.Act=
iveworlds.com</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>That didn't come through very well at =
all.&nbsp;=20
It might be better as an attachment.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2>Norm</FONT></DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_001_01C2_01BF505B.367D71A0--

------=_NextPart_000_01C1_01BF505B.367D71A0
Content-Type: application/octet-stream;
name="AvatarMap.h"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="AvatarMap.h"

#if =
!defined(AFX_AVATARMAP_H__F56C5C83_BADB_11D3_87A1_00508B09DD0C__INCLUDED_=
)
#define AFX_AVATARMAP_H__F56C5C83_BADB_11D3_87A1_00508B09DD0C__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// AvatarMap.h : header file
//

#include "Resource.h"

/////////////////////////////////////////////////////////////////////////=
////
// CAvatarMap dialog

class CAvatarMap : public CDialog
{
// Construction
public:
CAvatarMap(CWnd* pParent =3D NULL); // standard constructor
void AvatarList (CStringList* AVList);

CStringList list;

// Dialog Data
//{{AFX_DATA(CAvatarMap)
enum { IDD =3D IDD_AvatarMap };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA


// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAvatarMap)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL

// Implementation
protected:

// Generated message map functions
//{{AFX_MSG(CAvatarMap)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately =
before the previous line.

#endif // =
!defined(AFX_AVATARMAP_H__F56C5C83_BADB_11D3_87A1_00508B09DD0C__INCLUDED_=
)

------=_NextPart_000_01C1_01BF505B.367D71A0
Content-Type: application/octet-stream;
name="AvatarMap.cpp"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="AvatarMap.cpp"

// AvatarMap.cpp : implementation file
//

#include "stdafx.h"
#include "Ultra BOT.h"
#include "AvatarManage.h"
#include "AvatarMap.h"
#include "Aw.h"
#include "ChatMonitor.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] =3D __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////=
////
// CAvatarMap dialog


CAvatarMap::CAvatarMap(CWnd* pParent /*=3DNULL*/)
: CDialog(CAvatarMap::IDD, pParent)
{
//{{AFX_DATA_INIT(CAvatarMap)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}


void CAvatarMap::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAvatarMap)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CAvatarMap, CDialog)
//{{AFX_MSG_MAP(CAvatarMap)
ON_WM_LBUTTONDOWN()
ON_WM_PAINT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////=
////
// CAvatarMap message handlers

void CAvatarMap::OnLButtonDown(UINT nFlags, CPoint point)=20
{
}

BOOL CAvatarMap::OnInitDialog()=20
{
CDialog::OnInitDialog();

return TRUE;
}

void CAvatarMap::OnPaint()=20
{
CPaintDC dc(this); // device context for painting

CPaintDC Map(GetDlgItem(IDC_MapControl)); // device context for =
painting
=09
CRect rect;
GetDlgItem(IDC_MapControl)->GetClientRect (&rect);

CPoint Center;
Center =3D rect.CenterPoint();

Map.SetMapMode(MM_ISOTROPIC);
Map.SetViewportExt (rect.Width(), rect.Height());
Map.SetWindowExt (rect.Width(),rect.Height());

// Draws the Axis lines
Map.MoveTo (Center.x,rect.top);
Map.LineTo (Center.x,rect.bottom);
Map.MoveTo (rect.left,Center.y);
Map.LineTo (rect.right,Center.y);

// Draws the Border
Map.MoveTo (rect.left, rect.top);
Map.LineTo (rect.left, rect.bottom);
Map.MoveTo (rect.right, rect.top);
Map.LineTo (rect.right, rect.bottom);
Map.MoveTo (rect.left, rect.top);
Map.LineTo (rect.right, rect.top);
Map.MoveTo (rect.left, rect.bottom);
Map.LineTo (rect.right, rect.bottom);

// Draws the Avatar Blips

POSITION pos;
for( pos =3D list.GetHeadPosition(); pos !=3D NULL; )
{
CString NextPerson =3D list.GetNext( pos );
char NAME[18];
sprintf(NAME,"%s",NextPerson);

CString MyName;
MyName.Format("[%s]",aw_string(AW_LOGIN_NAME));

if (NextPerson =3D=3D MyName)
Map.SetViewportOrg (rect.Width() / 2, rect.Height() / 2);

else
{
int NS =3D GetNS(NAME);
int WE =3D GetWE(NAME);
NS -=3D aw_int(AW_MY_X);
WE -=3D aw_int(AW_MY_Z);
NS *=3D .015;
WE *=3D .015;
NS *=3D .0001;
WE *=3D .0001;

if (NS < 0)
NS =3D abs(NS);

else
NS /=3D 2;

if (WE < 0)
WE =3D abs(WE);

else
WE /=3D 2;

CString Testing;
Testing.Format("NS: %d, EW: %d",NS,WE);
MessageBox(Testing);

Map.Ellipse(WE-5,NS-5,WE+5,NS+5);
}
}
=09
CDialog::OnPaint();
}

void CAvatarMap::AvatarList (CStringList* AVList)
{=20
list.RemoveAll();
POSITION pos;
for( pos =3D AVList->GetHeadPosition(); pos !=3D NULL; )
{
CString NextPerson =3D AVList->GetNext( pos );
list.AddTail(NextPerson);
}
}

------=_NextPart_000_01C1_01BF505B.367D71A0--

Ultra BOT correction . . .

Feb 2, 2000, 10:27pm
This is a multi-part message in MIME format.

------=_NextPart_000_003B_01BF6DB2.8D5AAF00
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Apparently the stupid News Server corrupts your files when you post =
here, so . . .

go to : UltraBOT.novaflare.com to download the Installer.exe, and simply =
run it.

Best Regards,
Andon M. Coleman

Senior Programmer
R&D

Nothing, Inc.

------=_NextPart_000_003B_01BF6DB2.8D5AAF00
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2722.2800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial>
<DIV><FONT face=3DArial>Apparently the stupid News Server corrupts your =
files when=20
you post here, so . . .</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>go to : UltraBOT.novaflare.com to download the=20
Installer.exe, and simply run it.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>Best Regards,</FONT></DIV>
<DIV><FONT face=3DArial>Andon M. Coleman</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>Senior Programmer</FONT></DIV>
<DIV><FONT face=3DArial>R&amp;D</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial>Nothing, =
Inc.</FONT></DIV></FONT></DIV></BODY></HTML>

------=_NextPart_000_003B_01BF6DB2.8D5AAF00--

An Idea

Mar 30, 2000, 3:04pm
I'm already working on this . . . It's called AW Plug-In

Check out : http://www.nothing-inc.com/AW-Plug-In/

It's currently in Alpha, and the next build will contain my Auto-Update SDK
1.0.3 Release Candidate 1 . . . Currently being tested on Ultra BOT BETA
Build 19.

Best Regards,
Andon M. Coleman

Senior Programmer,
R&D

Nothing, Inc.
http://www.nothing-inc.com/


[View Quote]

An Idea

Mar 31, 2000, 10:05pm
Oh . . . What it is, is this . . .

It's designed to be somewhat like Concept Tools, although I began work on
this long before Concept was even a citizen . . . I just never had enough
free time to get it to where it's at now . . .

After AW 3.0 comes out, I intend to make it so that it has features such as
making AW Fullscreen (Works partially with 2.2) and "Floating Contact
Lists" - So you can see your AW Contacts even when AW is not the "Foreground
Window" . . . It will be somewhat like ICQ . . . Lastly, it will have a way
to chat and read / write telegrams without looking at the AW screen (Makes
it real nice, with the Always On Top feature).

Best Regards,
Andon M. Coleman

Senior Programmer,
R&D

Nothing, Inc.
[View Quote]

compiler recommendation

Mar 30, 2000, 2:38pm
I would recommend Visual C++ just as Faber did . . . My reasons being :
First off, it is by far the easiest / most powerful C++ Compiler / IDE I
have ever used. The features such as Quick Class listing or whatever their
TM name for it is, and the MFC Class Wizard, along with the MSDN Library
makes it deliver the most bang for your buck . . . The MSDN Library
especially helps if you're new to C++, you can read up on practically
anything in it, from simple things like how to add comments to your code, to
specific details about Current and Future versions of the Win32 OS and its
many APIs.

Best Regards,
Andon M. Coleman

Senior Programmer
R&D

Nothing, Inc.
http://www.nothing-inc.com/

[View Quote]

Totally confused about object query

Mar 30, 2000, 2:57pm
About what the AW SDK samples do . . .

[Also, out of curiosity, how does the SDK get away with things like:
if (rc = aw_query (0, 0, sequence))

I'm a novice but it seems I was trained that you need double equal signs for
Boolean expressions]




Well . . . What this is REALLY saying is :

Forget about the If for now.

int rc = aw_query(0,0, sequence);
If (rc) /* Actually equates to : If (rc == true), but you do not need to do
this in C++ . . . If you wanted the code to execute if rc was false, you'd
do : If (!rc), where '!' is the C++ symbol for NOT (In C it was '~', that's
why Class Destructors are always ClassName::~ClassName(void);, but that's
another story :)) */
..
..
..

Where it will execute the code in the If block if rc is Non-Zero.
In the case of AW, Non-Zero (in terms of BOOL : true) would be an Error Code
.. . .
So, you then use the newly set rc to determine the error code.

If no error occurred, rc will be set to 0 (false)
And it will continue on past the If . . .


This is Roland's method for a somewhat decent Error Notification method.

Ideally, he would Throw a CException with the error text containing all of
the data passed by the calling function, etc . . .
This is how I do it in my SDKs, and it works great!

His concern is that it wouldn't be as easily portable to other Languages if
he added some C++ ONLY extensions to the SDK.



Anyway, I use this method a lot, all it really does is save space in your
code, since you could just as easily write it the way I demonstrated above.



Now, about your AW Object Querying, sorry . . . Can't help you there, I
tried using that once for my DJ Bot, but got so confused I just gave up :)


Best Regards,
Andon M. Coleman

Senior Programmer,
R&D

Nothing, Inc.
http://www.nothing-inc.com/ - Under construction . . .


[View Quote]

Worlds list is no longer usable in 3.0 SDK . . .

Apr 7, 2000, 7:25pm
I had that problem too, then I put the whole thing into a Thread, and it
worked! I was then able to store all of the stuff in a Linked List without
data corruption . . . Now that the World List is no longer Thread-Safe, it
should probably just be removed from the SDK, since it won't work correctly.

--
Best Regards,
Andon M. Coleman

Senior Programmer,
R&D

Nothing, Inc.
http://www.nothing-inc.com/


[View Quote]

The AW SDK *IS* Thread-Safe!

Apr 10, 2000, 10:38pm
Check this out . . . (Only relevant code has been pasted, because there's
over 120kb of code in the rest of this file, and besides, I don't distribute
full source code unless there's a good reason :)).



World List Sample : (Probably not Compilable, but the principle is clearly
visible)

UINT ONEMINUTE = 50;

CImageList m_ilWorlds;
CListCtrl m_Worlds;
LVITEM CheckIcon;
void UpdateWorldList (void);
UINT RedrawWorldList (LPVOID pParam);
UINT GenerateWorldList (LPVOID pParam);

int BGColor, WhisperColor, FriendColor, TouristColor, PSColor, AvatarColor;

CStringList PrvWrldName;
CStringList PubWrldName;
CStringList UnknownWrldName;
CStringList PrvWrldPop;
CStringList PubWrldPop;
CStringList UnknownWrldPop;

CTime LastUpdate;

bool bShowPrivate, bShowEmpty, bRunThread = true; // bShowPrivate and
bShowEmpty are read from the Registry using AfxGetApp()->GetProfileInt(...)
in OnInitDialog, and then converts them from INT to BOOL.

// ONEMINUTE is set to 60 seconds with SetTimer(...) in OnInitDialog . . .
(DUH!)

void CChatMonitor::OnTimer(UINT nIDEvent)
{
if ( nIDEvent == ONEMINUTE )
{
CTime CurrentTime = CTime::GetCurrentTime();
CTimeSpan NextUpdate = CurrentTime - LastUpdate;

if ( NextUpdate.GetMinutes() >= 5 && m_StatusTab.GetCurSel() == 1)
{
GetDlgItem(IDC_Worlds)->ShowWindow(SW_SHOW); // Makes sure the CListCtrl
is showing.
GetDlgItem(IDC_Worlds)->RedrawWindow(); // Some versions of the Common
Controls DLL require this, no idea why!?!?!?

AfxBeginThread(GenerateWorldList,NULL);
}
}

CResizingDialog::OnTimer(nIDEvent);
}

void CChatMonitor::UpdateWorldList(void) // Used to update the World List
from an External Class...
{ AfxBeginThread(GenerateWorldList,NULL); }

void CChatMonitor::SetWorldSettings (bool ShowEmpty, bool ShowPrivate)
{
bShowEmpty = ShowEmpty;
bShowPrivate = ShowPrivate;
}

UINT GenerateWorldList (LPVOID pParam)
{
if (!bRunThread)
return 0;

bRunThread = FALSE;

PubWrldName.RemoveAll(); // The following lines of code clear out any OLD
Worlds saved in the Linked Lists...
PubWrldPop.RemoveAll();
PrvWrldName.RemoveAll();
PrvWrldPop.RemoveAll();
UnknownWrldName.RemoveAll();
UnknownWrldPop.RemoveAll();

aw_event_set (AW_EVENT_WORLD_INFO, UpdateWorldList);
m_Worlds.DeleteAllItems();

int rc;
if (!rc = aw_world_list())
{
RedrawWorldList(NULL);
LastUpdate = CTime::GetCurrentTime();
}

else
{
LVCOLUMN ChangeTitle;
ChangeTitle.mask = LVCF_TEXT;
char NumberOfWorlds[10];
m_Worlds.InsertItem(0,"SDK Error",3);
CString ErrorNUM;
ErrorNUM.Format("%d",rc);
m_Worlds.SetItemText(0,1,ErrorNUM);
sprintf(NumberOfWorlds,"%d Error(s)",m_Worlds.GetItemCount());
ChangeTitle.pszText = NumberOfWorlds;
ChangeTitle.cchTextMax = sizeof(NumberOfWorlds);
m_Worlds.SetColumn(0,&ChangeTitle);
}

bRunThread = TRUE;
return 0;
}

void UpdateWorldList (void)
{
char Users[4];
sprintf(Users,"%d",aw_int(AW_WORLDLIST_USERS));

switch (aw_int (AW_WORLDLIST_STATUS))
{
case AW_WORLDSTATUS_PUBLIC:
PubWrldName.AddTail(aw_string (AW_WORLDLIST_NAME));
PubWrldPop.AddTail(Users);
break;

case AW_WORLDSTATUS_PRIVATE:
PrvWrldName.AddTail(aw_string (AW_WORLDLIST_NAME));
PrvWrldPop.AddTail(Users);
break;

default:
UnknownWrldName.AddTail(aw_string (AW_WORLDLIST_NAME));
UnknownWrldPop.AddTail(Users);
break;
}
}

UINT RedrawWorldList (LPVOID pParam)
{
m_Worlds.DeleteAllItems();

POSITION pName = PubWrldName.GetHeadPosition();
POSITION pPop = PubWrldPop.GetHeadPosition();
while( pName != NULL )
{
CString NextWorld = PubWrldName.GetNext( pName );
CString NextPop = PubWrldPop.GetNext( pPop );

int i = -1;
if (!NextWorld.CompareNoCase(aw_string(AW_WORLD_NAME))) // Done because in Build 15 of the SDK the AW_WORLD_NAME is lowercase . . .
i = m_Worlds.InsertItem (m_Worlds.GetItemCount(), NextWorld, 2);

else if (bShowEmpty || NextPop != "0")
i = m_Worlds.InsertItem (m_Worlds.GetItemCo
unt(), NextWorld, 0);

if (i != -1)
m_Worlds.SetItemText(i,1,NextPop);
}

if (bShowPrivate)
{
POSITION pName = PrvWrldName.GetHeadPosition();
POSITION pPop = PrvWrldPop.GetHeadPosition();
while( pName != NULL )
{
CString NextWorld = PrvWrldName.GetNext( pName );
CString NextPop = PrvWrldPop.GetNext( pPop );

int i = -1;
if (!NextWorld.CompareNoCase(aw_string(AW_WORLD_NAME))) // Done because
in Build 15 of the SDK the AW_WORLD_NAME is lowercase . . .
i = m_Worlds.InsertItem (m_Worlds.GetItemCount(), NextWorld, 2);

else if (bShowEmpty || NextPop != "0")
i = m_Worlds.InsertItem (m_Worlds.GetItemCount(), NextWorld, 1);

if (i != -1)
m_Worlds.SetItemText(i,1,NextPop);
}
}

LVCOLUMN ChangeTitle;
ChangeTitle.mask = LVCF_TEXT;
char NumberOfWorlds[10]; // Should probably be made into a dynamicaly sized
ptr, but I didn't want to waste my time, since as of now the number of
Worlds should never cause an Overflow in this, unless a bug occured.
sprintf(NumberOfWorlds,"%d Worlds",m_Worlds.GetItemCount());
ChangeTitle.pszText = NumberOfWorlds;
ChangeTitle.cchTextMax = sizeof(NumberOfWorlds);
m_Worlds.SetColumn(0,&ChangeTitle);

return 0;
}


Login Sample : (Probably not Compilable, but the principle is clearly
visible)

void CUltraBOTDlg::OnLogin()
{
UpdateData();

CString chNameCheck = chBotName;
chNameCheck.MakeLower();

if (nCitnum <= 1 || nCitnum >= 400000)
PlaySound("Audio/1stlaunch.wav",NULL,SND_ASYNC);

else if (chPassword.IsEmpty() || chPassword == "change_me")
PlaySound("Audio/Password.wav",NULL,SND_ASYNC);

else if (chNameCheck == "ultra bot" && nCitnum != 68992)
MessageBox("Sorry, but the name Ultra BOT is reserved for Andon13","Ultra
BOT --- Name Conflict", MB_ICONWARNING | MB_TOPMOST);

else
{
GetDlgItem(IDC_Login)->EnableWindow(false);
Connected = false;
PlaySound ("Audio/Logstart.wav",NULL,SND_ASYNC);
ChatMonitor.RemoveAllAvatars();
AvatarMap.ClearMap();

LoginStorage* ptp = new LoginStorage;
ptp->chPassword = chPassword;
ptp->chBotName = chBotName;
ptp->nCitnum = nCitnum;
ptp->nAV = nAvatar;
ptp->nX = nX;
ptp->nY = nY;
ptp->nYAW = nYAW;
ptp->nZ = nZ;
ptp->chWorldName = chWorld;
ptp->hWnd = m_hWnd;
AfxBeginThread (SecondThread, ptp);
}
}

UINT SecondThread (LPVOID pParam)
{
LoginStorage* ptp = (LoginStorage*) pParam;

CString chPassword = ptp->chPassword;
CString chBotName = ptp->chBotName;
CString chWorld = ptp->chWorldName;
int nAvatar = ptp->nAV;
int nX = ptp->nX;
int nY = ptp->nY;
int nZ = ptp->nZ;
int nYAW = ptp->nYAW;
int nCitnum = ptp->nCitnum;
HWND hWnd = ptp->hWnd;

delete ptp;

bool Success = Main.Login(nCitnum, chPassword, chBotName, chWorld, nX, nY, nZ, nYAW, nAvatar);
if (Success)
{
aw_event_set (AW_EVENT_AVATAR_ADD, handle_avatar_add);
aw_event_set (AW_EVENT_AVATAR_CHANGE, handle_avatar_change);
aw_event_set (AW_EVENT_AVATAR_DELETE, handle_avatar_delete);
aw_event_set (AW_EVENT_CHAT, handle_chat);
aw_event_set (AW_EVENT_AVATAR_CLICK, handle_avatar_click);
aw_event_set (AW_EVENT_WORLD_DISCONNECT, handle_world_disconnect);

CWnd::FromHandle(GetDlgItem(hWnd,IDC_Login))->ShowWindow(SW_HIDE);
CWnd::FromHandle(GetDlgItem(hWnd,IDC_Logoff))->ShowWindow(SW_SHOW);
}

else
CWnd::FromHandle(GetDlgItem(hWnd,IDC_Login))->EnableWindow(true);

return 0;
}

bool CUltraBOTDlg::Login (int nCitnum, /* Citizen Number */
CString chPassword, /* Password */
CString chBotName, /* Bot Name */
CString chWorld, /* World Name */
int nX, /* X Co-Ord */
int nY, /* Y Co-Ord */
int nZ, /* Z Co-Ord */
int nYAW, /* Angle */
int nAvatar) /* Avatar Number */
{
int rc;

Connected = false;

aw_destroy();

Status.Format("\r\n\r\n\r\nLogin Status:\r\nCreating Bot Instance . . .");
m_Status.SetWindowText(Status);
if (rc = aw_creat
e (chIP,nPort,0))
{
Login_Error (rc,"BOT Instance Creation Failed");
return false;
}

aw_int_set (AW_LOGIN_OWNER, nCitnum);
aw_string_set (AW_LOGIN_PRIVILEGE_PASSWORD, chPassword);
sprintf (message,"Ultra Bot %s",chVersion);
aw_string_set (AW_LOGIN_APPLICATION, message);
aw_string_set (AW_LOGIN_NAME, chBotName);
aw_int_set (AW_MY_X, nX);
aw_int_set (AW_MY_Y, nY);
aw_int_set (AW_MY_Z, nZ);
aw_int_set (AW_MY_YAW, nYAW);
aw_int_set (AW_MY_TYPE, nAvatar);
::nCitnum = nCitnum;
::chBotName = chBotName;
Whois = false;

Status.Format("\r\n\r\n\r\nLogin Status:\r\nConnecting to Universe . . .");
m_Status.SetWindowText(Status);
if (rc = aw_login ())
{
Login_Error (rc,"Universe Connect Failed");
return false;
}

Status.Format("\r\n\r\n\r\nLogin Status:\r\nConnecting to World . . .");
m_Status.SetWindowText(Status);
if (rc = aw_enter (chWorld,0))
{
Login_Error (rc,"World Connect Failed");
return false;
}

Status.Format("\r\n\r\n\r\nLogin Status:\r\nBinding to Avatar . . .");
m_Status.SetWindowText(Status);
if (rc = aw_state_change ())
{
Login_Error (rc,"Avatar Bind Failed");
return false;
}

else
{
PlaySound ("Audio/Logfinish.wav",NULL,SND_ASYNC);

LoginTime = CTime::GetCurrentTime();
Connected = true;

CTime StartTime = CTime::GetCurrentTime();
CString ChatTime = StartTime.Format("%B %#d, %Y at %#I:%M:%S %p (%Z)");

if (!ChatMonitor.bLogStarted)
{
CString ChatStart;
ChatStart.Format("Chat log started : %s",ChatTime);
ChatMonitor.Print2(ChatStart, RGB(0,0,0), 1, 0, 0, 0);
ChatMonitor.bLogStarted = true;
}

ChatMonitor.UpdateWorldList();
ChangeWorld();
return true;
}

return false;
}

CString CUltraBOTDlg::Login_Error (int m_nError, char m_chReply2[32])
{
Connected = false;

switch(m_nError)
{
case 1:sprintf (message,"Citizen number has expired");break;
case 3:sprintf (message,"Citizen number is invalid");break;
case 4:sprintf (message,"Message is too long");break;
case 5:sprintf (message,"Passwords cannot contain spaces");break;
case 6:sprintf (message,"Password is too long");break;
case 7:sprintf (message,"Password is too short");break;
case 8:sprintf (message,"Range too large");break;
case 9:sprintf (message,"Range too short");break;
case 10:sprintf (message,"Too many users");break;
case 11:sprintf (message,"Too few users");break;
case 12:sprintf (message,"RC_LICENSE_WORLD_CONTAINS_SPACE");break;
case 13:sprintf (message,"Invalid password");break;
case 14:sprintf (message,"RC_UNABLE_TO_MAIL_BACK_NUMBER");break;
case 15:sprintf (message,"RC_LICENSE_WORLD_TOO_SHORT");break;
case 16:sprintf (message,"RC_LICENSE_WORLD_TOO_LONG");break;
case 17:sprintf (message,"RC_SERVER_OUT_OF_MEMORY");break;
case 27:sprintf (message,"World is not running");break;
case 31:sprintf (message,"RC_NOT_LOGGED_IN");break;
case 32:sprintf (message,"RC_UNAUTHORIZED");break;
case 33:sprintf (message,"RC_ALREADY_LICENSED");break;
case 34:sprintf (message,"RC_NO_SUCH_LICENSE");break;
case 39:sprintf (message,"RC_IDENTITY_ALREADY_IN_USE");break;
case 40:sprintf (message,"RC_UNABLE_TO_REPORT_LOCATION");break;
case 41:sprintf (message,"RC_INVALID_EMAIL"); break;
case 42:sprintf (message,"Citizen number doesn't exist");break;
case 43:sprintf (message,"Invalid password");break;
case 58:sprintf (message,"Upgrade required");break;
case 59:sprintf (message,"BOT limit reached");break;
case 64:sprintf (message,"RC_LICENSE_STARTS_WITH_NUMBER");break;
case 66:sprintf (message,"RC_NO_SUCH_EJECTION");break;
case 67:sprintf (message,"No such session number");break;
case 100:sprintf (message,"RC_EMAIL_CONTAINS_INVALID_CHAR");break;
case 101:sprintf (message,"RC_EMAIL_ENDS_WITH_BLANK");break;
case 102:sprintf (message,"RC_EMAIL_MISSING_DOT");break;
case 103:sprintf (message,"RC_EMAIL_MISSING_AT");break;
case 104:sprintf (message,"RC_EMAIL_STARTS_WITH_BLANK");break;
case 105:sprintf (message,"RC_EMAIL_TOO_LONG");break;
case 106:sprintf (message,"RC_EMAIL_TOO_SHORT");break;
case 107:sprintf (message,"RC_NAME_ALREADY_USED");break;
case 108:sprintf (message,"RC_NAME_CONTAINS_INVALID_CHAR");break;
case 109:sprintf (message,"RC_NAME_CONTAINS_INVALID_BLANK");break;
case 110:sprintf (message,"RC_NAME_DOESNT_EXIST");break;
case 111:sprintf (message,"RC_NAME_ENDS_WITH_BLANK");break;
case 112:sprintf (message,"RC_NAME_TOO_LONG");break;
case 113:sprintf (message,"The name : %s, is too short", chBotName);break;
case 114:sprintf (message,"RC_NAME_UNUSED");break;
case 115:sprintf (message,"RC_PASSWORD_TOO_LONG");break;
case 116:sprintf (message,"RC_PASSWORD_TOO_SHORT");break;
case 117:sprintf (message,"RC_PASSWORD_IS_WRONG");break;
case 126:sprintf (message,"RC_NUMBER_ALREADY_USED");break;
case 127:sprintf (message,"RC_NUMBER_OUT_OF_RANGE");break;
case 128:sprintf (message,"Privilege password too short");break;
case 203:sprintf (message,"RC_NOT_CHANGE_OWNER");break;
case 204:sprintf (message,"RC_CANT_FIND_OLD_ELEMENT");break;
case 211:sprintf (message,"RC_CANT_CHANGE_OWNER");break;
case 216:sprintf (message,"RC_CANT_BUILD_HERE");break;
case 232:sprintf (message,"RC_NOT_ALLOWED");break;
case 300:sprintf (message,"RC_ENCROACHES");break;
case 301:sprintf (message,"RC_NO_SUCH_OBJECT");break;
case 302:sprintf (message,"RC_NOT_DELETE_OWNER");break;
case 303:sprintf (message,"RC_TOO_MANY_BYTES");break;
case 306:sprintf (message,"RC_UNREGISTERED_OBJECT");break;
case 308:sprintf (message,"RC_ELEMENT_ALREADY_EXISTS");break;
case 311:sprintf (message,"RC_NO_BUILD_RIGHTS");break;
case 313:sprintf (message,"Object outside of world property limits");break;
case 314:sprintf (message,"RC_RESTRICTED_OBJECT");break;
case 400:sprintf (message,"RC_OUT_OF_MEMORY");break;
case 401:sprintf (message,"RC_NOT_YET");break;
case 402:sprintf (message,"TIMEOUT");break;
case 403:sprintf (message,"RC_NULL_POINTER");break;
case 404:sprintf (message,"Unable to contact universe");break;
case 405:sprintf (message,"Unable to contact world");break;
case 406:sprintf (message,"Invalid world name");break;
case 415:sprintf (message,"RC_SEND_FAILED");break;
case 416:sprintf (message,"RC_RECEIVE_FAILED");break;
case 421:sprintf (message,"RC_STREAM_EMPTY");break;
case 422:sprintf (message,"RC_STREAM_MESSAGE_TOO_LONG");break;
case 423:sprintf (message,"World name too long");break;
case 426:sprintf (message,"Message too long");break;
case 429:sprintf (message,"Unable to connect to %s : %d",chIP,nPort);break;
case 439:sprintf (message,"No connection");break;
case 442:sprintf (message,"Unable to initialize network");break;
case 443:sprintf (message,"Incorrect_Message_Length");break;
case 444:sprintf (message,"RC_NOT_INITIALIZED");break;
case 445:sprintf (message,"No BOT instance exists.");break;
case 446:sprintf (message,"RC_OUT_BUFFER_FULL");break;
case 447:sprintf (message,"RC_INVALID_CALLBACK");break;
case 448:sprintf (message,"RC_INVALID_ATTRIBUTE");break;
case 449:sprintf (message,"RC_TYPE_MISMATCH");break;
case 450:sprintf (message,"RC_STRING_TOO_LONG");break;
case 451:sprintf (message,"RC_READ_ONLY");break;
case 453:sprintf (message,"RC_INVALID_INSTANCE");break;
case 454:
sprintf (message,"This version of Ultra BOT is ONLY compatible with AW.DLL
build %d",AW_BUILD);
GetDlgItem(IDC_Login)->EnableWindow(false); // Disables login because of
incorrect AW.DLL version.
break;
case 461:sprintf (message,"RC_IN_BUFFER_FULL");break;
case 463:sprintf (message,"RC_PROTOCOL_ERROR");break;
case 464:sprintf (message,"RC_QUERY_IN_PROGRESS");break;
case 466:sprintf (message,"I was ejected from this world.");break;
case 467:sprintf (message,"I am not allowed to enter this world.");break;
case 471:sprintf (message,"Internet connection lost");break;
case 474:sprintf (message,"RC_NOT_AVAILABLE");break;
default :sprintf (message,"Unknown Error (%d)!",m_nError);break;
}

PlaySound ("Audio/Error.wav",NULL,SND_ASYNC);
Status.Format("\r\n\r\n\r\n%s\r\n\r\nReason : %s",m_chReply2,message);
m_Status.SetWindowText(Status);

CString Returned;
Returned.Format("%s",message);
return Returned;
}


--- END ---
I didn't feel like defining the variables for the Login for ya, but I'll
give you this much . . .

typedef struct tagTHREADPARMS {
int nCitnum;
int nPort;
int nX;
int nY;
int nZ;
int nYAW;
int nAV;
CString chPassword;
CString chBotName;
CString chWorldName;
CString chIP;
HWND hWnd;
} LoginStorage;


And that should be all you need, if you're a "serious coder" :)

Best Regards,
Andon M. Coleman

Senior Programmer
R&D

Nothing, Inc.

P.S. Been using these methods for 6 months now . . . Left a BOT running with
this for over a month on my server, not a single crash! So it's pretty safe
to say that the AW SDK has proven to be Thread-Safe!

What is API?

Apr 12, 2000, 6:15pm
Why the heck do you need a C++ wrapper?
It's actually time saving to leave it in C . . .

[View Quote]

3.0 SDK not worth it...

Oct 24, 2000, 12:25pm
I've been using the 3.0 SDK in my primary BOT project since it was released,
and the only thing I have to say is... It's not worth it. Sure the ability
to telport someone else sounds cool, but the features the 3.0 SDK has
disabled outweigh the good...

Mainly what I'm referring to is the ambiguity of the Universe Connection
errors now. Where as in the past it would return a useful non-zero error
code, now all it returns is 439 (Unable to connect). Very hard to explain to
my users that when it says this it could mean practically anything.

Also, somehow the World List Callback or perhaps the way aw_int and
aw_strings are stored in the memory has changed, because the World List is
no longer thread safe. I have to run it in a thread in my case, because the
method I use to store the World Info is rather slow on some machines, but on
others it's very fast... I probably ought to re-evaluate the situation, but
in the mean time I'm going back to Build 15 which will alieviate some of my
headaches.

So, in essence... For the reasons stated above, I am concluding that the AW
3.0 SDK isn't worth re-compiling your programs with, unless you can find a
practical use for Avatar Teleportation that outweighs the loss of the two
abovementioned statements.

For some of you, the AW 3.0 SDK may be fine and dandy and that's great, but
in my case it's not worth the increased executable and DLL size after
compilation.

Best Regards,
Andon M. Coleman

Senior Programmer,
R&D

Nothing, Inc
http://www.nothing-inc.com/

P.S. If you figure out a method to fix the two problems mentioned above in
the 3.0 SDK feel free to give me a jingle at : CodeMaster at Nothing-Inc.com

AW SDK C# port

Dec 1, 2000, 2:11pm
First off I'd like to make those who are not already aware (people living
under rocks, etc...) that Microsoft's Visual Studio .NET is in BETA right
now. It includes a major new feature for C / C++ oriented programmers!

The feature is of course the new language derived from C++ called:
C# (Pronounced: C Sharp)

+ The closest thing to 100% OOP (Object Oriented Programming) I have ever
seen... It goes so far into Object Orientation that it actually gets rid of
Global Objects and Macros!

+ New file format (.cs)... This file format is like a combination Header /
Implementation file. You define and actually implement the entire class
within this file rather than having to use a header and then using #include
in your implementation file.

+ Memory Garbage Collector... Appropriately named, this feature takes RAD
(Rapid Application Development) to new levels by completely automating all
memory allocation, etc... This sounds like the greatest thing since sliced
bread until you realize the way this is done for the most part is by getting
rid of pointers!!! Use of pointers will flag your code as "Unsafe" to the C#
compiler and it will completely disable the Garbage Collector allowing you
to completely screw up your stack and heap (just as easily as you could in C
and C++).

+ Standard Libraries replaced with BCL (Base Class Library), primarily
because the std. libs were comprised almost entirely of global objects and
macros =P

+ Error codes are for the most part indicated using the good ol' TRY / THROW
/ CATCH methods first seen in C++. What this really means is that because
the BCL, which is essentially the Standard Libraries from C++ re-written
using classes is designed to throw exceptions rather than return a non-zero
integer or handle when an error occurs. Because of this, programmers who
rarely used the TRY / THROW / CATCH methods find themselves forced to use
TRY and CATCH to detect when a function did not run successfully. It is
believed that once these programmers begin to learn how to use TRY, THROW
and CATCH that they will write the majority of their code using THROW
instead of returning non-zero integer error codes. At least that's what was
said on news://msnews.microsoft.com/microsoft.public.dotnet.languages.csharp
(Very good resource for learning the language) and it's available to the
public, that is to say Non-BETA testers.

+ New variations of some of the old loop keywords, such as ForEach <--- I
have yet to find a use for that one, but that's not to say it's useless.
Once you understand that all the loop keywords actually compile the same
EXACT way when converted to assembly you really don't care much about
variations... Sure For is much easier than using While when you want to
perform the same action every time the loop reaches the end of its brackets,
but it's completely possible to do it with While, and it compiles the same
exact way regardless of which method you use, it's just displayed as fewer
lines of code BEFORE being compiled.

+ Namespaces have a practical use in C#! The BCL uses different namespaces
for different portions of it... For instance the pre-processor command
"#using Console" would tell the compiler to essentially do an "#include
<Console.h>" if you want to relate it to C++. As stated above there are now
such thing as header files in C#, that is why namespaces essentially replace
them.

+ C# can be used to write programs for ANY Microsoft OS other than DOS. This
is due to the fact that C# has native support for CLR, which stands for
(Common Language Runtime). From what I have gathered thus far it appears to
be COM's (Component Object Model) replacement for the new .NET OSes
(Whistler and Blackcomb) and any other OS with CLR manually installed.

+ C# is still evolving! Currently there's nothing really exciting for C#
other than native support for the .NET framework, CLR support, being almost
completely object-orianted, garbage collector and some new data types. But
because it is not a standard language at the moment (such as ANSI C++) it
will most likely continue to evolve until ANSI or some other organization
decides to make a standardized version of it.



Now that we have that long and boring list of advantages for using C# out of
the way, we can actually talk about porting the AW SDK to C# rather than
simply being a C library!

In order to do this, you would first need to create an object-oriented
version of the AW SDK. This has in fact already been done. I forget who the
creator of it is, however... In any case, it should be fairly simple to
create classes containing functions which encapsulate all of the AW SDK
functions...

If you successfully port the SDK, you should end up with a (.cs) file with
several classes that encapsulate all AW SDK methods and throw exceptions
rather than returning non-zero integer values for errors. By having your C#
port throw exceptions when an SDK error occurs instead of checking the
integer return value every time you perform an AW SDK function you can
reduce the number of lines of code needed to accurately debug you
application as well as make your code easier to read!

I am in the process of attempting a C# port for the AW SDK and my BOTs right
now... If I manage to finish mine before someone more experienced than me
comes along and does it better, I will post my results here for you all to
use...


Best Regards,
Andon "The Code Master" Coleman
CodeMaster at Nothing-Inc.com

Senior Programmer
R&D

Nothing, Inc.
http://www.nothing-inc.com/ -- "We put the nothing in NULL"

Console Message URL detection is not properly implemented...

Nov 29, 2002, 4:38am
Here's an example I found while testing Ultra BOT 2.0...

Ignore the URL, it's just a demonstration;


First, I tried simple URLs, such as www.google.com, http://foo.bar.TLD,
etc... They both worked, then I came unto this little devil of an URL:

"Check out www.nothing-inc.com/network.php :)"

This message works fine in whispers and plain broadcasts, however, the
console message code fails to recognize it as an URL. Which is intriguing,
as it seems console messages aren't being processed the same way as normal
text. There is some degree of URL detection present, but it doesn't appear
to be fully / properly implemented.

This is probably pretty trivial to correct, as I've identified the problem
for you already :)


- Andon13

Rotations

Mar 31, 2000, 1:38pm
The problem with this, is . . . It would require much more storage space
on the Server Side, and . . . The Z-Buffering would kick in and be
horrendous!!! For those of you who are 3D Challenged, Z-Buffering is the
buffering of Z Coordinates in a 3D environment, usually done to place
objects that intersect in the correct place relative to eachother.

And we all know that newbies would figure out a way to overlap every
single piece in their building using Vertical Rotations . . . Then be so
proud that they built a span of road that is viewable at > 1 fps.

Best Regards,
Andon M. Coleman

Senior Programmer
R&D

Nothing, Inc.
http://www.nothing-inc.com/

[View Quote]

Console Message URL detection is not properly implemented...

Nov 29, 2002, 4:38am
Here's an example I found while testing Ultra BOT 2.0...

Ignore the URL, it's just a demonstration;


First, I tried simple URLs, such as www.google.com, http://foo.bar.TLD,
etc... They both worked, then I came unto this little devil of an URL:

"Check out www.nothing-inc.com/network.php :)"

This message works fine in whispers and plain broadcasts, however, the
console message code fails to recognize it as an URL. Which is intriguing,
as it seems console messages aren't being processed the same way as normal
text. There is some degree of URL detection present, but it doesn't appear
to be fully / properly implemented.

This is probably pretty trivial to correct, as I've identified the problem
for you already :)


- Andon13

light?

Dec 2, 2002, 11:46pm
The direction of the light is handled by a vector...

The X component controls its West / East translation.
The Y component controls its Up / Down tilt.
The Z component controls its North / South translation.

It's important to note that positive X values indicate a Western direction,
while positive Z values indicate a Northern trend.

It's probably a bad idea to use a positive direction for Y :)


- Andon13



[View Quote]

Console Message URL detection is not properly implemented...

Nov 29, 2002, 4:38am
Here's an example I found while testing Ultra BOT 2.0...

Ignore the URL, it's just a demonstration;


First, I tried simple URLs, such as www.google.com, http://foo.bar.TLD,
etc... They both worked, then I came unto this little devil of an URL:

"Check out www.nothing-inc.com/network.php :)"

This message works fine in whispers and plain broadcasts, however, the
console message code fails to recognize it as an URL. Which is intriguing,
as it seems console messages aren't being processed the same way as normal
text. There is some degree of URL detection present, but it doesn't appear
to be fully / properly implemented.

This is probably pretty trivial to correct, as I've identified the problem
for you already :)


- Andon13

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