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);
}
}
Coming soon — New Year promotions across the entire SOCNET ecosystem
We are preparing special offers, bonuses, and surprises across all our projects.
Follow updates on our social media — you definitely don’t want to miss them.
News:
➡ Telegram channel: https://t.me/accsforyou_shop
➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t
➡ Discord server: https://discord.gg/y9AStFFsrh
Coming soon — New Year promotions across the entire SOCNET ecosystem
We are preparing special offers, bonuses, and surprises across all our projects.
Follow updates on our social media — you definitely don’t want to miss them.
News:
➡ Telegram channel: https://t.me/accsforyou_shop
➡ WhatsApp channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t
➡ Discord server: https://discord.gg/y9AStFFsrh
We are looking for partners and account suppliers for cooperation
We are open to partnerships with reliable account suppliers for the following services:
➡ Tinder
➡ Badoo
➡ Bumble
➡ Hinge
➡ Happn
➡ Meetic
➡ VK Dating
➡ LINE
➡ Snapchat
➡ Reddit
➡ LinkedIn
➡ Instagram
➡ Facebook
➡ Threads
➡ Google ADS
➡ E-mails
➡ WhatsApp
➡ Twitter
We are considering long-term cooperation, stable volumes, and mutually beneficial terms.
If you have any offers — we will be glad to discuss the details.
Contact us using the details below.
➡ Telegram: https://t.me/socnet_support
➡ WhatsApp: https://wa.me/79051904467
➡ Discord: socnet_support
➡ ✉ Email: solomonbog@socnet.store
Come and JOIN us on Infinite Elmore 10x - Lineage2.cz
Server Grand Opening on Friday, 13th of February 2026 at 19:00 UTC+1.
Web: https://www.lineage2.cz/
Discord: https://www.lineage2.cz/discord
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