I added this MOD on my server, however I have a problem; When clicking where the player wants to go, he is teleported directly, the bar with the "Ok" and "Cancel" buttons only appears after the player has already been teleported. Should any part of the code be absent?
Config.java
public static boolean TELEPORTER_ENABLE;
public static FastList<Integer> ACCEPTED_TELEPORTERS = new FastList<>();
TELEPORTER_ENABLE = Boolean.valueOf(p.getProperty("EnableTeleporter", "false")).booleanValue();
if (TELEPORTER_ENABLE)
{
ACCEPTED_TELEPORTERS = new FastList<>();
for (String type : p.getProperty("AcceptedTeleportersId", "30080").split(",")) {
ACCEPTED_TELEPORTERS.add(Integer.valueOf(type));
}
}
config.properties
# ================================================================
# Teleporter System
# ================================================================
# Teleporter com timer
# NOTA: adc systemmsg 2155 para funcionar
# Ativar timmer teleporter
EnableTeleporter = True
# Ativar Id teleporters?
AcceptedTeleportersId = 30080
# Systemmsg ID
MessageID = 2155
L2TeleporterInstance.java (In the doTeleport method)
Where was I called a scammer? Is there any proof, etc.? There are a lot of reviews about our store online, etc.
https://zhyk.org/forum/showthread.php?t=1108673
🔍 Inventory 1.0 is a next-generation inventory system that stands out with its special minimal clothing system. Carefully designed and prepared according to the highest standards of your server, it not only enhances your gaming experience but also contributes to your server's infrastructure.
⚙️ Supported: QB-CORE
Features:
✅ Instant Delivery: All products you purchase will be instantly assigned to your account as soon as your payment is completed.
✅ Clothing System: With the special animated clothing configurations in your inventory, you will be able to change outfits with ease. Experience a unique roleplaying experience with high-quality animations and customizable clothing options.
✅ Minimalist Inventory System: This inventory system, with its visuals, animations, and mechanics, offers maximum efficiency without overwhelming your screen and limiting your roleplaying experience. It’s designed to be user-friendly while enhancing your roleplaying experience.
✅ Continuous Updates: The content in the inventory is regularly updated with innovative features added. New animations, additional clothing options, and cutting-edge features ensure a fresh and dynamic experience.
✅ Easy Setup and Compatibility: Compatible with QB-CORE, this system is easy to install and optimized for quick integration into your server. It works seamlessly with a simple drag-and-drop method.
✅ Performance Optimization: The system is optimized to avoid low FPS and performance drops. All features of the inventory run smoothly without affecting your server’s performance.
✅ Multilingual Support: With support for different languages, you can cater to an international player base and build a larger community on your server.
✅ Flexible Customization Options: You can fully customize the inventory according to your needs and server rules. Choose between different outfits and animations to create a unique gaming experience.
✅ Comprehensive Help and Support: With 24/7 support, you can quickly resolve any issues you encounter. Our technical support and user guides are always here to assist you.
Shop Now! Take your game to the next level with Inventory 1.0 and enjoy its unique features. Get ready to make a real difference in your roleplaying experience!
--------------------------TEBEX: https://matza.tebex.io/package/7174862 --------------------------
Question
L2shaken
http://imgur.com/a/APPzF
I added this MOD on my server, however I have a problem; When clicking where the player wants to go, he is teleported directly, the bar with the "Ok" and "Cancel" buttons only appears after the player has already been teleported. Should any part of the code be absent?
Config.java
public static boolean TELEPORTER_ENABLE; public static FastList<Integer> ACCEPTED_TELEPORTERS = new FastList<>(); TELEPORTER_ENABLE = Boolean.valueOf(p.getProperty("EnableTeleporter", "false")).booleanValue(); if (TELEPORTER_ENABLE) { ACCEPTED_TELEPORTERS = new FastList<>(); for (String type : p.getProperty("AcceptedTeleportersId", "30080").split(",")) { ACCEPTED_TELEPORTERS.add(Integer.valueOf(type)); } }config.properties
L2TeleporterInstance.java (In the doTeleport method)
if ((Config.TELEPORTER_ENABLE) && (Config.ACCEPTED_TELEPORTERS.contains(Integer.valueOf(getTemplate().getNpcId())))) { ConfirmDlg confirm = new ConfirmDlg(SystemMessageId.S1_REQUEST_TELEPORT_TO_S2_DO_YOU_ACCEPT.getId()); confirm.addString(getTemplate().getName()); confirm.addZoneName(list.getLocX(), list.getLocY(), list.getLocZ()); confirm.addTime(15000); confirm.addRequesterId(player.getObjectId()); int[] cords = { list.getLocX(), list.getLocY(), list.getLocZ() }; player.addTeleporterCoords(cords); player.sendPacket(confirm); }ConfirmDlg.java
DlgAnswer.java
final L2PcInstance activeChar = getClient().getActiveChar(); if (activeChar == null) return; +Long answerTime = getClient().getActiveChar().getConfirmDlgRequestTime(this._requestId); +if ((this._answer == 1) && (answerTime != null) && (System.currentTimeMillis() > answerTime.longValue())) { +this._answer = 0; +} +getClient().getActiveChar().removeConfirmDlgRequestTime(this._requestId); +if (this._messageId == SystemMessageId.S1_REQUEST_TELEPORT_TO_S2_DO_YOU_ACCEPT.getId()) +{ +if ((activeChar.getTeleporterCoords() != null) && (this._answer != 0)) +{ +activeChar.teleToLocation(activeChar.getTeleporterCoords()[0], activeChar.getTeleporterCoords()[1], activeChar.getTeleporterCoords()[2]); +activeChar.addTeleporterCoords(null); +} +} if (Config.DEBUG) LOGGER.debug(getType() + ": Answer acepted. Message ID " + _messageId + ", asnwer " + _answer + ", unknown field " + _requestId); +if (_answer == 1 && answerTime != null && System.currentTimeMillis() > answerTime) +{ +_answer = 0; +} +getClient().getActiveChar().removeConfirmDlgRequestTime(_requestId);L2PcInstance.java
private int[] TELEPORTER_COORDS; private final HashMap<Integer, Long> confirmDlgRequests = new HashMap<>(); public void addConfirmDlgRequestTime(int requestId, int time) { this.confirmDlgRequests.put(Integer.valueOf(requestId), Long.valueOf(System.currentTimeMillis() + time + 2000L)); } public Long getConfirmDlgRequestTime(int requestId) { return this.confirmDlgRequests.get(Integer.valueOf(requestId)); } public void removeConfirmDlgRequestTime(int requestId) { this.confirmDlgRequests.remove(Integer.valueOf(requestId)); } public void addTeleporterCoords(int[] cords) { this.TELEPORTER_COORDS = cords; } public int[] getTeleporterCoords() { return this.TELEPORTER_COORDS; }SystemMessageId.java
/** * ID: 2155<br> * Message: $s1 request teleport to $s2. Do you accept? */ S1_REQUEST_TELEPORT_TO_S2_DO_YOU_ACCEPT(2155),CLIENT:
System/systemmsg-e.dat
Edited by L2shaken2 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now