strike rapier // User Search

strike rapier // User Search

1  ...  7  8  9  10  11  12  ...  141  |  

What's wrong with my bot's initialization code? (sorry for being a newb, lol)

Aug 16, 2003, 8:54pm
Yeah... that too... but you gotta start somewhere (Just not VB... I can
honestly say once you know of arrays, loops and basic handling... get the
hell outta VB... don't go into API and such.. its a waste of time, C++ is
100% directly.. no screwing about. :)

- Mark

[View Quote]

What's wrong with my bot's initialization code? (sorry for being a newb, lol)

Aug 17, 2003, 8:00am
Well,
Perhaps the better descriptor would be "Horrible programming language -
for me", after all each to their own tallents, abilities and what they
prefer to use... Anyway, Visual Basic is good in the fact thats its a Rapid
Development Platform... this is of course until you try to intergrate some
API... then you end up with 30 modules / classes full of API and
basic-classes code just for WritePrivateProfileString API...

The way I look at it, C++ cuts down on the dependancies... but creating its
dialogs can be hellish at points, even with MFC, in *most* cases the C++
code is also more portable to other systems. The other benefits I can see
are things like inline asm code, dynamic memory allocation (new / delete are
the most brilliant things for 3 / 6 character words!). Granted some things
may generally be harder (char arrays etc) with faster-than-light speed and
handling... and you have CString or you own classes if you need them, but
theyre slower... but its left to the programmer to decide, and its quite
viable to dump one to the other half way down a procedure just to make life
easier for yourself and dump a little speed.

Next, the limitations... I, personally find the syntax of the VB language
hard to cope with and rediculously hard to track, as you said, C++ freaks if
you miss a ; out but its nothing that can't be solved by reading though 2 or
3 lines of code. I just like the { } syntax.... I also like how you can
create different levels of variables encased in { }'s in different sections
of the procedures....

Course... the best bit of C++ over VB is OOP, the class based structure and
derivision etc of C++ kicks the preverbial shite out of anything VB can
offer like that... I remember using Brants classes for avatars... and it
ended up taking like half a second to loop though the avatars and check
several variables, mainly because you had to call bloody member functions to
get and set variables! Now on a bot that handles typically 50 to 100 events
a second this is... bad... Then, I created the whole project in C++, and
whooosh, direct access to all the variables, and public, private and
protected content!

Not to mention no variants! (Unless you use COleVariant classes for DAO DB
as Im having to...) which speeds things up a rediculous level... and the
concept of overloading is absolutly brilliant... Take my Zeus bot for
example... the console message to user function, its overloaded with....

ConsoleMessage(CString szMessage, int red, int green, int blue, bool bold,
bool italics);
ConsoleMessage(CConsoleMessage *pConsoleMsg);
ConsoleMessage(CAwMessageDump *pMessageDump);

Now thats infinatly better than having 3 different function names for each
of them... they may need different bodies but its still a brilliant way of
handling things...

Admittedly... I still use VB at some points..;
Even though I usually hate using it (Seem to put ; after every line....);
Which gets realllly reallly reallly annoying;

But, like I said.. when you basically want to take something like a text box
and do some replacements at once, you can't beat VB for dev time, 10
seconds, literally... best because of its form based development... Of
course once you start dumping into things like API, and copying and pasting
a exoillion lines of API code into modules... (Unless you were l33t and made
a VB add in *G*) it gets damned annoying! Personally I don't see why you
have to have a hundred lines of const int WM_BLAH = &3B2C...

A B at stard with C++ is the things like strtok that take a lot of working out,
and really... its best to dump the loop to a class and read pointers to char
arrays from there... VB rules on strtok vs split...

Anyway, thats what I wanted to say.. I just find C++ more of an actual
programming language... and less of just writing stuff out in plain english,
lets face it.. natural language IS slower... GUI vs DOS... DOS wins hands
down for most things (excluding graphics design etc, hehe)...

- Mark

[View Quote] > To me, no one is qualified to say any language is a "horrible programming
language",
> especially when we are talking about the most used problem solving
language in corporate
> environments used by millions of programmers but this is the internet,
anyone says
> whatever they want :)
>
> Nobody cares in the real world (!=bots) for the "400 - 900KB" wasted
(which is a false
> assertion) or the "9 million runtime dlls that bloat up your system"
(ditto). They want
> the job done, as fast as possible and have a solution that can be easily
supported and
> developed; not have 3,000 lines of code just for sending an app to the
systray (or your
> winsock example) just because it *might* execute 100ms faster. I have seen
a lot of bad C
> code as well as a lot of bad VB code and a lot of bad Java code and a lot
of bad ------
> (insert lang name here) code; all languages are great just as all OS are
great, it's how
> you use them that makes the difference.
>
> If you have the knowledge you mentioned, that's good for you; you are not
a one trick
> pony which was the point in my original post. Anyway this has gone enough
off topic so I
> rest my case here; not sure why you assume I don't know C though :)
>
> ./B

What's wrong with my bot's initialization code? (sorry for being a newb, lol)

Aug 17, 2003, 10:25am
Then use... mfc....

- Mark

[View Quote]

What's wrong with my bot's initialization code? (sorry for being a newb, lol)

Aug 17, 2003, 10:50am
Well in that case you need to actually go and learn it... its simple..

- Mark

[View Quote]

What's wrong with my bot's initialization code? (sorry for being a newb, lol)

Aug 17, 2003, 10:51am
StdAfx - precompiled header

- Mark

[View Quote]

What's wrong with my bot's initialization code? (sorry for being a newb, lol)

Aug 17, 2003, 12:49pm
Let me give all of the newbs to programming a piece of advice from my own
experience...

Way yonder back, I wanted to be a programmer. I was shopping one day, and
found a book in a bookshop called "Using Visual Basic" it was about £6.99 so
I bought it...

I took it home... fired up Visual Basic.. and then set to work! I wondered
why most the stuff it told me to do didnt actually exist in my version of
the VB IDE... and why I had to load it up though MS Word each time, It didnt
say anything about that in the book... oh dear... yep you guessed it, I
thought VBA was full VB... what a prat I was...

Anyway, VB went out the window for a few weeks... then, a friend gave me a
VB package, the one above the training edition... and I realised... wow!
Timer control, this must be the real deal! Indeed it was... I managed
form.print "Hello World" and was amazed with myself and went running off
bragging about how good I was at VB... sad sad me...

I spent about 10 hours a day coding... lol, Managed to make 3 calculators
erm... all using inputboxes and just had basic stuff... litterally, utter
crap...

You only learn how crap you are at something when your either humble...
which lets face it no new programmer is... or you have a more experienced
programmer take the piss... in my case it was the latter... and Robbie
(Gamer at the time) absolutly slammed me when I couldent even impliment a
simple function!

I copied and pasted and thought I was soooo l33t not understanding the first
bloody thing about what the hell I was doing with all this code, error after
error.... It was about this time Baron was close to having a mental
breakdown from me telegraming him every... 30 seconds or so... (no...
literally) and at this time he gave me this really brilliant idea.... why
not... get a book!? The idea seemed so enlightening at the time, so I went
off down to PC world and I got a book called 'Visual Basic Step By Step'
from the MS press....

I spent the next 3 week or so doing NOTHING but learning things from that
book, it actually explained what functions, subs etc are, what control
attributes and GUIs are... I thought I was so good before but I knew NOTHING
that this book was teaching me...

One thing I must stress to every new programmer, programming takes utter
dedication, if you can not be bothered with it, turn back now...

Anyway, I kept learning and learning, bots were the key to me learning VB, I
made everything with it, database bots, drawing bots, the works, being
reassured by friends that I could make it and always having the fallback of
chuckling at the person who taught me almost everything else I know about it
(Baron) when he took out all of AWGZ with a PK bot on eject by accident...

Now I know I was bad... but some people out there are worse... telegrams
such as 'how do I put text in a text box'... a person can explain to you how
to put text in a text box... but thats all, but if you LEARN how about
control attributes and properties, you will be able to handle everything!
Background colours, fonts etc...

But you have to keep commiting yourself to it.. never give up and seek help
from people when you need it, but don't be a idiot and try and get *all* the
solutions from other people, its what I tried doing with Baron.. it dosent
work... you end up getting more and more confused....

But keep at it, and remember you have to LEARN... get books, read
websites... its all good...

Eventually I got to the point (World Core 5) where VB could no longer handle
what I needed to do with it... and that was the end of VB for me... now Ive
started all over again (Although this time I promised myself I wouldent
hassle anyone!)... And hey, look where its got me. Im lead programmer for an
AW distributor :)

- Mark

What's wrong with my bot's initialization code? (sorry for being a newb, lol)

Aug 17, 2003, 6:24pm
if RC is null... everything is OK and your doing something else wrong...

- Mark

[View Quote]

Bot logout/login

Aug 18, 2003, 4:20pm
Be careful when posting about .NET and make sure you state which version it
is :)

C++.NET and VisualBasic.NET are 2 diff fishies.

- Mark

[View Quote]

Bot logout/login

Aug 18, 2003, 7:52pm
I used to notice how if you had a 1 time per second heartbeat, you could get
quite a few dissconections... especially on 56k...

But now I use 16 / 32 a second so... hehe

- Mark

[View Quote]

Bot logout/login

Aug 18, 2003, 9:18pm
Meh, aw_wait not specific heartbeats.. you know what I mean...

- Mark

[View Quote]

Bot logout/login

Aug 18, 2003, 9:19pm
RC_FEATURE_REQUIRED

- Mark

[View Quote]

Bot logout/login

Aug 18, 2003, 9:37pm
Anyway... the correct way to do it is as follows...

You need to track several booleans and events in your program from the
second you load it, obviously you can only recieve certain events at certain
times in certain states, hence this works...

Set the events for world attributes change, and universe attributes
change... you also need a boolean for 'Inworld' and 'InUniverse'...

Right after RCless login, set InUniverse and InWorld to true.. this
signifies that you are in the world...

You also need a variable called blnDissconected...

When you recieve a dissconect event, set blnDissconected to true... Because
youc an recieve uni and world attributes seperatly without having to
reconnect, if you recieve them, if you then check against blnDissconected,
if it is false you can dissregard it (appart from whatever bot handling you
want for these events)...

Anyway, when your dissconected set bldDissconected to true... there is no
way of detecting if you dropped out of the world or the uni, appart from by
checking an aw_string like AW_WORLD_NAME for an RC code I believe... Anyway,
depending on that set either InUniverse and / or InWorld to false...

Now then...

As the SDK reconnects itself it will retrieve these various events, if you
recieve world attributes first after dissconection, then it was only world
departure, not uni departure... Moving on... When you recieve these events
check if InWorld / InUniverse is false.. if it is, set it to true as the
event occurs...

So say you get uni dissconected.. this is what would happen...

blnDissconected = true
<check world status> Lets just pretend we killed out modem a second...
blnInWorld = false
blnInUniverse = false
<if AW_DISSCONECT_REASON == (RC_EJECTED || RC_NOT_WELCOME) We have just
been dealt with, with eject or world change.. no need to do anything we have
been killed at world level.. so set blnInWorld to false...>
</Check World Status>

[SDK Reattempts login here]...

<Event Universe Attributes>
if (blnInUniverse == false)
{
blnInUniverse = true;
blnDissconected = false;
}
</Event Universe Attributes>

[SDK checks if we need to re-enter world]
[Not in world previously, stops here]

<Event World Attributes>
if (blnInWorld == false)
{
blnInWorld = true;
}

Well, I think that *Should* work... Note I only typed it out just now cause
my PC will explode if I load up Zeus in .NET at this point in time...

- Mark

[View Quote]

Bot logout/login

Aug 18, 2003, 9:38pm
*LOL* Course you could always make a firewall bot and track which
connections are lost on various events...

- Mark

[View Quote]

Bot logout/login

Aug 19, 2003, 3:19pm
I ran a 3.1 uni on localhost.. and I think ive had that session before.. :S

- Mark

[View Quote]

Bot logout/login

Aug 19, 2003, 5:23pm
Egh yuo havent seen much else... I seriously don't think anyones going to
object to using a redunct uni with no external access, and 1 P-20 world for
the sole purpose of testing bots Joe... Infact... I do believe that its a
brilliant way to develop bots when your on something like 56Kb modems... I
wouldent be suprised if a significant majority of people in this NG had them
to test also... and im not even gonna get started on yours

- Mark

[View Quote]

Bot logout/login

Aug 19, 2003, 5:47pm
Joe, we know alllll your secrets...

And Viruses and Trojans? LOL

- Mark

[View Quote]

Bot logout/login

Aug 19, 2003, 5:57pm
Wernt you publicly advertising selling AWProxy on your website like 2 week
ago?...

- Mark

[View Quote]

Where oh where are the bot programmers?

Aug 26, 2003, 6:20pm
Those who generally consider ourselves proper developers.. are just stay
away from you :)

- Mark

[View Quote]

Where oh where are the bot programmers?

Aug 26, 2003, 7:04pm
Only when he gives you a source of sarcastic comments to amuse us all :)

- Mark

[View Quote]

Where oh where are the bot programmers?

Aug 26, 2003, 7:25pm
No... all the programmers realised you have to include the *.lib files in
the compiler options as aw.lib or aw_static.lib...

- Mark

[View Quote]

Where oh where are the bot programmers?

Aug 26, 2003, 7:50pm
First time for everything I suppose... :)

- Mark

[View Quote]

Where oh where are the bot programmers?

Aug 26, 2003, 8:49pm
Well, C++.. im just handling the windows graphics API at the moment for a
mesh designer.

- Mark

[View Quote]

Where oh where are the bot programmers?

Aug 26, 2003, 9:40pm
Seriously... don't you have anything else to do you? You seem like the sort
of person who could get out and about...

- Mark

[View Quote]

Where oh where are the bot programmers?

Aug 27, 2003, 3:12pm
Anyway, after all that.. the answer you were probably looking for is
'programming'

- Mark

[View Quote]

Where oh where are the bot programmers?

Aug 27, 2003, 3:16pm
Which of course... AWProxy is made in :)

- Mark

[View Quote]

Where oh where are the bot programmers?

Aug 27, 2003, 7:45pm
Oh you changed it? I have the origional sitting here in VS right now and I
seem to understand it all, so guess it must be in something-C

:O

- Mark

[View Quote]

Where oh where are the bot programmers?

Aug 28, 2003, 3:21pm
Well that is (Almost) what this newsgroup is for.. so if you tell us, you
may just get an answer... but put it in a new thread :)

- Mark

[View Quote]

<no subject>

Aug 29, 2003, 3:21pm
That dosent happen in this newsgroup... we just ignore it :)

- Mark

[View Quote]

<no subject>

Aug 31, 2003, 7:14pm
What are you doing in here? This is the SDK newsgroup... your looking for
news:\\news.activeworlds.com\silly.twits ;)

- Mark

[View Quote]

<no subject>

Aug 31, 2003, 7:50pm
Sorry... news:\\news.activeworlds.com\control.twitprevention
[View Quote]

1  ...  7  8  9  10  11  12  ...  141  |  
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