Advertisement
VANPER

Sistema ant pet que desmonta os jogadores

Feb 8th, 2020
876
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.58 KB | None | 0 0
  1. Index: java/net/sf/l2j/Config.java
  2. ===================================================================
  3. --- java/net/sf/l2j/Config.java (revision 84)
  4. +++ java/net/sf/l2j/Config.java (working copy)
  5.  
  6. +   public static boolean ALLOW_WYVERN_RESTRITION_CITY;
  7.  
  8. +   ALLOW_WYVERN_RESTRITION_CITY = server.getProperty("MountRequest", false);
  9.  
  10. ===================================================================
  11. --- java/net/sf/l2j/gameserver/model/zone/type/TownZone.java    (revision 0)
  12. +++ java/net/sf/l2j/gameserver/model/zone/type/TownZone.java    (working copy)
  13. @@ -0,0 +1,84 @@
  14.  
  15.  
  16.     @Override
  17.     protected void onEnter(Creature character)
  18.     {
  19.         if (Config.ZONE_TOWN == 1 && character instanceof Player && ((Player) character).getSiegeState() != 0)
  20.             return;
  21.  
  22. +   // Dismount player, if mounted.
  23. +   if (!Config.ALLOW_WYVERN_RESTRITION_CITY && character instanceof Player && ((Player) character).isMounted())
  24. +   {  
  25. +       ((Player) character).dismount();
  26. +       character.sendMessage("Você não pode usar montaria enquanto estiver na Cidade.");
  27. +   }
  28.        
  29.         if (_isPeaceZone && Config.ZONE_TOWN != 2)
  30.             character.setInsideZone(ZoneId.PEACE, true);
  31.        
  32.         character.setInsideZone(ZoneId.TOWN, true);
  33.     }
  34.  
  35. ===================================================================
  36. --- gameserver\config/server.properties (revision 0)
  37. +++ gameserver\config/server.properties (working copy)
  38.  
  39. +# =================================================================
  40. +#                 Dismount Pet TowZone
  41. +# =================================================================
  42. +   # Dismount player in city.
  43. +   MountRequest = False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement