I try my players when add a new sub village master take from them 200 coin's...i manage to do that: when a player have 0 coins the master work just i want but when player have at least 1 coin village master print "message incorrect item count" and he add the sub class here is the code any help will be appreciate..
if (Config.SUBCLASS_WITH_ITEM_AND_NO_QUEST)
{
L2ItemInstance coinItem = player.getInventory().getItemByItemId(3481);
if (coinItem == null)
{
player.sendMessage("Sorry you must give me \"200 Coin's\" for each subclass and you dont have.");
player.setLocked(false);
return;
}
if (allowAddition)
{
player.destroyItemByItemId("Quest", 3481, 200, this, true);
}
}
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
sakisd
Hi mates I need some help
I try my players when add a new sub village master take from them 200 coin's...i manage to do that: when a player have 0 coins the master work just i want but when player have at least 1 coin village master print "message incorrect item count" and he add the sub class here is the code any help will be appreciate..
if (Config.SUBCLASS_WITH_ITEM_AND_NO_QUEST) { L2ItemInstance coinItem = player.getInventory().getItemByItemId(3481); if (coinItem == null) { player.sendMessage("Sorry you must give me \"200 Coin's\" for each subclass and you dont have."); player.setLocked(false); return; } if (allowAddition) { player.destroyItemByItemId("Quest", 3481, 200, this, true); } }5 answers to this question
Recommended Posts