# UOX3 Script Engine

### API and Event handling

### Resource Related Functions

ResourceRegion
Prototype |
    RESOURCEOBJ ResourceRegion( x, y, worldnumber );
Purpose | Returns a resource object allowing JS to modify resource data
Example of Usage |
    var mResource = ResourceRegion( pUser.x, pUser.y, pUser.worldnumber );

ResourceTime
Prototype |
    int ResourceTime( resourceType );
    void ResourceTime( resourceType, int );
Purpose | Used to get/set the spawn timer of a resourceType ("ORE" or "LOGS").
Example of Usage |
    var logTimer = ResourceTime( "LOGS" );
    //or...

    ResourceTime( "LOGS", 600 );

ResourceAmount
Prototype |
    int ResourceAmount( resourceType );
    void ResourceArea( resourceType, int );
Purpose | Used to get/set the maximum amount of resources per area of a specific resourceType ("ORE" or "LOGS").
Example of Usage |
    var maxLogAmount = ResourceAmount( "LOGS" );
    //or...
    ResourceAmount( "LOGS", 10 );

ResourceArea
Prototype |
    int ResourceArea( resourceType );
    void ResourceArea( resourceType, int );
Purpose | Used to get/set the amount of resourceareas to split the world into for a specific resourceType ("ORE" and "LOGS").
Example of Usage |
    var resourceAreas = ResourceArea( "ORE" );
    //or...
    ResourceArea( "ORE", 10 );

©Copyright 2000-2001 WWW.UOX3.NET (Daniel Stratton/Matthew Randall)