Jump to content

Question

2 answers to this question

Recommended Posts

  • 0
Posted (edited)
1 hour ago, SweeTs said:

Modified Die.java perhaps.

yea thanks for location where, i added this for events

what can be wrong?

When siege off then all working.

all code die.java https://pastebin.com/QGJj2hEz

Event code ->

  1. --- head-src/com/l2jfrozen/gameserver/network/serverpackets/Die.java    (revision 936)
  2. +++ head-src/com/l2jfrozen/gameserver/network/serverpackets/Die.java    (working copy)
  3. @@ -18,6 +18,7 @@
  4.   */
  5.  package com.l2jfrozen.gameserver.network.serverpackets;
  6.  
  7. +import com.l2jfrozen.gameserver.event.EventManager;
  8.  import com.l2jfrozen.gameserver.datatables.AccessLevel;
  9.  import com.l2jfrozen.gameserver.datatables.sql.AccessLevels;
  10.  import com.l2jfrozen.gameserver.managers.CastleManager;
  11. @@ -46,6 +47,7 @@
  12.         private boolean _sweepable;
  13.         private boolean _canTeleport;
  14.         private AccessLevel _access = AccessLevels.getInstance()._userAccessLevel;
  15. +       private boolean _event;
  16.         private com.l2jfrozen.gameserver.model.L2Clan _clan;
  17.         L2Character _activeChar;
  18.  
  19. @@ -60,6 +62,7 @@
  20.                         L2PcInstance player = (L2PcInstance) cha;
  21.                         _access = player.getAccessLevel();
  22.                         _clan = player.getClan();
  23. +                       _event = EventManager.getInstance().isRegistered((L2PcInstance)cha);
  24.                         _canTeleport = !((TvT.is_started() && player._inEventTvT)
  25.                                                         || (DM.is_started() && player._inEventDM)
  26.                                                         || (CTF.is_started() && player._inEventCTF)
  27. @@ -91,45 +94,55 @@
  28.                 // 6d 03 00 00 00 - to siege HQ
  29.                 // sweepable
  30.                 // 6d 04 00 00 00 - FIXED
  31. -
  32. -               writeD(_canTeleport ? 0x01 : 0);   // 6d 00 00 00 00 - to nearest village
  33. -
  34. -               if(_canTeleport && _clan != null)
  35. -               {
  36. -                       L2SiegeClan siegeClan = null;
  37. -                       Boolean isInDefense = false;
  38. -                       Castle castle = CastleManager.getInstance().getCastle(_activeChar);
  39. -                       Fort fort = FortManager.getInstance().getFort(_activeChar);
  40. -
  41. -                       if(castle != null && castle.getSiege().getIsInProgress())
  42. +              
  43. +        if(_event)
  44. +        {
  45. +               writeD(0x00);  
  46. +               writeD(0x00);                                               // 6d 01 00 00 00 - to hide away
  47. +            writeD(0x00);                                               // 6d 02 00 00 00 - to castle
  48. +            writeD(0x00);
  49. +        }
  50. +        else
  51. +        {
  52. +                       writeD(_canTeleport ? 0x01 : 0);   // 6d 00 00 00 00 - to nearest village
  53. +              
  54. +                       if(_canTeleport && _clan != null)
  55.                         {
  56. -                               //siege in progress
  57. -                               siegeClan = castle.getSiege().getAttackerClan(_clan);
  58. -                               if(siegeClan == null && castle.getSiege().checkIsDefender(_clan))
  59. +                               L2SiegeClan siegeClan = null;
  60. +                               Boolean isInDefense = false;
  61. +                               Castle castle = CastleManager.getInstance().getCastle(_activeChar);
  62. +                               Fort fort = FortManager.getInstance().getFort(_activeChar);
  63. +              
  64. +                               if(castle != null && castle.getSiege().getIsInProgress())
  65.                                 {
  66. -                                       isInDefense = true;
  67. +                                       //siege in progress
  68. +                                       siegeClan = castle.getSiege().getAttackerClan(_clan);
  69. +                                       if(siegeClan == null && castle.getSiege().checkIsDefender(_clan))
  70. +                                       {
  71. +                                               isInDefense = true;
  72. +                                       }
  73.                                 }
  74. -                       }
  75. -                       else if(fort != null && fort.getSiege().getIsInProgress())
  76. -                       {
  77. -                               //siege in progress
  78. -                               siegeClan = fort.getSiege().getAttackerClan(_clan);
  79. -                               if(siegeClan == null && fort.getSiege().checkIsDefender(_clan))
  80. +                               else if(fort != null && fort.getSiege().getIsInProgress())
  81.                                 {
  82. -                                       isInDefense = true;
  83. +                                       //siege in progress
  84. +                                       siegeClan = fort.getSiege().getAttackerClan(_clan);
  85. +                                       if(siegeClan == null && fort.getSiege().checkIsDefender(_clan))
  86. +                                       {
  87. +                                               isInDefense = true;
  88. +                                       }
  89.                                 }
  90. +              
  91. +                               writeD(_clan.getHasHideout() > 0 ? 0x01 : 0x00); // 6d 01 00 00 00 - to hide away
  92. +                               writeD(_clan.getHasCastle() > 0 || _clan.getHasFort() > 0 || isInDefense ? 0x01 : 0x00); // 6d 02 00 00 00 - to castle
  93. +                               writeD(siegeClan != null && !isInDefense && siegeClan.getFlag().size() > 0 ? 0x01 : 0x00); // 6d 03 00 00 00 - to siege HQ
  94.                         }
  95. -
  96. -                       writeD(_clan.getHasHideout() > 0 ? 0x01 : 0x00); // 6d 01 00 00 00 - to hide away
  97. -                       writeD(_clan.getHasCastle() > 0 || _clan.getHasFort() > 0 || isInDefense ? 0x01 : 0x00); // 6d 02 00 00 00 - to castle
  98. -                       writeD(siegeClan != null && !isInDefense && siegeClan.getFlag().size() > 0 ? 0x01 : 0x00); // 6d 03 00 00 00 - to siege HQ
  99. -               }
  100. -               else
  101. -               {
  102. -                       writeD(0x00); // 6d 01 00 00 00 - to hide away
  103. -                       writeD(0x00); // 6d 02 00 00 00 - to castle
  104. -                       writeD(0x00); // 6d 03 00 00 00 - to siege HQ
  105. -               }
  106. +                       else
  107. +                       {
  108. +                               writeD(0x00); // 6d 01 00 00 00 - to hide away
  109. +                               writeD(0x00); // 6d 02 00 00 00 - to castle
  110. +                               writeD(0x00); // 6d 03 00 00 00 - to siege HQ
  111. +                       }
  112. +        }
  113.  
  114.                 writeD(_sweepable ? 0x01 : 0x00); // sweepable  (blue glow)
  115.                 writeD(_access.allowFixedRes() ? 0x01 : 0x00); // 6d 04 00 00 00 - to FIXED
Edited by martuxas1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • I work with Kenrix and he is a  next level coder. Hugely Recommended.
    • Follow our Telegram channel, because exciting events are coming very soon! Halloween, 11.11, and also a giveaway related to 3000 subscribers in our Telegram channel are ahead! What do you think we have prepared? Subscribe to our Telegram channel and stay updated on all the news: https://t.me/accsforyou_shop Active links to SOCNET stores: Digital goods store (Website): Go Telegram store bot: Go – convenient access to the store via Telegram messenger. Telegram Stars purchasing bot: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to introduce you to the current list of promotions and special offers for purchasing products and services of our platform: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, Bot) in October! You can also use a promo code for the first purchase: SOCNET (15% discount) 2. Get $1 to your store balance or a 10–20% discount — just send your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." — you need to write it in our forum thread! 3. Get $1 for the first trial launch of the SMM Panel — just open a ticket with the topic “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram channel: https://t.me/accsforyou_shop ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord server: https://discord.gg/y9AStFFsrh Contacts & Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Follow our Telegram channel, because exciting events are coming very soon! Halloween, 11.11, and also a giveaway related to 3000 subscribers in our Telegram channel are ahead! What do you think we have prepared? Subscribe to our Telegram channel and stay updated on all the news: https://t.me/accsforyou_shop Active links to SOCNET stores: Digital goods store (Website): Go Telegram store bot: Go – convenient access to the store via Telegram messenger. Telegram Stars purchasing bot: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to introduce you to the current list of promotions and special offers for purchasing products and services of our platform: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, Bot) in October! You can also use a promo code for the first purchase: SOCNET (15% discount) 2. Get $1 to your store balance or a 10–20% discount — just send your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." — you need to write it in our forum thread! 3. Get $1 for the first trial launch of the SMM Panel — just open a ticket with the topic “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram channel: https://t.me/accsforyou_shop ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord server: https://discord.gg/y9AStFFsrh Contacts & Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Follow our Telegram channel, because exciting events are coming very soon! Halloween, 11.11, and also a giveaway related to 3000 subscribers in our Telegram channel are ahead! What do you think we have prepared? Subscribe to our Telegram channel and stay updated on all the news: https://t.me/accsforyou_shop Active links to SOCNET stores: Digital goods store (Website): Go Telegram store bot: Go – convenient access to the store via Telegram messenger. Telegram Stars purchasing bot: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to introduce you to the current list of promotions and special offers for purchasing products and services of our platform: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, Bot) in October! You can also use a promo code for the first purchase: SOCNET (15% discount) 2. Get $1 to your store balance or a 10–20% discount — just send your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." — you need to write it in our forum thread! 3. Get $1 for the first trial launch of the SMM Panel — just open a ticket with the topic “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram channel: https://t.me/accsforyou_shop ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord server: https://discord.gg/y9AStFFsrh Contacts & Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Follow our Telegram channel, because exciting events are coming very soon! Halloween, 11.11, and also a giveaway related to 3000 subscribers in our Telegram channel are ahead! What do you think we have prepared? Subscribe to our Telegram channel and stay updated on all the news: https://t.me/accsforyou_shop Active links to SOCNET stores: Digital goods store (Website): Go Telegram store bot: Go – convenient access to the store via Telegram messenger. Telegram Stars purchasing bot: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to introduce you to the current list of promotions and special offers for purchasing products and services of our platform: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, Bot) in October! You can also use a promo code for the first purchase: SOCNET (15% discount) 2. Get $1 to your store balance or a 10–20% discount — just send your username after registering on our website using the following template: "SEND ME BONUS, MY USERNAME IS..." — you need to write it in our forum thread! 3. Get $1 for the first trial launch of the SMM Panel — just open a ticket with the topic “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram channel: https://t.me/accsforyou_shop ➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord server: https://discord.gg/y9AStFFsrh Contacts & Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock