Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- #P aCis_gameserver
- Index: java/net/sf/l2j/gameserver/model/actor/instance/L2TeleporterInstance.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/model/actor/instance/L2TeleporterInstance.java (revision 3)
- +++ java/net/sf/l2j/gameserver/model/actor/instance/L2TeleporterInstance.java (working copy)
- @@ -66,6 +66,17 @@
- return;
- }
- }
- + if (actualCommand.equalsIgnoreCase("customtele"))
- + {
- + if (st.countTokens() <= 0)
- + return;
- +
- + if (condition == COND_REGULAR || condition == COND_OWNER)
- + {
- + doCustomTeleport(player, Integer.parseInt(st.nextToken()));
- + return;
- + }
- + }
- else if (command.startsWith("Chat"))
- {
- Calendar cal = Calendar.getInstance();
- @@ -202,6 +213,32 @@
- player.sendPacket(ActionFailed.STATIC_PACKET);
- }
- + private static void doCustomTeleport(L2PcInstance player, int val)
- + {
- + L2TeleportLocation list = TeleportLocationTable.getInstance().getTemplate(val);
- + if (list != null)
- + {
- + if (player.isInCombat() && player.isAlikeDead())
- + {
- + player.sendMessage("You Can't Do This!");
- + return;
- + }
- + else if (!Config.KARMA_PLAYER_CAN_USE_GK && player.getKarma() > 0 && player.getPvpFlag() > 0) // karma
- + {
- + player.sendMessage("Go away, you're not welcome here.");
- + return;
- + }
- + else if (player.destroyItemByItemId("teleport", 57, 100, null, true))
- + {
- + player.teleToLocation(list.getLocX(), list.getLocY(), list.getLocZ(), 20);
- + }
- + }
- + else
- + _log.warning("No teleport destination with id:" + val);
- +
- + player.sendPacket(ActionFailed.STATIC_PACKET);
- + }
- +
- private int validateCondition(L2PcInstance player)
- {
- if (CastleManager.getInstance().getCastleIndex(this) < 0) // Teleporter isn't on castle ground
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement