Jump to content

Question about Zones


xeon17

Recommended Posts

Hello there,

Asking me if there is any way to create a radar area on every zone, who doesn't know what zones are. The following picture should explain it ,

28heo9d.png

I saw a server which have radar areas on every zone in LS and SF , and when you enter in a zone dxtext apper with the name of the zone. I'll need to use createRadarArea with custom x,y,z which i chose or there is a better way. To create radararea on every zone in LS and SF

Who still doesn't know what zones are, check the following functions.

getElementZoneName 
getZoneName 

Kind regards :)

Link to comment

Those who made custom dx outputs for zone names are probably checking a name string to see if it's changing, getting the coordinates for each zone may be hard thought, I tried that long ago by making a simple script looping from -3000 to 3000 in x and y, getting the zone name and assign a color to it and then created 10x10 colored squares that represented these areas, it wasn't optimized at all but it worked, I'm sure there are better ways but you probably have to do most of the work by yourself by indexing these areas.

Link to comment

I think you need a predefined table with the coordinates of each area you want to make, getZoneName uses a table as well. What I suggested above was a set of heavy calculations which is pretty useless to do multiple times, it's better to do it once and save the output as an xml file or similar which can be used to convert names to coordinates in a more serious resource, the script to generate that table doesn't need to be more than just an ugly hack, here's a skeleton that may be used for that.

local x,y = 0,0 
local curr_zone 
for x, 600 do 
    for y, 600 do 
        curr_zone = getZoneName((x-300)*10, (y-300)*10, 0) 
        -- Save the output in a proper format. 
    end 
end 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...