trekkerx // User Search

trekkerx // User Search

1  2  3  4  5  6  ...  12  |  

How do u make a Bot in VisualBasic

Mar 14, 2001, 11:22pm
I just gfot Visual Basic, and ive been learning it.. But verytryi get to
try and make a bot, it dosnt work, and ive used the one Mr Grimm made as
an example, and i can see how to make it login can someone help me?
TrekkerX

How do u make a Bot in VisualBasic

Mar 17, 2001, 12:30am
Like????

[View Quote] > Very easy, you throw VB away and get a decent programming language :)
>
> XelaG :)~
>
[View Quote]

How do u make a Bot in VisualBasic

Mar 23, 2001, 3:15am
Yea... ive been thincking thats what i sould do. I know xelagot Scripting, wich
i noticed is alot like VB... I wonder why....XelaG... LOL.... I know some Java
and stuff.

[View Quote] > As others have mentioned, VB is a good learning tool. Yes, it lacks the
> power of C++, but that is only because it is not as complex. VB is simple,
> in that it leaves out all the MFC code and many other odd things you come
> upon in C++. I started with VB when I was 7 years old. I knew very little
> about what I was reading in the book I bought, but through time, doing the
> examples ("playing around with it" if that's what you want to call it). By
> that time I realized that VB was a load of crap and picked up C++. I
> understood much more than I would have if I started with C++. Recently I've
> picked up PERL and Java, with no problems at all. In short, VB is for
> simple, weak programs and for teaching the general ideas of programming
> (variables, functions, classes/objects, loops, if statements, ect...)
> without confusing the hell out of someone. Then you can adapt what you've
> learned to other languages, understand them more, and pick up on them
> faster. Start with VB graduate to something better ;-)
>
> --
>
> JerMe at nc.rr.com
> ----------------------
> AIM: AlphaNumeric100
> ICQ: 106209991
> AW: JerMe (#296967)
[View Quote]

free C/C++

Mar 26, 2001, 3:13am
Is it Visual?

[View Quote] > GNU (GNU (GNU (GNU (...) Not Unix) Not Unix) Not Unix) is fine and
> everyone knows about it I bet. The availibility on the web is extremely
> good ( http://www.gnu.org ).
>
> I just posted this info here as Watcom is new (as free version), very
> reliable and fast. I did several projects with it and (as long as I
> don't have to make GUI stuff) it is still my prefered compiler - and
> open source like GNU. Windows support is better than in DJGPP, so it is
> easier to handle DLL stuff - and it is basically command line too, but
> comes with an IDE.
> And for those who need it - an open Fortran is available too.
>
[View Quote]

Dose anyone know how to make a bot resond in VB?

Apr 1, 2001, 8:34pm
Dose anyone know how to make a bot respond to someting a person says in
VB? Cuz i just made one and it just sits there doing nothing... Cuz i
want to add like, when u say the bots name to make it say version, Oh
yea, can someone make a example of aa bot that u can fill out info on
where it is and stuff? and make it into a script and post it?

Re: Anyone know how to make a bot respond in VB?

Apr 2, 2001, 11:10pm
Thanxs, but it dosnt work. It just sits there... doing nothing... thats all...
Same with when a person enters, i have

Private Sub sdk_EventAvatarAdd()
Sdk.AwWhisper Sdk.AwAvatarSession, "Hello " & Sdk.AwAvatarName
message "[" & txtBotName.Text & "] : (whisper to " & Sdk.AwAvatarName & _
") Hello " & Sdk.AwAvatarName
EndSub

Ive been told thats right, but it wont work. It just sits there... doing
nothing...

[View Quote] > Actually it doesn't matter the case so long as the letters spell the key
> word
[View Quote]

Re: Anyone know how to make a bot respond in VB?

Apr 3, 2001, 9:12pm
And it wont be Case Sentive?

[View Quote] > Make it like this Trekker:
>
> Private Sub sdk_EventChat()
> Message = LCase(sdk.AwChatMessage)
> If Message = "hello" Then
> sdk.AwSay "Hello " & sdk.AwAvatarName
> End If
> End Sub
>
> Also, does anyone know what the interval on a timer needs to be multiplied
> by to equal 1 second?

Re: Anyone know how to make a bot respond in VB?

Apr 5, 2001, 8:30pm
Still wouldent that make it case sentive cuz thats what it dose on mine, and
the Lcase(something) makes it so it has to be lowercase to work, isnt there a
way to do it without it?

[View Quote] > Nope, because it changes all the characters to lowercase and then judges,
> but you cant say
>
> If Message = "HELLO" Then
>
> because it throws off the whole purpose, it has to be
>
> If Message = "hello" then
>
> : )
>
[View Quote]

Re: Anyone know how to make a bot respond in VB?

Apr 5, 2001, 9:32pm
What about the people that use correct grammer, and use Upper case
words? It excludes them

[View Quote] > You missed the point.
>
> Message = LCase(sdk.AwChatMessage)
>
> that makes what the person said lowercase
>
> If Message = "whatever" Then
>
> That checks to see if the lowercased message is the same.

Re: Anyone know how to make a bot respond in VB?

Apr 5, 2001, 10:37pm
I see, it takes the message and makes it lowercase, okay i get it, thanxs

[View Quote] > Oh my! Listen, say I was in your world and I said "HeLlO AlL"
>
> and your bot is set to do the following:
>
> Message = LCase(Sdk.AwChatMessage)
> If Message = "hello all" Then
>
> It would take "HeLlO AlL" and make it "hello all" and Message is "hello all"
> then whatever code you have under the If statement is what the bot would do.

HELP

Apr 7, 2001, 6:46pm
Are you on AOL, cuz that will do it, lol

stupid AOL

[View Quote] > I dont use a proxy, but have been provided with one by my isp if i need it
> and have tried with and without proxy settings as i access the net via cable
> modem
>
[View Quote]

HELP

Apr 7, 2001, 7:54pm
Lol good choice

[View Quote] > Wouldn't go near AOL if you paid me - LOL
>
[View Quote]

Seprating words in a ListBox

Apr 9, 2001, 6:56pm
Dose anyone know how to get words from a List box, and then have the bot
search for ppl saying words in it then haveing the bot eject them for
saying it? The list box is a list of eject words, and i cant get the bot
to pick out certan words then find them in the listbox, If anyone can
please tell me.

~ TrekkerX

Following and Joining

Apr 11, 2001, 9:15pm
Ive been working on my bot, and Ive added a thing that when you say
"(bot name) Join me" The bot will move and apper in front of you. Ive
got it to work preatty good so far, but some times it joins another
person, other than the owner. I used this to make the bot join.

If message1 = botname & " join me" Then
avloc1 = (Sdk.AwAvatarZ + 100)
avloc2 = (Sdk.AwAvatarX + 100)
avloc3 = Sdk.AwAvatarY
avloc4 = (Sdk.AwAvatarYaw - 900)
name = Sdk.AwAvatarName
Sdk.AwCitizenAttributesByNumber (txtOwner.Text)
If Sdk.AwCitizenName = name Then
Sdk.AwMyZ = avloc1
Sdk.AwMyX = avloc2
Sdk.AwMyY = avloc3
Sdk.AwMyYaw = avloc4
Sdk.AwStateChange
Sdk.AwSay "Joining you " & name
Message "[" & txtBotName.Text & "] : Joining you " & name
Else
Sdk.AwSay name & " you are not my boss."
Exit Sub
End If
End If

and all the varibles are Defined. And message, isnt a msgbox, ( M a K a
V e L i) Its used to add a line to a certan text box. I also can not get
it to apper in fromt of the person. So if anyone can, please help me.
Thanxs :-)

Could anyone teach me?

Apr 13, 2001, 10:53pm
Yea, I got a normaly 50 buck Visual Basic Book, for 5 bucks, lol. it was on sale, and it came with a C++ and Delphi, to. heheh. Anyways,
just look around spark, and If yu really want to program stick with it like foxmccloud said.

[View Quote] > You find lots of web books and tutorials now, if you're really
> interested you can learn a lot of things online.
>
[View Quote]

Making a Bot Join a Person

Apr 14, 2001, 1:39am
> Ive been working on my bot, and Ive added a thing that when you say
> "(bot name) Join me" The bot will move and apper in front of you. Ive
> got it to work preatty good so far, but some times it joins another
> person, other than the owner. I used this to make the bot join.
>
> If message1 = botname & " join me" Then
> avloc1 = (Sdk.AwAvatarZ + 100)
> avloc2 = (Sdk.AwAvatarX + 100)
> avloc3 = Sdk.AwAvatarY
> avloc4 = (Sdk.AwAvatarYaw - 900)
> name = Sdk.AwAvatarName
> Sdk.AwCitizenAttributesByNumber (txtOwner.Text)
> If Sdk.AwCitizenName = name Then
> Sdk.AwMyZ = avloc1
> Sdk.AwMyX = avloc2
> Sdk.AwMyY = avloc3
> Sdk.AwMyYaw = avloc4
> Sdk.AwStateChange
> Sdk.AwSay "Joining you " & name
> Message "[" & txtBotName.Text & "] : Joining you " & name
> Else
> Sdk.AwSay name & " you are not my boss."
> Exit Sub
> End If
> End If
>
> and all the varibles are Defined. And message, isnt a msgbox, ( M a K
> a
> V e L i) Its used to add a line to a certan text box. I also can not
> get
> it to apper in fromt of the person. So if anyone can, please help me.
> Thanxs :-)

Making a Bot Join a Person

Apr 14, 2001, 7:52pm
Thank you Grimble, I got it to work, and it works good i didnt have anyproblems
with the sin formulas. Thanxs

[View Quote] > This ALWAYS the case. The only attributes that are populated as part of the
> AW_EVENT_CHAT message are AW_AVATAR_NAME, AW_CHAT_MESSAGE, AW_CHAT_TYPE and
> AW_CHAT_SESSION. There's no "for some reason" about it ... as documented on
> http://www.activeworlds.com/sdk/AW_EVENT_CHAT.htm.
>
> If you want to do anything beyond the basic coverage of the AW events you
> have to remember all the settings from the AW_EVENT_AVATAR_CHANGE messages.
> I don't have time right now to knock up a sample application for you
> unfortunately, but basically you need to do manage a session table ...
> something like this:
>
> On an AW_EVENT AVATAR_ADD, you take all the attributes supplied by the SDK
> and create a new entry in some form of list. How you implement this list is
> vvery much dependant on your programming style, preferences and how you want
> to use the list afterwards ... it could be a (large) fixed array (not
> recommended), a dynamic array, a collection, a linked list, etc. The
> important thing is that you store the avatar's location information against
> its session number. Personally, I always use a class called CAWAvatar that
> holds the avatar's information and the owning citizen information once its
> resolved from the AW_CALLBACK_CITIZEN_ATTRIBUTES ... but it can be simple
> Session Number plus the X, Y, Z and Yaw coordinates if you want.
>
> On an AW_EVENT_AVATAR_CHANGE, you need to look up the session number in your
> list and adjust the location information held against it (X, Y, Z and Yaw).
>
> On an AW_EVENT_AVATAR_DELETE, you can throw the entry relating to that
> session away.
>
> When you get your AW_EVENT_CHAT message, you can lookup the avatar's
> location from the list to establish where the avatar really is ... NOT the
> leftovers of the previous event that updated the avatar's X, Y, Z and Yaw
> attributes in the SDK stores.
>
> As far as getting the bot to go in front of the avatar, you need to apply
> some simple maths. Simply adding 100 to the coordinates will always put the
> bot at 100 further north and 100 further west. You need to use circle
> formula to get it 1m away from the avatar in the directionthe avatar is
> LOOKING.
>
> 0 Yaw is looking North, 900 is looking West, so to find the X offset, you do
> the radius of the circle (the distance away fromt he avatar ... 100 in this
> case) and multiply it by Sine(Yaw/10). For the Z offset, you use Cosine
> instead. Therefore:
>
> botPosX = avatarPosX + (JOIN_DISTANCE * Sin(avatarPosYaw/10)
> botPosZ = avatarPosX + (JOIN_DISTANCE * Cos(avatarPosYaw/10)
>
> To make the bot "look at" the avatar ... you simply reverse the avatar's Yaw
> with simething like ((avatarPosYaw + 180) Mod 360).
>
> "The Derek" ... you amaze me ... I have only just removed you from my filter
> list (which you originally earned membership of because I was tired of your
> continual crap responses) and you immediately demonstrate the same old
> inability to read the documentation and insistance on making uninformed
> assumptions instead of finding things out. Back on the list for you.
>
> Hope this helps TrekkerX. As I said, I'm a bit puched for time right now so
> I can't make up a sample application for you. After Easter is over, if
> you're still stuck, let me know and I'll put something together for you
> quickly to demonstrate how to handle session tables. This post is using the
> event names in the actual SDK as documented (for C) but the names in the
> AwSdkOcx2 and 3 are close enough for you to make the connection.
>
> Grims
>
[View Quote]

VB installations using a 3rd party installer-tool

Apr 20, 2001, 2:05am
Go download Instal R Shield

[View Quote] > oh and if you want to use registry/start menu then look up api functions or get
> a WIN32 API book thats made specifically for vb.. very useful
>
[View Quote]

a smart way of making a bot walk randomly around

May 5, 2001, 9:58pm
I dont know much Triganomerty (Cuz im in 8th Grade) But I would make the
program genrate a random number (Something within -1000 thru 1000) and then
have it
sdk.AwMyX = (sdk.AwMyX + randnum)
sdk.AwMyZ = (sdk.AwMyZ + randnum)
I wouldent know the forumla for figuring out the angel the bot should face
when it stops moving. XelaG or Grimble might know more about that than I
would. But would would do it something like that.

[View Quote] > I use this method for general walking:
>
> sdk.AwMyX = sdk.AwMyX + 1000 'this would make the bot 1 coord to the West
> sdk.AwStateChange 'reports the stuff the server
>
> in C/C++ I guess it would be something like this:
> AW_MY_X = AW_MY_X + 1000
> AW_STATE_CHANGE
> I dunno about that, cuzz I'm no good at C++
>
> KAH
> PS. Any VB programmers are welcome to use the code in their bots :-))
[View Quote]

a smart way of making a bot walk randomly around

May 5, 2001, 10:01pm
Gotta do the math. Sory :(

[View Quote] > I don't know VB5. sorry.

a smart way of making a bot walk randomly around

May 6, 2001, 4:12pm
I think Mr Grimm shoudl add a Follow, and Join command, cuz doign the math is
hard, and theres to many lines. And keeping track of everyones location isnt
easy (the way i know how to do it)

[View Quote] [View Quote]

a smart way of making a bot walk randomly around

May 6, 2001, 6:18pm
Uhhhh, yea.... But it will then join the person that moves, and it will be
right on top of them. On my bot I have it keep the location of owners. It
then will apper 2 and half meeters infron of them facing them.

[View Quote] > Or, you could get unlazy and do it yourself, joining someone is easy, and
> follow is also.
>
> To Join:
>
> Private Sub sdk_EventChat()
> Message = LCase(sdk.AwChatMessage)
> If Message = "join" Then
> sdk.AwMyX = sdk.AwAvatarX
> <etc..>
> End If
> End Sub
>
> To Follow:
> Loop the above code.. very simple, all you have to do is think.

Running the SDK, from a diffrent form

May 6, 2001, 1:16am
Ive been working with my bot. and I decided to make it so you can
teleport the bot places from a diffrent form, and I have it kinda like
this, but the one im using is diffrent
frmMain.sdkAwMyX = awmyx.text
frmMain.sdkAwStateChange

It thin makes an error, and says "RC_NO_INSTANCE" Is what it says as the
deffintion for the error. I would appercate anyhelp if you can.

Running the SDK, from a diffrent form

May 6, 2001, 4:05pm
Yea, Im logged in and everything

[View Quote] > You are logged in when you try right?

Running the SDK, from a diffrent form

May 6, 2001, 8:00pm
>

yea, Im logged in and everything

[View Quote]

VB Removing a List Item by String

May 6, 2001, 4:09pm
If you want to do it you have to do it like this...

Private Sub sdk_EventAvatarDelete()
Dim word as string

For word = 1 to List2.ListCount - 1
If List1.list(word) = Sdk.AwAvatarName Then
List2.RemoveItem word
End If
Next Word


It should then remove the name of the person from the list box.
[View Quote] > Why do you make it harder than it is?
>
> Private Sub sdk_EventAvatarDelete()
> List2.Text = sdk.AwAvatarName
> If List2.ListIndex = -1 Then Exit Sub
> List2.RemoveItem List2.ListIndex
> End Sub
>
> To break it down so you understand the simplicity:
>
> All lists have a [Text] field that can be used to view the selected item's
> value; so if you add the avatar's name to the list's text field it will
> select the name (if in the list) and have the .ListIndex value as the number
> of the item.
>
> If the name isn't in the list, it responds -1 so if you don't exit sub if it
> responds -1, it will error "Type mismatch".
>
> If it doesn't exit sub, it will continue to the next part, it will remove
> the selected item, which is the avatar's name.
>
> Have fun!

VB Removing a List Item by String

May 6, 2001, 10:33pm
Then your teachers are stupid, did they ever learn the correct way to speak
english?
ether you ment "There" or your teachers are idiots

[View Quote] > Yes, that is the correct way to do it, like my teachers say "The can be more
> than ONE way of doing something."

Wisper targets

May 15, 2001, 12:13am
That makes sence... thought you ment how to whisper....

[View Quote] > there's no reason for using a bot for persistent ejects anymore, just use
> the World Ejections screen in the world properties (AW 3.0 and newer)
>
> KAH
>
[View Quote]

Free source code and classes

May 15, 2001, 12:20am
How do you use the Retreve integer cordinates?

[View Quote] > For those of you who have been asking about session lists and keeping track
> of avatars, I was finally able to get around to releasing a few of the
> classes that I commonly use. They allow a programmer to:
>
> -Keep a session list with three lines of code
> -Retrieve integer coordinates from a string such as "45n 45e 0a 45"
> -Look up error codes with intelligent error messages
> -Generate a coordinate string out of SDK coordinates
>
> The classes open up interesting possibilities. Since the default property
> is the session, you could whisper to a citizen by name (instead of by
> session):
>
> aw.AwWhisper Avatars( "Magine" ), "Message"
>
> or locate a specific property by name:
>
> Avatars( "Andras" ).X
>
> You can download this code at http://www.shoemakervillage.org/programs.html

Detecting a Object Click, and Verafying it.

May 15, 2001, 10:54pm
Ive been working on a bot for my rpg. And it dose query the world, and
can sence if you click an object. I cant get it to if you click an
object with a action that says something to get it to work. I have
this...

If sdk.AwObjectAction = "create sign, name click1" Then
sdk.AwSay "You clicked a sign!"
End If

I think that how it works. Im not shure, I would apperciate anyhelp.

1  2  3  4  5  6  ...  12  |  
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