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

    • TP Data: X=150148 Y=203643 Z=-3634
    • Hello everyone, this is ADENA L2REBORN / LU4 / MASTERWORK We also have items, epics, etc. discord - adver745645 Our prices are reasonable, so have a nice shopping and a nice day.
    • Dear friends, we are pleased to announce great news — we are launching our new bot for purchasing and renting virtual numbers for receiving SMS from any services! Are you tired of reused or resold numbers from other platforms? Try our solution! Our service allows you to receive SMS from any major popular services. The list includes more than 200 services! SMS receiving country: USA (+1). Real physical US numbers are used — never previously used on other platforms! Currently, only short-term rental is available. The rental duration for each phone number is shown when purchasing. The cost of each number is also shown next to the service before purchase. You can also receive an additional SMS for your number for the selected service (no extra charge for receiving one more SMS). To quickly find the service you need, you can use the convenient search — just type the name of the service you need and get a number for activation. Available payment methods: cryptocurrencies, bank cards, and balance transfer from our other bots. Thank you for your trust! Active links: Virtual Number Service: Go Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store through Telegram messenger. Telegram Bot for purchasing Telegram Stars: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing goods and services from our platform: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, Bot) during October! You can also use the promo code for your first purchase: SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — simply post your username after registration on our website using the following format: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3. Get $1 for your first SMM Panel trial — just open a ticket titled “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 and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Dear friends, we are pleased to announce great news — we are launching our new bot for purchasing and renting virtual numbers for receiving SMS from any services! Are you tired of reused or resold numbers from other platforms? Try our solution! Our service allows you to receive SMS from any major popular services. The list includes more than 200 services! SMS receiving country: USA (+1). Real physical US numbers are used — never previously used on other platforms! Currently, only short-term rental is available. The rental duration for each phone number is shown when purchasing. The cost of each number is also shown next to the service before purchase. You can also receive an additional SMS for your number for the selected service (no extra charge for receiving one more SMS). To quickly find the service you need, you can use the convenient search — just type the name of the service you need and get a number for activation. Available payment methods: cryptocurrencies, bank cards, and balance transfer from our other bots. Thank you for your trust! Active links: Virtual Number Service: Go Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store through Telegram messenger. Telegram Bot for purchasing Telegram Stars: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing goods and services from our platform: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, Bot) during October! You can also use the promo code for your first purchase: SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — simply post your username after registration on our website using the following format: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3. Get $1 for your first SMM Panel trial — just open a ticket titled “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 and 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