This is a Java extension for the Lucera L2J emulator, designed to integrate with the top.l2jbrasil.com voting system.
- Individual Vote Verification: Uses
player_id(Unique Entropic ID based on IP) to validate votes individually. - Array Support: Handles the new API response format containing arrays of votes.
- Anti-Flood: Prevents duplicate rewards by tracking the last rewarded vote ID.
- Configurable: Options to ignore vote status (reward anyway) and customize rewards.
- Download: Go to the Releases page and download the latest
topl2jbrasil_com.jar. - Deploy: Place the
.jarfile into your server'slibs/orextensions/folder (verify your server's specific folder for extensions). - Config:
- Copy
config/TOPL2JBR.properties(from source) to your server'sconfig/directory. - Open
config/TOPL2JBR.propertiesand set yourApiKeyandRewardItemId.
- Copy
- Restart: Restart your GameServer to load the extension.
-
Get your ID: Log in to the game and type the command:
.voteidYou will receive a unique, short code (e.g.,
AgB321). -
Vote: Go to the server's voting page on top.l2jbrasil.com.
- When asked "Tem um vote id?", enter the code you received (e.g.,
AgB321). - Complete the CAPTCHA and vote.
- When asked "Tem um vote id?", enter the code you received (e.g.,
- Reward: The system automatically checks for your vote in the background (every few minutes). Once confirmed, you will automatically receive your reward in your inventory.
- Entropic ID: The system generates a unique, short ID based on the player's IP address. This ID is permanent for that IP and is easy to type (max 6 characters).
- Automation: The
VoteManagerruns periodically (configurable in properties) to check for valid votes using this ID. - Validation: Duplicate votes for the same ID are filtered out to prevent abuse.
# Enable the Vote Manager
UseTOPL2JBRVoteManager = true
# Your API Key from top.l2jbrasil.com
ApiKey = YOUR_API_KEY
# Check interval in seconds (default: 300)
CheckDelay = 300
# Reward Item ID (e.g., 57 for Adena)
RewardItemId = 57
# Reward Count
RewardCount = 1
# If true, rewards player even if the vote status is not '1' (validated)
RewardIgnoreVoteStatus = falseThis project depends on l2.gameserver and l2.commons libraries from the Lucera server.
To compile and test locally without the full server source, "Stub" classes are provided in the test/stubs directory.
Compile Production Code:
javac -d out/build_prod -sourcepath test/stubs src/topl2jbrasil_com/*.javaCompile and Run Tests:
javac -d out/build_test -cp out/build_prod -sourcepath "test/stubs;src" test/topl2jbrasil_com/*.java
java -cp "out/build_test;out/build_prod;test/stubs" topl2jbrasil_com.IntegrationTestTo generate the final .jar for your server:
jar cf topl2jbrasil_com.jar -C out/build_prod .This JAR contains only the extension code and is ready to be loaded by the server.
MIT License
Copyright (c) 2023 top.l2jbrasil.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.