So I adapted a code from l2jbrasil into my pack, however since it was old as shit I decided to remake it.
So i did
in config.java
+ public static boolean ENABLE_LEVEL_REWARD;
+ public static int LEVEL_REWARD_ITEM;
+ public static int LEVEL_REWARD_COUNT;
+ public static int LEVEL_TO_REWARD;
+
+ // Level Reward System
+ if (Config.ENABLE_LEVEL_REWARD && getLevel() == Config.LEVEL_TO_REWARD)
+ {
+ // Item Level Reward System
+ addItem("Level Reward", Config.LEVEL_REWARD_ITEM, Config.LEVEL_REWARD_COUNT, this, true);
+ sendMessage("Make sure you reach your level first. " +Config.LEVEL_TO_REWARD+ " .");
+ NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
+ html.setFile(new StringBuilder("data/html/mods/LevelReward/level.htm").toString());
+ html.replace("%objectId%", String.valueOf(getObjectId()));
+ sendPacket(html);
+ }
Its just a simple code in order to reward players once they reach level 80.
I have added everything into l2jhellas.ini, and I have made the html file in the correct order
when I start the server I get informed that the level rewarder is enabled in the console. But when my player reachers level 80 he gets no reward. What am I missing here?
We’ve been live since November 28 — almost 1 full month of nonstop action — and we’re stronger than ever!
The server is growing every day, the community keeps getting stronger, and we’re working non-stop to deliver stability, quality, and fun.
⚔️ Daily Events
🛠️ Continuous patches & improvements
🌍 Players from all around the world
❤️ Community always comes first
🎄 Merry Christmas & Happy Holidays to everyone!
Thank you for being part of L2Elixir — the journey continues!
General
A new “Cloak Preview Mistress” NPC has been added next to the Beauty Shop, allowing players to preview cloaks for a few seconds before choosing.
Anti-Bot System Update
Implemented a new BOT-CHECKER system.
The BOT-CHECKER will randomly visit players across the world (suspicious or not).
Failure to interact or respond will result in a PERMANENT ban.
Added additional anti-bot checks for PvP-flagged players.
Any detected abuse or automation attempts will result in a PERMA ban.
Events
Santa’s Weapon Exchange now also rewards A-grade Limited Weapons.
Fixed an issue where Santa sometimes did not disappear if a player didn’t receive a reward.
Fixed Mario Kart not ending properly after the first racer finished.
Fixed Events not teleporting players who were in requests, parties, trades, etc.
Client
Implemented CTRL + C / CTRL + V (Copy & Paste).
Fixed Servitor Wind Walk & Wind Walk descriptions.
Fixed Ultimate Defense skill description.
Sieges
All Castle Sieges are now enabled!
We strongly recommend everyone to claim a Castle and fight every Saturday for the Territory Flags!
Website: https://l2elixir.org/
Discord: https://discord.gg/5ydPHvhbxs
Question
Extreamer
So I adapted a code from l2jbrasil into my pack, however since it was old as shit I decided to remake it.
So i did
in config.java
+ENABLE_LEVEL_REWARD = Boolean.parseBoolean(L2JHellasSettings.getProperty("AllowLevelRewardSystem", "False")); +LEVEL_REWARD_ITEM = Integer.parseInt(L2JHellasSettings.getProperty("LevelewardItemID", "57")); +LEVEL_REWARD_COUNT = Integer.parseInt(L2JHellasSettings.getProperty("LevelRewardAmount", "1")); +LEVEL_TO_REWARD = Integer.parseInt(L2JHellasSettings.getProperty("PlayerLevel", "20")); +if (USE_SAY_FILTER)then in L2PCinstance.java
+ + // Level Reward System + if (Config.ENABLE_LEVEL_REWARD && getLevel() == Config.LEVEL_TO_REWARD) + { + // Item Level Reward System + addItem("Level Reward", Config.LEVEL_REWARD_ITEM, Config.LEVEL_REWARD_COUNT, this, true); + sendMessage("Make sure you reach your level first. " +Config.LEVEL_TO_REWARD+ " ."); + NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); + html.setFile(new StringBuilder("data/html/mods/LevelReward/level.htm").toString()); + html.replace("%objectId%", String.valueOf(getObjectId())); + sendPacket(html); + }Its just a simple code in order to reward players once they reach level 80.
I have added everything into l2jhellas.ini, and I have made the html file in the correct order
when I start the server I get informed that the level rewarder is enabled in the console. But when my player reachers level 80 he gets no reward. What am I missing here?
Edited by ExtreameR16 answers to this question
Recommended Posts