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)

It's not working because it's only a void.. And the htm is using goto, which is default action which doesn't even consider your void..

 

You have to create a new bypass which will be used inside htm, for example under partyTp

else if(currentCommand.startsWith("partyTp"))
{
   doPartyTeleport(.. , ..);
}

And lol'ed @ the code, it's so crappy

Edited by SweeTs
  • 0
Posted

I already told you. And the reason I won't give you full work done is that you are trying to open a server, while you can't handle such an easy task. It's another fail server for the community.

  • 0
Posted

LoL Im not opening a server its just a project as I write and also im not a genius I just started learning so  I need some help :3

Take a look at the code, you can't learn anything by applying patches...

  • 0
Posted (edited)


@Override
public void onBypassFeedback(L2PcInstance player, String command)
{
if (command.equals("giveTp"))
{
if ((System.currentTimeMillis()-getLastEventTime())/1000/60/60 < 24) //check for 24 hours after instance is done
{
player.sendMessage("Next available date:"+getEventCooldown());
return;
}
 
if (player.getParty() != null)
{
  and continue your checks
 

Edited by Akken
  • 0
Posted (edited)

com.l2jfrozen.gameserver.model.actor.instance.L2TeleporterInstance.java
 

http://pastebin.com/qZEk59QP

 

And edit the ( player.teleToLocation(-21598, 185328, -5646); )

The use at Gatekeeper HTML

 

<a action="bypass -h npc_%objectId%_party" msg="811;Party Zone">Party Zone</a>
Edited by iSparky
  • 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:

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

    • 亲爱的合作伙伴! 目前我们非常需要以下项目: ➡ WhatsApp 老账户 ➡ Twitter 带粉丝和帖子账户(老账户) 请通过以下联系方式与我们联系。我们很高兴与您合作! 我们项目的有效链接: 数字商品商店(网站): 前往 商店 Telegram 机器人: 前往 – 通过 Telegram 信使方便访问商店。 虚拟号码服务: 前往 用于购买 Telegram Stars 的 Telegram 机器人: 前往 – 在 Telegram 中快速且优惠地购买 Stars。 SMM 面板: 前往 – 推广您的社交媒体账户。 联系方式和支持: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Dear partners! At the moment we are in great need of the following positions: ➡ WhatsApp OLD Accounts ➡ Twitter accounts with followers and posts (old accounts) Contact us via the details below. We will be glad to cooperate! Active links to our projects: Digital goods store (Website): Go to Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Virtual numbers service: Go to Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Dear partners! At the moment we are in great need of the following positions: ➡ WhatsApp OLD Accounts ➡ Twitter accounts with followers and posts (old accounts) Contact us via the details below. We will be glad to cooperate! Active links to our projects: Digital goods store (Website): Go to Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Virtual numbers service: Go to Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Dear partners! At the moment we are in great need of the following positions: ➡ WhatsApp OLD Accounts ➡ Twitter accounts with followers and posts (old accounts) Contact us via the details below. We will be glad to cooperate! Active links to our projects: Digital goods store (Website): Go to Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Virtual numbers service: Go to Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Dear partners! At the moment we are in great need of the following positions: ➡ WhatsApp OLD Accounts ➡ Twitter accounts with followers and posts (old accounts) Contact us via the details below. We will be glad to cooperate! Active links to our projects: Digital goods store (Website): Go to Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Virtual numbers service: Go to Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. 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