Advertisement
VANPER

L2jBan-FlagZone/No-Healer

Jun 14th, 2019
791
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 4.33 KB | None | 0 0
  1. FlagZone Juvenil Walker
  2.  
  3. ======================Net/sf/l2j/config.class
  4.  
  5.     /** protetion pvpzone Juvenil Walker*/
  6.  
  7. +   public static final String FLAGZONE_FILE = "./config/flagzone.properties";
  8.  
  9.  
  10.     Referencia ->   public static final String DATAPACK_ROOT = ".";
  11.  
  12. +   public static boolean BS_PVPZONE;
  13. +   public static boolean WYVERN_PVPZONE;
  14.  
  15.  
  16.  
  17.  
  18. +   private static final void loadFlagZone()
  19. +   {
  20. +       final ExProperties flagzone = initProperties(FLAGZONE_FILE);
  21.        
  22. +               BS_PVPZONE = Boolean.parseBoolean(flagzone.getProperty("DisableBsPvPZone", "False"));
  23. +       WYVERN_PVPZONE = Boolean.parseBoolean(flagzone.getProperty("WyverbPvPZone", "False"));
  24.        
  25.     }
  26.  
  27.     Referencia ->// Raidbosses settings
  28.         loadRaidboss();
  29.  
  30. +       // FlagZone
  31. +       loadFlagZone();
  32.  
  33.  
  34. E preciso criar a Class da Zona em
  35. GAMESERVER/MODEL/ZONE/TYPE/NoBsZone.class
  36.  
  37.  
  38. +   package net.sf.l2j.gameserver.model.zone.type;
  39.  
  40. +   import net.sf.l2j.commons.concurrent.ThreadPool;
  41.  
  42. +   import net.sf.l2j.Config;
  43. +   import net.sf.l2j.gameserver.datatables.SkillTable;
  44. +   import net.sf.l2j.gameserver.model.L2Skill;
  45. +   import net.sf.l2j.gameserver.model.actor.Creature;
  46. +   import net.sf.l2j.gameserver.model.actor.instance.Player;
  47. +   import net.sf.l2j.gameserver.model.base.ClassId;
  48. +   import net.sf.l2j.gameserver.model.zone.SpawnZoneType;
  49. +   import net.sf.l2j.gameserver.model.zone.ZoneId;
  50. +   import net.sf.l2j.gameserver.network.SystemMessageId;
  51. +   import net.sf.l2j.gameserver.network.serverpackets.ExShowScreenMessage;
  52.  
  53. +   public class NoBsZone extends SpawnZoneType
  54. +   {
  55. +   L2Skill noblesse = SkillTable.getInstance().getInfo(1323, 1);
  56. +   public NoBsZone(int id)
  57. +   {
  58. +       super(id);
  59. +   }
  60.    
  61. +   //Juvenil Amaro™
  62. +   //L2jBan-Projeto L2jBrasil
  63.  
  64. +   @Override
  65. +   protected void onEnter(Creature character)
  66. +   {
  67. +       character.setInsideZone(ZoneId.PVP, true);
  68. +       character.setInsideZone(ZoneId.NO_STORE, true);
  69. +       if (character instanceof Player)
  70. +       {
  71. +           final Player player = (Player) character;
  72. +           noblesse.getEffects(character, character);
  73. +           if (Config.BS_PVPZONE && !player.isPhantom() && !player.isGM())
  74. +               if (player.getClassId() == ClassId.BISHOP || player.getClassId() == ClassId.CARDINAL || player.getClassId() == ClassId.SHILLIEN_ELDER || player.getClassId() == ClassId.SHILLIEN_SAINT || player.getClassId() == ClassId.EVAS_SAINT || player.getClassId() == ClassId.ELVEN_ELDER || player.getClassId() == ClassId.PROPHET || player.getClassId() == ClassId.HIEROPHANT)
  75. +               {
  76. +                   player.sendPacket(new ExShowScreenMessage("Class Proibida in PvP area..", 6000, 2, true));
  77. +                   ThreadPool.schedule(new Runnable()
  78. +                   {
  79. +                       @Override
  80. +                       public void run()
  81. +                       {
  82. +                           if (player.isOnline() && !player.isInsideZone(ZoneId.PEACE))
  83. +                               player.teleToLocation(83485, 148624, -3402, 50);
  84. +                       }
  85. +                   }, 4000L);
  86. +               }
  87. +           if (player.getMountType() == 2 && !Config.WYVERN_PVPZONE)
  88. +           {
  89. +               player.sendPacket(SystemMessageId.AREA_CANNOT_BE_ENTERED_WHILE_MOUNTED_WYVERN);
  90. +               player.enteredNoLanding(5);
  91. +           }
  92. +       }
  93. +   }
  94. +
  95. +   @Override
  96. +   protected void onExit(Creature character)
  97. +   {
  98. +       character.setInsideZone(ZoneId.PVP, false);
  99. +       character.setInsideZone(ZoneId.NO_STORE, false);
  100. +   }
  101. +
  102. +   @Override
  103. +   public void onDieInside(Creature character)
  104. +   {
  105. +   }
  106. +
  107. +   @Override
  108. +   public void onReviveInside(Creature character)
  109. +   {
  110. +   }
  111. +}
  112.  
  113. =============dentro de config/flagzone.properties
  114. +#Juvenil Amaro L2jBrasil Forever
  115. +#Proibir BISHOP, CARDINAL, SHILLIEN_ELDER, SHILLIEN_SAINT, EVAS_SAINT, ELVEN_ELDER, PROPHET, HIEROPHANT
  116. +DisableBsPvPZone = True
  117.  
  118. +#Proibir DragaoVoador
  119. +WyverbPvPZone = True
  120.  
  121. ==============================Config/data/xml/zones/NoBsZone.xml
  122. +<?xml version="1.0" encoding="UTF-8"?>
  123. +<list>
  124. +   <zone type="NoBsZone" shape="NPoly" minZ="-3498" maxZ="-3298"> <!-- coliseum_battle -->
  125. +   <node X="150948" Y="46483" />
  126. +   <node X="151210" Y="46186" />
  127. +   <node X="151221" Y="45928" />
  128. +   <node X="150737" Y="45344" />
  129. +   <node X="148265" Y="45346" />
  130. +   <node X="147769" Y="45942" />
  131. +   <node X="147784" Y="46184" />
  132. +   <node X="148047" Y="46482" />
  133. +   <node X="148049" Y="46954" />
  134. +   <node X="147781" Y="47256" />
  135. +   <node X="147769" Y="47492" />
  136. +   <node X="148263" Y="48087" />
  137. +   <node X="150745" Y="48084" />
  138. +   <node X="151220" Y="47493" />
  139. +   <node X="151216" Y="47259" />
  140. +   <node X="150947" Y="46960" />
  141. +   <spawn X="147451" Y="46728" Z="-3410" />
  142. +   </zone>
  143. + </list>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement