Guest User

Untitled

a guest
Sep 25th, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. / * L2jFrozen Project - www.l2jfrozen.com
  2. *
  3. * This program is free software; you can redistribute it and / or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation; either version 2, or (at your option)
  6. * any later version.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program; if not, write to the Free Software
  15. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  16. * 02111-1307, USA.
  17. *
  18. * http://www.gnu.org/copyleft/gpl.html
  19. * /
  20. package com.l2jfrozen.gameserver.model.zone.type;
  21.  
  22. import com.l2jfrozen.gameserver.model.L2Character;
  23. import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
  24. import com.l2jfrozen.gameserver.model.zone.L2ZoneType;
  25.  
  26. / **
  27. * @author Gabriel Fleck
  28. * /
  29. public class L2DonatorZone extends L2ZoneType
  30. {
  31. public L2DonatorZone (final int id)
  32. {
  33. super (id);
  34. }
  35.  
  36. @Override
  37. protected void onEnter (final L2Character character)
  38. {
  39. if (character instanceof L2PcInstance)
  40. {
  41. if ((((L2PcInstance) character) .isDonator ())
  42. {
  43. ((L2PcInstance) character) .sendMessage ("You entered the Donator Zone.");
  44. ((L2PcInstance) character) .sendMessage ("This area is protected and the player who does not have Donator status will be removed from the area.");
  45. }
  46. else
  47. {
  48. ((L2PcInstance) character) .teleToLocation (82698,148638, -3473);
  49. ((L2PcInstance) character) .sendMessage ("This is an area restricted only to Donators. You will be teleported to the Giran Castle Town.");
  50. }
  51. }
  52. }
  53.  
  54. @Override
  55. protected void onExit (final L2Character character)
  56. {
  57. ((L2PcInstance) character) .sendMessage ("You left the Donator Zone.");
  58. }
  59.  
  60. @Override
  61. protected void onDieInside (final L2Character character)
  62. {
  63. }
  64.  
  65. @Override
  66. protected void onReviveInside (final L2Character character)
  67. {
  68. }
  69.  
  70. }
Add Comment
Please, Sign In to add comment