How to set a zone (not region) safe on a PvP server

For any problems with Dawn of Light website or game server, please direct questions and problems here.

Moderator: Support Team

How to set a zone (not region) safe on a PvP server

Postby User » Fri May 15, 2015 5:25 pm

Hello.
I'm trying to setup a server with only 4 zones running, I'd like to have Emain (or a part of) as safe and the other hib frontier PvP, after reading this http://www.dolserver.net/viewtopic.php? ... +safe+zone I though I was done but...all the 4 zones are coded as 200 (btw Emain in the DB is coded 2 times with different codes ?!?).
I though to change the 200 from DB to xxx but I think there will be a lot of referencies in the code and I don't want to crash all, any suggestions?

P.S. I know that is possible to set also a part of a zone as safe, but no idea how to..
User
DOL Visitor
 
Posts: 11
Joined: Sun May 10, 2015 3:25 am

Re: How to set a zone (not region) safe on a PvP server

Postby Xanth » Sat May 16, 2015 7:30 am

u need to set the safe zones in the ServerRules

so in PvPServerRules.cs

there u can see a safe area array and there u need to add your 4 zones whcih needs to be safe.
User avatar
Xanth
DOL Acolyte
 
Posts: 141
Joined: Tue Sep 30, 2014 7:01 pm
Location: Germany

Re: How to set a zone (not region) safe on a PvP server

Postby Leodagan » Sat May 16, 2015 10:14 am

Emain and all other frontiers exists 2 times in every clients :)

Old Frontiers in Classic Region (ID : 1 for Albion, 100 for Midgard, 200 for Hibernia)

New Frontiers in its own Region (ID : 163)

Don't forget "Region" is everything in the same area where you don't get through a loading screen, "Zone" is a sub-area from "Region", every "Region" must have a least one "Zone"

You shouldn't play with "ID", I don't have the mechanics in mind but these ID are used to tell client which Geometry they should be displaying to Player !

If you want to use a smaller subset than "Zone" (always 65535 x 65535 units...) as Safe-Area, you should be able to use "DOL.GS.Area.SafeArea" Class, which is a server-side check for a Circle Area where player can't fight... (Similar Use than BindArea)
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: How to set a zone (not region) safe on a PvP server

Postby User » Mon May 18, 2015 9:26 pm

Thx all, I think that Leodagan's solution could fit better my case, let me say that I'm terribly new at all this but I'm trying to do my best ;)
Checking that script it appears he defines 3 kinds of areas (square, polygon and circle) and you can decide what kind of area you want as bind area and safe area, I'd like to set as square the area with this gloc corners (X-Y) 482,5-320,5 (Upper-right), 450-320,5 (Upper-left), 450-352 (Lower-left) and 482,5-352 (Lower-right), theese corners define more or less I3-I4-J3-J4 on this map http://camelot.allakhazam.com/Maps/Hibe ... vennex.jpg.
Do I need to change the code's part defining what is a square or only this part?

public class SafeArea : Circle
{
public SafeArea()
: base()
{
m_safeArea = true;
}

public SafeArea(string desc, int x, int y, int z, int radius)
: base
(desc, x, y, z, radius)
{
m_safeArea = true;
}
}
}

--------------------------------

How are width and height considered? Which is the starting point?

Thx in advance.
User
DOL Visitor
 
Posts: 11
Joined: Sun May 10, 2015 3:25 am

Re: How to set a zone (not region) safe on a PvP server

Postby Leodagan » Tue May 19, 2015 5:17 am

If you want a SafeArea square shaped you'll have to write a new Class that extends "Square" and not "Circle"
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: How to set a zone (not region) safe on a PvP server

Postby User » Tue May 19, 2015 9:50 pm

If you want a SafeArea square shaped you'll have to write a new Class that extends "Square" and not "Circle"
Square is already implemented, I was asking about sintax ;)
Anyway I'm working also on anti buff-bot so perhaps having a different region as safe could help..
User
DOL Visitor
 
Posts: 11
Joined: Sun May 10, 2015 3:25 am

Re: How to set a zone (not region) safe on a PvP server

Postby Leodagan » Wed May 20, 2015 5:24 am

Syntax for creating a subclass ??

public class SafeSquareArea : Square
{
public SafeSquareArea()
: base()
{
m_safeArea = true;
}

public SafeSquareArea(string desc, int x, int y, int z, int radius)
: base
(desc, x, y, z, radius)
{
m_safeArea = true;
}
}
}

But you know there are great docs for coding using search engines ;)
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon


Return to “%s” Support

Who is online

Users browsing this forum: No registered users and 1 guest