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

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 098.

Moderator: POL Developer

Post Reply
rainmaker24
New User
Posts: 12
Joined: Sun Feb 27, 2011 11:24 am

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

Post by rainmaker24 » Mon May 09, 2011 4:25 am

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

RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

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

Post by RusseL » Mon May 09, 2011 5:16 am

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:

rainmaker24
New User
Posts: 12
Joined: Sun Feb 27, 2011 11:24 am

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

Post by rainmaker24 » Mon May 09, 2011 5:38 am

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

OWHorus
Grandmaster Poster
Posts: 101
Joined: Sat Feb 04, 2006 1:24 pm
Location: Vienna, Austria

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

Post by OWHorus » Tue May 10, 2011 2:37 am

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

Post Reply