Board ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
canopus // User Search
canopus // User SearchReason code 200? - add objectNov 18, 1998, 5:07pm
Changing an object is really destroying one object and building another
object in its place (see the revised documentation for aw_object_change and AW_EVENT_OBJECT_ADD). Try filling in all the properties of the new object version, and see if that helps. (Number+x+z helps to find an object, certainly.) Also, why is aw_wait outside the construction loop? [View Quote] > Hello.. > > I'm having a problem adding and changing objects....I'm using the code > > exactly as listed in the documentation for aw_object_add and > aw_object_change. > > I'm just trying to do something simple - create an object and move it > around.... > > When I attempt to add an object, the object appears in the world, with > all the > right attributes filled out, but I get "unable to add object (reason > 200)" > > I don't see reason 200 on the list, but I assume it has something to do > with permissions, > or something like that. I do have bot rights and building > rights...(eminent domain rights). > Restricted radius in the world is 0. > > After that, when I attempt to change the object with the object number > returned in > AW_OBJECT_NUMBER and the X and Z coords, I get "Unable to change object > (reason 310)" (no build rights) and then the same error message with > reason 204 > (can't find old element). > > So - first step is to understand reason 200 - anybody know this one? > > Second - I'm a bit unsure about why one needs to identify an object > with both > the object number *and* the X and Z coords - shouldn't the object number > alone > suffice? Or is it not guaranteed to be unique? > > The code - (SDK calls look strange because I'm using the version for the > Gnu compiler ) > > // Create Object > > Xcoord = 2000; > Zcoord = 2000; > > altitude = 1000; > yaw = 0; > > (AWIntSet) (AW_OBJECT_X, Xcoord); > (AWIntSet) (AW_OBJECT_Z, Zcoord); > (AWIntSet) (AW_OBJECT_Y, altitude); > (AWIntSet) (AW_OBJECT_YAW, yaw); > > (AWStringSet) (AW_OBJECT_MODEL, "tree01.rwx"); > (AWStringSet) (AW_OBJECT_DESCRIPTION, "PineTop Airways"); > > if (rc = (AWObjectAdd) ()) > printf ("Unable to add object (reason %d)\n", rc); > else > puts ("Object added"); > > object = (AWInt) (AW_OBJECT_NUMBER); > > // change object position > > (AWWait) (5000); > > for (i = 0; i<100; i++) { > > deltaX = 1000; /* place holders - These will be random > displacements */ > deltaZ = 1000; > > (AWIntSet) (AW_OBJECT_OLD_NUMBER, object); > (AWIntSet) (AW_OBJECT_OLD_X, Xcoord); > (AWIntSet) (AW_OBJECT_OLD_Z, Zcoord); > (AWIntSet) (AW_OBJECT_X, Xcoord+deltaX); > (AWIntSet) (AW_OBJECT_Z, Zcoord+deltaZ); > > Xcoord += deltaX; > Zcoord += deltaZ; > > if (rc = (AWObjectChange) ()) > printf ("Unable to change object (reason %d)\n", rc); > else > puts ("Object changed"); > > (AWWait) (1000); > > } > > Etc.... > > Any suggestions appreciated...... > > Thanks > > Chris Langton > AKA MockingBird Sick of VB6 !Nov 20, 1998, 10:55pm
Delphi uses Object Pascal, and so is object-oriented, like C++. It has a
graphics user interface, with lots of built-in forms and controls, like VB6. Unlike some versions of C, even, Delphi's compiler links the aw.dll into the AWAPI (now updated to Build 9) smoothly and automatically. Check and see how quickly the Delphi versions of Sample 1 and 2 came out compared to other languages. I have the 5 construction bot applications that I came to the SDK to do finished: I'm just waiting for Beta to be over so I can use them. [View Quote] > Just to say I'll have to find another programming language that has > GUI support. VB6 can't read aw_string and crashes, sometimes > unexpectedly crashes on aw_int, in both cases with an ACCESS VIOLATION > in aw.dll... Can't spend more efforts on this rubbish language. And my > bot was getting so nice: walking, dancing, flying, travelling by foot > to new destinations... I could cry. > > I tried compiling the 1st SDK example in C with VC++6, within 15 > minutes I had the Speaker bot running and HEARING, a new experience > for me. But GUI support is lacking there, and I really want that too. > > Help! Canopus, how's Delphi? I havent programmed in Pascal since > Turbo times under DOS, that's years ago. Does object Pascal support > dlls in C? I have now Delphi 2, it's been given away for free. > > Desperately seeking.... > > XelaG Sick of VB6 !Nov 21, 1998, 1:55am
There's other useful Delphi information in the earlier Delphi threads,
especially the instructions on how to build your own Form from the Delphi version of Sample 1 and the comments following the Delphi version of Sample 2. The declaration part is for support of the other declarations; the implementation part is a peculiarity imposed by the way the DLL is linked in (a little more info there too). Other than mentioning it in your Uses clauses and looking up the correct call format, you don't have to worry about the AWAPI unit. There's a predefined PointerToInteger type in Delphi called PInteger. Delphi 2 has these constant parameters, I think: it's a way to tell the compiler that the value passed will not be changed during the procedure (more efficient code, at least with arrays, sets, etc.). The best Delphi books are those by Marco Cantu, in my opinion. He even has a section on connecting to DLL's, which is helpful in understanding our situation. [View Quote] > Hi Canopus, > > I'll give Delphi 2.0 a try. I need some help, though, to get started. > I have your akSample2eForm.pas and akAWAPI.pas (build 9), but don't > really know how to start. I've been through the code, understand most > of it at first glance, and have a few remarks or questions, besides a > fundamental one: > > 1. how do you build this project in Delphi for this to work (I know > how to make a form and position buttons etc, thats about it in > Delphi). > > In akAWAPI: > > 2. why do you have to declare the apis twice? > > 3. you have a PInteger type in > function aw_data (a : AW_ATTRIBUTE; length : PInteger) : PChar; > cdecl; > is this intentional? > > 4. what does 'const' mean in, for instance, > function aw_create (const domain : PChar; port : Integer; instance : > PAWhInst) : Integer; cdecl; > can't it be just 'domain: PChar'? I couln't find this in the Delphi > help, only the syntax 'const xxx = yyy'. > > Any help or suggestions, also about books to read, is welcome! My > e-mail is decastro at cable.a2000.nl, just in case its not appropriate to > answer to the ng. > > Thanx, XelaG > > On Fri, 20 Nov 1998 19:55:42 -0500, Canopus <aek2 at ix.netcom.com> [View Quote] Sick of VB6 !Nov 21, 1998, 2:25pm
Also, before you try to do a version of Sample 2 that will work (the invisible
bot will be in some location other than Beta 1N !W--if you can tolerate the notion that bots, like earthquakes, can have a location even though they don't have a body), read the replies to Lucio's 11/6/98 thread about aw_query. [View Quote] > Hi Canopus, > > I'll give Delphi 2.0 a try. I need some help, though, to get started. > I have your akSample2eForm.pas and akAWAPI.pas (build 9), but don't > really know how to start. I've been through the code, understand most > of it at first glance, and have a few remarks or questions, besides a > fundamental one: > > 1. how do you build this project in Delphi for this to work (I know > how to make a form and position buttons etc, thats about it in > Delphi). > > In akAWAPI: > > 2. why do you have to declare the apis twice? > > 3. you have a PInteger type in > function aw_data (a : AW_ATTRIBUTE; length : PInteger) : PChar; > cdecl; > is this intentional? > > 4. what does 'const' mean in, for instance, > function aw_create (const domain : PChar; port : Integer; instance : > PAWhInst) : Integer; cdecl; > can't it be just 'domain: PChar'? I couln't find this in the Delphi > help, only the syntax 'const xxx = yyy'. > > Any help or suggestions, also about books to read, is welcome! My > e-mail is decastro at cable.a2000.nl, just in case its not appropriate to > answer to the ng. > > Thanx, XelaG > > On Fri, 20 Nov 1998 19:55:42 -0500, Canopus <aek2 at ix.netcom.com> [View Quote] Sick of VB6 !Nov 21, 1998, 2:52pm
I believe that the Delphi linker uses the 'external' statements in the
implementation section of the AWAPI unit to set up tables in the executable file. When the *.exe is loaded, the aw.dll is loaded first, so that these tables can be filled with the addresses of the aw.dll functions already in memory. This 'dynamic' linking occurs when you are building your program, along with the 'static' linking of compiled code from the Delphi units (libraries) likewise mentioned in your Uses clause. [View Quote] > > Does this mean that the dll is actually linked when building the > programme? or is it an equivalent of the aw.lib file which is linked? Sick of VB6 !Nov 21, 1998, 5:17pm
Yes, Stop:= False should be in Button1.Click. I wrote Sample2e in a rush
just to test your old (VB) results with a multiple bot program--one loop was enough to see that the Delphi AWAPI translation of aw.h worked, at least. :) There have been several people trying to learn Delphi (if not Pascal) and the SDK at the same time; they suggested explaining how to move the information from my attached *.pas file to the Unit1 Form1 that they see when they start up Delphi, so I added a note giving explicit instructions to the first Delphi thread. Didn't think people might start at the last Delphi thread and work backwords! By the way, I've found that putting the two panels side by side in a long horizontal form fits the program neatly above the AW Browser when I shrink it. Delphi will automatically position your opening form wherever it was onscreen when you compiled the program. Yes, you can edit and compile units that have no Form file. This is very handy, just like the equivalent VB modules, for universally useful procedures. Global procedures are those declared in the interface section as 'public' form methods, or outside the form declaration (like CellBegin in Sample 2). In Delphi 2 you have a DataModule for databases that puts them on a separate unit you can access from any form; there's a DBGrid control that is great for recording data about avatars or objects you meet, and you can create and initialize it in the included DBDesktop accessory--and the DB records are visible even at design time. Look and see if there's a file with Delphi 2 called VB2Delphi or something like that: it came along with Delphi 1, to help VB programmers make the move to Pascal. Most versions of Delphi come with a lot of examples; only the source for Delphi itself was restricted to Delphi Pro editions. [View Quote] > Got it working for your akSample2eForm.pas, Canopus. Took me a few > hours, wasted time trying to use your pas file as is. I still can't > figure out how to change the name of Unit1. Form1 I can rename through > the properties. > > I moved Stop := False from Form.Create to just before the loop, > otherwise I coudn't repeat Button1Click and keep the bots there! > > Can one add units without forms? I suppose public procedures etc are > reachable from all units. > > I definitely nead a Delphi Tutorial and a good book. None included in > the free distribution, but lots of online help. I coudn't find any > code example yet, except for your code. I need to learn quite fast how > to read/write to file, to INI files, how to manage arrays, and lots > more... > > XelaG Sick of VB6 !Nov 21, 1998, 11:28pm
There's lots of good source code in the magazines *Delphi Informant* and
*Visual Programmer*. There are Delphi sites on the web, with posted code. Still have my copy of Cantu's *Delphi 2* book, but not the Delphi 2 files anymore, sorry. :( It'd be worth your while looking for that book on the bargain shelves, as his Delphi 4 book just came out. [View Quote] > None on my copy of Delphi 2.0. PCPlus claims its the full version. If > you still have the help file, my e-mail is decastro at cable.a2000.nl. > > ;o) > > On Sat, 21 Nov 1998 14:17:35 -0500, Canopus <aek2 at ix.netcom.com> [View Quote] Moving the botsNov 21, 1998, 3:20pm
The instance pointers that are returned by aw_create (see Sample2e) let
you distinguish between several bots running in the same program, Any time you ask for a bot's attributes in such a program, you should preface the inquiry with aw_instance_set(instance pointer); ditto any time you have one bot say or do anything. The bot also has a session number, I think, like citizens. This number will be changed if the network is temporarily interrupted. See the aw_session document. There is an AW_AVATAR_SESSION but there also is AW_OBJECT_SESSION. AW_AVATAR_SESSION ought to give you session numbers for the avatar whether the avatar belongs to a bot or a citizen, if both bots and citizens have a session number. Since bots can't own objects, probably AW_OBJECT_SESSION won't return a bot session. [View Quote] > 1. BTW, I'm not sure if AW_AVATAR_SESSION refers to the bot or the > avatar, you also have AW_AVATAR_NAME, the login name of the avatar - > my bot is deaf in visual basic. > > 2. Can anyone clarify this: how do I know for which bot an event is > triggered? Supposing I have bots in different worlds, how do I know in > which world the trapped avatar is? If one can't use threads, one > should be able to identify a relation between event and bot, methinks. > > XelaG Moving the botsNov 21, 1998, 3:29pm
You can tell which instance an event is for by calling aw_instance.
[View Quote] > 1. BTW, I'm not sure if AW_AVATAR_SESSION refers to the bot or the > avatar, you also have AW_AVATAR_NAME, the login name of the avatar - > my bot is deaf in visual basic. > > 2. Can anyone clarify this: how do I know for which bot an event is > triggered? Supposing I have bots in different worlds, how do I know in > which world the trapped avatar is? If one can't use threads, one > should be able to identify a relation between event and bot, methinks. > > XelaG puzzled again...Nov 25, 1998, 2:02pm
There's a mysterious (global?) variable, Say, in AddSay: could it be
causing problems? In akAWAPI. an instance is a pointer to an Integer, not an Integer; but I don't see how that could be relevant here, since the session#'s are correct. In the later example, you say there is 'just one event' trapped? You mean that here you trapped two events, one event right after the other, and all bots witnessed both of them? [View Quote] > I finally got my Delphi programme going <thanks, Canopus>, and > something puzzles me" > > I have 3 bots, they log in in the following order: > > 1. [Dealph] > 2. [Deaffer] > 3. [VBird6] > > They trap chat, avatar_add, avatar_change and avatar_delete. They > don't answer to chat/change, they only greet and say goodbye. > > I, XelaG, session number 53429, leave and come back as "PPBot1", > session number 53705. The following is said by my bots: > > [VBird6]: bye XelaG 53429 hi "PPBot1" 53705 > [Deaffer]: bye [Delph] 53429 hi "PPBot1" 53705 > [Delph]: bye [Deaffer] 53429 hi "PPBot1" 53705 > > They al say the correct session numbers, but [Deaffer] and [Delph] get > the names of the departing bots wrong: they name somebody who has said > a chat line recently: [Deaffer] names [Delph], who had said something > before my identity swap, [Delph] names [Deaffer], who just said > something. The last bot, [VBird6], always gets it right. > > I now leave as "PPBot1", and instantly come back as XelaG. Same > happens: > > [VBird6]: bye "PPBot1" 53705 hi XelaG 53709 > [Deaffer]: bye [Delph] 53705 hi XelaG 53709 > [Delph]: bye [Deaffer] 53705 hi XelaG 53709 > > What's up? Here's some of my code, can anyone enlighten me? > > XelaG. > > ======= > Code etc. > > My bots are kept in an array of records, botSlot(n). > What bots are to say is kept in a string, per bot, until it gets sent > in the timer-(aw_wait)-loop, once per second. > My event handlers look like this: > > { EVENT HANDLERS } > procedure evtChat; > var BtNr, BtInst, AvSession: Integer; AvName, AvMsg: String; > begin > { > uses AW_AVATAR_NAME ' string > AW_CHAT_MESSAGE ' string > AW_CHAT_TYPE ' long > AW_CHAT_SESSION ' long > } > AvName := String(aw_string(AW_AVATAR_NAME)); > AvSession := aw_int(AW_CHAT_SESSION); > AvMsg := String(aw_string(AW_CHAT_MESSAGE)); > BtInst := aw_instance; > BtNr := InstanceToBot(BtInst); > if BtNr < 0 then exit; > > // I do nothing with this event yet > > end; > > procedure evtAvatarAdd; > var BtNr, BtInst, AvSession: Integer; AvName: String; > begin > { > uses AW_AVATAR_SESSION ' long > AW_AVATAR_NAME ' string > AW_AVATAR_X ' long > AW_AVATAR_Z ' long > AW_AVATAR_Y ' long > AW_AVATAR_YAW ' long > AW_AVATAR_TYPE ' long > AW_AVATAR_GESTURE ' long > } > AvName := String(aw_string(AW_AVATAR_NAME)); > AvSession := aw_int(AW_AVATAR_SESSION); > BtInst := aw_instance; > BtNr := InstanceToBot(BtInst); > if BtNr < 0 then exit; > AddSay(BtNr, 'hi ' + AvName + ' ' + IntToStr(AvSession)); > end; > > procedure evtAvatarChange; > var BtNr, BtInst, AvSession: Integer; AvName: String; > begin > AvName := String(aw_string(AW_AVATAR_NAME)); > AvSession := aw_int(AW_AVATAR_SESSION); > BtInst := aw_instance; > BtNr := InstanceToBot(BtInst); > if BtNr < 0 then exit; > // here also nothing yet > end; > > procedure evtAvatarDelete; > var BtNr, BtInst, AvSession: Integer; AvName: String; > begin > AvName := String(aw_string(AW_AVATAR_NAME)); > AvSession := aw_int(AW_AVATAR_SESSION); > BtInst := aw_instance; > BtNr := InstanceToBot(BtInst); > if BtNr < 0 then exit; > AddSay(BtNr, 'bye ' + AvName + ' ' + IntToStr(AvSession)); > end; > > { } > Function InstanceToBot(i: Integer): Integer; > var b: Integer; > begin > Result := -1; > for b := 0 to MaxBot -1 do begin > if botSlot[b].Instance = i then begin > Result := b; exit; > end; > end; > end; > > procedure AddSay(n: Integer; s: String); > var d: String; > begin > d := ' '; > with botSlot[n] do begin > if Say = '' then Say := s else Say := Say + d + s; > end; > end; puzzled again...Nov 25, 1998, 2:12pm
A Delphi string that is passed to the API can behave badly if you try to reuse
the same string variable after the API returns it again, especially if you then proceed to add to it. [View Quote] > There's a mysterious (global?) variable, Say, in AddSay: could it be > causing problems? > > In akAWAPI. an instance is a pointer to an Integer, not an Integer; but I > don't see how that could be relevant here, since the session#'s are > correct. > > In the later example, you say there is 'just one event' trapped? You mean > that here you trapped two events, one event right after the other, and all > bots witnessed both of them? > [View Quote] puzzled again...Nov 25, 1998, 10:39pm
Maybe you could eliminate the string-exchanges as a source of the
problem by introducing a second string variable, and not trying to concatenate to an already-exchanged string (Say1 and Say 2, rather than Say alone). Are the two error-prone bots always repeating something they said previously? over and over? (that would indicate string-exchange problems)? Or does they just choose a Name (for Say) randomly? Also try the technique of doing a double cast to get rid of the C-inserted end-of-string marker (especially if the bots have consistent errors): String(PChar(Say)). [View Quote] > I'll have to meditate on this one. puzzled again...Nov 25, 1998, 11:21pm
Pretty convincing reasoning. Same kind of problem (AvName wrong) if you set
it up so that the Delete event is second? [View Quote] > On Wed, 25 Nov 1998 19:39:04 -0500, Canopus <aek2 at ix.netcom.com> [View Quote] puzzled again...Nov 28, 1998, 9:46pm
In the early thread on AW_EVENT_CHAT (9/16/98), Roland says that, after Build 5,
AW_AVATAR_NAME should be defined for AW_EVENT_AVATAR_ADD, AW_EVENT_AVATAR_CHANGE, AW_EVENT_AVATAR_DELETE, and AW_EVENT_CHAT. The reference to caching all strings is possibly the one in the Dialog Based Bot (10/14/98) where Roland says the SDK always makes its own copies of everything, including strings. This is the only known case where a Delphi event handler seemingly isn't receiving strings from the API correctly, and your tests are surely exhaustive (as well as exhausting). [View Quote] > Thanks, Walter. > > Yes, you did try to recruit me earlier on ;o) > > In all but the last test, I did have the add event enabled. A few > hours ago, in desperation, I decided to ignore all AW_AVATAR_NAMEs > except for the ones provided by the avatar_add event. For each bot I > built a database mapping <session number> -- <avatar name> at the add > event, and removed the item after the delete event. When I > teleport/loggin to a world, I restarted the database. It works. I wish > this had been made clearer from the start, I wasted 2 f***ing days! > There's no need for the dll to cache names anyway if it won't work > (that's why I don't use my provider's proxy, it stinks). > > Just curious, but: what about the chat event? Any known restrictions > for multiple instances? I'm starting on that trail soon, don't want to > waste time. > > BTW, when you tested this > were you using multiple bot instances? I don't think it's a Delphi > problem, but I can't be sure. The fact is that ONE of the bots seems > to allways have it right with the name in the delete event, but WHICH > is not predictable: it's ususally, but not allways, the one getting > the delete event first, as far as my tests are reliable. Anyway, I'm > tired of this, I've filled this ng with 1% of my tests, and it's still > unclear. For me, a non-feature of the dll that has not been properly > tested or documented for multiple instances. I've seen worse (what > about JBuilder2, paid $$$ for it, crashes all the time?). > > Thanks for the patience you all had to excercise. > > On Thu, 26 Nov 1998 22:27:57 +0100, "Walter Knupe" <wak at faber.ping.de> [View Quote] puzzled again...Nov 28, 1998, 10:02pm
And in all cases at least one bot gets the correct string (in one case,
two bots do). Is the dll responding too quickly to the first DELETE event (and calling for its copy of the string to be erased before it should)? [View Quote] > Removed all event handlers except for avatar_delete. > a > indicates the 1st bot to catch the event > a & indicates the right name > Bots loaded in the same order as previously: > Delph, Deaffer, VBird6 > > - {reloded all bots} > [VBird6]: >& [send3] [rec1/lastsent0] bye XelaG 53814 > [Deaffer]: [send2] [rec2/lastsent0] bye 53814 > [Delph]: [send1] [rec3/lastsent0] bye 53814 > > [VBird6]: >& [send6] [rec4/lastsent3] bye "TXelaG" 53978 > [Deaffer]: [send5] [rec5/lastsent3] bye 53978 > [Delph]: [send4] [rec6/lastsent3] bye 53978 > > [Delph]: [send7] [rec9/lastsent6] bye 53983 > [VBird6]: >& [send9] [rec7/lastsent6] bye XelaG 53983 > [Deaffer]: [send8] [rec8/lastsent6] bye 53983 > > [VBird6]: >& [send12] [rec10/lastsent9] bye "TXelaG" 53989 > [Deaffer]: [send11] [rec11/lastsent9] bye 53989 > [Delph]: [send10] [rec12/lastsent9] bye 53989 > > - {closed all, reopened and relogged bots} > [Deaffer]: >& [send1] [rec1/lastsent0] bye XelaG 54149 > [Delph]: [send2] [rec3/lastsent1] bye 54149 > [VBird6]: [send3] [rec2/lastsent1] bye 54149 > > [Deaffer]: > [send5] [rec5/lastsent3] bye XelaG 54206 > [Delph]: [send4] [rec6/lastsent3] bye 54206 > [VBird6]: & [send6] [rec4/lastsent3] bye "TXelaG" 54206 > > [Delph]: [send7] [rec9/lastsent6] bye 54211 > [VBird6]: >& [send9] [rec7/lastsent6] bye XelaG 54211 > [Deaffer]: & [send8] [rec8/lastsent6] bye XelaG 54211 > > [VBird6]: >& [send11] [rec10/lastsent9] bye "TXelaG" 54219 > [Delph]: [send10] [rec11/lastsent9] bye 54219 > [Deaffer]: [send12] [rec12/lastsent11] bye XelaG 54219 > > Its plain that allmost allways - not allways - the first to get the > event is right, > > Some names are empty strings > > Some have the wrong name... > > When avatar_add event was trapped, no names were left empty > > GO FIGURE.................. puzzled again...Nov 30, 1998, 3:45am
The behavior of AW_EVENT_AVATAR_DELETE is suspicious. I did a program
that had 3 bots, with nothing but a DELETE handler, and the same thing happened: the handler would get the bot instance and the session number correctly, but the AVATAR_NAME was lost after the first (or occasionally the second) event. Then I added AW_EVENT_AVATAR_CHANGE, and all went smoothly (with some timely advice from XelaG): the 3 bots all used the correct AVATAR_NAME. In fact, once I did a CHANGE before a DELETE, the problem with AVATAR_NAME subsequently vanished; but if I started over, with DELETE first, there was the same weird loss of AVATAR_NAME again, until the first CHANGE event.What could that mean? [View Quote] > Removed all event handlers except for avatar_delete. > a > indicates the 1st bot to catch the event > a & indicates the right name > Bots loaded in the same order as previously: > Delph, Deaffer, VBird6 > > - {reloded all bots} > [VBird6]: >& [send3] [rec1/lastsent0] bye XelaG 53814 > [Deaffer]: [send2] [rec2/lastsent0] bye 53814 > [Delph]: [send1] [rec3/lastsent0] bye 53814 > > [VBird6]: >& [send6] [rec4/lastsent3] bye "TXelaG" 53978 > [Deaffer]: [send5] [rec5/lastsent3] bye 53978 > [Delph]: [send4] [rec6/lastsent3] bye 53978 > > [Delph]: [send7] [rec9/lastsent6] bye 53983 > [VBird6]: >& [send9] [rec7/lastsent6] bye XelaG 53983 > [Deaffer]: [send8] [rec8/lastsent6] bye 53983 > > [VBird6]: >& [send12] [rec10/lastsent9] bye "TXelaG" 53989 > [Deaffer]: [send11] [rec11/lastsent9] bye 53989 > [Delph]: [send10] [rec12/lastsent9] bye 53989 > > - {closed all, reopened and relogged bots} > [Deaffer]: >& [send1] [rec1/lastsent0] bye XelaG 54149 > [Delph]: [send2] [rec3/lastsent1] bye 54149 > [VBird6]: [send3] [rec2/lastsent1] bye 54149 > > [Deaffer]: > [send5] [rec5/lastsent3] bye XelaG 54206 > [Delph]: [send4] [rec6/lastsent3] bye 54206 > [VBird6]: & [send6] [rec4/lastsent3] bye "TXelaG" 54206 > > [Delph]: [send7] [rec9/lastsent6] bye 54211 > [VBird6]: >& [send9] [rec7/lastsent6] bye XelaG 54211 > [Deaffer]: & [send8] [rec8/lastsent6] bye XelaG 54211 > > [VBird6]: >& [send11] [rec10/lastsent9] bye "TXelaG" 54219 > [Delph]: [send10] [rec11/lastsent9] bye 54219 > [Deaffer]: [send12] [rec12/lastsent11] bye XelaG 54219 > > Its plain that allmost allways - not allways - the first to get the > event is right, > > Some names are empty strings > > Some have the wrong name... > > When avatar_add event was trapped, no names were left empty > > GO FIGURE.................. Build 10 (Delphi)Nov 25, 1998, 12:52pm
This is a multi-part message in MIME format.
--------------6AE05BE25F14204566C1BA60 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Attached is Build 10 of the AWAPI, in Object Pascal for Delphi. --------------6AE05BE25F14204566C1BA60 Content-Type: application/x-zip-compressed; name="Build10API.zip" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="Build10API.zip" UEsDBBQAAAAIAPVMeSUN9qTMQAwAAIpBAAALAAAAYWtBV0FQSS5wYXPFGmtv48bx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BE25F14204566C1BA60-- object commandsDec 1, 1998, 1:53am
Yes, Sample 2 shows how to find the object by Querying, and then to
change its action property (description would be similar). [View Quote] > is there a way to assign action and description commands to an object > using the sdk. problem with AW_CALLBACK_CITIZEN_ATTRIBUTESDec 11, 1998, 5:12am
I ran the Delphi version of Sample 2, as given in the thread for 10/13/98,
except that the callback for aw_query now reports out the value of rc. Just as XelaG states, the value is a large integer, 4364400, and not a reason code. What does this number represent? [View Quote] > I installed AW_CALLBACK_CITIZEN_ATTRIBUTES as: > rc := aw_kallback_set(AW_CALLBACK_CITIZEN_ATTRIBUTES, > at cbkCitizenAttributes); > > The callback routine starts so: > procedure cbkCitizenAttributes(rc: Integer); > > When I test rc in this routine, I allways get a constant number (it > only varies if I restart the program), never zero. So I can't know > whether there is an error or not. For example: If I ask for, say, the > valid citnum of COF, I get 1, as expected, and rc = 4376872. If I then > ask for the citnum of non-existant HJHJHJHJHJHJHJHJH, I get the > previous values again: COF and 1, and rc = 4376872. > > Is this again a Delphi bug, a XelaG lack-of-knowledge, or am I missing > something important? > > <whisper> I WON'T PUBLISH ALL MY TESTS HERE THIS TIME..... > > NB: kallback is spelled so on purpose. I use Canopus' akAWAPI. > > XelaG error codes for Delphi akAWAPIDec 3, 1998, 3:15pm
Thanks, XelaG.
[View Quote] > For collectors of AW SDK Delphi paraphernalia, here's a cut-and-paste > list of ascii characters ;o) > > const RC_SUCCESS = 0; > const RC_CITIZENSHIP_EXPIRED = 1; > const RC_NO_SUCH_CITIZEN = 3; > const RC_MESSAGE_LENGTH_BAD = 4; > const RC_LICENSE_PASSWORD_CONTAINS_SPACE = 5; > const RC_LICENSE_PASSWORD_TOO_LONG = 6; > const RC_LICENSE_PASSWORD_TOO_SHORT = 7; > const RC_LICENSE_RANGE_TOO_LARGE = 8; > const RC_LICENSE_RANGE_TOO_SMALL = 9; > const RC_LICENSE_USERS_TOO_LARGE = 10; > const RC_LICENSE_USERS_TOO_SMALL = 11; > const RC_LICENSE_WORLD_CONTAINS_SPACE = 12; > const RC_INVALID_PASSWORD = 13; > const RC_UNABLE_TO_MAIL_BACK_NUMBER = 14; > const RC_LICENSE_WORLD_TOO_SHORT = 15; > const RC_LICENSE_WORLD_TOO_LONG = 16; > const RC_SERVER_OUT_OF_MEMORY = 17; > const RC_WORLD_NOT_RUNNING = 27; > const RC_NOT_LOGGED_IN = 31; > const RC_UNAUTHORIZED = 32; > const RC_ALREADY_LICENSED = 33; > const RC_NO_SUCH_LICENSE = 34; > const RC_IDENTITY_ALREADY_IN_USE = 39; > const RC_UNABLE_TO_REPORT_LOCATION = 40; > const RC_INVALID_EMAIL = 41; > const RC_NO_SUCH_ACTING_CITIZEN = 42; > const RC_ACTING_PASSWORD_INVALID = 43; > const RC_MUST_UPGRADE = 58; > const RC_BOT_LIMIT_EXCEEDED = 59; > const RC_EMAIL_CONTAINS_INVALID_CHAR = 100; > const RC_EMAIL_ENDS_WITH_BLANK = 101; > const RC_EMAIL_MISSING_DOT = 102; > const RC_EMAIL_MISSING_AT = 103; > const RC_EMAIL_STARTS_WITH_BLANK = 104; > const RC_EMAIL_TOO_LONG = 105; > const RC_EMAIL_TOO_SHORT = 106; > const RC_NAME_ALREADY_USED = 107; > const RC_NAME_CONTAINS_INVALID_CHAR = 108; > const RC_NAME_CONTAINS_INVALID_BLANK = 109; > const RC_NAME_DOESNT_EXIST = 110; > const RC_NAME_ENDS_WITH_BLANK = 111; > const RC_NAME_TOO_LONG = 112; > const RC_NAME_TOO_SHORT = 113; > const RC_NAME_UNUSED = 114; > const RC_PASSWORD_TOO_LONG = 115; > const RC_PASSWORD_TOO_SHORT = 116; > const RC_PASSWORD_IS_WRONG = 117; > const RC_PRIVILEGE_PASSWORD_IS_TOO_SHORT = 128; > const RC_NOT_CHANGE_OWNER = 203; > const RC_CANT_FIND_OLD_ELEMENT = 204; > const RC_CANT_CHANGE_OWNER = 211; > const RC_CANT_BUILD_HERE = 216; > const RC_ENCROACHES = 300; > const RC_NO_SUCH_OBJECT = 301; > const RC_NOT_DELETE_OWNER = 302; > const RC_TOO_MANY_BYTES = 303; > const RC_UNREGISTERED_OBJECT = 306; > const RC_ELEMENT_ALREADY_EXISTS = 308; > const RC_NO_BUILD_RIGHTS = 310; > const RC_OUT_OF_BOUNDS = 311; > const RC_RESTRICTED_OBJECT = 313; > const RC_RESTRICTED_AREA = 314; > const RC_OUT_OF_MEMORY = 400; > const RC_NOT_YET = 401; > const RC_TIMEOUT = 402; > const RC_NULL_POINTER = 403; > const RC_UNABLE_TO_CONTACT_UNIVERSE = 404; > const RC_UNABLE_TO_CONTACT_WORLD = 405; > const RC_INVALID_WORLD_NAME = 406; > const RC_SEND_FAILED = 415; > const RC_RECEIVE_FAILED = 416; > const RC_STREAM_EMPTY = 421; > const RC_STREAM_MESSAGE_TOO_LONG = 422; > const RC_WORLD_NAME_TOO_LONG = 423; > const RC_MESSAGE_TOO_LONG = 426; > const RC_UNABLE_TO_CONNECT = 429; > const RC_NO_CONNECTION = 439; > const RC_UNABLE_TO_INITIALIZE_NETWORK = 442; > const RC_INCORRECT_MESSAGE_LENGTH = 443; > const RC_NOT_INITIALIZED = 444; > const RC_NO_INSTANCE = 445; > const RC_OUT_BUFFER_FULL = 446; > const RC_INVALID_CALLBACK = 447; > const RC_INVALID_ATTRIBUTE = 448; > const RC_TYPE_MISMATCH = 449; > const RC_STRING_TOO_LONG = 450; > const RC_READ_ONLY = 451; > const RC_INVALID_INSTANCE = 453; > const RC_VERSION_MISMATCH = 454; > const RC_IN_BUFFER_FULL = 461; > const RC_PROTOCOL_ERROR = 463; > const RC_QUERY_IN_PROGRESS = 464; > const RC_EJECTED = 466; > const RC_NOT_WELCOME = 467; Ejecting...Dec 10, 1998, 3:54am
Sometimes when there are several bots in one program all getting
AW_EVENT_AVATAR_DELETE events, it seems that AW_AVATAR_NAME behaves strangely, while AW_AVATAR_SESSION behaves reliably. The first bot (or the first two bots) get the correct name, and the second and third (or just the third) get the wrong name. AW_EVENT_AVATAR_CHANGE doesn't have this problem. Is the cache for the name being purged too soon? (See XelaG's thread of 11/25 - 11/29.) [View Quote] > A slight clarification: only AW_AVATAR_NAME and AW_AVATAR_SESSION are > available during the AW_EVENT_AVATAR_DELETE event. Sorry the docs were > incomplete on this matter, I will update them shortly. > > -Roland > [View Quote] chess gamesDec 7, 1998, 6:59pm
If you understand Pascal (a little, anyway), try checking out the Delphi
(Object Pascal) threads. The Sample Programs have been posted here, and the AWAPI, compiled to link to the SDK (aw.dll). Start with the first Delphi thread (10/1/98). There are a number of Pascal programmers working on SDK bots. [View Quote] > > Ummm? Go for it??? hehe....You forget so soon that I said I don't > even have a clue about the first bit of code in C++ or any programming > language beyond Pascal, and even minimal introductory stuff there. > > I was brining up the suggestion so someone who DOES know how to do such > a thing could "go for it". > > Dean chess gamesDec 11, 1998, 6:53pm
If the chess pieces are tourist-owned objects, then only tourists could move
them, not a citizen (at least that's what's true on the COF world I experimented with--as a citizen I get a reproof from the building inspector & the object goes back to where it was). Since a tourist can't create, move, or delete objects atop a citizen's land, the chessboard would also need to be tourist-owned, I think. On at least one COF world, all tourist-built objects have been erased recently (in reponse to tourist vandalism), so a tourist-based chess game would also be a kind of momentary event, a chess tournament, here one day and gone the next. [View Quote] > Just to get my 2 cents in here, my personal preference would be for a chess > bot that let's *you* move the pieces instead of moving them for you. Then > there's no business of learning the language of the chess bot, you can just > walk right up and start playing. > > I think this is easier than it may sound. You simply make the chess pieces > tourist owned so > that anyone can move them. The chess bot then simply tracks and validates > any building activity that occurs on the chess board. If an illegal move is > made, the bot moves it back. If someone moves out of turn, the bot moves it > back. If someone deletes a piece, the bot replaces it. If a moved piece is > not quite centered on its new square, the bot can center it. The bot can > also speak a running commentary on the game, even calling out check and > checkmate situations automatically, and resetting the board back to its > original state for a new game. > > Further ideas include a bot that remembers players' performance across games > and posts rankings. The bot could conduct tournaments and other group > events. > > The ultimate bot, of course, would also play chess against you itself when > you can't find an opponent. > > That's my vote. Kudos to the first person who can implement it. :) > > -Roland > [View Quote] MonopolyBotDec 12, 1998, 5:42pm
In Monopoly, one player is the Banker, I think, and players buy houses, hotels,
etc., from the Bank. If these are all objects, and the property squares are likewise objects, then one option is to have the Banker be the object-owner for the houses, hotels, property squares, and the four player sides of the board, too, where goldbar objects can represent a player's money. The Banker's (invisible) bot can then create, move, and delete all game objects; and.to show which player "owns" a property, the bot can inscribe the player's name on the object as its Description. To see who owns a property, you just pass your mouse cursor over it. When money changes hands, the bot changes the goldbar object's Description, and moves the goldbar object to the player's side of the board. When the bank sells a house or hotel, the bot moves the player's goldbar object into the Bank, erasing the Description, and moves the house or hotel object onto the player's property, putting the player's name into the house or hotel's Description. [View Quote] > And maybe sign hnaging up in the center with each property listed and a name > next to it of who owns that property, > What about houses, andhotels, and rent? how will one go about taking care of > those? > [View Quote] Collision DetectionDec 11, 1998, 6:02pm
For a bot to avoid objects that stand in its way, it probably must do an
aw_query of its surroundings. AW_EVENT_CELL_OBJECT will give us the AW_OBJECT_MODEL for the objects in adjacent cells. Perhaps the simplest strategy is to treat an object as a sphere when calculating the space it occupies. This means that to detect collisions the bot program must keep and access a list of models and their MAXSIZE attributes for each world the bot might inhabit. It would be nice if instead the AWAPI had an AW_OBJECT_MAXSIZE attribute that was available in the context of AW_EVENT_CELL_OBJECT. Collision DetectionDec 12, 1998, 5:59pm
Where is this "cube bounding box" in the AWAPI?
If the server has access to the cube bounding box for each object, then maybe the SDK should make it available, or at least the dimension that is the maximum one. The max dimension, or sphere idea, just would be simpler or faster to compute. I think a lot of people want bot avatars to have the option of moving around objects, like other avatars. [View Quote] > A sphere would be way too complicated when just the cube bounding box can be used. > [View Quote] Collision DetectionDec 13, 1998, 6:12pm
Thanks, Eep². So until the SDK has a method that gives us access to the bounding box dimensions, is there a way for an AWAPI program to read the same information from an *.rwx file, such as in the AW cache files?
[View Quote] > Dunno if it's even implemented in the SDK, but RenderWare uses bounding boxes (cubes), and AW uses RW, so... Although AW's avatar collision isn't even based off avatar bounding boxes, but a 1mx1m square in the middle of the avatar. Lame, eh? Hence why really small avatars (<1m³) can't get close to many things horizontally. It really kills the effect of having a small avatar, too. :/ > > See http://tnlc.com/rw/rwx.html#collision for more info. > [View Quote] can i use bot to copy my building work in alpha world?Dec 16, 1999, 5:20pm
I think the rule was intended to protect AlphaWorld against runaway
robobuilders & the like. If you just copy your tourist building, nobody could have any good reason to complain (the rule specifically says that AW only responds to complaints, reserving the right to decide what is both automated & obnoxious). You should first survey your tourist building with a surveyor bot, then give the survey to a builder bot as a blueprint to rebuild under your own citizen name. This was one of the original purposes for construction bots, & many tourist-built homes have been saved this way. There are several construction bots that can be downloaded for free from http://www.canopus.org/construction/construction.html, & you can read the help files for the bots which are also online at the same site. If your tourist site is fairly small, the easiest surveyor to use is the VisualSurveyor; there also is a TouristSurveyor specially for Tourist buildings. You can edit with a VisualEditor or SurveyEditor, & when you're satisfied you've got everything you want to rebuild, save the survey as a blueprint. Then have a BuilderBot build it. [View Quote] Gesture problemsDec 14, 1998, 5:36am
People seem to have more success if there is an explicit loop around aw_wait, and
the 'while aw_wait' loop includes the AW_MY_GESTURE instead of the CHAT event handler. A global flag can be set in the CHAT event handler, and the loop can respond to the flag with the GESTURE. At least this worked better for us with AVATAR_CHANGE events and aw_say responses. (As if the "context" for the response to the event wasn't the event itself.) [View Quote] > The following source is supposed to initiate a gesture every time it hears > some chat message. However, it only does it once after the program starts and > never again. What am I doing wrong? > > #include <stdio.h> > #include <stdlib.h> > #include <aw.h> > > void avatar_chat() { > int rc; > printf("chatting\n"); > aw_int_set (AW_MY_GESTURE, 5); > if (rc = aw_state_change ()) { > printf ("Unable to change state (reason %d)\n", rc); > exit (1); > } > } > > main (int argc, char *argv[]) { > > int instance = 0; > int rc; > int finished; > > printf("Gesture\n"); > > /* check command line */ > if (argc < 3) { > printf ("Usage: %s number password\n", argv[0]); > exit (1); > } > > /* initialize Active Worlds API */ > if (rc = aw_init (AW_BUILD)) { > printf ("Unable to initialize API (reason %d)\n", rc); > exit (1); > } > > /* install handler for avatar_add event */ > aw_event_set (AW_EVENT_CHAT, avatar_chat); > > /* create bot instance */ > if (rc = aw_create (0, 0, 0)) { > printf ("Unable to create bot instance (reason %d)\n", rc); > exit (1); > } > > /* log bot into the universe */ > aw_int_set (AW_LOGIN_OWNER, atoi (argv[1])); > aw_string_set (AW_LOGIN_PRIVILEGE_PASSWORD, argv[2]); > aw_string_set (AW_LOGIN_APPLICATION, "SDK Sample Application #1"); > aw_string_set (AW_LOGIN_NAME, "GreeterBot"); > if (rc = aw_login ()) { > printf ("Unable to login (reason %d)\n", rc); > exit (1); > } > > /* log bot into the world called "beta" */ > if (rc = aw_enter ("Beta", 0)) { > printf ("Unable to enter world (reason %d)\n", rc); > exit (1); > } > > /* announce our position in the world */ > aw_int_set (AW_MY_TYPE, 12); // choose Aaron > aw_int_set (AW_MY_X, 100000); > aw_int_set (AW_MY_Z, 100000); > aw_int_set (AW_MY_Y, 0); > aw_int_set (AW_MY_YAW, 1800); > if (rc = aw_state_change ()) { > printf ("Unable to change state (reason %d)\n", rc); > exit (1); > } > > aw_wait(-1); > > /* close everything down */ > aw_destroy (); > aw_term (); > return 0; > } > > Edward Sumerfield can i use bot to copy my building work in alpha world?Dec 17, 1999, 5:06pm
A bot needs a privilege password to build in your name, just like any
other citizen would. All the bot programs on the canopus website were written by me. I use them myself (the entire site at Mars 23N 500W was surveyed by a SpyBot at the original location & then rebuilt, rotated 90 degrees, by a BuilderBot); I give them away (with the usual disclaimers), & lots of people have done construction with them. Some people are even using caArtifact.exe to create their own artifacts. You're right to be cautious about downloading & running executables off the web, though. You could start by checking the SDK Newsgroup, where you can get an impression of the bot programmers at work--a more helpful & mutually open group could hardly be imagined. People have often posted sample source code there. We Delphi programmers posted a lot of source code, including an encapsulation of the SDK itself, as attachments to messages. The same applies to the C, VB, & Java bot programmers. [View Quote] |