Jump to content
  • 0

Question

Posted

hello I have this code:

 

 

Index: D:\eclipse_luna\Workspace\L2jFrozen_GameServer\head-src\com\l2jfrozen\gameserver\model\actor\instance\L2TeleporterInstance.java
===================================================================
--- D:\eclipse_luna\Workspace\L2jFrozen_GameServer\head-src\com\l2jfrozen\gameserver\model\actor\instance\L2TeleporterInstance.java   (revision 1116)
+++ D:\eclipse_luna\Workspace\L2jFrozen_GameServer\head-src\com\l2jfrozen\gameserver\model\actor\instance\L2TeleporterInstance.java   (working copy)

   else
   {
      LOGGER.warn("No teleport destination with id:" + val);
   }
   player.sendPacket(ActionFailed.STATIC_PACKET);
   list = null;
}
   
+@SuppressWarnings("unused")
+private void doPartyTeleport(final L2PcInstance player, final int val)
+{
+   if (player.getParty() == null)
+   {
+      player.sendMessage("You must be in party of 5-9 members to use the teleport!");
+      return;
+   }
+   
+   if (player.getObjectId() != player.getParty().getPartyLeaderOID())
+   {
+      player.sendMessage("You must be party leader to use the teleport!");
+      return;
+   }
+   
+   int NumberPartyMembers = 0;      
+   for (final L2PcInstance temp : player.getParty().getPartyMembers())
+   {
+      NumberPartyMembers++;   
+   }
+   
+   if(NumberPartyMembers < 5 && NumberPartyMembers > 9)
+   {
+      player.sendMessage("You must be in party of 5-9 members to use the teleport!");
+      return;
+   }
+   
+   L2TeleportLocation list = TeleportLocationTable.getInstance().getTemplate(val);
+   // Teleport ID must be 99999
+   if (list.getTeleId() == 99999)
+   {
+      for (final L2PcInstance temp : player.getParty().getPartyMembers())
+      {
+         temp.teleToLocation(list.getLocX(), list.getLocY(), list.getLocZ(), true);   
+      }
+   }
+}
   
/**
 * Validate condition.
 * @param player the player
 * @return the int
 */
private int validateCondition(final L2PcInstance player)
{
   if (CastleManager.getInstance().getCastleIndex(this) < 0) // Teleporter isn't on castle ground

And I also created the html: with the id 919192 as it writes:

(just to test it)

 

 

gameserver/data/hml/teleporter/919192.htm

<html>
<body>
<center>
<tr><td><font color="FF40FF">Dungeon Gatekeeper</font></td></tr>
<br>
<tr><td><font color="FF0066">______________________________</font></td></tr>
<br>
<br>
<tr><td><a action="bypass -h npc_%objectId%_goto 50146" msg="811;Saints"><font color="C00080">Saint's</font></a></td></tr>
<tr><td><br></td></tr>
<br>
<br>
<tr><td><font color="FF0066">______________________________</font></td></tr>
</body>
</html>

 

But it doesnt working it teleportes me even if I am alone (I tester it with a single character no GM) Also Plz tell me how to add an item in order to let someone teleport. Happy Chrismtass!

Recommended Posts

  • 0
Posted (edited)

Failado.

 

player.teleToLocation(-21598, 185328, -5646);

 

Only the "player" will be teleported.. Oh you ppl

 

Also, lol at those checks about party leader and party member count.. :troll:

What about this:

   }
  }
+{
 +  if (player.getParty() == null)
 +      
 

I change it.

 

and i try with Dual Box and its works now..  :)

 

(Sorry im new in Java)

 

Did you put the party in a loop? :)

Edited by Tessa
  • 0
Posted

Failado.

 

player.teleToLocation(-21598, 185328, -5646);

 

Only the "player" will be teleported.. Oh you ppl

 

Also, lol at those checks about party leader and party member count.. :troll:

Tested works perfect, and also teleport your partyMembers !

  • 0
Posted

i dont know why its looks like that.

 

I have this and its works :S

http://pastebin.com/qZEk59QP

Why this?

+                                      player.sendMessage("You must be in party of 2-9 members to use the teleport!");
+                                      return;
+                                   }
+                                  
+                                     else if(actualCommand.equalsIgnoreCase("party"))
+                                     {
+                                        for (final L2PcInstance temp : player.getParty().getPartyMembers())
+                                        {
+                                           temp.teleToLocation(80139, 148616, -3559, true);  
+                                        }
+                                     }
  • 0
Posted

Buddy as i said you im new at Java :S

I add this and its works :S

If you can fix the code please make it pastebin and share it here to fix and mine ^^ :)

  • 0
Posted (edited)

There is no need to compare objectId..

if (player.getParty().getLeader() != player)

...

else if (player.getParty().getMemberCount() < 2)

If you use much checks for one thing, you can make it shorter like

L2Party party = player.getParty();

so, you put party instead of player.getParty()

 

Drop your hilarious party count check blabla++, and use only getMemberCount() check :D

Edited by SweeTs
  • 0
Posted

Then why SweeTs you dont make a "Code" for alextoti13 ? :/

I like cuz this forum have very skilled guys and when one member ask something with 7-8 Lines

all reply but nobody help.

For me at this forum as i have see at this 4-5 days only Tessa help people's.

  • 0
Posted (edited)

For me at this forum as i have see at this 4-5 days only Tessa help people's.

... :gusta:

 

 

Then why SweeTs you dont make a "Code" for alextoti13 ? :/

It's "help" section, not "create instead of me". I can give tips, hints and so on. But I won't give to anyone the whole ready code.. Let's be serious :)

 

You try your best, when you stuck here we are, ready to help, improve the code and so on. BUt, "hello, please give me this, this and this. Ok thanks." - it's not working like that, you won't learn anything :)

Edited by SweeTs
  • 0
Posted

... :gusta:

 

 

It's "help" section, not "create instead of me". I can give tips, hints and so on. But I won't give to anyone the whole ready code.. Let's be serious :)

 

Good point, if you want something coded from scratch hire someone to do it/

  • 0
Posted

... :gusta:

 

 

It's "help" section, not "create instead of me". I can give tips, hints and so on. But I won't give to anyone the whole ready code.. Let's be serious :)

 

You try your best, when you stuck here we are, ready to help, improve the code and so on. BUt, "hello, please give me this, this and this. Ok thanks." - it's not working like that, you won't learn anything :)

 

SweeTs is my spiritual baby, enough said.

  • 0
Posted (edited)

SweeTs is my spiritual baby, enough said.

Sensei, senpai.. !? Nooo, Ero-sensei  dw1_4.gif

Edited by SweeTs

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

    • 🔥 HF Rework Multi-Proff x10 is coming! ⚔️ New Samurai Crow Client ⚔️ Reworked Systems & Progression ⚔️ Updated Instances ⚔️ Classic Multeria Atmosphere 🧪 Pre-OBT is already live! 📅 Official OBT: June 29 🚀 Launch: July 3 🐞 Report bugs during testing and earn valuable rewards at launch! See you on the battlefield! https://rework.multeria.world/
    • PlayCMS - это удобная система управления веб-сайтом, разработанная специально для игровых проектов Lineage 2. CMS позволяет быстро запустить полнофункциональный серверный сайт с регистрацией игроков, личным кабинетом, новостями, рейтингами, магазином, модулями и гибкой панелью администратора. Система ориентирована на владельцев серверов Lineage 2, которым нужен красивый, функциональный и понятный сайт без лишних сложностей.  PlayCMS уже предоставляет базовые функции для управления проектами, такие как публикация новостей, настройка страниц, работа с пользователями, подключение шаблонов, а также установка модулей и плагинов. Ключевые особенности PlayCMS: — удобная административная панель; — регистрация и авторизация игроков; — учетная запись пользователя; — новостные и информационные страницы; — рейтинги игроков и кланов; — поддержка шаблонов дизайна; — установка модулей и плагинов через административную панель; — магазин цифровых продуктов; — категории продуктов; — возможность добавить фавикон; — защита лицензии для административной панели; — адаптация для игровых проектов Lineage 2; — возможность расширения функционала в соответствии с потребностями сервера. PlayCMS подходит как для новых игровых проектов, так и для существующих серверов, которым нужен удобный сайт с современным дизайном и интуитивно понятным управлением. Система проста в настройке и поддерживает индивидуальные шаблоны, дополнительные плагины и модули, что позволяет вам развивать свой сайт параллельно с развитием сервера. PlayCMS — это готовое решение для владельцев серверов Lineage 2, которым нужен красивый, быстрый и функциональный сайт. Демоверсия —  https://demo.playcms.ru/ Я разработчик этого чуда. Я готов выслушать конструктивную критику, а также ваши предложения по улучшению движка. Кроме того, я пишу модули любой сложности для этой CMS. Свяжитесь со мной: Telegram — @playcms       EN   PlayCMS is a user-friendly website management system designed specifically for Lineage 2 gaming projects. The CMS allows you to quickly launch a fully functional server website with player registration, personal account, news, ratings, a store, modules, and a flexible admin panel. The system is focused on Lineage 2 server owners who need a beautiful, functional, and clear website without unnecessary complexity. PlayCMS already provides basic features for project management, such as publishing news, customizing pages, working with users, connecting templates, and installing modules and plugins. Key Features of PlayCMS: — a convenient administrative panel; — player registration and authorization; — user account; — news and information pages; — player and clan ratings; — support for design templates; — installation of modules and plugins through the admin panel; — digital product store; — product categories; — ability to add a favicon; — license protection for the admin panel; — adaptation for Lineage 2 game projects; — the ability to expand functionality to meet the needs of the server. PlayCMS is suitable for both new gaming projects and existing servers that require a user-friendly website with a modern appearance and intuitive management. The system is easy to configure and supports individual templates, additional plugins, and modules, allowing you to develop your website alongside your server. PlayCMS is a ready-made solution for Lineage 2 server owners who need a beautiful, fast, and functional website. Demo - https://demo.playcms.ru/ I am the developer of this miracle. I am ready to listen to constructive criticism, as well as your suggestions for improving the engine. I also write modules of any complexity for this cms. Contact me: Telegram - @playcms   Скачать\Download : https://drive.google.com/file/d/15Az9WVDD4SQNyOPAsXMU4-mGHOiA_U_d/view     Added a new module "Wheel of Fortune" to the demo version.  PlayCMS Fortune Wheel - module "Wheel of Fortune" for Play CMS Purpose: - adds a Lineage 2-style wheel of fortune to the user's personal account; - displays in the personal account on top of the balance and warehouse block; - supports prizes: Adena, Coin of Luck, premium account, common items, empty slots; - before submitting the form, shows the animation of the wheel spinning; - if there are no attempts, it displays the "No attempts" modal window; - the won gift is automatically added to the user's inventory; - adds a separate "Wheel of Fortune" section to the admin panel; - in the admin panel, you can edit slots, Item ID, quantity, drop chance, attempts, and the price of purchasing attempts using your balance.
    • To increase visibility and make sure your offer reaches the right audience, I'd recommend exploring the tools at CS2WH. They have a Deals Bot that might help you track market prices and adjust your strategy on the fly. I'm finding their resources super helpful for keeping tabs on the trading scene. Plus, they emphasize safety and provide insights on legal skin trading, which is crucial for maintaining credibility.
    • I'm also trying to contact them, and I only have their Telegram contact, probably the same one as yours, and I haven't received a response in months.
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..