Jump to content

[Guide]How to make peace zone?


Recommended Posts

For example we have this rectangular

 

1--------------------2

|

|

|

|3-------------------4

 

So ok, go to 1 Point and write /loc, then go to 4 Point and write again /loc... Then we have coordinates, mine is 13818 256426 -2013 and 21550 250005 -1995

go to our zone.xml and create new town, for example:

 

	<zone id="11041" type="Town" shape="Cuboid" minZ="-1900" maxZ="-2050">
	<stat name="name" val="My Cool Town" /> 
	<stat name="townId" val="33" /> 
	<stat name="spawnX" val="19495" /> 
	<stat name="spawnY" val="254006" /> 
	<stat name="spawnZ" val="-2026" /> 
</zone>

 

 

where minZ="-1900" we write our minZ :D i explain. how we see i have Z coordinate -1995 so i write my min -1900... Where maxZ="-2050" i have coord -2013 so i write my max -2050.

 

		<stat name="spawnX" val="19495" /> 
	<stat name="spawnY" val="254006" /> 
	<stat name="spawnZ" val="-2026" /> 

 

These coordinates are respawn coordinates. Then player die, where they will be respawned.

 

and the last thing what to do... Go to zone_vertices.sql

 

koord.png

 

in first table we add town id. mine is 11041. in second table order - 1. And where is x and y we write our x1 and y2 coord. mine is 13818 and 256426... Now create another one line and write again id. orden - 2 (i write 0. mistake :D). and write again other x2 and y2 coord. mine was 21550 250005...

 

ok. done, now you got new town and peace zone :)

 

Moderators correct my mistakes :P

Link to comment
Share on other sites

man u are wrong...

 

Code:

 

<zone id="11041" type="Town" shape="Cuboid" minZ="-1900" maxZ="-2050">

<stat name="name" val="My Cool Town" />

<stat name="townId" val="33" />

<stat name="spawnX" val="19495" />

<stat name="spawnY" val="254006" />

<stat name="spawnZ" val="-2026" />

</zone>

 

 

Thats not correct..... MINZ > MAXZ

This is Correct ........ MINZ < MAXZ

 

 

it should be:

Code:

 

<zone id="11041" type="Town" shape="Cuboid" minZ="-2050" maxZ="-1900">

<stat name="name" val="My Cool Town" />

<stat name="townId" val="33" />

<stat name="spawnX" val="19495" />

<stat name="spawnY" val="254006" />

<stat name="spawnZ" val="-2026" />

</zone>

 

Z is the ground so its invested

 

 

 

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...

ok nice share..i did it and works for me...now plz...tell me how i ll do this town ive created...an arena.??i dont want to ppl take pvps-pks...i want this town to work as coliseum...

Link to comment
Share on other sites

Would it be possible to have an exemple of others zones type ? You talk about Cuboid method, but there are 2 others from what I rem (npoly and other type). I think Npoly is more accurate in some situations so I need infos.

 

Link to comment
Share on other sites

ok nice share..i did it and works for me...now plz...tell me how i ll do this town ive created...an arena.??i dont want to ppl take pvps-pks...i want this town to work as coliseum...

Then just change

type="Town"

 

To

 

type="Arena"

 

and here you have Pvp Zone like in Coliseum

Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • I use l2fandc files. I need a java code, I've been searching a lot and waiting for help. What I want to do is to teleport to the players doing pvp. So it's like finding the flag player. I found some files but they did not fit my system. I'm waiting for help..   EXAMPLE:     package handlers.bypasshandlers; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import com.l2jmobius.Config; import com.l2jmobius.commons.util.Rnd; import com.l2jmobius.gameserver.enums.ChatType; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.zone.ZoneId; import com.l2jmobius.gameserver.network.serverpackets.CreatureSay; /**  * @author Mobius (based on Tenkai pvpzone)  */ public class FindPvP implements IBypassHandler {     private static final String[] COMMANDS =     {         "FindPvP"     };          @Override     public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)     {         if (!Config.ENABLE_FIND_PVP || !target.isNpc())         {             return false;         }                  L2PcInstance mostPvP = null;         int max = -1;         for (L2PcInstance player : L2World.getInstance().getPlayers())         {             if ((player == null) //                 || (player.getPvpFlag() == 0) //                 || (player.getInstanceId() != 0) //                 || player.isGM() //                 || player.isInsideZone(ZoneId.PEACE) //                 || player.isInsideZone(ZoneId.SIEGE) //                 || player.isInsideZone(ZoneId.NO_SUMMON_FRIEND))             {                 continue;             }                          int count = 0;             for (L2PcInstance pl : L2World.getInstance().getVisibleObjects(player, L2PcInstance.class))             {                 if ((pl.getPvpFlag() > 0) && !pl.isInsideZone(ZoneId.PEACE))                 {                     count++;                 }             }                          if (count > max)             {                 max = count;                 mostPvP = player;             }         }                  if (mostPvP != null)         {             // Check if the player's clan is already outnumbering the PvP             if (activeChar.getClan() != null)             {                 Map<Integer, Integer> clanNumbers = new HashMap<>();                 int allyId = activeChar.getAllyId();                 if (allyId == 0)                 {                     allyId = activeChar.getClanId();                 }                 clanNumbers.put(allyId, 1);                 for (L2PcInstance known : L2World.getInstance().getVisibleObjects(mostPvP, L2PcInstance.class))                 {                     int knownAllyId = known.getAllyId();                     if (knownAllyId == 0)                     {                         knownAllyId = known.getClanId();                     }                     if (knownAllyId != 0)                     {                         if (clanNumbers.containsKey(knownAllyId))                         {                             clanNumbers.put(knownAllyId, clanNumbers.get(knownAllyId) + 1);                         }                         else                         {                             clanNumbers.put(knownAllyId, 1);                         }                     }                 }                                  int biggestAllyId = 0;                 int biggestAmount = 2;                 for (Entry<Integer, Integer> clanNumber : clanNumbers.entrySet())                 {                     if (clanNumber.getValue() > biggestAmount)                     {                         biggestAllyId = clanNumber.getKey();                         biggestAmount = clanNumber.getValue();                     }                 }                                  if (biggestAllyId == allyId)                 {                     activeChar.sendPacket(new CreatureSay(0, ChatType.WHISPER, target.getName(), "Sorry, your clan/ally is outnumbering the place already so you can't move there."));                     return true;                 }             }                          activeChar.teleToLocation((mostPvP.getX() + Rnd.get(300)) - 150, (mostPvP.getY() + Rnd.get(300)) - 150, mostPvP.getZ());             activeChar.setSpawnProtection(true);             if (!activeChar.isGM())             {                 activeChar.setPvpFlagLasts(System.currentTimeMillis() + Config.PVP_PVP_TIME);                 activeChar.startPvPFlag();             }         }         else         {             activeChar.sendPacket(new CreatureSay(0, ChatType.WHISPER, target.getName(), "Sorry, I can't find anyone in flag status right now."));         }         return false;     }          @Override     public String[] getBypassList()     {         return COMMANDS;     } }
    • How are you, fucking Nazi? Haven't you been sent to the front line yet, as cannon fodder? or are you Nazi scum still hiding in the basements? you whores destroyed the inhabitants of Donbass for 8 years, and now you are a fagot hiding behind the backs of women. Nazis in Ukraine will be physically destroyed! every! we will get each of you! if not immediately, then years later you will be punished for your crimes!
  • Topics

×
×
  • Create New...