Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Wed Aug 20, 2008 1:14 am   

First Reachable Room of an Area
 
Think this has been asked before but I couldnt find it... Im looking for a quick way to find the first reachable room of an zone... ie the room that exits to another zone
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Aug 20, 2008 2:08 am   
 
A script to do that is in my Toolbox which can be downloaded from the Package Library. I really need to bump the priority on finishing all the updates to that package up, instead of continually pushing it down on. In any case I quite certain I completed the series of queries to do what you want, and only had some of the interface left to build.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Wed Aug 20, 2008 2:20 am   
 
You really do need to include a massive help file with this, too. Unless there already is one, and I've missed it somehow...

Charneus
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Wed Aug 20, 2008 2:30 am   
 
Yeah, I looked over your Package, the only problem is I cant read it good enough to figure out what the heck anything does... Can you point me towards the right functions to use to handle this?
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Wed Aug 20, 2008 2:55 am   
 
so... I found buildzoneborders... but seems it takes FOREVER because it cant open my map or something? Any clues how I can get this to work properly?

Thanks Viji
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Aug 20, 2008 3:20 am   
 
Yeah, BuildZoneBorders is the function that builds the information you want. Connecting to the map database should be done autmoatically as part of the package's onLoad event. That event should be called even if you loaded the package from an already launched session, but if you merely viewed the package it wouldn't have been done. That is one of the many functions that has a zScript backup for when it can't preform the faster query method. You can checks whether the query is available by using the SpecialMapQuery function, such as '#SHOW @SpecialMapQuery("SELECT ObjID FROM ObjTbl WHERE ObjID<>0;")'. It should return a list of room numbers.

If it isn't working after a reload then I will schedule some time in to check out what is going on.

Charneus, I took the time to write notes directly in the package that describe each function and its usage. Do you really think a massive help file needed?
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Wed Aug 20, 2008 4:29 am   
 
The notes are relatively short, in my opinion, and doesn't fully describe some of the functions, or what the parameters are. For instance, in QueryForStubExits, what is $Slimit supposed to be?

The onload event isn't working, either. It continually says "Map failed to open map for queries, slow zone border building will be used." and will not do anything. Not to mention that your getelements function had an extra brace. I took a stab in the dark and hope I fixed it properly. *shrug*

I think that either adding a bit more descriptive notes or a help file describing each function would be really helpful, especially to those of us who are in awe of your scripting and have no clue what to make of it. (i.e., me). :P

Charneus
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Wed Aug 20, 2008 4:30 am   
 
As an addition, %pref(Mapfile) isn't working correctly, either. Don't know if this is a bug or not, but it points to C:\Program Files\CMUD\Charneus\ instead of C:\0wner\Documents\My Games\CMUD\Charneus, which is where my mapfile really is.

Charneus
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Wed Aug 20, 2008 4:19 pm   
 
Yeah, I would just ditto everything Charneus is saying... I get the same message onLoad and had the same brace issue that I as well took a shot in the dark and hopefully fixed. I believe due to the map not loading properly is why BuildZoneBorders takes FOREVER... Any fixes/help you can provide would be helpful. Thanks
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Aug 20, 2008 6:04 pm   
 
I can't replicate the problem with %pref(MapFile) with any of my sessions in my install. That doesn't mean it doesn't exist. I put my mud folders directly in my CMud folder, and also use a general map for all of my sessions Which I am rather sure causes the full path to be stored.

I would suggest bug reporting the problem with %pref(MapFile), and adjusting the OpenMapDatabaseForQuery to use an explicit file until it is fixed. I really can't find anyway to get around this problem without doing a lot of funky stuff.

I am pretty sure I rewrote getelements at one point for better speed, so that is probably fixed just not published. I really don't want to start looking into things too much right now because once I do I will end up finding all sorts of obscure bugs in CMud. I already have a few on my mental list, but I don't want to distract Zugg from the mapper rewrite.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Wed Aug 20, 2008 6:55 pm   
 
Thats understandable, but until then, your script really doesn't have the functionality of finding zone boundries.
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Wed Aug 20, 2008 8:40 pm   
 
In regards to the %pref(Mapfile), I will report it. However, I also did change it to the full file name, and it still comes back with inability to open map for queries.

I realize the potential of you finding obscure bugs... With the scripts you write, it's nearly inevitable. However, I'll point out that Zugg is working on the mapper, and anything you may find mapper related would probably be vital to the success of the new mapper. Just a thought. :p

Charneus
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Aug 20, 2008 9:00 pm   
 
My testing is showing that everything using COM in all my scripts is broken with 2.36. Since this affects both the queries and the direction setting polling, that is used for the zScript build method, the script is totally broken. It seems serious enough that I will bug report it as soon as I have the full details.

I did find an error on the zScript build method of the script as well. The error was causing it to just remain lost in a loop. That is fixed for the next time I publish the package.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
umdbandit
Wanderer


Joined: 31 Oct 2004
Posts: 94

PostPosted: Wed Aug 20, 2008 11:01 pm   Help Files
 
Viji, I know help files seem trite, but I think you should at least make a 'vijihelp' alias that echos basic usage and syntax. I think a few lines or a paragraph will go a long long long way to the layman :P And also, very cool package.
_________________
Rufus- Winner of Stuff
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Fri Aug 29, 2008 6:55 pm   
 
Viji... Any progress on finding out the issues relating to your package so that I might be able to get the BuildZoneBorders to work?

Or maybe Zugg could make this a function in the rewrite... something that would pull the rooms into a stringlist that are linked to rooms in another zone.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri Aug 29, 2008 8:25 pm   
 
It's an interesting idea for me to consider. I know that on Aardwolf I have my own function that attempts to determine the closest room in a particular zone so that I can quickly speedwalk to whatever zone I need (like for a quest). Right now I just take the lowest room number in a zone, but that's not very good. And I haven't tried any of Vijilante's scripts yet. But it's something that I'll think about in case it's relatively easy.
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Fri Aug 29, 2008 8:30 pm   
 
Nod Zugg, thats what I do currently, is take the lowest vnum in that zone and run to it, theoretically it would be the closest, but not always. perhaps just a toggle to be able to mark one room per zone as startroom and then a new command that would walk to start room based off the zonename. This seems like the better option because it would keep you from having issues of multiple exits to other zones per zone.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri Aug 29, 2008 10:04 pm   
 
You could actually do that already using the user-defined value for the room. Just set the user value of the room you want to be the "start room" and loop through the rooms in a zone to find the room with that user-defined value.
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Sat Aug 30, 2008 6:01 pm   
 
I solve the problem by making the ShortID of the entrance the same as the room name. Works like a charm, and it is #TRANSLOCATEable. Of course, there are rare occasions where two entrances have the same name (it hasn't happened to me, yet). In that case some added text in the ShortID takes care of that. In fact. I have a database of all the areas and so the first room of any zone is always available to me under script.
_________________
Sic itur ad astra.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net