Welcome to PenUltima Online. Click to login or register.

Functions:

GetRegionString( resource, x, y, propertyname, realm := _DEFAULT_REALM )
Parameters:
Name Type
resource string
x,y Integer world coordinates
realm String - case-sensitive name of the realm
propertyname string
Explanation
Allows you to look up custom properties within a resource region entry.
"resource" is a string that matches a resource type in regions/resource.cfg, i.e. "ore". x,y is the coordinate to look up in the regions defined in resources/ore.cfg (or the filename matching the supplied resource).
"property_name" is the _custom_ property to match (i.e. UnitsPerArea, SecondsPerRegrow, Capacity, Range are NOT matched) in the found region.
Example: in regions/resource.cfg there exists a ResourceType "ore". In ore.cfg 
         there exists a region:
Region Outer Covetous 
{ 
    UnitsPerArea        15 
    SecondsPerRegrow    300 
    Capacity            20000 
    Range        2299 784 2635 967 
    Prop         value_string    -- this is a custom property not used by the core
} 
GetRegionString("ore",2299,785,"Prop"); would return "value_string"
Return values
String value of "propertyname" on success
Errors
"Invalid parameter"
"Realm not found"
"Invalid Coordinates for Realm"
"No resource by that name" if "resource" not found in regions/resource.cfg
"No resource region at that location" if the given x,y is not defined inside any of the regions in regions/[resource string].cfg
"Property not found" if "propertyname" was not found in the matching region.
Related Configs
regions.cfg