How do i have a region check in the scripts
do i go by number like this
if(region = 5)
blah blah blah
else
blah
return;
or do i go by this
if(region = britain)
blah kill
else
blah love
return;
How to do If(region)
-
dragon slayer
- UOX3 Guru
- Posts: 776
- Joined: Thu Dec 21, 2006 7:37 am
- Has thanked: 4 times
- Been thanked: 26 times
- Xuri
- Site Admin
- Posts: 3704
- Joined: Mon Jun 02, 2003 9:11 am
- Location: Norway
- Has thanked: 48 times
- Been thanked: 8 times
- Contact:
For some reason the ID of the regions doesn't seem to be available to the region JS objects, so I think the only way would be to check against specific region-names. Example:
The .toLowerCase() bit is just there to make it not be case-sensitive, and can probably be removed if you'd rather just type in the exact names.
Code: Select all
var region = pUser.region;
if( region.name.toLowerCase() == "the town of Britain".toLowerCase() )
{
blah
}
else
{
blah
}-= Ho Eyo He Hum =-
-
dragon slayer
- UOX3 Guru
- Posts: 776
- Joined: Thu Dec 21, 2006 7:37 am
- Has thanked: 4 times
- Been thanked: 26 times