PenUltima Online

It is currently Sat Sep 06, 2008 11:53 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: uo.em: GetRegionProperty
PostPosted: Thu Dec 07, 2006 9:33 am 
Offline

Joined: Thu Feb 02, 2006 8:33 am
Posts: 276
I know there is a similar function called
Quote:
GetRegionString( resource, x, y, propertyname, realm := _DEFAULT_REALM );


Perhaps this function can be rescripted to use also for the main regions.cfg.
Therefor we don't have everywhere e.g. in cities ressources, you have to place a dummy ressource to take advantage of this function.

A
GetRegionProperty(who/item, propertyname, realm := _DEFAULT_REALM );
could make that older command a lot easier i think.

Example regions.cfg wrote:

Region Pirates_Cove
{
Range 0 0 2303 1599
EnterText You have entered the Area of Pirates Cove
LeaveText You have left the Area of Pirates Cove
Guarded 0
midi 27
Realm ilshenar
Testprop 23
PropTest 24
}


Perhaps the problem is the who/item. IMHO characters and items have no "region" member. I don't know if the core can handle that this way. Otherwise one could use x,y instead of who/item.

I know that i also can read the regions.cfg and scan all entries till i found the correct region the player or item is in :D


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 01, 2007 5:03 pm 
Offline
POL Developer
User avatar

Joined: Sun Feb 12, 2006 9:50 pm
Posts: 836
Location: Indiana, USA
Actually, the function name is a little misnamed. This is for regions, based on resources. The main regions file would not affect anything here, like that. That is why it doesn't look there for the custom properties. Why would you store an ore's properties in the file for regions? It's a resource, so it looks correctly, and as needed to keep confusion down.

If anything, it needs to be renamed to GetResourceString(), and another for Region, to check regions.cfg for others :)

_________________
POL Developer - The Penguin Scripter


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 04, 2007 10:24 am 
Offline

Joined: Thu Feb 02, 2006 8:33 am
Posts: 276
Quote:
This is for regions, based on resources.


Yes i know :) That's why i had the wish for a new or changed command.

Quote:
If anything, it needs to be renamed to GetResourceString(), and another for Region, to check regions.cfg for others


That's exactly what i tried to explain except the renaming. Maybe i was a little confusing that day. Like everyday :D
Imho there is no need to rename the command GetRegionString cause we all have to check our scripts for that change :lol:

But if something like GetRegionProperty is possible, that would be great. I think the regions.cfg stays always in memory.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl