Page 1 of 1

help adding Malas/Tokuno/Ilshenar towns to regions.cfg

Posted: Mon May 09, 2011 4:25 am
by rainmaker24
Ok, so i want to use the towns in the newer AOS maps to my shard. Running WOD style scripts on POL098.

Which script uses regions.cfg? I need to define realms, but i can't find the script that actually does the functions listed in regions.cfg (i.e. leave and enter towns, guarded, etc..).

Can anyone point me in the right direction?

My other solution (which i DONT want to do) is the create a logon script that will run my own custom script for entering malas/tokuno/ilshenar towns. There are enough logon scripts already, i'd like to avoid making a new one.


Thanks for any help

Re: help adding Malas/Tokuno/Ilshenar towns to regions.cfg

Posted: Mon May 09, 2011 5:16 am
by RusseL

Code: Select all

Region Britannia-Cove
{
        Range 2201 1105 2243 1180
        Realm britannia

        EnterScript :areas:regionScripts/enter/guarded
        LeaveScript :areas:regionScripts/leave/guarded
        MIDI 47
}


parameter Realm? :blush:

Re: help adding Malas/Tokuno/Ilshenar towns to regions.cfg

Posted: Mon May 09, 2011 5:38 am
by rainmaker24
RusseL wrote:

Code: Select all

Region Britannia-Cove
{
        Range 2201 1105 2243 1180
        Realm britannia

        EnterScript :areas:regionScripts/enter/guarded
        LeaveScript :areas:regionScripts/leave/guarded
        MIDI 47
}


parameter Realm? :blush:

I thought it might be that simple, but didn't get a chance to actually try it yet.
but there was no realm parameter on any of the other listings so I figured i would have to add a realm parameter in somewhere else too....guess not lol

Re: help adding Malas/Tokuno/Ilshenar towns to regions.cfg

Posted: Tue May 10, 2011 2:37 am
by OWHorus
rainmaker24 wrote:Ok, so i want to use the towns in the newer AOS maps to my shard. Running WOD style scripts on POL098.

Which script uses regions.cfg? I need to define realms, but i can't find the script that actually does the functions listed in regions.cfg (i.e. leave and enter towns, guarded, etc..).
Hello,

first step: You can visit the new realms? Try it - but I think this works for you...
If not: You should add the new maps (not regions, but maps, or realms) to your realm folder and configure them (see uoconvert).
There is a pitfall: If your scripts are not 'realm aware' you will run into troubles. Every script function which needs the realm (there are a lot of them) uses britannia as default realm. If your scripts are not realm aware, then everything which a script does in any new realm, will happen in britannia instead. Since the coordinates are from the new realm, but the realm is britannia, items pop up in unexpected places, and so on. Try to go for example to Ilshenar and create an item with a GM command. If the item is created where you want it, this works - if not then you have to fix this.
After checking and fixing this you can use the realms.

Second Step: Regions.cfg - read about it in POL docu (on this site, under configuration files). There is no script that uses it, this file is used by the core. If you define the cities in your regions.cfg, use one entry for the entire map, and below this entry the city areas as regions. There are several script functions, which you can use to access regions.cfg. (Mainly for the light level (see light.cfg) and the weather (see weather.cfg) if you use this). You can also find the position of a player. If you give a name to the region, you can read the name, and so on).

We do not use the Enter/Leave Scripts, but they should work, I think. If you define them you have to write this functions and the core will call it, when a player enters or leaves the area. There is no script which calls the functions - the core does this.

Horus