uo.em: GetRegionProperty

Archive of the older Feature Request Forum Posts
Locked
Pierce
Forum Regular
Posts: 420
Joined: Thu Feb 02, 2006 8:33 am

uo.em: GetRegionProperty

Post by Pierce »

I know there is a similar function called
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
MuadDib
Former Developer
Posts: 1091
Joined: Sun Feb 12, 2006 9:50 pm

Post by MuadDib »

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 :)
Pierce
Forum Regular
Posts: 420
Joined: Thu Feb 02, 2006 8:33 am

Post by Pierce »

This is for regions, based on resources.
Yes i know :) That's why i had the wish for a new or changed command.
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.
Locked